I am working on a plugin, which creates a couple of Virtual pages, and I wish these links to be available in Menu admin page, to let users have the liberty to add them as they create menus.
I want to add a Meta box in Menu administration, very similar to Page/Category meta boxes, to let users select what page to add in their menu.
Apparently, the only possible research is in the core itself.
Here,
/wp-includes/nav-menu.php, we can get how to insert the meta box:But, the hard part, which I haven’t managed to make work, is to save the value.
This is the file
/wp-admin/nav-menus.phpthat has to be studied.Tried to hook into the action
wp_update_nav_menu, but the custom meta box input field is not being passed into$_POST.WordPress Answers may have some hint: https://wordpress.stackexchange.com/search?q=wp_update_nav_menu