wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



nav_menu_css_class › WordPress Filter Hooks

Seit4.1.0
Veraltetn/v
apply_filters( 'nav_menu_css_class', array_filter( $classes )
Parameter: (4)
  • (string[]) $classes Array of the CSS classes that are applied to the menu item's `<li>` element.
    Erforderlich: Ja
  • (WP_Post) $menu_item The current menu item object.
    Erforderlich: Ja
  • (stdClass) $args An object of wp_nav_menu() arguments.
    Erforderlich: Ja
  • (int) $depth Depth of menu item. Used for padding.
    Erforderlich: Ja
Definiert in:
Codex:

Filters the CSS classes applied to a menu item's list item element.





Quellcode

$class_names = implode( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $menu_item, $args, $depth ) );