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.
Built from https://develop.svn.wordpress.org/trunk@50121


git-svn-id: http://core.svn.wordpress.org/trunk@49800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-02-01 14:29:01 +00:00
parent 81462ca73e
commit 38293a6aa4
2 changed files with 8 additions and 11 deletions

View File

@ -249,19 +249,16 @@ function core_update_footer( $msg = '' ) {
$is_development_version = preg_match( '/alpha|beta|RC/', $wp_version ); $is_development_version = preg_match( '/alpha|beta|RC/', $wp_version );
if ( $is_development_version && 'latest' === $cur->response ) { if ( $is_development_version ) {
$cur->response = 'development';
}
switch ( $cur->response ) {
case 'development':
return sprintf( return sprintf(
/* translators: 1: WordPress version number, 2: URL to WordPress Updates screen. */ /* translators: 1: WordPress version number, 2: URL to WordPress Updates screen. */
__( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ),
get_bloginfo( 'version', 'display' ), get_bloginfo( 'version', 'display' ),
network_admin_url( 'update-core.php' ) network_admin_url( 'update-core.php' )
); );
}
switch ( $cur->response ) {
case 'upgrade': case 'upgrade':
return sprintf( return sprintf(
'<strong><a href="%s">%s</a></strong>', '<strong><a href="%s">%s</a></strong>',

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.7-alpha-50120'; $wp_version = '5.7-alpha-50121';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.