Uma área de pesquisa sobre o WordPress para devs e autores do tema



nav_menu_link_attributes ›

Desde4.1.0
Obsoleton/a
apply_filters( 'nav_menu_link_attributes', $atts, $item, $args, $depth )
Parâmetros: (4)
  • (array) $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. }
    Required: Yes
  • (WP_Post) $item The current menu item.
    Required: Yes
  • (stdClass) $args An object of wp_nav_menu() arguments.
    Required: Yes
  • (int) $depth Depth of menu item. Used for padding.
    Required: Yes
Definido em:
Codex:

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





Fonte

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