From 8372bbdfa5141e7ed1d0d0854d4c6dc2dab183df Mon Sep 17 00:00:00 2001
From: Helen Hou-Sandi ';
- _e( 'You have the latest version of WordPress.' );
-
- if ( wp_http_supports( array( 'ssl' ) ) ) {
- require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
- $upgrader = new WP_Automatic_Updater;
- $future_minor_update = (object) array(
- 'current' => $wp_version . '.1.next.minor',
- 'version' => $wp_version . '.1.next.minor',
- 'php_version' => $required_php_version,
- 'mysql_version' => $required_mysql_version,
- );
- $should_auto_update = $upgrader->should_update( 'core', $future_minor_update, ABSPATH );
- if ( $should_auto_update ) {
- echo ' ' . __( 'Future security updates will be applied automatically.' );
- }
- }
- echo '
';
- }
-
- if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) {
+ if ( isset( $updates[0] ) && isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) {
echo '';
_e( 'An updated version of WordPress is available.' );
echo '
';
@@ -266,16 +245,10 @@ function core_upgrade_preamble() {
__( 'https://wordpress.org/support/article/updating-wordpress/' )
);
echo '
'; - echo '' . __( 'BETA TESTERS:' ) . ' ' . __( 'This site is set up to install updates of future beta versions automatically.' ); - echo '
is_vcs_checkout( ABSPATH ) ) {
+ _e( 'This site appears to be under version control. Automatic updates are disabled.' );
+ } elseif ( $upgrade_major ) {
_e( 'This site is automatically kept up to date with each new version of WordPress.' );
if ( $can_set_update_option ) {
echo '
';
printf(
- '%s',
+ '%s',
wp_nonce_url( add_query_arg( 'value', 'disable', $action_url ), 'core-major-auto-updates-nonce' ),
__( 'Switch to automatic updates for maintenance and security releases only.' )
);
}
} elseif ( $upgrade_minor ) {
- _e( 'This site is automatically kept up to date with maintenance and security releases of WordPress.' );
+ _e( 'This site is automatically kept up to date with maintenance and security releases of WordPress only.' );
if ( $can_set_update_option ) {
echo '
';
printf(
- '%s',
+ '%s',
wp_nonce_url( add_query_arg( 'value', 'enable', $action_url ), 'core-major-auto-updates-nonce' ),
__( 'Enable automatic updates for all new versions of WordPress.' )
);
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index e7f2d8a264..04838ac1a5 100644
--- a/src/wp-includes/functions.php
+++ b/src/wp-includes/functions.php
@@ -1186,6 +1186,7 @@ function wp_removable_query_args() {
'activated',
'admin_email_remind_later',
'approved',
+ 'core-major-auto-updates-saved',
'deactivate',
'delete_count',
'deleted',