Make WordPress Core


Ignore:
Timestamp:
03/23/2007 05:45:40 PM (19 years ago)
Author:
ryan
Message:

Allow siteurl and home to be defined as constants in wp-config, bypassing the DB. Props filosofo and charleshooper. fixes #4003

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upgrade-functions.php

    r4990 r5093  
    2222    update_option('blog_public', $public);
    2323    $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
    24     $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
     24
     25    if ( defined('WP_SITEURL') && '' != WP_SITEURL )
     26        $guessurl = WP_SITEURL;
     27    else
     28        $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
     29
    2530    update_option('siteurl', $guessurl);
    2631
Note: See TracChangeset for help on using the changeset viewer.