[wp-trac] [WordPress Trac] #15570: wp_nav_menu classes not named consistently

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 24 20:44:01 UTC 2010


#15570: wp_nav_menu classes not named consistently
--------------------------+-------------------------------------------------
 Reporter:  iandunn       |       Owner:                                                           
     Type:  defect (bug)  |      Status:  new                                                      
 Priority:  normal        |   Milestone:  Awaiting Review                                          
Component:  Menus         |     Version:  3.0.1                                                    
 Severity:  minor         |    Keywords:  current_page_item current-menu-item dash underscore class
--------------------------+-------------------------------------------------
 The CSS classes assigned by wp_nav_menu seem to randomly switch between
 using dashes and underscores to separate words. For example

 current_page_item[[BR]]
 current-menu-item[[BR]]
 menu-item-type-post_type

 I can see a justification for making menu-item-type-post_type use an
 underscore to match the database field, function parameters, etc, but
 switching between dashes and underscore within the same class name is
 counter-intuitive. I don't see any reason why current_page_item and
 current-menu-item wouldn't match.

 I think either dashes or underscores should be chosen and used exclusively
 across all class names.

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


More information about the wp-trac mailing list