From bdbdeb1e7cb93e35b0550bf900e4a2e29a5e6a85 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 10 Jan 2008 21:51:00 +0000 Subject: [PATCH] Add depth arg to wp_list_categories(). Props pishmishy. see #2461 git-svn-id: http://svn.automattic.com/wordpress/trunk@6595 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index f76482ce0..647e651ed 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -250,7 +250,7 @@ function wp_list_categories($args = '') { 'child_of' => 0, 'feed' => '', 'feed_type' => '', 'feed_image' => '', 'exclude' => '', 'hierarchical' => true, 'title_li' => __('Categories'), - 'echo' => 1 + 'echo' => 1, 'depth' => 0 ); $r = wp_parse_args( $args, $defaults ); @@ -289,7 +289,7 @@ function wp_list_categories($args = '') { $r['current_category'] = $wp_query->get_queried_object_id(); if ( $hierarchical ) - $depth = 0; // Walk the full depth. + $depth = $r['depth']; else $depth = -1; // Flat.