domain_exists


domain_exists ( $domain, $path, $network_id = 1 )

Parameters:
  • (string) $domain The domain to be checked.
  • (string) $path The path to be checked.
  • (int) $network_id Optional. Network ID. Relevant only on multi-network installations.
Returns:
  • (int|null) The site ID if the site name exists, null otherwise.
Defined at:
Change Log:
  • M: U

Description

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.

Related Functions

email_exists, comment_exists, tag_exists, term_exists, post_exists

Top Google Results

User discussions

wpseek mobile