Make WordPress Core


Ignore:
Timestamp:
06/21/2024 05:24:39 PM (8 months ago)
Author:
hellofromTonya
Message:

Docs: Document $clauses associative array in *-clauses filters.

Document each element within the filter parameter $clauses associative array structure for the 'comments_clauses', 'networks_clauses', and 'sites_clauses' filters.

This change:

  • Brings consistency amongst the WP_[*_]Query filters.
  • Helps to improve understanding.
  • Helps to avoid confusion of the purpose for pieces and clauses.

Follow-up to [53376], [53375], [52974].

Props david.binda, audrasjb, hellofromTonya, ironprogrammer, johnbillion, oglekler, SergeyBiryukov.
Fixes #61307.

File:
1 edited

Legend:

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

    r57750 r58454  
    661661         * @since 4.6.0
    662662         *
    663          * @param string[]      $clauses An associative array of site query clauses.
     663         * @param string[]      $clauses {
     664         *     Associative array of the clauses for the query.
     665         *
     666         *     @type string $fields   The SELECT clause of the query.
     667         *     @type string $join     The JOIN clause of the query.
     668         *     @type string $where    The WHERE clause of the query.
     669         *     @type string $orderby  The ORDER BY clause of the query.
     670         *     @type string $limits   The LIMIT clause of the query.
     671         *     @type string $groupby  The GROUP BY clause of the query.
     672         * }
    664673         * @param WP_Site_Query $query   Current instance of WP_Site_Query (passed by reference).
    665674         */
Note: See TracChangeset for help on using the changeset viewer.