On this page
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
File: wp-includes/https-detection.php. View all references
function wp_is_home_url_using_https() {
return 'https' === wp_parse_url( home_url(), PHP_URL_SCHEME );
}
Related
Uses
| 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
| Used By | Description |
|---|---|
| wp_is_using_https() wp-includes/https-detection.php | Checks whether the website is using HTTPS. |
Changelog
| Version | Description |
|---|---|
| 5.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_is_home_url_using_https