zoukankan      html  css  js  c++  java
  • 屏蔽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是主题升级

  • 相关阅读:
    CF1368F
    CF1083F
    AGC030F
    AGC030E Less than 3
    CF1083C
    CF526G
    CF1408
    CF1408H Rainbow Triples
    CF1408I
    AGC019E
  • 原文地址:https://www.cnblogs.com/qiengo/p/3857705.html
Copyright © 2011-2022 走看看