Add a 'multiple' option to wp_dropdown_categories
|Reported by:||louisremi||Owned by:|
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 checklists.
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.