Make WordPress Core

Ticket #35844: 35844.1.patch

File 35844.1.patch, 1.4 KB (added by johnjamesjacoby, 10 years ago)

Relocate is_ssl() with added @since note

  • src/wp-includes/functions.php

    diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
    index 3e9b792..89ecb38 100644
    a b  
    39463946}
    39473947
    39483948/**
    3949  * Determine if SSL is used.
    3950  *
    3951  * @since 2.6.0
    3952  *
    3953  * @return bool True if SSL, false if not used.
    3954  */
    3955 function is_ssl() {
    3956         if ( isset($_SERVER['HTTPS']) ) {
    3957                 if ( 'on' == strtolower($_SERVER['HTTPS']) )
    3958                         return true;
    3959                 if ( '1' == $_SERVER['HTTPS'] )
    3960                         return true;
    3961         } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
    3962                 return true;
    3963         }
    3964         return false;
    3965 }
    3966 
    3967 /**
    39683949 * Whether to force SSL used for the Administration Screens.
    39693950 *
    39703951 * @since 2.6.0
  • src/wp-includes/load.php

    diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php
    index 44b4ed2..7779d9c 100644
    a b  
    894894
    895895        return (bool) $installing;
    896896}
     897
     898/**
     899 * Determine if SSL is used.
     900 *
     901 * @since 2.6.0
     902 * @since 4.5.0 Moved from functions.php to load.php
     903 *
     904 * @return bool True if SSL, false if not used.
     905 */
     906function is_ssl() {
     907        if ( isset($_SERVER['HTTPS']) ) {
     908                if ( 'on' == strtolower($_SERVER['HTTPS']) )
     909                        return true;
     910                if ( '1' == $_SERVER['HTTPS'] )
     911                        return true;
     912        } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
     913                return true;
     914        }
     915        return false;
     916}