validate_blog_form() WordPress Function

The validate_blog_form() function is used to validate the fields of a blog form. This function is called when a user submits a blog form. It checks the form for required fields and validates the data entered by the user. If the form is valid, the function returns true. Otherwise, it returns false.

validate_blog_form() #

Validates the new site sign-up.


Return

(array) Contains the new site data and error messages. See wpmu_validate_blog_signup() for details.


Top ↑

Source

File: wp-signup.php

function validate_blog_form() {
	$user = '';
	if ( is_user_logged_in() ) {
		$user = wp_get_current_user();
	}

	return wpmu_validate_blog_signup( $_POST['blogname'], $_POST['blog_title'], $user );
}


Top ↑

Changelog

Changelog
VersionDescription
MU (3.0.0)Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.