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



nav_menu_item_attributes › Filtr WordPress Hooks

Od6.3.0
Przestarzałyn/a
apply_filters( 'nav_menu_item_attributes', $li_atts, $menu_item, $args, $depth )
Parametry: (4)
  • (array) $li_atts { The HTML attributes applied to the menu item's `<li>` element, empty strings are ignored. @type string $class HTML CSS class attribute. @type string $id HTML id attribute. }
    Wymagane: Tak
  • (WP_Post) $menu_item The current menu item object.
    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 HTML attributes applied to a menu's list item element.





Źródło

$li_atts       = apply_filters( 'nav_menu_item_attributes', $li_atts, $menu_item, $args, $depth );