filtrod 3.0.1
nav_menu_item_id
Opis — z kodu źródłowego
Filters the ID attribute applied to a menu item's list item element.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$menu_item_id | string | The ID attribute applied to the menu item's <code><li></code> element. |
$menu_item | \WP_Post | The current menu item. |
$args | \stdClass | An object of wp_nav_menu() arguments. |
$depth | int | Depth 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
}
// 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