Changeset 61123
- Timestamp:
- 11/04/2025 08:48:41 AM (3 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-site-health.php
r60938 r61123 729 729 $result = array( 730 730 'label' => sprintf( 731 /* translators: %s: The recommendedPHP version. */732 __( 'Your site is running a recommended version of PHP (%s)' ),731 /* translators: %s: The server PHP version. */ 732 __( 'Your site is running PHP %s' ), 733 733 PHP_VERSION 734 734 ), … … 740 740 'description' => sprintf( 741 741 '<p>%s</p>', 742 sprintf( 743 /* translators: %s: The minimum recommended PHP version. */ 744 __( 'PHP is one of the programming languages used to build WordPress. Newer versions of PHP receive regular security updates and may increase your site’s performance. The minimum recommended version of PHP is %s.' ), 745 $response ? $response['recommended_version'] : '' 746 ) 742 __( 'PHP is one of the programming languages used to build WordPress. Newer versions of PHP receive regular security updates and may increase your site’s performance.' ) 747 743 ), 748 744 'actions' => sprintf( … … 756 752 ); 757 753 754 if ( ! $response ) { 755 $result['label'] = sprintf( 756 /* translators: %s: The server PHP version. */ 757 __( 'Unable to determine the status of the current PHP version (%s)' ), 758 PHP_VERSION 759 ); 760 $result['status'] = 'recommended'; 761 $result['description'] = '<p><em>' . sprintf( 762 /* translators: %s is the URL to the Serve Happy docs page. */ 763 __( 'Unable to access the WordPress.org API for <a href="%s">Serve Happy</a>.' ), 764 'https://codex.wordpress.org/WordPress.org_API#Serve_Happy' 765 ) . '</em></p>' . $result['description']; 766 return $result; 767 } 768 769 $result['description'] .= '<p>' . sprintf( 770 /* translators: %s: The minimum recommended PHP version. */ 771 __( 'The minimum recommended version of PHP is %s.' ), 772 $response['recommended_version'] 773 ) . '</p>'; 774 758 775 // PHP is up to date. 759 if ( ! $response || version_compare( PHP_VERSION, $response['recommended_version'], '>=' ) ) { 776 if ( version_compare( PHP_VERSION, $response['recommended_version'], '>=' ) ) { 777 $result['label'] = sprintf( 778 /* translators: %s: The server PHP version. */ 779 __( 'Your site is running a recommended version of PHP (%s)' ), 780 PHP_VERSION 781 ); 782 $result['status'] = 'good'; 783 760 784 return $result; 761 785 }
Note: See TracChangeset
for help on using the changeset viewer.