mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +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:
@@ -917,7 +917,7 @@ class WP_Comment_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 comment query clauses.
|
||||
@@ -927,7 +927,7 @@ class WP_Comment_Query {
|
||||
* @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( $clauses ), &$this ) );
|
||||
$clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), &$this ) );
|
||||
|
||||
$fields = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
|
||||
$join = isset( $clauses['join'] ) ? $clauses['join'] : '';
|
||||
|
||||
Reference in New Issue
Block a user