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.


git-svn-id: https://develop.svn.wordpress.org/trunk@49581 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2020-11-12 20:19:46 +00:00
parent 0ad0c55a28
commit f517634e28
2 changed files with 12 additions and 0 deletions

View File

@ -535,6 +535,13 @@ function populate_options( array $options = array() ) {
'disallowed_keys' => '',
'comment_previously_approved' => 1,
'auto_plugin_theme_update_emails' => array(),
// 5.6.0
'auto_update_core_dev' => 'enabled',
'auto_update_core_minor' => 'enabled',
// Default to enabled for new installs.
// See https://core.trac.wordpress.org/ticket/51742.
'auto_update_core_major' => 'enabled',
);
// 3.3.0

View File

@ -2255,6 +2255,11 @@ function upgrade_560() {
if ( ! is_null( $post_category_exists ) ) {
$wpdb->query( "ALTER TABLE $wpdb->posts DROP COLUMN `post_category`" );
}
// When upgrading from WP < 5.6.0 set the core major auto-updates option to `unset` by default.
// This overrides the same option from populate_options() that is intended for new installs.
// See https://core.trac.wordpress.org/ticket/51742.
update_option( 'auto_update_core_major', 'unset' );
}
/**