Max Mega Menu - Version 2.7.2

Version Description

  • Improvement: Show warning if there are unsaved changes when closing the menu item settings lightbox
  • Improvement: Admin styling updates for menu item settings
  • Improvement: Convert select "Yes/No" dropdowns to checkboxes
  • Fix: CSS compilation fails when theme directory name contains dots and spaces
  • Fix: Arrow position in FireFox - apply display: inline;
  • Fix: Remove the delay in removing the "mobile-open" body class when mobile effect is disabled
  • Fix: Add extra checks before initialising codemirror
Download this release

Release Info

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

Code changes from version 2.7.1.4 to 2.7.2

classes/settings.class.php CHANGED
@@ -311,7 +311,21 @@ class Mega_Menu_Settings {
311
 
312
  if ( isset( $_POST['settings'] ) && is_array( $_POST['settings'] ) ) {
313
 
314
- $submitted_settings = apply_filters( "megamenu_submitted_settings", $_POST['settings'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  $existing_settings = get_option( 'megamenu_settings' );
316
 
317
  $new_settings = array_merge( (array)$existing_settings, $submitted_settings );
@@ -758,10 +772,7 @@ class Mega_Menu_Settings {
758
  </div>
759
  </td>
760
  <td class='mega-value'>
761
- <select name='settings[descriptions]'>
762
- <option value='disabled' <?php echo selected( $descriptions == 'disabled'); ?>><?php _e("Disabled", "megamenu"); ?></option>
763
- <option value='enabled' <?php echo selected( $descriptions == 'enabled'); ?>><?php _e("Enabled", "megamenu"); ?></option>
764
- <select>
765
  <div class='mega-description'>
766
  </div>
767
  </td>
@@ -774,10 +785,7 @@ class Mega_Menu_Settings {
774
  </div>
775
  </td>
776
  <td class='mega-value'>
777
- <select name='settings[unbind]'>
778
- <option value='disabled' <?php echo selected( $unbind == 'disabled'); ?>><?php _e("No", "megamenu"); ?></option>
779
- <option value='enabled' <?php echo selected( $unbind == 'enabled'); ?>><?php _e("Yes", "megamenu"); ?></option>
780
- <select>
781
  <div class='mega-description'>
782
  </div>
783
  </td>
@@ -790,10 +798,7 @@ class Mega_Menu_Settings {
790
  </div>
791
  </td>
792
  <td class='mega-value'>
793
- <select name='settings[prefix]'>
794
- <option value='disabled' <?php echo selected( $prefix == 'disabled'); ?>><?php _e("No", "megamenu"); ?></option>
795
- <option value='enabled' <?php echo selected( $prefix == 'enabled'); ?>><?php _e("Yes", "megamenu"); ?></option>
796
- <select>
797
  <div class='mega-description'>
798
  </div>
799
  </td>
@@ -4137,15 +4142,6 @@ class Mega_Menu_Settings {
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',
@@ -4161,6 +4157,14 @@ class Mega_Menu_Settings {
4161
  )
4162
  );
4163
 
 
 
 
 
 
 
 
 
4164
  }
4165
 
4166
  }
311
 
312
  if ( isset( $_POST['settings'] ) && is_array( $_POST['settings'] ) ) {
313
 
314
+ $settings = $_POST['settings'];
315
+
316
+ if ( ! isset( $settings['descriptions'] ) ) {
317
+ $settings['descriptions'] = 'disabled';
318
+ }
319
+
320
+ if ( ! isset( $settings['unbind'] ) ) {
321
+ $settings['unbind'] = 'disabled';
322
+ }
323
+
324
+ if ( ! isset( $settings['prefix'] ) ) {
325
+ $settings['prefix'] = 'disabled';
326
+ }
327
+
328
+ $submitted_settings = apply_filters( "megamenu_submitted_settings", $settings );
329
  $existing_settings = get_option( 'megamenu_settings' );
330
 
331
  $new_settings = array_merge( (array)$existing_settings, $submitted_settings );
772
  </div>
773
  </td>
774
  <td class='mega-value'>
775
+ <input type="checkbox" name="settings[descriptions]" value="enabled" <?php checked( $descriptions, 'enabled' ); ?> />
 
 
 
776
  <div class='mega-description'>
777
  </div>
778
  </td>
785
  </div>
786
  </td>
787
  <td class='mega-value'>
788
+ <input type="checkbox" name="settings[unbind]" value="enabled" <?php checked( $unbind, 'enabled' ); ?> />
 
 
 
789
  <div class='mega-description'>
790
  </div>
791
  </td>
798
  </div>
799
  </td>
800
  <td class='mega-value'>
801
+ <input type="checkbox" name="settings[prefix]" value="enabled" <?php checked( $prefix, 'enabled' ); ?> />
 
 
 
802
  <div class='mega-description'>
803
  </div>
804
  </td>
4142
  wp_enqueue_script( 'spectrum', MEGAMENU_BASE_URL . 'js/spectrum/spectrum.js', array( 'jquery' ), MEGAMENU_VERSION );
4143
  wp_enqueue_script( 'mega-menu-select2', MEGAMENU_BASE_URL . 'js/select2/select2.min.js', array(), MEGAMENU_VERSION );
4144
 
 
 
 
 
 
 
 
 
 
4145
  wp_enqueue_script( 'mega-menu-theme-editor', MEGAMENU_BASE_URL . 'js/settings.js', array( 'jquery', 'spectrum', 'code-editor' ), MEGAMENU_VERSION );
4146
 
4147
  wp_localize_script( 'mega-menu-theme-editor', 'megamenu_settings',
4157
  )
4158
  );
4159
 
4160
+ if ( function_exists('wp_enqueue_code_editor') ) {
4161
+ wp_deregister_style('codemirror');
4162
+ wp_deregister_script('codemirror');
4163
+
4164
+ $cm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/x-scss'));
4165
+ wp_localize_script('mega-menu-theme-editor', 'cm_settings', $cm_settings);
4166
+ wp_enqueue_style('wp-codemirror');
4167
+ }
4168
  }
4169
 
4170
  }
classes/style-manager.class.php CHANGED
@@ -708,7 +708,7 @@ final class Mega_Menu_Style_Manager {
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' );
708
  $current_theme = wp_get_theme();
709
  $theme_id = $current_theme->template;
710
 
711
+ $vars['wp_theme'] = strtolower( str_replace( array( ".", " " ), "_", $theme_id ) );
712
 
713
  if ( ! function_exists( 'is_plugin_active' )) {
714
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
css/admin/admin.css CHANGED
@@ -31,6 +31,17 @@
31
  .rtl.nav-menus-php .mega_menu_meta_box div table td:nth-child(2) {
32
  text-align: left; }
33
 
 
 
 
 
 
 
 
 
 
 
 
34
  .nav-menus-php #cboxContent {
35
  padding: 0;
36
  -webkit-user-select: none;
@@ -89,10 +100,10 @@
89
  color: #444;
90
  transition: all 0.05s linear; }
91
  .nav-menus-php #cboxContent .mm_tabs li.mm_tab_horizontal:hover {
92
- background: #2ea2cc;
93
  color: white; }
94
  .nav-menus-php #cboxContent .mm_tabs li.mm_tab_horizontal.active {
95
- background: #2ea2cc;
96
  color: white; }
97
  .nav-menus-php #cboxContent .mm_tabs.horizontal {
98
  width: 85%;
@@ -106,10 +117,10 @@
106
  .nav-menus-php #cboxContent .mm_header_container {
107
  float: left;
108
  width: 100%;
109
- border-bottom: 1px solid #eee; }
 
110
  .nav-menus-php #cboxContent .mm_header_container .mm_title {
111
  padding: 0 20px;
112
- background: white;
113
  font-size: 1.3em;
114
  align-items: center;
115
  display: inline-flex;
@@ -124,15 +135,17 @@
124
  display: none;
125
  line-height: 75px;
126
  text-transform: uppercase;
127
- color: #2ea2cc;
128
  font-size: 11px;
129
  font-weight: bold;
130
  float: right;
131
- background: #fff; }
 
 
132
  .nav-menus-php #cboxContent .mm_header_container .mm_saving:before {
133
- color: #2ea2cc;
134
  display: inline-block;
135
- font: normal 20px/75px 'dashicons';
136
  speak: none;
137
  -webkit-font-smoothing: antialiased;
138
  -moz-osx-font-smoothing: grayscale;
@@ -155,15 +168,42 @@
155
  color: #444;
156
  width: 100%;
157
  display: block;
158
- padding: 10px 10px 10px 20px;
159
  box-sizing: border-box;
160
  outline: 0;
161
  position: relative;
162
- transition: all 0.05s linear;
163
- font-size: 12px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  .nav-menus-php #cboxContent .mm_tab_container .mm_tab.active {
165
  color: white;
166
- background: #2ea2cc; }
 
 
167
  .nav-menus-php #cboxContent .mm_tab_container .mm_tab.active:after {
168
  right: 0;
169
  border: solid 5px transparent;
@@ -177,9 +217,12 @@
177
  margin-top: -5px; }
178
  .nav-menus-php #cboxContent p.submit {
179
  margin-bottom: 0;
180
- padding-bottom: 0; }
 
 
 
