#25329 closed feature request (invalid)
selected function is not supporting the multiselect dropdown
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.6.1 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
Hi,
While I working with multiselect dropdown box, I realized [selected]http://codex.wordpress.org/Function_Reference/selected function is not supporting the multi select value. For example if selected function is not compatible to handle the array values.
I think we need to use in_array in the function to resolve this trouble.
selected('1',array('1','3'));
Change History (1)
Note: See
TracTickets for help on using
tickets.
Since
selected()
is comparing values, you should see ifin_array()
returns true. And since it can accept that the first value is just true or false, you can just use it as the first argument.