mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-02 09:07:59 +02:00
is_ssl() improvements. Props johnbillion. fixes #8641 for 2.7
git-svn-id: http://svn.automattic.com/wordpress/branches/2.7@10218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6d524de74d
commit
a659936a4f
@ -2804,7 +2804,15 @@ function validate_file( $file, $allowed_files = '' ) {
|
||||
* @return bool True if SSL, false if not used.
|
||||
*/
|
||||
function is_ssl() {
|
||||
return ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user