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

@@ -917,16 +917,17 @@ class WP_Comment_Query {
$where = implode( ' AND ', $this->sql_clauses['where'] );
$pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
$clauses = compact( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
/**
* Filters the comment query clauses.
*
* @since 3.1.0
*
* @param string[] $pieces An associative array of comment query clauses.
* @param WP_Comment_Query $query Current instance of WP_Comment_Query (passed by reference).
* @param string[] $clauses An associative array of comment query clauses.
* @param WP_Comment_Query $query Current instance of WP_Comment_Query (passed by reference).
*/
$clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), &$this ) );
$clauses = apply_filters_ref_array( 'comments_clauses', array( $clauses, &$this ) );
$fields = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
$join = isset( $clauses['join'] ) ? $clauses['join'] : '';