Make WordPress Core

Ticket #8641: 8641.diff

File 8641.diff, 678 bytes (added by johnbillion, 16 years ago)

Improvements to is_ssl()

  • wp-includes/functions.php

     
    28042804 * @return bool True if SSL, false if not used.
    28052805 */
    28062806function is_ssl() {
    2807         return ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;
     2807        if ( isset($_SERVER['HTTPS']) ) {
     2808                if ( 'on' == strtolower($_SERVER['HTTPS']) )
     2809                        return true;
     2810                if ( '1' == $_SERVER['HTTPS'] )
     2811                        return true;
     2812        } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
     2813                return true;
     2814        }
     2815        return false;
    28082816}
    28092817
    28102818/**