181
  .nav-menus-php #cboxContent .mm_content_container {
182
- padding: 20px;
183
  float: right;
184
  height: 504px;
185
  width: 85%;
@@ -556,7 +599,7 @@
556
  display: block; }
557
  .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .dashicons {
558
  font-size: 13px;
559
- width: 17px;
560
  cursor: pointer; }
561
  .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .dashicons-sort,
562
  .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .dashicons-move {
@@ -609,8 +652,7 @@
609
  margin: 0 5px; }
610
  .nav-menus-php #cboxContent .mm_content.mega_menu select#mm_widget_selector {
611
  font-size: 0.9em;
612
- float: right;
613
- margin-right: 5px; }
614
  .nav-menus-php #cboxContent .mm_content.mega_menu select#mm_number_of_columns {
615
  font-size: 0.9em;
616
  float: right;
@@ -1012,9 +1054,9 @@
1012
  background: none;
1013
  width: auto;
1014
  height: auto;
1015
- color: white;
1016
- right: -28px;
1017
- top: 2px; }
1018
  .nav-menus-php #cboxClose:before {
1019
  content: "\f335";
1020
  font: normal 24px/29px 'dashicons'; }
@@ -1022,7 +1064,7 @@
1022
  color: #0074a2; }
1023
 
1024
  .nav-menus-php.megamenu_enabled .mm_launch {
1025
- background: #2ea2cc;
1026
  border-color: #0074a2; }
1027
 
1028
  .nav-menus-php.megamenu_enabled .mm_launch.mm_disabled {
31
  .rtl.nav-menus-php .mega_menu_meta_box div table td:nth-child(2) {
32
  text-align: left; }
33
 
34
+ .nav-menus-php.mega-colorbox-open ul#adminmenu a.wp-has-current-submenu:after,
35
+ .nav-menus-php.mega-colorbox-open ul#adminmenu > li.current > a.current:after {
36
+ border-right-color: #373737; }
37
+
38
+ .nav-menus-php #cboxOverlay {
39
+ left: 160px; }
40
+
41
+ .nav-menus-php #colorbox {
42
+ transform: translateX(80px);
43
+ z-index: 99999; }
44
+
45
  .nav-menus-php #cboxContent {
