php 修复Membership2与Impreza主题的冲突

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 修复Membership2与Impreza主题的冲突相关的知识,希望对你有一定的参考价值。

<?php

/**
* Plugin Name: Fix Membership2 conflict with Impreza theme
* Plugin URI: https://premium.wpmudev.org/
* Description: Fix Membership2 conflict with Impreza theme
* Author: Ariful Islam @ WPMUDEV
* Author URI: https://premium.wpmudev.org/profile/itsarifulislam
* License: GPLv2 or later
*/


if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

function remove_og_iamge_action( $data = null ) {
	remove_action( 'save_post', 'us_save_post_add_og_image' );
	return $data;
}

function add_og_iamge_action( $data = null ) {
	add_action( 'save_post', 'us_save_post_add_og_image' );
	return $data;
}

add_action('ms_model_before_save', 'remove_og_iamge_action');

add_filter( 'ms_model_pages_get_page_types', 'remove_og_iamge_action', 10, 1 );

add_action('ms_model_after_save', 'add_og_iamge_action');

add_filter( 'ms_model_pages_create_missing_page', 'add_og_iamge_action', 10, 1 );

以上是关于php 修复Membership2与Impreza主题的冲突的主要内容,如果未能解决你的问题,请参考以下文章

php PHP重写规则 - 修复与CPT重写Slug相同的Slug分页

php 重力特权//限制选择//修复与GF实时验证的冲突

修复Drupal4与PHP5的不兼容

php 重力特权//条件逻辑日期//修复冲突与WC GF产品附加组件

如何修复与时区相关的 PHP 错误(function.strtotime 和 function.date)

dedecms漏洞修复大全含任意文件上传漏洞与注入漏洞