Checks whether the current site URL is using HTTPS.
Description
See also
Source
function wp_is_home_url_using_https() {
return 'https' === wp_parse_url( home_url(), PHP_URL_SCHEME );
}
Changelog
Version | Description |
---|---|
5.7.0 | Introduced. |
CARVIEW |
Checks whether the current site URL is using HTTPS.
function wp_is_home_url_using_https() {
return 'https' === wp_parse_url( home_url(), PHP_URL_SCHEME );
}
Uses | Description |
---|---|
wp_parse_url()wp-includes/http.php | A wrapper for PHP’s parse_url() function that handles consistency in the return values across PHP versions. |
home_url()wp-includes/link-template.php | Retrieves the URL for the current site where the front end is accessible. |
Used by | Description |
---|---|
wp_is_using_https()wp-includes/https-detection.php | Checks whether the website is using HTTPS. |
Version | Description |
---|---|
5.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.