wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



nav_menu_link_attributes › WordPress Filter Hooks

Da4.1.0
Deprecaton/a
apply_filters( 'nav_menu_link_attributes', $atts, $menu_item, $args, $depth )
Parametri: (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. }
    Richiesto:
  • (WP_Post) $menu_item The current menu item object.
    Richiesto:
  • (stdClass) $args An object of wp_nav_menu() arguments.
    Richiesto:
  • (int) $depth Depth of menu item. Used for padding.
    Richiesto:
Definito a:
Codex:

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





Sorgenti

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