`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
This commit is contained in:
Boone Gorges 2016-02-06 03:58:27 +00:00
parent 3a2ef071d4
commit f1c0ed714a
2 changed files with 4 additions and 1 deletions

View File

@ -2857,6 +2857,9 @@ class WP_Query {
} else { } else {
$q['term_id'] = $queried_items['terms'][0]; $q['term_id'] = $queried_items['terms'][0];
} }
// Take the first one we find.
break;
} }
} }
} }

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.