apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id )
参数
  • (string) $url The complete home URL including scheme and path.
    Required:
  • (string) $path Path relative to the home URL. Blank string if no path is specified.
    Required:
  • (string|null) $orig_scheme Scheme to give the home URL context. Accepts 'http', 'https', 'relative', 'rest', or null.
    Required:
  • (int|null) $blog_id Site ID, or null for the current site.
    Required:
定义位置
相关勾子
comment_urlnetwork_home_urlsite_urlrest_urlcontent_url
相关方法
home_urlget_home_urlnetwork_home_urlesc_urlsite_urlcontent_url
引入
3.0.0
弃用
-

home_url – 这个函数用来检索WordPress网站主页的URL。它以字符串形式返回URL,并且可以使用home_url过滤器进行过滤。

过滤主URL。

return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id );

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-06 14:33:20

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: