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

$class_names = implode( ' ', apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth ) );

Changelog

VersionDescription
4.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.