Query: Eliminate unnecessary `wp_list_filter()` call in `get_queried_object()`.

The refactor in [30711] swapped out the old `queries` property for the
new `queried_terms`, but should also have gotten rid of the now-
superfluous `wp_list_filter()` call.

Fixes #37962.

git-svn-id: https://develop.svn.wordpress.org/trunk@38586 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges 2016-09-09 19:48:26 +00:00
parent 6adcd15435
commit 37e983416b
1 changed files with 3 additions and 5 deletions

View File

@ -3257,12 +3257,10 @@ class WP_Query {
}
} else {
// For other tax queries, grab the first term from the first clause.
$tax_query_in_and = wp_list_filter( $this->tax_query->queried_terms, array( 'operator' => 'NOT IN' ), 'NOT' );
if ( ! empty( $tax_query_in_and ) ) {
$queried_taxonomies = array_keys( $tax_query_in_and );
if ( ! empty( $this->tax_query->queried_terms ) ) {
$queried_taxonomies = array_keys( $this->tax_query->queried_terms );
$matched_taxonomy = reset( $queried_taxonomies );
$query = $tax_query_in_and[ $matched_taxonomy ];
$query = $this->tax_query->queried_terms[ $matched_taxonomy ];
if ( ! empty( $query['terms'] ) ) {
if ( 'term_id' == $query['field'] ) {