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


git-svn-id: http://core.svn.wordpress.org/trunk@49685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-01-19 16:48:07 +00:00
parent dfc20f02ae
commit 777f752c2d
3 changed files with 9 additions and 7 deletions

View File

@ -164,7 +164,7 @@ class WP_Site_Health_Auto_Updates {
if ( ! empty( $failed['critical'] ) ) {
$description = __( 'A previous automatic background update ended with a critical failure, so updates are now disabled.' );
$description .= ' ' . __( 'You would have received an email because of this.' );
$description .= ' ' . __( "When you've been able to update using the \"Update Now\" button on Dashboard > Updates, we'll clear this error for future update attempts." );
$description .= ' ' . __( "When you've been able to update using the \"Update now\" button on Dashboard > Updates, we'll clear this error for future update attempts." );
$description .= ' ' . sprintf(
/* translators: %s: Code of error shown. */
__( 'The error code was %s.' ),

View File

@ -38,7 +38,7 @@ function list_core_update( $update ) {
static $first_pass = true;
$wp_version = get_bloginfo( 'version' );
$version_string = sprintf( '%s&ndash;<strong>%s</strong>', $update->current, $update->locale );
$version_string = sprintf( '%s&ndash;%s', $update->current, get_locale() );
if ( 'en_US' === $update->locale && 'en_US' === get_locale() ) {
$version_string = $update->current;
@ -55,7 +55,10 @@ function list_core_update( $update ) {
$current = true;
}
$submit = __( 'Update Now' );
$is_development_version = preg_match( '/alpha|beta|RC/', $version_string );
$message = '';
$submit = $is_development_version ? __( 'Update to latest nightly' ) : __( 'Update now' );
$form_action = 'update-core.php?action=do-core-upgrade';
$php_version = phpversion();
$mysql_version = $wpdb->db_version();
@ -66,8 +69,7 @@ function list_core_update( $update ) {
} else {
if ( $current ) {
/* translators: %s: WordPress version. */
$message = sprintf( __( 'If you need to re-install version %s, you can do so here:' ), $version_string );
$submit = __( 'Re-install Now' );
$submit = sprintf( __( 'Re-install version %s' ), $version_string );
$form_action = 'update-core.php?action=do-core-reinstall';
} else {
$php_compat = version_compare( $php_version, $update->php_version, '>=' );
@ -932,7 +934,7 @@ get_current_screen()->add_help_tab(
)
);
$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>';
$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>';
$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>';
if ( 'en_US' !== get_locale() ) {

View File

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