Make WordPress Core

Changeset 33763


Ignore:
Timestamp:
08/26/2015 03:29:35 PM (9 years ago)
Author:
boonebgorges
Message:

Use proper array documentation formatting for wp_list_categories().

This changeset also corrects a few parameter descriptions, and adds a few that
were previously missing.

Fixes #33556.

File:
1 edited

Legend:

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

    r33681 r33763  
    461461 * Display or retrieve the HTML list of categories.
    462462 *
    463  * The list of arguments is below:
    464  *     'show_option_all' (string) - Text to display for showing all categories.
    465  *     'orderby' (string) default is 'ID' - What column to use for ordering the
    466  * categories.
    467  *     'order' (string) default is 'ASC' - What direction to order categories.
    468  *     'show_count' (bool|int) default is 0 - Whether to show how many posts are
    469  * in the category.
    470  *     'hide_empty' (bool|int) default is 1 - Whether to hide categories that
    471  * don't have any posts attached to them.
    472  *     'use_desc_for_title' (bool|int) default is 1 - Whether to use the
    473  * category description as the title attribute.
    474  *     'feed' - See {@link get_categories()}.
    475  *     'feed_type' - See {@link get_categories()}.
    476  *     'feed_image' - See {@link get_categories()}.
    477  *     'child_of' (int) default is 0 - See {@link get_categories()}.
    478  *     'exclude' (string) - See {@link get_categories()}.
    479  *     'exclude_tree' (string) - See {@link get_categories()}.
    480  *     'echo' (bool|int) default is 1 - Whether to display or retrieve content.
    481  *     'current_category' (int) - See {@link get_categories()}.
    482  *     'hierarchical' (bool) - See {@link get_categories()}.
    483  *     'title_li' (string) - See {@link get_categories()}.
    484  *     'depth' (int) - The max depth.
    485  *
    486463 * @since 2.1.0
    487464 *
    488  * @param string|array $args Optional. Override default arguments.
     465 * @param string|array $args {
     466 *     Array of optional arguments.
     467 *
     468 *     @type string       $show_option_all    Text to display for showing all categories. Default empty string.
     469 *     @type string       $show_option_none   Text to display for the 'no categories' option. Default 'No categories'.
     470 *     @type string       $orderby            The column to use for ordering categories. Default 'ID'.
     471 *     @type string       $order              Which direction to order categories. Accepts 'ASC' or 'DESC'.
     472 *                                            Default 'ASC'.
     473 *     @type bool|int     $show_count         Whether to show how many posts are in the category. Default 0.
     474 *     @type bool|int     $hide_empty         Whether to hide categories that don't have any posts attached to them.
     475 *                                            Default 1.
     476 *     @type bool|int     $use_desc_for_title Whether to use the category description as the title attribute.
     477 *                                            Default 1.
     478 *     @type string       $feed               Text to use for the feed link. Default 'Feed for all posts filed
     479 *                                            under [cat name]'.
     480 *     @type string       $feed_type          Feed type. Used to build feed link. See {@link get_term_feed_link()}.
     481 *                                            Default empty string (default feed).
     482 *     @type string       $feed_image         URL of an image to use for the feed link. Default empty string.
     483 *     @type int          $child_of           Term ID to retrieve child terms of. See {@link get_terms()}. Default 0.
     484 *     @type array|string $exclude            Array or comma/space-separated string of term IDs to exclude.
     485 *                                            See {@link get_terms()}. Default empty string.
     486 *     @type array|string $exclude_tree       Array or comma/space-separated string of term IDs to exclude, along with
     487 *                                            their descendants. See {@link get_terms()}. Default empty string.
     488 *     @type bool|int     $echo               True to echo markup, false to return it. Default 1.
     489 *     @type int          $current_category   Category that should get the 'current-cat' class. Default 0.
     490 *     @type bool         $hierarchical       Whether to include terms that have non-empty descendants.
     491 *                                            See {@link get_terms()}. Default true.
     492 *     @type string       $title_li           Text to use for the list title `<li>` element. Pass an empty string
     493 *                                            to disable. Default 'Categories'.
     494 *     @type int          $depth              Category depth. Used for tab indentation. Default 0.
     495 *     @type string       $taxonomy           Taxonomy name. Default 'category'.
     496 * }
    489497 * @return false|string HTML content only if 'echo' argument is 0.
    490498 */
Note: See TracChangeset for help on using the changeset viewer.