walker->has_children) ? 'class="clone' : ''; $attributes2 .= ( $depth > 0 && $args->walker->has_children ) ? ' invis"' : '"'; $item_output2 = $args->before; $item_output2 .= '
'; $item_output2 .= $args->link_before . apply_filters( 'the_title', $this->title4sub, $this->title4subid ) . $args->link_after; $item_output2 .= ( $depth ==0 && $args->walker->has_children ) ? '
' : ''; $item_output2 .= $args->after; $output2 = apply_filters ('walker_nav_menu_start_el', $item_output2); $nonmega = 'submenu'; if (!empty($this->prnt) && 'mega-menu') { $submenu = ($depth == 0) ? ' uk-nav uk-navbar-dropdown-nav uk-grid uk-child-width-expand' : ''; $megamenu = ($depth == 0) ? ' uk-navbar-dropdown full-size-v' : ''; $megamenu2 = ($depth == 0) ? ' uk-navbar-dropdown-grid uk-child-width-expand' : ''; $nonmega = 'nonsub'; if ($depth == 0) { $output .= "\n$indent
\n"; $output .= "\n$indent
\n"; $output .= "\n$indent
\n"; $output .= "\n$indent
\n"; $output .= "\n$indent $output2\n"; } $output .= "\n$indent
    \n"; } else { $showtitle =''; if ($depth >= 0) { $showtitle = "
    $output2"; } $output .= "\n$indent
      $showtitle\n"; } } function start_el( &$output, $item , $depth = 0, $args = array(), $id = 0 ) { $indent = ($depth) ? str_repeat("\t",$depth) : ''; $this->prnt = $item->classes[0]; $this->title4sub = $item->title; $this->title4subid = $item->ID; $li_attributes = ''; $class_names = $value = ''; $classes = empty($item->classes) ? array() : (array) $item->classes; if ($item->classes[0] == 'hi') { } $classes[] = ($args->walker->has_children) ? 'hi' : ''; $classes[] .= ( $depth ==0 && $args->walker->has_children ) ? 'cloner uk-flex uk-flex-center' : ''; $classes[] .= ($item->current || $item->current_item_ancestor) ? '' : ''; $classes[] .= 'menu-item-' . $item->ID; if( $depth && $args->walker->has_children ) { $classes[] = 'dropdown-submenu'; } $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter ($classes ), $item, $args ) ); $class_names = ' class="'. esc_attr($class_names) . '"'; $id = apply_filters('nav_menu_item_id', 'menu-item-'.$item->ID, $item, $args); $id = strlen( $id ) ? ' id="' .esc_attr( $id ) . '"' : ''; if ( $depth == 1) { $output .= $indent . ''; } else { $output .= $indent . ''; } $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 .= ( $args->walker->has_children) ? 'class="trigger-mega-menu"' : ''; $item_output = $args->before; $item_output .= ''; $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; $item_output .= ( $depth ==0 && isset($args->has_children) ) ? ' ' : ''; $item_output .= $args->after; $output .= apply_filters ('walker_nav_menu_start_el', $item_output, $item, $depth, $args); } } class Walker_Nav_Uikit_Side extends Walker_Nav_Menu { public function start_lvl( &$output, $depth = 0, $args = array() ) { $output .= '
        '; } public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { $li_attributes = ''; $class_names = $value = ''; $classes = empty($item->classes) ? array() : (array) $item->classes; $classes[] = ($args->walker->has_children) ? 'uk-parent' : ''; $classes[] .= ($item->current || $item->current_item_ancestor) ? 'uk-active' : ''; $classes[] .= 'menu-item-' . $item->ID; $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter ($classes ), $item, $args ) ); $class_names = ' class="'. esc_attr($class_names) . '"'; $id = apply_filters('nav_menu_item_id', 'menu-item-'.$item->ID, $item, $args); $id = strlen( $id ) ? ' id="' .esc_attr( $id ) . '"' : ''; $output .= $indent . ''; $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) . '"' : ''; $item_output = $args->before; $item_output .= ''; $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; $item_output .= ( $depth ==0 && isset($args->has_children) ) ? ' ' : ''; $item_output .= $args->after; $output .= apply_filters ('walker_nav_menu_start_el', $item_output, $item, $depth, $args); $indent = ($depth) ? str_repeat("\t",$depth) : ''; } }