Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#32631 closed enhancement (fixed)

Prevent wp_get_nav_menu_items filter from not applying if there are no menu items

Reported by: westonruter's profile westonruter Owned by: ocean90's profile ocean90
Milestone: 4.3 Priority: normal
Severity: normal Version: 3.0
Component: Menus Keywords: has-patch
Focuses: Cc:


For Menu Customizer (#32576) we need to filter a menu's items. The menu may not have any items to begin with. The filter that is most useful for the filtering is wp_get_nav_menu_items but this is currently not getting called if there were no items found up front. We need to change this so that even if no items were found up front, that the filter can still apply so plugins can add their own items to be returned.

Attachments (1)

Change History (3)

#1 @westonruter
9 years ago

  • Keywords has-patch added

#2 @ocean90
9 years ago

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

In 32748:

Nav menus: Apply the wp_get_nav_menu_items filter also on an empty list of menu items.

props westonruter.
fixes #32631.

Note: See TracTickets for help on using tickets.