printf( __( 'You must first log in, and then you can create a new site.' ), $login_url ); } else { $stage = isset( $_POST['stage'] ) ? $_POST['stage'] : 'default'; switch ( $stage ) { case 'validate-user-signup' : if ( $active_signup == 'all' || $_POST[ 'signup_for' ] == 'blog' && $active_signup == 'blog' || $_POST[ 'signup_for' ] == 'user' && $active_signup == 'user' ) validate_user_signup(); else _e( 'User registration has been disabled.' ); break; case 'validate-blog-signup': if ( $active_signup == 'all' || $active_signup == 'blog' ) validate_blog_signup(); else _e( 'Site registration has been disabled.' ); break; case 'gimmeanotherblog': validate_another_blog_signup(); break; case 'default': default : $user_email = isset( $_POST[ 'user_email' ] ) ? $_POST[ 'user_email' ] : ''; /** * Fires when the site sign-up form is sent. * * @since 3.0.0 */ do_action( 'preprocess_signup_form' ); if ( is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'blog' ) ) signup_another_blog($newblogname); elseif ( ! is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'user' ) ) signup_user( $newblogname, $user_email ); elseif ( ! is_user_logged_in() && ( $active_signup == 'blog' ) ) _e( 'Sorry, new registrations are not allowed at this time.' ); else _e( 'You are logged in already. No need to register again!' ); if ( $newblogname ) { $newblog = get_blogaddress_by_name( $newblogname ); if ( $active_signup == 'blog' || $active_signup == 'all' ) /* translators: %s: site address */ printf( '

' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '

', '' . $newblog . '' ); else /* translators: %s: site address */ printf( '

' . __( 'The site you were looking for, %s, does not exist.' ) . '

', '' . $newblog . '' ); } break; } } ?>