Max Mega Menu - Version 2.7

Version Description

  • Change: No longer use ":after" pseudo element to display arrows. Use 'span.mega-indicator' instead. This allows the arrows to control the sub menu independantly of the menu text. Custom CSS targeting a.mega-menu-link:after should be updated to target a.mega-menu-link > span.mega-indicator:after.

  • New: Off canvas mobile options under Appearance > Menus > Max Mega Menu Settings > Effect (Mobile). Remember to clear any CSS caching or minification plugins if you have problems activating this functionality.

  • New: "Collapse sub menu" option to hide third/fourth level items within mega menus

  • New: Option to distribute third level items over multiple columns within mega menus

  • New: Options in the theme editor: Border & Text Align options for Second & Third Level Menu Items, Mobile Sub Menu Padding, Toggle Bar Border Radius, Off Canvas Menu Width & Padding

  • New: 31 new Dashicons introduced in WordPress 5.2

  • Improvement: Allow comma separated values for Active Menu Instance

  • Improvement: Add checks around loading CodeMirror to avoid conflicts

  • Improvement: Allow Panel Width (Inner) to be specified in pixels (grid layout only)

  • Improvement: Default "Second Click Behaviour" to "First click opens sub menu, second click follows link"

  • Improvement: Add support for 'MEGA_MENU_HIDE_CSS_NAG' constant

  • Fix: Allow space in input boxes when using tab navigation

  • Fix: Very long titles make save button inaccessible in menu item options

  • Fix: Select2 conflict with WP Job Manager

  • Fix: Mobile sub menu animation sometimes "jumps" when using slide animation

We hope you enjoy Max Mega Menu and the new updates. If you have a spare moment please leave us a quick review. Thanks!

Download this release

Release Info

Developer megamenu
Plugin Icon 128x128 Max Mega Menu
Version 2.7
Comparing to
See all releases

Code changes from version 2.6 to 2.7

classes/menu-item-manager.class.php CHANGED
@@ -91,48 +91,13 @@ class Mega_Menu_Menu_Item_Manager {
91
  // only check the checkbox values if the general settings form was submitted
92
  if ( isset( $_POST['tab'] ) && $_POST['tab'] == 'general_settings' ) {
93
 
94
- // Hide Text checkbox is unchecked
95
- if ( ! isset( $submitted_settings['hide_text'] ) ) {
96
-
97
- $submitted_settings['hide_text'] = 'false';
98
-
99
- }
100
-
101
- // Disable Link checkbox is unchecked
102
- if ( ! isset( $submitted_settings['disable_link'] ) ) {
103
-
104
- $submitted_settings['disable_link'] = 'false';
105
-
106
- }
107
-
108
- // Disable arrow checkbox is unchecked
109
- if ( ! isset ( $submitted_settings['hide_arrow'] ) ) {
110
-
111
- $submitted_settings['hide_arrow'] = 'false';
112
-
113
- }
114
-
115
- // Hide on mobile checkbox is unchecked
116
- if ( ! isset ( $submitted_settings['hide_on_mobile'] ) ) {
117
-
118
- $submitted_settings['hide_on_mobile'] = 'false';
119
-
120
- }
121
-
122
- // Hide on mobile checkbox is unchecked
123
- if ( ! isset ( $submitted_settings['hide_sub_menu_on_mobile'] ) ) {
124
-
125
- $submitted_settings['hide_sub_menu_on_mobile'] = 'false';
126
-
127
- }
128
-
129
- // Hide on desktop checkbox is unchecked
130
- if ( ! isset ( $submitted_settings['hide_on_desktop'] ) ) {
131
-
132
- $submitted_settings['hide_on_desktop'] = 'false';
133
 
 
 
 
 
134
  }
135
-
136
  }
137
 
138
  $submitted_settings = apply_filters( "megamenu_menu_item_submitted_settings", $submitted_settings, $menu_item_id );
@@ -706,6 +671,31 @@ class Mega_Menu_Menu_Item_Manager {
706
  $return .= ' </td>';
707
  $return .= ' </tr>';
708
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
709
  $return .= apply_filters("megamenu_after_menu_item_submenu_settings", "", $tabs, $menu_item_id, $menu_id, $menu_item_depth, $menu_item_meta );
710
 
711
  $return .= ' </table>';
@@ -1064,7 +1054,38 @@ class Mega_Menu_Menu_Item_Manager {
1064
  'dash-f328' => 'dashicons-smiley',
1065
  'dash-f529' => 'dashicons-thumbs-up',
1066
  'dash-f542' => 'dashicons-thumbs-down',
1067
- 'dash-f538' => 'dashicons-layout'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1068
  );
1069
 
1070
  $icons = apply_filters( "megamenu_dashicons", $icons );
91
  // only check the checkbox values if the general settings form was submitted
92
  if ( isset( $_POST['tab'] ) && $_POST['tab'] == 'general_settings' ) {
93
 
94
+ $checkboxes = array("hide_text", "disable_link", "hide_arrow", "hide_on_mobile", "hide_on_desktop", "hide_sub_menu_on_mobile", "collapse_children");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
+ foreach ( $checkboxes as $checkbox ) {
97
+ if ( !isset( $submitted_settings[ $checkbox ] ) ) {
98
+ $submitted_settings[ $checkbox ] = 'false';
99
+ }
100
  }
 
101
  }
102
 
103
  $submitted_settings = apply_filters( "megamenu_menu_item_submitted_settings", $submitted_settings, $menu_item_id );
671
  $return .= ' </td>';
672
  $return .= ' </tr>';
673
 
674
+ if ( $menu_item_depth > 0 ) {
675
+ $css_version = get_transient("megamenu_css_version");
676
+ $notice = "";
677
+
678
+ if ( $css_version && version_compare( $css_version, '2.6.1', '<' ) ) {
679
+ $link = "<a href='" . esc_attr( admin_url( 'admin.php?page=maxmegamenu_tools' ) ) . "'>" . __("Mega Menu") . " > " . __("Tools") . "</a>";
680
+ $notice = "<div class='notice notice-success'><p>";
681
+ $notice .= sprintf( __("Your menu CSS needs to be updated before you can use the following setting. Please go to %s and Clear the CSS Cache (you will only need to do this once).", "megamenu") , $link);
682
+ $notice .= "</p></div>";
683
+ $notice .= "</div><br />";
684
+ }
685
+
686
+
687
+ $return .= ' <tr>';
688
+ $return .= ' <td class="mega-name">';
689
+ $return .= __("Collapse sub menu", "megamenu");
690
+ $return .= ' </td>';
691
+ $return .= ' <td class="mega-value">';
692
+ $return .= $notice;
693
+ $return .= ' <input type="checkbox" name="settings[collapse_children]" value="true" ' . checked( $menu_item_meta['collapse_children'], 'true', false ) . ' />';
694
+ $return .= ' <em>' . __("Only applies to menu items displayed within mega sub menus.", "megamenu") . '</em>';
695
+ $return .= ' </td>';
696
+ $return .= ' </tr>';
697
+ }
698
+
699
  $return .= apply_filters("megamenu_after_menu_item_submenu_settings", "", $tabs, $menu_item_id, $menu_id, $menu_item_depth, $menu_item_meta );
700
 
701
  $return .= ' </table>';
1054
  'dash-f328' => 'dashicons-smiley',
1055
  'dash-f529' => 'dashicons-thumbs-up',
1056
  'dash-f542' => 'dashicons-thumbs-down',
1057
+ 'dash-f538' => 'dashicons-layout',
1058
+ 'dash-f452' => 'dashicons-buddicons-activity',
1059
+ 'dash-f477' => 'dashicons-buddicons-bbpress-logo',
1060
+ 'dash-f448' => 'dashicons-buddicons-buddypress-logo',
1061
+ 'dash-f453' => 'dashicons-buddicons-community',
1062
+ 'dash-f449' => 'dashicons-buddicons-forums',
1063
+ 'dash-f454' => 'dashicons-buddicons-friends',
1064
+ 'dash-f456' => 'dashicons-buddicons-groups',
1065
+ 'dash-f457' => 'dashicons-buddicons-pm',
1066
+ 'dash-f451' => 'dashicons-buddicons-replies',
1067
+ 'dash-f450' => 'dashicons-buddicons-topics',
1068
+ 'dash-f455' => 'dashicons-buddicons-tracking',
1069
+ 'dash-f12c' => 'dashicons-editor-ol-rtl',
1070
+ 'dash-f10c' => 'dashicons-editor-ltr',
1071
+ 'dash-f10d' => 'dashicons-tide',
1072
+ 'dash-f124' => 'dashicons-rest-api',
1073
+ 'dash-f13a' => 'dashicons-code-standards',
1074
+ 'dash-f11d' => 'dashicons-admin-site-alt',
1075
+ 'dash-f11e' => 'dashicons-admin-site-alt2',
1076
+ 'dash-f11f' => 'dashicons-admin-site-alt3',
1077
+ 'dash-f228' => 'dashicons-menu-alt',
1078
+ 'dash-f329' => 'dashicons-menu-alt2',
1079
+ 'dash-f349' => 'dashicons-menu-alt3',
1080
+ 'dash-f12d' => 'dashicons-instagram',
1081
+ 'dash-f12f' => 'dashicons-businesswoman',
1082
+ 'dash-f12e' => 'dashicons-businessperson',
1083
+ 'dash-f467' => 'dashicons-email-alt2',
1084
+ 'dash-f12a' => 'dashicons-yes-alt',
1085
+ 'dash-f129' => 'dashicons-camera-alt',
1086
+ 'dash-f485' => 'dashicons-plugins-checked',
1087
+ 'dash-f113' => 'dashicons-update-alt',
1088
+ 'dash-f121' => 'dashicons-text-page',
1089
  );
1090
 
1091
  $icons = apply_filters( "megamenu_dashicons", $icons );
classes/nav-menus.class.php CHANGED
@@ -31,7 +31,9 @@ class Mega_Menu_Nav_Menus {
31
  'icon_position' => 'left',
32
  'panel_columns' => 6, // total number of columns displayed in the panel
33
  'mega_menu_columns' => 1, // for sub menu items, how many columns to span in the panel,
34
- 'mega_menu_order' => 0
 
 
35
  );
36
 
37
  return apply_filters( "megamenu_menu_item_defaults", $defaults );
@@ -454,7 +456,7 @@ class Mega_Menu_Nav_Menus {
454
  <tr>
455
  <td><?php _e("Effect (Mobile)", "megamenu") ?></td>
456
  <td>
457
- <select name='megamenu_meta[<?php echo $location ?>][effect_mobile]'>
458
  <?php
459
 
460
  $selected = isset( $settings[$location]['effect_mobile'] ) ? $settings[$location]['effect_mobile'] : 'disabled';
@@ -465,8 +467,16 @@ class Mega_Menu_Nav_Menus {
465
  'selected' => $selected == 'disabled',
466
  ),
467
  "slide" => array(
468
- 'label' => __("Slide", "megamenu"),
469
  'selected' => $selected == 'slide',
 
 
 
 
 
 
 
 
470
  )
471
  ), $selected );
472
 
31
  'icon_position' => 'left',
32
  'panel_columns' => 6, // total number of columns displayed in the panel
33
  'mega_menu_columns' => 1, // for sub menu items, how many columns to span in the panel,
34
+ 'mega_menu_order' => 0,
35
+ 'collapse_children' => 'false',
36
+ 'submenu_columns' => 1
37
  );
38
 
39
  return apply_filters( "megamenu_menu_item_defaults", $defaults );
456
  <tr>
457
  <td><?php _e("Effect (Mobile)", "megamenu") ?></td>
458
  <td>
459
+ <select class='megamenu_effect_mobile' name='megamenu_meta[<?php echo $location ?>][effect_mobile]'>
460
  <?php
461
 
462
  $selected = isset( $settings[$location]['effect_mobile'] ) ? $settings[$location]['effect_mobile'] : 'disabled';
467
  'selected' => $selected == 'disabled',
468
  ),
469
  "slide" => array(
470
+ 'label' => __("Slide Down", "megamenu"),
471
  'selected' => $selected == 'slide',
472
+ ),
473
+ "slide_left" => array(
474
+ 'label' => __("Slide Left (Off Canvas)", "megamenu"),
475
+ 'selected' => $selected == 'slide_left',
476
+ ),
477
+ "slide_right" => array(
478
+ 'label' => __("Slide Right (Off Canvas)", "megamenu"),
479
+ 'selected' => $selected == 'slide_right',
480
  )
481
  ), $selected );
482
 
