WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#14439 new defect (bug)

Unable to get a post associated menu items for a specific menu

Reported by: DreadLox Owned by:
Priority: normal Milestone: Future Release
Component: Menus Version: 3.1
Severity: major Keywords: has-patch
Cc:

Description

Hello,

The actual wp_get_associated_nav_menu_items function works well but gets menu items associated with an object from ANY menu. So a parameter needs to be added to specify a specific menu to get menu items associated with an object from a specific menu.

Patch is attached. The use of get_term() is needed because of the bug #14438

Attachments (1)

nav_menu.patch (1.5 KB) - added by DreadLox 3 years ago.
Patch to solve the bug

Download all attachments as: .zip

Change History (3)

DreadLox3 years ago

Patch to solve the bug

comment:1 nacin2 years ago

  • Milestone changed from Awaiting Review to Future Release

Clever fix. Ultimately, you can do post-processing on this for now to fetch the menus for which the the meta items are assigned.

comment:2 DreadLox2 years ago

  • Keywords has-patch added
  • Version set to 3.1

Any reason that 6 months old patch hasn't made it's way to 3.1 ?

Note: See TracTickets for help on using tickets.