get_network_by_path

函式
get_network_by_path ( $domain, $path, $segments = null )
引數
  • (string) $domain Domain to check.
    Required:
  • (string) $path Path to check.
    Required:
  • (int|null) $segments Path segments to use. Defaults to null, or the full path.
    Required:
    Default: null
返回值
  • (WP_Network|false) Network object if successful. False when no network is found.
定義位置
相關方法
get_category_by_pathget_network_optionget_site_by_pathget_page_by_pathget_network
引入
3.9.0
棄用
-

get_network_by_path函式是用來通過網路路徑檢索網路物件的。網路路徑是網路所安裝的子目錄: 這個函式通常用於多站點安裝,以檢索與特定子目錄相關的網路物件。

為一個域和路徑檢索最接近的匹配網路。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function get_network_by_path( $domain, $path, $segments = null ) {
return WP_Network::get_by_path( $domain, $path, $segments );
}
function get_network_by_path( $domain, $path, $segments = null ) { return WP_Network::get_by_path( $domain, $path, $segments ); }
function get_network_by_path( $domain, $path, $segments = null ) {
	return WP_Network::get_by_path( $domain, $path, $segments );
}

常見問題

FAQs
檢視更多 >