' . sprintf( __('Get another %s blog in seconds'), $current_site->site_name ) . '
';
if ( $errors->get_error_code() ) {
echo "
" . __('There was a problem, please correct the form below and try again.') . "
";
}
?>
add another blog to your account. There is no limit to the number of blogs you can have, so create to your heart's content, but blog responsibly."), $current_user->display_name) ?>
http://%2$s is your new blog. Login as "%4$s" using your existing password.'), $domain.$path, $domain.$path, "http://" . $domain.$path . "wp-login.php", $user_name) ?>
%s and click the link given. It should arrive within 30 minutes.'), $user_email) ?>
" . sprintf( __( "Greetings Site Administrator! You are currently allowing '%s' registrations. To change or disable registration go to your Options page." ), $active_signup ) . "
";
}
$newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null;
$current_user = wp_get_current_user();
if( $active_signup == "none" ) {
_e( "Registration has been disabled." );
} else {
if( $active_signup == 'blog' && !is_user_logged_in() ) {
wp_die( 'You must be logged in to register a blog.' );
}
switch ($_POST['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( "Blog registration has been disabled." );
break;
case 'gimmeanotherblog':
validate_another_blog_signup();
break;
default :
$user_email = $_POST[ 'user_email' ];
do_action( "preprocess_signup_form" ); // populate the form from invites, elsewhere?
if ( is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'blog' ) ) {
signup_another_blog($newblogname);
} elseif( is_user_logged_in() == false && ( $active_signup == 'all' || $active_signup == 'user' ) ) {
signup_user( $newblogname, $user_email );
} elseif( is_user_logged_in() == false && ( $active_signup == 'blog' ) ) {
_e( "I'm sorry. We're not accepting new registrations at this time." );
} else {
_e( "You're logged in already. No need to register again!" );
}
if ($newblogname) {
if( constant( "VHOST" ) == 'no' )
$newblog = 'http://' . $current_site->domain . $current_site->path . $newblogname . '/';
else
$newblog = 'http://' . $newblogname . '.' . $current_site->domain . $current_site->path;
printf(__("
The blog you were looking for, %s doesn't exist but you can create it now!