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
棄用
-

wp_is_home_url_using_https: 這個函式用來檢查WordPress站點的主頁URL是否使用HTTPS。如果主頁的URL使用了HTTPS,則返回true,否則返回false。

檢查當前網站的URL是否使用HTTPS。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_is_home_url_using_https() {
return 'https' === wp_parse_url( home_url(), PHP_URL_SCHEME );
}
function wp_is_home_url_using_https() { return 'https' === wp_parse_url( home_url(), PHP_URL_SCHEME ); }
function wp_is_home_url_using_https() {
	return 'https' === wp_parse_url( home_url(), PHP_URL_SCHEME );
}

常見問題

FAQs
檢視更多 >