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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.6@50036 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock 2021-01-27 23:30:06 +00:00
parent 4799701cd3
commit ef97ca7e07

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. */