屏蔽wordpress升级提示

根据自己的需要,挑选适合的代码放在主题的functions.php文件中就可以了

/* 去除 WordPress 後台升級提示 */

// 2.8 ~ 2.9:
add_filter('pre_transient_update_core',    create_function
('$a', "return null;")); // don't update core
add_filter('pre_transient_update_plugins', create_function
('$a', "return null;")); // don't update plugins
add_filter('pre_transient_update_themes',  create_function
('$a', "return null;")); // don't update themes

// 3.0 ~ 3.1:

add_filter('pre_site_transient_update_core',    create_function
('$a', "return null;")); // don't update core
add_filter('pre_site_transient_update_plugins', create_function
('$a', "return null;")); // don't update plugins
add_filter('pre_site_transient_update_themes',  create_function
('$a', "return null;")); // don't update themes

首先因为自己有强迫症,每次看到后台有更新东西就不爽,其次、个人手贱,看见了不舒服就想点,插件、系统还到好说升级了就升级了,就是因为一次升级了主题,大囧所有的设置都没了。都没了。。。。。。你辛苦N久的SEO优化也就白做了。所以如果你有强迫症那就赶紧收藏吧!

注:update_core是指系统升级,update_plugins是插件升级,update_themes是主题升级

posted @ 2014-07-21 08:33  Qiengo  阅读(554)  评论(0编辑  收藏  举报