On this page
get_network_by_path( string $domain, string $path, int|null $segments = null ): WP_Network|false
Retrieves the closest matching network for a domain and path.
Parameters
$domainstring Required-
Domain to check.
$pathstring Required-
Path to check.
$segmentsint|null Optional-
Path segments to use. Defaults to null, or the full path.
Default:
null
Return
WP_Network|false Network object if successful. False when no network is found.
Source
File: wp-includes/ms-load.php. View all references
function get_network_by_path( $domain, $path, $segments = null ) {
return WP_Network::get_by_path( $domain, $path, $segments );
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Network::get_by_path() wp-includes/class-wp-network.php | Retrieves the closest matching network for a domain and path. |
Changelog
| Version | Description |
|---|---|
| 3.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_network_by_path