Make WordPress Core

Changeset 58454


Ignore:
Timestamp:
06/21/2024 05:24:39 PM (7 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.

Location:
trunk/src/wp-includes
Files:
3 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         */
  • trunk/src/wp-includes/class-wp-network-query.php

    r57750 r58454  
    447447         * @since 4.6.0
    448448         *
    449          * @param string[]         $clauses An associative array of network query clauses.
     449         * @param string[]         $clauses {
     450         *     Associative array of the clauses for the query.
     451         *
     452         *     @type string $fields   The SELECT clause of the query.
     453         *     @type string $join     The JOIN clause of the query.
     454         *     @type string $where    The WHERE clause of the query.
     455         *     @type string $orderby  The ORDER BY clause of the query.
     456         *     @type string $limits   The LIMIT clause of the query.
     457         *     @type string $groupby  The GROUP BY clause of the query.
     458         * }
    450459         * @param WP_Network_Query $query   Current instance of WP_Network_Query (passed by reference).
    451460         */
  • 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.