domain_exists хук-фильтр . WP 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.
Использование
add_filter( 'domain_exists', 'filter_function_name_1982', 10, 4 ); function filter_function_name_1982( $result, $domain, $path, $network_id ){ // filter... return $result; }
- $result(число/null)
- The site ID if the site name exists, null otherwise.
- $domain(строка)
- Domain to be checked.
- $path(строка)
- Path to be checked.
- $network_id(число)
- Network ID. Relevant only on multi-network installations.
Список изменений
С версии 3.5.0 | Введена. |
Где вызывается хук
domain_exists
wp-includes/ms-functions.php 1574
return apply_filters( 'domain_exists', $result, $domain, $path, $network_id );