Max Mega Menu - Version 2.1.3

Version Description

[21/03/2016] =

  • Fix: JSON Theme Export
  • Fix: "Output in " CSS option edgecase (not working when the static CSS file exists but is not writable)
  • Change: Don't apply Menu Padding theme setting to mobile menu (revisited - using a different method used to allow desktop padding to still be overridden in Custom Styling area)
Download this release

Release Info

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

Code changes from version 2.1.2 to 2.1.3

classes/settings.class.php CHANGED
@@ -217,6 +217,9 @@ class Mega_Menu_Settings {
217
  // delete menu locations
218
  delete_option("megamenu_locations");
219
 
 
 
 
220
  // delete all widgets assigned to menus
221
  $widget_manager = new Mega_Menu_Widget_Manager();
222
 
@@ -969,11 +972,11 @@ class Mega_Menu_Settings {
969
  $diff = array();
970
 
971
  foreach ( $default_theme as $key => $value ) {
972
- if ( isset( $theme_to_export[$key] ) && $theme_to_export[$key] != $value) {
973
  $diff[$key] = $theme_to_export[$key];
974
  }
975
  }
976
- if ( isset( $_POST['json'] ) ) {
977
 
978
  echo "<p>" . __("Log into the site you wish to import the theme to. Go to Mega Menu > Tools and paste this into the 'Import Theme' text area:") . "</p>";
979
 
217
  // delete menu locations
218
  delete_option("megamenu_locations");
219
 
220
+ // delete toggle blocks
221
+ delete_option("megamenu_toggle_blocks");
222
+
223
  // delete all widgets assigned to menus
224
  $widget_manager = new Mega_Menu_Widget_Manager();
225
 
972
  $diff = array();
973
 
974
  foreach ( $default_theme as $key => $value ) {
975
+ if ( isset( $theme_to_export[$key] ) && $theme_to_export[$key] != $value || $key == 'title') {
976
  $diff[$key] = $theme_to_export[$key];
977
  }
978
  }
979
+ if ( isset( $_POST['format'] ) && $_POST['format'] == 'json' ) {
980
 
981
  echo "<p>" . __("Log into the site you wish to import the theme to. Go to Mega Menu > Tools and paste this into the 'Import Theme' text area:") . "</p>";
982
 
classes/style-manager.class.php CHANGED
@@ -488,12 +488,12 @@ final class Mega_Menu_Style_Manager {
488
  $wp_filesystem->mkdir( $dir );
489
 
490
  if ( ! $wp_filesystem->put_contents( $dir . $filename, $css ) ) {
491
-
492
  // File write failed.
493
  // Update CSS output option to 'head' to stop us from attempting to regenerate the CSS on every request.
494
  $settings = get_option( 'megamenu_settings' );
495
  $settings['css'] = 'head';
496
  update_option( 'megamenu_settings', $settings );
 
497
 
498
  }
499
 
@@ -901,23 +901,13 @@ final class Mega_Menu_Style_Manager {
901
  */
902
  public function head_css() {
903
 
904
- if ( $this->get_css_output_method() == 'disabled' ) {
905
  return;
906
  }
907
 
908
- $upload_dir = wp_upload_dir();
909
-
910
- $filename = $this->get_css_filename();
911
-
912
- $filepath = trailingslashit( $upload_dir['basedir'] ) . 'maxmegamenu/' . $filename;
913
-
914
- if ( ! is_file( $filepath ) ) {
915
-
916
- $css = $this->get_css();
917
 
918
- echo '<style type="text/css">' . str_replace( array( " ", "\n" ), '', $css ) . "</style>\n";
919
-
920
- }
921
 
922
  }
923
 
488
  $wp_filesystem->mkdir( $dir );
489
 
490
  if ( ! $wp_filesystem->put_contents( $dir . $filename, $css ) ) {
 
491
  // File write failed.
492
  // Update CSS output option to 'head' to stop us from attempting to regenerate the CSS on every request.
493
  $settings = get_option( 'megamenu_settings' );
494
  $settings['css'] = 'head';
495
  update_option( 'megamenu_settings', $settings );
496
+ $this->settings = get_option( "megamenu_settings" );
497
 
498
  }
499
 
901
  */
902
  public function head_css() {
903
 
904
+ if ( in_array( $this->get_css_output_method(), array( 'disabled', 'fs' ) ) ) {
905
  return;
906
  }
907
 
908
+ $css = $this->get_css();
 
 
 
 
 
 
 
 
909
 
910
+ echo '<style type="text/css">' . str_replace( array( " ", "\n" ), '', $css ) . "</style>\n";
 
 
911
 
912
  }
913
 
css/megamenu.scss CHANGED
@@ -62,9 +62,10 @@
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 {
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
+ @include mobile {
68
+ padding: 0;
69
  }
70
 
71
  a.mega-menu-link {
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.2
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.2';
30
 
31
 
32
  /**
4
  * Plugin Name: Max Mega Menu
5
  * Plugin URI: https://www.maxmegamenu.com
6
  * Description: Mega Menu for WordPress.
7
+ * Version: 2.1.3
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.3';
30
 
31
 
32
  /**
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.4
6
- Stable tag: 2.1.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -92,6 +92,12 @@ See https://www.maxmegamenu.com for more screenshots
92
 
93
  == Changelog ==
94
 
 
 
 
 
 
 
95
  = 2.1.2 [15/03/2016] =
96
 
97
  * New feature: Mobile Toggle bar height setting added
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.4
6
+ Stable tag: 2.1.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
92
 
93
  == Changelog ==
94
 
95
+ = 2.1.3 [21/03/2016] =
96
+
97
+ * Fix: JSON Theme Export
98
+ * Fix: "Output in <head>" CSS option edgecase (not working when the static CSS file exists but is not writable)
99
+ * Change: Don't apply Menu Padding theme setting to mobile menu (revisited - using a different method used to allow desktop padding to still be overridden in Custom Styling area)
100
+
101
  = 2.1.2 [15/03/2016] =
102
 
103
  * New feature: Mobile Toggle bar height setting added