wp_is_home_url_using_https()WP 5.7.0

Checks whether the current site URL is using HTTPS.

No Hooks.

Return

true|false. True if using HTTPS, false otherwise.

Usage

wp_is_home_url_using_https();

Notes

Changelog

Since 5.7.0 Introduced.

wp_is_home_url_using_https() code WP 6.5.2

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