[wp-trac] [WordPress Trac] #25329: selected function is not supporting the multiselect dropdown

WordPress Trac noreply at wordpress.org
Mon Sep 16 14:42:28 UTC 2013


#25329: selected function is not supporting the multiselect dropdown
-----------------------------+----------------------
 Reporter:  gchokeen         |       Owner:
     Type:  feature request  |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  General          |     Version:  3.6.1
 Severity:  normal           |  Resolution:  invalid
 Keywords:                   |
-----------------------------+----------------------
Changes (by helen):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 Since `selected()` is comparing values, you should see if `in_array()`
 returns true.

 {{{
 $value = '1';
 selected( true, in_array( $value, array( '1', '3' ) ) );
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25329#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list