• 屏蔽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是主题升级

  • 相关阅读:
    Java 集合类
    Java 中的四种引用及垃圾回收策略
    Java 类的加载过程(阿里面试题)
    JMeter进行一次简单的压力测试
    python使用 HTMLTestRunner.py生成测试报告
    python读取配置文件
    python的IDE工具-- Pycharm
    selenium webdriver+python基本操作
    SQL开发测试使用基础
    python学习笔记
  • 原文地址:https://www.cnblogs.com/qiengo/p/3857705.html
Copyright © 2020-2023  润新知