最快捷的方式
最简单的方法是将下面的代码放在您当前主题的 Functions.php 文件中:
setcookie(‘vchideactivationmsg’, ‘1’, strtotime(‘+3 years’), ‘/’);
setcookie(‘vchideactivationmsg_vc11’, (defined(‘WPB_VC_VERSION’) ? WPB_VC_VERSION : ‘1’), strtotime(‘+3 years’), ‘/’);
使用插件方式
或者你可以将下面的代码保存为stop-vc-nag.php,然后放在 wp-content/plugins文件夹中并在后台激活“关闭Visual Composer激活提示”插件。
<?php
/*
Plugin Name: 关闭Visual Composer激活提示
Plugin URI:https://lanyueer.com
Description:此插件可以关闭后台Visual Composer激活提示。
Version: 2016.08.23
Author: 蓝月网络
Author URI: https://lanyueer.com
License: GPL2
*/
add_action(‘admin_init’, function()
{
if(is_admin()) {
setcookie(‘vchideactivationmsg’, ‘1’, strtotime(‘+3 years’), ‘/’);
setcookie(‘vchideactivationmsg_vc11’, (defined(‘WPB_VC_VERSION’) ? WPB_VC_VERSION : ‘1’), strtotime(‘+3 years’), ‘/’);
}
});
移除Visual Composer Ultimate Addons提示
将下面的代码添加到wp-config.php文件中:
define(‘ULTIMATE_NO_EDIT_PAGE_NOTICE’, true);
define(‘ULTIMATE_NO_PLUGIN_PAGE_NOTICE’, true);