[wp-trac] [WordPress Trac] #24731: Add a 'multiple' option to wp_dropdown_categories

WordPress Trac noreply at wordpress.org
Fri Jul 12 09:57:20 UTC 2013

#24731: Add a 'multiple' option to wp_dropdown_categories
 Reporter:  louisremi    |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Template     |    Version:  trunk
 Severity:  normal       |   Keywords:  has-patch
 `wp_dropdown_categories` has an alternative that allows to select multiple
 categories: `wp_category_checklist`. But sometimes it would be useful to
 create a simple `<select multiple>` using wp_dropdown_categories: there
 are a large number of JS libs and plugins that enhance multiple selects
 (see http://harvesthq.github.io/chosen/ or
 http://ivaynberg.github.io/select2/ ) and are not able to do the same with

 By adding a few lines of code to wp_dropdown_categories, I have been able
 to add a 'multiple' option that adds this attribute to the select element
 and allows an array to be passed as the 'selected' option.

Ticket URL: <http://core.trac.wordpress.org/ticket/24731>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list