Make WordPress Core


Ignore:
Timestamp:
06/10/2016 06:55:33 PM (8 years ago)
Author:
DrewAPicture
Message:

Boostrap: Move is_ssl() to wp-includes/load.php.

Moving to load.php introduces parity with other commonly evaluated is_*() functions such as is_admin() or is_multisite(). It also makes is_ssl() available much earlier in the loading process, such as for use in drop-ins like advanced-cache.php.

Props johnjamesjacoby.
Fixes #35844.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r37674 r37677  
    40544054
    40554055/**
    4056  * Determine if SSL is used.
    4057  *
    4058  * @since 2.6.0
    4059  *
    4060  * @return bool True if SSL, false if not used.
    4061  */
    4062 function is_ssl() {
    4063     if ( isset($_SERVER['HTTPS']) ) {
    4064         if ( 'on' == strtolower($_SERVER['HTTPS']) )
    4065             return true;
    4066         if ( '1' == $_SERVER['HTTPS'] )
    4067             return true;
    4068     } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
    4069         return true;
    4070     }
    4071     return false;
    4072 }
    4073 
    4074 /**
    40754056 * Whether to force SSL used for the Administration Screens.
    40764057 *
Note: See TracChangeset for help on using the changeset viewer.