問題描述

我有一個插件,我知道我從來不想更新。我知道這不是最佳做法,但在這種情況下,必須做到這一點。有沒有什麼辦法阻止 WordPress 提示我 auto-update 一個特定的插件 (但仍然正常為所有其他插件提醒) 。

最佳解決方案

你把它放在你的主題的 functions.php 中

//Disable update notification for individual plugins - see my example of plugin block-spam-by-math-reloaded as to how to use this function
function filter_plugin_updates( $value ) {    
unset( $value->response['block-spam-by-math-reloaded/block-spam-by-math-reloaded.php'] );    
return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );

次佳解決方案

T31os 的答案是正確的:增加插件主文件中的版本號。 99.9 … 並且在自述文件中做出相同的改變,以便很好地測量 (儘管我不認為這是實際需要的).. – t31os

參考文獻

注:本文內容整合自 Google/Baidu/Bing 輔助翻譯的英文資料結果。如果您對結果不滿意,可以加入我們改善翻譯效果:薇曉朵技術論壇。