wp_ajax_add_menu_item() closed to user-created menu item types
|Reported by:||GaryJ||Owned by:|
I'm building a new Menus meta box, that can add a new type of menu item, lets call it 'foobar'.
The conditional inside wp_ajax_add_menu_item() is slightly off. It checks that the menu item type is not 'custom', then proceeds to assume that it's either post-type or taxonomy so it can do some DB look-ups and create an $_object variable which is then used. This means it's closed to other types of menu items.
I've chosen 'foobar', so I can distinguish those items later on when walking through the front-end output.