From 71f951f71ea5449bd542e98cbab7fdf6bfbbf6c3 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sun, 2 Feb 2014 05:32:17 +0000 Subject: [PATCH] Add arguments to the wp_dropdown_cats filter, and docs. props olivM. fixes #24103. git-svn-id: https://develop.svn.wordpress.org/trunk@27065 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category-template.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index 26c82a0f76..00b04df42e 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -371,7 +371,15 @@ function wp_dropdown_categories( $args = '' ) { if ( ! $r['hide_if_empty'] || ! empty($categories) ) $output .= "\n"; - $output = apply_filters( 'wp_dropdown_cats', $output ); + /** + * Filter the result of wp_dropdown_categories(). + * + * @since 2.1.0 + * + * @param $output HTML content. + * @param $r Arguments used to build the dropdown. + */ + $output = apply_filters( 'wp_dropdown_cats', $output, $r ); if ( $echo ) echo $output;