[wp-trac] [WordPress Trac] #16734: Allowing multiple selection when using wp_dropdown_* functions

WordPress Trac noreply at wordpress.org
Wed Jul 9 19:13:37 UTC 2014

#16734: Allowing multiple selection when using wp_dropdown_* functions
 Reporter:  grandslambert            |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Taxonomy                 |     Version:  3.1
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |     Focuses:
Changes (by nacin):

 * keywords:  needs-patch => needs-patch 2nd-opinion
 * milestone:  4.0 => Future Release


 As already stated, because `<select multiple>` have issues with `<option
 selected>` at least in terms of this API, I think we need to avoid
 touching this for the moment, until we have that resolved. Ultimately,
 this hasn't had enough forethought put into it for it to squeeze into 4.0
 on the eve of beta.

 Modifying selected() to handle an array possibly has compatibility issues
 (though it's possible it's fine). We might need to handle it some other
 way. `selected( in_array( $option, $selected ) )` is fine, as long as
 $selected is forced to be an array when not multiple.

 Bigger question unresolved: `<select multiple>` is a terrible experience;
 why would anyone want to inflict that on their users? Since this ticket
 has been released, browsers have added improved support for various new
 HTML5 inputs, notably not multiple selects, while new multi-selection
 libraries have come out like Chosen and Select2. I hesitate allowing
 WordPress APIs to hackily support something that is well known to be a
 poor user experience.

Ticket URL: <https://core.trac.wordpress.org/ticket/16734#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list