[wp-trac] [WordPress Trac] #19851: wp_dropdown_categories should add category slug as class to each option.

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 18 15:17:57 UTC 2012


#19851: wp_dropdown_categories should add category slug as class to each option.
--------------------------+-----------------------------
 Reporter:  jackreichert  |      Owner:
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Template      |    Version:
 Severity:  minor         |   Keywords:  has-patch
--------------------------+-----------------------------
 Portability is important for theme developers. With more and more
 developers using JS for enhanced functionality of their themes it's
 important to offer portable selectors for their use. Category ID's tend to
 change in the migration process, category names do not.

 While it's important to keep the class clutter low, I believe adding the
 slug of a category as a class to each option in wp_dropdown_categories
 would be very helpful for developers.

 I found this modification useful for a theme I was developing and offer
 this patch with hope that my solution may benefit other developers.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19851>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list