Make WordPress Core

Changeset 34752


Ignore:
Timestamp:
10/01/2015 09:34:38 PM (11 years ago)
Author:
ocean90
Message:

Install: Replace the "Privacy" setting with the "Search Engine Visibility" setting from Reading Settings.

Props Clorith, ocean90.
Fixes #27628.
See #16416.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/install.css

    r34043 r34752  
    6060        border: 0;
    6161        font-variant: normal;
     62}
     63
     64fieldset {
     65        border: 0;
     66        padding: 0;
     67        margin: 0;
    6268}
    6369
  • trunk/src/wp-admin/install.php

    r34358 r34752  
    178178                </tr>
    179179                <tr>
    180                         <th scope="row"><?php _e( 'Privacy' ); ?></th>
    181                         <td colspan="2"><label><input type="checkbox" name="blog_public" id="blog_public" value="1" <?php checked( $blog_public ); ?> /> <?php _e( 'Allow search engines to index this site' ); ?></label></td>
     180                        <th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?></th>
     181                        <td>
     182                                <fieldset>
     183                                        <legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
     184                                        <?php
     185                                        if ( has_action( 'blog_privacy_selector' ) ) { ?>
     186                                                <input id="blog-public" type="radio" name="blog_public" value="1" <?php checked( 1, $blog_public ); ?> />
     187                                                <label for="blog-public"><?php _e( 'Allow search engines to index this site' );?></label><br/>
     188                                                <input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked( 0, $blog_public ); ?> />
     189                                                <label for="blog-norobots"><?php _e( 'Discourage search engines from indexing this site' ); ?></label>
     190                                                <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>
     191                                                <?php
     192                                                /** This action is documented in wp-admin/options-reading.php */
     193                                                do_action( 'blog_privacy_selector' );
     194                                         } else { ?>
     195                                                <label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( 0, $blog_public ); ?> />
     196                                                <?php _e( 'Discourage search engines from indexing this site' ); ?></label>
     197                                                <p class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p>
     198                                        <?php } ?>
     199                                </fieldset>
     200                        </td>
    182201                </tr>
    183202        </table>
     
    292311                $admin_password_check = isset($_POST['admin_password2']) ? wp_unslash( $_POST['admin_password2'] ) : '';
    293312                $admin_email  = isset( $_POST['admin_email'] ) ?trim( wp_unslash( $_POST['admin_email'] ) ) : '';
    294                 $public       = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 0;
     313                $public       = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 1;
    295314
    296315                // Check email address.
Note: See TracChangeset for help on using the changeset viewer.