From 777f752c2d3d91b5f570fa33df00dcf5d74b7b1a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 19 Jan 2021 16:48:07 +0000 Subject: [PATCH] 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 --- .../includes/class-wp-site-health-auto-updates.php | 2 +- wp-admin/update-core.php | 12 +++++++----- wp-includes/version.php | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/wp-admin/includes/class-wp-site-health-auto-updates.php b/wp-admin/includes/class-wp-site-health-auto-updates.php index de5166f4f3..d9d5b3ea0c 100644 --- a/wp-admin/includes/class-wp-site-health-auto-updates.php +++ b/wp-admin/includes/class-wp-site-health-auto-updates.php @@ -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.' ), diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index d3e7f2cd46..2979d69996 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -38,7 +38,7 @@ function list_core_update( $update ) { static $first_pass = true; $wp_version = get_bloginfo( 'version' ); - $version_string = sprintf( '%s–%s', $update->current, $update->locale ); + $version_string = sprintf( '%s–%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 = '

' . __( 'WordPress — Updating your WordPress installation is a simple one-click procedure: just click on the “Update Now” button 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.' ) . '

'; +$updates_howto = '

' . __( 'WordPress — Updating your WordPress installation is a simple one-click procedure: just click on the “Update now” button 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.' ) . '

'; $updates_howto .= '

' . __( 'Themes and Plugins — To update individual themes or plugins from this screen, use the checkboxes to make your selection, then click on the appropriate “Update” button. 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.' ) . '

'; if ( 'en_US' !== get_locale() ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 7ec9d767d3..79b40aebce 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.