wp_is_using_https

The timeline below displays how wordpress function wp_is_using_https has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.7

/**
 * HTTPS detection functions.
 *
 * @package WordPress
 * @since 5.7.0
 */
/**
 * Checks whether the website is using HTTPS.
 *
 * This is based on whether both the home and site URL are using HTTPS.
 *
 * @since 5.7.0
 * @see wp_is_home_url_using_https()
 * @see wp_is_site_url_using_https()
 *
 * @return bool True if using HTTPS, false otherwise.
 */
function wp_is_using_https()
{
    if (!wp_is_home_url_using_https()) {
        return false;
    }
    return wp_is_site_url_using_https();
}