wpmu_validate_blog_signup

SummerySummery

Processes new site registrations.

Syntax

wpmu_validate_blog_signup( string $blogname, string $blog_title, WP_User|string $user = '' )

DescriptionDescription

Checks the data provided by the user during blog signup. Verifies the validity and uniqueness of blog paths and domains.

This function prevents the current user from registering a new site with a blogname equivalent to another user’s login name. Passing the $user parameter to the function, where $user is the other user, is effectively an override of this limitation.

Filter ‘wpmu_validate_blog_signup’ if you want to modify the way that WordPress validates new site signups.

ParametersParameters

$blogname

(string) (Required) The blog name provided by the user. Must be unique.

$blog_title

(string) (Required) The blog title provided by the user.

$user

(WP_User|string) (Optional) The user object to check against the new site name.

Default value: ''

ReturnReturn

(array) Array of domain, path, blog name, blog title, user and error messages.

  • 'domain'
    (string) Domain for the site.
  • 'path'
    (string) Path for the site. Used in subdirectory installations.
  • 'blogname'
    (string) The unique site name (slug).
  • 'blog_title'
    (string) Blog title.
  • 'user'
    (string|WP_User) By default, an empty string. A user object if provided.
  • 'errors'
    (WP_Error) WP_Error containing any errors found.

SourceSource

File: wp-includes/ms-functions.php


			

ChangelogChangelog

Changelog
Version Description
MU (3.0.0) Introduced.
Scroll to Top