network_site_url
云策文档标注
概述
network_site_url 是一个 WordPress 过滤器钩子,用于修改网络站点的 URL。它允许开发者自定义 URL 的生成方式,包括路径和协议。
关键要点
- 过滤器名称:network_site_url
- 参数:$url(完整 URL)、$path(相对路径)、$scheme(协议)
- 用途:在 network_site_url() 函数中调用,用于过滤网络站点 URL
- 引入版本:WordPress 3.0.0
原文内容
Filters the network site URL.
Parameters
$urlstring-
The complete network site URL including scheme and path.
$pathstring-
Path relative to the network site URL. Blank string if no path is specified.
$schemestring|null-
Scheme to give the URL context. Accepts
'http','https','relative'or null.
Source
return apply_filters( 'network_site_url', $url, $path, $scheme );
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |