A WordPress-centric search engine for devs and theme authors

page_menu_link_attributes ›

apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page )
Parameters: (5)
  • (array) $atts { The HTML attributes applied to the menu item's `<a>` element, empty strings are ignored. @type string $href The href attribute. @type string $aria_current The aria-current attribute. }
    Required: Yes
  • (WP_Post) $page Page data object.
    Required: Yes
  • (int) $depth Depth of page, used for padding.
    Required: Yes
  • (array) $args An array of arguments.
    Required: Yes
  • (int) $current_page ID of the current page.
    Required: Yes
Defined at:

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


$atts = apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page );