wp_nav_menu_item_custom_fields

动作钩子
do_action( 'wp_nav_menu_item_custom_fields', $item_id, $menu_item, $depth, $args, $current_object_id )
参数
  • (string) $item_id Menu item ID as a numeric string.
    Required:
  • (WP_Post) $menu_item Menu item data object.
    Required:
  • (int) $depth Depth of menu item. Used for padding.
    Required:
  • (stdClass|null) $args An object of menu item arguments.
    Required:
  • (int) $current_object_id Nav menu ID.
    Required:
定义位置
相关勾子
wp_nav_menu_item_custom_fields_customize_templatewp_nav_menu_itemsnav_menu_item_idnav_menu_item_titlewp_get_nav_menu_items
相关方法
wp_nav_menu_item_taxonomy_meta_boxwp_get_nav_menu_itemswp_nav_menu_item_post_type_meta_boxwp_save_nav_menu_items_nav_menu_item_id_use_oncewp_nav_menu_manage_columns
引入
5.4.0
弃用
-

在菜单编辑器中导航菜单项的移动按钮之前启动。

do_action( 'wp_nav_menu_item_custom_fields', $item_id, $menu_item, $depth, $args, $current_object_id );