[wp-trac] [WordPress Trac] #33447: Introduce a nav menu title filter
WordPress Trac
noreply at wordpress.org
Wed Aug 19 19:39:18 UTC 2015
#33447: Introduce a nav menu title filter
-------------------------+-----------------------------
Reporter: paulwilde | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33447>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list