Changeset 958
- Timestamp:
- 04/09/07 11:26:25 (2 years ago)
- Files:
-
- trunk/wp-signup.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-signup.php
r946 r958 209 209 210 210 function signup_user($user_name = '', $user_email = '', $errors = '') { 211 global $current_site ;211 global $current_site, $active_signup; 212 212 213 213 if ( ! is_wp_error($errors) ) … … 236 236 <td> 237 237 <p> 238 <?php if( $active_signup == 'blog' ) { ?> 239 <input id="signupblog" type="hidden" name="signup_for" value="blog" /> 240 <?php } elseif( $active_signup == 'user' ) { ?> 241 <input id="signupblog" type="hidden" name="signup_for" value="user" /> 242 <?php } else { ?> 238 243 <input id="signupblog" type="radio" name="signup_for" value="blog" <?php echo $signup[ 'blog' ] ?> /> 239 244 <label for="signupblog"><?php _e('Gimme a blog!') ?></label> … … 241 246 <input id="signupuser" type="radio" name="signup_for" value="user" <?php echo $signup[ 'user' ] ?> /> 242 247 <label for="signupuser"><?php _e('Just a username, please.') ?></label> 248 <?php } ?> 243 249 </p> 244 250 </td> … … 355 361 die(); 356 362 } 363 364 $active_signup = 'all'; 365 $active_signup = apply_filters( 'wpmu_active_signup', $active_signup ); // return "all", "none", "blog" or "user" 366 357 367 $newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null; 358 368 if( $_POST['blog_public'] != 1 ) 359 369 $_POST['blog_public'] = 0; 360 370 371 if( $active_signup == "none" ) { 372 _e( "Registration has been disabled." ); 373 } else { 361 374 switch ($_POST['stage']) { 362 375 case 'validate-user-signup' : 363 validate_user_signup(); 376 if( $active_signup == 'all' || $_POST[ 'signup_for' ] == 'blog' && $active_signup == 'blog' || $_POST[ 'signup_for' ] == 'user' && $active_signup == 'user' ) 377 validate_user_signup(); 378 else 379 _e( "User registration has been disabled." ); 364 380 break; 365 381 case 'validate-blog-signup': 366 validate_blog_signup(); 382 if( $active_signup == 'all' || $active_signup == 'blog' ) 383 validate_blog_signup(); 384 else 385 _e( "Blog registration has been disabled." ); 367 386 break; 368 387 case 'gimmeanotherblog': … … 386 405 break; 387 406 } 407 } 388 408 ?> 389 409 </div>
