WordPress.org

Make WordPress Core

Ticket #16416: 16416.6.patch

File 16416.6.patch, 4.4 KB (added by ocean90, 8 years ago)

Removes search engine stuff from signup/install

  • wp-signup.php

     
    9292        echo '<input name="blog_title" type="text" id="blog_title" value="'.esc_attr($blog_title).'" />';
    9393        ?>
    9494
    95         <div id="privacy">
    96         <p class="privacy-intro">
    97             <label for="blog_public_on"><?php _e('Privacy:') ?></label>
    98             <?php _e( 'Allow search engines to index this site.' ); ?>
    99             <br style="clear:both" />
    100             <label class="checkbox" for="blog_public_on">
    101                 <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 } ?> />
    102                 <strong><?php _e( 'Yes' ); ?></strong>
    103             </label>
    104             <label class="checkbox" for="blog_public_off">
    105                 <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 } ?> />
    106                 <strong><?php _e( 'No' ); ?></strong>
    107             </label>
    108         </p>
    109         </div>
    110 
    11195        <?php
    11296        do_action('signup_blogform', $errors);
    11397}
     
    205189                return false;
    206190        }
    207191
    208         $public = (int) $_POST['blog_public'];
    209         $meta = apply_filters( 'signup_create_blog_meta', array( 'lang_id' => 1, 'public' => $public ) ); // deprecated
     192        $meta = apply_filters( 'signup_create_blog_meta', array( 'lang_id' => 1, 'public' => 1 ) ); // deprecated
    210193        $meta = apply_filters( 'add_signup_meta', $meta );
    211194
    212195        wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid );
     
    339322                return false;
    340323        }
    341324
    342         $public = (int) $_POST['blog_public'];
    343         $meta = array ('lang_id' => 1, 'public' => $public);
     325        $meta = array ('lang_id' => 1, 'public' => 1);
    344326        $meta = apply_filters( 'add_signup_meta', $meta );
    345327
    346328        wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta);
  • wp-admin/install.php

     
    5858<head>
    5959        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    6060        <title><?php _e( 'WordPress &rsaquo; Installation' ); ?></title>
    61         <?php 
     61        <?php
    6262        wp_admin_css( 'install', true );
    6363        ?>
    6464</head>
     
    7979        global $wpdb;
    8080        $user_table = ( $wpdb->get_var("SHOW TABLES LIKE '$wpdb->users'") != null );
    8181
    82         // Ensure that Blogs appear in search engines by default
    83         $blog_public = 1;
    84         if ( ! empty( $_POST ) )
    85                 $blog_public = isset( $_POST['blog_public'] );
    86 
    8782        $weblog_title = isset( $_POST['weblog_title'] ) ? trim( stripslashes( $_POST['weblog_title'] ) ) : '';
    8883        $user_name = isset($_POST['user_name']) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin';
    8984        $admin_password = isset($_POST['admin_password']) ? trim( stripslashes( $_POST['admin_password'] ) ) : '';
     
    131126                        <td><input name="admin_email" type="text" id="admin_email" size="25" value="<?php echo esc_attr( $admin_email ); ?>" />
    132127                        <p><?php _e( 'Double-check your email address before continuing.' ); ?></p></td>
    133128                </tr>
    134                 <tr>
    135                         <th scope="row"><label for="blog_public"><?php _e( 'Privacy' ); ?></label></th>
    136                         <td colspan="2"><label><input type="checkbox" name="blog_public" value="1" <?php checked( $blog_public ); ?> /> <?php _e( 'Allow search engines to index this site.' ); ?></label></td>
    137                 </tr>
    138129        </table>
    139130        <p class="step"><input type="submit" name="Submit" value="<?php esc_attr_e( 'Install WordPress' ); ?>" class="button button-large" /></p>
    140131</form>
     
    194185                $admin_password = isset($_POST['admin_password']) ? $_POST['admin_password'] : '';
    195186                $admin_password_check = isset($_POST['admin_password2']) ? $_POST['admin_password2'] : '';
    196187                $admin_email  = isset( $_POST['admin_email']  ) ?trim( stripslashes( $_POST['admin_email'] ) ) : '';
    197                 $public       = isset( $_POST['blog_public']  ) ? (int) $_POST['blog_public'] : 0;
     188
    198189                // check e-mail address
    199190                $error = false;
    200191                if ( empty( $user_name ) ) {
     
    220211
    221212                if ( $error === false ) {
    222213                        $wpdb->show_errors();
    223                         $result = wp_install($weblog_title, $user_name, $admin_email, $public, '', $admin_password);
     214                        $result = wp_install($weblog_title, $user_name, $admin_email, 1, '', $admin_password);
    224215                        extract( $result, EXTR_SKIP );
    225216?>
    226217