bp_blogs_validate_blog_form( $blog_name = '',  $blog_title = '' )

Validate a blog creation submission.


Description Description

Essentially, a wrapper for wpmu_validate_blog_signup().


Top ↑

Return Return

(array) Contains the new site data and error messages.


Source Source

File: bp-blogs/bp-blogs-functions.php

function bp_blogs_validate_blog_form( $blog_name = '', $blog_title = '' ) {
	$user = '';

	if ( is_user_logged_in() ) {
		$user = wp_get_current_user();
	}

	if ( ! $blog_name && ! $blog_title ) {
		$submitted_vars = bp_blogs_get_signup_form_submitted_vars();

		if ( array_filter( $submitted_vars ) ) {
			$blog_name  = $submitted_vars['blogname'];
			$blog_title = $submitted_vars['blog_title'];
		}
	}

	return wpmu_validate_blog_signup( $blog_name, $blog_title, $user );
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Add the blog_name and blog_title parameters. The function has been moved into bp-blogs/bp-blogs-functions.php.
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.