WP HOOKS
filtrod 3.0.1

nav_menu_item_id

Args 4Plik wp-includes/class-walker-nav-menu.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the ID attribute applied to a menu item's list item element.

Parametry

ParametrTypOpis
$menu_item_idstringThe ID attribute applied to the menu item's <code>&lt;li&gt;</code> element.
$menu_item\WP_PostThe current menu item.
$args\stdClassAn object of wp_nav_menu() arguments.
$depthintDepth of menu item. Used for padding.

Wywołanie

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

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

Popularne w tej kategorii