wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



nav_menu_item_id › Filtr WordPress Hooks

Od4.1.0
Przestarzałyn/a
apply_filters( 'nav_menu_item_id', 'menu-item-' . $menu_item->ID, $menu_item, $args, $depth )
Parametry: (4)
  • (string) $menu_item_id The ID attribute applied to the menu item's `<li>` element.
    Wymagane: Tak
  • (WP_Post) $menu_item The current menu item.
    Wymagane: Tak
  • (stdClass) $args An object of wp_nav_menu() arguments.
    Wymagane: Tak
  • (int) $depth Depth of menu item. Used for padding.
    Wymagane: Tak
Zdefiniowane na:
Codex:

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





Źródło

$id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $menu_item->ID, $menu_item, $args, $depth );