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.

Built from https://develop.svn.wordpress.org/trunk@47859


git-svn-id: http://core.svn.wordpress.org/trunk@47635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2020-05-27 14:33:11 +00:00
parent 95d53b9a66
commit 38b7495af7
9 changed files with 44 additions and 18 deletions

View File

@ -198,7 +198,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;
@ -261,6 +262,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 ? */
@ -293,6 +295,10 @@
content: "\f153";
}
#dashboard_right_now .search-engines-info:before {
content: "\f348";
}
/* Dashboard WordPress events */
.community-events-errors {
@ -538,6 +544,10 @@ body #dashboard-widgets .postbox form .submit {
margin-right: 5px;
}
#dashboard_right_now p.search-engines-info {
margin: 1em 0;
}
.mu-storage {
overflow: hidden;
}

File diff suppressed because one or more lines are too long

View File

@ -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;
}

File diff suppressed because one or more lines are too long

View File

@ -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' ),

View File

@ -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 "<p><a href='options-reading.php'$title_attr>$content</a></p>";
echo "<p class='search-engines-info'><a href='options-reading.php'$title_attr>$content</a></p>";
}
?>
</div>

View File

@ -179,10 +179,10 @@ function display_setup_form( $error = null ) {
<p><?php _e( 'Double-check your email address before continuing.' ); ?></p></td>
</tr>
<tr>
<th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?></th>
<th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site visibility' ) : _e( 'Search engine visibility' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
<legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site visibility' ) : _e( 'Search engine visibility' ); ?> </span></legend>
<?php
if ( has_action( 'blog_privacy_selector' ) ) {
?>

View File

@ -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' => '<p>' . __( '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 &#8220;Discourage search engines from indexing this site&#8221; 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.' ) . '</p>' .
'<p>' . __( 'When this setting is in effect, a reminder is shown in the At a Glance box of the Dashboard that says, &#8220;Search Engines Discouraged,&#8221; to remind you that your site is not being crawled.' ) . '</p>',
'<p>' . __( 'When this setting is in effect, a reminder is shown in the At a Glance box of the Dashboard that says, &#8220;Search engines discouraged,&#8221; to remind you that your site is not being crawled.' ) . '</p>',
)
);
@ -175,8 +175,8 @@ else :
</tr>
<tr class="option-site-visibility">
<th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </th>
<td><fieldset><legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
<th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site visibility' ) : _e( 'Search engine visibility' ); ?> </th>
<td><fieldset><legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site visibility' ) : _e( 'Search engine visibility' ); ?> </span></legend>
<?php if ( has_action( 'blog_privacy_selector' ) ) : ?>
<input id="blog-public" type="radio" name="blog_public" value="1" <?php checked( '1', get_option( 'blog_public' ) ); ?> />
<label for="blog-public"><?php _e( 'Allow search engines to index this site' ); ?></label><br/>
@ -185,15 +185,15 @@ else :
<p class="description"><?php _e( 'Note: Neither of these options blocks access to your site &mdash; it is up to search engines to honor your request.' ); ?></p>
<?php
/**
* Enable the legacy 'Site Visibility' privacy options.
* Enable the legacy 'Site visibility' privacy options.
*
* By default the privacy options form displays a single checkbox to 'discourage' search
* engines from indexing the site. Hooking to this action serves a dual purpose:
* 1. Disable the single checkbox in favor of a multiple-choice list of radio buttons.
* 2. Open the door to adding additional radio button choices to the list.
*
* Hooking to this action also converts the 'Search Engine Visibility' heading to the more
* open-ended 'Site Visibility' heading.
* Hooking to this action also converts the 'Search engine visibility' heading to the more
* open-ended 'Site visibility' heading.
*
* @since 2.1.0
*/

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-alpha-47858';
$wp_version = '5.5-alpha-47859';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.