From 184118c3c93995214b39833fef5079a482d0ce19 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Wed, 27 May 2020 14:32:00 +0000 Subject: [PATCH] Administration and Site Health: Make information on Search engine visibility more prominent. - makes the "Search engines discouraged" message on the Dashboard more prominent - adds "Search engine visibility" information under Site Health > Info > WordPress - removes title case in favor of sentence case in all the related strings Props audrasjb, swissspidy, emanuel_blagonic, Presskopp, karmatosed, valentinbora, melchoyce. Fixes #35288. git-svn-id: https://develop.svn.wordpress.org/trunk@47859 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/dashboard.css | 12 +++++++++++- src/wp-admin/includes/class-wp-debug-data.php | 6 ++++++ src/wp-admin/includes/dashboard.php | 8 ++++---- src/wp-admin/install.php | 4 ++-- src/wp-admin/options-reading.php | 14 +++++++------- 5 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css index 457aa9fc19..e341c61bbc 100644 --- a/src/wp-admin/css/dashboard.css +++ b/src/wp-admin/css/dashboard.css @@ -197,7 +197,8 @@ .welcome-panel .welcome-icon:before, #dashboard_right_now li a:before, -#dashboard_right_now li span:before { +#dashboard_right_now li span:before, +#dashboard_right_now .search-engines-info:before { color: #606a73; font: normal 20px/1 dashicons; speak: none; @@ -260,6 +261,7 @@ /* Right Now specific Icons styles */ +#dashboard_right_now .search-engines-info:before, #dashboard_right_now li a:before, #dashboard_right_now li > span:before { /* get only the first level span to exclude screen-reader-text in mu-storage */ content: "\f159"; /* generic icon for items added by CPTs ? */ @@ -292,6 +294,10 @@ content: "\f153"; } +#dashboard_right_now .search-engines-info:before { + content: "\f348"; +} + /* Dashboard WordPress events */ .community-events-errors { @@ -537,6 +543,10 @@ body #dashboard-widgets .postbox form .submit { margin-left: 5px; } +#dashboard_right_now p.search-engines-info { + margin: 1em 0; +} + .mu-storage { overflow: hidden; } diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php index e15deb99d2..248ebab8fe 100644 --- a/src/wp-admin/includes/class-wp-debug-data.php +++ b/src/wp-admin/includes/class-wp-debug-data.php @@ -40,6 +40,7 @@ class WP_Debug_Data { $permalink_structure = get_option( 'permalink_structure' ); $is_ssl = is_ssl(); $users_can_register = get_option( 'users_can_register' ); + $blog_public = get_option( 'blog_public' ); $default_comment_status = get_option( 'default_comment_status' ); $is_multisite = is_multisite(); $core_version = get_bloginfo( 'version' ); @@ -103,6 +104,11 @@ class WP_Debug_Data { 'value' => $users_can_register ? __( 'Yes' ) : __( 'No' ), 'debug' => $users_can_register, ), + 'blog_public' => array( + 'label' => __( 'Is this site discouraging search engines?' ), + 'value' => $blog_public ? __( 'No' ) : __( 'Yes' ), + 'debug' => $blog_public, + ), 'default_comment_status' => array( 'label' => __( 'Default comment status' ), 'value' => 'open' === $default_comment_status ? _x( 'Open', 'comment status' ) : _x( 'Closed', 'comment status' ), diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index e17ca73251..7435ec7988 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -346,7 +346,7 @@ function wp_dashboard_right_now() { if ( ! is_network_admin() && ! is_user_admin() && current_user_can( 'manage_options' ) && '0' == get_option( 'blog_public' ) ) { /** - * Filters the link title attribute for the 'Search Engines Discouraged' + * Filters the link title attribute for the 'Search engines discouraged' * message displayed in the 'At a Glance' dashboard widget. * * Prior to 3.8.0, the widget was named 'Right Now'. @@ -359,7 +359,7 @@ function wp_dashboard_right_now() { $title = apply_filters( 'privacy_on_link_title', '' ); /** - * Filters the link label for the 'Search Engines Discouraged' message + * Filters the link label for the 'Search engines discouraged' message * displayed in the 'At a Glance' dashboard widget. * * Prior to 3.8.0, the widget was named 'Right Now'. @@ -368,10 +368,10 @@ function wp_dashboard_right_now() { * * @param string $content Default text. */ - $content = apply_filters( 'privacy_on_link_text', __( 'Search Engines Discouraged' ) ); + $content = apply_filters( 'privacy_on_link_text', __( 'Search engines discouraged' ) ); $title_attr = '' === $title ? '' : " title='$title'"; - echo "

$content

"; + echo "

$content

"; } ?> diff --git a/src/wp-admin/install.php b/src/wp-admin/install.php index 51e389eeb6..efe061cddc 100644 --- a/src/wp-admin/install.php +++ b/src/wp-admin/install.php @@ -179,10 +179,10 @@ function display_setup_form( $error = null ) {

- +
- + diff --git a/src/wp-admin/options-reading.php b/src/wp-admin/options-reading.php index b56c839fbb..94ba93501a 100644 --- a/src/wp-admin/options-reading.php +++ b/src/wp-admin/options-reading.php @@ -40,9 +40,9 @@ get_current_screen()->add_help_tab( get_current_screen()->add_help_tab( array( 'id' => 'site-visibility', - 'title' => has_action( 'blog_privacy_selector' ) ? __( 'Site Visibility' ) : __( 'Search Engine Visibility' ), + 'title' => has_action( 'blog_privacy_selector' ) ? __( 'Site visibility' ) : __( 'Search engine visibility' ), 'content' => '

' . __( 'You can choose whether or not your site will be crawled by robots, ping services, and spiders. If you want those services to ignore your site, click the checkbox next to “Discourage search engines from indexing this site” and click the Save Changes button at the bottom of the screen. Note that your privacy is not complete; your site is still visible on the web.' ) . '

' . - '

' . __( 'When this setting is in effect, a reminder is shown in the At a Glance box of the Dashboard that says, “Search Engines Discouraged,” to remind you that your site is not being crawled.' ) . '

', + '

' . __( 'When this setting is in effect, a reminder is shown in the At a Glance box of the Dashboard that says, “Search engines discouraged,” to remind you that your site is not being crawled.' ) . '

', ) ); @@ -175,8 +175,8 @@ else : - -
+ +
/>
@@ -185,15 +185,15 @@ else :