Make WordPress Core


Ignore:
Timestamp:
03/21/2022 12:20:22 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-network-query.php

    r52973 r52974  
    439439        $groupby = '';
    440440
    441         $pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
     441        $clauses = compact( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
    442442
    443443        /**
     
    446446         * @since 4.6.0
    447447         *
    448          * @param string[]         $pieces An associative array of network query clauses.
    449          * @param WP_Network_Query $query  Current instance of WP_Network_Query (passed by reference).
     448         * @param string[]         $clauses An associative array of network query clauses.
     449         * @param WP_Network_Query $query   Current instance of WP_Network_Query (passed by reference).
    450450         */
    451         $clauses = apply_filters_ref_array( 'networks_clauses', array( compact( $pieces ), &$this ) );
     451        $clauses = apply_filters_ref_array( 'networks_clauses', array( $clauses, &$this ) );
    452452
    453453        $fields  = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
Note: See TracChangeset for help on using the changeset viewer.