WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/12/2019 05:39:37 PM (19 months ago)
Author:
desrosj
Message:

Site Health: Add missing actions to tests.

This change adds missing actions for several tests. This ensures that the user is provided with a next step, whenever possible.

Also, change the URL displayed in the WordPress.org communication test description to api.wordpress.org for accuracy.

Props: garrett-eclipse, Clorith, vaishalipanchal.
Fixes #46734.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r45169 r45170  
    290290                __( 'Plugins extend your site’s functionality with things like contact forms, ecommerce and much more. That means they have deep access to your site, so it’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        );
     
    335339                    $plugins_need_update
    336340                )
     341            );
     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' )
    337347            );
    338348        } else {
     
    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            $result['actions'] .= sprintf(
     393                '<p><a href="%s">%s</a></p>',
     394                esc_url( admin_url( 'plugins.php?plugin_status=inactive' ) ),
     395                __( 'Manage inactive plugins' )
     396            );
    381397        }
    382398
     
    406422                __( '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.' )
    407423            ),
    408             'actions'     => '',
     424            'actions'     => sprintf(
     425                '<p><a href="%s">%s</a></p>',
     426                esc_url( admin_url( 'themes.php' ) ),
     427                __( 'Manage your themes' )
     428            ),
    409429            'test'        => 'theme_version',
    410430        );
     
    628648            'description' => sprintf(
    629649                '<p>%s</p>',
    630                 __( '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 sites performance.' )
     650                __( '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&#8217;s performance.' )
    631651            ),
    632652            '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>',
     653                '<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>',
    634654                esc_url( wp_get_update_php_url() ),
    635655                __( 'Learn more about updating PHP' ),
     
    717737            'description' => sprintf(
    718738                '<p>%s</p><p>%s</p>',
    719                 __( 'PHP modules perform most of the tasks on the server that make your site run.' ),
     739                __( 'PHP modules perform most of the tasks on the server that make your site run. Any changes to these must be made by your server administrator.' ),
    720740                sprintf(
    721741                    /* 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' ) )
     742                    __( 'The WordPress Hosting Team maintains a list of those modules, both recommended and required, in %s.' ),
     743                    sprintf(
     744                        '<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>',
     745                        /* translators: Localized team handbook, if one exists. */
     746                        esc_url( __( 'https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions' ) ),
     747                        __( 'the team handbook' ),
     748                        /* translators: accessibility text */
     749                        __( '(opens in a new tab)' )
     750                    )
    725751                )
    726752            ),
     
    913939            'description' => sprintf(
    914940                '<p>%s</p>',
    915                 __( 'The SQL server is the database where WordPress stores all your site’s content and settings' )
    916             ),
    917             'actions'     => '',
     941                __( 'The SQL server is a required piece of software for the database WordPress uses to store all your site&#8217;s content and settings.' )
     942            ),
     943            'actions'     => sprintf(
     944                '<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>',
     945                /* translators: Localized version of WordPress requirements if one exists. */
     946                esc_url( __( 'https://wordpress.org/about/requirements/' ) ),
     947                __( 'Read more about what WordPress requires to run.' ),
     948                /* translators: accessibility text */
     949                __( '(opens in a new tab)' )
     950            ),
    918951            'test'        => 'sql_server',
    919952        );
     
    10091042                    sprintf(
    10101043                        /* translators: %s: Version number. */
    1011                         __( 'WordPress&#8217; utf8mb4 support requires MySQL version %s or greater.' ),
     1044                        __( 'WordPress&#8217; utf8mb4 support requires MySQL version %s or greater. Please contact your server administrator.' ),
    10121045                        '5.5.3'
    10131046                    )
     
    10291062                    sprintf(
    10301063                        /* translators: %s: Version number. */
    1031                         __( 'WordPress&#8217; utf8mb4 support requires MariaDB version %s or greater.' ),
     1064                        __( 'WordPress&#8217; utf8mb4 support requires MariaDB version %s or greater. Please contact your server administrator.' ),
    10321065                        '5.5.0'
    10331066                    )
     
    10641097                    sprintf(
    10651098                        /* 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.' ),
     1099                        __( 'WordPress&#8217; utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer. Please contact your server administrator.' ),
    10671100                        'mysqlnd',
    10681101                        '5.0.9'
     
    10801113                    sprintf(
    10811114                        /* 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.' ),
     1115                        __( 'WordPress&#8217; utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer. Please contact your server administrator.' ),
    10831116                        'libmysql',
    10841117                        '5.5.3'
     
    11351168                        /* translators: 1: The IP address WordPress.org resolves to. 2: The error returned by the lookup. */
    11361169                        __( 'Your site is unable to reach WordPress.org at %1$s, and returned the error: %2$s' ),
    1137                         gethostbyname( 'wordpress.org' ),
     1170                        gethostbyname( 'api.wordpress.org' ),
    11381171                        $wp_dotorg->get_error_message()
    11391172                    )
    11401173                )
     1174            );
     1175
     1176            $result['actions'] = sprintf(
     1177                '<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>',
     1178                /* translators: Localized Support reference. */
     1179                esc_url( __( 'https://wordpress.org/support' ) ),
     1180                __( 'Get help resolving this issue.' ),
     1181                /* translators: accessibility text */
     1182                __( '(opens in a new tab)' )
    11411183            );
    11421184        }
     
    11701212                __( '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.' )
    11711213            ),
    1172             'actions'     => '',
     1214            'actions'     => sprintf(
     1215                '<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>',
     1216                /* translators: Documentation explaining debugging in WordPress. */
     1217                esc_url( __( 'https://wordpress.org/support/article/debugging-in-wordpress/' ) ),
     1218                __( 'Read about debugging in WordPress.' ),
     1219                /* translators: accessibility text */
     1220                __( '(opens in a new tab)' )
     1221            ),
    11731222            'test'        => 'is_in_debug_mode',
    11741223        );
     
    12331282            ),
    12341283            'actions'     => sprintf(
    1235                 '<p><a href="%s">%s</a></p>',
    1236                 esc_url(
    1237                     /* translators: Documentation explaining HTTPS and why it should be used. */
    1238                     __( 'https://wordpress.org/support/article/why-should-i-use-https/' )
    1239                 ),
    1240                 __( '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)' )
    12411290            ),
    12421291            'test'        => 'https_status',
Note: See TracChangeset for help on using the changeset viewer.