is_ssl

Determines if SSL is used.

Description

is_ssl(); 

Usage

  1. if ( !function_exists( 'is_ssl' ) ) { 
  2. require_once ABSPATH . WPINC . '/load.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = is_ssl(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/load.php  
  1. function is_ssl() { 
  2. if ( isset( $_SERVER['HTTPS'] ) ) { 
  3. if ( 'on' == strtolower( $_SERVER['HTTPS'] ) ) { 
  4. return true; 
  5.  
  6. if ( '1' == $_SERVER['HTTPS'] ) { 
  7. return true; 
  8. } elseif ( isset($_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) { 
  9. return true; 
  10. return false;