Make WordPress Core

Changeset 45052


Ignore:
Timestamp:
03/28/2019 04:14:03 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Site Health: Add description for a successful HTTPS check.

Props Clorith, xkon.
Fixes #46617.

File:
1 edited

Legend:

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

    r45049 r45052  
    12031203        public function get_test_https_status() {
    12041204                $result = array(
    1205                         'label'       => '',
    1206                         'status'      => '',
     1205                        'label'       => __( 'Your website is using an active HTTPS connection.' ),
     1206                        'status'      => 'good',
    12071207                        'badge'       => array(
    12081208                                'label' => 'Security',
    12091209                                'color' => 'red',
    12101210                        ),
    1211                         'description' => '',
    1212                         'actions'     => '',
     1211                        'description' => sprintf(
     1212                                '<p>%s</p>',
     1213                                __( '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.' )
     1214                        ),
     1215                        'actions'     => sprintf(
     1216                                '<p><a href="%s">%s</a></p>',
     1217                                esc_url(
     1218                                        /* translators: Website for explaining HTTPS and why it should be used. */
     1219                                        __( 'https://wordpress.org/support/article/why-should-i-use-https/' )
     1220                                ),
     1221                                __( 'Read more about why you should use HTTPS' )
     1222                        ),
    12131223                        'test'        => 'https_status',
    12141224                );
    … …  
    12321242                                );
    12331243
    1234                                 $result['actions'] = sprintf(
    1235                                         '<a href="%s">%s</a>',
     1244                                $result['actions'] .= sprintf(
     1245                                        '<p><a href="%s">%s</a></p>',
    12361246                                        esc_url( admin_url( 'options-general.php' ) ),
    12371247                                        __( 'Update your site addresses' )
    12381248                                );
    1239                         } else {
    1240                                 $result['status'] = 'good';
    1241 
    1242                                 $result['label'] = __( 'Your website is using an active HTTPS connection.' );
    12431249                        }
    12441250                } else {
    … …  
    12461252
    12471253                        $result['label'] = __( 'Your site does not use HTTPS' );
    1248 
    1249                         $result['description'] = sprintf(
    1250                                 '<p>%s</p>',
    1251                                 __( '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.' )
    1252                         );
    1253 
    1254                         $result['actions'] = sprintf(
    1255                                 '<a href="%s">%s</a>',
    1256                                 esc_url(
    1257                                         /* translators: Website for explaining HTTPS and why it should be used. */
    1258                                         __( 'https://wordpress.org/support/article/why-should-i-use-https/' )
    1259                                 ),
    1260                                 __( 'Read more about why you should use HTTPS.' )
    1261                         );
    12621254                }
    12631255
Note: See TracChangeset for help on using the changeset viewer.