[wp-trac] [WordPress Trac] #20483: Do not output nav menu class attribute if no classes exist

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 18 18:22:15 UTC 2012


#20483: Do not output nav menu class attribute if no classes exist
--------------------------+-----------------------------
 Reporter:  niallkennedy  |      Owner:
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Menus         |    Version:
 Severity:  trivial       |   Keywords:  has-patch
--------------------------+-----------------------------
 Walker_Nav_Menu->start_el passes an array of class names and a string
 through class and id filters respectively. It's possible for a theme or
 plugin to empty out a class or id, overriding defaults.

 The element string builder checks for an empty id attribute string value
 before outputting the id attribute. If a plugin empties the classes array
 then $classes_name will be similarly empty.

 Patch applies the same conditional attribute output logic present in the
 id attribute to the class attribute as well.

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


More information about the wp-trac mailing list