Max Mega Menu - Version 2.7.1.3

Version Description

  • Fix: Arrow drops onto new line in IE11 and in some other situations
Download this release

Release Info

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

Code changes from version 2.7.1.2 to 2.7.1.3

classes/walker.class.php CHANGED
@@ -73,7 +73,7 @@ class Mega_Menu_Walker extends Walker_Nav_Menu {
73
  // Item Class
74
  $classes = empty( $item->classes ) ? array() : (array) $item->classes;
75
 
76
- if ( is_array( $item->classes ) && ! in_array( "menu-column", $item->classes ) && ! in_array( "menu-row", $item->classes ) ) {
77
  $classes[] = 'menu-item-' . $item->ID;
78
  }
79
 
@@ -86,7 +86,7 @@ class Mega_Menu_Walker extends Walker_Nav_Menu {
86
  $class = str_replace( "mega-menu-widget-class-", "", $class );
87
 
88
  // Item ID
89
- if ( is_array( $item->classes ) && ! in_array( "menu-column", $item->classes ) && ! in_array( "menu-row", $item->classes ) ) {
90
  $id = "mega-menu-item-{$item->ID}";
91
  } else {
92
  $id = "mega-menu-{$item->ID}";
@@ -110,31 +110,30 @@ class Mega_Menu_Walker extends Walker_Nav_Menu {
110
  $atts['class'] = '';
111
  $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
112
 
113
-
114
- if ( $settings['disable_link'] != 'true') {
115
  $atts['href'] = ! empty( $item->url ) ? $item->url : '';
116
  } else {
117
  $atts['tabindex'] = 0;
118
  }
119
 
120
- if ( isset( $settings['icon']) && $settings['icon'] != 'disabled' && $settings['icon'] != 'custom' ) {
121
  $atts['class'] = $settings['icon'];
122
  }
123
-
124
- if ( isset( $settings['icon']) && $settings['icon'] == 'custom' ) {
125
  $atts['class'] = 'mega-custom-icon';
126
  }
127
 
128
- if ( in_array('menu-item-has-children', $classes ) && $item->parent_submenu_type == 'flyout') {
129
 
130
  $atts['aria-haspopup'] = "true"; // required for Surface/Win10/Edge
131
  $atts['aria-expanded'] = "false";
132
 
133
- if ( in_array('mega-toggle-on', $mega_classes ) ) {
134
  $atts['aria-expanded'] = "true";
135
  }
136
 
137
- if ( $settings['disable_link'] == 'true' ) {
138
  $atts['role'] = 'button';
139
  }
140
  }
@@ -143,13 +142,13 @@ class Mega_Menu_Walker extends Walker_Nav_Menu {
143
  $atts['tabindex'] = "0";
144
  }
145
 
146
- if ( $settings['hide_text'] == 'true' ) {
147
  $atts['aria-label'] = $item->title;
148
  }
149
 
150
  $atts = apply_filters( 'megamenu_nav_menu_link_attributes', $atts, $item, $args );
151
 
152
- if ( strlen( $atts['class'] ) ) {
153
  $atts['class'] = $atts['class'] . ' mega-menu-link';
154
  } else {
155
  $atts['class'] = 'mega-menu-link';
@@ -158,22 +157,20 @@ class Mega_Menu_Walker extends Walker_Nav_Menu {
158
  $attributes = '';
159
 
160
  foreach ( $atts as $attr => $value ) {
161
-
162
  if ( strlen( $value ) ) {
163
  $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
164
  $attributes .= ' ' . $attr . '="' . $value . '"';
165
  }
166
-
167
  }
168
 
169
  $item_output = $args->before;
170
  $item_output .= '<a'. $attributes .'>';
171
 
172
- if ( in_array('icon-top', $classes ) ) {
173
  $item_output .= "<span class='mega-title-below'>";
174
  }
175
 
176
- if ( $settings['hide_text'] == 'true' ) {
177
  /** This filter is documented in wp-includes/post-template.php */
178
  } else if ( property_exists( $item, 'mega_description' ) && strlen( $item->mega_description ) ) {
179
  $item_output .= '<span class="mega-description-group"><span class="mega-menu-title">' . $args->link_before . apply_filters( 'megamenu_the_title', $item->title, $item->ID ) . $args->link_after . '</span><span class="mega-menu-description">' . $item->description . '</span></span>';
@@ -181,18 +178,18 @@ class Mega_Menu_Walker extends Walker_Nav_Menu {
181
  $item_output .= $args->link_before . apply_filters( 'megamenu_the_title', $item->title, $item->ID ) . $args->link_after;
182
  }
183
 
184
- if ( is_array( $classes ) && in_array('icon-top', $classes ) ) {
185
  $item_output .= "</span>";
186
  }
187
 
188
- if ( in_array('menu-item-has-children', $classes ) ) {
189
  $item_output .= '<span class="mega-indicator"></span>';
190
  }
191
 
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
 
73
  // Item Class
74
  $classes = empty( $item->classes ) ? array() : (array) $item->classes;
75
 
76
+ if ( is_array( $classes ) && ! in_array( "menu-column", $classes ) && ! in_array( "menu-row", $classes ) ) {
77
  $classes[] = 'menu-item-' . $item->ID;
78
  }
79
 
86
  $class = str_replace( "mega-menu-widget-class-", "", $class );
87
 
88
  // Item ID
89
+ if ( is_array( $classes ) && ! in_array( "menu-column", $classes ) && ! in_array( "menu-row", $classes ) ) {
90
  $id = "mega-menu-item-{$item->ID}";
91
  } else {
92
  $id = "mega-menu-{$item->ID}";
110
  $atts['class'] = '';
111
  $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
112
 
113
+ if ( isset( $settings['disable_link'] ) && $settings['disable_link'] != 'true') {
 
114
  $atts['href'] = ! empty( $item->url ) ? $item->url : '';
115
  } else {
116
  $atts['tabindex'] = 0;
117
  }
118
 
119
+ if ( isset( $settings['icon'] ) && $settings['icon'] != 'disabled' && $settings['icon'] != 'custom' ) {
120
  $atts['class'] = $settings['icon'];
121
  }
122
+
123
+ if ( isset( $settings['icon'] ) && $settings['icon'] == 'custom' ) {
124
  $atts['class'] = 'mega-custom-icon';
125
  }
126
 
127
+ if ( is_array( $classes ) && in_array( 'menu-item-has-children', $classes ) && $item->parent_submenu_type == 'flyout' ) {
128
 
129
  $atts['aria-haspopup'] = "true"; // required for Surface/Win10/Edge
130
  $atts['aria-expanded'] = "false";
131
 
132
+ if ( is_array( $mega_classes ) && in_array( 'mega-toggle-on', $mega_classes ) ) {
133
  $atts['aria-expanded'] = "true";
134
  }
135
 
136
+ if ( isset( $settings['disable_link'] ) && $settings['disable_link'] == 'true' ) {
137
  $atts['role'] = 'button';
138
  }
139
  }
142
  $atts['tabindex'] = "0";
143
  }
144
 
145
+ if ( isset( $settings['hide_text'] ) && $settings['hide_text'] == 'true' ) {
146
  $atts['aria-label'] = $item->title;
147
  }
148
 
149
  $atts = apply_filters( 'megamenu_nav_menu_link_attributes', $atts, $item, $args );
150
 
151
+ if ( isset( $atts['class'] ) && strlen( $atts['class'] ) ) {
152
  $atts['class'] = $atts['class'] . ' mega-menu-link';
153
  } else {
154
  $atts['class'] = 'mega-menu-link';
157
  $attributes = '';
158
 
159
  foreach ( $atts as $attr => $value ) {
 
160
  if ( strlen( $value ) ) {
161
  $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
162
  $attributes .= ' ' . $attr . '="' . $value . '"';
163
  }
 
164
  }
165
 
166
  $item_output = $args->before;
167
  $item_output .= '<a'. $attributes .'>';
168
 
169
+ if ( is_array( $classes ) && in_array('icon-top', $classes ) ) {
170
  $item_output .= "<span class='mega-title-below'>";
171
  }
172
 
173
+ if ( isset( $settings['hide_text'] ) && $settings['hide_text'] == 'true' ) {
174
  /** This filter is documented in wp-includes/post-template.php */
175
  } else if ( property_exists( $item, 'mega_description' ) && strlen( $item->mega_description ) ) {
176
  $item_output .= '<span class="mega-description-group"><span class="mega-menu-title">' . $args->link_before . apply_filters( 'megamenu_the_title', $item->title, $item->ID ) . $args->link_after . '</span><span class="mega-menu-description">' . $item->description . '</span></span>';
178
  $item_output .= $args->link_before . apply_filters( 'megamenu_the_title', $item->title, $item->ID ) . $args->link_after;
179
  }
180
 
181
+ if ( is_array( $classes ) && in_array( 'icon-top', $classes ) ) {
182
  $item_output .= "</span>";
183
  }
184
 
185
+ if ( is_array( $classes ) && in_array( 'menu-item-has-children', $classes ) ) {
186
  $item_output .= '<span class="mega-indicator"></span>';
187
  }
188
 
189
  $item_output .= '</a>';
190
  $item_output .= $args->after;
191
 
192
+ if ( is_array( $classes ) && ( in_array( "menu-column", $classes ) || in_array( "menu-row", $classes ) ) ) {
193
  $item_output = "";
194
  }
195
 
css/megamenu.scss CHANGED
@@ -897,7 +897,6 @@
897
  }
898
 
899
  > a.mega-menu-link > span.mega-indicator {
900
- float: right;
901
  height: 100%;
902
  width: auto;
903
  background: transparent;
@@ -908,6 +907,11 @@
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 {
@@ -915,6 +919,10 @@
915
  }
916
 
917
  @include mobile {
 
 
 
 
918
  &.mega-toggle-on > a.mega-menu-link > span.mega-indicator:after {
919
  content: $arrow_up;
920
  }
897
  }
898
 
899
  > a.mega-menu-link > span.mega-indicator {
 
900
  height: 100%;
901
  width: auto;
902
  background: transparent;
907
  line-height: inherit;
908
  color: inherit;
909
  font-size: inherit;
910
+ padding: 0;
911
+ }
912
+
913
+ li.mega-menu-item-has-children > a.mega-menu-link > span.mega-indicator {
914
+ float: right;
915
  }
916
 
917
  &.mega-collapse-children.mega-toggle-on > a.mega-menu-link > span.mega-indicator:after {
919
  }
920
 
921
  @include mobile {
922
+ > a.mega-menu-link > span.mega-indicator {
923
+ float: right;
924
+ }
925
+
926
  &.mega-toggle-on > a.mega-menu-link > span.mega-indicator:after {
927
  content: $arrow_up;
928
  }
css/toggle-blocks.scss CHANGED
@@ -15,7 +15,8 @@
15
  @if type-of($id) == number {
16
 
17
  .mega-toggle-block-#{$id} {
18
-
 
19
  @if $icon_position == before {
20
  &:before {
21
  content: $closed_icon;
@@ -98,6 +99,7 @@
98
  @if type-of($id) == number {
99
 
100
  .mega-toggle-block-#{$id} {
 
101
 
102
  /*!
103
  * Hamburgers
15
  @if type-of($id) == number {
16
 
17
  .mega-toggle-block-#{$id} {
18
+ cursor: pointer;
19
+
20
  @if $icon_position == before {
21
  &:before {
22
  content: $closed_icon;
99
  @if type-of($id) == number {
100
 
101
  .mega-toggle-block-#{$id} {
102
+ cursor: pointer;
103
 
104
  /*!
105
  * Hamburgers
js/maxmegamenu.js CHANGED
@@ -520,8 +520,7 @@
520
  plugin.initToggleBar = function() {
521
  // mobile menu
522
  $toggle_bar.on("click", function(e) {
523
- if ( $(e.target).is(".mega-menu-toggle, .mega-menu-toggle-block, .mega-menu-toggle-animated-block, .mega-menu-toggle-animated-block *, .mega-toggle-blocks-left, .mega-toggle-blocks-center, .mega-toggle-blocks-right, .mega-toggle-label, .mega-toggle-label span") ) {
524
- if ($(this).hasClass("mega-menu-open")) {
525
  plugin.hideMobileMenu();
526
  } else {
527
  plugin.showMobileMenu();
520
  plugin.initToggleBar = function() {
521
  // mobile menu
522
  $toggle_bar.on("click", function(e) {
523
+ if ( $(e.target).is(".mega-menu-toggle, .mega-menu-toggle-block, .mega-menu-toggle-animated-block, .mega-menu-toggle-animated-block *, .mega-toggle-blocks-left, .mega-toggle-blocks-center, .mega-toggle-blocks-right, .mega-toggle-label, .mega-toggle-label span") ) { if ($(this).hasClass("mega-menu-open")) {
 
524
  plugin.hideMobileMenu();
525
  } else {
526
  plugin.showMobileMenu();
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.2
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.2';
40
 
41
 
42
  /**
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.3
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.1.3';
40
 
41
 
42
  /**
readme.txt CHANGED
@@ -110,6 +110,10 @@ See https://www.megamenu.com for more screenshots
110
 
111
  == Changelog ==
112
 
 
 
 
 
113
  = 2.7.1.2 =
114
 
115
  * Fix: Menu item alignment when top padding has been applied to top level menu items
110
 
111
  == Changelog ==
112
 
113
+ = 2.7.1.3 =
114
+
115
+ * Fix: Arrow drops onto new line in IE11 and in some other situations
116
+
117
  = 2.7.1.2 =
118
 
119
  * Fix: Menu item alignment when top padding has been applied to top level menu items