WordPress at Your Fingertips
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.


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

	return $atts;

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

  • href(string)
    The href attribute.

  • aria-current(string)
    The aria-current attribute.
Page data object.
Depth of page, used for padding.
An array of arguments.
ID of the current page.


Since 4.8.0 Introduced.

Where the hook is called

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

Where in WP core the hook is used WordPress

Usage not found.