This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Wordpress HTTPS 2.0-dev Patch for Non-Standard Ports

By: doingweb on Sep 11th, 2011  |  syntax: Diff  |  size: 1.04 KB  |  views: 57  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. --- wordpress-https-2.0-dev.php 2011-09-10 17:52:25.000000000 -0700
  2. +++ wordpress-https.php 2011-09-11 01:16:39.000000000 -0700
  3. @@ -503,8 +502,8 @@
  4.                  */
  5.                 public function process($buffer) {
  6.                         if ( $this->is_ssl() ) {
  7. -                               // Fix any occurrence of the HTTPS version of the regular domain when using different SSL Host
  8. -                               if ( $this->diff_host ) {
  9. +                               // Fix any occurrence of the HTTPS version of the regular domain when using different SSL Host or a non-standard port
  10. +                               if ( $this->diff_host || $this->ssl_port ) {
  11.                                         $regex_url = preg_quote($this->replace_http($this->http_url));
  12.                                         // Escape forward slashes
  13.                                         $regex_url = str_replace('/', '\/', $regex_url);
  14. @@ -515,7 +514,7 @@
  15.                                         for ($i = 0; $i<=sizeof($matches[0]); $i++) {
  16.                                                 $html = $matches[0][$i];
  17.                                                 $url = $matches[1][$i];
  18. -                                               $buffer = str_replace($html, str_replace($url, $this->replace_https_url($url), $html), $buffer);
  19. +                                               $buffer = str_replace($html, str_replace($url, $this->replace_http_url($url), $html), $buffer);
  20.                                         }
  21.                                 }
clone this paste RAW Paste Data