nav_menu_item_id

nav_menu_item_id

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('nav_menu_item_id') is found 1 times:

  • /wp-includes/class-walker-nav-menu.php line 190
    		 * @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.
    		 */
    		$id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $menu_item->ID, $menu_item, $args, $depth );
    
    		$li_atts          = array();
    		$li_atts['id']    = ! empty( $id ) ? $id : '';
    		$li_atts['class'] = ! empty( $class_names ) ? $class_names : '';
    
    		/**