From 955c7aaf249a7b87f8baab7f4ff7186d2ba87bef Mon Sep 17 00:00:00 2001 From: whyisjake Date: Thu, 28 Jan 2021 00:18:56 +0000 Subject: [PATCH] Site Health: Update php update strings to not overpromise performance. This commit brings the changes from [40041] to the 5.6 branch. Fixes #52327. Props chanthaboune, SergeyBiryukov, audrasjb, Clorith, whyisjake. Built from https://develop.svn.wordpress.org/branches/5.6@50042 git-svn-id: http://core.svn.wordpress.org/branches/5.6@49743 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-site-health.php | 2 +- wp-admin/includes/dashboard.php | 25 +++++++++++++++++----- wp-includes/version.php | 2 +- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index fe38c4ef6c..5eb57bd10b 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -726,7 +726,7 @@ class WP_Site_Health { '

%s

', sprintf( /* translators: %s: The minimum recommended PHP version. */ - __( 'PHP is the programming language used to build and maintain WordPress. Newer versions of PHP are faster and more secure, so staying up to date will help your site’s overall performance and security. The minimum recommended version of PHP is %s.' ), + __( 'PHP is the programming language used to build and maintain WordPress. Newer versions of PHP are created with increased performance in mind, so you may see a positive effect on your site’s performance. The minimum recommended version of PHP is %s.' ), $response ? $response['recommended_version'] : '' ) ), diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 6855aa6c96..d61da84713 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -39,7 +39,7 @@ function wp_dashboard_setup() { $response = wp_check_php_version(); if ( $response && isset( $response['is_acceptable'] ) && ! $response['is_acceptable'] && current_user_can( 'update_php' ) ) { add_filter( 'postbox_classes_dashboard_dashboard_php_nag', 'dashboard_php_nag_class' ); - wp_add_dashboard_widget( 'dashboard_php_nag', __( 'PHP Update Required' ), 'wp_dashboard_php_nag' ); + wp_add_dashboard_widget( 'dashboard_php_nag', __( 'PHP Update Recommended' ), 'wp_dashboard_php_nag' ); } // Site Health. @@ -1747,16 +1747,31 @@ function wp_dashboard_php_nag() { } if ( isset( $response['is_secure'] ) && ! $response['is_secure'] ) { - $msg = __( 'WordPress has detected that your site is running on an insecure version of PHP.' ); + $msg = sprintf( + /* translators: %s: The server PHP version. */ + __( 'Your site is running an insecure version of PHP (%s), and should be updated.' ), + PHP_VERSION + ); } else { - $msg = __( 'WordPress has detected that your site is running on an outdated version of PHP.' ); + $msg = sprintf( + /* translators: %s: The server PHP version. */ + __( 'Your site is running an outdated version of PHP (%s), and should be updated.' ), + PHP_VERSION + ); } - ?>

-

+

+ +