get_blog_id_from_url
get_blog_id_from_url ( $domain, $path = '/' )
Parameters:- (string) domain Website domain.
- (string) path Optional. Not required for subdomain installations. Default '/'.
Returns:- (int) 0 if no blog found, otherwise the ID of the matching blog.
Defined at:Change Log: - Introduced in WordPress: —
- Deprecated in WordPress: —
Description
Gets a blog's numeric ID from its URL.On a subdirectory installation like example.com/blog1/,
$domain will be the root 'example.com' and $path the
subdirectory '/blog1/'. With subdomains like blog1.example.com,
$domain is 'blog1.example.com' and $path is '/'.