Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#24103 closed enhancement (fixed)

the wp_dropdown_cats filter should pass the args as a second parameter

Reported by: olivm's profile olivM Owned by: nacin's profile nacin
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.5
Component: Taxonomy Keywords: has-patch
Focuses: template Cc:

Description

effectively filtering the output of the wp_dropdown_categories function is only possible knowing their args

Index: wp-includes/category-template.php
===================================================================
--- wp-includes/category-template.php	(revision 24000)
+++ wp-includes/category-template.php	(working copy)
@@ -370,7 +370,7 @@
 	if ( ! $r['hide_if_empty'] || ! empty($categories) )
 		$output .= "</select>\n";

-	$output = apply_filters( 'wp_dropdown_cats', $output );
+	$output = apply_filters( 'wp_dropdown_cats', $output, $r );

 	if ( $echo )
 		echo $output;

Attachments (1)

wp_dropdown_categories-patch.txt (477 bytes) - added by olivM 12 years ago.
patch to add a second parameter to the wp_dropdown_cats filter

Download all attachments as: .zip

Change History (5)

@olivM
12 years ago

patch to add a second parameter to the wp_dropdown_cats filter

#2 @SergeyBiryukov
12 years ago

  • Component changed from Administration to Template
  • Version changed from trunk to 3.5

#3 @nacin
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 27065:

Add arguments to the wp_dropdown_cats filter, and docs.

props olivM.
fixes #24103.

#4 @nacin
11 years ago

  • Component changed from Template to Taxonomy
  • Focuses template added
  • Milestone changed from Awaiting Review to 3.9
Note: See TracTickets for help on using tickets.