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-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         */
Note: See TracChangeset for help on using the changeset viewer.