禁用WordPress主题以及插件的更新提示

WP技巧9年前 (2016)发布 thec
3,069 00

禁用WordPress主题以及插件的更新提示
方法一,推荐,将以下代码添加到你WordPress主题的 wp-config.php文件中:

define('DISALLOW_FILE_MODS',true);

方法二,将下面的代码片段添加到你的WordPress主题的functions.php文件中即可:

function filter_plugin_updates( $value ) {
unset( $value->response['plugin-directory/plugin-file.php'] );
return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );

 
 

© 版权声明

相关文章