wp_is_home_url_using_https(): bool

Checks whether the current site URL is using HTTPS.

Description

See also

Return

bool True if using HTTPS, false otherwise.

Source

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

Changelog

VersionDescription
5.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.