wp_is_home_url_using_https()WP 5.7.0

Checks whether the current site URL is using HTTPS.

No Hooks.

Returns

bool. True if using HTTPS, false otherwise.

Usage

wp_is_home_url_using_https();

Notes

See: home_url()

Changelog

Since 5.7.0 Introduced.

wp_is_home_url_using_https() code WP 7.1

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