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. Built from https://develop.svn.wordpress.org/trunk@53376 git-svn-id: http://core.svn.wordpress.org/trunk@52965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -438,7 +438,7 @@ class WP_Network_Query {
|
||||
|
||||
$groupby = '';
|
||||
|
||||
$clauses = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
|
||||
$pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
|
||||
|
||||
/**
|
||||
* Filters the network query clauses.
|
||||
@@ -448,7 +448,7 @@ class WP_Network_Query {
|
||||
* @param string[] $clauses An associative array of network query clauses.
|
||||
* @param WP_Network_Query $query Current instance of WP_Network_Query (passed by reference).
|
||||
*/
|
||||
$clauses = apply_filters_ref_array( 'networks_clauses', array( compact( $clauses ), &$this ) );
|
||||
$clauses = apply_filters_ref_array( 'networks_clauses', array( compact( $pieces ), &$this ) );
|
||||
|
||||
$fields = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
|
||||
$join = isset( $clauses['join'] ) ? $clauses['join'] : '';
|
||||
|
||||
Reference in New Issue
Block a user