Site Health: Update recommendation labels to highlight Performance instead of Security when using a supported and actively maintained version of WordPress, PHP, or MySQL.

Props Clorith, earnjam.
Fixes #46789.

git-svn-id: https://develop.svn.wordpress.org/trunk@45121 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-04-06 15:59:29 +00:00
parent e0041a5794
commit c8a29d2789

View File

@ -182,7 +182,7 @@ class WP_Site_Health {
'label' => '',
'status' => '',
'badge' => array(
'label' => __( 'Security' ),
'label' => __( 'Performance' ),
'color' => 'red',
),
'description' => '',
@ -242,8 +242,9 @@ class WP_Site_Health {
);
} else {
// This is a minor version, sometimes considered more critical.
$result['status'] = 'critical';
$result['description'] = sprintf(
$result['status'] = 'critical';
$result['badge']['label'] = __( 'Security' );
$result['description'] = sprintf(
'<p>%s</p>',
__( 'A new minor update is available for your site. Because minor updates often address security, it&#8217;s important to install them.' )
);
@ -621,7 +622,7 @@ class WP_Site_Health {
),
'status' => 'good',
'badge' => array(
'label' => __( 'Security' ),
'label' => __( 'Performance' ),
'color' => 'red',
),
'description' => sprintf(
@ -651,7 +652,7 @@ class WP_Site_Health {
return $result;
}
// The PHP version is only recieving security fixes.
// The PHP version is only receiving security fixes.
if ( $response['is_secure'] ) {
$result['label'] = __( 'Your PHP version should be updated' );
$result['status'] = 'recommended';
@ -660,8 +661,9 @@ class WP_Site_Health {
}
// Anything no longer secure must be updated.
$result['label'] = __( 'Your PHP version requires an update' );
$result['status'] = 'critical';
$result['label'] = __( 'Your PHP version requires an update' );
$result['status'] = 'critical';
$result['badge']['label'] = __( 'Security' );
return $result;
}
@ -905,7 +907,7 @@ class WP_Site_Health {
'label' => __( 'SQL server is up to date' ),
'status' => 'good',
'badge' => array(
'label' => __( 'Security' ),
'label' => __( 'Performance' ),
'color' => 'red',
),
'description' => sprintf(
@ -937,7 +939,8 @@ class WP_Site_Health {
if ( ! $this->mysql_min_version_check ) {
$result['status'] = 'critical';
$result['label'] = __( 'Severely outdated SQL server' );
$result['label'] = __( 'Severely outdated SQL server' );
$result['badge']['label'] = __( 'Security' );
$result['description'] .= sprintf(
'<p>%s</p>',