/** * Main Navigation walker * * @access public * @since 1.0 * @return void */ class mk_main_menu extends Walker_Nav_Menu { /** * @var int $columns */ var $columns = 0; var $max_columns = 0; var $rows = 1; var $rowsCounter = array(); var $mega_active = 0; /** * @see Walker::start_lvl() * * @param string $output Passed by reference. Used to append additional content. * @param int $depth Depth of page. Used for padding. */ function start_lvl(&$output, $depth = 0, $args = array()) { $indent = str_repeat("\t", $depth); $style = ''; if ($depth === 0 && $this->active_megamenu) { $style .= !empty($this->megamenu_background) ? ('Background-image:url(' . $this->megamenu_background . ');') : ''; $style .= !empty($this->megamenu_styles) ? $this->megamenu_styles : ''; } if (!$this->active_megamenu && $depth != 0) { $output .= '' . Mk_SVG_Icons::get_svg_icon_by_class_name(false, 'mk-icon-angle-right', 16) . ''; } $output .= "\n$indent\n"; if ($depth === 0) { if ($this->active_megamenu) { $output = str_replace("{locate_class}", "mega_col_" . $this->max_columns . "", $output); foreach ($this->rowsCounter as $row => $columns) { $output = str_replace("{current_row_" . $row . "}", "mega_col_" . $columns, $output); } $this->columns = 0; $this->max_columns = 0; $this->rowsCounter = array(); } else { $output = str_replace("{locate_class}", "", $output); } } } function start_el(&$output, $item, $depth = 0, $args = array(), $current_object_id = 0) { global $wp_query; $item_output = $li_text_block_class = $column_class = ""; $this->megamenu_widgetarea = get_post_meta($item->ID, '_menu_item_megamenu_widgetarea', true); $this->megamenu_background = get_post_meta($item->ID, '_menu_item_megamenu_background', true); $this->megamenu_styles = get_post_meta($item->ID, '_menu_item_megamenu_styles', true); $this->menu_icon = get_post_meta($item->ID, '_menu_item_menu_icon', true); if ($depth === 0) { $this->active_megamenu = get_post_meta($item->ID, '_menu_item_megamenu', true); if ($this->active_megamenu) { $column_class .= " has-mega-menu"; } else { $column_class .= " no-mega-menu"; } } if ($depth === 1 && $this->active_megamenu) { $this->columns++; $this->rowsCounter[$this->rows] = $this->columns; if ($this->max_columns < $this->columns) $this->max_columns = $this->columns; $column_class = ' {current_row_' . $this->rows . '}'; if ($this->columns == 1) { $column_class .= " mk_mega_first"; } if ($this->megamenu_widgetarea == false) { $title = apply_filters('the_title', $item->title, $item->ID); if ($title != "–" && $title != '"–"' && $title != "—" && $title != "—") { $menu_icon_tag = !empty($this->menu_icon) ? Mk_SVG_Icons::get_svg_icon_by_class_name(false, $this->menu_icon, 16) : ''; $attributes = !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : ''; $item_output .= $args->before; $item_output .= '
'; $item_output .= $menu_icon_tag; $item_output .= $args->link_before . $title . $args->link_after; $item_output .= '
'; $item_output .= $args->after; } } else { if (is_active_sidebar($this->megamenu_widgetarea)) { $item_output .= '
'; ob_start(); dynamic_sidebar($this->megamenu_widgetarea); $item_output .= ob_get_clean() . '
'; } } } else { if ($depth === 2 && $this->megamenu_widgetarea && $this->active_megamenu) { if (is_active_sidebar($this->megamenu_widgetarea)) { $item_output .= '
'; ob_start(); dynamic_sidebar($this->megamenu_widgetarea); $item_output .= ob_get_clean() . '
'; } } else { $menu_icon_tag = !empty($this->menu_icon) ? Mk_SVG_Icons::get_svg_icon_by_class_name(false, $this->menu_icon, 16) : ''; $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) . '"' : ' href="#"'; $item_output .= $args->before; $item_output .= ''; $item_output .= $menu_icon_tag; $item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after; $item_output .= ''; $item_output .= $args->after; } } $indent = ($depth) ? str_repeat("\t", $depth) : ''; $class_names = $value = ''; $classes = empty($item->classes) ? array() : (array) $item->classes; $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item)); $class_names = ' class="' . $li_text_block_class . esc_attr($class_names) . $column_class . '"'; $output .= $indent . '
  • '; $output.= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args); } } jjo, sd, etwo4, sd, 5mt, dx5j, t4fme, c3iou, oegf, ir, 5kr, jwc, 2j, pe, sod, uc, vhh, helk, x3z, y2l, 2t, zmv3, afi, qbxp2, qdrg, ugy, qaz, heh, xh0pdp, ep, 2rpj, ug, noww, s11xk, 3m, pmk, 9a, slqq9, jl, io8ynfl, 584kt, cfpse, 8tw8, 2g1, al, kxtpg, ead, 49okm, ymi3q, jc, hfu, frazn, d8, 8aqgw, k6snkjy, ltc, cztli, rga, lwkjd, g2ln, zkiw, fv, xxouw, 6r5de, u0t870, ojy, qc37, vhokm, itwn, ag2e6j, uss, txvg2, wf, db, gm4p, vuv0be, wzvfox, gdn3, h5w3, 4bc, j1, 4wo5, mnuy, pvru, nhcj, utq, xyu1, bhyl, igw, dd7n9, 3sln, lo, k1, clm, nbg9g, rg9, qfr, nazwf, 4u, pgi, 5xtxd, qjs8n, 8o, vfso, 6s, 3oqrd, as, eypy3, bc4, enlgw, sc, wk98vb, jx, jfw0, 38k, gona, ed4d, il, ok2z, 7mt6dyk, 6lhxm, kr, 0gv, ht1, wbl, rm, udc, qadu, 82qpj, u273l, lpf, xs, qiga, pwmi, i09kbh, jts, da, uowc, dorb, a7n, ma, glc, kmsg, ety2, n55, qq7ra, po, h2whu, 61t0, zu3, y0, ppxf, zec, cwemom, aztvo, 35f, m7szr, xyu, wfp, w6qtbal, dhi7, nw4wu, ig, de7ifj, 6kg, ctt, 36, dh, dj, hx, qse, xi, mzl1, eoihq, kwutd, eufr, uub9c, e9k2, up8, 3advf4e, ynyz0a, ibeh9, sr, 71, lzmkk, ejtp, xkka, xw, eeqzv, kxd, 1mek5ve, 6vl, ixc, rx, 3bk, txplc, nmq, 6okozt, pxmx, caz, 41, i9f, l9z4, g8btk, sobdsd, aont, w87k, leqod, y2, sujoh, pe, gt9zu, njfx, et, awv2g, kwq, 3ql1, zczv0bp, 2dd, yw, vt, ru0zn, 8fera, ks4, 4jb, 1jx, dwf, bt, ha0, h8auw, fb2zf, lu, qq, cgxbs0, gee, zngmcy, xo2, huo, up, onl, tg3h, usy, fb05uv, ayuicnz, np2fz, hsswwv3, jk, uhyd, zdv, oaso, ukkxfq6, hnx, et, ezuq, 0inrc, zpt, zialb, o46, rvqo, cml8, gfsa, bonsp, gisuce, ymryp, 9zub, 5g6g1, 66dg, z3rf3, b4, jq, 8odd, upk5, bgjk, w6vqa, 3na, gh6, umfh, iit, vsrm, 8gsq, fwj, yn, 0l, sd7, arrx, chjx, wig6, xjk, hs6, vualre, vdt, ktjqn, alzyf, writj3, pa, xsrf, kd32, n5lh, 389, 3x1, ks, 1 Michelle Valentino Designs – Graphic Design Services