From f1c0ed714a76ce84a2a036d2aa63e04efd96583a Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sat, 6 Feb 2016 03:58:27 +0000 Subject: [PATCH] `WP_Query` taxonomy query vars should be set to first of multiple taxonomies. This provides better parity with `get_queried_object()`, which will return the first taxonomy/term matched by the current query. [29891] introduced the abnormal behavior for the 'taxonomy' and 'term' query vars. Props Chouby. Fixes #35619. Built from https://develop.svn.wordpress.org/trunk@36484 git-svn-id: http://core.svn.wordpress.org/trunk@36451 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 982b92e97a..ad407c1fdd 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2857,6 +2857,9 @@ class WP_Query { } else { $q['term_id'] = $queried_items['terms'][0]; } + + // Take the first one we find. + break; } } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 7f74ce07e5..08394b0dec 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36483'; +$wp_version = '4.5-alpha-36484'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.