[wp-trac] [WordPress Trac] #29417: More semantic filter for item labels in Walker_Nav_Menu
WordPress Trac
noreply at wordpress.org
Thu Aug 28 15:00:29 UTC 2014
#29417: More semantic filter for item labels in Walker_Nav_Menu
-----------------------------+----------------------------------------
Reporter: danielbachhuber | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Menus | Version:
Severity: normal | Keywords: needs-patch good-first-bug
Focuses: |
-----------------------------+----------------------------------------
`Walker_Nav_Menu` has a nice `nav_menu_link_attributes` filter for
modifying the attributes of a nav menu item. However, it applies
`the_title` for the label of the item, and only supplies the value and the
ID of the nav menu item.
This makes it difficult to target when you only want to filter the label
of the item. It would be nice to have a more semantic filter which
supplied the full `$item` and `$args`.
My use case: I'm adding the HTML for FontAwesome icons when certain
conditions are met.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29417>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list