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-comment-query.php

    r57750 r58454  
    928928         * @since 3.1.0
    929929         *
    930          * @param string[]         $clauses An associative array of comment query clauses.
     930         * @param string[]         $clauses {
     931         *     Associative array of the clauses for the query.
     932         *
     933         *     @type string $fields   The SELECT clause of the query.
     934         *     @type string $join     The JOIN clause of the query.
     935         *     @type string $where    The WHERE clause of the query.
     936         *     @type string $orderby  The ORDER BY clause of the query.
     937         *     @type string $limits   The LIMIT clause of the query.
     938         *     @type string $groupby  The GROUP BY clause of the query.
     939         * }
    931940         * @param WP_Comment_Query $query   Current instance of WP_Comment_Query (passed by reference).
    932941         */
Note: See TracChangeset for help on using the changeset viewer.