Make WordPress Core

Changeset 45894


Ignore:
Timestamp:
08/26/2019 03:23:48 PM (5 years ago)
Author:
boonebgorges
Message:

Taxonomy: Standardize docs for wp_list_categories().

Many of the parameters historically documented on this function are merely
passed through to get_categories() and its underlying functions. In order to
avoid unnecessary duplication of function arguments, we remove documentation of
these parameters, and replace it with reference to the wrapped functions.

Parameters that receive special treatment or are otherwise changed before
being passed through continue to be documented as part of wp_list_categories().

Props audrasjb, itowhid06, birgire.
Fixes #47896.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/category-template.php

    r45735 r45894  
    471471 *
    472472 * @param string|array $args {
    473  *     Array of optional arguments.
    474  *
    475  *     @type int          $child_of              Term ID to retrieve child terms of. See get_terms(). Default 0.
     473 *     Array of optional arguments. See get_categories(), get_terms(), and WP_Tax_Query::construct()
     474 *     for full lists of arguments that can be passed in `$args`.
     475 *
    476476 *     @type int|array    $current_category      ID of category, or array of IDs of categories, that should get the
    477477 *                                               'current-cat' class. Default 0.
     
    489489 *     @type string       $feed_type             Feed type. Used to build feed link. See get_term_feed_link().
    490490 *                                               Default empty string (default feed).
    491  *     @type bool|int     $hide_empty            Whether to hide categories that don't have any posts attached to them.
    492  *                                               Default 1.
    493491 *     @type bool         $hide_title_if_empty   Whether to hide the `$title_li` element if there are no terms in
    494492 *                                               the list. Default false (title will always be shown).
    495  *     @type bool         $hierarchical          Whether to include terms that have non-empty descendants.
    496  *                                               See get_terms(). Default true.
    497  *     @type string       $order                 Which direction to order categories. Accepts 'ASC' or 'DESC'.
    498  *                                               Default 'ASC'.
    499  *     @type string       $orderby               The column to use for ordering categories. Default 'name'.
    500493 *     @type string       $separator             Separator between links. Default '<br />'.
    501494 *     @type bool|int     $show_count            Whether to show how many posts are in the category. Default 0.
     
    506499 *                                               will be output as an unordered list. If left empty or another value,
    507500 *                                               categories will be output separated by `<br>` tags. Default 'list'.
    508  *     @type string       $taxonomy              Taxonomy name. Default 'category'.
    509501 *     @type string       $title_li              Text to use for the list title `<li>` element. Pass an empty string
    510502 *                                               to disable. Default 'Categories'.
Note: See TracChangeset for help on using the changeset viewer.