Max Mega Menu - Version 2.7.4

Version Description

  • Fix: Allow double quotes in custom font names
  • Fix: Border radius on Flyout Menus
  • Fix: PHP 7.4 warning in theme editor
  • Fix: Unable to select/paste text within HTML replacement editor using Safari
  • Fix: Intermittent issue with Image Widget settings not loading correctly in back end
  • Improvement: Add support for MEGAMENU_SCRIPTS_IN_FOOTER constant in wp-config.php
Download this release

Release Info

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

Code changes from version 2.7.3 to 2.7.4

classes/scssc.inc.php CHANGED
@@ -1691,7 +1691,13 @@ class scssc {
1691
 
1692
  foreach ($args as $arg) {
1693
  list($key, $value) = $arg;
1694
- $key = $key[1];
 
 
 
 
 
 
1695
  if (empty($key)) {
1696
  $posArgs[] = $value;
1697
  } else {
@@ -3010,13 +3016,13 @@ class scss_parser {
3010
 
3011
  protected function stripDefault(&$value) {
3012
  $def = end($value[2]);
3013
- if ($def[0] == "keyword" && $def[1] == "!default") {
3014
  array_pop($value[2]);
3015
  $value = $this->flattenList($value);
3016
  return true;
3017
  }
3018
 
3019
- if ($def[0] == "list") {
3020
  return $this->stripDefault($value[2][count($value[2]) - 1]);
3021
  }
3022
 
1691
 
1692
  foreach ($args as $arg) {
1693
  list($key, $value) = $arg;
1694
+
1695
+ if (is_array($key)) {
1696
+ $key = $key[1];
1697
+ } else {
1698
+ $key = null;
1699
+ }
1700
+
1701
  if (empty($key)) {
1702
  $posArgs[] = $value;
1703
  } else {
3016
 
3017
  protected function stripDefault(&$value) {
3018
  $def = end($value[2]);
3019
+ if (is_array($def) && $def[0] == "keyword" && $def[1] == "!default") {
3020
  array_pop($value[2]);
3021
  $value = $this->flattenList($value);
3022
  return true;
3023
  }
3024
 
3025
+ if (is_array($def) && $def[0] == "list") {
3026
  return $this->stripDefault($value[2][count($value[2]) - 1]);
3027
  }
3028
 
classes/settings.class.php CHANGED
@@ -3933,7 +3933,7 @@ class Mega_Menu_Settings {
3933
  echo "<select name='settings[$key]'>";
3934
 
3935
  foreach ( $options as $weight => $name ) {
3936
- echo "<option value='{$weight}' " . selected( $value, $weight, true ) . ">{$name}</option>";
3937
  }
3938
 
3939
  echo "</select>";
@@ -3953,10 +3953,10 @@ class Mega_Menu_Settings {
3953
  $value = $this->active_theme[$key];
3954
 
3955
  echo "<select name='settings[$key]'>";
3956
- echo " <option value='none' " . selected( $value, 'none', true) . ">" . __("Normal", "megamenu") . "</option>";
3957
- echo " <option value='capitalize'" . selected( $value, 'capitalize', true) . ">" . __("Capitalize", "megamenu") . "</option>";
3958
- echo " <option value='uppercase'" . selected( $value, 'uppercase', true) . ">" . __("UPPERCASE", "megamenu") . "</option>";
3959
- echo " <option value='lowercase'" . selected( $value, 'lowercase', true) . ">" . __("lowercase", "megamenu") . "</option>";
3960
  echo "</select>";
3961
 
3962
  }
@@ -4025,9 +4025,11 @@ class Mega_Menu_Settings {
4025
  echo "<option value='inherit'>" . __("Theme Default", "megamenu") . "</option>";
4026
 
4027
  foreach ( $this->fonts() as $font ) {
 
 
4028
  $parts = explode(",", $font);
4029
  $font_name = trim($parts[0]);
4030
- echo "<option value=\"{$font}\" " . selected( $font, $value ) . ">{$font_name}</option>";
4031
  }
4032
 
4033
  echo "</select>";
3933
  echo "<select name='settings[$key]'>";
3934
 
3935
  foreach ( $options as $weight => $name ) {
3936
+ echo "<option value='{$weight}' " . selected( $value, $weight, false ) . ">{$name}</option>";
3937
  }
3938
 
3939
  echo "</select>";
3953
  $value = $this->active_theme[$key];
3954
 
3955
  echo "<select name='settings[$key]'>";
3956
+ echo " <option value='none' " . selected( $value, 'none', false) . ">" . __("Normal", "megamenu") . "</option>";
3957
+ echo " <option value='capitalize'" . selected( $value, 'capitalize', false) . ">" . __("Capitalize", "megamenu") . "</option>";
3958
+ echo " <option value='uppercase'" . selected( $value, 'uppercase', false) . ">" . __("UPPERCASE", "megamenu") . "</option>";
3959
+ echo " <option value='lowercase'" . selected( $value, 'lowercase', false) . ">" . __("lowercase", "megamenu") . "</option>";
3960
  echo "</select>";
3961
 
3962
  }
4025
  echo "<option value='inherit'>" . __("Theme Default", "megamenu") . "</option>";
4026
 
4027
  foreach ( $this->fonts() as $font ) {
4028
+ $orig_font = $font;
4029
+ $font = esc_attr( stripslashes( $font ) );
4030
  $parts = explode(",", $font);
4031
  $font_name = trim($parts[0]);
4032
+ echo "<option value=\"{$font}\" " . selected( $orig_font, htmlspecialchars_decode($value) ) . ">{$font_name}</option>";
4033
  }
4034
 
4035
  echo "</select>";
classes/style-manager.class.php CHANGED
@@ -760,6 +760,13 @@ final class Mega_Menu_Style_Manager {
760
  continue;
761
  }
762
 
 
 
 
 
 
 
 
763
  if ( in_array( $name, array( 'responsive_text' ) ) ) {
764
 
765
  if ( strlen( $value ) ) {
@@ -889,7 +896,9 @@ final class Mega_Menu_Style_Manager {
889
 
890
  $dependencies = apply_filters("megamenu_javascript_dependencies", array('jquery', 'hoverIntent'));
891
 
892
- wp_enqueue_script( 'megamenu', $js_path, $dependencies, MEGAMENU_VERSION, true );
 
 
893
 
894
  $params = apply_filters("megamenu_javascript_localisation",
895
  array(
760
  continue;
761
  }
762
 
763
+ if ( in_array( $name, array( 'menu_item_link_font', 'panel_font_family', 'panel_header_font', 'panel_second_level_font', 'panel_third_level_font', 'panel_third_level_font', 'flyout_link_family', 'tabbed_link_family') ) ) {
764
+
765
+ $vars[$name] = "'" . stripslashes( htmlspecialchars_decode( $value ) ) . "'";
766
+
767
+ continue;
768
+ }
769
+
770
  if ( in_array( $name, array( 'responsive_text' ) ) ) {
771
 
772
  if ( strlen( $value ) ) {
896
 
897
  $dependencies = apply_filters("megamenu_javascript_dependencies", array('jquery', 'hoverIntent'));
898
 
899
+ $scripts_in_footer = defined( 'MEGAMENU_SCRIPTS_IN_FOOTER' ) ? MEGAMENU_SCRIPTS_IN_FOOTER : true;
900
+
901
+ wp_enqueue_script( 'megamenu', $js_path, $dependencies, MEGAMENU_VERSION, $scripts_in_footer );
902
 
903
  $params = apply_filters("megamenu_javascript_localisation",
904
  array(
classes/widget-elementor-template.class.php ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // disable direct access
5
+ }
6
+
7
+ if ( ! class_exists('Mega_Menu_Widget_Elementor_Template') ) :
8
+
9
+ /**
10
+ * Outputs an Elementor template
11
+ */
12
+ class Mega_Menu_Widget_Elementor_Template extends WP_Widget {
13
+
14
+ /**
15
+ * Register widget with WordPress.
16
+ */
17
+ public function __construct() {
18
+ parent::__construct(
19
+ 'maxmegamenu_elementor_template', // Base ID
20
+ 'Elementor Template', // Name
21
+ array( 'description' => __( 'Outputs a saved Elementor template.', 'megamenu' ) ) // Args
22
+ );
23
+ }
24
+
25
+
26
+ /**
27
+ * Front-end display of widget.
28
+ *
29
+ * @since 2.7.4
30
+ * @see WP_Widget::widget()
31
+ * @param array $args Widget arguments.
32
+ * @param array $instance Saved values from database.
33
+ */
34
+ public function widget( $args, $instance ) {
35
+ if ( empty( $instance['template_id'] ) || ! get_post_type( $instance['template_id'] ) ) {
36
+ return;
37
+ }
38
+
39
+ extract( $args );
40
+
41
+ echo $before_widget;
42
+
43
+ $contentElementor = "";
44
+
45
+ if (class_exists("\\Elementor\\Plugin")) {
46
+ $pluginElementor = \Elementor\Plugin::instance();
47
+ $contentElementor = $pluginElementor->frontend->get_builder_content( $instance['template_id'] );
48
+ }
49
+
50
+ echo $contentElementor;
51
+
52
+ echo $after_widget;
53
+ }
54
+
55
+
56
+ /**
57
+ * Sanitize widget form values as they are saved.
58
+ *
59
+ * @since 2.7.4
60
+ * @see WP_Widget::update()
61
+ * @param array $new_instance Values just sent to be saved.
62
+ * @param array $old_instance Previously saved values from database.
63
+ * @return array Updated safe values to be saved.
64
+ */
65
+ public function update( $new_instance, $old_instance ) {
66
+ $instance = array();
67
+ $instance['template_id'] = ! empty( $new_instance['template_id'] ) ? $new_instance['template_id'] : 0;
68
+
69
+ return $instance;
70
+ }
71
+
72
+
73
+ /**
74
+ * Back-end widget form.
75
+ *
76
+ * @since 2.7.4
77
+ * @see WP_Widget::form()
78
+ * @param array $instance Previously saved values from database.
79
+ */
80
+ public function form( $instance ) {
81
+ $template_id = ! empty( $instance['template_id'] ) ? absint( $instance['template_id'] ) : 0;
82
+
83
+ $widget_title = $template_id ? get_post_field( 'post_title', $template_id ) : '';
84
+
85
+ $posts = get_posts( array ( 'post_type' => 'elementor_library', 'post_status' => 'publish', 'numberposts' => -1 ) );
86
+
87
+ // No blocks found.
88
+ if ( empty( $posts ) ) {
89
+ printf( '<p>%s</p>', __( 'No Elementor Templates found.', 'megamenu' ) );
90
+
91
+ return;
92
+ }
93
+
94
+ // Input field with id is required for WordPress to display the title in the widget header.
95
+ ?>
96
+ <input type="hidden" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" value="<?php echo esc_attr( $widget_title ); ?>">
97
+
98
+ <p>
99
+ <label for="<?php echo esc_attr( $this->get_field_id( 'template_id' ) ); ?>"><?php esc_attr_e( 'Template', 'megamenu' ); ?>:</label>
100
+ <select id="<?php echo esc_attr( $this->get_field_id( 'template_id' ) ); ?>" class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'template_id' ) ); ?>">
101
+ <option value=""><?php esc_html_e( '- Select -', 'megamenu' ); ?></option>
102
+ <?php foreach ( $posts as $post ) : ?>
103
+
104
+
105
+ <?php
106
+ $elementor_data = get_post_meta( $instance['template_id'],'_elementor_data' );
107
+
108
+ $type = $elementor_data['elType'];
109
+
110
+ ?>
111
+ <option value="<?php echo esc_attr( $post->ID ); ?>"<?php selected( $post->ID, $template_id ); ?>>
112
+ <?php echo esc_html( $post->post_title . " (" . $post->ID . " - " . get_post_meta( $post->ID,'_elementor_template_type', true ) . ")" ); ?></option>
113
+ <?php endforeach; ?>
114
+ </select>
115
+ </p>
116
+
117
+ <?php
118
+ }
119
+
120
+ }
121
+
122
+ endif;
classes/widget-reusable-block.class.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // disable direct access
5
+ }
6
+
7
+ if ( ! class_exists('Mega_Menu_Widget_Reusable_Block') ) :
8
+
9
+ /**
10
+ * Outputs a reusable block
11
+ *
12
+ * Credit: Based on https://wordpress.org/plugins/block-widget/ by Maarten Menten
13
+ */
14
+ class Mega_Menu_Widget_Reusable_Block extends WP_Widget {
15
+
16
+ /**
17
+ * Register widget with WordPress.
18
+ */
19
+ public function __construct() {
20
+ parent::__construct(
21
+ 'maxmegamenu_reusable_block', // Base ID
22
+ 'Reusable Block', // Name
23
+ array( 'description' => __( 'Outputs a reusable block.', 'megamenu' ) ) // Args
24
+ );
25
+ }
26
+
27
+
28
+ /**
29
+ * Front-end display of widget.
30
+ *
31
+ * @since 2.7.4
32
+ * @see WP_Widget::widget()
33
+ * @param array $args Widget arguments.
34
+ * @param array $instance Saved values from database.
35
+ */
36
+ public function widget( $args, $instance ) {
37
+ if ( empty( $instance['block'] ) || ! get_post_type( $instance['block'] ) ) {
38
+ return;
39
+ }
40
+
41
+ extract( $args );
42
+
43
+ echo $before_widget;
44
+
45
+ echo do_blocks( get_post_field( 'post_content', $instance['block'] ) );
46
+
47
+ echo $after_widget;
48
+ }
49
+
50
+
51
+ /**
52
+ * Sanitize widget form values as they are saved.
53
+ *
54
+ * @since 2.7.4
55
+ * @see WP_Widget::update()
56
+ * @param array $new_instance Values just sent to be saved.
57
+ * @param array $old_instance Previously saved values from database.
58
+ * @return array Updated safe values to be saved.
59
+ */
60
+ public function update( $new_instance, $old_instance ) {
61
+ $instance = array();
62
+ $instance['block'] = ! empty( $new_instance['block'] ) ? $new_instance['block'] : 0;
63
+
64
+ return $instance;
65
+ }
66
+
67
+
68
+ /**
69
+ * Back-end widget form.
70
+ *
71
+ * @since 2.7.4
72
+ * @see WP_Widget::form()
73
+ * @param array $instance Previously saved values from database.
74
+ */
75
+ public function form( $instance ) {
76
+ $block_id = ! empty( $instance['block'] ) ? absint( $instance['block'] ) : 0;
77
+
78
+ $widget_title = $block_id ? get_post_field( 'post_title', $block_id ) : '';
79
+
80
+ $posts = get_posts( array ( 'post_type' => 'wp_block', 'post_status' => 'publish', 'numberposts' => -1 ) );
81
+
82
+ // No blocks found.
83
+ if ( empty( $posts ) ) {
84
+ printf( '<p>%s</p>', __( 'No reusable blocks available.', 'megamenu' ) );
85
+
86
+ return;
87
+ }
88
+
89
+ // Input field with id is required for WordPress to display the title in the widget header.
90
+ ?>
91
+ <input type="hidden" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" value="<?php echo esc_attr( $widget_title ); ?>">
92
+
93
+ <p>
94
+ <label for="<?php echo esc_attr( $this->get_field_id( 'block' ) ); ?>"><?php esc_attr_e( 'Block', 'megamenu' ); ?>:</label>
95
+ <select id="<?php echo esc_attr( $this->get_field_id( 'block' ) ); ?>" class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'block' ) ); ?>">
96
+ <option value=""><?php esc_html_e( '- Select -', 'megamenu' ); ?></option>
97
+ <?php foreach ( $posts as $post ) : ?>
98
+ <option value="<?php echo esc_attr( $post->ID ); ?>"<?php selected( $post->ID, $block_id ); ?>><?php echo esc_html( $post->post_title ); ?></option>
99
+ <?php endforeach; ?>
100
+ </select>
101
+ </p>
102
+
103
+ <?php
104
+ }
105
+
106
+ }
107
+
108
+ endif;
css/admin/admin.css CHANGED
@@ -44,10 +44,9 @@
44
 
45
  .nav-menus-php #cboxContent {
46
  padding: 0;
47
- -webkit-user-select: none;
48
- -moz-user-select: none;
49
- -ms-user-select: none;
50
  user-select: none; }
 
 
51
  .nav-menus-php #cboxContent .notice {
52
  margin: 10px 0 0 0; }
53
  .nav-menus-php #cboxContent .notice .notice-dismiss:focus {
44
 
45
  .nav-menus-php #cboxContent {
46
  padding: 0;
 
 
 
47
  user-select: none; }
48
+ .nav-menus-php #cboxContent .CodeMirror {
49
+ user-select: auto; }
50
  .nav-menus-php #cboxContent .notice {
51
  margin: 10px 0 0 0; }
52
  .nav-menus-php #cboxContent .notice .notice-dismiss:focus {
css/admin/admin.scss CHANGED
@@ -67,11 +67,12 @@ $header_height: 75px;
67
  }
68
  #cboxContent {
69
  padding: 0;
70
- -webkit-user-select: none;
71
- -moz-user-select: none;
72
- -ms-user-select: none;
73
  user-select: none;
74
 
 
 
 
 
75
  .notice {
76
  margin: 10px 0 0 0;
77
 
67
  }
68
  #cboxContent {
69
  padding: 0;
 
 
 
70
  user-select: none;
71
 
72
+ .CodeMirror {
73
+ user-select: auto;
74
+ }
75
+
76
  .notice {
77
  margin: 10px 0 0 0;
78
 
css/megamenu.scss CHANGED
@@ -28,7 +28,7 @@
28
  color: $panel_font_color;
29
  display: block;
30
  float: none;
31
- font-family: $panel_font_family;
32
  font-size: $panel_font_size;
33
  height: auto;
34
  left: auto;
@@ -454,7 +454,7 @@
454
  @include background($menu_item_background_from, $menu_item_background_to);
455
  @include border($menu_item_border_top, $menu_item_border_left, $menu_item_border_right, $menu_item_border_bottom, $menu_item_border_color);
456
  @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);
457
- font-family: $menu_item_link_font;
458
  font-size: $menu_item_link_font_size;
459
  font-weight: $menu_item_link_weight;
460
  outline: none;
@@ -610,7 +610,7 @@
610
  > li.mega-menu-item,
611
  li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item {
612
  color: $panel_font_color;
613
- font-family: $panel_font_family;
614
  font-size: $panel_font_size;
615
  display: block;
616
  float: left;
@@ -625,7 +625,7 @@
625
  // Widget titles
626
  h4.mega-block-title {
627
  color: $panel_header_color;
628
- font-family: $panel_header_font;
629
  font-size: $panel_header_font_size;
630
  text-transform: $panel_header_text_transform;
631
  text-decoration: $panel_header_text_decoration;
@@ -646,7 +646,7 @@
646
  // Second level menu items
647
  > a.mega-menu-link {
648
  color: $panel_second_level_font_color; /* Mega Menu > Menu Themes > Mega Menus > Second Level Menu Items */
649
- font-family: $panel_second_level_font;
650
  font-size: $panel_second_level_font_size;
651
  text-transform: $panel_second_level_text_transform;
652
  text-decoration: $panel_second_level_text_decoration;
@@ -674,7 +674,7 @@
674
  li.mega-menu-item {
675
  > a.mega-menu-link {
676
  color: $panel_third_level_font_color; /* Mega Menu > Menu Themes > Mega Menus > Third Level Menu Items */
677
- font-family: $panel_third_level_font;
678
  font-size: $panel_third_level_font_size;
679
  text-transform: $panel_third_level_text_transform;
680
  text-decoration: $panel_third_level_text_decoration;
@@ -733,7 +733,7 @@
733
  > li.mega-menu-item > a.mega-menu-link,
734
  li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item > a.mega-menu-link {
735
  color: $panel_third_level_font_color;
736
- font-family: $panel_third_level_font;
737
  font-size: $panel_third_level_font_size;
738
  text-transform: $panel_third_level_text_transform;
739
  text-decoration: $panel_third_level_text_decoration;
@@ -761,10 +761,11 @@
761
  z-index: $z_index;
762
  position: absolute;
763
  width: $flyout_width;
764
- @include border($flyout_border_top, $flyout_border_left, $flyout_border_right, $flyout_border_bottom, $flyout_border_color);
765
  padding: $flyout_padding_top $flyout_padding_right $flyout_padding_bottom $flyout_padding_left;
 
766
  @include background($flyout_menu_background_from, $flyout_menu_background_to);
767
- max-width: none;
768
 
769
  @if $shadow == 'on' {
770
  @include box-shadow($shadow_horizontal $shadow_vertical $shadow_blur $shadow_spread $shadow_color);
@@ -776,6 +777,7 @@
776
  width: 100%;
777
  padding: 0;
778
  border: 0;
 
779
  }
780
 
781
  li.mega-menu-item {
@@ -817,7 +819,7 @@
817
  display: block;
818
  @include background($flyout_background_from, $flyout_background_to);
819
  color: $flyout_link_color;
820
- font-family: $flyout_link_family;
821
  font-size: $flyout_link_size;
822
  font-weight: $flyout_link_weight;
823
  padding: $flyout_link_padding_top $flyout_link_padding_right $flyout_link_padding_bottom $flyout_link_padding_left;
28
  color: $panel_font_color;
29
  display: block;
30
  float: none;
31
+ font-family: unquote($panel_font_family);
32
  font-size: $panel_font_size;
33
  height: auto;
34
  left: auto;
454
  @include background($menu_item_background_from, $menu_item_background_to);
455
  @include border($menu_item_border_top, $menu_item_border_left, $menu_item_border_right, $menu_item_border_bottom, $menu_item_border_color);
456
  @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);
457
+ font-family: unquote($menu_item_link_font);
458
  font-size: $menu_item_link_font_size;
459
  font-weight: $menu_item_link_weight;
460
  outline: none;
610
  > li.mega-menu-item,
611
  li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item {
612
  color: $panel_font_color;
613
+ font-family: unquote($panel_font_family);
614
  font-size: $panel_font_size;
615
  display: block;
616
  float: left;
625
  // Widget titles
626
  h4.mega-block-title {
627
  color: $panel_header_color;
628
+ font-family: unquote($panel_header_font);
629
  font-size: $panel_header_font_size;
630
  text-transform: $panel_header_text_transform;
631
  text-decoration: $panel_header_text_decoration;
646
  // Second level menu items
647
  > a.mega-menu-link {
648
  color: $panel_second_level_font_color; /* Mega Menu > Menu Themes > Mega Menus > Second Level Menu Items */
649
+ font-family: unquote($panel_second_level_font);
650
  font-size: $panel_second_level_font_size;
651
  text-transform: $panel_second_level_text_transform;
652
  text-decoration: $panel_second_level_text_decoration;
674
  li.mega-menu-item {
675
  > a.mega-menu-link {
676
  color: $panel_third_level_font_color; /* Mega Menu > Menu Themes > Mega Menus > Third Level Menu Items */
677
+ font-family: unquote($panel_third_level_font);
678
  font-size: $panel_third_level_font_size;
679
  text-transform: $panel_third_level_text_transform;
680
  text-decoration: $panel_third_level_text_decoration;
733
  > li.mega-menu-item > a.mega-menu-link,
734
  li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item > a.mega-menu-link {
735
  color: $panel_third_level_font_color;
736
+ font-family: unquote($panel_third_level_font);
737
  font-size: $panel_third_level_font_size;
738
  text-transform: $panel_third_level_text_transform;
739
  text-decoration: $panel_third_level_text_decoration;
761
  z-index: $z_index;
762
  position: absolute;
763
  width: $flyout_width;
764
+ max-width: none;
765
  padding: $flyout_padding_top $flyout_padding_right $flyout_padding_bottom $flyout_padding_left;
766
+ @include border($flyout_border_top, $flyout_border_left, $flyout_border_right, $flyout_border_bottom, $flyout_border_color);
767
  @include background($flyout_menu_background_from, $flyout_menu_background_to);
768
+ @include border-radius($flyout_border_radius_top_left, $flyout_border_radius_top_right, $flyout_border_radius_bottom_right, $flyout_border_radius_bottom_left);
769
 
770
  @if $shadow == 'on' {
771
  @include box-shadow($shadow_horizontal $shadow_vertical $shadow_blur $shadow_spread $shadow_color);
777
  width: 100%;
778
  padding: 0;
779
  border: 0;
780
+ border-radius: 0
781
  }
782
 
783
  li.mega-menu-item {
819
  display: block;
820
  @include background($flyout_background_from, $flyout_background_to);
821
  color: $flyout_link_color;
822
+ font-family: unquote($flyout_link_family);
823
  font-size: $flyout_link_size;
824
  font-weight: $flyout_link_weight;
825
  padding: $flyout_link_padding_top $flyout_link_padding_right $flyout_link_padding_bottom $flyout_link_padding_left;
js/admin.js CHANGED
@@ -80,20 +80,6 @@
80
  complete: function() {
81
  $("#cboxLoadingOverlay").remove();
82
 
83
- // fix for WordPress 4.8 widgets when lightbox is opened, closed and reopened
84
- if (wp.textWidgets !== undefined) {
85
- wp.textWidgets.widgetControls = {}; // WordPress 4.8 Text Widget
86
- }
87
-
88
- if (wp.mediaWidgets !== undefined) {
89
- wp.mediaWidgets.widgetControls = {}; // WordPress 4.8 Media Widgets
90
- }
91
-
92
- if (wp.customHtmlWidgets !== undefined) {
93
- wp.customHtmlWidgets.widgetControls = {}; // WordPress 4.9 Custom HTML Widgets
94
- }
95
-
96
-
97
  },
98
  success: function(response) {
99
 
@@ -493,6 +479,19 @@
493
  }
494
 
495
  setTimeout(function(){
 
 
 
 
 
 
 
 
 
 
 
 
 
496
  $(document).trigger("widget-added", [widget]);
497
 
498
  if ('acf' in window) {
@@ -1094,6 +1093,19 @@
1094
  }
1095
 
1096
  setTimeout(function(){
 
 
 
 
 
 
 
 
 
 
 
 
 
1097
  $(document).trigger("widget-added", [widget]);
1098
 
1099
  if ('acf' in window) {
80
  complete: function() {
81
  $("#cboxLoadingOverlay").remove();
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  },
84
  success: function(response) {
85
 
479
  }
480
 
481
  setTimeout(function(){
482
+ // fix for WordPress 4.8 widgets when lightbox is opened, closed and reopened
483
+ if (wp.textWidgets !== undefined) {
484
+ wp.textWidgets.widgetControls = {}; // WordPress 4.8 Text Widget
485
+ }
486
+
487
+ if (wp.mediaWidgets !== undefined) {
488
+ wp.mediaWidgets.widgetControls = {}; // WordPress 4.8 Media Widgets
489
+ }
490
+
491
+ if (wp.customHtmlWidgets !== undefined) {
492
+ wp.customHtmlWidgets.widgetControls = {}; // WordPress 4.9 Custom HTML Widgets
493
+ }
494
+
495
  $(document).trigger("widget-added", [widget]);
496
 
497
  if ('acf' in window) {
1093
  }
1094
 
1095
  setTimeout(function(){
1096
+ // fix for WordPress 4.8 widgets when lightbox is opened, closed and reopened
1097
+ if (wp.textWidgets !== undefined) {
1098
+ wp.textWidgets.widgetControls = {}; // WordPress 4.8 Text Widget
1099
+ }
1100
+
1101
+ if (wp.mediaWidgets !== undefined) {
1102
+ wp.mediaWidgets.widgetControls = {}; // WordPress 4.8 Media Widgets
1103
+ }
1104
+
1105
+ if (wp.customHtmlWidgets !== undefined) {
1106
+ wp.customHtmlWidgets.widgetControls = {}; // WordPress 4.9 Custom HTML Widgets
1107
+ }
1108
+
1109
  $(document).trigger("widget-added", [widget]);
1110
 
1111
  if ('acf' in window) {
megamenu.php CHANGED
@@ -4,11 +4,11 @@
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.3
8
  * Author: megamenu.com
9
  * Author URI: https://www.megamenu.com
10
  * License: GPL-2.0+
11
- * Copyright: 2019 Tom Hemsley (https://www.megamenu.com)
12
  *
13
  * Max Mega Menu is free software: you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ final class Mega_Menu {
36
  /**
37
  * @var string
38
  */
39
- public $version = '2.7.3';
40
 
41
 
42
  /**
@@ -61,6 +61,7 @@ final class Mega_Menu {
61
  * @since 1.0
62
  */
63
  public function __construct() {
 
64
 
65
  $this->define_constants();
66
  $this->includes();
@@ -265,6 +266,12 @@ final class Mega_Menu {
265
  */
266
  public function register_widget() {
267
  register_widget( 'Mega_Menu_Widget' );
 
 
 
 
 
 
268
  }
269
 
270
 
@@ -317,15 +324,17 @@ final class Mega_Menu {
317
  */
318
  private function plugin_classes() {
319
  $classes = array(
320
- 'mega_menu_walker' => MEGAMENU_PATH . 'classes/walker.class.php',
321
- 'mega_menu_widget_manager' => MEGAMENU_PATH . 'classes/widget-manager.class.php',
322
- 'mega_menu_menu_item_manager' => MEGAMENU_PATH . 'classes/menu-item-manager.class.php',
323
- 'mega_menu_nav_menus' => MEGAMENU_PATH . 'classes/nav-menus.class.php',
324
- 'mega_menu_style_manager' => MEGAMENU_PATH . 'classes/style-manager.class.php',
325
- 'mega_menu_settings' => MEGAMENU_PATH . 'classes/settings.class.php',
326
- 'mega_menu_widget' => MEGAMENU_PATH . 'classes/widget.class.php',
327
- 'mega_menu_toggle_blocks' => MEGAMENU_PATH . 'classes/toggle-blocks.class.php',
328
- 'scssc' => MEGAMENU_PATH . 'classes/scssc.inc.php'
 
 
329
  );
330
 
331
  return $classes;
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.4
8
  * Author: megamenu.com
9
  * Author URI: https://www.megamenu.com
10
  * License: GPL-2.0+
11
+ * Copyright: 2020 Tom Hemsley (https://www.megamenu.com)
12
  *
13
  * Max Mega Menu is free software: you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
36
  /**
37
  * @var string
38
  */
39
+ public $version = '2.7.4';
40
 
41
 
42
  /**
61
  * @since 1.0
62
  */
63
  public function __construct() {
64
+
65
 
66
  $this->define_constants();
67
  $this->includes();
266
  */
267
  public function register_widget() {
268
  register_widget( 'Mega_Menu_Widget' );
269
+ //register_widget( 'Mega_Menu_Widget_Reusable_Block' );
270
+
271
+ // Check if Elementor installed and activated
272
+ //if ( did_action( 'elementor/loaded' ) ) {
273
+ // register_widget( 'Mega_Menu_Widget_Elementor_Template' );
274
+ //}
275
  }
276
 
277
 
324
  */
325
  private function plugin_classes() {
326
  $classes = array(
327
+ 'mega_menu_walker' => MEGAMENU_PATH . 'classes/walker.class.php',
328
+ 'mega_menu_widget_manager' => MEGAMENU_PATH . 'classes/widget-manager.class.php',
329
+ 'mega_menu_menu_item_manager' => MEGAMENU_PATH . 'classes/menu-item-manager.class.php',
330
+ 'mega_menu_nav_menus' => MEGAMENU_PATH . 'classes/nav-menus.class.php',
331
+ 'mega_menu_style_manager' => MEGAMENU_PATH . 'classes/style-manager.class.php',
332
+ 'mega_menu_settings' => MEGAMENU_PATH . 'classes/settings.class.php',
333
+ 'mega_menu_widget' => MEGAMENU_PATH . 'classes/widget.class.php',
334
+ 'mega_menu_widget_reusable_block' => MEGAMENU_PATH . 'classes/widget-reusable-block.class.php',
335
+ 'mega_menu_widget_elementor_template' => MEGAMENU_PATH . 'classes/widget-elementor-template.class.php',
336
+ 'mega_menu_toggle_blocks' => MEGAMENU_PATH . 'classes/toggle-blocks.class.php',
337
+ 'scssc' => MEGAMENU_PATH . 'classes/scssc.inc.php'
338
  );
339
 
340
  return $classes;
readme.txt CHANGED
@@ -2,8 +2,8 @@
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.3
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,6 +17,8 @@ https://www.youtube.com/watch?v=44dJwP1AXT8
17
 
18
  Documentation & Demo: [https://www.megamenu.com](https://www.megamenu.com)
19
 
 
 
20
  ###Mobile
21
 
22
  * Automatic support for native touch events
@@ -131,6 +133,15 @@ See https://www.megamenu.com for more screenshots
131
 
132
  == Changelog ==
133
 
 
 
 
 
 
 
 
 
 
134
  = 2.7.3 =
135
 
136
  * Improvement: Styling updates for WordPress 5.3
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.4
6
+ Stable tag: 2.7.3
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
+ [](http://coderisk.com/wp/plugin/megamenu/RIPS-1tlo19jJE_)
21
+
22
  ###Mobile
23
 
24
  * Automatic support for native touch events
133
 
134
  == Changelog ==
135
 
136
+ = 2.7.4 =
137
+
138
+ * Fix: Allow double quotes in custom font names
139
+ * Fix: Border radius on Flyout Menus
140
+ * Fix: PHP 7.4 warning in theme editor
141
+ * Fix: Unable to select/paste text within HTML replacement editor using Safari
142
+ * Fix: Intermittent issue with Image Widget settings not loading correctly in back end
143
+ * Improvement: Add support for MEGAMENU_SCRIPTS_IN_FOOTER constant in wp-config.php
144
+
145
  = 2.7.3 =
146
 
147
  * Improvement: Styling updates for WordPress 5.3