Site Health: Only run the version checks on the main site.

The version checks that are setup in `wp-includes/update.php` do set up the action, but only for the main site.

Fixes #52135.

Props audrasjb, SergeyBiryukov, maxpertici, aaribaud.
 

Built from https://develop.svn.wordpress.org/trunk@50035


git-svn-id: http://core.svn.wordpress.org/trunk@49736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
whyisjake 2021-01-27 23:27:00 +00:00
parent 35aaaacc04
commit ab6271c0a7
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ class WP_Site_Health_Auto_Updates {
* @return array The test results. * @return array The test results.
*/ */
public function test_wp_version_check_attached() { public function test_wp_version_check_attached() {
if ( ! has_filter( 'wp_version_check', 'wp_version_check' ) ) { if ( ( ! is_multisite() || ( is_main_site() && is_network_admin() ) ) && ! has_filter( 'wp_version_check', 'wp_version_check' ) ) {
return array( return array(
'description' => sprintf( 'description' => sprintf(
/* translators: %s: Name of the filter used. */ /* translators: %s: Name of the filter used. */

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.7-alpha-50034'; $wp_version = '5.7-alpha-50035';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.