wpseek.com
A WordPress-centric search engine for devs and theme authors



nav_menu_submenu_css_class › WordPress Filter Hooks

Since4.8.0
Deprecatedn/a
apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth )
Parameters: (3)
  • (string[]) $classes Array of the CSS classes that are applied to the menu `<ul>` element.
    Required: Yes
  • (stdClass) $args An object of `wp_nav_menu()` arguments.
    Required: Yes
  • (int) $depth Depth of menu item. Used for padding.
    Required: Yes
Defined at:
Codex:

Filters the CSS class(es) applied to a menu list element.





Source

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