Make WordPress Core

Changeset 48559


Ignore:
Timestamp:
07/22/2020 12:13:21 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Site Health: Correct inverted logic for themes in the test for plugin and theme auto-updates.

Follow-up to [48548], [48558].

See #50662.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r48558 r48559  
    23202320                        $cron_offset = $cron->time - time();
    23212321                        if (
    2322                                         $cron_offset >= $this->timeout_missed_cron &&
    2323                                         $cron_offset < $this->timeout_late_cron
    2324                                 ) {
     2322                                $cron_offset >= $this->timeout_missed_cron &&
     2323                                $cron_offset < $this->timeout_late_cron
     2324                        ) {
    23252325                                $this->last_late_cron = $cron->hook;
    23262326                                return true;
    … …  
    23502350                $theme_filter_present   = has_filter( 'auto_update_theme' );
    23512351
    2352                 if ( ( ! $test_plugins_enabled && $ui_enabled_for_plugins ) || ( $test_themes_enabled && $ui_enabled_for_themes ) ) {
     2352                if ( ( ! $test_plugins_enabled && $ui_enabled_for_plugins )
     2353                        || ( ! $test_themes_enabled && $ui_enabled_for_themes )
     2354                ) {
    23532355                        return (object) array(
    23542356                                'status'  => 'critical',
    … …  
    23572359                }
    23582360
    2359                 if ( ( ! $test_plugins_enabled && $plugin_filter_present ) && ( ! $test_themes_enabled && $theme_filter_present ) ) {
     2361                if ( ( ! $test_plugins_enabled && $plugin_filter_present )
     2362                        && ( ! $test_themes_enabled && $theme_filter_present )
     2363                ) {
    23602364                        return (object) array(
    23612365                                'status'  => 'recommended',
Note: See TracChangeset for help on using the changeset viewer.