New Pending Menu Item Behavior
|Reported by:||filosofo||Owned by:||filosofo|
Per a discussion in #wordpress-dev, menu items need to have the following behavior:
When a user adds a menu item to a menu, if the menu is not saved then all changes are lost on the next page load, including the fact that the "draft" menu item is associated with this particular menu.
(Current behavior keeps the "draft" menu item in a draft state)
Submitted request for a new menu item adds it to the current menu as "draft," with a visual "pending" text on that menu item and a message in the standard top-of-page message area that says something to the effect of "You must click save to use menus."
- XHR-submitted menu item creation requests leave menu items orphaned, so a new page load does not show any associated "draft" menu items.
- Non-XHR-submitted menu item creation requests do associate the draft menu item with the menu.
- Orphaned draft menu items are deleted after 7 days.