mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@37677 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4052,25 +4052,6 @@ function validate_file( $file, $allowed_files = '' ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if SSL is used.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* @return bool True if SSL, false if not used.
|
||||
*/
|
||||
function is_ssl() {
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether to force SSL used for the Administration Screens.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user