is_ssl
Determines if SSL is used.
Description
is_ssl();
Usage
if ( !function_exists( 'is_ssl' ) ) { require_once ABSPATH . WPINC . '/load.php'; } // NOTICE! Understand what this does before running. $result = is_ssl();
Defined (1)
The function is defined in the following location(s).
- /wp-includes/load.php
- function is_ssl() {
- if ( isset( $_SERVER['HTTPS'] ) ) {
- if ( 'on' == strtolower( $_SERVER['HTTPS'] ) ) {
- return true;
- }
- if ( '1' == $_SERVER['HTTPS'] ) {
- return true;
- }
- } elseif ( isset($_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
- return true;
- }
- return false;
- }