WordPress.org

Ready to get started?Download WordPress

Ideas

Automatically delete menu item when permanently deleting page

  1. beningreenjam
    Member

    12345

    Currently, when permanently deleting a page or any post type that has menu item for it, the menu item remains and outputs a PHP notice complaining that the menu item is not an object and empty HTML markup for that particular item.

    It'd make things simpler and more robust to hook into the before_delete_post or delete_post actions to find and remove any related menu items from any menus where they're found and update the database before showing anything in admin or the front-end.

    Posted: 5 months ago #
  2. bravokeyl
    Member

    i think this has been taken care of

    Posted: 5 months ago #
  3. Umesh Kumar
    Member

    Yes it was a WordPress bug, and upcoming release 3.9 fixes it, here is the ticket.
    You can track the changes here:
    https://core.trac.wordpress.org/ticket/26795

    Posted: 5 months ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    4 Votes
  • Status

    This idea has been implemented