WordPress.org

Make WordPress Core

Ticket #4211: wp-admin_upgrade-functions.php.diff

File wp-admin_upgrade-functions.php.diff, 716 bytes (added by filosofo, 15 years ago)
  • wp-admin/upgrade-functions.php

     
    672672function __get_option($setting) {
    673673        global $wpdb;
    674674
     675        // use home and siteurl if defined as constants
     676        if ( 'home' == $setting && defined('WP_HOME') )
     677                return preg_replace('|/+$|', '', WP_HOME);
     678
     679        if ( 'siteurl' == $setting && defined('WP_SITEURL') )
     680                return preg_replace('|/+$|', '', WP_SITEURL);
     681
    675682        $option = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'");
    676683
    677684        if ( 'home' == $setting && '' == $option )
     
    11251132        }
    11261133}