From b62421681e4a9720af8801be5901071c35de48e9 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 31 Dec 2015 11:29:19 +0000 Subject: [PATCH] Docs: Improve readability of the default arguments of `wp_list_categories()`. Adds missing documentation for the `separator` argument introduced in [35140]. Props birgire for initial patch. Fixes #34751. git-svn-id: https://develop.svn.wordpress.org/trunk@36135 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category-template.php | 34 +++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index b989ed526c..b1006dd2db 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -520,24 +520,34 @@ function wp_dropdown_categories( $args = '' ) { * the list. Default false (title will always be shown). * @type int $depth Category depth. Used for tab indentation. Default 0. * @type string $taxonomy Taxonomy name. Default 'category'. + * @type string $separator Separator between links. Default '
'. * } * @return false|string HTML content only if 'echo' argument is 0. */ function wp_list_categories( $args = '' ) { $defaults = array( - 'show_option_all' => '', 'show_option_none' => __('No categories'), - 'orderby' => 'name', 'order' => 'ASC', - 'style' => 'list', - 'show_count' => 0, 'hide_empty' => 1, - 'use_desc_for_title' => 1, 'child_of' => 0, - 'feed' => '', 'feed_type' => '', - 'feed_image' => '', 'exclude' => '', - 'exclude_tree' => '', 'current_category' => 0, - 'hierarchical' => true, 'title_li' => __( 'Categories' ), + 'child_of' => 0, + 'current_category' => 0, + 'depth' => 0, + 'echo' => 1, + 'exclude' => '', + 'exclude_tree' => '', + 'feed' => '', + 'feed_image' => '', + 'feed_type' => '', + 'hide_empty' => 1, 'hide_title_if_empty' => false, - 'echo' => 1, 'depth' => 0, - 'separator' => '
', - 'taxonomy' => 'category' + 'hierarchical' => true, + 'order' => 'ASC', + 'orderby' => 'name', + 'separator' => '
', + 'show_count' => 0, + 'show_option_all' => '', + 'show_option_none' => __( 'No categories' ), + 'style' => 'list', + 'taxonomy' => 'category', + 'title_li' => __( 'Categories' ), + 'use_desc_for_title' => 1, ); $r = wp_parse_args( $args, $defaults );