wp_is_home_url_using_https

函数
wp_is_home_url_using_https ( No parameters )
返回值
  • (bool) True if using HTTPS, false otherwise.
相关
  • home_url()
定义位置
相关方法
wp_is_site_url_using_httpswp_is_using_httpswp_update_urls_to_httpswp_set_link_catswp_list_comments
引入
5.7.0
弃用
-

Checks whether the current site URL is using HTTPS.

function wp_is_home_url_using_https() {
	return 'https' === wp_parse_url( home_url(), PHP_URL_SCHEME );
}