From c6034be77959617e5bdb3df7fdb533cf5fee67b6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 22 Jul 2020 00:15:02 +0000 Subject: [PATCH] Site Health: Correct inverted logic for themes in the test for plugin and theme auto-updates. Follow-up to [48548], [48558]. See #50662. Built from https://develop.svn.wordpress.org/trunk@48559 git-svn-id: http://core.svn.wordpress.org/trunk@48321 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-site-health.php | 14 +++++++++----- wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index e3c470d9f5..92d37183df 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -2319,9 +2319,9 @@ class WP_Site_Health { foreach ( $this->crons as $id => $cron ) { $cron_offset = $cron->time - time(); if ( - $cron_offset >= $this->timeout_missed_cron && - $cron_offset < $this->timeout_late_cron - ) { + $cron_offset >= $this->timeout_missed_cron && + $cron_offset < $this->timeout_late_cron + ) { $this->last_late_cron = $cron->hook; return true; } @@ -2349,14 +2349,18 @@ class WP_Site_Health { $plugin_filter_present = has_filter( 'auto_update_plugin' ); $theme_filter_present = has_filter( 'auto_update_theme' ); - if ( ( ! $test_plugins_enabled && $ui_enabled_for_plugins ) || ( $test_themes_enabled && $ui_enabled_for_themes ) ) { + if ( ( ! $test_plugins_enabled && $ui_enabled_for_plugins ) + || ( ! $test_themes_enabled && $ui_enabled_for_themes ) + ) { return (object) array( 'status' => 'critical', 'message' => __( 'Auto-updates for plugins and/or themes appear to be disabled, but settings are still set to be displayed. This could cause auto-updates to not work as expected.' ), ); } - if ( ( ! $test_plugins_enabled && $plugin_filter_present ) && ( ! $test_themes_enabled && $theme_filter_present ) ) { + if ( ( ! $test_plugins_enabled && $plugin_filter_present ) + && ( ! $test_themes_enabled && $theme_filter_present ) + ) { return (object) array( 'status' => 'recommended', 'message' => __( 'Auto-updates for plugins and themes appear to be disabled. This will prevent your sites from receiving new versions automatically when available.' ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 8b43a11275..f1955da75d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-beta3-48558'; +$wp_version = '5.5-beta3-48559'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.