On this page
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.
Parameters
$attsarray-
The HTML attributes applied to the menu item's
<a>element, empty strings are ignored.
hrefstringThe href attribute.aria-currentstringThe aria-current attribute.
$pageWP_Post-
Page data object.
$depthint-
Depth of page, used for padding.
$argsarray-
An array of arguments.
$current_page_idint-
ID of the current page.
Source
File: wp-includes/class-walker-page.php. View all references
$atts = apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page_id );
Related
Used By
| Used By | Description |
|---|---|
| Walker_Page::start_el() wp-includes/class-walker-page.php | Outputs the beginning of the current element in the tree. |
Changelog
| Version | Description |
|---|---|
| 4.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/page_menu_link_attributes