domain_exists WordPress Filter Hook

The domain_exists hook is used to check if a given domain is already registered. If the domain is not registered, the hook will return false.

apply_filters( 'domain_exists', int|null $result, string $domain, string $path, int $network_id ) #

Filters whether a site name is taken.


Description

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


Top ↑

Parameters

$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. Relevant only on multi-network installations.


Top ↑

Source

File: wp-includes/ms-functions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More