diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php
index a4dab0306e..9e36431961 100644
--- a/wp-admin/options-general.php
+++ b/wp-admin/options-general.php
@@ -25,11 +25,11 @@ include('./admin-header.php');
|
- |
+" /> |
|
- to be different than the directory you installed WordPress in, enter that address here.'); ?> |
+" /> to be different than the directory you installed WordPress in, enter that address here.'); ?> |
|
diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php
index 065b722c17..168a7c3c2d 100644
--- a/wp-admin/upgrade-functions.php
+++ b/wp-admin/upgrade-functions.php
@@ -21,7 +21,12 @@ function wp_install($blog_title, $user_name, $user_email, $public, $meta='') {
update_option('admin_email', $user_email);
update_option('blog_public', $public);
$schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
- $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
+
+ if ( defined('WP_SITEURL') && '' != WP_SITEURL )
+ $guessurl = WP_SITEURL;
+ else
+ $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
+
update_option('siteurl', $guessurl);
// If not a public blog, don't ping.
diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php
index 31cac9cacb..cda3cc96d0 100644
--- a/wp-includes/default-filters.php
+++ b/wp-includes/default-filters.php
@@ -145,6 +145,8 @@ add_filter('the_author', 'ent2ncr', 8);
// Misc filters
add_filter('option_ping_sites', 'privacy_ping_filter');
add_filter('option_blog_charset', 'wp_specialchars');
+add_filter('option_home', '_config_wp_home');
+add_filter('option_siteurl', '_config_wp_siteurl');
add_filter('mce_plugins', '_mce_load_rtl_plugin');
add_filter('mce_buttons', '_mce_add_direction_buttons');
@@ -171,4 +173,4 @@ add_action('sanitize_comment_cookies', 'sanitize_comment_cookies');
add_action('admin_print_scripts', 'wp_print_scripts', 20);
add_action('mce_options', '_mce_set_direction');
add_action('init', 'smilies_init', 5);
-?>
\ No newline at end of file
+?>
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 6917958ff2..1b9ad20c24 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -993,7 +993,9 @@ function is_blog_installed() {
$wpdb->hide_errors();
$installed = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'");
$wpdb->show_errors();
- return $installed;
+
+ $install_status = !empty( $installed ) ? TRUE : FALSE;
+ return $install_status;
}
function wp_nonce_url($actionurl, $action = -1) {
@@ -1351,6 +1353,18 @@ function wp_die( $message, $title = '' ) {
die();
}
+function _config_wp_home($url = '') {
+ if ( defined( 'WP_HOME' ) )
+ return WP_HOME;
+ else return $url;
+}
+
+function _config_wp_siteurl($url = '') {
+ if ( defined( 'WP_SITEURL' ) )
+ return WP_SITEURL;
+ else return $url;
+}
+
function _mce_set_direction() {
global $wp_locale;
@@ -1443,4 +1457,4 @@ function smilies_init() {
}
}
-?>
\ No newline at end of file
+?>