From 4bb0ff6491d53d3297fd49af2e6f56d93ab74f80 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 1 Feb 2021 14:27:27 +0000 Subject: [PATCH] Upgrade/Install: Display correct message about the current version in the admin footer. Previously, "You are using a development version" message could be displayed if the user has configured core updates to receive Beta or RC versions, but the update has not happened yet. This brings some consistency with displaying a similar message in `core_upgrade_preamble()` on WordPress Updates screen. Follow-up to [49708], [49736]. Props afragen, pbiron, azaozz, audrasjb, SergeyBiryukov. Fixes #51976. git-svn-id: https://develop.svn.wordpress.org/trunk@50121 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/update.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php index e01fd28eb3..956396f4c8 100644 --- a/src/wp-admin/includes/update.php +++ b/src/wp-admin/includes/update.php @@ -249,19 +249,16 @@ function core_update_footer( $msg = '' ) { $is_development_version = preg_match( '/alpha|beta|RC/', $wp_version ); - if ( $is_development_version && 'latest' === $cur->response ) { - $cur->response = 'development'; + if ( $is_development_version ) { + return sprintf( + /* translators: 1: WordPress version number, 2: URL to WordPress Updates screen. */ + __( 'You are using a development version (%1$s). Cool! Please stay updated.' ), + get_bloginfo( 'version', 'display' ), + network_admin_url( 'update-core.php' ) + ); } switch ( $cur->response ) { - case 'development': - return sprintf( - /* translators: 1: WordPress version number, 2: URL to WordPress Updates screen. */ - __( 'You are using a development version (%1$s). Cool! Please stay updated.' ), - get_bloginfo( 'version', 'display' ), - network_admin_url( 'update-core.php' ) - ); - case 'upgrade': return sprintf( '%s',