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
This commit is contained in:
Sergey Biryukov 2021-02-01 14:27:27 +00:00
parent e1001678a6
commit 4bb0ff6491

View File

@ -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 <a href="%2$s">stay updated</a>.' ),
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 <a href="%2$s">stay updated</a>.' ),
get_bloginfo( 'version', 'display' ),
network_admin_url( 'update-core.php' )
);
case 'upgrade':
return sprintf(
'<strong><a href="%s">%s</a></strong>',