domain_exists filter-hookWP 3.5.0

Filters whether a site name is taken.

The name is the site's subdomain or the site's subdirectory path depending on the network settings.

Usage

add_filter( 'domain_exists', 'wp_kama_domain_exists_filter', 10, 4 );

/**
 * Function for `domain_exists` filter-hook.
 * 
 * @param int|null $result     The site ID if the site name exists, null otherwise.
 * @param string   $domain     Domain to be checked.
 * @param string   $path       Path to be checked.
 * @param int      $network_id Network ID. Only relevant on multi-network installations.
 *
 * @return int|null
 */
function wp_kama_domain_exists_filter( $result, $domain, $path, $network_id ){

	// filter...
	return $result;
}
$result(int|null)
The site ID if the site name exists, null otherwise.
$domain(string)
Domain to be checked.
$path(string)
Path to be checked.
$network_id(int)
Network ID. Only relevant on multi-network installations.

Changelog

Since 3.5.0 Introduced.

Where the hook is called

domain_exists()
domain_exists
wp-includes/ms-functions.php 1578
return apply_filters( 'domain_exists', $result, $domain, $path, $network_id );

Where the hook is used in WordPress

Usage not found.