46
  padding: 0;
47
  -webkit-user-select: none;
100
  color: #444;
101
  transition: all 0.05s linear; }
102
  .nav-menus-php #cboxContent .mm_tabs li.mm_tab_horizontal:hover {
103
+ background: #0073aa;
104
  color: white; }
105
  .nav-menus-php #cboxContent .mm_tabs li.mm_tab_horizontal.active {
106
+ background: #0073aa;
107
  color: white; }
108
  .nav-menus-php #cboxContent .mm_tabs.horizontal {
109
  width: 85%;
117
  .nav-menus-php #cboxContent .mm_header_container {
118
  float: left;
119
  width: 100%;
120
+ border-bottom: 1px solid #eee;
121
+ background: #eee; }
122
  .nav-menus-php #cboxContent .mm_header_container .mm_title {
123
  padding: 0 20px;
 
124
  font-size: 1.3em;
125
  align-items: center;
126
  display: inline-flex;
135
  display: none;
136
  line-height: 75px;
137
  text-transform: uppercase;
138
+ color: #0073aa;
139
  font-size: 11px;
140
  font-weight: bold;
141
  float: right;
142
+ background: #fff;
143
+ position: absolute;
144
+ right: 54px; }
145
  .nav-menus-php #cboxContent .mm_header_container .mm_saving:before {
146
+ color: #0073aa;
147
  display: inline-block;
148
+ font: normal 20px/75px "dashicons";
149
  speak: none;
150
  -webkit-font-smoothing: antialiased;
151
  -moz-osx-font-smoothing: grayscale;
168
  color: #444;
169
  width: 100%;
170
  display: block;
171
+ padding: 10px 10px 10px 15px;
172
  box-sizing: border-box;
173
  outline: 0;
174
  position: relative;
175
+ transition: all 0.1s linear;
176
+ font-size: 12px;
177
+ cursor: pointer; }
178
+ .nav-menus-php #cboxContent .mm_tab_container .mm_tab:hover {
179
+ background: #f7f7f7; }
180
+ .nav-menus-php #cboxContent .mm_tab_container .mm_tab:before {
181
+ color: #999;
182
+ display: inline-block;
183
+ font-family: 'dashicons';
184
+ speak: none;
185
+ -webkit-font-smoothing: antialiased;
186
+ -moz-osx-font-smoothing: grayscale;
187
+ vertical-align: top;
188
+ margin-right: 10px;
189
+ content: '\f463';
190
+ font-size: 15px;
191
+ width: 14px; }
192
+ .nav-menus-php #cboxContent .mm_tab_container .mm_tab.mega_menu:before {
193
+ content: "\f116"; }
194
+ .nav-menus-php #cboxContent .mm_tab_container .mm_tab.general_settings:before {
195
+ content: "\f111"; }
196
+ .nav-menus-php #cboxContent .mm_tab_container .mm_tab.menu_icon:before {
197
+ content: "\f128"; }
198
+ .nav-menus-php #cboxContent .mm_tab_container .mm_tab.styling:before {
199
+ content: "\f540"; }
200
+ .nav-menus-php #cboxContent .mm_tab_container .mm_tab.roles:before {
201
+ content: "\f110"; }
202
  .nav-menus-php #cboxContent .mm_tab_container .mm_tab.active {
