Filter hook 'nav_menu_item_id'

in WP Core File wp-includes/class-walker-nav-menu.php at line 189

Description

Filters the ID attribute applied to a menu item's list item element.

Occurrences

Filename Line Number
wp-includes/class-walker-nav-menu.php 189

Parameters

Type Name Description
string $menu_item_id The ID attribute applied to the menu item's `
  • ` element.
  • WP_Post $menu_item The current menu item.
    stdClass $args An object of wp_nav_menu() arguments.
    int $depth Depth of menu item. Used for padding.

    PHP Doc

    /**
    		 * Filters the ID attribute applied to a menu item's list item element.
    		 *
    		 * @since 3.0.1
    		 * @since 4.1.0 The `$depth` parameter was added.
    		 *
    		 * @param string   $menu_item_id The ID attribute applied to the menu item's `
  • ` element. * @param WP_Post $menu_item The current menu item. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. */