classes/settings.class.php CHANGED
@@ -1748,7 +1748,7 @@ class Mega_Menu_Settings {
1748
  'resets' => array(
1749
  'priority' => 70,
1750
  'title' => __( "Reset Widget Styling", "megamenu" ),
1751
- 'description' => __( "Reset the styling of widgets within the mega menu?", "megamenu" ),
1752
  'settings' => array(
1753
  array(
1754
  'title' => __( "Enabled", "megamenu" ),
@@ -1877,66 +1877,9 @@ class Mega_Menu_Settings {
1877
  )
1878
  )
1879
  ),
1880
- 'menu_item_background' => array(
1881
- 'priority' => 60,
1882
- 'title' => __( "Menu Item Background", "megamenu" ),
1883
- 'description' => __( "The background color for each top level menu item. Tip: Set these values to transparent if you've already set a background color on the menu bar.", "megamenu" ),
1884
- 'settings' => array(
1885
- array(
1886
- 'title' => __( "From", "megamenu" ),
1887
- 'type' => 'color',
1888
- 'key' => 'menu_item_background_from'
1889
- ),
1890
- array(
1891
- 'title' => __( "Copy", "megamenu" ),
1892
- 'type' => 'copy_color',
1893
- 'key' => 'copy_color'
1894
- ),
1895
- array(
1896
- 'title' => __( "To", "megamenu" ),
1897
- 'type' => 'color',
1898
- 'key' => 'menu_item_background_to'
1899
- )
1900
- )
1901
- ),
1902
- 'menu_item_background_hover' => array(
1903
- 'priority' => 70,
1904
- 'title' => __( "Menu Item Background (Hover)", "megamenu" ),
1905
- 'description' => __( "The background color for a top level menu item (on hover).", "megamenu" ),
1906
- 'settings' => array(
1907
- array(
1908
- 'title' => __( "From", "megamenu" ),
1909
- 'type' => 'color',
1910
- 'key' => 'menu_item_background_hover_from'
1911
- ),
1912
- array(
1913
- 'title' => __( "Copy", "megamenu" ),
1914
- 'type' => 'copy_color',
1915
- 'key' => 'copy_color'
1916
- ),
1917
- array(
1918
- 'title' => __( "To", "megamenu" ),
1919
- 'type' => 'color',
1920
- 'key' => 'menu_item_background_hover_to'
1921
- )
1922
- )
1923
- ),
1924
- 'menu_item_spacing' => array(
1925
- 'priority' => 80,
1926
- 'title' => __( "Menu Item Spacing", "megamenu" ),
1927
- 'description' => __( "Define the size of the gap between each top level menu item.", "megamenu" ),
1928
- 'settings' => array(
1929
- array(
1930
- 'title' => "",
1931
- 'type' => 'freetext',
1932
- 'key' => 'menu_item_spacing',
1933
- 'validation' => 'px'
1934
- )
1935
- )
1936
- ),
1937
  'menu_item_font' => array(
1938
- 'priority' => 100,
1939
- 'title' => __( "Font", "megamenu" ),
1940
  'description' => __( "The font to use for each top level menu item.", "megamenu" ),
1941
  'settings' => array(
1942
  array(
@@ -1974,12 +1917,12 @@ class Mega_Menu_Settings {
1974
  'title' => __( "Align", "megamenu" ),
1975
  'type' => 'align',
1976
  'key' => 'menu_item_link_text_align'
1977
- ),
1978
  )
1979
  ),
1980
  'menu_item_font_hover' => array(
1981
- 'priority' => 110,
1982
- 'title' => __( "Font (Hover)", "megamenu" ),
1983
  'description' => __( "Set the font to use for each top level menu item (on hover).", "megamenu" ),
1984
  'settings' => array(
1985
  array(
@@ -1999,9 +1942,67 @@ class Mega_Menu_Settings {
1999
  ),
2000
  )
2001
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2002
  'menu_item_padding' => array(
2003
- 'priority' => 120,
2004
- 'title' => __( "Menu Item Padding", "megamenu" ),
2005
  'description' => __( "Set the padding for each top level menu item.", "megamenu" ),
2006
  'info' => array( __( "Generally we advise against using the Top and Bottom options here. Use the 'Menu Height' setting to determine the height of your top level menu items.", "megamenu" ) ),
2007
  'settings' => array(
@@ -2032,8 +2033,8 @@ class Mega_Menu_Settings {
2032
  )
2033
  ),
2034
  'menu_item_border' => array(
2035
- 'priority' => 130,
2036
- 'title' => __( "Menu Item Border", "megamenu" ),
2037
  'description' => __( "Set the border to display on each top level menu item.", "megamenu" ),
2038
  'settings' => array(
2039
  array(
@@ -2041,6 +2042,11 @@ class Mega_Menu_Settings {
2041
  'type' => 'color',
2042
  'key' => 'menu_item_border_color'
2043
  ),
 
 
 
 
 
2044
  array(
2045
  'title' => __( "Top", "megamenu" ),
2046
  'type' => 'freetext',
@@ -2067,21 +2073,9 @@ class Mega_Menu_Settings {
2067
  )
2068
  )
2069
  ),
2070
- 'menu_item_border_hover' => array(
2071
- 'priority' => 140,
2072
- 'title' => __( "Menu Item Border (Hover)", "megamenu" ),
2073
- 'description' => __( "Set the hover border color.", "megamenu" ),
2074
- 'settings' => array(
2075
- array(
2076
- 'title' => __( "Color", "megamenu" ),
2077
- 'type' => 'color',
2078
- 'key' => 'menu_item_border_color_hover'
2079
- )
2080
- )
2081
- ),
2082
  'menu_item_border_radius' => array(
2083
- 'priority' => 150,
2084
- 'title' => __( "Menu Item Border Radius", "megamenu" ),
2085
  'description' => __( "Set rounded corners for each top level menu item.", "megamenu" ),
2086
  'settings' => array(
2087
  array(
@@ -2112,7 +2106,7 @@ class Mega_Menu_Settings {
2112
  ),
2113
  'menu_item_divider' => array(
2114
  'priority' => 160,
2115
- 'title' => __( "Menu Item Divider", "megamenu" ),
2116
  'description' => __( "Show a small divider bar between each menu item.", "megamenu" ),
2117
  'settings' => array(
2118
  array(
@@ -2136,14 +2130,17 @@ class Mega_Menu_Settings {
2136
  'menu_item_highlight' => array(
2137
  'priority' => 170,
2138
  'title' => __( "Highlight Current Item", "megamenu" ),
2139
- 'description' => __( "Apply the 'hover' styling to current menu items.", "megamenu" ),
2140
  'settings' => array(
2141
  array(
2142
  'title' => __( "Enabled", "megamenu" ),
2143
  'type' => 'checkbox',
2144
  'key' => 'menu_item_highlight_current'
2145
  )
2146
- )
 
 
 
2147
  )
2148
  )
2149
  ),
@@ -2294,7 +2291,7 @@ class Mega_Menu_Settings {
2294
  ),
2295
  'widget_padding' => array(
2296
  'priority' => 60,
2297
- 'title' => __( "Panel Items Padding", "megamenu" ),
2298
  'description' => __( "Use this to define the amount of space around each widget / set of menu items within the sub menu.", "megamenu" ),
2299
  'settings' => array(
2300
  array(
@@ -2330,8 +2327,8 @@ class Mega_Menu_Settings {
2330
  ),
2331
  'widget_heading_font' => array(
2332
  'priority' => 70,
2333
- 'title' => __( "Heading Font", "megamenu" ),
2334
- 'description' => __( "Set the font to use Widget headers in the mega menu. Tip: set this to the same style as the Second Level Menu Item Header font to keep your styling consistent.", "megamenu" ),
2335
  'settings' => array(
2336
  array(
2337
  'title' => __( "Color", "megamenu" ),
@@ -2364,11 +2361,16 @@ class Mega_Menu_Settings {
2364
  'type' => 'decoration',
2365
  'key' => 'panel_header_text_decoration'
2366
  ),
 
 
 
 
 
2367
  )
2368
  ),
2369
  'widget_heading_padding' => array(
2370
  'priority' => 90,
2371
- 'title' => __( "Heading Padding", "megamenu" ),
2372
  'description' => __( "Set the padding for the widget headings.", "megamenu" ),
2373
  'settings' => array(
2374
  array(
@@ -2399,7 +2401,7 @@ class Mega_Menu_Settings {
2399
  ),
2400
  'widget_heading_margin' => array(
2401
  'priority' => 100,
2402
- 'title' => __( "Heading Margin", "megamenu" ),
2403
  'description' => __( "Set the margin for the widget headings.", "megamenu" ),
2404
  'settings' => array(
2405
  array(
@@ -2430,7 +2432,7 @@ class Mega_Menu_Settings {
2430
  ),
2431
  'widget_header_border' => array(
2432
  'priority' => 110,
2433
- 'title' => __( "Header Border", "megamenu" ),
2434
  'description' => __( "Set the border for the widget headings.", "megamenu" ),
2435
  'settings' => array(
2436
  array(
@@ -2438,6 +2440,11 @@ class Mega_Menu_Settings {
2438
  'type' => 'color',
2439
  'key' => 'panel_header_border_color'
2440
  ),
 
 
 
 
 
2441
  array(
2442
  'title' => __( "Top", "megamenu" ),
2443
  'type' => 'freetext',
@@ -2494,7 +2501,7 @@ class Mega_Menu_Settings {
2494
  ),
2495
  'second_level_font' => array(
2496
  'priority' => 130,
2497
- 'title' => __( "Font", "megamenu" ),
2498
  'description' => __( "Set the font for second level menu items when they're displayed in a Mega Menu.", "megamenu" ),
2499
  'settings' => array(
2500
  array(
@@ -2528,11 +2535,16 @@ class Mega_Menu_Settings {
2528
  'type' => 'decoration',
2529
  'key' => 'panel_second_level_text_decoration'
2530
  ),
 
 
 
 
 
2531
  )
2532
  ),
2533
  'second_level_font_hover' => array(
2534
  'priority' => 140,
2535
- 'title' => __( "Font (Hover)", "megamenu" ),
2536
  'description' => __( "Set the font style on hover.", "megamenu" ),
2537
  'settings' => array(
2538
  array(
@@ -2554,7 +2566,7 @@ class Mega_Menu_Settings {
2554
  ),
2555
  'second_level_background_hover' => array(
2556
  'priority' => 150,
2557
- 'title' => __( "Background (Hover)", "megamenu" ),
2558
  'description' => __( "Set the background hover color for second level menu items.", "megamenu" ),
2559
  'settings' => array(
2560
  array(
@@ -2576,7 +2588,7 @@ class Mega_Menu_Settings {
2576
  ),
2577
  'second_level_padding' => array(
2578
  'priority' => 160,
2579
- 'title' => __( "Padding", "megamenu" ),
2580
  'description' => __( "Set the padding for the second level menu items.", "megamenu" ),
2581
  'settings' => array(
2582
  array(
@@ -2607,7 +2619,7 @@ class Mega_Menu_Settings {
2607
  ),
2608
  'second_level_margin' => array(
2609
  'priority' => 170,
2610
- 'title' => __( "Margin", "megamenu" ),
2611
  'description' => __( "Set the margin for the second level menu items.", "megamenu" ),
2612
  'settings' => array(
2613
  array(
@@ -2638,7 +2650,7 @@ class Mega_Menu_Settings {
2638
  ),
2639
  'second_level_border' => array(
2640
  'priority' => 180,
2641
- 'title' => __( "Border", "megamenu" ),
2642
  'description' => __( "Set the border for the second level menu items.", "megamenu" ),
2643
  'settings' => array(
2644
  array(
@@ -2646,6 +2658,11 @@ class Mega_Menu_Settings {
2646
  'type' => 'color',
2647
  'key' => 'panel_second_level_border_color'
2648
  ),
 
 
 
 
 
2649
  array(
2650
  'title' => __( "Top", "megamenu" ),
2651
  'type' => 'freetext',
@@ -2679,7 +2696,7 @@ class Mega_Menu_Settings {
2679
  ),
2680
  'third_level_font' => array(
2681
  'priority' => 200,
2682
- 'title' => __( "Font", "megamenu" ),
2683
  'description' => __( "Set the font for third level menu items when they're displayed in a Mega Menu.", "megamenu" ),
2684
  'settings' => array(
2685
  array(
@@ -2713,11 +2730,16 @@ class Mega_Menu_Settings {
2713
  'type' => 'decoration',
2714
  'key' => 'panel_third_level_text_decoration'
2715
  ),
 
 
 
 
 
2716
  )
2717
  ),
2718
  'third_level_font_hover' => array(
2719
  'priority' => 210,
2720
- 'title' => __( "Font (Hover)", "megamenu" ),
2721
  'description' => __( "Set the font style on hover.", "megamenu" ),
2722
  'settings' => array(
2723
  array(
@@ -2739,7 +2761,7 @@ class Mega_Menu_Settings {
2739
  ),
2740
  'third_level_background_hover' => array(
2741
  'priority' => 220,
2742
- 'title' => __( "Background (Hover)", "megamenu" ),
2743
  'description' => __( "Set the background hover color for third level menu items.", "megamenu" ),
2744
  'settings' => array(
2745
  array(
@@ -2761,7 +2783,7 @@ class Mega_Menu_Settings {
2761
  ),
2762
  'third_level_padding' => array(
2763
  'priority' => 230,
2764
- 'title' => __( "Padding", "megamenu" ),
2765
  'description' => __( "Set the padding for the third level menu items.", "megamenu" ),
2766
  'settings' => array(
2767
  array(
@@ -2789,7 +2811,80 @@ class Mega_Menu_Settings {
2789
  'validation' => 'px'
2790
  )
2791
  )
2792
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2793
  )
2794
  ),
2795
  'flyout_menus' => array(
@@ -3145,6 +3240,37 @@ class Mega_Menu_Settings {
3145
  )
3146
  )
3147
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3148
  'disable_mobile_toggle' => array(
3149
  'priority' => 28,
3150
  'title' => __( "Disable Mobile Toggle Bar", "megamenu" ),
@@ -3187,7 +3313,7 @@ class Mega_Menu_Settings {
3187
  ),
3188
  'mobile_menu_overlay' => array(
3189
  'priority' => 34,
3190
- 'title' => __( "Sub Menu - Overlay Content", "megamenu" ),
3191
  'description' => __( "If enabled, the mobile sub menu will overlay the page content (instead of pushing the page content down)", "megamenu" ),
3192
  'settings' => array(
3193
  array(
@@ -3199,8 +3325,8 @@ class Mega_Menu_Settings {
3199
  ),
3200
  'mobile_menu_force_width' => array(
3201
  'priority' => 35,
3202
- 'title' => __( "Sub Menu - Force Full Width", "megamenu" ),
3203
- 'description' => __( "Experimental: If enabled, the mobile sub menu will match the width and position on the given page element (rather than being limited to the width of the toggle bar). For a full width sub menu, leave the 'Selector' value set to 'body'.", "megamenu" ),
3204
  'settings' => array(
3205
  array(
3206
  'title' => "Enabled",
@@ -3214,6 +3340,19 @@ class Mega_Menu_Settings {
3214
  ),
3215
  )
3216
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
3217
  'mobile_menu_item_height' => array(
3218
  'priority' => 38,
3219
  'title' => __( "Menu Item Height", "megamenu" ),
@@ -3226,6 +3365,37 @@ class Mega_Menu_Settings {
3226
  )
3227
  )
3228
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3229
  'mobile_background' => array(
3230
  'priority' => 40,
3231
  'title' => __( "Menu Background", "megamenu" ),
@@ -3955,23 +4125,28 @@ class Mega_Menu_Settings {
3955
  * @since 1.8.3
3956
  */
3957
  public function enqueue_scripts() {
3958
- wp_enqueue_script('accordion');
 
 
3959
 
3960
  wp_enqueue_style( 'spectrum', MEGAMENU_BASE_URL . 'js/spectrum/spectrum.css', false, MEGAMENU_VERSION );
3961
  wp_enqueue_style( 'mega-menu-settings', MEGAMENU_BASE_URL . 'css/admin/admin.css', false, MEGAMENU_VERSION );
3962
- wp_deregister_style('codemirror');
3963
  wp_enqueue_style( 'select2', MEGAMENU_BASE_URL . 'js/select2/select2.css', false, MEGAMENU_VERSION );
3964
 
 
3965
  wp_enqueue_script( 'spectrum', MEGAMENU_BASE_URL . 'js/spectrum/spectrum.js', array( 'jquery' ), MEGAMENU_VERSION );
3966
- wp_deregister_script('codemirror');
3967
 
3968
- $cm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/x-scss'));
3969
- wp_localize_script('jquery', 'cm_settings', $cm_settings);
 
3970
 
3971
- wp_enqueue_style('wp-codemirror');
 
 
 
3972
 
3973
- wp_enqueue_script( 'mega-menu-select2', MEGAMENU_BASE_URL . 'js/select2/select2.min.js', array(), MEGAMENU_VERSION );
3974
- wp_enqueue_script( 'mega-menu-theme-editor', MEGAMENU_BASE_URL . 'js/settings.js', array( 'jquery', 'spectrum' ), MEGAMENU_VERSION );
3975
 
3976
  wp_localize_script( 'mega-menu-theme-editor', 'megamenu_settings',
3977
  array(
1748
  'resets' => array(
1749
  'priority' => 70,
1750
  'title' => __( "Reset Widget Styling", "megamenu" ),
1751
+ 'description' => __( "Caution: Reset the styling of widgets within the mega menu? This may break the styling of widgets that you have added to your sub menus. Default: Disabled.", "megamenu" ),
1752
  'settings' => array(
1753
  array(
1754
  'title' => __( "Enabled", "megamenu" ),
1877
  )
1878
  )
1879
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1880
  'menu_item_font' => array(
1881
+ 'priority' => 60,
1882
+ 'title' => __( "Item Font", "megamenu" ),
1883
  'description' => __( "The font to use for each top level menu item.", "megamenu" ),
1884
  'settings' => array(
1885
  array(
1917
  'title' => __( "Align", "megamenu" ),
1918
  'type' => 'align',
1919
  'key' => 'menu_item_link_text_align'
1920
+ )
1921
  )
1922
  ),
1923
  'menu_item_font_hover' => array(
1924
+ 'priority' => 65,
1925
+ 'title' => __( "Item Font (Hover)", "megamenu" ),
1926
  'description' => __( "Set the font to use for each top level menu item (on hover).", "megamenu" ),
1927
  'settings' => array(
1928
  array(
1942
  ),
1943
  )
1944
  ),
1945
+ 'menu_item_background' => array(
1946
+ 'priority' => 70,
1947
+ 'title' => __( "Item Background", "megamenu" ),
1948
+ 'description' => __( "The background color for each top level menu item. Tip: Set these values to transparent if you've already set a background color on the menu bar.", "megamenu" ),
1949
+ 'settings' => array(
1950
+ array(
1951
+ 'title' => __( "From", "megamenu" ),
1952
+ 'type' => 'color',
1953
+ 'key' => 'menu_item_background_from'
1954
+ ),
1955
+ array(
1956
+ 'title' => __( "Copy", "megamenu" ),
1957
+ 'type' => 'copy_color',
1958
+ 'key' => 'copy_color'
1959
+ ),
1960
+ array(
1961
+ 'title' => __( "To", "megamenu" ),
1962
+ 'type' => 'color',
1963
+ 'key' => 'menu_item_background_to'
1964
+ )
1965
+ )
1966
+ ),
1967
+ 'menu_item_background_hover' => array(
1968
+ 'priority' => 75,
1969
+ 'title' => __( "Item Background (Hover)", "megamenu" ),
1970
+ 'description' => __( "The background color for a top level menu item (on hover).", "megamenu" ),
1971
+ 'settings' => array(
1972
+ array(
1973
+ 'title' => __( "From", "megamenu" ),
1974
+ 'type' => 'color',
1975
+ 'key' => 'menu_item_background_hover_from'
1976
+ ),
1977
+ array(
1978
+ 'title' => __( "Copy", "megamenu" ),
1979
+ 'type' => 'copy_color',
1980
+ 'key' => 'copy_color'
1981
+ ),
1982
+ array(
1983
+ 'title' => __( "To", "megamenu" ),
1984
+ 'type' => 'color',
1985
+ 'key' => 'menu_item_background_hover_to'
1986
+ )
1987
+ )
1988
+ ),
1989
+ 'menu_item_spacing' => array(
1990
+ 'priority' => 80,
1991
+ 'title' => __( "Item Spacing", "megamenu" ),
1992
+ 'description' => __( "Define the size of the gap between each top level menu item.", "megamenu" ),
1993
+ 'settings' => array(
1994
+ array(
1995
+ 'title' => "",
1996
+ 'type' => 'freetext',
1997
+ 'key' => 'menu_item_spacing',
1998
+ 'validation' => 'px'
1999
+ )
2000
+ )
2001
+ ),
2002
+
2003
  'menu_item_padding' => array(
2004
+ 'priority' => 85,
2005
+ 'title' => __( "Item Padding", "megamenu" ),
2006
  'description' => __( "Set the padding for each top level menu item.", "megamenu" ),
2007
  'info' => array( __( "Generally we advise against using the Top and Bottom options here. Use the 'Menu Height' setting to determine the height of your top level menu items.", "megamenu" ) ),
2008
  'settings' => array(
2033
  )
2034
  ),
2035
  'menu_item_border' => array(
2036
+ 'priority' => 90,
2037
+ 'title' => __( "Item Border", "megamenu" ),
2038
  'description' => __( "Set the border to display on each top level menu item.", "megamenu" ),
2039
  'settings' => array(
2040
  array(
2042
  'type' => 'color',
2043
  'key' => 'menu_item_border_color'
2044
  ),
2045
+ array(
2046
+ 'title' => __( "Color (Hover)", "megamenu" ),
2047
+ 'type' => 'color',
2048
+ 'key' => 'menu_item_border_color_hover'
2049
+ ),
2050
  array(
2051
  'title' => __( "Top", "megamenu" ),
2052
  'type' => 'freetext',
2073
  )
2074
  )
2075
  ),
 
 
 
 
 
 
 
 
 
 
 
 
2076
  'menu_item_border_radius' => array(
2077
+ 'priority' => 95,
2078
+ 'title' => __( "Item Border Radius", "megamenu" ),
2079
  'description' => __( "Set rounded corners for each top level menu item.", "megamenu" ),
2080
  'settings' => array(
2081
  array(
2106
  ),
2107
  'menu_item_divider' => array(
2108
  'priority' => 160,
2109
+ 'title' => __( "Item Divider", "megamenu" ),
2110
  'description' => __( "Show a small divider bar between each menu item.", "megamenu" ),
2111
  'settings' => array(
2112
  array(
2130
  'menu_item_highlight' => array(
2131
  'priority' => 170,
2132
  'title' => __( "Highlight Current Item", "megamenu" ),
2133
+ 'description' => __( "Apply the 'hover' styling to current menu items. Applies to top level menu items only.", "megamenu" ),
2134
  'settings' => array(
2135
  array(
2136
  'title' => __( "Enabled", "megamenu" ),
2137
  'type' => 'checkbox',
2138
  'key' => 'menu_item_highlight_current'
2139
  )
2140
+ ),
2141
+ 'info' => array(
2142
+ "<a href='https://www.megamenu.com/documentation/highlight-active-menu-items/' target='blank'>" . __("Documentation: Highlighting Menu Items", "megamenu") . '</a>'
2143
+ ),
2144
  )
2145
  )
2146
  ),
2291
  ),
2292
  'widget_padding' => array(
2293
  'priority' => 60,
2294
+ 'title' => __( "Column Padding", "megamenu" ),
2295
  'description' => __( "Use this to define the amount of space around each widget / set of menu items within the sub menu.", "megamenu" ),
2296
  'settings' => array(
2297
  array(
2327
  ),
2328
  'widget_heading_font' => array(
2329
  'priority' => 70,
2330
+ 'title' => __( "Title Font", "megamenu" ),
2331
+ 'description' => __( "Set the font to use Widget headers in the mega menu. Tip: set this to the same style as the Second Level Menu Item Font to keep your styling consistent.", "megamenu" ),
2332
  'settings' => array(
2333
  array(
2334
  'title' => __( "Color", "megamenu" ),
2361
  'type' => 'decoration',
2362
  'key' => 'panel_header_text_decoration'
2363
  ),
2364
+ array(
2365
+ 'title' => __( "Align", "megamenu" ),
2366
+ 'type' => 'align',
2367
+ 'key' => 'panel_header_text_align'
2368
+ ),
2369
  )
2370
  ),
2371
  'widget_heading_padding' => array(
2372
  'priority' => 90,
2373
+ 'title' => __( "Title Padding", "megamenu" ),
2374
  'description' => __( "Set the padding for the widget headings.", "megamenu" ),
2375
  'settings' => array(
2376
  array(
2401
  ),
2402
  'widget_heading_margin' => array(
2403
  'priority' => 100,
2404
+ 'title' => __( "Title Margin", "megamenu" ),
2405
  'description' => __( "Set the margin for the widget headings.", "megamenu" ),
2406
  'settings' => array(
2407
  array(
2432
  ),
2433
  'widget_header_border' => array(
2434
  'priority' => 110,
2435
+ 'title' => __( "Title Border", "megamenu" ),
2436
  'description' => __( "Set the border for the widget headings.", "megamenu" ),
2437
  'settings' => array(
2438
  array(
2440
  'type' => 'color',
2441
  'key' => 'panel_header_border_color'
2442
  ),
2443
+ array(
2444
+ 'title' => __( "Color (Hover)", "megamenu" ),
2445
+ 'type' => 'color',
2446
+ 'key' => 'panel_header_border_color_hover'
2447
+ ),
2448
  array(
2449
  'title' => __( "Top", "megamenu" ),
2450
  'type' => 'freetext',
2501
  ),
2502
  'second_level_font' => array(
2503
  'priority' => 130,
2504
+ 'title' => __( "Item Font", "megamenu" ),
2505
  'description' => __( "Set the font for second level menu items when they're displayed in a Mega Menu.", "megamenu" ),
2506
  'settings' => array(
2507
  array(
2535
  'type' => 'decoration',
2536
  'key' => 'panel_second_level_text_decoration'
2537
  ),
2538
+ array(
2539
+ 'title' => __( "Align", "megamenu" ),
2540
+ 'type' => 'align',
2541
+ 'key' => 'panel_second_level_text_align'
2542
+ ),
2543
  )
2544
  ),
2545
  'second_level_font_hover' => array(
2546
  'priority' => 140,
2547
+ 'title' => __( "Item Font (Hover)", "megamenu" ),
2548
  'description' => __( "Set the font style on hover.", "megamenu" ),
2549
  'settings' => array(
2550
  array(
2566
  ),
2567
  'second_level_background_hover' => array(
2568
  'priority' => 150,
2569
+ 'title' => __( "Item Background (Hover)", "megamenu" ),
2570
  'description' => __( "Set the background hover color for second level menu items.", "megamenu" ),
2571
  'settings' => array(
2572
  array(
2588
  ),
2589
  'second_level_padding' => array(
2590
  'priority' => 160,
2591
+ 'title' => __( "Item Padding", "megamenu" ),
2592
  'description' => __( "Set the padding for the second level menu items.", "megamenu" ),
2593
  'settings' => array(
2594
  array(
2619
  ),
2620
  'second_level_margin' => array(
2621
  'priority' => 170,
2622
+ 'title' => __( "Item Margin", "megamenu" ),
2623
  'description' => __( "Set the margin for the second level menu items.", "megamenu" ),
2624
  'settings' => array(
2625
  array(
2650
  ),
2651
  'second_level_border' => array(
2652
  'priority' => 180,
2653
+ 'title' => __( "Item Border", "megamenu" ),
2654
  'description' => __( "Set the border for the second level menu items.", "megamenu" ),
2655
  'settings' => array(
2656
  array(
2658
  'type' => 'color',
2659
  'key' => 'panel_second_level_border_color'
2660
  ),
2661
+ array(
2662
+ 'title' => __( "Color (Hover)", "megamenu" ),
2663
+ 'type' => 'color',
2664
+ 'key' => 'panel_second_level_border_color_hover'
2665
+ ),
2666
  array(
2667
  'title' => __( "Top", "megamenu" ),
2668
  'type' => 'freetext',
2696
  ),
2697
  'third_level_font' => array(
2698
  'priority' => 200,
2699
+ 'title' => __( "Item Font", "megamenu" ),
2700
  'description' => __( "Set the font for third level menu items when they're displayed in a Mega Menu.", "megamenu" ),
2701
  'settings' => array(
2702
  array(
2730
  'type' => 'decoration',
2731
  'key' => 'panel_third_level_text_decoration'
2732
  ),
2733
+ array(
2734
+ 'title' => __( "Align", "megamenu" ),
2735
+ 'type' => 'align',
2736
+ 'key' => 'panel_third_level_text_align'
2737
+ ),
2738
  )
2739
  ),
2740
  'third_level_font_hover' => array(
2741
  'priority' => 210,
2742
+ 'title' => __( "Item Font (Hover)", "megamenu" ),
2743
  'description' => __( "Set the font style on hover.", "megamenu" ),
2744
  'settings' => array(
2745
  array(
2761
  ),
2762
  'third_level_background_hover' => array(
2763
  'priority' => 220,
2764
+ 'title' => __( "Item Background (Hover)", "megamenu" ),
2765
  'description' => __( "Set the background hover color for third level menu items.", "megamenu" ),
2766
  'settings' => array(
2767
  array(
2783
  ),
2784
  'third_level_padding' => array(
2785
  'priority' => 230,
2786
+ 'title' => __( "Item Padding", "megamenu" ),
2787
  'description' => __( "Set the padding for the third level menu items.", "megamenu" ),
2788
  'settings' => array(
2789
  array(
2811
  'validation' => 'px'
2812
  )
2813
  )
2814
+ ),
2815
+
2816
+ 'third_level_margin' => array(
2817
+ 'priority' => 235,
2818
+ 'title' => __( "Item Margin", "megamenu" ),
2819
+ 'description' => __( "Set the margin for the third level menu items.", "megamenu" ),
2820
+ 'settings' => array(
2821
+ array(
2822
+ 'title' => __( "Top", "megamenu" ),
2823
+ 'type' => 'freetext',
2824
+ 'key' => 'panel_third_level_margin_top',
2825
+ 'validation' => 'px'
2826
+ ),
2827
+ array(
2828
+ 'title' => __( "Right", "megamenu" ),
2829
+ 'type' => 'freetext',
2830
+ 'key' => 'panel_third_level_margin_right',
2831
+ 'validation' => 'px'
2832
+ ),
2833
+ array(
2834
+ 'title' => __( "Bottom", "megamenu" ),
2835
+ 'type' => 'freetext',
2836
+ 'key' => 'panel_third_level_margin_bottom',
2837
+ 'validation' => 'px'
2838
+ ),
2839
+ array(
2840
+ 'title' => __( "Left", "megamenu" ),
2841
+ 'type' => 'freetext',
2842
+ 'key' => 'panel_third_level_margin_left',
2843
+ 'validation' => 'px'
2844
+ )
2845
+ )
2846
+ ),
2847
+ 'third_level_border' => array(
2848
+ 'priority' => 237,
2849
+ 'title' => __( "Item Border", "megamenu" ),
2850
+ 'description' => __( "Set the border for the third level menu items.", "megamenu" ),
2851
+ 'settings' => array(
2852
+ array(
2853
+ 'title' => __( "Color", "megamenu" ),
2854
+ 'type' => 'color',
2855
+ 'key' => 'panel_third_level_border_color'
2856
+ ),
2857
+ array(
2858
+ 'title' => __( "Color (Hover)", "megamenu" ),
2859
+ 'type' => 'color',
2860
+ 'key' => 'panel_third_level_border_color_hover'
2861
+ ),
2862
+ array(
2863
+ 'title' => __( "Top", "megamenu" ),
2864
+ 'type' => 'freetext',
2865
+ 'key' => 'panel_third_level_border_top',
2866
+ 'validation' => 'px'
2867
+ ),
2868
+ array(
2869
+ 'title' => __( "Right", "megamenu" ),
2870
+ 'type' => 'freetext',
2871
+ 'key' => 'panel_third_level_border_right',
2872
+ 'validation' => 'px'
2873
+ ),
2874
+ array(
2875
+ 'title' => __( "Bottom", "megamenu" ),
2876
+ 'type' => 'freetext',
2877
+ 'key' => 'panel_third_level_border_bottom',
2878
+ 'validation' => 'px'
2879
+ ),
2880
+ array(
2881
+ 'title' => __( "Left", "megamenu" ),
2882
+ 'type' => 'freetext',
2883
+ 'key' => 'panel_third_level_border_left',
2884
+ 'validation' => 'px'
2885
+ )
2886
+ )
2887
+ ),
2888
  )
2889
  ),
2890
  'flyout_menus' => array(
3240
  )
3241
  )
3242
  ),
3243
+ 'toggle_bar_border_radius' => array(
3244
+ 'priority' => 26,
3245
+ 'title' => __( "Toggle Bar Border Radius", "megamenu" ),
3246
+ 'description' => __( "Set a border radius on the mobile toggle bar.", "megamenu" ),
3247
+ 'settings' => array(
3248
+ array(
3249
+ 'title' => __( "Top Left", "megamenu" ),
3250
+ 'type' => 'freetext',
3251
+ 'key' => 'toggle_bar_border_radius_top_left',
3252
+ 'validation' => 'px'
3253
+ ),
3254
+ array(
3255
+ 'title' => __( "Top Right", "megamenu" ),
3256
+ 'type' => 'freetext',
3257
+ 'key' => 'toggle_bar_border_radius_top_right',
3258
+ 'validation' => 'px'
3259
+ ),
3260
+ array(
3261
+ 'title' => __( "Bottom Right", "megamenu" ),
3262
+ 'type' => 'freetext',
3263
+ 'key' => 'toggle_bar_border_radius_bottom_right',
3264
+ 'validation' => 'px'
3265
+ ),
3266
+ array(
3267
+ 'title' => __( "Bottom Left", "megamenu" ),
3268
+ 'type' => 'freetext',
3269
+ 'key' => 'toggle_bar_border_radius_bottom_left',
3270
+ 'validation' => 'px'
3271
+ )
3272
+ )
3273
+ ),
3274
  'disable_mobile_toggle' => array(
3275
  'priority' => 28,
3276
  'title' => __( "Disable Mobile Toggle Bar", "megamenu" ),
3313
  ),
3314
  'mobile_menu_overlay' => array(
3315
  'priority' => 34,
3316
+ 'title' => __( "Overlay Content", "megamenu" ),
3317
  'description' => __( "If enabled, the mobile sub menu will overlay the page content (instead of pushing the page content down)", "megamenu" ),
3318
  'settings' => array(
3319
  array(
3325
  ),
3326
  'mobile_menu_force_width' => array(
3327
  'priority' => 35,
3328
+ 'title' => __( "Force Full Width", "megamenu" ),
3329
+ 'description' => __( "If enabled, the mobile sub menu will match the width and position on the given page element (rather than being limited to the width of the toggle bar). For a full width sub menu, leave the 'Selector' value set to 'body'.", "megamenu" ),
3330
  'settings' => array(
3331
  array(
3332
  'title' => "Enabled",
3340
  ),
3341
  )
3342
  ),
3343
+ 'mobile_menu_off_canvas_width' => array(
3344
+ 'priority' => 36,
3345
+ 'title' => __( "Off Canvas Width", "megamenu" ),
3346
+ 'description' => __( "The width of the sub menu if the Mobile Effect is set to 'Slide Left' or 'Slide Right'. Must be specified in px.", "megamenu" ),
3347
+ 'settings' => array(
3348
+ array(
3349
+ 'title' => "",
3350
+ 'type' => 'freetext',
3351
+ 'key' => 'mobile_menu_off_canvas_width',
3352
+ 'validation' => 'px'
3353
+ ),
3354
+ )
3355
+ ),
3356
  'mobile_menu_item_height' => array(
3357
  'priority' => 38,
3358
  'title' => __( "Menu Item Height", "megamenu" ),
3365
  )
3366
  )
3367
  ),
3368
+ 'mobile_menu_padding' => array(
3369
+ 'priority' => 39,
3370
+ 'title' => __( "Menu Padding", "megamenu" ),
3371
+ 'description' => __( "Padding for the mobile sub menu.", "megamenu" ),
3372
+ 'settings' => array(
3373
+ array(
3374
+ 'title' => __( "Top", "megamenu" ),
3375
+ 'type' => 'freetext',
3376
+ 'key' => 'mobile_menu_padding_top',
3377
+ 'validation' => 'px'
3378
+ ),
3379
+ array(
3380
+ 'title' => __( "Right", "megamenu" ),
3381
+ 'type' => 'freetext',
3382
+ 'key' => 'mobile_menu_padding_right',
3383
+ 'validation' => 'px'
3384
+ ),
3385
+ array(
3386
+ 'title' => __( "Bottom", "megamenu" ),
3387
+ 'type' => 'freetext',
3388
+ 'key' => 'mobile_menu_padding_bottom',
3389
+ 'validation' => 'px'
3390
+ ),
3391
+ array(
3392
+ 'title' => __( "Left", "megamenu" ),
3393
+ 'type' => 'freetext',
3394
+ 'key' => 'mobile_menu_padding_left',
3395
+ 'validation' => 'px'
3396
+ )
3397
+ )
3398
+ ),
3399
  'mobile_background' => array(
3400
  'priority' => 40,
3401
  'title' => __( "Menu Background", "megamenu" ),
4125
  * @since 1.8.3
4126
  */
4127
  public function enqueue_scripts() {
4128
+
4129
+ wp_deregister_style('select2');
4130
+ wp_deregister_script('select2');
4131
 
4132
  wp_enqueue_style( 'spectrum', MEGAMENU_BASE_URL . 'js/spectrum/spectrum.css', false, MEGAMENU_VERSION );
4133
  wp_enqueue_style( 'mega-menu-settings', MEGAMENU_BASE_URL . 'css/admin/admin.css', false, MEGAMENU_VERSION );
 
4134
  wp_enqueue_style( 'select2', MEGAMENU_BASE_URL . 'js/select2/select2.css', false, MEGAMENU_VERSION );
4135
 
4136
+ wp_enqueue_script( 'accordion' );
4137
  wp_enqueue_script( 'spectrum', MEGAMENU_BASE_URL . 'js/spectrum/spectrum.js', array( 'jquery' ), MEGAMENU_VERSION );
4138
+ wp_enqueue_script( 'mega-menu-select2', MEGAMENU_BASE_URL . 'js/select2/select2.min.js', array(), MEGAMENU_VERSION );
4139
 
4140
+ if ( function_exists('wp_enqueue_code_editor') ) {
4141
+ wp_deregister_style('codemirror');
4142
+ wp_deregister_script('codemirror');
4143
 
4144
+ $cm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/x-scss'));
4145
+ wp_localize_script('jquery', 'cm_settings', $cm_settings);
4146
+ wp_enqueue_style('wp-codemirror');
4147
+ }
4148
 
4149
+ wp_enqueue_script( 'mega-menu-theme-editor', MEGAMENU_BASE_URL . 'js/settings.js', array( 'jquery', 'spectrum', 'code-editor' ), MEGAMENU_VERSION );
 
4150
 
4151
  wp_localize_script( 'mega-menu-theme-editor', 'megamenu_settings',
4152
  array(
classes/style-manager.class.php CHANGED
@@ -135,6 +135,7 @@ final class Mega_Menu_Style_Manager {
135
  'panel_border_radius_bottom_right' => '0px',
136
  'panel_header_color' => '#555',
137
  'panel_header_text_transform' => 'uppercase',
 
138
  'panel_header_font' => 'inherit',
139
  'panel_header_font_size' => '16px',
140
  'panel_header_font_weight' => 'bold',
@@ -147,7 +148,8 @@ final class Mega_Menu_Style_Manager {
147
  'panel_header_margin_right' => '0px',
148
  'panel_header_margin_bottom' => '0px',
149
  'panel_header_margin_left' => '0px',
150
- 'panel_header_border_color' => 'panel_header_color',
 
151
  'panel_header_border_left' => '0px',
152
  'panel_header_border_right' => '0px',
153
  'panel_header_border_top' => '0px',
@@ -166,6 +168,7 @@ final class Mega_Menu_Style_Manager {
166
  'panel_second_level_font_color' => 'panel_header_color',
167
  'panel_second_level_font_color_hover' => 'panel_header_color',
168
  'panel_second_level_text_transform' => 'panel_header_text_transform',
 
169
  'panel_second_level_font' => 'panel_header_font',
170
  'panel_second_level_font_size' => 'panel_header_font_size',
171
  'panel_second_level_font_weight' => 'panel_header_font_weight',
@@ -182,7 +185,8 @@ final class Mega_Menu_Style_Manager {
182
  'panel_second_level_margin_right' => '0px',
183
  'panel_second_level_margin_top' => '0px',
184
  'panel_second_level_margin_bottom' => '0px',
185
- 'panel_second_level_border_color' => 'panel_header_color',
 
186
  'panel_second_level_border_left' => '0px',
187
  'panel_second_level_border_right' => '0px',
188
  'panel_second_level_border_top' => '0px',
@@ -190,6 +194,7 @@ final class Mega_Menu_Style_Manager {
190
  'panel_third_level_font_color' => 'panel_font_color',
191
  'panel_third_level_font_color_hover' => 'panel_font_color',
192
  'panel_third_level_text_transform' => 'none',
 
193
  'panel_third_level_font' => 'panel_font_family',
194
  'panel_third_level_font_size' => 'panel_font_size',
195
  'panel_third_level_font_weight' => 'normal',
@@ -202,6 +207,16 @@ final class Mega_Menu_Style_Manager {
202
  'panel_third_level_padding_right' => '0px',
203
  'panel_third_level_padding_top' => '0px',
204
  'panel_third_level_padding_bottom' => '0px',
 
 
 
 
 
 
 
 
 
 
205
  'flyout_width' => '250px',
206
  'flyout_menu_background_from' => '#f1f1f1',
207
  'flyout_menu_background_to' => '#f1f1f1',
@@ -250,11 +265,19 @@ final class Mega_Menu_Style_Manager {
250
  'shadow_color' => 'rgba(0, 0, 0, 0.1)',
251
  'transitions' => 'off',
252
  'resets' => 'off',
253
- 'mobile_columns' => '2',
254
  'toggle_background_from' => 'container_background_from',
255
  'toggle_background_to' => 'container_background_to',
256
  'toggle_font_color' => 'rgb(221, 221, 221)', // deprecated
257
  'toggle_bar_height' => '40px',
 
 
 
 
 
 
 
 
258
  'mobile_menu_item_height' => '40px',
259
  'mobile_menu_overlay' => 'off',
260
  'mobile_menu_force_width' => 'off',
@@ -266,7 +289,8 @@ final class Mega_Menu_Style_Manager {
266
  'mobile_menu_item_link_text_align' => 'menu_item_link_text_align',
267
  'mobile_menu_item_link_color_hover' => 'menu_item_link_color_hover',
268
  'mobile_menu_item_background_hover_from' => 'menu_item_background_hover_from',
269
- 'mobile_menu_item_background_hover_to' => 'menu_item_background_hover_to',
 
270
  'disable_mobile_toggle' => 'off',
271
  'custom_css' => '/** Push menu onto new line **/
272
  #{$wrap} {
@@ -473,7 +497,7 @@ final class Mega_Menu_Style_Manager {
473
  }
474
  }
475
 
476
- $css = "/** " . date('l jS F Y H:i:s e') . " ({$scss_location}) **/\n/** THIS FILE IS AUTOMATICALLY GENERATED - DO NOT MAKE MANUAL EDITS! **/\n/** Custom CSS should be added to Mega Menu > Menu Themes > Custom Styling **/\n\n.mega-menu-last-modified-" . time() . " {\n\tcontent: '" . date('l jS F Y H:i:s e') . "';\n}\n\n" . $css;
477
 
478
  $css = apply_filters( "megamenu_compiled_css", $css );
479
 
@@ -678,6 +702,13 @@ final class Mega_Menu_Style_Manager {
678
  $vars['location'] = "'$sanitized_location'";
679
  $vars['menu_id'] = "'$menu_id'";
680
  $vars['elementor_pro_active'] = 'false';
 
 
 
 
 
 
 
681
 
682
  if ( ! function_exists( 'is_plugin_active' )) {
683
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
@@ -689,14 +720,31 @@ final class Mega_Menu_Style_Manager {
689
 
690
  $settings = $this->get_menu_settings_for_location( $location );
691
 
692
- if ( isset( $settings['effect_speed'] ) && intval( $settings['effect_speed'] ) > 0 ) {
693
- $effect_speed = intval( $settings['effect_speed'] ) . 'ms';
694
  } else {
695
  $effect_speed = '200ms';
696
  }
697
 
698
  $vars['effect_speed'] = $effect_speed;
699
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
700
  foreach( $theme as $name => $value ) {
701
 
702
 
135
  'panel_border_radius_bottom_right' => '0px',
136
  'panel_header_color' => '#555',
137
  'panel_header_text_transform' => 'uppercase',
138
+ 'panel_header_text_align' => 'left',
139
  'panel_header_font' => 'inherit',
140
  'panel_header_font_size' => '16px',
141
  'panel_header_font_weight' => 'bold',
148
  'panel_header_margin_right' => '0px',
149
  'panel_header_margin_bottom' => '0px',
150
  'panel_header_margin_left' => '0px',
151
+ 'panel_header_border_color' => 'rgba(0,0,0,0)',
152
+ 'panel_header_border_color_hover' => 'rgba(0,0,0,0)',
153
  'panel_header_border_left' => '0px',
154
  'panel_header_border_right' => '0px',
155
  'panel_header_border_top' => '0px',
168
  'panel_second_level_font_color' => 'panel_header_color',
169
  'panel_second_level_font_color_hover' => 'panel_header_color',
170
  'panel_second_level_text_transform' => 'panel_header_text_transform',
171
+ 'panel_second_level_text_align' => 'left',
172
  'panel_second_level_font' => 'panel_header_font',
173
  'panel_second_level_font_size' => 'panel_header_font_size',
174
  'panel_second_level_font_weight' => 'panel_header_font_weight',
185
  'panel_second_level_margin_right' => '0px',
186
  'panel_second_level_margin_top' => '0px',
187
  'panel_second_level_margin_bottom' => '0px',
188
+ 'panel_second_level_border_color' => 'rgba(0,0,0,0)',
189
+ 'panel_second_level_border_color_hover' => 'rgba(0,0,0,0)',
190
  'panel_second_level_border_left' => '0px',
191
  'panel_second_level_border_right' => '0px',
192
  'panel_second_level_border_top' => '0px',
194
  'panel_third_level_font_color' => 'panel_font_color',
195
  'panel_third_level_font_color_hover' => 'panel_font_color',
196
  'panel_third_level_text_transform' => 'none',
197
+ 'panel_third_level_text_align' => 'left',
198
  'panel_third_level_font' => 'panel_font_family',
199
  'panel_third_level_font_size' => 'panel_font_size',
200
  'panel_third_level_font_weight' => 'normal',
207
  'panel_third_level_padding_right' => '0px',
208
  'panel_third_level_padding_top' => '0px',
209
  'panel_third_level_padding_bottom' => '0px',
210
+ 'panel_third_level_margin_left' => '0px',
211
+ 'panel_third_level_margin_right' => '0px',
212
+ 'panel_third_level_margin_top' => '0px',
213
+ 'panel_third_level_margin_bottom' => '0px',
214
+ 'panel_third_level_border_color' => 'rgba(0,0,0,0)',
215
+ 'panel_third_level_border_color_hover' => 'rgba(0,0,0,0)',
216
+ 'panel_third_level_border_left' => '0px',
217
+ 'panel_third_level_border_right' => '0px',
218
+ 'panel_third_level_border_top' => '0px',
219
+ 'panel_third_level_border_bottom' => '0px',
220
  'flyout_width' => '250px',
221
  'flyout_menu_background_from' => '#f1f1f1',
222
  'flyout_menu_background_to' => '#f1f1f1',
265
  'shadow_color' => 'rgba(0, 0, 0, 0.1)',
266
  'transitions' => 'off',
267
  'resets' => 'off',
268
+ 'mobile_columns' => '1',
269
  'toggle_background_from' => 'container_background_from',
270
  'toggle_background_to' => 'container_background_to',
271
  'toggle_font_color' => 'rgb(221, 221, 221)', // deprecated
272
  'toggle_bar_height' => '40px',
273
+ 'toggle_bar_border_radius_top_left' => '2px',
274
+ 'toggle_bar_border_radius_top_right' => '2px',
275
+ 'toggle_bar_border_radius_bottom_left' => '2px',
276
+ 'toggle_bar_border_radius_bottom_right' => '2px',
277
+ 'mobile_menu_padding_left' => '0px',
278
+ 'mobile_menu_padding_right' => '0px',
279
+ 'mobile_menu_padding_top' => '0px',
280
+ 'mobile_menu_padding_bottom' => '0px',
281
  'mobile_menu_item_height' => '40px',
282
  'mobile_menu_overlay' => 'off',
283
  'mobile_menu_force_width' => 'off',
289
  'mobile_menu_item_link_text_align' => 'menu_item_link_text_align',
290
  'mobile_menu_item_link_color_hover' => 'menu_item_link_color_hover',
291
  'mobile_menu_item_background_hover_from' => 'menu_item_background_hover_from',
292
+ 'mobile_menu_item_background_hover_to' => 'menu_item_background_hover_to',
293
+ 'mobile_menu_off_canvas_width' => '300px',
294
  'disable_mobile_toggle' => 'off',
295
  'custom_css' => '/** Push menu onto new line **/
296
  #{$wrap} {
497
  }
498
  }
499
 
500
+ $css = "/** " . date('l jS F Y H:i:s e') . " ({$scss_location}) **/\n/** THIS FILE IS AUTOMATICALLY GENERATED - DO NOT MAKE MANUAL EDITS! **/\n/** Custom CSS should be added to Mega Menu > Menu Themes > Custom Styling **/\n\n.mega-menu-last-modified-" . time() . " { content: '" . date('l jS F Y H:i:s e') . "'; }\n\n" . $css;
501
 
502
  $css = apply_filters( "megamenu_compiled_css", $css );
503
 
702
  $vars['location'] = "'$sanitized_location'";
703
  $vars['menu_id'] = "'$menu_id'";
704
  $vars['elementor_pro_active'] = 'false';
705
+ $vars['arrow_font'] = 'dashicons';
706
+ $vars['arrow_font_weight'] = 'normal';
707
+
708
+ $current_theme = wp_get_theme();
709
+ $theme_id = $current_theme->template;
710
+
711
+ $vars['wp_theme'] = $theme_id;
712
 
713
  if ( ! function_exists( 'is_plugin_active' )) {
714
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
720
 
721
  $settings = $this->get_menu_settings_for_location( $location );
722
 
723
+ if ( isset( $settings['effect_speed'] ) && absint( $settings['effect_speed'] ) > 0 ) {
724
+ $effect_speed = absint( $settings['effect_speed'] ) . 'ms';
725
  } else {
726
  $effect_speed = '200ms';
727
  }
728
 
729
  $vars['effect_speed'] = $effect_speed;
730
 
731
+ if ( isset( $settings['effect_speed_mobile'] ) && absint( $settings['effect_speed_mobile'] ) > 0 ) {
732
+ $effect_speed_mobile = absint( $settings['effect_speed_mobile'] ) . 'ms';
733
+ } else {
734
+ $effect_speed_mobile = '200ms';
735
+ }
736
+
737
+ $vars['effect_speed_mobile'] = $effect_speed_mobile;
738
+
739
+ if ( isset( $settings['effect_mobile'] ) ) {
740
+ $effect_mobile = $settings['effect_mobile'];
741
+ } else {
742
+ $effect_mobile = 'disabled';
743
+ }
744
+
745
+ $vars['effect_mobile'] = $effect_mobile;
746
+
747
+
748
  foreach( $theme as $name => $value ) {
749
 
750
 
classes/toggle-blocks.class.php CHANGED
@@ -307,7 +307,7 @@ class Mega_Menu_Toggle_Blocks {
307
  * }
308
  * return $attributes;
309
  * }
310
- * add_filter('megamenu_toggle_block_attributes', 'remove_ids_from_toggle_blocks');
311
  *
312
  */
313
 
@@ -990,6 +990,9 @@ class Mega_Menu_Toggle_Blocks {
990
 
991
  $icons = array(
992
  'dash-f333' => 'dashicons-menu',
 
 
 
993
  'dash-f214' => 'dashicons-editor-justify',
994
  'dash-f158' => 'dashicons-no',
995
  'dash-f335' => 'dashicons-no-alt',
307
  * }
308
  * return $attributes;
309
  * }
310
+ * add_filter('megamenu_toggle_block_attributes', 'remove_ids_from_toggle_blocks', 10, 6);
311
  *
312
  */
313
 
990
 
991
  $icons = array(
992
  'dash-f333' => 'dashicons-menu',
993
+ 'dash-f228' => 'dashicons-menu-alt',
994
+ 'dash-f329' => 'dashicons-menu-alt2',
995
+ 'dash-f349' => 'dashicons-menu-alt3',
996
  'dash-f214' => 'dashicons-editor-justify',
997
  'dash-f158' => 'dashicons-no',
998
  'dash-f335' => 'dashicons-no-alt',
classes/walker.class.php CHANGED
@@ -192,7 +192,7 @@ class Mega_Menu_Walker extends Walker_Nav_Menu {
192
  $item_output .= '</a>';
193
  $item_output .= $args->after;
194
 
195
- if ( is_array( $item->classes ) && in_array( "menu-column", $item->classes ) || in_array( "menu-row", $item->classes ) ) {
196
  $item_output = "";
197
  }
198
 
192
  $item_output .= '</a>';
193
  $item_output .= $args->after;
194
 
195
+ if ( is_array( $item->classes ) && ( in_array( "menu-column", $item->classes ) || in_array( "menu-row", $item->classes ) ) ) {
196
  $item_output = "";
197
  }
198
 
classes/widget-manager.class.php CHANGED
@@ -15,8 +15,6 @@ if ( ! class_exists('Mega_Menu_Widget_Manager') ) :
15
  */
16
  class Mega_Menu_Widget_Manager {
17
 
18
- var $mega_menu_widgets = false;
19
-
20
  /**
21
  * Constructor
22
  *
@@ -27,7 +25,9 @@ class Mega_Menu_Widget_Manager {
27
  add_action( 'init', array( $this, 'register_sidebar' ) );
28
 
29
  add_action( 'wp_ajax_mm_edit_widget', array( $this, 'ajax_show_widget_form' ) );
 
30
  add_action( 'wp_ajax_mm_save_widget', array( $this, 'ajax_save_widget' ) );
 
31
  add_action( 'wp_ajax_mm_update_widget_columns', array( $this, 'ajax_update_widget_columns' ) );
32
  add_action( 'wp_ajax_mm_update_menu_item_columns', array( $this, 'ajax_update_menu_item_columns' ) );
33
  add_action( 'wp_ajax_mm_delete_widget', array( $this, 'ajax_delete_widget' ) );
@@ -41,8 +41,6 @@ class Mega_Menu_Widget_Manager {
41
  add_action( 'megamenu_after_widget_save', array( $this, 'clear_caches' ) );
42
  add_action( 'megamenu_after_widget_delete', array( $this, 'clear_caches' ) );
43
 
44
- $this->mega_menu_widgets = $this->get_mega_menu_sidebar_widgets();
45
-
46
  }
47
 
48
 
@@ -107,6 +105,100 @@ class Mega_Menu_Widget_Manager {
107
 
108
  }
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
 
111
  /**
112
  * Save a widget
@@ -403,9 +495,9 @@ class Mega_Menu_Widget_Manager {
403
 
404
  $widgets = array();
405
 
406
- if ( $this->mega_menu_widgets ) {
407
 
408
- foreach ( $this->mega_menu_widgets as $widget_id ) {
409
 
410
  $settings = $this->get_settings_for_widget_id( $widget_id );
411
 
@@ -1200,8 +1292,6 @@ class Mega_Menu_Widget_Manager {
1200
 
1201
  wp_set_sidebars_widgets( $sidebar_widgets );
1202
 
1203
- $this->mega_menu_widgets = $this->get_mega_menu_sidebar_widgets();
1204
-
1205
  }
1206
 
1207
 
15
  */
16
  class Mega_Menu_Widget_Manager {
17
 
 
 
18
  /**
19
  * Constructor
20
  *
25
  add_action( 'init', array( $this, 'register_sidebar' ) );
26
 
27
  add_action( 'wp_ajax_mm_edit_widget', array( $this, 'ajax_show_widget_form' ) );
28
+ add_action( 'wp_ajax_mm_edit_menu_item', array( $this, 'ajax_show_menu_item_form' ) );
29
  add_action( 'wp_ajax_mm_save_widget', array( $this, 'ajax_save_widget' ) );
30
+ add_action( 'wp_ajax_mm_save_menu_item', array( $this, 'ajax_save_menu_item' ) );
31
  add_action( 'wp_ajax_mm_update_widget_columns', array( $this, 'ajax_update_widget_columns' ) );
32
  add_action( 'wp_ajax_mm_update_menu_item_columns', array( $this, 'ajax_update_menu_item_columns' ) );
33
  add_action( 'wp_ajax_mm_delete_widget', array( $this, 'ajax_delete_widget' ) );
41
  add_action( 'megamenu_after_widget_save', array( $this, 'clear_caches' ) );
42
  add_action( 'megamenu_after_widget_delete', array( $this, 'clear_caches' ) );
43
 
 
 
44
  }
45
 
46
 
105
 
106
  }
107
 
108
+ /**
109
+ * Display a menu item settings form
110
+ *
111
+ * @since 2.7
112
+ */
113
+ public function ajax_show_menu_item_form() {
114
+
115
+ check_ajax_referer( 'megamenu_edit' );
116
+
117
+ $menu_item_id = sanitize_text_field( $_POST['widget_id'] );
118
+
119
+ $nonce = wp_create_nonce('megamenu_save_menu_item_' . $menu_item_id);
120
+
121
+ $saved_settings = array_filter( (array) get_post_meta( $menu_item_id, '_megamenu', true ) );
122
+ $menu_item_meta = array_merge( Mega_Menu_Nav_Menus::get_menu_item_defaults(), $saved_settings );
123
+
124
+ if ( ob_get_contents() ) ob_clean(); // remove any warnings or output from other plugins which may corrupt the response
125
+ ?>
126
+
127
+ <form method='post'>
128
+ <input type='hidden' name='action' value='mm_save_menu_item' />
129
+ <input type='hidden' name='menu_item_id' value='<?php echo esc_attr( $menu_item_id ) ?>' />
130
+ <input type='hidden' name='_wpnonce' value='<?php echo esc_attr( $nonce ) ?>' />
131
+ <div class='widget-content'>
132
+ <?php
133
+
134
+ $css_version = get_transient("megamenu_css_version");
135
+
136
+ if ( $css_version && version_compare( $css_version, '2.6.1', '<' ) ) {
137
+ $link = "<a href='" . esc_attr( admin_url( 'admin.php?page=maxmegamenu_tools' ) ) . "'>" . __("Mega Menu") . " > " . __("Tools") . "</a>";
138
+ $notice = "<div class='notice notice-success'><p>";
139
+ $notice .= sprintf( __("Your menu CSS needs to be updated before you can use the following setting. Please go to %s and Clear the CSS Cache (you will only need to do this once).", "megamenu") , $link);
140
+ $notice .= "</p></div>";
141
+ $notice .= "</div>";
142
+
143
+ echo $notice;
144
+ }
145
+
146
+ ?>
147
+
148
+ <p>
149
+ <label><?php _e("Sub menu columns", "megamenu"); ?></label>
150
+
151
+ <select name="settings[submenu_columns]">
152
+ <option value='1' <?php selected( $menu_item_meta['submenu_columns'], 1, true ) ?> >1 <?php __("column", "megamenu") ?></option>
153
+ <option value='2' <?php selected( $menu_item_meta['submenu_columns'], 2, true ) ?> >2 <?php __("columns", "megamenu") ?></option>
154
+ <option value='3' <?php selected( $menu_item_meta['submenu_columns'], 3, true ) ?> >3 <?php __("columns", "megamenu") ?></option>
155
+ <option value='4' <?php selected( $menu_item_meta['submenu_columns'], 4, true ) ?> >4 <?php __("columns", "megamenu") ?></option>
156
+ </select>
157
+ </p>
158
+ <p>
159
+ <div class='widget-controls'>
160
+ <a class='close' href='#close'><?php _e("Close", "megamenu"); ?></a>
161
+ </div>
162
+
163
+ <?php
164
+ submit_button( __( 'Save' ), 'button-primary alignright', 'savewidget', false );
165
+ ?>
166
+ </p>
167
+ </div>
168
+ </form>
169
+
170
+ <?php
171
+
172
+ }
173
+
174
+ /**
175
+ * Save a menu item
176
+ *
177
+ * @since 2.7
178
+ */
179
+ public function ajax_save_menu_item() {
180
+
181
+ $menu_item_id = absint(sanitize_text_field( $_POST['menu_item_id'] ));
182
+
183
+ check_ajax_referer( 'megamenu_save_menu_item_' . $menu_item_id );
184
+
185
+ $submitted_settings = isset( $_POST['settings'] ) ? $_POST['settings'] : array();
186
+
187
+ if ( $menu_item_id > 0 && is_array( $submitted_settings ) ) {
188
+
189
+ $existing_settings = get_post_meta( $menu_item_id, '_megamenu', true);
190
+
191
+ if ( is_array( $existing_settings ) ) {
192
+ $submitted_settings = array_merge( $existing_settings, $submitted_settings );
193
+ }
194
+
195
+ update_post_meta( $menu_item_id, '_megamenu', $submitted_settings );
196
+ }
197
+
198
+ $this->send_json_success( sprintf( __("Saved %s", "megamenu"), $id_base ) );
199
+
200
+ }
201
+
202
 
203
  /**
204
  * Save a widget
495
 
496
  $widgets = array();
497
 
498
+ if ( $mega_menu_widgets = $this->get_mega_menu_sidebar_widgets() ) {
499
 
500
+ foreach ( $mega_menu_widgets as $widget_id ) {
501
 
502
  $settings = $this->get_settings_for_widget_id( $widget_id );
503
 
1292
 
1293
  wp_set_sidebars_widgets( $sidebar_widgets );
1294
 
 
 
1295
  }
1296
 
1297
 
css/admin/admin.css CHANGED
@@ -111,8 +111,11 @@
111
  padding: 0 20px;
112
  background: white;
113
  font-size: 1.3em;
114
- line-height: 75px;
115
- float: left; }
 
 
 
116
  .nav-menus-php #cboxContent .mm_header_container .mm_title br {
117
  display: none; }
118
  .nav-menus-php #cboxContent .mm_header_container .mm_saving {
@@ -457,8 +460,14 @@
457
  padding-right: 10px;
458
  position: absolute;
459
  top: 0; }
460
- .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .mega-col .mega-col-widgets .widget[data-type=item] .widget-title-action {
461
- display: none; }
 
 
 
 
 
 
462
  .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .mega-col .mega-col-widgets .widget .widget-title h4 {
463
  font-weight: normal;
464
  margin-top: 5px;
@@ -590,8 +599,6 @@
590
  -webkit-box-sizing: border-box;
591
  -moz-box-sizing: border-box;
592
  box-sizing: border-box; }
593
- .nav-menus-php #cboxContent .mm_content.mega_menu #widgets .widget[data-type='menu_item'] .widget-action {
594
- display: none; }
595
  .nav-menus-php #cboxContent .mm_content.mega_menu #widgets .widget {
596
  width: 100%; }
597
  .nav-menus-php #cboxContent .mm_content.mega_menu #widgets .widget h4 {
@@ -696,6 +703,12 @@
696
  vertical-align: middle;
697
  top: -1px;
698
  position: relative; }
 
 
 
 
 
 
699
  .nav-menus-php #cboxContent .mm_content.mega_menu .widget-controls {
700
  float: left; }
701
  .nav-menus-php #cboxContent .mm_content.mega_menu .widget-controls .delete:hover {
@@ -1038,7 +1051,7 @@
1038
  background: #999;
1039
  border-color: #444;
1040
  border-width: 1px;
1041
- padding: 0 5px;
1042
  border-radius: 3px;
1043
  opacity: 0;
1044
  -webkit-transition: all 0.3s ease;
@@ -1132,6 +1145,8 @@
1132
  .nav-menus-php .mega_menu_meta_box div table select {
1133
  font-size: 0.9em;
1134
  max-width: 120px; }
 
 
1135
  .nav-menus-php .mega_menu_meta_box div table tr {
1136
  height: 29px;
1137
  vertical-align: middle; }
111
  padding: 0 20px;
112
  background: white;
113
  font-size: 1.3em;
114
+ align-items: center;
115
+ display: inline-flex;
116
+ line-height: 25px;
117
+ float: left;
118
+ height: 75px; }
119
  .nav-menus-php #cboxContent .mm_header_container .mm_title br {
120
  display: none; }
121
  .nav-menus-php #cboxContent .mm_header_container .mm_saving {
460
  padding-right: 10px;
461
  position: absolute;
462
  top: 0; }
463
+ .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .mega-col .mega-col-widgets .widget[data-type=item] form input, .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .mega-col .mega-col-widgets .widget[data-type=item] form select {
464
+ float: right; }
465
+ .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .mega-col .mega-col-widgets .widget[data-type=item] form p {
466
+ float: left;
467
+ width: 100%;
468
+ margin-bottom: 0; }
469
+ .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .mega-col .mega-col-widgets .widget[data-type=item] form .widget-content {
470
+ padding-top: 10px; }
471
  .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .mega-col .mega-col-widgets .widget .widget-title h4 {
472
  font-weight: normal;
473
  margin-top: 5px;
599
  -webkit-box-sizing: border-box;
600
  -moz-box-sizing: border-box;
601
  box-sizing: border-box; }
 
 
602
  .nav-menus-php #cboxContent .mm_content.mega_menu #widgets .widget {
603
  width: 100%; }
604
  .nav-menus-php #cboxContent .mm_content.mega_menu #widgets .widget h4 {
703
  vertical-align: middle;
704
  top: -1px;
705
  position: relative; }
706
+ .nav-menus-php #cboxContent .mm_content.mega_menu .widget[data-type='menu_item'] form input, .nav-menus-php #cboxContent .mm_content.mega_menu .widget[data-type='menu_item'] form select {
707
+ float: right; }
708
+ .nav-menus-php #cboxContent .mm_content.mega_menu .widget[data-type='menu_item'] form p {
709
+ float: left;
710
+ width: 100%;
711
+ margin-bottom: 0; }
712
  .nav-menus-php #cboxContent .mm_content.mega_menu .widget-controls {
713
  float: left; }
714
  .nav-menus-php #cboxContent .mm_content.mega_menu .widget-controls .delete:hover {
1051
  background: #999;
1052
  border-color: #444;
1053
  border-width: 1px;
1054
+ padding: 1px 5px;
1055
  border-radius: 3px;
1056
  opacity: 0;
1057
  -webkit-transition: all 0.3s ease;
1145
  .nav-menus-php .mega_menu_meta_box div table select {
1146
  font-size: 0.9em;
1147
  max-width: 120px; }
1148
+ .nav-menus-php .mega_menu_meta_box div table select.megamenu_effect_mobile {
1149
+ max-width: 80px; }
1150
  .nav-menus-php .mega_menu_meta_box div table tr {
1151
  height: 29px;
1152
  vertical-align: middle; }
css/admin/admin.scss CHANGED
@@ -168,8 +168,11 @@ $green: #46b450;
168
  padding: 0 20px;
169
  background: white;
170
  font-size: 1.3em;
171
- line-height: 75px;
 
 
172
  float: left;
 
173
 
174
  br {
175
  display: none;
@@ -467,9 +470,19 @@ $green: #46b450;
467
  top: 0;
468
  }
469
 
470
- &[data-type=item] {
471
- .widget-title-action {
472
- display: none;
 
 
 
 
 
 
 
 
 
 
473
  }
474
  }
475
 
@@ -686,12 +699,6 @@ $green: #46b450;
686
  box-sizing: border-box;
687
  }
688
 
689
- .widget[data-type='menu_item'] {
690
- .widget-action {
691
- display: none;
692
- }
693
- }
694
-
695
  .widget {
696
  width: 100%;
697
 
@@ -852,6 +859,17 @@ $green: #46b450;
852
  }
853
  }
854
  }
 
 
 
 
 
 
 
 
 
 
 
855
  }
856
 
857
  .widget-controls {
@@ -1431,7 +1449,7 @@ $green: #46b450;
1431
  background: $dark_grey;
1432
  border-color: $text_grey;
1433
  border-width: 1px;
1434
- padding: 0 5px;
1435
  border-radius: 3px;
1436
  opacity: 0;
1437
  -webkit-transition: all 0.3s ease;
@@ -1556,6 +1574,9 @@ $green: #46b450;
1556
  font-size: 0.9em;
1557
  max-width: 120px;
1558
  }
 
 
 
1559
  tr {
1560
  height: 29px;
1561
  vertical-align: middle;
168
  padding: 0 20px;
169
  background: white;
170
  font-size: 1.3em;
171
+ align-items: center;
172
+ display: inline-flex;
173
+ line-height: 25px;
174
  float: left;
175
+ height: 75px;
176
 
177
  br {
178
  display: none;
470
  top: 0;
471
  }
472
 
473
+ &[data-type=item] form {
474
+ input, select {
475
+ float: right;
476
+ }
477
+
478
+ p {
479
+ float: left;
480
+ width: 100%;
481
+ margin-bottom: 0;
482
+ }
483
+
484
+ .widget-content {
485
+ padding-top: 10px;
486
  }
487
  }
488
 
699
  box-sizing: border-box;
700
  }
701
 
 
 
 
 
 
 
702
  .widget {
703
  width: 100%;
704
 
859
  }
860
  }
861
  }
862
+ form {
863
+ input, select {
864
+ float: right;
865
+ }
866
+
867
+ p {
868
+ float: left;
869
+ width: 100%;
870
+ margin-bottom: 0;
871
+ }
872
+ }
873
  }
874
 
875
  .widget-controls {
1449
  background: $dark_grey;
1450
  border-color: $text_grey;
1451
  border-width: 1px;
1452
+ padding: 1px 5px;
1453
  border-radius: 3px;
1454
  opacity: 0;
1455
  -webkit-transition: all 0.3s ease;
1574
  font-size: 0.9em;
1575
  max-width: 120px;
1576
  }
1577
+ select.megamenu_effect_mobile {
1578
+ max-width: 80px;
1579
+ }
1580
  tr {
1581
  height: 29px;
1582
  vertical-align: middle;
css/compatibility.scss CHANGED
@@ -3,4 +3,58 @@
3
  .elementor-sticky__spacer #{$wrap} #{$menu} .mega-sub-menu {
4
  visibility: inherit !important;
5
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  }
3
  .elementor-sticky__spacer #{$wrap} #{$menu} .mega-sub-menu {
4
  visibility: inherit !important;
5
  }
6
+ }
7
+
8
+ @if ($wp_theme == twentytwelve and $location == 'primary') {
9
+ body.mega-menu-primary button.menu-toggle {
10
+ display: none;
11
+ }
12
+ }
13
+
14
+ @if ($wp_theme == generatepress and $location == 'primary') {
15
+ body.mega-menu-primary button.menu-toggle {
16
+ display: none;
17
+ }
18
+ }
19
+
20
+ @if ($wp_theme == astra and $location == 'primary') {
21
+ body.mega-menu-primary.ast-header-break-point .ast-mobile-menu-buttons {
22
+ display: none;
23
+ }
24
+
25
+ @include desktop {
26
+ #{$wrap} #{$menu} .ast-masthead-custom-menu-items {
27
+ display: inline-block;
28
+ margin: 0 $menu_item_spacing 0 0;
29
+ }
30
+ }
31
+ }
32
+
33
+ @if ($wp_theme == oceanwp) {
34
+ html[class$="-off-canvas-open"] #top-bar-wrap,
35
+ html[class$="-off-canvas-open"] #site-header {
36
+ z-index: 1;
37
+ }
38
+
39
+ @if ($location == main_menu) {
40
+ @include desktop {
41
+ #{$wrap} #{$menu} .woo-menu-icon,
42
+ #{$wrap} #{$menu} .search-toggle-li {
43
+ display: inline-block;
44
+ margin: 0 $menu_item_spacing 0 0;
45
+
46
+ > a {
47
+ line-height: $menu_item_link_height;
48
+ height: $menu_item_link_height;
49
+ padding: $menu_item_link_padding_top $menu_item_link_padding_right $menu_item_link_padding_bottom $menu_item_link_padding_left;
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+
56
+ @if ($wp_theme == enfold) {
57
+ html[class$="-off-canvas-open"] #header_meta {
58
+ z-index: 1;
59
+ }
60
  }
css/megamenu.scss CHANGED
@@ -193,7 +193,8 @@
193
  cursor: default;
194
  }
195
 
196
- li.mega-menu-item-has-children.mega-disable-link > a.mega-menu-link {
 
197
  cursor: pointer;
198
  }
199
 
@@ -278,6 +279,14 @@
278
  }
279
  }
280
 
 
 
 
 
 
 
 
 
281
  &.mega-no-js li.mega-menu-item:hover > ul.mega-sub-menu,
282
  &.mega-no-js li.mega-menu-item:focus > ul.mega-sub-menu,
283
  li.mega-menu-item.mega-toggle-on > ul.mega-sub-menu {
@@ -287,6 +296,14 @@
287
  li.mega-menu-item.mega-menu-megamenu ul.mega-sub-menu ul.mega-sub-menu {
288
  visibility: inherit;
289
  opacity: 1;
 
 
 
 
 
 
 
 
290
  }
291
 
292
  li.mega-menu-item a[class^='dashicons']:before {
@@ -323,7 +340,7 @@
323
  }
324
 
325
  &.mega-toggle-on > a.mega-menu-link {
326
- @include border-radius($menu_item_link_border_radius_top_left, $menu_item_link_border_radius_top_right, 0, 0);
327
  }
328
  }
329
 
@@ -333,7 +350,7 @@
333
  }
334
 
335
  &.mega-toggle-on > a.mega-menu-link {
336
- @include border-radius($menu_item_link_border_radius_top_left, $menu_item_link_border_radius_top_right, 0, 0);
337
  }
338
  }
339
 
@@ -345,7 +362,6 @@
345
 
346
  // top level items
347
  > li.mega-menu-item {
348
-
349
  margin: 0 $menu_item_spacing 0 0;
350
  display: inline-block;
351
  height: auto;
@@ -423,29 +439,24 @@
423
  }
424
 
425
  > a.mega-menu-link {
426
- border-top: $menu_item_border_top solid $menu_item_border_color;
427
- border-left: $menu_item_border_left solid $menu_item_border_color;
428
- border-right: $menu_item_border_right solid $menu_item_border_color;
429
- border-bottom: $menu_item_border_bottom solid $menu_item_border_color;
430
- outline: none;
431
- text-decoration: none;
432
- padding: $menu_item_link_padding_top $menu_item_link_padding_right $menu_item_link_padding_bottom $menu_item_link_padding_left;
433
  line-height: $menu_item_link_height;
434
- font-weight: $menu_item_link_weight;
435
  height: $menu_item_link_height;
 
436
  vertical-align: baseline;
437
- text-align: $menu_item_link_text_align;
438
  width: auto;
439
  display: block;
440
  color: $menu_item_link_color;
441
  text-transform: $menu_item_link_text_transform;
442
  text-decoration: $menu_item_link_text_decoration;
 
 
443
  @include background($menu_item_background_from, $menu_item_background_to);
 
444
  @include border-radius($menu_item_link_border_radius_top_left, $menu_item_link_border_radius_top_right, $menu_item_link_border_radius_bottom_right, $menu_item_link_border_radius_bottom_left);
445
  font-family: $menu_item_link_font;
446
  font-size: $menu_item_link_font_size;
447
-
448
-
449
  }
450
 
451
  // support for multi line links
@@ -473,7 +484,7 @@
473
  }
474
 
475
  > a.mega-menu-link {
476
- @include border-radius(0);
477
  border: 0;
478
  margin: 0;
479
  line-height: $mobile_menu_item_height;
@@ -484,15 +495,21 @@
484
  color: $mobile_menu_item_link_color;
485
  font-size: $mobile_menu_item_link_font_size;
486
  }
487
-
488
  }
489
-
490
  }
491
 
492
  // sub menu items (grid)
493
  li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row {
494
- width: 100%;
495
- float: left;
 
 
 
 
 
 
 
 
496
 
497
  .mega-menu-column {
498
  float: left;
@@ -538,13 +555,10 @@
538
  z-index: $z_index;
539
  @include border-radius($panel_border_radius_top_left, $panel_border_radius_top_right, $panel_border_radius_bottom_right, $panel_border_radius_bottom_left);
540
  @include background($panel_background_from, $panel_background_to);
 
541
  padding: $panel_padding_top $panel_padding_right $panel_padding_bottom $panel_padding_left;
542
  position: absolute;
543
  width: $panel_width;
544
- border-top: $panel_border_top solid $panel_border_color;
545
- border-left: $panel_border_left solid $panel_border_color;
546
- border-right: $panel_border_right solid $panel_border_color;
547
- border-bottom: $panel_border_bottom solid $panel_border_color;
548
  max-width: none;
549
 
550
  @if unit($panel_width) == '%' {
@@ -557,7 +571,7 @@
557
  }
558
 
559
  @if $shadow == 'on' {
560
- @include box-shadow($shadow_horizontal $shadow_vertical $shadow_blur $shadow_spread $shadow_color);
561
  }
562
 
563
  @include mobile {
@@ -615,15 +629,17 @@
615
  text-transform: $panel_header_text_transform;
616
  text-decoration: $panel_header_text_decoration;
617
  font-weight: $panel_header_font_weight;
 
618
  margin: $panel_header_margin_top $panel_header_margin_right $panel_header_margin_bottom $panel_header_margin_left;
619
  padding: $panel_header_padding_top $panel_header_padding_right $panel_header_padding_bottom $panel_header_padding_left;
620
  vertical-align: top;
621
  display: block;
622
  visibility: inherit;
623
- border-top: $panel_header_border_top solid $panel_header_border_color;
624
- border-left: $panel_header_border_left solid $panel_header_border_color;
625
- border-right: $panel_header_border_right solid $panel_header_border_color;
626
- border-bottom: $panel_header_border_bottom solid $panel_header_border_color;
 
627
  }
628
 
629
  // Second level menu items
@@ -634,14 +650,16 @@
634
  text-transform: $panel_second_level_text_transform;
635
  text-decoration: $panel_second_level_text_decoration;
636
  font-weight: $panel_second_level_font_weight;
 
637
  margin: $panel_second_level_margin_top $panel_second_level_margin_right $panel_second_level_margin_bottom $panel_second_level_margin_left;
638
  padding: $panel_second_level_padding_top $panel_second_level_padding_right $panel_second_level_padding_bottom $panel_second_level_padding_left;
639
  vertical-align: top;
640
  display: block;
641
- border-top: $panel_second_level_border_top solid $panel_second_level_border_color;
642
- border-left: $panel_second_level_border_left solid $panel_second_level_border_color;
643
- border-right: $panel_second_level_border_right solid $panel_second_level_border_color;
644
- border-bottom: $panel_second_level_border_bottom solid $panel_second_level_border_color;
 
645
  }
646
 
647
  > a.mega-menu-link:hover,
@@ -660,10 +678,16 @@
660
  text-transform: $panel_third_level_text_transform;
661
  text-decoration: $panel_third_level_text_decoration;
662
  font-weight: $panel_third_level_font_weight;
663
- margin: 0;
 
664
  padding: $panel_third_level_padding_top $panel_third_level_padding_right $panel_third_level_padding_bottom $panel_third_level_padding_left;
665
  vertical-align: top;
666
  display: block;
 
 
 
 
 
667
  }
668
 
669
  &.mega-icon-left.mega-has-description.mega-has-icon > a.mega-menu-link {
@@ -679,12 +703,13 @@
679
  text-decoration: $panel_third_level_text_decoration_hover;
680
  @include background($panel_third_level_background_hover_from, $panel_third_level_background_hover_to);
681
  }
 
682
  }
683
 
684
  @include mobile {
685
  border: 0;
686
  padding: 10px;
687
- @include border-radius(0,0,0,0);
688
 
689
  @if $mobile_columns == 2 {
690
  > li.mega-menu-item {
@@ -735,10 +760,7 @@
735
  z-index: $z_index;
736
  position: absolute;
737
  width: $flyout_width;
738
- border-top: $flyout_border_top solid $flyout_border_color;
739
- border-left: $flyout_border_left solid $flyout_border_color;
740
- border-right: $flyout_border_right solid $flyout_border_color;
741
- border-bottom: $flyout_border_bottom solid $flyout_border_color;
742
  padding: $flyout_padding_top $flyout_padding_right $flyout_padding_bottom $flyout_padding_left;
743
  @include background($flyout_menu_background_from, $flyout_menu_background_to);
744
  max-width: none;
@@ -855,11 +877,11 @@
855
  // Arrows
856
  li.mega-menu-item-has-children {
857
 
858
- > a.mega-menu-link:after,
859
- > a.mega-menu-link span.mega-indicator:after {
860
  content: $arrow_down;
 
 
861
  display: inline-block;
862
- font-family: dashicons;
863
  margin: 0 0 0 6px;
864
  vertical-align: top;
865
  -webkit-font-smoothing: antialiased;
@@ -875,7 +897,6 @@
875
  }
876
 
877
  > a.mega-menu-link > span.mega-indicator {
878
- display: none;
879
  float: right;
880
  height: auto;
881
  width: auto;
@@ -887,27 +908,13 @@
887
  line-height: inherit;
888
  color: inherit;
889
  font-size: inherit;
 
890
 
891
- &:after {
892
- content: $arrow_up;
893
- }
894
  }
895
 
896
  @include mobile {
897
- > a.mega-menu-link {
898
- &:after {
899
- display: none;
900
- }
901
-
902
- > span.mega-indicator {
903
- display: inline-block;
904
-
905
- &:after {
906
- content: $arrow_down;
907
- }
908
- }
909
- }
910
-
911
  &.mega-toggle-on > a.mega-menu-link > span.mega-indicator:after {
912
  content: $arrow_up;
913
  }
@@ -919,59 +926,86 @@
919
  }
920
 
921
  // Hide arrows
922
- li.mega-menu-megamenu:not(.mega-menu-tabbed) li.mega-menu-item-has-children > a.mega-menu-link:after,
923
- li.mega-menu-megamenu:not(.mega-menu-tabbed) li.mega-menu-item-has-children > a.mega-menu-link > span.mega-indicator,
924
- li.mega-menu-item-has-children.mega-hide-arrow > a.mega-menu-link:after {
925
  display: none;
926
  }
927
 
 
 
 
 
 
 
 
 
928
 
929
- li.mega-menu-item li.mega-menu-item-has-children > a.mega-menu-link:after {
930
- content: $arrow_right;
931
- float: right;
932
-
933
- @include mobile {
934
- content: $arrow_down;
935
- }
936
- }
937
 
938
- // Right aligned flyout menus
939
- li.mega-menu-flyout.mega-align-bottom-right {
940
 
941
- li.mega-menu-item a.mega-menu-link {
942
- text-align: right;
 
 
 
943
 
944
- @include mobile {
945
- text-align: left;
 
 
 
 
 
 
 
 
 
946
  }
947
  }
 
948
 
949
- li.mega-menu-item a.mega-menu-link:before {
950
- float: right;
951
- margin: 0 0 0 6px;
 
 
 
 
952
 
953
- @include mobile {
954
- float: left;
955
- margin: 0 6px 0 0;
 
 
956
  }
957
- }
958
 
959
- li.mega-menu-item-has-children {
960
- > a.mega-menu-link:after {
961
- content: $arrow_left;
962
- float: left;
963
- margin: 0;
964
 
965
- @include mobile {
966
- content: $arrow_down;
967
- float: right;
 
968
  }
969
  }
970
  }
971
 
972
- ul.mega-sub-menu li.mega-menu-item ul.mega-sub-menu {
973
- left: -100%;
974
- top: 0;
 
 
 
 
 
 
 
975
  }
976
  }
977
 
@@ -1002,7 +1036,6 @@
1002
  display: none;
1003
  }
1004
  }
1005
-
1006
  }
1007
 
1008
  @include mobile {
@@ -1012,14 +1045,6 @@
1012
  clear: both;
1013
  }
1014
 
1015
- @if ($disable_mobile_toggle == off and $mobile_menu_overlay == on) or ($disable_mobile_toggle == off and $mobile_menu_force_width == on) {
1016
- #{$menu} {
1017
- position: absolute;
1018
- width: 100%;
1019
- z-index: 9999999;
1020
- @include background($mobile_background_from, $mobile_background_to);
1021
- }
1022
- }
1023
  }
1024
 
1025
  .mega-menu-toggle {
@@ -1027,7 +1052,7 @@
1027
  z-index: 1;
1028
  cursor: pointer;
1029
  @include background($toggle_background_from, $toggle_background_to);
1030
- @include border-radius(2px, 2px, 2px, 2px);
1031
  line-height: $toggle_bar_height;
1032
  height: $toggle_bar_height;
1033
  text-align: left;
@@ -1130,20 +1155,97 @@
1130
  }
1131
 
1132
  @include mobile {
 
1133
  + #{$menu} {
1134
  @include background($mobile_background_from, $mobile_background_to);
1135
- padding: 0;
1136
 
1137
  @if $disable_mobile_toggle == on {
1138
  display: block;
1139
  } @else {
1140
  display: none;
 
 
 
 
 
 
1141
  }
1142
  }
1143
 
1144
  &.mega-menu-open + #{$menu} {
1145
  display: block;
1146
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1147
  }
1148
  }
1149
  }
193
  cursor: default;
194
  }
195
 
196
+ li.mega-menu-item-has-children.mega-disable-link > a.mega-menu-link,
197
+ li.mega-menu-megamenu li.mega-menu-item-has-children.mega-disable-link > a.mega-menu-link {
198
  cursor: pointer;
199
  }
200
 
279
  }
280
  }
281
 
282
+ li.mega-menu-item.mega-menu-megamenu ul.mega-sub-menu li.mega-collapse-children > ul.mega-sub-menu {
283
+ display: none;
284
+ }
285
+
286
+ li.mega-menu-item.mega-menu-megamenu ul.mega-sub-menu li.mega-collapse-children.mega-toggle-on > ul.mega-sub-menu {
287
+ display: block;
288
+ }
289
+
290
  &.mega-no-js li.mega-menu-item:hover > ul.mega-sub-menu,
291
  &.mega-no-js li.mega-menu-item:focus > ul.mega-sub-menu,
292
  li.mega-menu-item.mega-toggle-on > ul.mega-sub-menu {
296
  li.mega-menu-item.mega-menu-megamenu ul.mega-sub-menu ul.mega-sub-menu {
297
  visibility: inherit;
298
  opacity: 1;
299
+ display: block;
300
+ }
301
+
302
+ @for $cols from 1 through 4 {
303
+ li.mega-menu-item.mega-menu-megamenu ul.mega-sub-menu li.mega-#{$cols}-columns > ul.mega-sub-menu > li.mega-menu-item {
304
+ float: left;
305
+ width: (100% / $cols);
306
+ }
307
  }
308
 
309
  li.mega-menu-item a[class^='dashicons']:before {
340
  }
341
 
342
  &.mega-toggle-on > a.mega-menu-link {
343
+ @include border-radius($menu_item_link_border_radius_top_left, $menu_item_link_border_radius_top_right, 0px, 0px);
344
  }
345
  }
346
 
350
  }
351
 
352
  &.mega-toggle-on > a.mega-menu-link {
353
+ @include border-radius($menu_item_link_border_radius_top_left, $menu_item_link_border_radius_top_right, 0px, 0px);
354
  }
355
  }
356
 
362
 
363
  // top level items
364
  > li.mega-menu-item {
 
365
  margin: 0 $menu_item_spacing 0 0;
366
  display: inline-block;
367
  height: auto;
439
  }
440
 
441
  > a.mega-menu-link {
 
 
 
 
 
 
 
442
  line-height: $menu_item_link_height;
 
443
  height: $menu_item_link_height;
444
+ padding: $menu_item_link_padding_top $menu_item_link_padding_right $menu_item_link_padding_bottom $menu_item_link_padding_left;
445
  vertical-align: baseline;
 
446
  width: auto;
447
  display: block;
448
  color: $menu_item_link_color;
449
  text-transform: $menu_item_link_text_transform;
450
  text-decoration: $menu_item_link_text_decoration;
451
+ text-align: $menu_item_link_text_align;
452
+ text-decoration: none;
453
  @include background($menu_item_background_from, $menu_item_background_to);
454
+ @include border($menu_item_border_top, $menu_item_border_left, $menu_item_border_right, $menu_item_border_bottom, $menu_item_border_color);
455
  @include border-radius($menu_item_link_border_radius_top_left, $menu_item_link_border_radius_top_right, $menu_item_link_border_radius_bottom_right, $menu_item_link_border_radius_bottom_left);
456
  font-family: $menu_item_link_font;
457
  font-size: $menu_item_link_font_size;
458
+ font-weight: $menu_item_link_weight;
459
+ outline: none;
460
  }
461
 
462
  // support for multi line links
484
  }
485
 
486
  > a.mega-menu-link {
487
+ @include border-radius(0, 0, 0, 0);
488
  border: 0;
489
  margin: 0;
490
  line-height: $mobile_menu_item_height;
495
  color: $mobile_menu_item_link_color;
496
  font-size: $mobile_menu_item_link_font_size;
497
  }
 
498
  }
 
499
  }
500
 
501
  // sub menu items (grid)
502
  li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row {
503
+
504
+
505
+ @if unit($panel_inner_width) == 'px' {
506
+ max-width: $panel_inner_width; /** Panel Width (Inner) **/
507
+ margin: 0 auto;
508
+ display: flex;
509
+ } @else {
510
+ width: 100%;
511
+ float: left;
512
+ }
513
 
514
  .mega-menu-column {
515
  float: left;
555
  z-index: $z_index;
556
  @include border-radius($panel_border_radius_top_left, $panel_border_radius_top_right, $panel_border_radius_bottom_right, $panel_border_radius_bottom_left);
557
  @include background($panel_background_from, $panel_background_to);
558
+ @include border($panel_border_top, $panel_border_left, $panel_border_right, $panel_border_bottom, $panel_border_color);
559
  padding: $panel_padding_top $panel_padding_right $panel_padding_bottom $panel_padding_left;
560
  position: absolute;
561
  width: $panel_width;
 
 
 
 
562
  max-width: none;
563
 
564
  @if unit($panel_width) == '%' {
571
  }
572
 
573
  @if $shadow == 'on' {
574
+ @include box-shadow($shadow_horizontal, $shadow_vertical, $shadow_blur, $shadow_spread, $shadow_color);
575
  }
576
 
577
  @include mobile {
629
  text-transform: $panel_header_text_transform;
630
  text-decoration: $panel_header_text_decoration;
631
  font-weight: $panel_header_font_weight;
632
+ text-align: $panel_header_text_align;
633
  margin: $panel_header_margin_top $panel_header_margin_right $panel_header_margin_bottom $panel_header_margin_left;
634
  padding: $panel_header_padding_top $panel_header_padding_right $panel_header_padding_bottom $panel_header_padding_left;
635
  vertical-align: top;
636
  display: block;
637
  visibility: inherit;
638
+ @include border($panel_header_border_top, $panel_header_border_left, $panel_header_border_right, $panel_header_border_bottom, $panel_header_border_color);
639
+
640
+ &:hover {
641
+ border-color: $panel_header_border_color_hover;
642
+ }
643
  }
644
 
645
  // Second level menu items
650
  text-transform: $panel_second_level_text_transform;
651
  text-decoration: $panel_second_level_text_decoration;
652
  font-weight: $panel_second_level_font_weight;
653
+ text-align: $panel_second_level_text_align;
654
  margin: $panel_second_level_margin_top $panel_second_level_margin_right $panel_second_level_margin_bottom $panel_second_level_margin_left;
655
  padding: $panel_second_level_padding_top $panel_second_level_padding_right $panel_second_level_padding_bottom $panel_second_level_padding_left;
656
  vertical-align: top;
657
  display: block;
658
+ @include border($panel_second_level_border_top, $panel_second_level_border_left, $panel_second_level_border_right, $panel_second_level_border_bottom, $panel_second_level_border_color);
659
+
660
+ &:hover {
661
+ border-color: $panel_second_level_border_color_hover;
662
+ }
663
  }
664
 
665
  > a.mega-menu-link:hover,
678
  text-transform: $panel_third_level_text_transform;
679
  text-decoration: $panel_third_level_text_decoration;
680
  font-weight: $panel_third_level_font_weight;
681
+ text-align: $panel_third_level_text_align;
682
+ margin: $panel_third_level_margin_top $panel_third_level_margin_right $panel_third_level_margin_bottom $panel_third_level_margin_left;
683
  padding: $panel_third_level_padding_top $panel_third_level_padding_right $panel_third_level_padding_bottom $panel_third_level_padding_left;
684
  vertical-align: top;
685
  display: block;
686
+ @include border($panel_third_level_border_top, $panel_third_level_border_left, $panel_third_level_border_right, $panel_third_level_border_bottom, $panel_third_level_border_color);
687
+
688
+ &:hover {
689
+ border-color: $panel_third_level_border_color_hover;
690
+ }
691
  }
692
 
693
  &.mega-icon-left.mega-has-description.mega-has-icon > a.mega-menu-link {
703
  text-decoration: $panel_third_level_text_decoration_hover;
704
  @include background($panel_third_level_background_hover_from, $panel_third_level_background_hover_to);
705
  }
706
+
707
  }
708
 
709
  @include mobile {
710
  border: 0;
711
  padding: 10px;
712
+ @include border-radius(0, 0, 0, 0);
713
 
714
  @if $mobile_columns == 2 {
715
  > li.mega-menu-item {
760
  z-index: $z_index;
761
  position: absolute;
762
  width: $flyout_width;
763
+ @include border($flyout_border_top, $flyout_border_left, $flyout_border_right, $flyout_border_bottom, $flyout_border_color);
 
 
 
764
  padding: $flyout_padding_top $flyout_padding_right $flyout_padding_bottom $flyout_padding_left;
765
  @include background($flyout_menu_background_from, $flyout_menu_background_to);
766
  max-width: none;
877
  // Arrows
878
  li.mega-menu-item-has-children {
879
 
880
+ > a.mega-menu-link > span.mega-indicator:after {
 
881
  content: $arrow_down;
882
+ font-family: $arrow_font;
883
+ font-weight: $arrow_font_weight;
884
  display: inline-block;
 
885
  margin: 0 0 0 6px;
886
  vertical-align: top;
887
  -webkit-font-smoothing: antialiased;
897
  }
898
 
899
  > a.mega-menu-link > span.mega-indicator {
 
900
  float: right;
901
  height: auto;
902
  width: auto;
908
  line-height: inherit;
909
  color: inherit;
910
  font-size: inherit;
911
+ }
912
 
913
+ &.mega-collapse-children.mega-toggle-on > a.mega-menu-link > span.mega-indicator:after {
914
+ content: $arrow_up;
 
915
  }
916
 
917
  @include mobile {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
918
  &.mega-toggle-on > a.mega-menu-link > span.mega-indicator:after {
919
  content: $arrow_up;
920
  }
926
  }
927
 
928
  // Hide arrows
929
+ li.mega-menu-megamenu:not(.mega-menu-tabbed) li.mega-menu-item-has-children:not(.mega-collapse-children) > a.mega-menu-link > span.mega-indicator,
930
+ li.mega-menu-item-has-children.mega-hide-arrow > a.mega-menu-link > span.mega-indicator {
 
931
  display: none;
932
  }
933
 
934
+ // Flyout menus
935
+ @include desktop {
936
+ li.mega-menu-flyout {
937
+ li.mega-menu-item a.mega-menu-link > span.mega-indicator {
938
+ &:after {
939
+ content: $arrow_right;
940
+ }
941
+ }
942
 
943
+ &.mega-align-bottom-right {
944
+ li.mega-menu-item a.mega-menu-link {
945
+ text-align: right;
 
 
 
 
 
946
 
947
+ > span.mega-indicator {
948
+ float: left;
949
 
950
+ &:after {
951
+ content: $arrow_left;
952
+ margin: 0 6px 0 0;
953
+ }
954
+ }
955
 
956
+ // Icons
957
+ &:before {
958
+ float: right;
959
+ margin: 0 0 0 6px;
960
+ }
961
+ }
962
+
963
+ ul.mega-sub-menu li.mega-menu-item ul.mega-sub-menu {
964
+ left: -100%;
965
+ top: 0;
966
+ }
967
  }
968
  }
969
+ }
970
 
971
+ // arrows
972
+ @include desktop {
973
+ &.mega-menu-vertical {
974
+ li.mega-align-bottom-right.mega-menu-item-has-children,
975
+ li.mega-align-bottom-right.mega-menu-flyout li.mega-menu-item-has-children {
976
+ > a.mega-menu-link > span.mega-indicator {
977
+ float: right;
978
 
979
+ &:after {
980
+ content: $arrow_right;
981
+ margin: 0;
982
+ }
983
+ }
984
  }
 
985
 
986
+ li.mega-align-bottom-left.mega-menu-item-has-children,
987
+ li.mega-align-bottom-left.mega-menu-flyout li.mega-menu-item-has-children {
988
+ > a.mega-menu-link > span.mega-indicator {
989
+ float: left;
 
990
 
991
+ &:after {
992
+ content: $arrow_left;
993
+ margin: 0;
994
+ }
995
  }
996
  }
997
  }
998
 
999
+ &.mega-menu-accordion {
1000
+ // Arrows
1001
+ li.mega-menu-item-has-children.mega-toggle-on > a.mega-menu-link > span.mega-indicator:after {
1002
+ content: $arrow_up;
1003
+ }
1004
+ }
1005
+
1006
+ // Arrows
1007
+ li.mega-menu-tabbed > ul.mega-sub-menu > li.mega-menu-item.mega-menu-item-has-children > a.mega-menu-link > span.mega-indicator:after {
1008
+ content: $arrow_right;
1009
  }
1010
  }
1011
 
1036
  display: none;
1037
  }
1038
  }
 
1039
  }
1040
 
1041
  @include mobile {
1045
  clear: both;
1046
  }
1047
 
 
 
 
 
 
 
 
 
1048
  }
1049
 
1050
  .mega-menu-toggle {
1052
  z-index: 1;
1053
  cursor: pointer;
1054
  @include background($toggle_background_from, $toggle_background_to);
1055
+ @include border-radius($toggle_bar_border_radius_top_left, $toggle_bar_border_radius_top_right, $toggle_bar_border_radius_bottom_right, $toggle_bar_border_radius_bottom_left);
1056
  line-height: $toggle_bar_height;
1057
  height: $toggle_bar_height;
1058
  text-align: left;
1155
  }
1156
 
1157
  @include mobile {
1158
+
1159
  + #{$menu} {
1160
  @include background($mobile_background_from, $mobile_background_to);
1161
+ padding: $mobile_menu_padding_top $mobile_menu_padding_right $mobile_menu_padding_bottom $mobile_menu_padding_left;
1162
 
1163
  @if $disable_mobile_toggle == on {
1164
  display: block;
1165
  } @else {
1166
  display: none;
1167
+
1168
+ @if $mobile_menu_overlay == on or $mobile_menu_force_width == on {
1169
+ position: absolute;
1170
+ width: 100%;
1171
+ z-index: 9999999;
1172
+ }
1173
  }
1174
  }
1175
 
1176
  &.mega-menu-open + #{$menu} {
1177
  display: block;
1178
  }
1179
+
1180
+ @if ( ( $effect_mobile == slide_right or $effect_mobile == slide_left ) and $disable_mobile_toggle == off ) {
1181
+
1182
+ @if unit( $mobile_menu_off_canvas_width ) == '%' {
1183
+ $mobile_menu_off_canvas_width: 300px;
1184
+ }
1185
+
1186
+ + #{$menu} {
1187
+ position: fixed;
1188
+ display: block;
1189
+ width: $mobile_menu_off_canvas_width;
1190
+ max-width: 90%;
1191
+ height: 100vh;
1192
+ max-height: 100vh;
1193
+ top: 0;
1194
+ box-sizing: border-box;
1195
+ transition: left $effect_speed_mobile ease-in-out, right $effect_speed_mobile ease-in-out;
1196
+ overflow: auto;
1197
+ z-index: 9999999999;
1198
+ }
1199
+
1200
+ @if ($effect_mobile == slide_right ) {
1201
+ + #{$menu} {
1202
+ left: -$mobile_menu_off_canvas_width;
1203
+ }
1204
+
1205
+ &.mega-menu-open + #{$menu} {
1206
+ left: 0;
1207
+ }
1208
+ }
1209
+
1210
+ @if ($effect_mobile == slide_left ) {
1211
+ + #{$menu} {
1212
+ right: -$mobile_menu_off_canvas_width;
1213
+ }
1214
+
1215
+ &.mega-menu-open + #{$menu} {
1216
+ right: 0;
1217
+ }
1218
+ }
1219
+
1220
+ &.mega-menu-open:after {
1221
+ position: fixed;
1222
+ width: 100%;
1223
+ height: 99999px;
1224
+ content: "";
1225
+ top: 0;
1226
+ left: 0;
1227
+ opacity: 0.5;
1228
+ background: black;
1229
+ cursor: pointer;
1230
+ z-index: 9999999998;
1231
+ }
1232
+ }
1233
+ }
1234
+ }
1235
+ }
1236
+
1237
+ @if ( ( $effect_mobile == slide_right or $effect_mobile == slide_left ) and $disable_mobile_toggle == off ) {
1238
+ html.mega-menu-#{$location}-off-canvas-open {
1239
+ overflow: hidden;
1240
+ height: auto;
1241
+
1242
+ body {
1243
+ overflow: hidden;
1244
+ height: auto;
1245
+ }
1246
+
1247
+ #wpadminbar {
1248
+ z-index: 0;
1249
  }
1250
  }
1251
  }
css/mixin.scss CHANGED
@@ -1,17 +1,15 @@
1
  @mixin border-radius($topleft: 0, $topright: 0, $bottomright: 0, $bottomleft: 0) {
2
- -webkit-border-radius: $topleft $topright $bottomright $bottomleft;
3
- -moz-border-radius: $topleft $topright $bottomright $bottomleft;
4
- -ms-border-radius: $topleft $topright $bottomright $bottomleft;
5
- -o-border-radius: $topleft $topright $bottomright $bottomleft;
6
- border-radius: $topleft $topright $bottomright $bottomleft;
 
 
7
  }
8
 
9
  @mixin box-shadow($value) {
10
- -webkit-box-shadow: $value;
11
- -moz-box-shadow: $value;
12
- -ms-box-shadow: $value;
13
- -o-box-shadow: $value;
14
- box-shadow: $value;
15
  }
16
 
17
  @mixin background($from, $to) {
@@ -19,15 +17,22 @@
19
  background: $to;
20
  } @else {
21
  background: $to;
22
- background: -webkit-gradient(linear, left top, left bottom, from($from), to($to));
23
- background: -moz-linear-gradient(top, $from, $to);
24
- background: -ms-linear-gradient(top, $from, $to);
25
- background: -o-linear-gradient(top, $from, $to);
26
  background: linear-gradient(to bottom, $from, $to);
27
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie_hex_str($from)}', endColorstr='#{ie_hex_str($to)}');
28
  }
29
  }
30
 
 
 
 
 
 
 
 
 
 
 
 
31
  @mixin mobile {
32
  @media only screen and (max-width : $responsive_breakpoint) {
33
  @content;
1
  @mixin border-radius($topleft: 0, $topright: 0, $bottomright: 0, $bottomleft: 0) {
2
+ @if $topleft == 0 and $topright == 0 and $bottomright == 0 and $bottomleft == 0 {
3
+ border-radius: 0;
4
+ } @else if $topleft == 0px and $topright == 0px and $bottomright == 0px and $bottomleft == 0px {
5
+ border-radius: 0;
6
+ } @else {
7
+ border-radius: $topleft $topright $bottomright $bottomleft;
8
+ }
9
  }
10
 
11
  @mixin box-shadow($value) {
12
+ box-shadow: $value;
 
 
 
 
13
  }
14
 
15
  @mixin background($from, $to) {
17
  background: $to;
18
  } @else {
19
  background: $to;
 
 
 
 
20
  background: linear-gradient(to bottom, $from, $to);
21
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie_hex_str($from)}', endColorstr='#{ie_hex_str($to)}');
22
  }
23
  }
24
 
25
+ @mixin border($top, $left, $right, $bottom, $color) {
26
+ @if $top == 0px and $left == 0px and $right == 0px and $bottom == 0px {
27
+ border: 0;
28
+ } @else {
29
+ border-top: $top solid $color;
30
+ border-left: $left solid $color;
31
+ border-right: $right solid $color;
32
+ border-bottom: $bottom solid $color;
33
+ }
34
+ }
35
+
36
  @mixin mobile {
37
  @media only screen and (max-width : $responsive_breakpoint) {
38
  @content;
css/reset.scss CHANGED
@@ -40,6 +40,7 @@
40
  height: auto;
41
  outline: none;
42
  visibility: inherit;
 
43
 
44
  &:before,
45
  &:after {
40
  height: auto;
41
  outline: none;
42
  visibility: inherit;
43
+ pointer-events: auto;
44
 
45
  &:before,
46
  &:after {
integration/generatepress/functions.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit; // disable direct access
5
- }
6
-
7
- /**
8
- * Append integration CSS
9
- */
10
- function megamenu_generatepress_style($scss) {
11
- $path = trailingslashit( plugin_dir_path( __FILE__ ) ) . 'style.scss';
12
- $contents = file_get_contents( $path );
13
- return $scss . $contents;
14
- }
15
- add_filter( 'megamenu_load_scss_file_contents', 'megamenu_generatepress_style', 9999 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
integration/generatepress/style.scss DELETED
@@ -1,5 +0,0 @@
1
- @if $location == 'primary' {
2
- body.mega-menu-primary button.menu-toggle {
3
- display: none;
4
- }
5
- }
 
 
 
 
 
integration/twentytwelve/functions.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit; // disable direct access
5
- }
6
-
7
- /**
8
- * Append integration CSS
9
- */
10
- function megamenu_twentytwelve_style($scss) {
11
- $path = trailingslashit( plugin_dir_path( __FILE__ ) ) . 'style.scss';
12
- $contents = file_get_contents( $path );
13
- return $scss . $contents;
14
- }
15
- add_filter( 'megamenu_load_scss_file_contents', 'megamenu_twentytwelve_style', 9999 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
integration/twentytwelve/style.scss DELETED
@@ -1,5 +0,0 @@
1
- @if $location == 'primary' {
2
- body.mega-menu-primary button.menu-toggle {
3
- display: none;
4
- }
5
- }
 
 
 
 
 
js/admin.js CHANGED
@@ -385,6 +385,12 @@
385
 
386
  grid.on("click", ".widget-action", function() {
387
 
 
 
 
 
 
 
388
  var widget = $(this).closest(".widget");
389
  var widget_title = widget.find("h4");
390
  var id = widget.attr("data-id");
@@ -396,7 +402,7 @@
396
 
397
  // retrieve the widget settings form
398
  $.post(ajaxurl, {
399
- action: "mm_edit_widget",
400
  widget_id: id,
401
  _wpnonce: megamenu.nonce
402
  }, function(response) {
@@ -984,6 +990,13 @@
984
 
985
 
986
  megamenubuilder.on("click", ".widget .widget-action", function() {
 
 
 
 
 
 
 
987
  var widget = $(this).closest(".widget");
988
  var widget_title = widget.find(".widget-title");
989
  var widget_inner = widget.find(".widget-inner");
@@ -995,7 +1008,7 @@
995
 
996
  // retrieve the widget settings form
997
  $.post(ajaxurl, {
998
- action: "mm_edit_widget",
999
  widget_id: id,
1000
  _wpnonce: megamenu.nonce
1001
  }, function(response) {
385
 
386
  grid.on("click", ".widget-action", function() {
387
 
388
+ var action = "mm_edit_widget";
389
+
390
+ if ($(this).parent().parent().parent().attr('data-type') == 'item') {
391
+ action = "mm_edit_menu_item";
392
+ }
393
+
394
  var widget = $(this).closest(".widget");
395
  var widget_title = widget.find("h4");
396
  var id = widget.attr("data-id");
402
 
403
  // retrieve the widget settings form
404
  $.post(ajaxurl, {
405
+ action: action,
406
  widget_id: id,
407
  _wpnonce: megamenu.nonce
408
  }, function(response) {
990
 
991
 
992
  megamenubuilder.on("click", ".widget .widget-action", function() {
993
+
994
+ var action = "mm_edit_widget";
995
+
996
+ if ($(this).parent().parent().parent().attr('data-type') == 'menu_item') {
997
+ action = "mm_edit_menu_item";
998
+ }
999
+
1000
  var widget = $(this).closest(".widget");
1001
  var widget_title = widget.find(".widget-title");
1002
  var widget_inner = widget.find(".widget-inner");
1008
 
1009
  // retrieve the widget settings form
1010
  $.post(ajaxurl, {
1011
+ action: action,
1012
  widget_id: id,
1013
  _wpnonce: megamenu.nonce
1014
  }, function(response) {
js/maxmegamenu.js CHANGED
@@ -9,6 +9,7 @@
9
  var plugin = this;
10
  var $menu = $(menu);
11
  var $toggle_bar = $menu.siblings(".mega-menu-toggle");
 
12
 
13
  var defaults = {
14
  event: $menu.attr("data-event"),
@@ -19,6 +20,7 @@
19
  panel_width: $menu.attr("data-panel-width"),
20
  panel_inner_width: $menu.attr("data-panel-inner-width"),
21
  mobile_force_width: $menu.attr("data-mobile-force-width"),
 
22
  second_click: $menu.attr("data-second-click"),
23
  vertical_behaviour: $menu.attr("data-vertical-behaviour"),
24
  document_click: $menu.attr("data-document-click"),
@@ -33,37 +35,7 @@
33
  "li.mega-menu-tabbed > ul.mega-sub-menu > li.mega-menu-item-has-children," +
34
  "li.mega-menu-flyout li.mega-menu-item-has-children", menu);
35
 
36
- plugin.hidePanel = function(anchor, immediate) {
37
 
38
- anchor.parent().triggerHandler("before_close_panel");
39
-
40
- anchor.attr("aria-expanded", "false");
41
-
42
- if ( (!immediate && plugin.settings.effect === "slide") || (plugin.isMobileView() && plugin.settings.effect_mobile === "slide") ) {
43
- var speed = plugin.isMobileView() ? plugin.settings.effect_speed_mobile : plugin.settings.effect_speed;
44
-
45
- anchor.siblings(".mega-sub-menu").animate({"height":"hide", "paddingTop":"hide", "paddingBottom":"hide", "minHeight":"hide"}, speed, function() {
46
- anchor.siblings(".mega-sub-menu").css("display", "");
47
- anchor.parent().removeClass("mega-toggle-on").triggerHandler("close_panel");
48
- });
49
-
50
- return;
51
- }
52
-
53
- if (immediate) {
54
- anchor.siblings(".mega-sub-menu").css("display", "none").delay(plugin.settings.effect_speed).queue(function(){
55
- $(this).css("display", "").dequeue();
56
- });
57
- }
58
-
59
- // pause video widget videos
60
- anchor.siblings(".mega-sub-menu").find(".widget_media_video video").each(function() {
61
- this.player.pause();
62
- });
63
-
64
- anchor.parent().removeClass("mega-toggle-on").triggerHandler("close_panel");
65
- plugin.addAnimatingClass(anchor.parent());
66
- };
67
 
68
  plugin.addAnimatingClass = function(element) {
69
  if (plugin.settings.effect === "disabled") {
@@ -112,7 +84,7 @@
112
  return;
113
  }
114
 
115
- if (plugin.isDesktopView() && ($menu.hasClass("mega-menu-horizontal") || $menu.hasClass("mega-menu-vertical"))) {
116
  plugin.hideSiblingPanels(anchor, true);
117
  }
118
 
@@ -123,7 +95,9 @@
123
  plugin.calculateDynamicSubmenuWidths(anchor);
124
 
125
  // apply jQuery transition (only if the effect is set to "slide", other transitions are CSS based)
126
- if ( plugin.settings.effect === "slide" || (plugin.isMobileView() && plugin.settings.effect_mobile === "slide")) {
 
 
127
  var speed = plugin.isMobileView() ? plugin.settings.effect_speed_mobile : plugin.settings.effect_speed;
128
 
129
  anchor.siblings(".mega-sub-menu").css("display", "none").animate({"height":"show", "paddingTop":"show", "paddingBottom":"show", "minHeight":"show"}, speed, function() {
@@ -133,6 +107,39 @@
133
 
134
  anchor.parent().addClass("mega-toggle-on").triggerHandler("open_panel");
135
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
 
137
  plugin.calculateDynamicSubmenuWidths = function(anchor) {
138
  // apply dynamic width and sub menu position (only to top level mega menus)
@@ -197,12 +204,15 @@
197
  dragging = false;
198
  });
199
 
200
- $("> a.mega-menu-link", items_with_submenus).on("touchend.megamenu", function(e) {
 
 
 
201
  plugin.unbindHoverEvents();
202
  plugin.unbindHoverIntentEvents();
203
  });
204
 
205
- $("> a.mega-menu-link", items_with_submenus).on("click.megamenu", function(e) {
206
  if (plugin.isDesktopView() && $(this).parent().hasClass("mega-toggle-on") && $(this).parent().parent().parent().hasClass("mega-menu-tabbed") ) {
207
  if (plugin.settings.second_click === "go") {
208
  return;
@@ -288,7 +298,7 @@
288
  var keyCode = e.keyCode || e.which;
289
  var active_link = $(e.target);
290
 
291
- if (keyCode === space_key && $menu.parent().hasClass("mega-keyboard-navigation") ) {
292
  e.preventDefault();
293
 
294
  // pressing space on a parent item will always toggle the sub menu
@@ -305,7 +315,7 @@
305
  $menu.parent().on("keyup.megamenu", function(e) {
306
  var keyCode = e.keyCode || e.which;
307
  var active_link = $(e.target);
308
-
309
  if ( keyCode === tab_key && $menu.parent().hasClass("mega-keyboard-navigation") ) {
310
  if ( active_link.parent().is(items_with_submenus) && active_link.is("[href]") !== false ) {
311
  plugin.showPanel(active_link);
@@ -429,6 +439,7 @@
429
  plugin.unbindKeyboardEvents();
430
  };
431
 
 
432
  plugin.bindMegaMenuEvents = function() {
433
  if (plugin.isDesktopView() && plugin.settings.event === "hover_intent") {
434
  bindHoverIntentEvents();
@@ -524,7 +535,10 @@
524
  return;
525
  }
526
 
527
- $("body").removeClass($menu.attr("id") + "-mobile-open");
 
 
 
528
 
529
  $(".mega-toggle-label, .mega-toggle-animated", $toggle_bar).attr("aria-expanded", "false");
530
 
@@ -546,8 +560,14 @@
546
  return;
547
  }
548
 
 
 
549
  $("body").addClass($menu.attr("id") + "-mobile-open");
550
 
 
 
 
 
551
  $(".mega-toggle-label, .mega-toggle-animated", $toggle_bar).attr("aria-expanded", "true");
552
 
553
  plugin.toggleBarForceWidth();
@@ -560,7 +580,7 @@
560
  };
561
 
562
  plugin.toggleBarForceWidth = function() {
563
- if ($(plugin.settings.mobile_force_width).length) {
564
  var submenu_offset = $toggle_bar.offset();
565
  var target_offset = $(plugin.settings.mobile_force_width).offset();
566
 
@@ -582,12 +602,14 @@
582
  plugin.unbindAllEvents();
583
  }
584
 
585
- $("span.mega-indicator", $menu).on("click", function(e) {
586
  e.preventDefault();
587
  e.stopPropagation();
588
 
589
  if ( $(this).parent().parent().hasClass("mega-toggle-on") ) {
590
- plugin.hidePanel($(this).parent(), false);
 
 
591
  } else {
592
  plugin.showPanel($(this).parent(), false);
593
  }
9
  var plugin = this;
10
  var $menu = $(menu);
11
  var $toggle_bar = $menu.siblings(".mega-menu-toggle");
12
+ var html_body_class_timeout;
13
 
14
  var defaults = {
15
  event: $menu.attr("data-event"),
20
  panel_width: $menu.attr("data-panel-width"),
21
  panel_inner_width: $menu.attr("data-panel-inner-width"),
22
  mobile_force_width: $menu.attr("data-mobile-force-width"),
23
+ mobile_overlay: $menu.attr("data-mobile-overlay"),
24
  second_click: $menu.attr("data-second-click"),
25
  vertical_behaviour: $menu.attr("data-vertical-behaviour"),
26
  document_click: $menu.attr("data-document-click"),
35
  "li.mega-menu-tabbed > ul.mega-sub-menu > li.mega-menu-item-has-children," +
36
  "li.mega-menu-flyout li.mega-menu-item-has-children", menu);
37
 
 
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  plugin.addAnimatingClass = function(element) {
41
  if (plugin.settings.effect === "disabled") {
84
  return;
85
  }
86
 
87
+ if (plugin.isDesktopView() && ( $menu.hasClass("mega-menu-horizontal") || $menu.hasClass("mega-menu-vertical") ) && !anchor.parent().hasClass("mega-collapse-children")) {
88
  plugin.hideSiblingPanels(anchor, true);
89
  }
90
 
95
  plugin.calculateDynamicSubmenuWidths(anchor);
96
 
97
  // apply jQuery transition (only if the effect is set to "slide", other transitions are CSS based)
98
+ if ( anchor.parent().hasClass("mega-collapse-children") || plugin.settings.effect === "slide" ||
99
+ ( plugin.isMobileView() && ( plugin.settings.effect_mobile === "slide" || plugin.settings.effect_mobile === "slide_left" || plugin.settings.effect_mobile === "slide_right" ) )
100
+ ) {
101
  var speed = plugin.isMobileView() ? plugin.settings.effect_speed_mobile : plugin.settings.effect_speed;
102
 
103
  anchor.siblings(".mega-sub-menu").css("display", "none").animate({"height":"show", "paddingTop":"show", "paddingBottom":"show", "minHeight":"show"}, speed, function() {
107
 
108
  anchor.parent().addClass("mega-toggle-on").triggerHandler("open_panel");
109
  };
110
+
111
+ plugin.hidePanel = function(anchor, immediate) {
112
+ anchor.parent().triggerHandler("before_close_panel");
113
+
114
+ anchor.attr("aria-expanded", "false");
115
+
116
+ if ( anchor.parent().hasClass("mega-collapse-children") || ( ! immediate && plugin.settings.effect === "slide" ) ||
117
+ ( plugin.isMobileView() && ( plugin.settings.effect_mobile === "slide" || plugin.settings.effect_mobile === "slide_left" || plugin.settings.effect_mobile === "slide_right" ) )
118
+ ) {
119
+ var speed = plugin.isMobileView() ? plugin.settings.effect_speed_mobile : plugin.settings.effect_speed;
120
+
121
+ anchor.siblings(".mega-sub-menu").animate({"height":"hide", "paddingTop":"hide", "paddingBottom":"hide", "minHeight":"hide"}, speed, function() {
122
+ anchor.siblings(".mega-sub-menu").css("display", "");
123
+ anchor.parent().removeClass("mega-toggle-on").triggerHandler("close_panel");
124
+ });
125
+
126
+ return;
127
+ }
128
+
129
+ if (immediate) {
130
+ anchor.siblings(".mega-sub-menu").css("display", "none").delay(plugin.settings.effect_speed).queue(function(){
131
+ $(this).css("display", "").dequeue();
132
+ });
133
+ }
134
+
135
+ // pause video widget videos
136
+ anchor.siblings(".mega-sub-menu").find(".widget_media_video video").each(function() {
137
+ this.player.pause();
138
+ });
139
+
140
+ anchor.parent().removeClass("mega-toggle-on").triggerHandler("close_panel");
141
+ plugin.addAnimatingClass(anchor.parent());
142
+ };
143
 
144
  plugin.calculateDynamicSubmenuWidths = function(anchor) {
145
  // apply dynamic width and sub menu position (only to top level mega menus)
204
  dragging = false;
205
  });
206
 
207
+ var collapse_children_parents = $("li.mega-menu-megamenu li.mega-menu-item-has-children.mega-collapse-children > a.mega-menu-link");
208
+ var clickable_parents = $("> a.mega-menu-link", items_with_submenus).add(collapse_children_parents);
209
+
210
+ clickable_parents.on("touchend.megamenu", function(e) {
211
  plugin.unbindHoverEvents();
212
  plugin.unbindHoverIntentEvents();
213
  });
214
 
215
+ clickable_parents.on("click.megamenu", function(e) {
216
  if (plugin.isDesktopView() && $(this).parent().hasClass("mega-toggle-on") && $(this).parent().parent().parent().hasClass("mega-menu-tabbed") ) {
217
  if (plugin.settings.second_click === "go") {
218
  return;
298
  var keyCode = e.keyCode || e.which;
299
  var active_link = $(e.target);
300
 
301
+ if ( keyCode === space_key && active_link.is(".mega-menu-link") && $menu.parent().hasClass("mega-keyboard-navigation") ) {
302
  e.preventDefault();
303
 
304
  // pressing space on a parent item will always toggle the sub menu
315
  $menu.parent().on("keyup.megamenu", function(e) {
316
  var keyCode = e.keyCode || e.which;
317
  var active_link = $(e.target);
318
+
319
  if ( keyCode === tab_key && $menu.parent().hasClass("mega-keyboard-navigation") ) {
320
  if ( active_link.parent().is(items_with_submenus) && active_link.is("[href]") !== false ) {
321
  plugin.showPanel(active_link);
439
  plugin.unbindKeyboardEvents();
440
  };
441
 
442
+
443
  plugin.bindMegaMenuEvents = function() {
444
  if (plugin.isDesktopView() && plugin.settings.event === "hover_intent") {
445
  bindHoverIntentEvents();
535
  return;
536
  }
537
 
538
+ html_body_class_timeout = setTimeout(function() {
539
+ $("body").removeClass($menu.attr("id") + "-mobile-open");
540
+ $("html").removeClass($menu.attr("id") + "-off-canvas-open");
541
+ }, plugin.settings.effect_speed_mobile);
542
 
543
  $(".mega-toggle-label, .mega-toggle-animated", $toggle_bar).attr("aria-expanded", "false");
544
 
560
  return;
561
  }
562
 
563
+ clearTimeout(html_body_class_timeout);
564
+
565
  $("body").addClass($menu.attr("id") + "-mobile-open");
566
 
567
+ if ( plugin.settings.effect_mobile === "slide_left" || plugin.settings.effect_mobile === "slide_right" ) {
568
+ $("html").addClass($menu.attr("id") + "-off-canvas-open");
569
+ }
570
+
571
  $(".mega-toggle-label, .mega-toggle-animated", $toggle_bar).attr("aria-expanded", "true");
572
 
573
  plugin.toggleBarForceWidth();
580
  };
581
 
582
  plugin.toggleBarForceWidth = function() {
583
+ if ($(plugin.settings.mobile_force_width).length && ( plugin.settings.mobile_effect == 'slide' || plugin.settings.mobile_effect == 'disabled' ) ) {
584
  var submenu_offset = $toggle_bar.offset();
585
  var target_offset = $(plugin.settings.mobile_force_width).offset();
586
 
602
  plugin.unbindAllEvents();
603
  }
604
 
605
+ $("span.mega-indicator", $menu).on("click.megamenu", function(e) {
606
  e.preventDefault();
607
  e.stopPropagation();
608
 
609
  if ( $(this).parent().parent().hasClass("mega-toggle-on") ) {
610
+ if ( ! $(this).parent().parent().parent().parent().hasClass("mega-menu-tabbed") || plugin.isMobileView() ) {
611
+ plugin.hidePanel($(this).parent(), false);
612
+ }
613
  } else {
614
  plugin.showPanel($(this).parent(), false);
615
  }
js/settings.js CHANGED
@@ -30,17 +30,19 @@ jQuery(function ($) {
30
  }
31
  });
32
 
33
- if ($('#codemirror').length) {
34
- wp.codeEditor.initialize($('#codemirror'), cm_settings);
35
- }
 
36
 
37
- $('[data-tab="mega-tab-content-custom_styling"]').on('click', function() {
38
- setTimeout( function() {
39
- $('.mega-tab-content-custom_styling').find('.CodeMirror').each(function(key, value) {
40
- value.CodeMirror.refresh();
41
- });
42
- }, 160);
43
- });
 
44
 
45
  $(".mm_colorpicker").spectrum({
46
  preferredFormat: "rgb",
@@ -196,7 +198,7 @@ jQuery(function ($) {
196
  }
197
 
198
  if ( ( validation == 'int' && Math.floor(value) != value )
199
- || ( validation == 'px' && ! ( value.substr(value.length - 2) == 'px' || value.substr(value.length - 2) == 'em' || value.substr(value.length - 2) == 'vh' || value.substr(value.length - 2) == 'vw' || value.substr(value.length - 2) == 'pt' || value.substr(value.length - 3) == 'rem' || value.substr(value.length - 1) == '%' ) && value != 0 )
200
  || ( validation == 'float' && ! $.isNumeric(value) ) ) {
201
  label.addClass('mega-error');
202
  error_message.show();
30
  }
31
  });
32
 
33
+ if (typeof wp.codeEditor !== 'undefined') {
34
+ if ($('#codemirror').length) {
35
+ wp.codeEditor.initialize($('#codemirror'), cm_settings);
36
+ }
37
 
38
+ $('[data-tab="mega-tab-content-custom_styling"]').on('click', function() {
39
+ setTimeout( function() {
40
+ $('.mega-tab-content-custom_styling').find('.CodeMirror').each(function(key, value) {
41
+ value.CodeMirror.refresh();
42
+ });
43
+ }, 160);
44
+ });
45
+ }
46
 
47
  $(".mm_colorpicker").spectrum({
48
  preferredFormat: "rgb",
198
  }
199
 
200
  if ( ( validation == 'int' && Math.floor(value) != value )
201
+ || ( validation == 'px' && ! ( value.substr(value.length - 2) == 'px' || value.substr(value.length - 2) == 'em' || value.substr(value.length - 2) == 'vh' || value.substr(value.length - 2) == 'vw' || value.substr(value.length - 2) == 'pt' || value.substr(value.length - 3) == 'rem' || value.substr(value.length - 1) == '%' ) && value != 0 && value != 'normal' && value != 'inherit' )
202
  || ( validation == 'float' && ! $.isNumeric(value) ) ) {
203
  label.addClass('mega-error');
204
  error_message.show();
megamenu.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Max Mega Menu
5
  * Plugin URI: https://www.megamenu.com
6
  * Description: An easy to use mega menu plugin. Written the WordPress way.
7
- * Version: 2.6
8
  * Author: megamenu.com
9
  * Author URI: https://www.megamenu.com
10
  * License: GPL-2.0+
@@ -36,7 +36,7 @@ final class Mega_Menu {
36
  /**
37
  * @var string
38
  */
39
- public $version = '2.6';
40
 
41
 
42
  /**
@@ -250,6 +250,7 @@ final class Mega_Menu {
250
  if ( ! $settings ) {
251
  $settings['prefix'] = 'disabled';
252
  $settings['descriptions'] = 'enabled';
 
253
 
254
  add_option( "megamenu_settings", $settings);
255
  }
@@ -367,8 +368,6 @@ final class Mega_Menu {
367
 
368
  switch ( $template ) {
369
  case "twentyseventeen":
370
- case "generatepress":
371
- case "twentytwelve":
372
  case "zerif":
373
  if ( is_readable( MEGAMENU_PATH . "integration/{$template}/functions.php" ) ) {
374
  require_once( MEGAMENU_PATH . "integration/{$template}/functions.php" );
@@ -923,6 +922,14 @@ final class Mega_Menu {
923
  if ( $item->megamenu_settings['disable_link'] == 'true') {
924
  $item->classes[] = 'disable-link';
925
  }
 
 
 
 
 
 
 
 
926
  }
927
 
928
  // add column classes for second level menu items displayed in mega menus
@@ -984,14 +991,24 @@ final class Mega_Menu {
984
 
985
  $settings = get_option( 'megamenu_settings' );
986
  $current_theme_location = $args['theme_location'];
 
987
  $active_instance = isset( $settings['instances'][$current_theme_location] ) ? $settings['instances'][$current_theme_location] : 0;
988
 
989
- if ( $active_instance != 0 && $active_instance != $num_times_called ) {
990
- return $args;
991
- }
992
 
993
- if ( strlen( $active_instance ) && ! is_numeric( $active_instance ) && isset( $args['container_id'] ) && $active_instance != $args['container_id'] ) {
994
- return $args;
 
 
 
 
 
 
 
 
 
 
 
995
  }
996
 
997
  $locations = get_nav_menu_locations();
@@ -1026,7 +1043,7 @@ final class Mega_Menu {
1026
  }
1027
 
1028
  // as set on the main settings page
1029
- $second_click = isset( $settings['second_click'] ) ? $settings['second_click'] : 'close';
1030
 
1031
  if ( isset( $menu_settings['second_click'] ) ) {
1032
  $second_click = $menu_settings['second_click'];
@@ -1135,6 +1152,10 @@ final class Mega_Menu {
1135
 
1136
  endif;
1137
 
 
 
 
 
1138
  $css_version = get_transient("megamenu_css_version");
1139
  $css = get_transient("megamenu_css");
1140
 
4
  * Plugin Name: Max Mega Menu
5
  * Plugin URI: https://www.megamenu.com
6
  * Description: An easy to use mega menu plugin. Written the WordPress way.
7
+ * Version: 2.7
8
  * Author: megamenu.com
9
  * Author URI: https://www.megamenu.com
10
  * License: GPL-2.0+
36
  /**
37
  * @var string
38
  */
39
+ public $version = '2.7';
40
 
41
 
42
  /**
250
  if ( ! $settings ) {
251
  $settings['prefix'] = 'disabled';
252
  $settings['descriptions'] = 'enabled';
253
+ $settings['second_click'] = 'go';
254
 
255
  add_option( "megamenu_settings", $settings);
256
  }
368
 
369
  switch ( $template ) {
370
  case "twentyseventeen":
 
 
371
  case "zerif":
372
  if ( is_readable( MEGAMENU_PATH . "integration/{$template}/functions.php" ) ) {
373
  require_once( MEGAMENU_PATH . "integration/{$template}/functions.php" );
922
  if ( $item->megamenu_settings['disable_link'] == 'true') {
923
  $item->classes[] = 'disable-link';
924
  }
925
+
926
+ if ( $item->megamenu_settings['collapse_children'] == 'true' ) {
927
+ $item->classes[] = 'collapse-children';
928
+ }
929
+
930
+ if ( absint($item->megamenu_settings['submenu_columns']) > 1 ) {
931
+ $item->classes[] = absint($item->megamenu_settings['submenu_columns']) . '-columns';
932
+ }
933
  }
934
 
935
  // add column classes for second level menu items displayed in mega menus
991
 
992
  $settings = get_option( 'megamenu_settings' );
993
  $current_theme_location = $args['theme_location'];
994
+
995
  $active_instance = isset( $settings['instances'][$current_theme_location] ) ? $settings['instances'][$current_theme_location] : 0;
996
 
997
+ if ( $active_instance != '0' && strlen( $active_instance ) ) {
 
 
998
 
999
+ if ( strpos( $active_instance, "," ) || is_numeric( $active_instance ) ) {
1000
+
1001
+ $active_instances = explode( ",", $active_instance );
1002
+
1003
+ if ( ! in_array( $num_times_called, $active_instances )) {
1004
+ return $args;
1005
+ }
1006
+
1007
+ } else if ( isset( $args['container_id'] ) && $active_instance != $args['container_id'] ) {
1008
+
1009
+ return $args;
1010
+
1011
+ }
1012
  }
1013
 
1014
  $locations = get_nav_menu_locations();
1043
  }
1044
 
1045
  // as set on the main settings page
1046
+ $second_click = isset( $settings['second_click'] ) ? $settings['second_click'] : 'go';
1047
 
1048
  if ( isset( $menu_settings['second_click'] ) ) {
1049
  $second_click = $menu_settings['second_click'];
1152
 
1153
  endif;
1154
 
1155
+ if ( defined("MEGAMENU_HIDE_CSS_NAG") && MEGAMENU_HIDE_CSS_NAG === true ) {
1156
+ return;
1157
+ }
1158
+
1159
  $css_version = get_transient("megamenu_css_version");
1160
  $css = get_transient("megamenu_css");
1161
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: megamenu
3
  Tags: menu, megamenu, mega menu, navigation, widget, dropdown menu, drag and drop, mobile, responsive, retina, theme editor, widget, shortcode, sidebar, icons, dashicons
4
  Requires at least: 4.9
5
- Tested up to: 5.2
6
  Stable tag: 2.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -109,6 +109,27 @@ See https://www.megamenu.com for more screenshots
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  = 2.6 =
113
 
114
  * Improvement: Use core version of CodeMirror (requires WordPress 4.9+)
2
  Contributors: megamenu
3
  Tags: menu, megamenu, mega menu, navigation, widget, dropdown menu, drag and drop, mobile, responsive, retina, theme editor, widget, shortcode, sidebar, icons, dashicons
4
  Requires at least: 4.9
5
+ Tested up to: 5.1
6
  Stable tag: 2.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
109
 
110
  == Changelog ==
111
 
112
+ = 2.7 =
113
+
114
+ * Change: No longer use ":after" pseudo element to display arrows. Use 'span.mega-indicator' instead. This allows the arrows to control the sub menu independantly of the menu text. Custom CSS targeting `a.mega-menu-link:after` should be updated to target `a.mega-menu-link > span.mega-indicator:after`.
115
+
116
+ * New: Off canvas mobile options under Appearance > Menus > Max Mega Menu Settings > Effect (Mobile). Remember to clear any CSS caching or minification plugins if you have problems activating this functionality.
117
+ * New: "Collapse sub menu" option to hide third/fourth level items within mega menus
118
+ * New: Option to distribute third level items over multiple columns within mega menus
119
+ * New: Options in the theme editor: Border & Text Align options for Second & Third Level Menu Items, Mobile Sub Menu Padding, Toggle Bar Border Radius, Off Canvas Menu Width & Padding
120
+ * New: 31 new Dashicons introduced in WordPress 5.2
121
+ * Improvement: Allow comma separated values for Active Menu Instance
122
+ * Improvement: Add checks around loading CodeMirror to avoid conflicts
123
+ * Improvement: Allow Panel Width (Inner) to be specified in pixels (grid layout only)
124
+ * Improvement: Default "Second Click Behaviour" to "First click opens sub menu, second click follows link"
125
+ * Improvement: Add support for 'MEGA_MENU_HIDE_CSS_NAG' constant
126
+ * Fix: Allow space in input boxes when using tab navigation
127
+ * Fix: Very long titles make save button inaccessible in menu item options
128
+ * Fix: Select2 conflict with WP Job Manager
129
+ * Fix: Mobile sub menu animation sometimes "jumps" when using slide animation
130
+
131
+ We hope you enjoy Max Mega Menu and the new updates. If you have a spare moment please leave us a quick [review](https://wordpress.org/support/plugin/megamenu/reviews/#new-post). Thanks!
132
+
133
  = 2.6 =
134
 
135
  * Improvement: Use core version of CodeMirror (requires WordPress 4.9+)