WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/domain exists

Description

Check whether a blogname is already taken.

Used during the new site registration process to ensure that each blogname is unique.

Usage

<?php domain_exists$domain$path$site_id ); ?>

Parameters

$domain
(string) (required) The domain to be checked.
Default: None
$path
(string) (required) The path to be checked.
Default: None
$site_id
(int) (optional) Optional. Relevant only on multi-network installs.
Default: 1

Return Values

(int) 

Filters

  • 'domain_exists' called on return value:
    apply_filters( 'domain_exists', $result, $domain, $path, $site_id )

Change Log

  • Since: MU
  • 'domain_exists' filter added in 3.5

Source File

domain_exists() is located in wp-includes/ms-functions.php