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.

This brings the changes in [50035] to the 5.6 branch.

Fixes #52135.

Props audrasjb, SergeyBiryukov, maxpertici, aaribaud.

Built from https://develop.svn.wordpress.org/branches/5.6@50036


git-svn-id: http://core.svn.wordpress.org/branches/5.6@49737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
whyisjake 2021-01-27 23:31:59 +00:00
parent c02d41fd63
commit 1073030b2e
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.
*/
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(
'description' => sprintf(
/* translators: %s: Name of the filter used. */

View File

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