Definition:
function domain_exists($domain, $path, $site_id = 1) {}
Check whether a blogname is already taken.
Used during the new site registration process to ensure that each blogname is unique.
Parameters
- string $domain: The domain to be checked.
- string $path: The path to be checked.
- int $site_id: Optional. Relevant only on multi-network installs.
Source code
function domain_exists($domain, $path, $site_id = 1) { global $wpdb; return $wpdb->get_var( $wpdb->prepare("SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s AND site_id = %d", $domain, $path, $site_id) ); }
938
No comments yet... Be the first to leave a reply!