From a6076f70836984bb3190c3ad6c20cf191b2f6776 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 12 Oct 2007 21:47:34 +0000 Subject: [PATCH] Fix category assigment during link import. fixes #5107 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@6233 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index a575904e9f..610969689b 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -736,8 +736,11 @@ function wp_remote_fopen( $uri ) { function wp( $query_vars = '' ) { - global $wp; + global $wp, $wp_query, $wp_the_query; $wp->main( $query_vars ); + + if( !isset($wp_the_query) ) + $wp_the_query = $wp_query; }