filtrod 6.3.0
nav_menu_submenu_attributes
Opis — z kodu źródłowego
Filters the HTML attributes applied to a menu list element.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$atts | array | { The HTML attributes applied to the <code><ul></code> element, empty strings are ignored. @type string $class HTML CSS class attribute. } |
$args | \stdClass | An object of <code>wp_nav_menu()</code> 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_submenu_attributes', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'nav_menu_submenu_attributes', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii