WP HOOKS
filtrod 4.8.0

page_menu_link_attributes

Args 5Plik wp-includes/class-walker-page.phpDokumentacja WP ↗

Opis — z kodu źródłowego

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

Parametry

ParametrTypOpis
$attsarray{ The HTML attributes applied to the menu item's <code>&lt;a&gt;</code> element, empty strings are ignored. @type string $href The href attribute. @type string $aria-current The aria-current attribute. }
$page\WP_PostPage data object.
$depthintDepth of page, used for padding.
$argsarrayAn array of arguments.
$current_page_idintID of the current page.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'page_menu_link_attributes', 'twoja_funkcja', 10, 5 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
	// Twój kod
}

Popularne w tej kategorii