Make WordPress Core

Changeset 49581


Ignore:
Timestamp:
11/12/2020 08:19:46 PM (4 years ago)
Author:
helen
Message:

Upgrade/Install: Enable all core autoupdates for new installs.

Likely needs more work for multisite installs.

Reference: https://make.wordpress.org/core/2020/11/10/wp5-6-auto-update-implementation-change/

Props audrasjb, azaozz.
See #51743.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/schema.php

    r48991 r49581  
    536536        'comment_previously_approved'     => 1,
    537537        'auto_plugin_theme_update_emails' => array(),
     538
     539        // 5.6.0
     540        'auto_update_core_dev'            => 'enabled',
     541        'auto_update_core_minor'          => 'enabled',
     542        // Default to enabled for new installs.
     543        // See https://core.trac.wordpress.org/ticket/51742.
     544        'auto_update_core_major'          => 'enabled',
    538545    );
    539546
  • trunk/src/wp-admin/includes/upgrade.php

    r49572 r49581  
    22562256        $wpdb->query( "ALTER TABLE $wpdb->posts DROP COLUMN `post_category`" );
    22572257    }
     2258
     2259    // When upgrading from WP < 5.6.0 set the core major auto-updates option to `unset` by default.
     2260    // This overrides the same option from populate_options() that is intended for new installs.
     2261    // See https://core.trac.wordpress.org/ticket/51742.
     2262    update_option( 'auto_update_core_major', 'unset' );
    22582263}
    22592264
Note: See TracChangeset for help on using the changeset viewer.