Make WordPress Core

Changeset 49292


Ignore:
Timestamp:
10/24/2020 12:24:43 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Account for new WP_AUTO_UPDATE_CORE values in auto-updates settings form.

This updates core_auto_updates_settings() to account for the new beta and rc values for the WP_AUTO_UPDATE_CORE constant.

Additionally, recognize these new values as acceptable in Site Health tests.

Follow-up to [48804], [49245], [49254].

Fixes #51319. See #50907.

Location:
trunk/src/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-core-upgrader.php

    r49254 r49292  
    291291                $upgrade_minor = false;
    292292                $upgrade_major = false;
    293             } elseif (
    294                 true === WP_AUTO_UPDATE_CORE
     293            } elseif ( true === WP_AUTO_UPDATE_CORE
    295294                || 'beta' === WP_AUTO_UPDATE_CORE
    296295                || 'rc' === WP_AUTO_UPDATE_CORE
  • trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php

    r49154 r49292  
    2828    public function run_tests() {
    2929        $tests = array(
    30             $this->test_constants( 'WP_AUTO_UPDATE_CORE', array( true, 'minor' ) ),
     30            $this->test_constants( 'WP_AUTO_UPDATE_CORE', array( true, 'beta', 'rc', 'minor' ) ),
    3131            $this->test_wp_version_check_attached(),
    3232            $this->test_filters_automatic_updater_disabled(),
  • trunk/src/wp-admin/update-core.php

    r49285 r49292  
    323323    $upgrade_major = get_site_option( 'auto_update_core_major', false );
    324324
     325    // WP_AUTO_UPDATE_CORE = true (all), 'beta', 'rc', 'minor', false.
    325326    if ( defined( 'WP_AUTO_UPDATE_CORE' ) ) {
    326327        if ( false === WP_AUTO_UPDATE_CORE ) {
     
    329330            $upgrade_minor = false;
    330331            $upgrade_major = false;
    331         } elseif ( true === WP_AUTO_UPDATE_CORE ) {
     332        } elseif ( true === WP_AUTO_UPDATE_CORE
     333            || 'beta' === WP_AUTO_UPDATE_CORE
     334            || 'rc' === WP_AUTO_UPDATE_CORE
     335        ) {
    332336            // ALL updates for core.
    333337            $upgrade_dev   = true;
Note: See TracChangeset for help on using the changeset viewer.