From a02494a80f558a05bc9c7e9bd12689157bf10534 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 28 Mar 2019 16:15:51 +0000 Subject: [PATCH] Site Health: Add description for a successful HTTPS check. Props Clorith, xkon. Fixes #46617. Built from https://develop.svn.wordpress.org/trunk@45052 git-svn-id: http://core.svn.wordpress.org/trunk@44861 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-site-health.php | 40 +++++++++------------- wp-includes/version.php | 2 +- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index d5cd8a980c..d7e9f82f08 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -1202,14 +1202,24 @@ class WP_Site_Health { */ public function get_test_https_status() { $result = array( - 'label' => '', - 'status' => '', + 'label' => __( 'Your website is using an active HTTPS connection.' ), + 'status' => 'good', 'badge' => array( 'label' => 'Security', 'color' => 'red', ), - 'description' => '', - 'actions' => '', + 'description' => sprintf( + '

%s

', + __( '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.' ) + ), + 'actions' => sprintf( + '

%s

', + esc_url( + /* translators: Website for explaining HTTPS and why it should be used. */ + __( 'https://wordpress.org/support/article/why-should-i-use-https/' ) + ), + __( 'Read more about why you should use HTTPS' ) + ), 'test' => 'https_status', ); @@ -1231,34 +1241,16 @@ class WP_Site_Health { ) ); - $result['actions'] = sprintf( - '%s', + $result['actions'] .= sprintf( + '

%s

', esc_url( admin_url( 'options-general.php' ) ), __( 'Update your site addresses' ) ); - } else { - $result['status'] = 'good'; - - $result['label'] = __( 'Your website is using an active HTTPS connection.' ); } } else { $result['status'] = 'recommended'; $result['label'] = __( 'Your site does not use HTTPS' ); - - $result['description'] = sprintf( - '

%s

', - __( '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.' ) - ); - - $result['actions'] = sprintf( - '%s', - esc_url( - /* translators: Website for explaining HTTPS and why it should be used. */ - __( 'https://wordpress.org/support/article/why-should-i-use-https/' ) - ), - __( 'Read more about why you should use HTTPS.' ) - ); } return $result; diff --git a/wp-includes/version.php b/wp-includes/version.php index 2db2268c2a..24e24d2563 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-beta1-45051'; +$wp_version = '5.2-beta1-45052'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.