In order to make a navigation (from scratch), I've been altering the output of the walker. Currently i am trying to find a way to include the 'Optional CCS Class' (found in Appearances -> Menu's in the WP Admin) to the output item menu (start_el). I am starting to doubt if it is possible at this point. Which is why i would like your help. I am using this array to determine if a item has children or is active:
$usedclasses = array( (in_array('current-menu-item', $item->classes) ? 'current-menu-item' : ''), (in_array('menu-item-has-children', $item->classes) ? 'menu-item-has-children' : ''), ($depth % 2 ? 'odd' : 'even') ); $class_names = 'class="' . implode( ' ', $usedclasses ) . '"'; Is there a way to add the custom added classes without having to include all clutter classes? So trying to avoid using:
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args, $depth ) ); $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';