Eliminate unnecessary variable in `WP_Term_Query`.
Props ocean90. Fixes #37544. git-svn-id: https://develop.svn.wordpress.org/trunk@38377 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d227752665
commit
f21f8c1076
|
@ -604,8 +604,6 @@ class WP_Term_Query {
|
||||||
|
|
||||||
$where = implode( ' AND ', $this->sql_clauses['where'] );
|
$where = implode( ' AND ', $this->sql_clauses['where'] );
|
||||||
|
|
||||||
$pieces = array( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the terms query SQL clauses.
|
* Filters the terms query SQL clauses.
|
||||||
*
|
*
|
||||||
|
@ -615,7 +613,7 @@ class WP_Term_Query {
|
||||||
* @param array $taxonomies An array of taxonomies.
|
* @param array $taxonomies An array of taxonomies.
|
||||||
* @param array $args An array of terms query arguments.
|
* @param array $args An array of terms query arguments.
|
||||||
*/
|
*/
|
||||||
$clauses = apply_filters( 'terms_clauses', compact( $pieces ), $taxonomies, $args );
|
$clauses = apply_filters( 'terms_clauses', compact( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' ), $taxonomies, $args );
|
||||||
|
|
||||||
$fields = isset( $clauses[ 'fields' ] ) ? $clauses[ 'fields' ] : '';
|
$fields = isset( $clauses[ 'fields' ] ) ? $clauses[ 'fields' ] : '';
|
||||||
$join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : '';
|
$join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : '';
|
||||||
|
|
Loading…
Reference in New Issue