diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index 9068fedc78..47f4b6ae52 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -62,7 +62,7 @@ function list_core_update( $update ) { $show_buttons = true; if ( 'development' === $update->response ) { - $message = __( 'You are using a development version of WordPress. You can update to the latest nightly build manually:' ); + $message = __( 'You can update to the latest nightly build manually:' ); } else { if ( $current ) { /* translators: %s: WordPress version. */ @@ -232,28 +232,7 @@ function core_upgrade_preamble() { $wp_version = get_bloginfo( 'version' ); $updates = get_core_updates(); - if ( ! isset( $updates[0]->response ) || 'latest' === $updates[0]->response ) { - echo '

'; - _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 '

'; - } - - if ( isset( $updates[0] ) && 'development' === $updates[0]->response ) { - require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; - $upgrader = new WP_Automatic_Updater; - if ( wp_http_supports( 'ssl' ) && $upgrader->should_update( 'core', $updates[0], ABSPATH ) ) { - echo '

'; - echo '' . __( 'BETA TESTERS:' ) . ' ' . __( 'This site is set up to install updates of future beta versions automatically.' ); - echo '

'; - } + } elseif ( isset( $updates[0] ) && 'development' === $updates[0]->response ) { + echo '

' . __( 'You are using a development version of WordPress.' ) . '

'; + } else { + echo '

' . __( 'You have the latest version of WordPress.' ) . '

'; } echo '