mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +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:
@@ -646,7 +646,7 @@ class WP_Site_Query {
|
||||
|
||||
$where = implode( ' AND ', $this->sql_clauses['where'] );
|
||||
|
||||
$clauses = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
|
||||
$pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
|
||||
|
||||
/**
|
||||
* Filters the site query clauses.
|
||||
@@ -656,7 +656,7 @@ class WP_Site_Query {
|
||||
* @param string[] $clauses An associative array of site query clauses.
|
||||
* @param WP_Site_Query $query Current instance of WP_Site_Query (passed by reference).
|
||||
*/
|
||||
$clauses = apply_filters_ref_array( 'sites_clauses', array( compact( $clauses ), &$this ) );
|
||||
$clauses = apply_filters_ref_array( 'sites_clauses', array( compact( $pieces ), &$this ) );
|
||||
|
||||
$fields = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
|
||||
$join = isset( $clauses['join'] ) ? $clauses['join'] : '';
|
||||
|
||||
Reference in New Issue
Block a user