wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



nav_menu_item_attributes › WordPress Filter Hooks

Seit6.3.0
Veraltetn/v
apply_filters( 'nav_menu_item_attributes', $li_atts, $menu_item, $args, $depth )
Parameter: (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. }
    Erforderlich: Ja
  • (WP_Post) $menu_item The current menu item object.
    Erforderlich: Ja
  • (stdClass) $args An object of wp_nav_menu() arguments.
    Erforderlich: Ja
  • (int) $depth Depth of menu item. Used for padding.
    Erforderlich: Ja
Definiert in:
Codex:

Filters the HTML attributes applied to a menu's list item element.





Quellcode

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