函数原型
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.
是否弃用
未弃用
函数参数
-
$domain
string
Required - Domain to check.
-
$path
string
Required - Path to check.
-
$segments
int|null
Optional - Path segments to use. Defaults to null, or the full path.
Default:
null
函数返回值
WP_Network|false Network object if successful. False when no network is found.
函数位置
File: wp-includes/ms-load.php.
函数源码
function get_network_by_path( $domain, $path, $segments = null ) {
return WP_Network::get_by_path( $domain, $path, $segments );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.9.0 | Introduced. |

