Make WordPress Core


Ignore:
Timestamp:
06/24/2008 05:36:21 PM (15 years ago)
Author:
ryan
Message:

wp_guess_url() and install styling fixes from sambauers. fixes #7129 see #4732

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r8100 r8182  
    21272127}
    21282128
     2129function wp_guess_url() {
     2130    if ( defined('WP_SITEURL') && '' != WP_SITEURL ) {
     2131        $url = WP_SITEURL;
     2132    } else {
     2133        $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
     2134        $url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
     2135    }
     2136    return $url;
     2137}
     2138
    21292139?>
Note: See TracChangeset for help on using the changeset viewer.