用过wordpress的朋友应该知道,当主题或者插件更新了 后台会有提示,
如果不想升级,可以把这个提示关掉。
停用版本更新通知: 打开主题的functions.php文件,加入以下语法,这样即可关闭版本更新通知。 remove_action('load-update-core.php', 'wp_update_themes'); add_filter('pre_site_transient_update_themes', create_function('$a', "return null;")); 停用插件更新通知: 打开主题的functions.php文件,加入以下语法,就可以关闭插件更新通知的讯息了。 remove_action('load-update-core.php', 'wp_update_plugins'); add_filter('pre_site_transient_update_plugins', create_function('$a', "return null;")); 停用主题更新通知: 打开主题的functions.php文件,将以下语法加入到主题内,储存并上传即可。 remove_action ('load-update-core.php', 'wp_update_themes'); add_filter('pre_site_transient_update_core', create_function('$a', "return null;"));
加入到function.php后,这些提示就都隐藏了。