Don't forget an action hook for adding additional menu fields
-
Don’t forget a hook in the
menu_customizer_render_item_control
A few of us menu plugin authors are using
<?php // This is the added section do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args ); // end added section ?>
in the admin Walker (right after the description input), so that our plugins/themes will work together.
I can confirm that adding
do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth );
in the
menu_customizer_render_item_control
function allows my plugins to add its fields right away! I’ll have to look more closely at the save processmenu_customizer_update_menu_item
, etc to figure out how I could save additional data.Great start!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Don't forget an action hook for adding additional menu fields’ is closed to new replies.