page_menu_link_attributes

Advertisement

Summery Summery

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

Syntax Syntax

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

Parameters Parameters

$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

Page data object.

$depth

Depth of page, used for padding.

$args

An array of arguments.

$current_page

ID of the current page.

Source Source

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

Advertisement

Changelog Changelog

Changelog
Version Description
4.8.0 Introduced.

Advertisement

Leave a Reply