203
  color: white;
204
+ background: #0073aa; }
205
+ .nav-menus-php #cboxContent .mm_tab_container .mm_tab.active:before {
206
+ color: white; }
207
  .nav-menus-php #cboxContent .mm_tab_container .mm_tab.active:after {
208
  right: 0;
209
  border: solid 5px transparent;
217
  margin-top: -5px; }
218
  .nav-menus-php #cboxContent p.submit {
219
  margin-bottom: 0;
220
+ padding-bottom: 20px;
221
+ position: sticky;
222
+ bottom: 0;
223
+ background: white; }
224
  .nav-menus-php #cboxContent .mm_content_container {
225
+ padding: 20px 20px 0 20px;
226
  float: right;
227
  height: 504px;
228
  width: 85%;
599
  display: block; }
600
  .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .dashicons {
601
  font-size: 13px;
602
+ width: 15px;
603
  cursor: pointer; }
604
  .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .dashicons-sort,
605
  .nav-menus-php #cboxContent .mm_content.mega_menu #megamenu-grid .dashicons-move {
652
  margin: 0 5px; }
653
  .nav-menus-php #cboxContent .mm_content.mega_menu select#mm_widget_selector {
654
  font-size: 0.9em;
655
+ float: right; }
 
656
  .nav-menus-php #cboxContent .mm_content.mega_menu select#mm_number_of_columns {
657
  font-size: 0.9em;
658
  float: right;
1054
  background: none;
1055
  width: auto;
1056
  height: auto;
1057
+ right: 14px;
1058
+ top: 25px;
1059
+ color: #999; }
1060
  .nav-menus-php #cboxClose:before {
1061
  content: "\f335";
1062
  font: normal 24px/29px 'dashicons'; }
1064
  color: #0074a2; }
1065
 
