Ticket #47644: 47644.3.diff
File 47644.3.diff, 2.6 KB (added by , 5 years ago) |
---|
-
src/wp-admin/includes/class-wp-site-health.php
639 639 $result = array( 640 640 'label' => sprintf( 641 641 // translators: %s: The current PHP version. 642 __( ' PHP is up to date (%s)' ),642 __( 'Your version of PHP is up to date (%s)' ), 643 643 PHP_VERSION 644 644 ), 645 645 'status' => 'good', … … 649 649 ), 650 650 'description' => sprintf( 651 651 '<p>%s</p>', 652 __( 'PHP is the programming language we use to build and maintain WordPress. Newer versions of PHP are both faster and more secure, so updating will have a positive effect on your site’s performance.' ) 652 sprintf( 653 // translators: %s: The minimum recommended PHP version 654 __( 'PHP is the programming language used to power WordPress. Newer versions of PHP are both faster and more secure, so staying up to date will have a positive effect on your site’s overall performance. The minimum recommended version of PHP is %s.' ), 655 $response['recommended_version'] 656 ) 653 657 ), 654 658 'actions' => sprintf( 655 659 '<p><a href="%s" target="_blank" rel="noopener noreferrer">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>', … … 666 670 return $result; 667 671 } 668 672 669 // The PHP version is older than the recommended version, but still acceptable. 670 if ( $response['is_supported'] ) { 671 $result['label'] = __( 'We recommend that you update PHP' ); 673 // The PHP version is older than the recommended version but still recieving fixes. 674 if ( $response['is_supported'] || $response['is_secure'] ) { 675 $result['label'] = sprintf( 676 // translators: %s: The server PHP version. 677 __( 'Your version of PHP should be updated (%s)' ), 678 PHP_VERSION 679 ); 672 680 $result['status'] = 'recommended'; 673 681 674 682 return $result; 675 683 } 676 684 677 // The PHP version is only receiving security fixes.678 if ( $response['is_secure'] ) {679 $result['label'] = __( 'Your PHP version should be updated' );680 $result['status'] = 'recommended';681 682 return $result;683 }684 685 685 // Anything no longer secure must be updated. 686 $result['label'] = __( 'Your PHP version requires an update' ); 686 $result['label'] = sprintf( 687 // translators: %s: The server PHP version. 688 __( 'Your version of PHP requires an update (%s)' ), 689 PHP_VERSION 690 ); 687 691 $result['status'] = 'critical'; 688 692 $result['badge']['label'] = __( 'Security' ); 689 693