[wp-trac] [WordPress Trac] #36163: Make Walker_Nav_Menu::start_lvl more flexible by introducing filters for class name(s) at least

WordPress Trac noreply at wordpress.org
Tue May 9 14:41:41 UTC 2017


#36163: Make Walker_Nav_Menu::start_lvl more flexible by introducing filters for
class name(s) at least
-------------------------------------------------+-------------------------
 Reporter:  ruslik                               |       Owner:
     Type:  enhancement                          |  peterwilsoncc
 Priority:  normal                               |      Status:  reopened
Component:  Menus                                |   Milestone:  4.8
 Severity:  normal                               |     Version:
 Keywords:  needs-unit-tests good-first-bug      |  Resolution:
  has-patch                                      |     Focuses:
-------------------------------------------------+-------------------------

Comment (by Kopepasah):

 Replying to [comment:14 peterwilsoncc]:
 > Replying to [comment:12 Kopepasah]:
 > > @peterwilsoncc I think it might be better to make an empty array to
 not append and empty `class=` attribute to the `<ul>` element.
 > >
 > > See: https://github.com/xwp/wordpress-develop/pull/228
 >
 > I did consider this but ultimately decided escaping the attribute as
 `$output` was populated was the most appropriate course of action. The
 empty attribute is benign in the case a developer delete the default class
 rather than replacing.

 Yeah, I do agree, but was following the way the menu item `li` was
 implemented. Seems awkward to implement the same solution two different
 ways in the same class.

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


More information about the wp-trac mailing list