Use is_ssl() in place of manual SERVER['HTTPS'] == 'on' checks. fixes #11885

git-svn-id: https://develop.svn.wordpress.org/trunk@13427 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-02-26 06:21:47 +00:00
parent 9a033bf679
commit e7fa18385a
4 changed files with 4 additions and 7 deletions

View File

@@ -3337,7 +3337,7 @@ function wp_guess_url() {
if ( defined('WP_SITEURL') && '' != WP_SITEURL ) {
$url = WP_SITEURL;
} else {
$schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
$schema = is_ssl() ? 'https://' : 'http://';
$url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
}
return $url;