当某个托管于 WordPress 官方的插件有更新版本时,我们一般都可以在后台看到更新提示。不少朋友出于兼容性考虑,不希望更新插件,当然,也不想总看到更新提示。如果要禁用所有插件的更新提示,大家可以试试 隐藏 WordPress 核心/主题/插件更新提示,如果只想隐藏某个特定插件的更新提示,可以按照下面的方法实现。
将下面的代码添加到当前主题的 functions.php 即可:
/**
* WordPress 隐藏特定插件的更新提示
* https://www.wpdaxue.com/disable-plugin-update-notification-specific-plugin.html
* 注意修改第 7 行的插件主文件地址
*/
function filter_plugin_updates( $value ) {
unset( $value->response['plugin-directory/plugin-file.php'] );
return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' ); |
/**
* WordPress 隐藏特定插件的更新提示
* https://www.wpdaxue.com/disable-plugin-update-notification-specific-plugin.html
* 注意修改第 7 行的插件主文件地址
*/
function filter_plugin_updates( $value ) {
unset( $value->response['plugin-directory/plugin-file.php'] );
return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );
注:请根据实际情况,修改第 7 行的 plugin-directory/plugin-file.php 为插件主文件的真实目录(也就是包含了插件名称和版本注释的那个文件的目录)
你还可以试试 在WordPress插件管理界面隐藏已启用的插件
来源:
https://www.wpdaxue.com/disable-plugin-update-notification-specific-plugin.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_32407.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57