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: jeremyatignition 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)

19038.diff (596 bytes) - added by solarissmoke 19 months ago.

Download all attachments as: .zip

Change History (3)

  • Keywords has-patch dev-feedback added; needs-patch removed

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.

Note: See TracTickets for help on using tickets.