Skip to content

Instantly share code, notes, and snippets.

@duritong
Created December 15, 2011 13:56
Show Gist options
  • Save duritong/1481164 to your computer and use it in GitHub Desktop.
Save duritong/1481164 to your computer and use it in GitHub Desktop.
fix wordpress feeds https detection
diff --git a/wp-includes/feed.php b/wp-includes/feed.php
index 34d8652..ad78b56 100644
--- a/wp-includes/feed.php
+++ b/wp-includes/feed.php
@@ -490,7 +490,7 @@ function self_link() {
$host = $host['host'];
echo esc_url(
'http'
- . ( (isset($_SERVER['https']) && $_SERVER['https'] == 'on') ? 's' : '' ) . '://'
+ . ( (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '' ) . '://'
. $host
. stripslashes($_SERVER['REQUEST_URI'])
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment