wp_is_using_https() WordPress Function
The wp_is_using_https() function can be used to check if a WordPress site is using an HTTPS connection. This is useful for ensuring that sensitive data is transmitted securely.
wp_is_using_https() #
Checks whether the website is using HTTPS.
Description
This is based on whether both the home and site URL are using HTTPS.
See also
Return
(bool) True if using HTTPS, false otherwise.
Source
File: wp-includes/https-detection.php
function wp_is_using_https() { if ( ! wp_is_home_url_using_https() ) { return false; } return wp_is_site_url_using_https(); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.7.0 | Introduced. |