On this page
apply_filters( 'nav_menu_submenu_css_class', string[] $classes, stdClass $args, int $depth )
Filters the CSS class(es) applied to a menu list element.
Parameters
$classesstring[]-
Array of the CSS classes that are applied to the menu
<ul>element. $argsstdClass-
An object of
wp_nav_menu()arguments. $depthint-
Depth of menu item. Used for padding.
Source
File: wp-includes/class-walker-nav-menu.php. View all references
$class_names = implode( ' ', apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth ) );
Related
Used By
| Used By | Description |
|---|---|
| Walker_Nav_Menu::start_lvl() wp-includes/class-walker-nav-menu.php | Starts the list before the elements are added. |
Changelog
| Version | Description |
|---|---|
| 4.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/nav_menu_submenu_css_class