apply_filters( 'page_menu_link_attributes', array $atts, WP_Post $page, int $depth, array $args, int $current_page_id )

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



(array) 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.


(WP_Post) Page data object.


(int) Depth of page, used for padding.


(array) An array of arguments.


(int) ID of the current page.

Top ↑


File: wp-includes/class-walker-page.php

View on Trac

Top ↑


Version Description
4.8.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.