home_url
apply_filters( ‘home_url’, string $url , string $path , string|null $orig_scheme , int|null $blog_id )
过滤器::过滤主URL。
Filter Hook: Filters the home URL.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$url | (string) | 完整的主URL,包括scheme和path。 |
$path | (string) | 相对于主URL的路径。如果未指定路径,则为空字符串。 |
$orig_scheme | (string | null) | 提供主URL上下文的方案。接受“http”、“https”、“relative”、“rest”或null。 |
$blog_id | (int | null) | 站点ID,或当前站点为空。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.0.0 | wp-includes/link-template.php:3210 | 1 | 0 |
home_url 为WP2原创文章,链接:https://www.wp2.cn/hook/home_url-2/