Make WordPress Core

Ticket #52839: 52839.diff

File 52839.diff, 5.7 KB (added by audrasjb, 4 years ago)

Docs: Correct formatting for the description of some wp_term_query->construct method parameters

  • src/wp-includes/class-wp-term-query.php

    diff --git a/src/wp-includes/class-wp-term-query.php b/src/wp-includes/class-wp-term-query.php
    index 465bcb7156..3fda6a9569 100644
    a b class WP_Term_Query { 
    9797         *     @type int|int[]    $object_ids             Optional. Object ID, or array of object IDs. Results will be
    9898         *                                                limited to terms associated with these objects.
    9999         *     @type string       $orderby                Field(s) to order terms by. Accepts:
    100          *                                                - term fields ('name', 'slug', 'term_group', 'term_id', 'id',
     100         *                                                * term fields ('name', 'slug', 'term_group', 'term_id', 'id',
    101101         *                                                  'description', 'parent', 'term_order'). Unless `$object_ids`
    102102         *                                                  is not empty, 'term_order' is treated the same as 'term_id'.
    103          *                                                - 'count' to use the number of objects associated with the term.
    104          *                                                - 'include' to match the 'order' of the $include param.
    105          *                                                - 'slug__in' to match the 'order' of the $slug param.
    106          *                                                - 'meta_value', 'meta_value_num'.
    107          *                                                - the value of `$meta_key`.
    108          *                                                - the array keys of `$meta_query`.
    109          *                                                - 'none' to omit the ORDER BY clause.
     103         *                                                * 'count' to use the number of objects associated with the term.
     104         *                                                * 'include' to match the 'order' of the $include param.
     105         *                                                * 'slug__in' to match the 'order' of the $slug param.
     106         *                                                * 'meta_value', 'meta_value_num'.
     107         *                                                  the value of `$meta_key`.
     108         *                                                  the array keys of `$meta_query`.
     109         *                                                * 'none' to omit the ORDER BY clause.
    110110         *                                                Defaults to 'name'.
    111111         *     @type string       $order                  Whether to order terms in ascending or descending order.
    112112         *                                                Accepts 'ASC' (ascending) or 'DESC' (descending).
    class WP_Term_Query { 
    127127         *                                                See #41796 for details.
    128128         *     @type int          $offset                 The number by which to offset the terms query. Default empty.
    129129         *     @type string       $fields                 Term fields to query for. Accepts:
    130          *                                                - 'all' Returns an array of complete term objects (`WP_Term[]`).
    131          *                                                - 'all_with_object_id' Returns an array of term objects
     130         *                                                * 'all' Returns an array of complete term objects (`WP_Term[]`).
     131         *                                                * 'all_with_object_id' Returns an array of term objects
    132132         *                                                  with the 'object_id' param (`WP_Term[]`). Works only
    133133         *                                                  when the `$object_ids` parameter is populated.
    134          *                                                - 'ids' Returns an array of term IDs (`int[]`).
    135          *                                                - 'tt_ids' Returns an array of term taxonomy IDs (`int[]`).
    136          *                                                - 'names' Returns an array of term names (`string[]`).
    137          *                                                - 'slugs' Returns an array of term slugs (`string[]`).
    138          *                                                - 'count' Returns the number of matching terms (`int`).
    139          *                                                - 'id=>parent' Returns an associative array of parent term IDs,
     134         *                                                * 'ids' Returns an array of term IDs (`int[]`).
     135         *                                                * 'tt_ids' Returns an array of term taxonomy IDs (`int[]`).
     136         *                                                * 'names' Returns an array of term names (`string[]`).
     137         *                                                * 'slugs' Returns an array of term slugs (`string[]`).
     138         *                                                * 'count' Returns the number of matching terms (`int`).
     139         *                                                * 'id=>parent' Returns an associative array of parent term IDs,
    140140         *                                                   keyed by term ID (`int[]`).
    141          *                                                - 'id=>name' Returns an associative array of term names,
     141         *                                                * 'id=>name' Returns an associative array of term names,
    142142         *                                                   keyed by term ID (`string[]`).
    143          *                                                - 'id=>slug' Returns an associative array of term slugs,
     143         *                                                * 'id=>slug' Returns an associative array of term slugs,
    144144         *                                                   keyed by term ID (`string[]`).
    145145         *                                                Default 'all'.
    146146         *     @type bool         $count                  Whether to return a term count. If true, will take precedence