So I've been snooping around to see if there has been any change to how menus work in WP, but I haven't found anything yet.
Some of the problems I have expereinced:
- Menu items still remains in menu after page has been deleted or is no longer published
- It's not possible to get menu children by parent ID
- WP gives you 500 Internal Server Error if you have to many menu items and server does not have enough memory
I think the reason for why this is causing so many issues, is that Menu items have their own custom post type (Navigation Menu). Really? A menu item is stored / handled as a post?
Retrieving child menu items should be as easy as
get_menu_children($current_menu_id). But alas no. Here we we can run into issues like post-type vs custom-post-type vs custom-menu-item.
At one point I had to use Walker_Nav_Menu.
So my question is, has there been done any improvements on how menus are handled in WP?