WPDev.one
Core Function
View Source on Trac ↗

get_blog_id_from_url()

get_blog_id_from_url( mixed $domain, mixed $path = '/' )

Gets a blog's numeric ID from its URL.

Parameters 1 required

Name / Type Description
$domain
string

Website domain.

Required
$path
string

Optional. Not required for subdomain installations. Default '/'.

Return Value

(int)
0 if no blog found, otherwise the ID of the matching blog.

Function Information

Since Version
MU (3.0.0)
Source File
wp-includes/ms-functions.php
Advertisement