if ( isset( $_GET['core-major-auto-updates-saved'
] ) ) { if ( 'enabled' ===
$_GET['core-major-auto-updates-saved'
] ) { $notice_text =
__( 'Automatic updates for all WordPress versions have been enabled. Thank you!'
);
echo '<div class="notice notice-success is-dismissible"><p>' .
$notice_text . '</p></div>';
} elseif ( 'disabled' ===
$_GET['core-major-auto-updates-saved'
] ) { $notice_text =
__( 'WordPress will only receive automatic security and maintenance releases from now on.'
);
echo '<div class="notice notice-success is-dismissible"><p>' .
$notice_text . '</p></div>';
} } require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$updater =
new WP_Automatic_Updater();
// Defaults:
$upgrade_dev =
get_site_option( 'auto_update_core_dev', 'enabled'
) === 'enabled';
$upgrade_minor =
get_site_option( 'auto_update_core_minor', 'enabled'
) === 'enabled';
$upgrade_major =
get_site_option( 'auto_update_core_major', 'unset'
) === 'enabled';
$can_set_update_option = true;
// WP_AUTO_UPDATE_CORE = true (all), 'beta', 'rc', 'development', 'branch-development', 'minor', false.
if ( defined( 'WP_AUTO_UPDATE_CORE'
) ) { if ( false === WP_AUTO_UPDATE_CORE
) { // Defaults to turned off, unless a filter allows it.