Opened 9 years ago
Closed 9 years ago
#33447 closed enhancement (fixed)
Introduce a nav menu title filter
Reported by: | paulwilde | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Menus | Keywords: | has-patch |
Focuses: | Cc: |
Description
Currently the only way to filter the output of a nav menu title is to use the the_title
filter. This isn't ideal as this is also the filter used for the_title()
. It also doesn't include any of the nav_menu specific arguments that are exposed inside the start_el()
method except for the ID of the menu item.
I've attached a patch which introduces a separate filter for the title which includes the same arguments used by nav_menu_css_class
, nav_menu_item_id
, nav_menu_link_attributes
and walker_nav_menu_start_el
for consistency.
Attachments (2)
Change History (9)
Note: See
TracTickets for help on using
tickets.
I think the filter should be named
nav_menu_item_title
instead to avoid confusion with the menu title/name.