WordPress at a glance
filter is not described

page_menu_link_attributes filter-hook . WP 4.8.0

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

Usage

add_filter( 'page_menu_link_attributes', 'filter_function_name_6385', 10, 5 );
function filter_function_name_6385( $atts, $page, $depth, $args, $current_page ){
	// filter...

	return $atts;
}
$atts(array)

The HTML attributes applied to the menu item's <a> element, empty strings are ignored.

  • $href (string)
    The href attribute.
$page(WP_Post)
Page data object.
$depth(int)
Depth of page, used for padding.
$args(array)
An array of arguments.
$current_page(int)
ID of the current page.

Where the hook is called

Walker_Page::start_el()
wp-includes/class-walker-page.php 176
$atts = apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page );

Where the hook is used (in WP core)

Does not used.