Max Mega Menu - Version 2.3.3

Version Description

[29/12/16] =

  • Fix: Compatibility with WPML Language switcher
  • Fix: Remove max height from CSS Editor
Download this release

Release Info

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

Code changes from version 2.3.2 to 2.3.3

Files changed (4) hide show
  1. css/admin/settings.css +0 -1
  2. css/megamenu.scss +1 -0
  3. megamenu.php +18 -9
  4. readme.txt +6 -1
css/admin/settings.css CHANGED
@@ -286,7 +286,6 @@ body[class*='mega-menu_page_maxmegamenu_'] .menu_settings h3 {
286
  }
287
  .megamenu_outer_wrap .megamenu_right .menu_settings table .CodeMirror {
288
  height: auto;
289
- max-height: 500px;
290
  min-height: 150px;
291
  border: 1px solid #aaa;
292
  }
286
  }
287
  .megamenu_outer_wrap .megamenu_right .menu_settings table .CodeMirror {
288
  height: auto;
 
289
  min-height: 150px;
290
  border: 1px solid #aaa;
291
  }
css/megamenu.scss CHANGED
@@ -767,6 +767,7 @@
767
  }
768
 
769
  // WPML Flags
 
770
  a.mega-menu-link > img.iclflag {
771
  display: inline;
772
  margin-right: 8px;
767
  }
768
 
769
  // WPML Flags
