Make WordPress Core

Ticket #55699: 55699.patch

File 55699.patch, 1.7 KB (added by 5um17, 4 years ago)
  • wp-includes/class-wp-query.php

     
    27542754                        }
    27552755                }
    27562756
    2757                 $clauses = array( 'where', 'groupby', 'join', 'orderby', 'distinct', 'fields', 'limits' );
     2757                $pieces = array( 'where', 'groupby', 'join', 'orderby', 'distinct', 'fields', 'limits' );
    27582758
    27592759                /*
    27602760                 * Apply post-paging filters on where and join. Only plugins that
     
    28562856                         * }
    28572857                         * @param WP_Query $query   The WP_Query instance (passed by reference).
    28582858                         */
    2859                         $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $clauses ), &$this ) );
     2859                        $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
    28602860
    28612861                        $where    = isset( $clauses['where'] ) ? $clauses['where'] : '';
    28622862                        $groupby  = isset( $clauses['groupby'] ) ? $clauses['groupby'] : '';
     
    29772977                         *
    29782978                         * @since 3.1.0
    29792979                         *
    2980                          * @param string[] $clauses {
     2980                         * @param string[] $pieces {
    29812981                         *     Associative array of the clauses for the query.
    29822982                         *
    29832983                         *     @type string $where    The WHERE clause of the query.
     
    29902990                         * }
    29912991                         * @param WP_Query $query  The WP_Query instance (passed by reference).
    29922992                         */
    2993                         $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( $clauses, &$this ) );
     2993                        $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
    29942994
    29952995                        $where    = isset( $clauses['where'] ) ? $clauses['where'] : '';
    29962996                        $groupby  = isset( $clauses['groupby'] ) ? $clauses['groupby'] : '';