[wp-trac] [WordPress Trac] #31909: wp_dropdown_categories() select field cannot accept HTML 'required'

WordPress Trac noreply at wordpress.org
Mon Apr 6 16:30:33 UTC 2015


#31909: wp_dropdown_categories() select field cannot accept HTML 'required'
--------------------------+------------------------------
 Reporter:  wzislam       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.1.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  template
--------------------------+------------------------------
Changes (by boonebgorges):

 * keywords:   => needs-patch


Comment:

 Are there attributes other than 'required' that one might reasonably want
 to add to the `<select>` element? (Like maybe `'data-'` attributes of some
 sort?) Maybe we could add a `select_atts` param, which would accept an
 array of additional attributes:

 {{{
 wp_dropdown_categories( array(
     // ...
     'select_atts' => array(
         'required',
         'data-foo' => 'bar',
     ),
     // ...
 ) );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31909#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list