validate_another_blog_signup

The timeline below displays how wordpress function validate_another_blog_signup has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.9

/**
 * Validates a new site sign-up for an existing user.
 *
 * @since MU (3.0.0)
 *
 * @global string   $blogname   The new site's subdomain or directory name.
 * @global string   $blog_title The new site's title.
 * @global WP_Error $errors     Existing errors in the global scope.
 * @global string   $domain     The new site's domain.
 * @global string   $path       The new site's path.
 *
 * @return null|bool True if site signup was validated, false on error.
 *                   The function halts all execution if the user is not logged in.
 */
function validate_another_blog_signup()
{
    global $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    // Extracted values set/overwrite globals.
    $domain = $result['domain'];
    $path = $result['path'];
    $blogname = $result['blogname'];
    $blog_title = $result['blog_title'];
    $errors = $result['errors'];
    if ($errors->has_errors()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    // Handle the language setting for the new site.
    if (!empty($_POST['WPLANG'])) {
        $languages = signup_get_available_languages();
        if (in_array($_POST['WPLANG'], $languages, true)) {
            $language = wp_unslash(sanitize_text_field($_POST['WPLANG']));
            if ($language) {
                $blog_meta_defaults['WPLANG'] = $language;
            }
        }
    }
    /**
     * Filters the new site meta variables.
     *
     * Use the {@see 'add_signup_meta'} filter instead.
     *
     * @since MU (3.0.0)
     * @deprecated 3.0.0 Use the {@see 'add_signup_meta'} filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta_defaults = apply_filters_deprecated('signup_create_blog_meta', array($blog_meta_defaults), '3.0.0', 'add_signup_meta');
    /**
     * Filters the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta_defaults);
    $blog_id = wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, get_current_network_id());
    if (is_wp_error($blog_id)) {
        return false;
    }
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id);
    return true;
}

WordPress Version: 5.5

/**
 * Validate a new site signup for an existing user.
 *
 * @global string          $blogname   The new site's subdomain or directory name.
 * @global string          $blog_title The new site's title.
 * @global WP_Error        $errors     Existing errors in the global scope.
 * @global string          $domain     The new site's domain.
 * @global string          $path       The new site's path.
 *
 * @since MU (3.0.0)
 *
 * @return null|bool True if site signup was validated, false if error.
 *                   The function halts all execution if the user is not logged in.
 */
function validate_another_blog_signup()
{
    global $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    // Extracted values set/overwrite globals.
    $domain = $result['domain'];
    $path = $result['path'];
    $blogname = $result['blogname'];
    $blog_title = $result['blog_title'];
    $errors = $result['errors'];
    if ($errors->has_errors()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    // Handle the language setting for the new site.
    if (!empty($_POST['WPLANG'])) {
        $languages = signup_get_available_languages();
        if (in_array($_POST['WPLANG'], $languages, true)) {
            $language = wp_unslash(sanitize_text_field($_POST['WPLANG']));
            if ($language) {
                $blog_meta_defaults['WPLANG'] = $language;
            }
        }
    }
    /**
     * Filters the new site meta variables.
     *
     * Use the {@see 'add_signup_meta'} filter instead.
     *
     * @since MU (3.0.0)
     * @deprecated 3.0.0 Use the {@see 'add_signup_meta'} filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta_defaults = apply_filters_deprecated('signup_create_blog_meta', array($blog_meta_defaults), '3.0.0', 'add_signup_meta');
    /**
     * Filters the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta_defaults);
    $blog_id = wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, get_current_network_id());
    if (is_wp_error($blog_id)) {
        return false;
    }
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id);
    return true;
}

WordPress Version: 5.4

/**
 * Validate a new site signup for an existing user.
 *
 * @global string          $blogname   The new site's subdomain or directory name.
 * @global string          $blog_title The new site's title.
 * @global WP_Error        $errors     Existing errors in the global scope.
 * @global string          $domain     The new site's domain.
 * @global string          $path       The new site's path.
 *
 * @since MU (3.0.0)
 *
 * @return null|bool True if site signup was validated, false if error.
 *                   The function halts all execution if the user is not logged in.
 */
function validate_another_blog_signup()
{
    global $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    // Extracted values set/overwrite globals.
    $domain = $result['domain'];
    $path = $result['path'];
    $blogname = $result['blogname'];
    $blog_title = $result['blog_title'];
    $errors = $result['errors'];
    if ($errors->has_errors()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    // Handle the language setting for the new site.
    if (!empty($_POST['WPLANG'])) {
        $languages = signup_get_available_languages();
        if (in_array($_POST['WPLANG'], $languages)) {
            $language = wp_unslash(sanitize_text_field($_POST['WPLANG']));
            if ($language) {
                $blog_meta_defaults['WPLANG'] = $language;
            }
        }
    }
    /**
     * Filters the new site meta variables.
     *
     * Use the {@see 'add_signup_meta'} filter instead.
     *
     * @since MU (3.0.0)
     * @deprecated 3.0.0 Use the {@see 'add_signup_meta'} filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta_defaults = apply_filters_deprecated('signup_create_blog_meta', array($blog_meta_defaults), '3.0.0', 'add_signup_meta');
    /**
     * Filters the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta_defaults);
    $blog_id = wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, get_current_network_id());
    if (is_wp_error($blog_id)) {
        return false;
    }
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id);
    return true;
}

WordPress Version: 5.1

/**
 * Validate a new site signup for an existing user.
 *
 * @global string          $blogname   The new site's subdomain or directory name.
 * @global string          $blog_title The new site's title.
 * @global WP_Error        $errors     Existing errors in the global scope.
 * @global string          $domain     The new site's domain.
 * @global string          $path       The new site's path.
 *
 * @since MU (3.0.0)
 *
 * @return null|bool True if site signup was validated, false if error.
 *                   The function halts all execution if the user is not logged in.
 */
function validate_another_blog_signup()
{
    global $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    // Extracted values set/overwrite globals.
    $domain = $result['domain'];
    $path = $result['path'];
    $blogname = $result['blogname'];
    $blog_title = $result['blog_title'];
    $errors = $result['errors'];
    if ($errors->has_errors()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    // Handle the language setting for the new site.
    if (!empty($_POST['WPLANG'])) {
        $languages = signup_get_available_languages();
        if (in_array($_POST['WPLANG'], $languages)) {
            $language = wp_unslash(sanitize_text_field($_POST['WPLANG']));
            if ($language) {
                $blog_meta_defaults['WPLANG'] = $language;
            }
        }
    }
    /**
     * Filters the new site meta variables.
     *
     * Use the {@see 'add_signup_meta'} filter instead.
     *
     * @since MU (3.0.0)
     * @deprecated 3.0.0 Use the {@see 'add_signup_meta'} filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta_defaults = apply_filters('signup_create_blog_meta', $blog_meta_defaults);
    /**
     * Filters the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta_defaults);
    $blog_id = wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, get_current_network_id());
    if (is_wp_error($blog_id)) {
        return false;
    }
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id);
    return true;
}

WordPress Version: 4.9

/**
 * Validate a new site signup.
 *
 * @since MU (3.0.0)
 *
 * @return null|bool True if site signup was validated, false if error.
 *                   The function halts all execution if the user is not logged in.
 */
function validate_another_blog_signup()
{
    global $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    // Extracted values set/overwrite globals.
    $domain = $result['domain'];
    $path = $result['path'];
    $blogname = $result['blogname'];
    $blog_title = $result['blog_title'];
    $errors = $result['errors'];
    if ($errors->get_error_code()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    // Handle the language setting for the new site.
    if (!empty($_POST['WPLANG'])) {
        $languages = signup_get_available_languages();
        if (in_array($_POST['WPLANG'], $languages)) {
            $language = wp_unslash(sanitize_text_field($_POST['WPLANG']));
            if ($language) {
                $blog_meta_defaults['WPLANG'] = $language;
            }
        }
    }
    /**
     * Filters the new site meta variables.
     *
     * Use the {@see 'add_signup_meta'} filter instead.
     *
     * @since MU (3.0.0)
     * @deprecated 3.0.0 Use the {@see 'add_signup_meta'} filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta_defaults = apply_filters('signup_create_blog_meta', $blog_meta_defaults);
    /**
     * Filters the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta_defaults);
    $blog_id = wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, get_current_network_id());
    if (is_wp_error($blog_id)) {
        return false;
    }
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id);
    return true;
}

WordPress Version: 4.6

/**
 * Validate a new site signup.
 *
 * @since MU
 *
 * @return null|bool True if site signup was validated, false if error.
 *                   The function halts all execution if the user is not logged in.
 */
function validate_another_blog_signup()
{
    global $wpdb, $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    // Extracted values set/overwrite globals.
    $domain = $result['domain'];
    $path = $result['path'];
    $blogname = $result['blogname'];
    $blog_title = $result['blog_title'];
    $errors = $result['errors'];
    if ($errors->get_error_code()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    // Handle the language setting for the new site.
    if (!empty($_POST['WPLANG'])) {
        $languages = signup_get_available_languages();
        if (in_array($_POST['WPLANG'], $languages)) {
            $language = wp_unslash(sanitize_text_field($_POST['WPLANG']));
            if ($language) {
                $blog_meta_defaults['WPLANG'] = $language;
            }
        }
    }
    /**
     * Filters the new site meta variables.
     *
     * Use the {@see 'add_signup_meta'} filter instead.
     *
     * @since MU
     * @deprecated 3.0.0 Use the {@see 'add_signup_meta'} filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta_defaults = apply_filters('signup_create_blog_meta', $blog_meta_defaults);
    /**
     * Filters the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta_defaults);
    $blog_id = wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid);
    if (is_wp_error($blog_id)) {
        return false;
    }
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id);
    return true;
}

WordPress Version: 4.5

/**
 * Validate a new site signup.
 *
 * @since MU
 *
 * @return null|bool True if site signup was validated, false if error.
 *                   The function halts all execution if the user is not logged in.
 */
function validate_another_blog_signup()
{
    global $wpdb, $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    // Extracted values set/overwrite globals.
    $domain = $result['domain'];
    $path = $result['path'];
    $blogname = $result['blogname'];
    $blog_title = $result['blog_title'];
    $errors = $result['errors'];
    if ($errors->get_error_code()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    // Handle the language setting for the new site.
    if (!empty($_POST['WPLANG'])) {
        $languages = signup_get_available_languages();
        if (in_array($_POST['WPLANG'], $languages)) {
            $language = wp_unslash(sanitize_text_field($_POST['WPLANG']));
            if ($language) {
                $blog_meta_defaults['WPLANG'] = $language;
            }
        }
    }
    /**
     * Filter the new site meta variables.
     *
     * @since MU
     * @deprecated 3.0.0 Use the 'add_signup_meta' filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta_defaults = apply_filters('signup_create_blog_meta', $blog_meta_defaults);
    /**
     * Filter the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta_defaults);
    $blog_id = wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid);
    if (is_wp_error($blog_id)) {
        return false;
    }
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id);
    return true;
}

WordPress Version: 4.4

/**
 * Validate a new blog signup
 *
 * @since MU
 *
 * @return null|bool True if blog signup was validated, false if error.
 *                   The function halts all execution if the user is not logged in.
 */
function validate_another_blog_signup()
{
    global $wpdb, $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    // Extracted values set/overwrite globals.
    $domain = $result['domain'];
    $path = $result['path'];
    $blogname = $result['blogname'];
    $blog_title = $result['blog_title'];
    $errors = $result['errors'];
    if ($errors->get_error_code()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    // Handle the language setting for the new site.
    if (!empty($_POST['WPLANG'])) {
        $languages = signup_get_available_languages();
        if (in_array($_POST['WPLANG'], $languages)) {
            $language = wp_unslash(sanitize_text_field($_POST['WPLANG']));
            if ($language) {
                $blog_meta_defaults['WPLANG'] = $language;
            }
        }
    }
    /**
     * Filter the new site meta variables.
     *
     * @since MU
     * @deprecated 3.0.0 Use the 'add_signup_meta' filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta_defaults = apply_filters('signup_create_blog_meta', $blog_meta_defaults);
    /**
     * Filter the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta_defaults);
    $blog_id = wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid);
    if (is_wp_error($blog_id)) {
        return false;
    }
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id);
    return true;
}

WordPress Version: 4.3

/**
 * Validate a new blog signup
 *
 * @since MU
 *
 * @return null|bool True if blog signup was validated, false if error.
 *                   The function halts all execution if the user is not logged in.
 */
function validate_another_blog_signup()
{
    global $wpdb, $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    // Extracted values set/overwrite globals.
    $domain = $result['domain'];
    $path = $result['path'];
    $blogname = $result['blogname'];
    $blog_title = $result['blog_title'];
    $errors = $result['errors'];
    if ($errors->get_error_code()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    /**
     * Filter the new site meta variables.
     *
     * @since MU
     * @deprecated 3.0.0 Use the 'add_signup_meta' filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta_defaults = apply_filters('signup_create_blog_meta', $blog_meta_defaults);
    /**
     * Filter the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta_defaults);
    wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid);
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta);
    return true;
}

WordPress Version: 4.1

/**
 * Validate a new blog signup
 *
 * @since MU
 *
 * @return null|boolean True if blog signup was validated, false if error.
 *                      The function halts all execution if the user is not logged in.
 */
function validate_another_blog_signup()
{
    global $wpdb, $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    // Extracted values set/overwrite globals.
    $domain = $result['domain'];
    $path = $result['path'];
    $blogname = $result['blogname'];
    $blog_title = $result['blog_title'];
    $errors = $result['errors'];
    if ($errors->get_error_code()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    /**
     * Filter the new site meta variables.
     *
     * @since MU
     * @deprecated 3.0.0 Use the 'add_signup_meta' filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta_defaults = apply_filters('signup_create_blog_meta', $blog_meta_defaults);
    /**
     * Filter the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta_defaults);
    wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid);
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta);
    return true;
}

WordPress Version: 4.0

/**
 * Validate a new blog signup
 *
 * @since MU
 *
 * @uses wp_get_current_user() to retrieve the current user
 * @uses wpmu_create_blog() to add a new site
 * @uses confirm_another_blog_signup() to confirm the user's new site signup
 * @return bool True if blog signup was validated, false if error
 */
function validate_another_blog_signup()
{
    global $wpdb, $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    // Extracted values set/overwrite globals.
    $domain = $result['domain'];
    $path = $result['path'];
    $blogname = $result['blogname'];
    $blog_title = $result['blog_title'];
    $errors = $result['errors'];
    if ($errors->get_error_code()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    /**
     * Filter the new site meta variables.
     *
     * @since MU
     * @deprecated 3.0.0 Use the 'add_signup_meta' filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta_defaults = apply_filters('signup_create_blog_meta', $blog_meta_defaults);
    /**
     * Filter the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta_defaults);
    wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid);
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta);
    return true;
}

WordPress Version: 3.7

/**
 * Validate a new blog signup
 *
 * @since MU
 *
 * @uses wp_get_current_user() to retrieve the current user
 * @uses wpmu_create_blog() to add a new site
 * @uses confirm_another_blog_signup() to confirm the user's new site signup
 * @return bool True if blog signup was validated, false if error
 */
function validate_another_blog_signup()
{
    global $wpdb, $blogname, $blog_title, $errors, $domain, $path;
    $current_user = wp_get_current_user();
    if (!is_user_logged_in()) {
        die;
    }
    $result = validate_blog_form();
    extract($result);
    if ($errors->get_error_code()) {
        signup_another_blog($blogname, $blog_title, $errors);
        return false;
    }
    $public = (int) $_POST['blog_public'];
    $blog_meta_defaults = array('lang_id' => 1, 'public' => $public);
    /**
     * Filter the new site meta variables.
     *
     * @since MU
     * @deprecated 3.0.0 Use the 'add_signup_meta' filter instead.
     *
     * @param array $blog_meta_defaults An array of default blog meta variables.
     */
    $meta = apply_filters('signup_create_blog_meta', $blog_meta_defaults);
    /**
     * Filter the new default site meta variables.
     *
     * @since 3.0.0
     *
     * @param array $meta {
     *     An array of default site meta variables.
     *
     *     @type int $lang_id     The language ID.
     *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
     * }
     */
    $meta = apply_filters('add_signup_meta', $meta);
    wpmu_create_blog($domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid);
    confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta);
    return true;
}