Fires just before the move buttons of a nav menu item in the menu editor.
Parameters
$item_id
string- Menu item ID as a numeric string.
$menu_item
WP_Post- Menu item data object.
$depth
int- Depth of menu item. Used for padding.
$args
stdClass|null- An object of menu item arguments.
$current_object_id
int- Nav menu ID.
Source
do_action( 'wp_nav_menu_item_custom_fields', $item_id, $menu_item, $depth, $args, $current_object_id );
Changelog
Version | Description |
---|---|
5.4.0 | Introduced. |
Release details on this can be found here:
https://make.wordpress.org/core/2020/02/25/wordpress-5-4-introduces-new-hooks-to-add-custom-fields-to-menu-items/