Opened 13 years ago
Closed 10 years ago
#19064 closed enhancement (fixed)
Pass $depth argument to nav_menu_css_class filter
Reported by: | cyclometh | Owned by: | cyclometh |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 3.2.1 |
Component: | Menus | Keywords: | has-patch needs-docs |
Focuses: | Cc: |
Description
function start_el() in nav-menu-template.php receives a $depth argument, representing the nesting level of the current menu item, but does not pass it to the nav_menu_css_class filter.
Passing the $depth argument allows one to create classes on a menu item such as menu-item-depth-1, menu-item-depth-2, etc by hooking the nav_menu_css_class filter.
Attachments (3)
Change History (20)
#2
@
13 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Tickets are marked as fixed when a change is made to the WordPress codebase, the patch here still needs to be committed before the ticket will be marked as such.
#3
@
13 years ago
I see, I thought it was in limbo because it was assigned to me and not resolved although it had a patch. Thank you for the clarification.
#6
@
12 years ago
- Version changed from 3.3.1 to 3.2.1
Version number indicates when the enhancement was initially reported.
#7
@
12 years ago
I see, I thought it was in limbo because it was a lower version and not resolved although it had a patch. Thank you for the clarification.
#11
@
10 years ago
- Keywords commit added
Milestone needs to be set to 4.1 but other then that this is good to go now. Pretty straightforward patch: 1 line added for adding the doc for a new depth parameter, 1 line changed for actually adding it
#15
@
10 years ago
- Keywords needs-docs added; commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
A 4.1.0 entry should be added to the changelogs for those three hooks where the $depth
parameter was added:
nav_menu_css_class
nav_menu_item_id
nav_menu_link_attributes
#16
@
10 years ago
19064.3.diff adds 4.1.0 changelogs for the nav_menu_css_class
, nav_menu_item_id
, and nav_menu_link_attributes
hooks per comment:15.
Attaching patch. Updates only one file, nav-menu-template.php.