WordPress.org

Make WordPress Core

Ticket #34149: 34149.patch

File 34149.patch, 2.8 KB (added by grvrulz, 4 years ago)

Initial patch to match site visibility option with reading settings.

  • wp-signup.php

     
    123123
    124124        <div id="privacy">
    125125        <p class="privacy-intro">
    126             <label for="blog_public_on"><?php _e('Privacy:') ?></label>
    127             <?php _e( 'Allow search engines to index this site.' ); ?>
    128             <br style="clear:both" />
    129             <label class="checkbox" for="blog_public_on">
    130                 <input type="radio" id="blog_public_on" name="blog_public" value="1" <?php if ( !isset( $_POST['blog_public'] ) || $_POST['blog_public'] == '1' ) { ?>checked="checked"<?php } ?> />
    131                 <strong><?php _e( 'Yes' ); ?></strong>
    132             </label>
    133             <label class="checkbox" for="blog_public_off">
    134                 <input type="radio" id="blog_public_off" name="blog_public" value="0" <?php if ( isset( $_POST['blog_public'] ) && $_POST['blog_public'] == '0' ) { ?>checked="checked"<?php } ?> />
    135                 <strong><?php _e( 'No' ); ?></strong>
    136             </label>
     126           
     127            <fieldset>
     128              <label><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?></label>
     129              <legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
     130              <?php if ( has_action( 'blog_privacy_selector' ) ) : ?>
     131                      <input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> />
     132                      <label for="blog-public"><?php _e( 'Allow search engines to index this site' );?></label><br/>
     133                      <input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> />
     134                      <label for="blog-norobots"><?php _e( 'Discourage search engines from indexing this site' ); ?></label>
     135                      <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>
     136                      <?php
     137                      /** This action is documented in wp-admin/options-reading.php */
     138                      do_action( 'blog_privacy_selector' );
     139                      ?>
     140              <?php else : ?>
     141                      <label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( '0', get_option( 'blog_public' ) ); ?> />
     142                      <?php _e( 'Discourage search engines from indexing this site' ); ?></label>
     143                      <p class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p>
     144              <?php endif; ?>
     145              </fieldset>
    137146        </p>
    138147        </div>
    139148