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. Built from https://develop.svn.wordpress.org/trunk@52974 git-svn-id: http://core.svn.wordpress.org/trunk@52563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
38dbd506e7
commit
41de51364a
|
@ -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 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'] : '';
|
||||
|
|
|
@ -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 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'] : '';
|
||||
|
|
|
@ -2741,7 +2741,7 @@ class WP_Query {
|
|||
}
|
||||
}
|
||||
|
||||
$pieces = array( 'where', 'groupby', 'join', 'orderby', 'distinct', 'fields', 'limits' );
|
||||
$clauses = compact( 'where', 'groupby', 'join', 'orderby', 'distinct', 'fields', 'limits' );
|
||||
|
||||
/*
|
||||
* Apply post-paging filters on where and join. Only plugins that
|
||||
|
@ -2843,7 +2843,7 @@ class WP_Query {
|
|||
* }
|
||||
* @param WP_Query $query The WP_Query instance (passed by reference).
|
||||
*/
|
||||
$clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
|
||||
$clauses = (array) apply_filters_ref_array( 'posts_clauses', array( $clauses, &$this ) );
|
||||
|
||||
$where = isset( $clauses['where'] ) ? $clauses['where'] : '';
|
||||
$groupby = isset( $clauses['groupby'] ) ? $clauses['groupby'] : '';
|
||||
|
@ -2964,7 +2964,7 @@ class WP_Query {
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param string[] $pieces {
|
||||
* @param string[] $clauses {
|
||||
* Associative array of the clauses for the query.
|
||||
*
|
||||
* @type string $where The WHERE clause of the query.
|
||||
|
@ -2977,7 +2977,7 @@ class WP_Query {
|
|||
* }
|
||||
* @param WP_Query $query The WP_Query instance (passed by reference).
|
||||
*/
|
||||
$clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
|
||||
$clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( $clauses, &$this ) );
|
||||
|
||||
$where = isset( $clauses['where'] ) ? $clauses['where'] : '';
|
||||
$groupby = isset( $clauses['groupby'] ) ? $clauses['groupby'] : '';
|
||||
|
|
|
@ -641,17 +641,17 @@ class WP_Site_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 site query clauses.
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param string[] $pieces An associative array of site query clauses.
|
||||
* @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( $pieces ), &$this ) );
|
||||
$clauses = apply_filters_ref_array( 'sites_clauses', array( $clauses, &$this ) );
|
||||
|
||||
$fields = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
|
||||
$join = isset( $clauses['join'] ) ? $clauses['join'] : '';
|
||||
|
|
|
@ -692,18 +692,18 @@ class WP_Term_Query {
|
|||
|
||||
$where = implode( ' AND ', $this->sql_clauses['where'] );
|
||||
|
||||
$pieces = compact( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' );
|
||||
$clauses = compact( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' );
|
||||
|
||||
/**
|
||||
* Filters the terms query SQL clauses.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param string[] $pieces Array of query SQL clauses.
|
||||
* @param string[] $clauses Array of query SQL clauses.
|
||||
* @param string[] $taxonomies An array of taxonomy names.
|
||||
* @param array $args An array of term query arguments.
|
||||
*/
|
||||
$clauses = apply_filters( 'terms_clauses', $pieces, $taxonomies, $args );
|
||||
$clauses = apply_filters( 'terms_clauses', $clauses, $taxonomies, $args );
|
||||
|
||||
$fields = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
|
||||
$join = isset( $clauses['join'] ) ? $clauses['join'] : '';
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-52973';
|
||||
$wp_version = '6.0-alpha-52974';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue