Changeset 925
- Timestamp:
- 03/20/07 18:20:36 (2 years ago)
- Files:
-
- trunk/wp-signup.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-signup.php
r867 r925 79 79 </tr> 80 80 <?php 81 do_action('signup_blogform', $errors );81 do_action('signup_blogform', $errors); 82 82 } 83 83 … … 116 116 print '<tr>'; 117 117 } 118 ?><th valign="top"><?php _e('Email Address:') ?></th><td ><?php118 ?><th valign="top"><?php _e('Email Address:') ?></th><td valign="top"><?php 119 119 120 120 if ( $errmsg = $errors->get_error_message('user_email') ) { … … 127 127 if ( $errmsg = $errors->get_error_message('generic') ) 128 128 print '<tr class="error"> <th colspan="2">'.$errmsg.'</th> </tr>'; 129 do_action( 'signup_extra_fields' ); 129 130 } 130 131 … … 213 214 if ( ! is_wp_error($errors) ) 214 215 $errors = new WP_Error(); 216 if( isset( $_POST[ 'signup_for' ] ) ) { 217 $signup[ wp_specialchars( $_POST[ 'signup_for' ] ) ] = 'checked'; 218 } else { 219 $signup[ 'blog' ] = 'checked'; 220 } 215 221 216 222 // allow definition of default variables … … 225 231 <input type="hidden" name="stage" value="validate-user-signup"> 226 232 <?php do_action( "signup_hidden_fields" ); ?> 227 <table border="0" width="100%" cellpadding="9" >233 <table border="0" width="100%" cellpadding="9" cellspacing="4"> 228 234 <?php show_user_form($user_name, $user_email, $errors); ?> 229 235 <th scope="row" valign="top"> </th> 230 236 <td> 231 237 <p> 232 <input id="signupblog" type="radio" name="signup_for" value="blog" checked="checked"/>238 <input id="signupblog" type="radio" name="signup_for" value="blog" <?php echo $signup[ 'blog' ] ?> /> 233 239 <label for="signupblog"><?php _e('Gimme a blog!') ?></label> 234 240 <br /> 235 <input id="signupuser" type="radio" name="signup_for" value="user" />241 <input id="signupuser" type="radio" name="signup_for" value="user" <?php echo $signup[ 'user' ] ?> /> 236 242 <label for="signupuser"><?php _e('Just a username, please.') ?></label> 237 243 </p> … … 262 268 } 263 269 264 wpmu_signup_user($user_name, $user_email );270 wpmu_signup_user($user_name, $user_email, apply_filters( "add_signup_meta", array() ) ); 265 271 266 272 confirm_user_signup($user_name, $user_email); … … 349 355 die(); 350 356 } 351 $ blog_id= isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null;357 $newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null; 352 358 if( $_POST['blog_public'] != 1 ) 353 359 $_POST['blog_public'] = 0; … … 367 373 do_action( "preprocess_signup_form" ); // populate the form from invites, elsewhere? 368 374 if ( is_user_logged_in() ) 369 signup_another_blog($ blog_id);375 signup_another_blog($newblogname); 370 376 else 371 signup_user( $ blog_id, $user_email );372 373 if ($ blog_id) {377 signup_user( $newblogname, $user_email ); 378 379 if ($newblogname) { 374 380 if( constant( "VHOST" ) == 'no' ) 375 $newblog = 'http://' . $current_site->domain . $current_site->path . $ blog_id. '/';381 $newblog = 'http://' . $current_site->domain . $current_site->path . $newblogname . '/'; 376 382 else 377 $newblog = 'http://' . $ blog_id. '.' . $current_site->domain . $current_site->path;383 $newblog = 'http://' . $newblogname . '.' . $current_site->domain . $current_site->path; 378 384 printf(__("<p><em>The blog you were looking for, <strong>%s</strong> doesn't exist but you can create it now!</em></p>"), $newblog ); 379 385 }
