Make WordPress Core

Ticket #46734: 46734.5.diff

File 46734.5.diff, 9.6 KB (added by garrett-eclipse, 6 years ago)

Updated patch to restore the 'Manage inactive plugins' string and be less specific with the css, also with the CSS selected went with the generic .dashicons over .dashicons-external to future proof.

  • src/wp-admin/css/site-health.css

     
    381381        display: none;
    382382}
    383383
     384.health-check-accordion-panel a .dashicons {
     385        text-decoration: none;
     386}
     387
    384388/* Better position for the WordPress admin notices and update nag. */
    385389.site-health .notice {
    386390        margin: 5px 20px 15px 22px;
  • src/wp-admin/includes/class-wp-site-health.php

     
    289289                                '<p>%s</p>',
    290290                                __( 'Plugins extend your site&#8217;s functionality with things like contact forms, ecommerce and much more. That means they have deep access to your site, so it&#8217;s vital to keep them up to date.' )
    291291                        ),
    292                         'actions'     => '',
     292                        'actions'     => sprintf(
     293                                '<p><a href="%s">%s</a></p>',
     294                                esc_url( admin_url( 'plugins.php' ) ),
     295                                __( 'Manage your plugins' )
     296                        ),
    293297                        'test'        => 'plugin_version',
    294298                );
    295299
     
    335339                                        $plugins_need_update
    336340                                )
    337341                        );
     342
     343                        $result['actions'] .= sprintf(
     344                                '<p><a href="%s">%s</a></p>',
     345                                esc_url( admin_url( 'plugins.php?plugin_status=upgrade' ) ),
     346                                __( 'Update your plugins' )
     347                        );
    338348                } else {
    339349                        if ( 1 === $plugins_active ) {
    340350                                $result['description'] .= sprintf(
     
    378388                                ),
    379389                                __( 'Inactive plugins are tempting targets for attackers. If you&#8217;re not going to use a plugin, we recommend you remove it.' )
    380390                        );
     391
     392
     393                        $result['actions'] .= sprintf(
     394                                '<p><a href="%s">%s</a></p>',
     395                                esc_url( admin_url( 'plugins.php?plugin_status=inactive' ) ),
     396                                __( 'Manage inactive plugins' )
     397                        );
    381398                }
    382399
    383400                return $result;
     
    405422                                '<p>%s</p>',
    406423                                __( 'Themes add your site&#8217;s look and feel. It&#8217;s important to keep them up to date, to stay consistent with your brand and keep your site secure.' )
    407424                        ),
    408                         'actions'     => '',
     425                        'actions'     => sprintf(
     426                                '<p><a href="%s">%s</a></p>',
     427                                esc_url( admin_url( 'themes.php' ) ),
     428                                __( 'Manage your themes' )
     429                        ),
    409430                        'test'        => 'theme_version',
    410431                );
    411432
     
    630651                                __( '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.' )
    631652                        ),
    632653                        'actions'     => sprintf(
    633                                 '<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>',
     654                                '<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>',
    634655                                esc_url( wp_get_update_php_url() ),
    635656                                __( 'Learn more about updating PHP' ),
    636657                                /* translators: accessibility text */
     
    716737                        ),
    717738                        'description' => sprintf(
    718739                                '<p>%s</p><p>%s</p>',
    719                                 __( 'PHP modules perform most of the tasks on the server that make your site run.' ),
     740                                __( 'PHP modules perform most of the tasks on the server that make your site run, and any changes to these must be done by your server administrator.' ),
    720741                                sprintf(
    721742                                        /* translators: %s: Link to the hosting group page about recommended PHP modules. */
    722                                         __( 'The Hosting team maintains a list of those modules, both recommended and required, in <a href="%s">the team handbook</a>.' ),
    723                                         /* translators: The address to describe PHP modules and their use. */
    724                                         esc_url( __( 'https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions' ) )
     743                                        __( 'The WordPress Hosting Team maintains a list of those modules, both recommended and required, in %s.' ),
     744                                        sprintf(
     745                                                '<a 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>',
     746                                                /* translators: Localized team handbook, if one exists. */
     747                                                esc_url( __( 'https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions' ) ),
     748                                                __( 'the team handbook' ),
     749                                                /* translators: accessibility text */
     750                                                __( '(opens in a new tab)' )
     751                                        )
    725752                                )
    726753                        ),
    727754                        'actions'     => '',
     
    912939                        ),
    913940                        'description' => sprintf(
    914941                                '<p>%s</p>',
    915                                 __( 'The SQL server is the database where WordPress stores all your site’s content and settings' )
     942                                __( 'The SQL server is a required piece of software for the database WordPress uses to stores all your site’s content and settings.' )
    916943                        ),
    917                         'actions'     => '',
     944                        'actions'     => sprintf(
     945                                '<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>',
     946                                /* translators: Localized version of WordPress requirements if one exists. */
     947                                esc_url( __( 'https://wordpress.org/about/requirements/' ) ),
     948                                __( 'Read more about what WordPress requires to run.' ),
     949                                /* translators: accessibility text */
     950                                __( '(opens in a new tab)' )
     951                        ),
    918952                        'test'        => 'sql_server',
    919953                );
    920954
     
    10081042                                        '<p>%s</p>',
    10091043                                        sprintf(
    10101044                                                /* translators: %s: Version number. */
    1011                                                 __( 'WordPress&#8217; utf8mb4 support requires MySQL version %s or greater.' ),
     1045                                                __( 'WordPress&#8217; utf8mb4 support requires MySQL version %s or greater. Please contact your server administrator.' ),
    10121046                                                '5.5.3'
    10131047                                        )
    10141048                                );
     
    10281062                                        '<p>%s</p>',
    10291063                                        sprintf(
    10301064                                                /* translators: %s: Version number. */
    1031                                                 __( 'WordPress&#8217; utf8mb4 support requires MariaDB version %s or greater.' ),
     1065                                                __( 'WordPress&#8217; utf8mb4 support requires MariaDB version %s or greater. Please contact your server administrator.' ),
    10321066                                                '5.5.0'
    10331067                                        )
    10341068                                );
     
    10631097                                        '<p>%s</p>',
    10641098                                        sprintf(
    10651099                                                /* translators: 1: Name of the library, 2: Number of version. */
    1066                                                 __( 'WordPress&#8217; utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer.' ),
     1100                                                __( 'WordPress&#8217; utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer. Please contact your server administrator.' ),
    10671101                                                'mysqlnd',
    10681102                                                '5.0.9'
    10691103                                        )
     
    10791113                                        '<p>%s</p>',
    10801114                                        sprintf(
    10811115                                                /* translators: 1: Name of the library, 2: Number of version. */
    1082                                                 __( 'WordPress&#8217; utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer.' ),
     1116                                                __( 'WordPress&#8217; utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer. Please contact your server administrator.' ),
    10831117                                                'libmysql',
    10841118                                                '5.5.3'
    10851119                                        )
     
    11341168                                        sprintf(
    11351169                                                /* translators: 1: The IP address WordPress.org resolves to. 2: The error returned by the lookup. */
    11361170                                                __( 'Your site is unable to reach WordPress.org at %1$s, and returned the error: %2$s' ),
    1137                                                 gethostbyname( 'wordpress.org' ),
     1171                                                gethostbyname( 'api.wordpress.org' ),
    11381172                                                $wp_dotorg->get_error_message()
    11391173                                        )
    11401174                                )
    11411175                        );
     1176
     1177                        $result['actions'] = sprintf(
     1178                                '<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>',
     1179                                /* translators: Localized Support reference. */
     1180                                esc_url( __( 'https://wordpress.org/support' ) ),
     1181                                __( 'Get help resolving this issue.' ),
     1182                                /* translators: accessibility text */
     1183                                __( '(opens in a new tab)' )
     1184                        );
    11421185                }
    11431186
    11441187                return $result;
     
    11691212                                '<p>%s</p>',
    11701213                                __( 'Debug mode is often enabled to gather more details about an error or site failure, but may contain sensitive information which should not be available on a publicly available website.' )
    11711214                        ),
    1172                         'actions'     => '',
     1215                        'actions'     => sprintf(
     1216                                '<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>',
     1217                                /* translators: Documentation explaining debugging in WordPress. */
     1218                                esc_url( __( 'https://wordpress.org/support/article/debugging-in-wordpress/' ) ),
     1219                                __( 'Read about debugging in WordPress.' ),
     1220                                /* translators: accessibility text */
     1221                                __( '(opens in a new tab)' )
     1222                        ),
    11731223                        'test'        => 'is_in_debug_mode',
    11741224                );
    11751225
     
    12311281                                __( 'An HTTPS connection is needed for many features on the web today, it also gains the trust of your visitors by helping to protecting their online privacy.' )
    12321282                        ),
    12331283                        'actions'     => sprintf(
    1234                                 '<p><a href="%s">%s</a></p>',
    1235                                 esc_url(
    1236                                         /* translators: Documentation explaining HTTPS and why it should be used. */
    1237                                         __( 'https://wordpress.org/support/article/why-should-i-use-https/' )
    1238                                 ),
    1239                                 __( 'Read more about why you should use HTTPS' )
     1284                                '<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>',
     1285                                /* translators: Documentation explaining HTTPS and why it should be used. */
     1286                                esc_url( __( 'https://wordpress.org/support/article/why-should-i-use-https/' ) ),
     1287                                __( 'Read more about why you should use HTTPS' ),
     1288                                /* translators: accessibility text */
     1289                                __( '(opens in a new tab)' )
    12401290                        ),
    12411291                        'test'        => 'https_status',
    12421292                );