770
+ a.mega-menu-link > img.wpml-ls-flag,
771
  a.mega-menu-link > img.iclflag {
772
  display: inline;
773
  margin-right: 8px;
megamenu.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Max Mega Menu
5
  * Plugin URI: https://www.megamenu.com
6
  * Description: Easy to use drag & drop WordPress Mega Menu plugin. Create Mega Menus using Widgets. Responsive, retina & touch ready.
7
- * Version: 2.3.2
8
  * Author: Tom Hemsley
9
  * Author URI: https://www.megamenu.com
10
  * License: GPL-2.0+
@@ -26,7 +26,7 @@ final class Mega_Menu {
26
  /**
27
  * @var string
28
  */
29
- public $version = '2.3.2';
30
 
31
 
32
  /**
@@ -534,7 +534,9 @@ final class Mega_Menu {
534
  $get_next_parent = true;
535
  }
536
 
537
- $rolling_last_menu_order = $item->menu_order;
 
 
538
  }
539
 
540
  // there isn't a next top level menu item
@@ -579,7 +581,10 @@ final class Mega_Menu {
579
  $item->megamenu_settings = array_merge( Mega_Menu_Nav_Menus::get_menu_item_defaults(), $saved_settings );
580
  $item->megamenu_order = isset( $item->megamenu_settings['mega_menu_order'][$item->menu_item_parent] ) ? $item->megamenu_settings['mega_menu_order'][$item->menu_item_parent] : 0;
581
  $item->parent_submenu_type = 'flyout';
582
- $item->menu_order = $item->menu_order * 1000;
 
 
 
583
 
584
  // add parent mega menu type
585
  if ( $item->depth == 1 ) {
@@ -604,8 +609,8 @@ final class Mega_Menu {
604
  * @return array
605
  */
606
  public function reorder_menu_items_within_megamenus( $items, $args ) {
607
-
608
  $new_items = array();
 
609
 
610
  // reorder menu items within mega menus based on internal ordering
611
  foreach ( $items as $item ) {
@@ -614,16 +619,20 @@ final class Mega_Menu {
614
  $parent_post = get_post( $item->menu_item_parent );
615
  $item->menu_order = $parent_post->menu_order * 1000 + $item->megamenu_order;
616
  }
617
-
618
  }
619
 
620
  foreach ( $items as $item ) {
621
- $new_items[ $item->menu_order ] = $item;
 
 
 
 
 
622
  }
623
 
624
  ksort( $new_items );
625
 
626
- return $new_items;
627
 
628
  }
629
 
@@ -857,7 +866,7 @@ final class Mega_Menu {
857
  $sanitized_location = str_replace( apply_filters("megamenu_location_replacements", array("-", " ") ), "-", $current_theme_location );
858
 
859
  $defaults = array(
860
- 'menu' => $menu_id,
861
  'container' => 'div',
862
  'container_class' => 'mega-menu-wrap',
863
  'container_id' => 'mega-menu-wrap-' . $sanitized_location,
4
  * Plugin Name: Max Mega Menu
5
  * Plugin URI: https://www.megamenu.com
6
  * Description: Easy to use drag & drop WordPress Mega Menu plugin. Create Mega Menus using Widgets. Responsive, retina & touch ready.
7
+ * Version: 2.3.3
8
  * Author: Tom Hemsley
9
  * Author URI: https://www.megamenu.com
10
  * License: GPL-2.0+
26
  /**
27
  * @var string
28
  */
29
+ public $version = '2.3.3';
30
 
31
 
32
  /**
534
  $get_next_parent = true;
535
  }
536
 
537
+ if ( isset( $item->menu_order ) ) {
538
+ $rolling_last_menu_order = $item->menu_order;
539
+ }
540
  }
541
 
542
  // there isn't a next top level menu item
581
  $item->megamenu_settings = array_merge( Mega_Menu_Nav_Menus::get_menu_item_defaults(), $saved_settings );
582
  $item->megamenu_order = isset( $item->megamenu_settings['mega_menu_order'][$item->menu_item_parent] ) ? $item->megamenu_settings['mega_menu_order'][$item->menu_item_parent] : 0;
583
  $item->parent_submenu_type = 'flyout';
584
+
585
+ if ( isset( $item->menu_order ) ) {
586
+ $item->menu_order = $item->menu_order * 1000;
587
+ }
588
 
589
  // add parent mega menu type
590
  if ( $item->depth == 1 ) {
609
  * @return array
610
  */
611
  public function reorder_menu_items_within_megamenus( $items, $args ) {
 
612
  $new_items = array();
613
+ $wpml_lang_items = array();
614
 
615
  // reorder menu items within mega menus based on internal ordering
616
  foreach ( $items as $item ) {
619
  $parent_post = get_post( $item->menu_item_parent );
620
  $item->menu_order = $parent_post->menu_order * 1000 + $item->megamenu_order;
621
  }
 
622
  }
623
 
624
  foreach ( $items as $item ) {
625
+ if ( in_array( 'wpml-ls-item', $item->classes ) ) {
626
+ $item->classes[] = 'menu-flyout';
627
+ $wpml_lang_items[] = $item;
628
+ } else {
629
+ $new_items[ $item->menu_order ] = $item;
630
+ }
631
  }
632
 
633
  ksort( $new_items );
634
 
635
+ return array_merge( $new_items, $wpml_lang_items );
636
 
637
  }
638
 
866
  $sanitized_location = str_replace( apply_filters("megamenu_location_replacements", array("-", " ") ), "-", $current_theme_location );
867
 
868
  $defaults = array(
869
+ 'menu' => wp_get_nav_menu_object( $menu_id ),
870
  'container' => 'div',
871
  'container_class' => 'mega-menu-wrap',
872
  'container_id' => 'mega-menu-wrap-' . $sanitized_location,
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: 3.8
5
  Tested up to: 4.7
6
- Stable tag: 2.3.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -103,6 +103,11 @@ See https://www.megamenu.com for more screenshots
103
 
104
  == Changelog ==
105
 
 
 
 
 
 
106
  = 2.3.2 [23/12/16] =
107
 
108
  * Fix: Theme changes not being applied when PolyLang used in conjunction with the "Output in <head>" option
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: 3.8
5
  Tested up to: 4.7
6
+ Stable tag: 2.3.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
103
 
104
  == Changelog ==
105
 
106
+ = 2.3.3 [29/12/16] =
107
+
108
+ * Fix: Compatibility with WPML Language switcher
109
+ * Fix: Remove max height from CSS Editor
110
+
111
  = 2.3.2 [23/12/16] =
112
 
113
  * Fix: Theme changes not being applied when PolyLang used in conjunction with the "Output in <head>" option