From 567bc9d3f1d37c65ffd3f55e1740856f603fdedf Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 20 Aug 2007 22:55:43 +0000 Subject: [PATCH] wp_reset_query() from mdawaffe. fixes #4741 git-svn-id: http://svn.automattic.com/wordpress/trunk@5907 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/query.php b/wp-includes/query.php index e76472f45..cea523f5f 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -22,6 +22,11 @@ function &query_posts($query) { return $GLOBALS['wp_query']->query($query); } +function wp_reset_query() { + unset($GLOBALS['wp_query']); + $GLOBALS['wp_query'] =& $GLOBALS['wp_the_query']; +} + /* * Query type checks. */