I want to replace below class with active
class in menu:
.current-menu-item
and
.current_page_item
I am already using a menu callback which add a class dropdown
in child menu:
class foundation_navigation extends Walker_Nav_Menu {
function start_lvl(&$output, $depth) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent<a href=\"#\" class=\"dropdown-toggle\"><span> </span></a><ul class=\"dropdown\">\n";
}
function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {
$id_field = $this->db_fields['id'];
if ( !empty( $children_elements[ $element->$id_field ] ) ) {
$element->classes[] = 'has-dropdown';
}
Walker_Nav_Menu::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
}
}