get_network_by_path() - WordPress 函数参考中文文档

返回介绍

get_network_by_path()

发布于 2017-09-10 字数1389 浏览 965 评论 0

get_network_by_path( string $domain,  string $path,  int|null $segments = null )

Retrieve 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 value: 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 描述
3.9.0 Introduced.

相关函数

Uses

  • wp-includes/class-wp-network.php:
    WP_Network::get_by_path()

User Contributed Notes

上一篇:get_networks()

下一篇:get_network_option()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!