WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#19064 reopened enhancement

Pass $depth argument to nav_menu_css_class filter

Reported by: cyclometh Owned by: cyclometh
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 3.2.1
Component: Menus Keywords: has-patch
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 (1)

nav-menu-template.php.diff (736 bytes) - added by cyclometh 2 years ago.
Attaching patch. Updates only one file, nav-menu-template.php.

Download all attachments as: .zip

Change History (8)

cyclometh2 years ago

Attaching patch. Updates only one file, nav-menu-template.php.

comment:1 Cyclometh2 years ago

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 ocean902 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.

comment:3 Cyclometh2 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.

comment:4 soulseekah2 years ago

  • Cc gennady@… added

comment:5 soulseekah2 years ago

  • Version changed from 3.2.1 to 3.3.1

comment:6 ocean902 years ago

  • Version changed from 3.3.1 to 3.2.1

Version number indicates when the enhancement was initially reported.

comment:7 soulseekah2 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.

Note: See TracTickets for help on using tickets.