From b7aaf1a3b419824bdfb6574ec0c1553414a7fc9f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 30 Jan 2008 20:07:52 +0000 Subject: [PATCH] Add depth arg to wp_dropdown_categories(). Props pishmishy. fixes #2461 git-svn-id: https://develop.svn.wordpress.org/trunk@6690 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/category-template.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index dd0c71949a..7215962bd7 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -199,7 +199,8 @@ function wp_dropdown_categories($args = '') { 'hide_empty' => 1, 'child_of' => 0, 'exclude' => '', 'echo' => 1, 'selected' => 0, 'hierarchical' => 0, - 'name' => 'cat', 'class' => 'postform' + 'name' => 'cat', 'class' => 'postform', + 'depth' => 0 ); $defaults['selected'] = ( is_category() ) ? get_query_var('cat') : 0; @@ -225,7 +226,7 @@ function wp_dropdown_categories($args = '') { } if ( $hierarchical ) - $depth = 0; // Walk the full depth. + $depth = $r['$depth']; // Walk the full depth. else $depth = -1; // Flat.