Ticket #16416: 16416.6.patch
File 16416.6.patch, 4.4 KB (added by , 8 years ago) |
---|
-
wp-signup.php
92 92 echo '<input name="blog_title" type="text" id="blog_title" value="'.esc_attr($blog_title).'" />'; 93 93 ?> 94 94 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 111 95 <?php 112 96 do_action('signup_blogform', $errors); 113 97 } … … 205 189 return false; 206 190 } 207 191 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 210 193 $meta = apply_filters( 'add_signup_meta', $meta ); 211 194 212 195 wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid ); … … 339 322 return false; 340 323 } 341 324 342 $public = (int) $_POST['blog_public']; 343 $meta = array ('lang_id' => 1, 'public' => $public); 325 $meta = array ('lang_id' => 1, 'public' => 1); 344 326 $meta = apply_filters( 'add_signup_meta', $meta ); 345 327 346 328 wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta); -
wp-admin/install.php
58 58 <head> 59 59 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 60 60 <title><?php _e( 'WordPress › Installation' ); ?></title> 61 <?php 61 <?php 62 62 wp_admin_css( 'install', true ); 63 63 ?> 64 64 </head> … … 79 79 global $wpdb; 80 80 $user_table = ( $wpdb->get_var("SHOW TABLES LIKE '$wpdb->users'") != null ); 81 81 82 // Ensure that Blogs appear in search engines by default83 $blog_public = 1;84 if ( ! empty( $_POST ) )85 $blog_public = isset( $_POST['blog_public'] );86 87 82 $weblog_title = isset( $_POST['weblog_title'] ) ? trim( stripslashes( $_POST['weblog_title'] ) ) : ''; 88 83 $user_name = isset($_POST['user_name']) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin'; 89 84 $admin_password = isset($_POST['admin_password']) ? trim( stripslashes( $_POST['admin_password'] ) ) : ''; … … 131 126 <td><input name="admin_email" type="text" id="admin_email" size="25" value="<?php echo esc_attr( $admin_email ); ?>" /> 132 127 <p><?php _e( 'Double-check your email address before continuing.' ); ?></p></td> 133 128 </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>138 129 </table> 139 130 <p class="step"><input type="submit" name="Submit" value="<?php esc_attr_e( 'Install WordPress' ); ?>" class="button button-large" /></p> 140 131 </form> … … 194 185 $admin_password = isset($_POST['admin_password']) ? $_POST['admin_password'] : ''; 195 186 $admin_password_check = isset($_POST['admin_password2']) ? $_POST['admin_password2'] : ''; 196 187 $admin_email = isset( $_POST['admin_email'] ) ?trim( stripslashes( $_POST['admin_email'] ) ) : ''; 197 $public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 0; 188 198 189 // check e-mail address 199 190 $error = false; 200 191 if ( empty( $user_name ) ) { … … 220 211 221 212 if ( $error === false ) { 222 213 $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); 224 215 extract( $result, EXTR_SKIP ); 225 216 ?> 226 217