Summery Summery
Checks whether a site name is already taken.
Syntax Syntax
Description Description
The name is the site’s subdomain or the site’s subdirectory path depending on the network settings.
Used during the new site registration process to ensure that each site name is unique.
Parameters Parameters
- $domain
-
(Required) The domain to be checked.
- $path
-
(Required) The path to be checked.
- $network_id
-
(Optional) Network ID. Relevant only on multi-network installations.
Default value: 1
Return Return
(int|null) The site ID if the site name exists, null otherwise.
Source Source
File: wp-includes/ms-functions.php
* @param string $msg Email body. * @param WP_User $user WP_User instance of the new user. */ $msg = apply_filters( 'newuser_notify_siteadmin', $msg, $user ); /* translators: New user notification email subject. %s: User login. */ wp_mail( $email, sprintf( __( 'New User Registration: %s' ), $user->user_login ), $msg ); return true; } /** * Checks whether a site name is already taken. * * The name is the site's subdomain or the site's subdirectory * path depending on the network settings. * * Used during the new site registration process to ensure * that each site name is unique. * * @since MU (3.0.0) * * @param string $domain The domain to be checked. * @param string $path The path to be checked. * @param int $network_id Optional. Network ID. Relevant only on multi-network installations. * @return int|null The site ID if the site name exists, null otherwise. */ function domain_exists( $domain, $path, $network_id = 1 ) {
Advertisement
Changelog Changelog
Version | Description |
---|---|
MU (3.0.0) | Introduced. |