1066
  .nav-menus-php.megamenu_enabled .mm_launch {
1067
+ background: #0073aa;
1068
  border-color: #0074a2; }
1069
 
1070
  .nav-menus-php.megamenu_enabled .mm_launch.mm_disabled {
css/admin/admin.scss CHANGED
@@ -1,4 +1,4 @@
1
- $light_blue: #2ea2cc;
2
  $light_grey: #f7f7f7;
3
  $mid_grey: #eee;
4
  $grey: #DFDFDF;
@@ -9,6 +9,7 @@ $black: #000;
9
  $red: #D0011B;
10
  $orange: #ffb900;
11
  $green: #46b450;
 
12
 
13
  .rtl.nav-menus-php {
14
  .mm_launch {
@@ -49,6 +50,21 @@ $green: #46b450;
49
  }
50
  .nav-menus-php {
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  #cboxContent {
53
  padding: 0;
54
  -webkit-user-select: none;
@@ -163,20 +179,19 @@ $green: #46b450;
163
  float: left;
164
  width: 100%;
165
  border-bottom: 1px solid $mid_grey;
 
166
 
167
  .mm_title {
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;
179
-
180
  }
181
  }
182
 
@@ -184,18 +199,20 @@ $green: #46b450;
184
  text-align: right;
185
  padding: 0 20px;
186
  display: none;
187
- line-height: 75px;
188
  text-transform: uppercase;
189
  color: $light_blue;
190
  font-size: 11px;
191
  font-weight: bold;
192
  float: right;
193
  background: $white;
 
 
194
 
195
  &:before {
196
  color: $light_blue;
197
  display: inline-block;
198
- font: normal 20px/75px 'dashicons';
199
  speak: none;
200
  -webkit-font-smoothing: antialiased;
201
  -moz-osx-font-smoothing: grayscale;
@@ -224,18 +241,58 @@ $green: #46b450;
224
  color: $text_grey;
225
  width: 100%;
226
  display: block;
227
- padding: 10px 10px 10px 20px;
228
  box-sizing: border-box;
229
  outline: 0;
230
  position: relative;
231
- transition: all 0.05s linear;
232
  font-size: 12px;
 
233
  }
234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  .mm_tab.active {
236
  color: white;
237
  background: $light_blue;
238
 
 
 
 
239
  &:after {
240
  right: 0;
241
  border: solid 5px transparent;
@@ -255,11 +312,14 @@ $green: #46b450;
255
 
256
  p.submit {
257
  margin-bottom: 0;
258
- padding-bottom: 0;
 
 
 
259
  }
260
 
261
  .mm_content_container {
262
- padding: 20px;
263
  float: right;
264
  height: 504px;
265
  width: 85%;
@@ -635,7 +695,7 @@ $green: #46b450;
635
 
636
  .dashicons {
637
  font-size: 13px;
638
- width: 17px;
639
  cursor: pointer;
640
  }
641
 
@@ -717,7 +777,6 @@ $green: #46b450;
717
  select#mm_widget_selector {
718
  font-size: 0.9em;
719
  float: right;
720
- margin-right: 5px;
721
  }
722
 
723
  select#mm_number_of_columns {
@@ -1400,9 +1459,10 @@ $green: #46b450;
1400
  background: none;
1401
  width: auto;
1402
  height: auto;
1403
- color: white;
1404
- right: -28px;
1405
- top: 2px;
 
1406
  &:before {
1407
  content: "\f335";
1408
  font: normal 24px/29px 'dashicons';
@@ -1634,10 +1694,6 @@ $green: #46b450;
1634
  }
1635
  }
1636
 
1637
-
1638
-
1639
-
1640
-
1641
  .toplevel_page_maxmegamenu .notice,
1642
  .mega-menu_page_maxmegamenu_theme_editor .notice,
1643
  .toplevel_page_maxmegamenu div.updated,
@@ -2471,6 +2527,7 @@ body.toplevel_page_maxmegamenu {
2471
  .megamenu_submit {
2472
  float: left;
2473
  width: 100%;
 
2474
  }
2475
 
2476
  div.mega-tab-content {
@@ -2577,5 +2634,4 @@ body.toplevel_page_maxmegamenu {
2577
  -webkit-transform: rotate(359deg);
2578
  transform: rotate(359deg);
2579
  }
2580
- }
2581
-
1
+ $light_blue: #0073aa;
2
  $light_grey: #f7f7f7;
3
  $mid_grey: #eee;
4
  $grey: #DFDFDF;
9
  $red: #D0011B;
10
  $orange: #ffb900;
11
  $green: #46b450;
12
+ $header_height: 75px;
13
 
14
  .rtl.nav-menus-php {
15
  .mm_launch {
50
  }
51
  .nav-menus-php {
52
 
53
+ &.mega-colorbox-open {
54
+ ul#adminmenu a.wp-has-current-submenu:after,
55
+ ul#adminmenu>li.current>a.current:after {
56
+ border-right-color: #373737;
57
+ }
58
+ }
59
+
60
+ #cboxOverlay {
61
+ left: 160px;
62
+ }
63
+
64
+ #colorbox {
65
+ transform: translateX(80px);
66
+ z-index: 99999;
67
+ }
68
  #cboxContent {
69
  padding: 0;
70
  -webkit-user-select: none;
179
  float: left;
180
  width: 100%;
181
  border-bottom: 1px solid $mid_grey;
182
+ background: $mid_grey;
183
 
184
  .mm_title {
185
  padding: 0 20px;
 
186
  font-size: 1.3em;
187
  align-items: center;
188
  display: inline-flex;
189
  line-height: 25px;
190
  float: left;
191
+ height: $header_height;
192
 
193
  br {
194
  display: none;
 
195
  }
196
  }
197
 
199
  text-align: right;
200
  padding: 0 20px;
201
  display: none;
202
+ line-height: $header_height;
203
  text-transform: uppercase;
204
  color: $light_blue;
205
  font-size: 11px;
206
  font-weight: bold;
207
  float: right;
208
  background: $white;
209
+ position: absolute;
210
+ right: 54px;
211
 
212
  &:before {
213
  color: $light_blue;
214
  display: inline-block;
215
+ font: normal 20px/#{$header_height} 'dashicons';
216
  speak: none;
217
  -webkit-font-smoothing: antialiased;
218
  -moz-osx-font-smoothing: grayscale;
241
  color: $text_grey;
242
  width: 100%;
243
  display: block;
244
+ padding: 10px 10px 10px 15px;
245
  box-sizing: border-box;
246
  outline: 0;
247
  position: relative;
248
+ transition: all 0.1s linear;
249
  font-size: 12px;
250
+ cursor: pointer;
251
  }
252
 
253
+ .mm_tab:hover {
254
+ background: $light_grey;
255
+ }
256
+
257
+ .mm_tab:before {
258
+ color: $dark_grey;
259
+ display: inline-block;
260
+ font-family: 'dashicons';
261
+ speak: none;
262
+ -webkit-font-smoothing: antialiased;
263
+ -moz-osx-font-smoothing: grayscale;
264
+ vertical-align: top;
265
+ margin-right: 10px;
266
+ content: '\f463';
267
+ font-size: 15px;
268
+ width: 14px;
269
+ }
270
+
271
+ .mm_tab.mega_menu:before {
272
+ content: "\f116";
273
+ }
274
+
275
+ .mm_tab.general_settings:before {
276
+ content: "\f111";
277
+ }
278
+
279
+ .mm_tab.menu_icon:before {
280
+ content: "\f128";
281
+ }
282
+ .mm_tab.styling:before {
283
+ content: "\f540";
284
+ }
285
+
286
+ .mm_tab.roles:before {
287
+ content: "\f110";
288
+ }
289
  .mm_tab.active {
290
  color: white;
291
  background: $light_blue;
292
 
293
+ &:before {
294
+ color: white;
295
+ }
296
  &:after {
297
  right: 0;
298
  border: solid 5px transparent;
312
 
313
  p.submit {
314
  margin-bottom: 0;
315
+ padding-bottom: 20px;
316
+ position: sticky;
317
+ bottom: 0;
318
+ background: white;
319
  }
320
 
321
  .mm_content_container {
322
+ padding: 20px 20px 0 20px;
323
  float: right;
324
  height: 504px;
325
  width: 85%;
695
 
696
  .dashicons {
697
  font-size: 13px;
698
+ width: 15px;
699
  cursor: pointer;
700
  }
701
 
777
  select#mm_widget_selector {
778
  font-size: 0.9em;
779
  float: right;
 
780
  }
781
 
782
  select#mm_number_of_columns {
1459
  background: none;
1460
  width: auto;
1461
  height: auto;
1462
+ right: 14px;
1463
+ top: 25px;
1464
+ color: $dark_grey;
1465
+
1466
  &:before {
1467
  content: "\f335";
1468
  font: normal 24px/29px 'dashicons';
1694
  }
1695
  }
1696
 
 
 
 
 
1697
  .toplevel_page_maxmegamenu .notice,
1698
  .mega-menu_page_maxmegamenu_theme_editor .notice,
1699
  .toplevel_page_maxmegamenu div.updated,
2527
  .megamenu_submit {
2528
  float: left;
2529
  width: 100%;
2530
+
2531
  }
2532
 
2533
  div.mega-tab-content {
2634
  -webkit-transform: rotate(359deg);
2635
  transform: rotate(359deg);
2636
  }
2637
+ }
 
css/megamenu.scss CHANGED
@@ -897,8 +897,8 @@
897
  }
898
 
899
  > a.mega-menu-link > span.mega-indicator {
900
- display: inline-block;
901
- height: 100%;
902
  width: auto;
903
  background: transparent;
904
  position: relative;
897
  }
898
 
899
  > a.mega-menu-link > span.mega-indicator {
900
+ display: inline;
901
+ height: auto;
902
  width: auto;
903
  background: transparent;
904
  position: relative;
js/admin.js CHANGED
@@ -24,6 +24,8 @@
24
 
25
  panel.init = function() {
26
 
 
 
27
  panel.log({
28
  success: true,
29
  data: megamenu.debug_launched + " " + panel.settings.menu_item_id
@@ -36,11 +38,30 @@
36
  initialWidth: "75%",
37
  scrolling: true,
38
  fixed: true,
39
- top: "50px",
40
  initialHeight: "552",
41
- maxHeight: "570",
 
 
 
 
 
 
 
42
  });
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  $.ajax({
45
  type: "POST",
46
  url: ajaxurl,
@@ -72,6 +93,7 @@
72
  wp.customHtmlWidgets.widgetControls = {}; // WordPress 4.9 Custom HTML Widgets
73
  }
74
 
 
75
  },
76
  success: function(response) {
77
 
@@ -79,7 +101,6 @@
79
 
80
  var json = $.parseJSON(response.data);
81
 
82
-
83
  var header_container = $("<div />").addClass("mm_header_container");
84
 
85
  var title = $("<div />").addClass("mm_title").html(panel.settings.menu_item_title);
@@ -99,17 +120,22 @@
99
  $.each(json, function(idx) {
100
 
101
  var content = $("<div />").addClass("mm_content").addClass(idx).html(this.content).hide();
102
-
103
  // bind save button action
104
  content.find("form").on("submit", function(e) {
105
  start_saving();
 
106
  e.preventDefault();
107
  var data = $(this).serialize();
108
  $.post(ajaxurl, data, function(submit_response) {
109
  end_saving();
110
  panel.log(submit_response);
111
  });
 
112
 
 
 
 
113
  });
114
 
115
  if (idx === "menu_icon") {
24
 
25
  panel.init = function() {
26
 
27
+ var isDirty = false;
28
+
29
  panel.log({
30
  success: true,
31
  data: megamenu.debug_launched + " " + panel.settings.menu_item_id
38
  initialWidth: "75%",
39
  scrolling: true,
40
  fixed: true,
 
41
  initialHeight: "552",
42
+ onOpen: function() {
43
+ $('body').addClass('mega-colorbox-open');
44
+ isDirty = false;
45
+ },
46
+ onClosed: function() {
47
+ $('body').removeClass('mega-colorbox-open');
48
+ isDirty = false;
49
+ }
50
  });
51
 
52
+ var originalClose = $.colorbox.close;
53
+
54
+ $.colorbox.close = function(){
55
+ if ( isDirty == false ) {
56
+ originalClose();
57
+ return;
58
+ }
59
+
60
+ if ( confirm( navMenuL10n.saveAlert ) ) {
61
+ originalClose();
62
+ }
63
+ };
64
+
65
  $.ajax({
66
  type: "POST",
67
  url: ajaxurl,
93
  wp.customHtmlWidgets.widgetControls = {}; // WordPress 4.9 Custom HTML Widgets
94
  }
95
 
96
+
97
  },
98
  success: function(response) {
99
 
101
 
102
  var json = $.parseJSON(response.data);
103
 
 
104
  var header_container = $("<div />").addClass("mm_header_container");
105
 
106
  var title = $("<div />").addClass("mm_title").html(panel.settings.menu_item_title);
120
  $.each(json, function(idx) {
121
 
122
  var content = $("<div />").addClass("mm_content").addClass(idx).html(this.content).hide();
123
+
124
  // bind save button action
125
  content.find("form").on("submit", function(e) {
126
  start_saving();
127
+ isDirty = false;
128
  e.preventDefault();
129
  var data = $(this).serialize();
130
  $.post(ajaxurl, data, function(submit_response) {
131
  end_saving();
132
  panel.log(submit_response);
133
  });
134
+ });
135
 
136
+ // register changes made
137
+ content.find("form").on("change", function(e) {
138
+ isDirty = true;
139
  });
140
 
141
  if (idx === "menu_icon") {
js/settings.js CHANGED
@@ -30,7 +30,7 @@ jQuery(function ($) {
30
  }
31
  });
32
 
33
- if (typeof wp.codeEditor !== 'undefined') {
34
  if ($('#codemirror').length) {
35
  wp.codeEditor.initialize($('#codemirror'), cm_settings);
36
  }
30
  }
31
  });
32
 
33
+ if (typeof wp.codeEditor !== 'undefined' && typeof cm_settings !== 'undefined') {
34
  if ($('#codemirror').length) {
35
  wp.codeEditor.initialize($('#codemirror'), cm_settings);
36
  }
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.7.1.4
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.7.1.4';
40
 
41
 
42
  /**
@@ -1077,14 +1077,31 @@ final class Mega_Menu {
1077
  }
1078
  }
1079
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1080
  $wrap_attributes = apply_filters("megamenu_wrap_attributes", array(
1081
  "id" => '%1$s',
1082
  "class" => '%2$s mega-no-js',
1083
  "data-event" => $event,
1084
  "data-effect" => $effect,
1085
  "data-effect-speed" => isset( $menu_settings['effect_speed'] ) ? $menu_settings['effect_speed'] : '200',
1086
- "data-effect-mobile" => isset( $menu_settings['effect_mobile'] ) ? $menu_settings['effect_mobile'] : 'disabled',
1087
- "data-effect-speed-mobile" => isset( $menu_settings['effect_speed_mobile'] ) ? $menu_settings['effect_speed_mobile'] : '200',
1088
  "data-panel-width" => preg_match('/^\d/', $menu_theme['panel_width']) !== 1 ? $menu_theme['panel_width'] : '',
1089
  "data-panel-inner-width" => substr( $menu_theme['panel_inner_width'], -1 ) !== '%' ? $menu_theme['panel_inner_width'] : '',
1090
  "data-mobile-force-width" => $mobile_force_width,
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.2
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.2';
40
 
41
 
42
  /**
1077
  }
1078
  }
1079
 
1080
+
1081
+ $effect_mobile = 'disabled';
1082
+
1083
+ if ( isset( $menu_settings['effect_mobile'] ) ) {
1084
+ $effect_mobile = $menu_settings['effect_mobile'];
1085
+ }
1086
+
1087
+ $effect_speed_mobile = 200;
1088
+
1089
+ if ( isset( $menu_settings['effect_speed_mobile'] ) ) {
1090
+ $effect_speed_mobile = $menu_settings['effect_speed_mobile'];
1091
+ }
1092
+
1093
+ if ( $effect_mobile == 'disabled' ) {
1094
+ $effect_speed_mobile = 0;
1095
+ }
1096
+
1097
  $wrap_attributes = apply_filters("megamenu_wrap_attributes", array(
1098
  "id" => '%1$s',
1099
  "class" => '%2$s mega-no-js',
1100
  "data-event" => $event,
1101
  "data-effect" => $effect,
1102
  "data-effect-speed" => isset( $menu_settings['effect_speed'] ) ? $menu_settings['effect_speed'] : '200',
1103
+ "data-effect-mobile" => $effect_mobile,
1104
+ "data-effect-speed-mobile" => $effect_speed_mobile,
1105
  "data-panel-width" => preg_match('/^\d/', $menu_theme['panel_width']) !== 1 ? $menu_theme['panel_width'] : '',
1106
  "data-panel-inner-width" => substr( $menu_theme['panel_inner_width'], -1 ) !== '%' ? $menu_theme['panel_inner_width'] : '',
1107
  "data-mobile-force-width" => $mobile_force_width,
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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.7.1.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -17,7 +17,17 @@ https://www.youtube.com/watch?v=44dJwP1AXT8
17
 
18
  Documentation & Demo: [https://www.megamenu.com](https://www.megamenu.com)
19
 
20
- ###Features:
 
 
 
 
 
 
 
 
 
 
21
 
22
  * Builds upon the standard WordPress menus system
23
  * Supports multiple menu locations each with their own configuration
@@ -33,6 +43,15 @@ Documentation & Demo: [https://www.megamenu.com](https://www.megamenu.com)
33
  * Align menu items to the left or right of the menu bar
34
  * Align sub menus to left or right of parent menu item
35
 
 
 
 
 
 
 
 
 
 
36
  Max Mega Menu is developed with a focus on code quality, performance and usability.
37
 
38
  * The only mega menu plugin with zero "!important", block or inline CSS styles
@@ -51,7 +70,7 @@ Max Mega Menu is developed with a focus on code quality, performance and usabili
51
  > * Tabbed Mega Menus
52
  > * Sticky Menu
53
  > * Vertical & Accordion Menus
54
- > * FontAwesome, Genericon & Custom Icons
55
  > * Custom Item Styling
56
  > * Menu Logo
57
  > * Search box
@@ -66,6 +85,9 @@ Max Mega Menu is developed with a focus on code quality, performance and usabili
66
 
67
  == Frequently Asked Questions ==
68
 
 
 
 
69
  = Where do I start? =
70
  [https://www.megamenu.com/documentation/installation/](https://www.megamenu.com/documentation/installation/)
71
 
@@ -110,6 +132,16 @@ See https://www.megamenu.com for more screenshots
110
 
111
  == Changelog ==
112
 
 
 
 
 
 
 
 
 
 
 
113
  = 2.7.1.4 =
114
 
115
  * Fix: Residual styling on arrows - apply display: inline-block;
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.7.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
17
 
18
  Documentation & Demo: [https://www.megamenu.com](https://www.megamenu.com)
19
 
20
+
21
+ ###Mobile
22
+
23
+ * Automatic support for native touch events
24
+ * Off Canvas Mobile Menu option built in
25
+ * Specify your own Responsive Breakpoint
26
+ * For items with sub menus, choose between "First click opens sub menu, second click closes sub menu" or "First click opens sub menu, second click follows link"
27
+ * Option to hide sub menus on mobile
28
+ * Mobile Toggle Bar designer allows you to tailor the toggle bar elements to fit in with your site design
29
+
30
+ ###Features
31
 
32
  * Builds upon the standard WordPress menus system
33
  * Supports multiple menu locations each with their own configuration
43
  * Align menu items to the left or right of the menu bar
44
  * Align sub menus to left or right of parent menu item
45
 
46
+ ###Accessibility
47
+
48
+ * Keyboard Navigation built in
49
+ * `TAB` activates keyboard naviation and navigates through the menu
50
+ * `ENTER` on a parent item opens a sub menu (pressing `ENTER` a second time will respect the "Second Click Behaviour" setting)
51
+ * `ENTER` on a standard item will follow the link
52
+ * `SPACE` toggles the sub menu visibility
53
+ * `ESC` closes all open sub menus
54
+
55
  Max Mega Menu is developed with a focus on code quality, performance and usability.
56
 
57
  * The only mega menu plugin with zero "!important", block or inline CSS styles
70
  > * Tabbed Mega Menus
71
  > * Sticky Menu
72
  > * Vertical & Accordion Menus
73
+ > * FontAwesome 5, Genericon & Custom Icons
74
  > * Custom Item Styling
75
  > * Menu Logo
76
  > * Search box
85
 
86
  == Frequently Asked Questions ==
87
 
88
+ = Is it compatible with Elementor? =
89
+ Yes! See: [https://www.megamenu.com/documentation/elementor/](https://www.megamenu.com/documentation/elementor/)
90
+
91
  = Where do I start? =
92
  [https://www.megamenu.com/documentation/installation/](https://www.megamenu.com/documentation/installation/)
93
 
132
 
133
  == Changelog ==
134
 
135
+ = 2.7.2 =
136
+
137
+ * Improvement: Show warning if there are unsaved changes when closing the menu item settings lightbox
138
+ * Improvement: Admin styling updates for menu item settings
139
+ * Improvement: Convert select "Yes/No" dropdowns to checkboxes
140
+ * Fix: CSS compilation fails when theme directory name contains dots and spaces
141
+ * Fix: Arrow position in FireFox - apply display: inline;
142
+ * Fix: Remove the delay in removing the "mobile-open" body class when mobile effect is disabled
143
+ * Fix: Add extra checks before initialising codemirror
144
+
145
  = 2.7.1.4 =
146
 
147
  * Fix: Residual styling on arrows - apply display: inline-block;