抓虾 鲜果
google reader QQ邮箱

WordPress插件是使用wp博主不可缺少的,我们会发现有些WordPress插件升级特别的频繁。在这中间有些插件是我们按自己网站需求修改过的,这样的插件肯定是不想升级的,也不愿意看到升级的提示,很碍眼。

那么如何才能禁用这个插件的自动升级提示呢?

方法很简单,将插件所在的文件夹名,插件文件的名称,插件头文件中的插件名,这些统统修改为其他值,这样该插件便不会被 WP.org 识别,也就不会有自动升级的问题。

另外也可以通过代码完全禁用升级提示,请将以下代码写入插件的主文件中:

1
2
3
4
5
6
7
8
<BR>add_filter('option_update_plugins', 'plugin_prevent_upgrade');<BR>
function plugin_prevent_upgrade($opt){<BR>
$plugin = plugin_basename(__FILE__);<BR>
if($opt && isset($opt->response[$plugin])){<BR>//有升级提示?去除之<BR>
unset($opt->response[$plugin]);<BR>
}<BR>
return $opt;<BR>
}<BR>

相关文章

6 Responses to “如何禁止WordPress插件升级”

  1. 泰国圣荷 说道:

    这篇文章写的非常棒 先收藏了 谢谢博主~~~

    [回复]

  2. 豆怪网 说道:

    我记得wp的插件应该都是英文的
    我以前尝试过 后来放弃了

    [回复]

  3. completelyla 说道:

    Magnificent beat ! I would like to apprentice while you amend your website, how can i subscribe for a blog website? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear concept

    [回复]

  4. I simply wanted to make a small note to express gratitude to you for all the superb tips and tricks you are placing at this site. My long internet research has now been rewarded with beneficial facts and techniques to share with my colleagues. I would express that many of us readers are extremely fortunate to dwell in a notable network with so many wonderful individuals with beneficial secrets. I feel pretty lucky to have discovered your web page and look forward to many more thrilling moments reading here. Thanks a lot once more for all the details.

    [回复]

  5. home 说道:

    I like this post, enjoyed this one thanks for posting. “‘I have done my best.’ That is about all the philosophy of living one needs.” by Lin Yutang.

    [回复]

  6. webblog 说道:

    Some genuinely fantastic info , Glad I observed this. “Absence is to love what wind is to fire it extinguishes the small, it enkindles the great.” by Comte DeBussy-Rabutin.

    [回复]

Leave a Reply