[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 06:35:00 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 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`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36163#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list