Make WordPress Core

Changeset 45121


Ignore:
Timestamp:
04/06/2019 03:59:29 PM (7 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r45107 r45121  
    183183                        'status'      => '',
    184184                        'badge'       => array(
    185                                 'label' => __( 'Security' ),
     185                                'label' => __( 'Performance' ),
    186186                                'color' => 'red',
    187187                        ),
     
    243243                                        } else {
    244244                                                // This is a minor version, sometimes considered more critical.
    245                                                 $result['status']      = 'critical';
    246                                                 $result['description'] = sprintf(
     245                                                $result['status']         = 'critical';
     246                                                $result['badge']['label'] = __( 'Security' );
     247                                                $result['description']    = sprintf(
    247248                                                        '<p>%s</p>',
    248249                                                        __( 'A new minor update is available for your site. Because minor updates often address security, it&#8217;s important to install them.' )
     
    622623                        'status'      => 'good',
    623624                        'badge'       => array(
    624                                 'label' => __( 'Security' ),
     625                                'label' => __( 'Performance' ),
    625626                                'color' => 'red',
    626627                        ),
     
    652653                }
    653654
    654                 // The PHP version is only recieving security fixes.
     655                // The PHP version is only receiving security fixes.
    655656                if ( $response['is_secure'] ) {
    656657                        $result['label']  = __( 'Your PHP version should be updated' );
     
    661662
    662663                // Anything no longer secure must be updated.
    663                 $result['label']  = __( 'Your PHP version requires an update' );
    664                 $result['status'] = 'critical';
     664                $result['label']          = __( 'Your PHP version requires an update' );
     665                $result['status']         = 'critical';
     666                $result['badge']['label'] = __( 'Security' );
    665667
    666668                return $result;
     
    906908                        'status'      => 'good',
    907909                        'badge'       => array(
    908                                 'label' => __( 'Security' ),
     910                                'label' => __( 'Performance' ),
    909911                                'color' => 'red',
    910912                        ),
     
    938940                        $result['status'] = 'critical';
    939941
    940                         $result['label'] = __( 'Severely outdated SQL server' );
     942                        $result['label']          = __( 'Severely outdated SQL server' );
     943                        $result['badge']['label'] = __( 'Security' );
    941944
    942945                        $result['description'] .= sprintf(
Note: See TracChangeset for help on using the changeset viewer.