Site Health: Disable recommendations that could be problematic on multisite installs.
When viewing Site Health for a multisite install, there are a few recommendations that are not appropriate and could have negative implications for other sites on the install if the administrator follows the advice provided. For example, Site Health recommends that inactive plugins and themes for a site should be removed. On a single site install, this is a great recommendation. However, on a multisite install, inactive plugins and themes for one site should not be removed because they could be active for other sites on the network. This change also disables the `test_wp_version_check_attached()` test for multisite. This test checks for the presence of the `wp_version_check()` function on the `wp_version_check` hook, which is not present for every site on multisite. Reviewed by jeremyfelt and desrosj. Props iandunn, Clorith, azaozz, jeremyfelt. Fixes #47084. Built from https://develop.svn.wordpress.org/trunk@45275 git-svn-id: http://core.svn.wordpress.org/trunk@45084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e4a0fd4c01
commit
6ac1d4ec1a
|
@ -86,6 +86,10 @@ class WP_Site_Health_Auto_Updates {
|
|||
* @return array The test results.
|
||||
*/
|
||||
public function test_wp_version_check_attached() {
|
||||
if ( ! is_main_site() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$cookies = wp_unslash( $_COOKIE );
|
||||
$timeout = 10;
|
||||
$headers = array(
|
||||
|
|
|
@ -366,7 +366,7 @@ class WP_Site_Health {
|
|||
}
|
||||
|
||||
// Check if there are inactive plugins.
|
||||
if ( $plugins_total > $plugins_active ) {
|
||||
if ( $plugins_total > $plugins_active && ! is_multisite() ) {
|
||||
$unused_plugins = $plugins_total - $plugins_active;
|
||||
|
||||
$result['status'] = 'recommended';
|
||||
|
@ -521,7 +521,7 @@ class WP_Site_Health {
|
|||
}
|
||||
}
|
||||
|
||||
if ( $has_unused_themes && $show_unused_themes ) {
|
||||
if ( $has_unused_themes && $show_unused_themes && ! is_multisite() ) {
|
||||
|
||||
// This is a child theme, so we want to be a bit more explicit in our messages.
|
||||
if ( $active_theme->parent() ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-RC1-45274';
|
||||
$wp_version = '5.2-RC1-45275';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue