wp_is_using_https(): bool

Checks whether the website is using HTTPS.


Description

This is based on whether both the home and site URL are using HTTPS.

Top ↑

See also


Top ↑

Return

bool True if using HTTPS, false otherwise.


Top ↑

Source

File: wp-includes/https-detection.php. View all references

function wp_is_using_https() {
	if ( ! wp_is_home_url_using_https() ) {
		return false;
	}

	return wp_is_site_url_using_https();
}


Top ↑

Changelog

Changelog
Version Description
5.7.0 Introduced.

Top ↑

User Contributed Notes

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