classes as $key => $value) {
$menu_class .= ' ' . $value;
}
if (in_array('menu-item-has-children', $item->classes)) {
// parent
$input_id = "nav-".$item->ID;
$caption = $item->title;
$label = '';
if($args->theme_location === 'primary'){
$label = "\n" .'' . "\n" ;
}
$output .= "\n" . '
';
}
else {
// child
$output .= "\n".'' ."\n" ;
}
}
private function create_a_tag($item, $depth, $args , $label) {
// link attributes
$attributes = ' class="menu_s_a f_box jc_sb ai_c sub_fc"';
$attributes .= ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : '';
$attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : '';
$attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : '';
$attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : '';
//$attributes .= ' class="menu-link ' . ( $depth > 0 ? 'sub-menu-link' : 'main-menu-link' ) . '"';
$item_output = sprintf( '%1$s%3$s%4$s%5$s%6$s%7$s',
$args->before,
$attributes,
$args->link_before,
apply_filters( 'the_title', $item->title, $item->ID ),
$args->link_after,
$label,
$args->after
);
return apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
}
}