Filters the HTML attributes applied to a menu item's anchor element.
$attsarray$titlestring
$targetstring
$relstring
$hrefstring
$aria-currentstring
$argsstdClass$depthintwp-includes/class-walker-nav-menu.php:280Walker_Nav_Menu::start_el() * @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. */ $atts = apply_filters( 'nav_menu_link_attributes', $atts, $menu_item, $args, $depth ); $attributes = $this->build_atts( $atts ); $item_output = $args->before; $item_output .= '<a' . $attributes . '>'; $item_output .= $args->link_before . $title . $args->link_after; $item_output .= '</a>';Introduced in 3.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.