WordPress.org

Ready to get started?Download WordPress

Codex

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

Difference between revisions of "Function Reference/domain exists"

(Created page with "== 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…")
 
(Added domain_exists filter)
Line 21: Line 21:
 
{{Return||int|}}
 
{{Return||int|}}
   
== Change Log ==
+
== Filters ==
  +
* <b><tt>'domain_exists'</tt></b> called on return value:<br /><tt>apply_filters( 'domain_exists', $result, $domain, $path, $site_id )</tt>
   
Since: [[Version MU|MU]]
+
== Change Log ==
   
  +
* Since: [[Version MU|MU]]
  +
* <tt>'domain_exists'</tt> filter added in [[Version 3.5|3.5]]
 
== Source File ==
 
== Source File ==
   

Revision as of 18:50, 17 December 2012

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