mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-09 11:40:04 +00:00
Coding Standards: Restore the $pieces variable for SQL clauses in query classes.
This is a defensive coding measure that aims to reduce confusion. With this change, `$pieces` is explicitly used for the names, and `$clauses` for the values of the clauses. Follow-up to [52974], [53175], [53370], [53375]. Props peterwilsoncc. See #55699. git-svn-id: https://develop.svn.wordpress.org/trunk@53376 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -700,7 +700,7 @@ class WP_Term_Query {
|
||||
|
||||
$where = implode( ' AND ', $this->sql_clauses['where'] );
|
||||
|
||||
$clauses = array( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' );
|
||||
$pieces = array( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' );
|
||||
|
||||
/**
|
||||
* Filters the terms query SQL clauses.
|
||||
@@ -721,7 +721,7 @@ class WP_Term_Query {
|
||||
* @param string[] $taxonomies An array of taxonomy names.
|
||||
* @param array $args An array of term query arguments.
|
||||
*/
|
||||
$clauses = apply_filters( 'terms_clauses', compact( $clauses ), $taxonomies, $args );
|
||||
$clauses = apply_filters( 'terms_clauses', compact( $pieces ), $taxonomies, $args );
|
||||
|
||||
$fields = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
|
||||
$join = isset( $clauses['join'] ) ? $clauses['join'] : '';
|
||||
|
||||
Reference in New Issue
Block a user