WordPress.org

Make WordPress Core

Changeset 48709


Ignore:
Timestamp:
08/01/2020 07:44:09 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Show the installed WordPress version number on WordPress Updates screen if there is a newer version available.

This makes it easier for a user to know how significant of an update the change might be, and helps them make an informed decision about how to proceed.

Props tmdesigned, dd32, circlecube, dkarfa, hakre, scribu, MadtownLems, markshep, nbachiyski, dmchale, miqrogroove, ovann86, danieltj, sterndata, seanpaulrasmussen, mrgrt, Commeuneimage, dpacks, puneetsahalot, jonoaldersonwp, SergeyBiryukov.
Fixes #15101. See #35554, #47848.

File:
1 edited

Legend:

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

    r48654 r48709  
    5555        $current = true;
    5656    }
     57
    5758    $submit        = __( 'Update Now' );
    5859    $form_action   = 'update-core.php?action=do-core-upgrade';
     
    6061    $mysql_version = $wpdb->db_version();
    6162    $show_buttons  = true;
     63
    6264    if ( 'development' === $update->response ) {
    6365        $message = __( 'You are using a development version of WordPress. You can update to the latest nightly build automatically:' );
     
    125127            } else {
    126128                $message = sprintf(
    127                     /* translators: 1: URL to WordPress release notes, 2: WordPress version number including locale if necessary. */
    128                     __( 'You can update to <a href="%1$s">WordPress %2$s</a> automatically:' ),
     129                    /* translators: 1: Installed WordPress version number, 2: URL to WordPress release notes, 3: New WordPress version number, including locale if necessary. */
     130                    __( 'You can update from WordPress %1$s to <a href="%2$s">WordPress %3$s</a> automatically:' ),
     131                    $wp_version,
    129132                    $version_url,
    130133                    $version_string
    131134                );
    132135            }
     136
    133137            if ( ! $mysql_compat || ! $php_compat ) {
    134138                $show_buttons = false;
     
    140144    echo $message;
    141145    echo '</p>';
     146
    142147    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    143148    wp_nonce_field( 'upgrade-core' );
     149
    144150    echo '<p>';
    145151    echo '<input name="version" value="' . esc_attr( $update->current ) . '" type="hidden"/>';
     
    161167    }
    162168    echo '</p>';
     169
    163170    if ( 'en_US' !== $update->locale && ( ! isset( $wp_local_package ) || $wp_local_package != $update->locale ) ) {
    164171        echo '<p class="hint">' . __( 'This localized version contains both the translation and various other localization fixes.' ) . '</p>';
     
    171178        ) . '</p>';
    172179    }
     180
    173181    echo '</form>';
    174182
Note: See TracChangeset for help on using the changeset viewer.