Make WordPress Core


Ignore:
Timestamp:
01/19/2021 04:46:50 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Display version number on the "Re-install now" button on WordPress Updates screen.

This makes the button label more clear and allows for removing unnecessary description.

Props afragen, audrasjb.
Fixes #51774.

File:
1 edited

Legend:

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

    r49709 r49984  
    3939
    4040    $wp_version     = get_bloginfo( 'version' );
    41     $version_string = sprintf( '%s&ndash;<strong>%s</strong>', $update->current, $update->locale );
     41    $version_string = sprintf( '%s&ndash;%s', $update->current, get_locale() );
    4242
    4343    if ( 'en_US' === $update->locale && 'en_US' === get_locale() ) {
     
    5656    }
    5757
    58     $submit        = __( 'Update Now' );
     58    $is_development_version = preg_match( '/alpha|beta|RC/', $version_string );
     59
     60    $message       = '';
     61    $submit        = $is_development_version ? __( 'Update to latest nightly' ) : __( 'Update now' );
    5962    $form_action   = 'update-core.php?action=do-core-upgrade';
    6063    $php_version   = phpversion();
     
    6770        if ( $current ) {
    6871            /* translators: %s: WordPress version. */
    69             $message     = sprintf( __( 'If you need to re-install version %s, you can do so here:' ), $version_string );
    70             $submit      = __( 'Re-install Now' );
     72            $submit      = sprintf( __( 'Re-install version %s' ), $version_string );
    7173            $form_action = 'update-core.php?action=do-core-reinstall';
    7274        } else {
     
    933935);
    934936
    935 $updates_howto  = '<p>' . __( '<strong>WordPress</strong> &mdash; Updating your WordPress installation is a simple one-click procedure: just <strong>click on the &#8220;Update Now&#8221; button</strong> when you are notified that a new version is available.' ) . ' ' . __( 'In most cases, WordPress will automatically apply maintenance and security updates in the background for you.' ) . '</p>';
     937$updates_howto  = '<p>' . __( '<strong>WordPress</strong> &mdash; Updating your WordPress installation is a simple one-click procedure: just <strong>click on the &#8220;Update now&#8221; button</strong> when you are notified that a new version is available.' ) . ' ' . __( 'In most cases, WordPress will automatically apply maintenance and security updates in the background for you.' ) . '</p>';
    936938$updates_howto .= '<p>' . __( '<strong>Themes and Plugins</strong> &mdash; To update individual themes or plugins from this screen, use the checkboxes to make your selection, then <strong>click on the appropriate &#8220;Update&#8221; button</strong>. To update all of your themes or plugins at once, you can check the box at the top of the section to select all before clicking the update button.' ) . '</p>';
    937939
Note: See TracChangeset for help on using the changeset viewer.