Make WordPress Core


Ignore:
Timestamp:
09/13/2012 05:28:57 PM (12 years ago)
Author:
nacin
Message:

Fold Privacy Settings into Reading Settings, moving blog_public (search engine/robots) to options-reading and removing options-privacy.

When blog_public only has two values (as judged by whether the blog_privacy_selector action is used), convert from radio buttons to a checkbox, and rename from 'Site Visibility' to a more specific 'Search Engine Visibility'.

The text and implementation may change a bit. see #16416.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-reading.php

    r21653 r21838  
    5151) );
    5252
     53get_current_screen()->add_help_tab( array(
     54    'id'      => 'site-visibility',
     55    'title'   => has_action( 'blog_privacy_selector' ) ? __( 'Site Visibility' ) : __( 'Search Engine Visibility' ),
     56    '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 radio button next to &#8220;Ask search engines not to index 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>' .
     57        '<p>' . __( 'When this setting is in effect a reminder is shown in the Right Now box of the Dashboard that says, &#8220;Search Engines Discouraged,&#8221; to remind you that your site is not being crawled.' ) . '</p>',
     58) );
     59
    5360get_current_screen()->set_help_sidebar(
    5461    '<p><strong>' . __('For more information:') . '</strong></p>' .
     
    6471<h2><?php echo esc_html( $title ); ?></h2>
    6572
    66 <form name="form1" method="post" action="options.php">
     73<form method="post" action="options.php">
    6774<?php
    6875settings_fields( 'reading' );
     
    133140</tr>
    134141
     142<tr valign="top">
     143<th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </th>
     144<td><fieldset><legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
     145<?php if ( has_action( 'blog_privacy_selector' ) ) : ?>
     146    <input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> />
     147    <label for="blog-public"><?php _e( 'Allow search engines to index this site.' );?></label><br/>
     148    <input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> />
     149    <label for="blog-norobots"><?php _e( 'Ask search engines not to index this site.' ); ?></label>
     150    <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>
     151    <?php do_action('blog_privacy_selector'); ?>
     152<?php else : ?>
     153    <label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="1" <?php checked( '1', get_option( 'blog_public' ) ); ?> />
     154    <?php _e( 'Allow search engines to index this site' ); ?>
     155    <p class="description"><?php _e( 'It is up to search engines to honor a request to not index this site.' ); ?></p>
     156<?php endif; ?>
     157</fieldset></td>
     158</tr>
     159
    135160<?php do_settings_fields( 'reading', 'default' ); ?>
    136161</table>
Note: See TracChangeset for help on using the changeset viewer.