[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 07:28:57 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 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.

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


More information about the wp-trac mailing list