Index: /trunk/xpressme_integration_kit/include/add_xpress_process.php
===================================================================
--- /trunk/xpressme_integration_kit/include/add_xpress_process.php	(revision 453)
+++ /trunk/xpressme_integration_kit/include/add_xpress_process.php	(revision 454)
@@ -5,4 +5,28 @@
 	if (is_object($wptouch_plugin)) return $wptouch_plugin->applemobile;
 	return false;
+}
+
+function safe_site_url(){
+	global $xoops_config;
+	
+	if (is_xpress_index_page_call()){
+		$siteurl = get_option('siteurl');
+		$home = get_option('home');
+		$module_url = $xoops_config->module_url;
+		$guess_url = wp_guess_url();
+		$guess_url = preg_replace('/\/$/','',$guess_url);
+		
+		if($siteurl != $module_url) {
+			if (!@fclose(@fopen($siteurl . '/xoops_version.php', "r"))){
+				update_option('siteurl' , $module_url);
+			}
+		}
+		
+		if($guess_url != $home) {
+			if (!@fclose(@fopen($home . '/xoops_version.php', "r"))){
+				update_option('home' , $guess_url);
+			}
+		}
+	}
 }
 
@@ -16,4 +40,7 @@
 	unset($offset);
 	require_once(ABSPATH.'wp-settings.php');
+	
+	safe_site_url();
+
 	if (!is_object($xoopsUser)){	// before login auth cookie clear
 		wp_logout();
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp_old.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp_old.php	(revision 453)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp_old.php	(revision 454)
@@ -190,4 +190,27 @@
 
 endif;	// Under WP2.5
+
+// Under WP2.7
+if (version_compare($xoops_config->wp_version,'2.6', '<')) :
+	/**
+	 * Guess the URL for the site.
+	 *
+	 * Will remove wp-admin links to retrieve only return URLs not in the wp-admin
+	 * directory.
+	 *
+	 * @since 2.6.0
+	 *
+	 * @return string
+	 */
+	function wp_guess_url() {
+	if ( defined('WP_SITEURL') && '' != WP_SITEURL ) {
+		$url = WP_SITEURL;
+	} else {
+		$schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
+		$url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
+	}
+	return $url;
+}
+endif;	// Under WP2.6
 
 // Under WP2.7
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 453)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 454)
@@ -357,12 +357,4 @@
 }
 
-function safe_site_url_filter($site_url){
-	global $xoops_config;
-	if (!$xoops_config->is_wpmu){
-		if ($site_url != get_xpress_url()) $site_url = get_xpress_url();
-	}
-	return $site_url;
-}
-
 function get_block_file_path($mydirname,$file_name)
 {
Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 453)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 454)
@@ -71,9 +71,4 @@
 }
 add_action("wp_meta" , "wp_meta_add_xpress_menu");			// add xpress menu  in wp_meta
-	
-//Site URL check
-add_filter('option_home',			"safe_site_url_filter");
-add_filter('option_siteurl',		"safe_site_url_filter");
-	
 
 //XOOPS Bloack Cache Refresh
