Make WordPress Core

Opened 8 years ago

Last modified 8 years ago

#13249 closed defect (bug)

Menu item parent property — at Version 1

Reported by: filosofo Owned by: filosofo
Milestone: 3.0 Priority: normal
Severity: major Version: 3.0
Component: Menus Keywords: has-patch
Focuses: Cc:

Description (last modified by filosofo)

Currently, the hierarchy of menu items works haphazardly: a menu item's parent is determined by its post_parent property, which is the database ID of the item's original object.

This introduces a number of bugs because menu item original objects can be either taxonomy objects or post objects, each group of which has its own independent set of database IDs. So try to order a mixture of taxonomy menu items and post type menu items, and you get inconsistent (sometimes non-functional) results.

Patch introduces the menu item property menu_parent, which determines the hierarchical placement of the given menu item. menu_parent refers to the menu item DB ID of its parent, if any, which is internally consistent because all menu item objects are post objects.

Change History (1)

#1 @filosofo
8 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.