Ticket #41191: 41191.11.2.diff
File 41191.11.2.diff, 4.8 KB (added by , 6 years ago) |
---|
-
src/wp-admin/css/dashboard.css
1117 1117 } 1118 1118 1119 1119 /* PHP Nag */ 1120 #dashboard_php_nag h2.hndle {1121 border-left: 4px solid #dc3232;1122 }1123 1120 1124 #dashboard_php_nag h3{1125 font-weight: 600;1121 #dashboard_php_nag .dashicons-external { 1122 margin: -2px -3px 0 0; 1126 1123 } 1127 1124 1128 #dashboard_php_nag .button.button-hero {1129 display: block;1130 text-align: center;1131 }1132 1133 1125 /* =Media Queries 1134 1126 -------------------------------------------------------------- */ 1135 1127 -
src/wp-admin/includes/dashboard.php
1618 1617 return; 1619 1618 } 1620 1619 1621 $information_url = _x( 'https://wordpress.org/support/upgrade-php/', 'localized PHP upgrade information page' ); 1622 1623 if ( ! $response['is_secure'] ) { 1624 $msg = __( 'WordPress has detected that your site is running on an insecure version of PHP, which is why we’re showing you this notice.' ); 1620 if ( isset( $response['is_secure'] ) && ! $response['is_secure'] ) { 1621 $msg = __( 'Your site is running an insecure version of PHP. Please update immediately.' ); 1625 1622 } else { 1626 $msg = __( ' WordPress has detected that your site is running on an outdated version of PHP, which is why we’re showing you this notice.' );1623 $msg = __( 'Your site is running a version of PHP that is no longer supported.' ); 1627 1624 } 1628 1625 1629 1626 ?> 1630 1627 <p><?php echo $msg; ?></p> 1628 <p><?php printf( __( 'You are running %s, but %s is recommended.' ), '<strong>' . phpversion() . '</strong>', '<strong>' . $response['recommended_version'] . '</strong>' ); ?></p> 1631 1629 1632 <h 3><?php _e( 'What is PHP and why should I care?' ); ?></h3>1633 <p><?php _e( ' PHP is the programming language that WordPress is built on. Newer versions of PHP are both faster and more secure, so upgrading is better for your site, and better for the people who are building WordPress.' ); ?></p>1634 <p><?php _e( ' If you want to know exactly how PHP works and why it is important, continue reading.' ); ?></p>1630 <hr /> 1631 <p><?php _e( 'Current versions of PHP are faster and more secure.' ); ?></p> 1632 <p><?php _e( 'Updating will make your WordPress experience safer and more enjoyable, and it can usually be done in just a few minutes.' ); ?></p> 1635 1633 1636 <h3><?php _e( 'How can I upgrade my PHP version?' ); ?></h3> 1637 <p><?php _e( 'The button below will take you to a page with more details on what PHP is, how to upgrade your PHP version, and what to do if it turns out you can’t.' ); ?></p> 1638 <p> 1639 <a class="button button-primary button-hero" href="<?php echo esc_url( $information_url ); ?>"><?php _e( 'Show me how to upgrade my PHP' ); ?></a> 1634 <p class="button-container"> 1635 <?php 1636 printf( 1637 '<a class="button button-primary" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>', 1638 esc_url( _x( 'https://wordpress.org/support/upgrade-php/', 'localized PHP upgrade information page' ) ), 1639 __( 'Learn more' ), 1640 /* translators: accessibility text */ 1641 __( '(opens in a new tab)' ) 1642 ); 1643 ?> 1640 1644 </p> 1641 1642 <p><?php _e( 'Upgrading usually takes only a few minutes and should be safe if you follow the provided instructions.' ); ?></p>1643 1645 <?php 1644 1646 } 1645 1647 … … 1648 1650 * 1649 1651 * @since 5.0.0 1650 1652 * 1651 * @return array Array of PHP version data.1653 * @return array|false $response Array of PHP version data. False on failure. 1652 1654 */ 1653 1655 function wp_check_php_version() { 1654 1656 $version = phpversion(); 1655 $key = md5( $version );1656 1657 1658 if ( false === $version ) { 1659 return false; 1660 } 1661 1662 $key = md5( $version ); 1663 1657 1664 $response = get_site_transient( 'php_check_' . $key ); 1658 1665 if ( false === $response ) { 1659 1666 $url = 'http://api.wordpress.org/core/serve-happy/1.0/'; … … 1665 1672 1666 1673 $response = wp_remote_get( $url ); 1667 1674 1668 if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {1675 if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) { 1669 1676 return false; 1670 1677 } 1671 1678 1672 1679 /** 1673 1680 * Response should be an array with: 1674 * 'recommended_version' - string - The PHP version recommended by WordPress 1675 * 'is_supported' - boolean - Whether the PHP version is actively supported 1676 * 'is_secure' - boolean - Whether the PHP version receives security updates 1677 * 'is_acceptable' - boolean - Whether the PHP version is still acceptable for WordPress 1681 * 'recommended_version' - string - The PHP version recommended by WordPress. 1682 * 'is_supported' - boolean - Whether the PHP version is actively supported. 1683 * 'is_secure' - boolean - Whether the PHP version receives security updates. 1684 * 'is_acceptable' - boolean - Whether the PHP version is still acceptable for WordPress. 1678 1685 */ 1679 1686 $response = json_decode( wp_remote_retrieve_body( $response ), true ); 1680 1687