Make WordPress Core


Ignore:
Timestamp:
10/20/2020 07:33:27 PM (15 months ago)
Author:
helen
Message:

Upgrade/Install: Add UI for opting in to core auto-updates for major versions.

Props audrasjb, karmatosed, aaroncampbell, paaljoachim, davidbaumwald.
Fixes #50907.

File:
1 edited

Legend:

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

    r49245 r49254  
    4949     * @param object $current Response object for whether WordPress is current.
    5050     * @param array  $args {
    51      *     Optional. Arguments for upgrading WordPress core. Default empty array.
    52      *
    53      *     @type bool $pre_check_md5    Whether to check the file checksums before
    54      *                                  attempting the upgrade. Default true.
    55      *     @type bool $attempt_rollback Whether to attempt to rollback the chances if
    56      *                                  there is a problem. Default false.
    57      *     @type bool $do_rollback      Whether to perform this "upgrade" as a rollback.
    58      *                                  Default false.
     51     *        Optional. Arguments for upgrading WordPress core. Default empty array.
     52     *
     53     *        @type bool $pre_check_md5    Whether to check the file checksums before
     54     *                                     attempting the upgrade. Default true.
     55     *        @type bool $attempt_rollback Whether to attempt to rollback the chances if
     56     *                                     there is a problem. Default false.
     57     *        @type bool $do_rollback      Whether to perform this "upgrade" as a rollback.
     58     *                                     Default false.
    5959     * }
    6060     * @return string|false|WP_Error New WordPress version on success, false or WP_Error on failure.
     
    280280
    281281        // Defaults:
    282         $upgrade_dev   = true;
    283         $upgrade_minor = true;
    284         $upgrade_major = false;
     282        $upgrade_dev   = get_site_option( 'auto_update_core_dev', true );
     283        $upgrade_minor = get_site_option( 'auto_update_core_minor', true );
     284        $upgrade_major = get_site_option( 'auto_update_core_major', false );
    285285
    286286        // WP_AUTO_UPDATE_CORE = true (all), 'beta', 'rc', 'minor', false.
Note: See TracChangeset for help on using the changeset viewer.