WordPress.org

Make WordPress Core

Changeset 10217


Ignore:
Timestamp:
12/17/2008 05:58:07 PM (12 years ago)
Author:
ryan
Message:

is_ssl() improvements. Props johnbillion. fixes #8641 for trunk

File:
1 edited

Legend:

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

    r10150 r10217  
    20362036    $mimes = ( is_array( $mimes ) ) ? $mimes : apply_filters( 'upload_mimes', array(
    20372037        'jpg|jpeg|jpe' => 'image/jpeg',
     2038        'jpeg' => 'image/jpeg',
     2039        'jpe' => 'image/jpeg',
    20382040        'gif' => 'image/gif',
    20392041        'png' => 'image/png',
    20402042        'bmp' => 'image/bmp',
    2041         'tif|tiff' => 'image/tiff',
     2043        'tif' => 'image/tiff',
     2044        'tiff' => 'image/tiff',
    20422045        'ico' => 'image/x-icon',
    20432046        'asf|asx|wax|wmv|wmx' => 'video/asf',
     
    28052808 */
    28062809function is_ssl() {
    2807     return ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;
     2810    if ( isset($_SERVER['HTTPS']) ) {
     2811        if ( 'on' == strtolower($_SERVER['HTTPS']) )
     2812            return true;
     2813        if ( '1' == $_SERVER['HTTPS'] )
     2814            return true;
     2815    } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
     2816        return true;
     2817    }
     2818    return false;
    28082819}
    28092820
Note: See TracChangeset for help on using the changeset viewer.