From 0c8ab6757b57b3d8cd156f59bf162ffdb823a3d1 Mon Sep 17 00:00:00 2001 From: donncha Date: Wed, 3 Oct 2007 09:54:57 +0000 Subject: Added wp_reset_query() git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1058 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/query.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'wp-includes/query.php') diff --git a/wp-includes/query.php b/wp-includes/query.php index a079211..45b6316 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. */ -- cgit