Make WordPress Core


Ignore:
Timestamp:
05/05/2007 12:17:05 AM (17 years ago)
Author:
rob1n
Message:

Use WP_HOME and WP_SITEURL in upgrading. Props filosofo. fixes #4211

File:
1 edited

Legend:

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

    r5345 r5394  
    660660function __get_option($setting) {
    661661    global $wpdb;
    662 
     662   
     663    if ( $setting == 'home' && defined( 'WP_HOME' ) ) {
     664        return preg_replace( '|/+$|', '', constant( 'WP_HOME' ) );
     665    }
     666   
     667    if ( $setting == 'siteurl' && defined( 'WP_SITEURL' ) ) {
     668        return preg_replace( '|/+$|', '', constant( 'WP_SITEURL' ) );
     669    }
     670   
    663671    $option = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'");
    664672
Note: See TracChangeset for help on using the changeset viewer.