WP HOOKS
filtrod 6.3.0

nav_menu_submenu_attributes

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

Opis — z kodu źródłowego

Filters the HTML attributes applied to a menu list element.

Parametry

ParametrTypOpis
$attsarray{ The HTML attributes applied to the <code>&lt;ul&gt;</code> element, empty strings are ignored. @type string $class HTML CSS class attribute. }
$args\stdClassAn object of <code>wp_nav_menu()</code> arguments.
$depthintDepth 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
}

Popularne w tej kategorii