Opened 19 months ago
Last modified 17 months ago
#19038 new defect (bug)
Menu Items aren't deleting on page being trashed, only when deleted
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Menus | Version: | 3.2.1 |
| Severity: | normal | Keywords: | has-patch dev-feedback |
| Cc: |
Description
The linked menu item for a page isn't removed when the page is trashed.
Attachments (1)
Change History (3)
comment:1
solarissmoke — 19 months ago
- Keywords has-patch dev-feedback added; needs-patch removed
solarissmoke — 19 months ago
comment:2
SergeyBiryukov — 17 months ago
Related: #19415
Note: See
TracTickets for help on using
tickets.

This is because _wp_delete_post_menu_item is only hooked to the delete_post action.
Patch adds the same hook to the trash action. Of course this means that if you restore the post then the menu item has to be restored manually if you still want it - but this seems better than having to delete the menu item manually when you trash a post.