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



nav_menu_link_attributes › Filtr WordPress Hooks

Od4.1.0
Przestarzałyn/a
› apply_filters( 'nav_menu_link_attributes', $atts, $menu_item, $args, $depth )
Parametry: (4)
  • () atts { The HTML attributes applied to the menu item's `<a>` element, empty strings are ignored. @type string $title Title attribute. @type string $target Target attribute. @type string $rel The rel attribute. @type string $href The href attribute. @type string $aria-current The aria-current attribute. }
    Wymagane: Tak
  • () menu_item The current menu item object.
    Wymagane: Tak
  • () args An object of wp_nav_menu() arguments.
    Wymagane: Tak
  • () depth Depth of menu item. Used for padding.
    Wymagane: Tak
Zdefiniowane na:
Codex:

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





Źródło

$atts       = apply_filters( 'nav_menu_link_attributes', $atts, $menu_item, $args, $depth );