*** functions.php Wed Jun 8 17:01:59 2011 --- functions.php Wed Jun 8 17:04:25 2011 *************** *** 1391,1402 **** $ret = ''; if ( is_array( func_get_arg(0) ) ) { if ( @func_num_args() < 2 || false === @func_get_arg( 1 ) ) ! $uri = $_SERVER['REQUEST_URI']; else $uri = @func_get_arg( 1 ); } else { if ( @func_num_args() < 3 || false === @func_get_arg( 2 ) ) ! $uri = $_SERVER['REQUEST_URI']; else $uri = @func_get_arg( 2 ); } --- 1391,1408 ---- $ret = ''; if ( is_array( func_get_arg(0) ) ) { if ( @func_num_args() < 2 || false === @func_get_arg( 1 ) ) ! if ( get_bloginfo('url') != '' ) ! $uri = get_bloginfo('url') . $_SERVER['REQUEST_URI']; ! else ! $uri = $_SERVER['REQUEST_URI']; else $uri = @func_get_arg( 1 ); } else { if ( @func_num_args() < 3 || false === @func_get_arg( 2 ) ) ! if ( get_bloginfo('url') != '' ) ! $uri = get_bloginfo('url') . $_SERVER['REQUEST_URI']; ! else ! $uri = $_SERVER['REQUEST_URI']; else $uri = @func_get_arg( 2 ); } *************** *** 1444,1454 **** --- 1450,1463 ---- unset( $qs[$k] ); } + $homeurl = str_replace(( is_ssl() ? 'https://' : 'http://' ), '', get_bloginfo('url')); + $ret = build_query( $qs ); $ret = trim( $ret, '?' ); $ret = preg_replace( '#=(&|$)#', '$1', $ret ); $ret = $protocol . $base . $ret . $frag; $ret = rtrim( $ret, '?' ); + $ret = str_replace($_SERVER['HTTP_HOST'], $homeurl, $ret); return $ret; }