From a79d48ea1c02b8893f35dc4e1149ab37209849ad Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 20 Aug 2007 22:55:43 +0000 Subject: [PATCH] wp_reset_query() from mdawaffe. fixes #4741 git-svn-id: https://develop.svn.wordpress.org/trunk@5907 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/query.php b/wp-includes/query.php index e76472f45d..cea523f5f0 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. */