Make WordPress Core

Changeset 50121


Ignore:
Timestamp:
02/01/2021 02:27:27 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update.php

    r49736 r50121  
    250250    $is_development_version = preg_match( '/alpha|beta|RC/', $wp_version );
    251251
    252     if ( $is_development_version && 'latest' === $cur->response ) {
    253         $cur->response = 'development';
     252    if ( $is_development_version ) {
     253        return sprintf(
     254            /* translators: 1: WordPress version number, 2: URL to WordPress Updates screen. */
     255            __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ),
     256            get_bloginfo( 'version', 'display' ),
     257            network_admin_url( 'update-core.php' )
     258        );
    254259    }
    255260
    256261    switch ( $cur->response ) {
    257         case 'development':
    258             return sprintf(
    259                 /* translators: 1: WordPress version number, 2: URL to WordPress Updates screen. */
    260                 __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ),
    261                 get_bloginfo( 'version', 'display' ),
    262                 network_admin_url( 'update-core.php' )
    263             );
    264 
    265262        case 'upgrade':
    266263            return sprintf(
Note: See TracChangeset for help on using the changeset viewer.