服务器健康检测应该是很多用wordpress用户现在很郁闷的地方,总是有几个改善信息,但由于种种原因没办法彻底去掉,或者不会去掉
下面就帮助各位强迫症解决这个问题
以下代码源自Site Health Tool Manager插件,添加至主题functions.php或者自己写个小插件内,后台的健康检测一下全绿
/* 屏蔽 健康检测 */
function rm_site_health( $sitehealth ) {
unset( $sitehealth['direct']['php_version'] );
unset( $sitehealth['direct']['wordpress_version'] );
unset( $sitehealth['direct']['plugin_version'] );
unset( $sitehealth['direct']['theme_version'] );
unset( $sitehealth['direct']['sql_server'] );
unset( $sitehealth['direct']['php_extensions'] );
unset( $sitehealth['direct']['php_default_timezone'] );
unset( $sitehealth['direct']['php_sessions'] );
unset( $sitehealth['direct']['utf8mb4_support'] );
unset( $sitehealth['direct']['https_status'] );
unset( $sitehealth['direct']['ssl_support'] );
unset( $sitehealth['direct']['scheduled_events'] );
unset( $sitehealth['direct']['http_requests'] );
unset( $sitehealth['direct']['is_in_debug_mode'] );
unset( $sitehealth['direct']['dotorg_communication'] );
unset( $sitehealth['direct']['background_updates'] );
unset( $sitehealth['direct']['loopback_requests'] );
unset( $sitehealth['direct']['rest_availability'] );
return $sitehealth;
}
add_filter( 'site_status_tests', 'rm_site_health' );
欢迎访问秀主题博客,分享简单实用WP教程