Index: trunk/include/pluggable-override.php
===================================================================
--- trunk/include/pluggable-override.php	(revision 69)
+++ trunk/include/pluggable-override.php	(revision 70)
@@ -149,4 +149,26 @@
 }
 
+function wp_redirect($location, $status = 302) {
+	global $is_IIS;
+	
+	if ($location == 'wp-login.php?loggedout=true') $location = XOOPS_URL.'/user.php?op=logout'; //xoops logout at wp logout
+	if ($location == 'wp-login.php?action=register') $location = XOOPS_URL."/register.php";  //wp-register to xoops register
+
+	$location = apply_filters('wp_redirect', $location, $status);
+	$status = apply_filters('wp_redirect_status', $status, $location);
+
+	if ( !$location ) // allows the wp_redirect filter to cancel a redirect
+		return false;
+
+	$location = wp_sanitize_redirect($location);
+
+	if ( $is_IIS ) {
+		header("Refresh: 0;url=$location");
+	} else {
+		if ( php_sapi_name() != 'cgi-fcgi' )
+			status_header($status); // This causes problems on IIS and some FastCGI setups
+		header("Location: $location");
+	}
+}
 // ***********************************  End Of Pluggable Function Edit (wp-include/pluggable.php) ************************************
 
