Filter hook 'nav_menu_link_attributes'

in WP Core File wp-includes/class-walker-nav-menu.php at line 255

Description

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

Occurrences

Filename Line Number
wp-includes/class-walker-nav-menu.php 255

Parameters

Type Name Description
array $atts { The HTML attributes applied to the menu item's `` element, empty strings are ignored.
WP_Post $menu_item The current menu item object.
stdClass $args An object of wp_nav_menu() arguments.
int $depth Depth of menu item. Used for padding.

PHP Doc

/**
		 * Filters the HTML attributes applied to a menu item's anchor element.
		 *
		 * @since 3.6.0
		 * @since 4.1.0 The `$depth` parameter was added.
		 *
		 * @param array $atts {
		 *     The HTML attributes applied to the menu item's `` 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.
		 * }
		 * @param WP_Post  $menu_item The current menu item object.
		 * @param stdClass $args      An object of wp_nav_menu() arguments.
		 * @param int      $depth     Depth of menu item. Used for padding.
		 */