Use WP_HOME and WP_SITEURL in upgrading. Props filosofo. fixes #4211
git-svn-id: http://svn.automattic.com/wordpress/trunk@5394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8638b7ab3a
commit
69f36791f1
|
@ -672,6 +672,14 @@ function get_alloptions_110() {
|
|||
function __get_option($setting) {
|
||||
global $wpdb;
|
||||
|
||||
if ( $setting == 'home' && defined( 'WP_HOME' ) ) {
|
||||
return preg_replace( '|/+$|', '', constant( 'WP_HOME' ) );
|
||||
}
|
||||
|
||||
if ( $setting == 'siteurl' && defined( 'WP_SITEURL' ) ) {
|
||||
return preg_replace( '|/+$|', '', constant( 'WP_SITEURL' ) );
|
||||
}
|
||||
|
||||
$option = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'");
|
||||
|
||||
if ( 'home' == $setting && '' == $option )
|
||||
|
|
Loading…
Reference in New Issue