get_network_by_path()
Retrieves the closest matching network for a domain and path.
{@internal In 4.4.0, converted to a wrapper for WP_Network::get_by_path()}
No Hooks.
Returns
WP_Network|false. Network object if successful. False when no network is found.
Usage
get_network_by_path( $domain, $path, $segments );
- $domain(string) (required)
- Domain to check.
- $path(string) (required)
- Path to check.
- $segments(int|null)
- Path segments to use.
Default:null, or the full path
Changelog
| Since 3.9.0 | Introduced. |
get_network_by_path() get network by path code WP 6.9.1
function get_network_by_path( $domain, $path, $segments = null ) {
return WP_Network::get_by_path( $domain, $path, $segments );
}