Core Function
View Source on Trac ↗ get_site_by_path()
get_site_by_path( mixed $domain, mixed $path, mixed $segments = null ) Retrieves the closest matching site object by its domain and path.
Parameters 3 required
| Name / Type | Description |
|---|---|
| $domain string | Domain to check. Required |
| $path string | Path to check. Required |
| (int | | null) $segments Path segments to use. Defaults to null, or the full path. Required |
Return Value
((WP_Site)
| false) Site object if successful. False when no site is found.
Function Information
Since Version
3.9.0
Source File
wp-includes/ms-load.php
Advertisement