Plugin Directory

Changeset 1273219


Ignore:
Timestamp:
10/26/2015 02:00:17 PM (10 years ago)
Author:
plankdesign
Message:

restored the http_host usage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-portability/trunk/wp-portability.php

    r1273209 r1273219  
    6262            $protocol = 'http://';
    6363        }
    64         $root = realpath($_SERVER['DOCUMENT_ROOT']);
    65         $path = str_replace("\\", "/", substr(ABSPATH, strlen($root)));
    66         $url = "{$protocol}{$root}{$path}";
     64
     65        $path = substr(ABSPATH, strlen(realpath($_SERVER['DOCUMENT_ROOT'])));
     66        $url = "{$protocol}{$_SERVER['HTTP_HOST']}{$path}";
    6767        if(!defined('WP_SITEURL') && $this->settings['dynamic_siteurl']){
    6868            define('WP_SITEURL', $url);
Note: See TracChangeset for help on using the changeset viewer.