From 68e836af4896e1ddd277596aff3d9b436cfa623d Mon Sep 17 00:00:00 2001 From: azaozz Date: Sat, 4 Apr 2009 10:48:22 +0000 Subject: [PATCH] Set the taxonomy/term when using a custom ?tax_slug=term_slug query, props DD32, fixes #9453 git-svn-id: http://svn.automattic.com/wordpress/trunk@10866 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 7bb6448b6e..96013ad42c 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1398,8 +1398,10 @@ class WP_Query { if ( empty($qv['taxonomy']) || empty($qv['term']) ) { $this->is_tax = false; - foreach ( $GLOBALS['wp_taxonomies'] as $t ) { + foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) { if ( isset($t->query_var) && isset($qv[$t->query_var]) && '' != $qv[$t->query_var] ) { + $qv['taxonomy'] = $taxonomy; + $qv['term'] = $qv[$t->query_var]; $this->is_tax = true; break; }