首页 WordPress函数大全 home_url()

home_url()

2020-05-02 / 2442阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

home_url( string $path = '', string|null $scheme = null )

Retrieves the URL for the current site where the front end is accessible.

描述

Returns the ‘home’ option with the appropriate protocol. The protocol will be ‘https’ if is_ssl() evaluates to true; otherwise, it will be the same as the ‘home’ option. If $scheme is ‘http’ or ‘https’, is_ssl() is overridden.

参数

$path

(string)
(Optional)
Path relative to the home URL.

Default value: ''

$scheme

(string|null)
(Optional)
Scheme to give the home URL context. Accepts 'http', 'https', 'relative', 'rest', or null.

Default value: null

返回

(string) Home URL link with optional path appended.

大家谈论
    我的见解