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。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id );
return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id );
return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id );

常見問題

FAQs
檢視更多 >