Coding Standards: Remove a one-time $pieces variable in wp-includes/class-wp-*-query.php.

Use the existing `$clauses` variable instead for consistency.

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52974 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-03-21 12:20:22 +00:00
parent fbf8cb73ec
commit 8182e92220
5 changed files with 20 additions and 19 deletions

View File

@@ -438,17 +438,17 @@ class WP_Network_Query {
$groupby = '';
$pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
$clauses = compact( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
/**
* Filters the network query clauses.
*
* @since 4.6.0
*
* @param string[] $pieces An associative array of network query clauses.
* @param WP_Network_Query $query Current instance of WP_Network_Query (passed by reference).
* @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( $pieces ), &$this ) );
$clauses = apply_filters_ref_array( 'networks_clauses', array( $clauses, &$this ) );
$fields = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
$join = isset( $clauses['join'] ) ? $clauses['join'] : '';