[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
Thu Jun 8 08:24:45 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:  closed
Component:  Menus                                |   Milestone:  4.8
 Severity:  normal                               |     Version:
 Keywords:  needs-unit-tests good-first-bug      |  Resolution:  fixed
  has-patch                                      |     Focuses:
-------------------------------------------------+-------------------------

Comment (by miklb):

 Replying to [comment:23 Kopepasah]:
 > Replying to [comment:22 miklb]:
 > > Am I to understand this is only for the `li` element and there still
 isn't a way to filter the `<a>` class?
 >
 > You can add/modify the nav menu `<a>` element class by the
 `nav_menu_link_attributes` filter. A full list of filters can be found in
 `wp-includes/class-walker-nav-menu.php`.

 ah, I read through that but didn't see a `@type string $class` so just
 assumed it wasn't covered. Now I realize I need to add it myself. Thanks.

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


More information about the wp-trac mailing list