
In some cases, you may not need a certain plugin to check for updates, so you can use the following WordPress code to disable specific plugin update notifications.
You just need to modify the code below and add it to your theme's functions file.Safe Method to Add Code to the functions.php File: Code Snippets
//屏蔽插件更新通知 https://blog.naibabiji.com/skill/wordpress-jin-zhi-cha-jian-geng-xin-ti-xing.html
function wcr_remove_update_notifications($value) {
// 要屏蔽的插件位置 (从wp-content/plugins文件夹下)
$plugins = array(
'wpjam-basic/wpjam-basic.php'
);
foreach ($plugins as $key => $plugin) {
if (empty($value->response[$plugin])) {
continue;
}
unset($value->response[$plugin]);
}
return $value;
}
add_filter('site_transient_update_plugins', 'wcr_remove_update_notifications');Of course, keeping plugins updated isone of the WordPress security factors. Without a specific reason, do not arbitrarily disable update notifications.
Related articles: