From fe9c7468098b2dfbaf633fc6a1f428d6406a47ee Mon Sep 17 00:00:00 2001 From: scribu Date: Tue, 19 Oct 2010 14:41:30 +0000 Subject: [PATCH] Re-add the ability to filter by 'taxonomy' and 'term' query vars. Fixes #13582. See #12891 git-svn-id: http://svn.automattic.com/wordpress/trunk@15850 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wp-includes/query.php b/wp-includes/query.php index db2441122b..79c4038e5b 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1449,6 +1449,13 @@ class WP_Query extends WP_Object_Query { $tax_query = array(); } + if ( !empty($q['taxonomy']) && !empty($q['term']) ) { + $tax_query[] = array( + 'taxonomy' => $q['taxonomy'], + 'terms' => $q['term'], + ); + } + foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) { if ( $t->query_var && !empty( $q[$t->query_var] ) ) { $tax_query_defaults = array(