Max Mega Menu - Version 2.1.2

Version Description

[15/03/2016] =

  • New feature: Mobile Toggle bar height setting added
  • Fix: CSS "Don't output CSS" setting
  • Change: Don't apply Menu Padding theme setting to mobile menu
Download this release

Release Info

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

Code changes from version 2.1.1.1 to 2.1.2

classes/settings.class.php CHANGED
@@ -2863,6 +2863,18 @@ class Mega_Menu_Settings {
2863
  )
2864
  )
2865
  ),
 
 
 
 
 
 
 
 
 
 
 
 
2866
  'mobile_columns' => array(
2867
  'priority' => 30,
2868
  'title' => __( "Mega Menu Columns", "megamenu" ),
2863
  )
2864
  )
2865
  ),
2866
+ 'toggle_bar_height' => array(
2867
+ 'priority' => 25,
2868
+ 'title' => __( "Toggle Bar Height", "megamenu" ),
2869
+ 'description' => __( "Set the height of the mobile menu toggle bar.", "megamenu" ),
2870
+ 'settings' => array(
2871
+ array(
2872
+ 'title' => __( "", "megamenu" ),
2873
+ 'type' => 'freetext',
2874
+ 'key' => 'toggle_bar_height'
2875
+ )
2876
+ )
2877
+ ),
2878
  'mobile_columns' => array(
2879
  'priority' => 30,
2880
  'title' => __( "Mega Menu Columns", "megamenu" ),
classes/style-manager.class.php CHANGED
@@ -249,6 +249,7 @@ final class Mega_Menu_Style_Manager {
249
  'toggle_background_from' => 'container_background_from',
250
  'toggle_background_to' => 'container_background_to',
251
  'toggle_font_color' => 'menu_item_link_color', // deprecated
 
252
  'mobile_menu_item_height' => '40px',
253
  'custom_css' => '
254
  #{$wrap} #{$menu} {
249
  'toggle_background_from' => 'container_background_from',
250
  'toggle_background_to' => 'container_background_to',
251
  'toggle_font_color' => 'menu_item_link_color', // deprecated
252
+ 'toggle_bar_height' => '40px',
253
  'mobile_menu_item_height' => '40px',
254
  'custom_css' => '
255
  #{$wrap} #{$menu} {
classes/toggle-blocks.class.php CHANGED
@@ -351,7 +351,7 @@ class Mega_Menu_Toggle_Blocks {
351
  $styles = array(
352
  'id' => $index,
353
  'align' => isset($settings['align']) ? "'" . $settings['align'] . "'" : "'right'",
354
- 'width' => isset($settings['width']) ? "'" . $settings['width'] . "'" : '0px',
355
  );
356
 
357
  $spacer_blocks[ $index ] = $styles;
@@ -548,11 +548,11 @@ class Mega_Menu_Toggle_Blocks {
548
  </label>
549
  <label>
550
  <?php _e("Closed Icon", "megamenu") ?>
551
- <?php $this->print_toggle_icon_option( 'closed_icon', $block_id, $settings['closed_icon'] ); ?>
552
  </label>
553
  <label>
554
  <?php _e("Open Icon", "megamenu") ?>
555
- <?php $this->print_toggle_icon_option( 'open_icon', $block_id, $settings['open_icon'] ); ?>
556
  </label>
557
  <label>
558
  <?php _e("Text Color", "megamenu") ?>
@@ -577,16 +577,14 @@ class Mega_Menu_Toggle_Blocks {
577
 
578
 
579
  /**
580
- * Print a toggle icon selection box
581
  *
582
  * @since 2.1
583
  * @param string $key
584
  * @param int $block_id
585
  * @param string $value
586
  */
587
- public function print_toggle_icon_option( $key, $block_id, $value ) {
588
-
589
- $all_icons = $this->toggle_icons();
590
 
591
  ?>
592
  <select class='icon_dropdown' name='toggle_blocks[<?php echo $block_id ?>][<?php echo $key ?>]'>
@@ -594,7 +592,7 @@ class Mega_Menu_Toggle_Blocks {
594
 
595
  echo "<option value='disabled'>" . __("Disabled", "megamenu") . "</option>";
596
 
597
- foreach ($all_icons as $code => $class) {
598
  $name = str_replace('dashicons-', '', $class);
599
  $name = ucwords(str_replace(array('-','arrow'), ' ', $name));
600
  echo "<option data-class='{$class}' value='{$code}'" . selected( $value, $code, false ) . ">" . $name . "</option>";
@@ -641,7 +639,7 @@ class Mega_Menu_Toggle_Blocks {
641
  * @since 2.1
642
  * @return array - Sorted list of toggle classes
643
  */
644
- private function toggle_icons() {
645
 
646
  $icons = array(
647
  'dash-f333' => 'dashicons-menu',
351
  $styles = array(
352
  'id' => $index,
353
  'align' => isset($settings['align']) ? "'" . $settings['align'] . "'" : "'right'",
354
+ 'width' => isset($settings['width']) ? $settings['width'] : '0px',
355
  );
356
 
357
  $spacer_blocks[ $index ] = $styles;
548
  </label>
549
  <label>
550
  <?php _e("Closed Icon", "megamenu") ?>
551
+ <?php $this->print_icon_option( 'closed_icon', $block_id, $settings['closed_icon'], $this->toggle_icons() ); ?>
552
  </label>
553
  <label>
554
  <?php _e("Open Icon", "megamenu") ?>
555
+ <?php $this->print_icon_option( 'open_icon', $block_id, $settings['open_icon'], $this->toggle_icons() ); ?>
556
  </label>
557
  <label>
558
  <?php _e("Text Color", "megamenu") ?>
577
 
578
 
579
  /**
580
+ * Print an icon selection box
581
  *
582
  * @since 2.1
583
  * @param string $key
584
  * @param int $block_id
585
  * @param string $value
586
  */
587
+ public function print_icon_option( $key, $block_id, $value, $icons ) {
 
 
588
 
589
  ?>
590
  <select class='icon_dropdown' name='toggle_blocks[<?php echo $block_id ?>][<?php echo $key ?>]'>
592
 
593
  echo "<option value='disabled'>" . __("Disabled", "megamenu") . "</option>";
594
 
595
+ foreach ($icons as $code => $class) {
596
  $name = str_replace('dashicons-', '', $class);
597
  $name = ucwords(str_replace(array('-','arrow'), ' ', $name));
598
  echo "<option data-class='{$class}' value='{$code}'" . selected( $value, $code, false ) . ">" . $name . "</option>";
639
  * @since 2.1
640
  * @return array - Sorted list of toggle classes
641
  */
642
+ public function toggle_icons() {
643
 
644
  $icons = array(
645
  'dash-f333' => 'dashicons-menu',
css/admin/settings.css CHANGED
@@ -387,7 +387,7 @@
387
  .megamenu_outer_wrap .megamenu_right .menu_settings table .toggle-bar-designer .mega-blocks .block .block-settings {
388
  padding: 10px;
389
  display: none;
390
- width: 200px;
391
  vertical-align: top;
392
  background: white;
393
  text-align: left;
387
  .megamenu_outer_wrap .megamenu_right .menu_settings table .toggle-bar-designer .mega-blocks .block .block-settings {
388
  padding: 10px;
389
  display: none;
390
+ width: 300px;
391
  vertical-align: top;
392
  background: white;
393
  text-align: left;
css/megamenu.scss CHANGED
@@ -62,7 +62,10 @@
62
  #{$menu} {
63
  visibility: visible;
64
  text-align: $menu_item_align;
65
- padding: $container_padding_top $container_padding_right $container_padding_bottom $container_padding_left;
 
 
 
66
 
67
  a.mega-menu-link {
68
  display: inline;
@@ -639,9 +642,15 @@
639
  cursor: pointer;
640
  @include background($toggle_background_from, $toggle_background_to);
641
  @include border-radius(2px, 2px, 2px, 2px);
642
- line-height: 40px;
643
- height: 40px;
644
  text-align: center;
 
 
 
 
 
 
645
 
646
  @include mobile {
647
  display: block;
@@ -650,20 +659,23 @@
650
  .mega-toggle-block {
651
  text-align: left;
652
  display: inline-block;
653
- padding: 0 10px;
654
  height: 100%;
655
  }
656
 
657
  .mega-toggle-block-left {
658
  float: left;
 
659
  }
660
 
661
  .mega-toggle-block-center {
662
  float: none;
 
 
663
  }
664
 
665
  .mega-toggle-block-right {
666
  float: right;
 
667
  }
668
 
669
  @include mobile {
62
  #{$menu} {
63
  visibility: visible;
64
  text-align: $menu_item_align;
65
+
66
+ @include desktop {
67
+ padding: $container_padding_top $container_padding_right $container_padding_bottom $container_padding_left;
68
+ }
69
 
70
  a.mega-menu-link {
71
  display: inline;
642
  cursor: pointer;
643
  @include background($toggle_background_from, $toggle_background_to);
644
  @include border-radius(2px, 2px, 2px, 2px);
645
+ line-height: $toggle_bar_height;
646
+ height: $toggle_bar_height;
647
  text-align: center;
648
+ -webkit-touch-callout: none;
649
+ -webkit-user-select: none;
650
+ -khtml-user-select: none;
651
+ -moz-user-select: none;
652
+ -ms-user-select: none;
653
+ user-select: none;
654
 
655
  @include mobile {
656
  display: block;
659
  .mega-toggle-block {
660
  text-align: left;
661
  display: inline-block;
 
662
  height: 100%;
663
  }
664
 
665
  .mega-toggle-block-left {
666
  float: left;
667
+ margin-left: 6px;
668
  }
669
 
670
  .mega-toggle-block-center {
671
  float: none;
672
+ margin-left: 3px;
673
+ margin-right: 3px;
674
  }
675
 
676
  .mega-toggle-block-right {
677
  float: right;
678
+ margin-right: 6px;
679
  }
680
 
681
  @include mobile {
css/toggle-blocks.scss CHANGED
@@ -47,11 +47,10 @@
47
  @each $item in $spacer_toggle_blocks {
48
 
49
  $id: nth($item, 1);
50
- $type: nth($item, 2);
51
- $align: nth($item, 3);
52
- $width: nth($item, 4);
53
 
54
- @if $type == spacer and type-of($id) == number {
55
 
56
  #mega-toggle-block-#{$id} {
57
  width: $width;
47
  @each $item in $spacer_toggle_blocks {
48
 
49
  $id: nth($item, 1);
50
+ $align: nth($item, 2);
51
+ $width: nth($item, 3);
 
52
 
53
+ @if type-of($id) == number {
54
 
55
  #mega-toggle-block-#{$id} {
56
  width: $width;
megamenu.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Max Mega Menu
5
  * Plugin URI: https://www.maxmegamenu.com
6
  * Description: Mega Menu for WordPress.
7
- * Version: 2.1.1.1
8
  * Author: Tom Hemsley
9
  * Author URI: https://www.maxmegamenu.com
10
  * License: GPL-2.0+
@@ -26,7 +26,7 @@ final class Mega_Menu {
26
  /**
27
  * @var string
28
  */
29
- public $version = '2.1.1.1';
30
 
31
 
32
  /**
@@ -84,7 +84,9 @@ final class Mega_Menu {
84
 
85
  }
86
 
87
- new Mega_Menu_Toggle_Blocks();
 
 
88
 
89
  $mega_menu_style_manager = new Mega_Menu_Style_Manager();
90
  $mega_menu_style_manager->setup_actions();
4
  * Plugin Name: Max Mega Menu
5
  * Plugin URI: https://www.maxmegamenu.com
6
  * Description: Mega Menu for WordPress.
7
+ * Version: 2.1.2
8
  * Author: Tom Hemsley
9
  * Author URI: https://www.maxmegamenu.com
10
  * License: GPL-2.0+
26
  /**
27
  * @var string
28
  */
29
+ public $version = '2.1.2';
30
 
31
 
32
  /**
84
 
85
  }
86
 
87
+ if ( class_exists( 'Mega_Menu_Toggle_Blocks' ) ) {
88
+ new Mega_Menu_Toggle_Blocks();
89
+ }
90
 
91
  $mega_menu_style_manager = new Mega_Menu_Style_Manager();
92
  $mega_menu_style_manager->setup_actions();
readme.txt CHANGED
@@ -92,9 +92,11 @@ See https://www.maxmegamenu.com for more screenshots
92
 
93
  == Changelog ==
94
 
95
- = 2.1.1.1 [15/03/2016] (internal) =
96
 
 
97
  * Fix: CSS "Don't output CSS" setting
 
98
 
99
  = 2.1.1 [14/03/2016] =
100
 
92
 
93
  == Changelog ==
94
 
95
+ = 2.1.2 [15/03/2016] =
96
 
97
+ * New feature: Mobile Toggle bar height setting added
98
  * Fix: CSS "Don't output CSS" setting
99
+ * Change: Don't apply Menu Padding theme setting to mobile menu
100
 
101
  = 2.1.1 [14/03/2016] =
102