Make WordPress Core

Ticket #41191: 41191.9.diff

File 41191.9.diff, 5.3 KB (added by schlessera, 6 years ago)

Text reviewed by Automattic editorial team, removed word "guaranteed", replaced red bar with symbol

  • src/wp-admin/css/dashboard.css

    diff --git src/wp-admin/css/dashboard.css src/wp-admin/css/dashboard.css
    index 0353da78c1..43d1ccb838 100644
    a.rsswidget { 
    11171117}
    11181118
    11191119/* PHP Nag */
    1120 #dashboard_php_nag h2.hndle {
    1121         border-left: 4px solid #dc3232;
     1120#dashboard_php_nag .dashicons-warning {
     1121        color: #df3232;
     1122        padding-right: 6px;
    11221123}
    11231124
    11241125#dashboard_php_nag h3 {
    11251126        font-weight: 600;
    11261127}
    11271128
    1128 #dashboard_php_nag .button.button-hero {
    1129         display: block;
     1129#dashboard_php_nag .button-container {
    11301130        text-align: center;
    11311131}
    11321132
     1133#dashboard_php_nag .button.button-hero .dashicons-external {
     1134        line-height: 42px;
     1135}
     1136
    11331137/* =Media Queries
    11341138-------------------------------------------------------------- */
    11351139
  • src/wp-admin/includes/dashboard.php

    diff --git src/wp-admin/includes/dashboard.php src/wp-admin/includes/dashboard.php
    index 7a268aba83..b0540557a6 100644
    function wp_dashboard_setup() { 
    3838        // PHP Version
    3939        $response = wp_check_php_version();
    4040        if ( $response && ! $response['is_acceptable'] && current_user_can( 'upgrade_php' ) ) {
    41                 $title = $response['is_secure'] ? __( 'Your site could be much faster!' ) : __( 'Your site could be much faster and more secure!' );
    42                 wp_add_dashboard_widget( 'dashboard_php_nag', $title, 'wp_dashboard_php_nag' );
     41                wp_add_dashboard_widget( 'dashboard_php_nag', __( 'PHP Update Required' ), 'wp_dashboard_php_nag' );
    4342        }
    4443
    4544        // Right Now
    function wp_dashboard_php_nag() { 
    16181617                return;
    16191618        }
    16201619
    1621         $information_url = _x( 'https://wordpress.org/support/upgrade-php/', 'localized PHP upgrade information page' );
    1622 
    16231620        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.' );
     1621                $msg = __( 'WordPress has detected that your site is running on an insecure version of PHP, which means that a faster website is just a quick update away.' );
    16251622        } 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 = __( 'WordPress has detected that your site is running on an outdated version of PHP, which means that a faster website is just a quick update away.' );
    16271624        }
    16281625
    16291626        ?>
    16301627        <p><?php echo $msg; ?></p>
    16311628
    1632         <h3><?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>
     1629        <h3><?php _e( 'What is PHP and how does it affect my site?' ); ?></h3>
     1630        <p><?php _e( '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.' ); ?></p>
    16351631
    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&#8217;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>
     1632        <h3><?php _e( 'How can I update my PHP version?' ); ?></h3>
     1633        <p><?php _e( 'Click the button below to head to an update page with additional details on PHP, how to update your version, and what to do in case you can&#8217;t update your site.' ); ?></p>
     1634        <p class="button-container">
     1635                <?php
     1636                        printf(
     1637                                '<a class="button button-primary button-hero" href="%1$s" target="_blank">%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 about updating PHP' ),
     1640                                /* translators: accessibility text */
     1641                                __( '(opens in a new window)' )
     1642                        );
     1643                ?>
    16401644        </p>
    1641 
    1642         <p><?php _e( 'Upgrading usually takes only a few minutes and should be safe if you follow the provided instructions.' ); ?></p>
     1645        <p><?php _e( 'Updating your PHP version normally takes just a few minutes. The instructions we provide will help you with a secure, painless update.' ); ?></p>
    16431646        <?php
    16441647}
    16451648
  • src/wp-admin/includes/template.php

    diff --git src/wp-admin/includes/template.php src/wp-admin/includes/template.php
    index 16cf63d5d3..016d6abfa3 100644
    function do_meta_boxes( $screen, $context, $object ) { 
    11401140                                                echo '<span class="toggle-indicator" aria-hidden="true"></span>';
    11411141                                                echo '</button>';
    11421142                                        }
    1143                                         echo "<h2 class='hndle'><span>{$box['title']}</span></h2>\n";
     1143                                        echo '<h2 class="hndle">';
     1144                                        if ( 'dashboard_php_nag' === $box['id'] ) {
     1145                                                echo '<span class="screen-reader-text">' . __( 'Warning:' ) . '</span>';
     1146                                                echo '<span aria-hidden="true" class="dashicons dashicons-warning"></span>';
     1147                                        }
     1148                                        echo "<span>{$box['title']}</span>";
     1149                                        echo "</h2>\n";
    11441150                                        echo '<div class="inside">' . "\n";
    11451151                                        call_user_func( $box['callback'], $object, $box );
    11461152                                        echo "</div>\n";