Opened 15 years ago
Closed 12 years ago
#19064 closed enhancement (fixed)
Pass $depth argument to nav_menu_css_class filter
| Reported by: | cyclometh | Owned by: | cyclometh |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.1 |
| Component: | Menus | Version: | 3.2.1 |
| Severity: | normal | Keywords: | has-patch needs-docs |
| Cc: | Focuses: |
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
@
15 years ago
- Resolution fixed
- Status closed → 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
@
15 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
@
14 years ago
- Version 3.3.1 → 3.2.1
Version number indicates when the enhancement was initially reported.
#7
@
14 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
@
12 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
@
12 years ago
- Keywords needs-docs added; commit removed
- Resolution fixed
- Status closed → 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_classnav_menu_item_idnav_menu_link_attributes
#16
@
12 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Attaching patch. Updates only one file, nav-menu-template.php.