is_ssl() – Determines if SSL is used.

You appear to be a bot. Output may be restricted

Description

Determines if SSL is used.

Usage

$bool = is_ssl();

Parameters

Returns

bool True if SSL, otherwise false.

Source

File name: wordpress/wp-includes/load.php
Lines:

1 to 14 of 14
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;
}
 

 View on GitHub View on Trac