WordPress Button Plugin MaxButtons - Version 8.0.4

Version Description

  • Fix - Container alignment could crash style compile when used in responsive screens
Download this release

Release Info

Developer basszje
Plugin Icon 128x128 WordPress Button Plugin MaxButtons
Version 8.0.4
Comparing to
See all releases

Code changes from version 8.0.1 to 8.0.4

blocks/container.php CHANGED
@@ -70,32 +70,42 @@ class containerBlock extends maxBlock
70
  $css = parent::parse_css($css, $mode, $screens);
71
  $data = $this->getBlockData();
72
 
73
- $csspart = 'mb-container';
74
- $csspseudo = 'normal';
75
-
76
  $css["mb-container"]["normal"]["display"] = "block";
77
  $css["mb-center"]["normal"]["display"] = "block";
78
  $css["mb-center"]["normal"]["text-align"] = "center";
79
 
80
- if (isset($css[$csspart][$csspseudo]["align"]))
 
 
 
 
 
 
 
 
 
 
 
81
  {
 
 
82
 
83
- if ($css[$csspart][$csspseudo]["align"] != '')
84
  {
 
 
85
 
86
- $stat = explode(":", $css[$csspart][$csspseudo]["align"]);
87
- $css[$csspart][$csspseudo][ $stat[0] ] = $stat[1];
88
- }
89
- unset($css[$csspart][$csspseudo]["align"]);
90
- }
91
- if ( isset($css[$csspart][$csspseudo]["width"]) && $data["container_width"] == 0)
92
- {
93
- unset($css[$csspart][$csspseudo]["width"]);
94
  }
95
  return $css;
96
-
97
  }
98
 
 
99
  public function map_fields($map)
100
  {
101
  $map["container_width_unit"]["func"] = "updateContainerUnit";
70
  $css = parent::parse_css($css, $mode, $screens);
71
  $data = $this->getBlockData();
72
 
 
 
 
73
  $css["mb-container"]["normal"]["display"] = "block";
74
  $css["mb-center"]["normal"]["display"] = "block";
75
  $css["mb-center"]["normal"]["text-align"] = "center";
76
 
77
+ if (isset($css['mb-container']['normal']['align']) && $css['mb-container']['normal']['align'] != '')
78
+ {
79
+ $stat = explode(":", $css['mb-container']['normal']["align"]);
80
+ $css['mb-container']['normal'][ $stat[0] ] = $stat[1];
81
+ unset($css['mb-container']['normal']["align"]);
82
+ }
83
+ if ( isset($css['mb-container']['normal']["width"]) && $data["container_width"] == 0)
84
+ {
85
+ unset($css['mb-container']['normal']["width"]);
86
+ }
87
+
88
+ foreach($screens as $screen)
89
  {
90
+ if ($screen->id == 'default')
91
+ continue;
92
 
93
+ if (! isset($css['mb-container']['responsive']) || ! isset($css['mb-container']['responsive'][$screen->id]) || ! isset($css['mb-container']['responsive'][$screen->id]['normal']) )
94
  {
95
+ continue;
96
+ }
97
 
98
+ if (isset($css['mb-container']['responsive'][$screen->id]['normal']['align']) && $css['mb-container']['responsive'][$screen->id]['normal']['align'] != '')
99
+ {
100
+ $stat = explode(":", $css['mb-container']['responsive'][$screen->id]['normal']["align"]);
101
+ $css['mb-container']['responsive'][$screen->id]['normal'][ $stat[0] ] = $stat[1];
102
+ unset($css['mb-container']['responsive'][$screen->id]['normal']["align"]);
103
+ }
 
 
104
  }
105
  return $css;
 
106
  }
107
 
108
+
109
  public function map_fields($map)
110
  {
111
  $map["container_width_unit"]["func"] = "updateContainerUnit";
classes/maxCSSParser.php CHANGED
@@ -184,7 +184,7 @@ class maxCSSParser
184
  // 'backtrace' => debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 4),
185
  'string' => $compile,
186
  );
187
- var_dump($this->compile_error);
188
  $css = $this->output_css;
189
  }
190
 
@@ -609,7 +609,7 @@ class maxCSSParser
609
  {
610
  if ($background)
611
  unset($values['background']);
612
-
613
  $linear = "linear-gradient($start,$end,$stop";
614
  if ($important)
615
  $linear .= ','. $important;
184
  // 'backtrace' => debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 4),
185
  'string' => $compile,
186
  );
187
+ // var_dump($this->compile_error);
188
  $css = $this->output_css;
189
  }
190
 
609
  {
610
  if ($background)
611
  unset($values['background']);
612
+
613
  $linear = "linear-gradient($start,$end,$stop";
614
  if ($important)
615
  $linear .= ','. $important;
js/min/maxajax.js CHANGED
@@ -47,7 +47,6 @@ maxAjax.prototype.ajaxForm = function (e)
47
  var data = this.ajaxInit();
48
  data['form'] = form.serialize();
49
  data['plugin_action'] = action;
50
- // data['action'] = 'mb_button_action';
51
 
52
  $(document).trigger('maxajax_formpost_' + action, [data,target]);
53
 
@@ -98,15 +97,12 @@ maxAjax.prototype.showSpinner = function(target)
98
  {
99
  // spinner styling in elements
100
  var spinner = '<div class="maxajax-load-spinner"></div>';
101
- //$('.maxajax-load-spinner').remove();
102
  $(target).after(spinner);
103
- //return spinner;
104
  }
105
 
106
  maxAjax.prototype.removeSpinner = function()
107
  {
108
  $('.maxajax-load-spinner').remove();
109
-
110
  }
111
 
112
  maxAjax.prototype.ajaxPost = function(data, successHandler, errorHandler)
@@ -117,7 +113,6 @@ maxAjax.prototype.ajaxPost = function(data, successHandler, errorHandler)
117
  {
118
  var action = data['plugin_action'];
119
  var successHandler = function (r,s,o,) { self.defaultSuccessHandler(r,s,o,action) } ;
120
-
121
  }
122
 
123
  if (typeof errorHandler == 'undefined')
@@ -126,7 +121,6 @@ maxAjax.prototype.ajaxPost = function(data, successHandler, errorHandler)
126
  var errorHandler = function (r,s,o,) { self.defaultErrorHandler(r,s,o,action) } ;
127
  }
128
 
129
-
130
  $.ajax({
131
  type: "POST",
132
  url: maxajax.ajax_url,
47
  var data = this.ajaxInit();
48
  data['form'] = form.serialize();
49
  data['plugin_action'] = action;
 
50
 
51
  $(document).trigger('maxajax_formpost_' + action, [data,target]);
52
 
97
  {
98
  // spinner styling in elements
99
  var spinner = '<div class="maxajax-load-spinner"></div>';
 
100
  $(target).after(spinner);
 
101
  }
102
 
103
  maxAjax.prototype.removeSpinner = function()
104
  {
105
  $('.maxajax-load-spinner').remove();
 
106
  }
107
 
108
  maxAjax.prototype.ajaxPost = function(data, successHandler, errorHandler)
113
  {
114
  var action = data['plugin_action'];
115
  var successHandler = function (r,s,o,) { self.defaultSuccessHandler(r,s,o,action) } ;
 
116
  }
117
 
118
  if (typeof errorHandler == 'undefined')
121
  var errorHandler = function (r,s,o,) { self.defaultErrorHandler(r,s,o,action) } ;
122
  }
123
 
 
124
  $.ajax({
125
  type: "POST",
126
  url: maxajax.ajax_url,
maxbuttons.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MaxButtons
4
  Plugin URI: http://maxbuttons.com
5
  Description: The best WordPress button generator. This is the free version; the Pro version <a href="http://maxbuttons.com/?ref=mbfree">can be found here</a>.
6
- Version: 8.0.1
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
9
  Text Domain: maxbuttons
@@ -16,9 +16,9 @@ namespace MaxButtons;
16
  if (! defined('MAXBUTTONS_ROOT_FILE'))
17
  define("MAXBUTTONS_ROOT_FILE", __FILE__);
18
  if (! defined('MAXBUTTONS_VERSION_NUM'))
19
- define('MAXBUTTONS_VERSION_NUM', '8.0.1');
20
 
21
- define('MAXBUTTONS_RELEASE',"8 July 2020");
22
 
23
  if (! function_exists('MaxButtons\maxbutton_double_load'))
24
  {
3
  Plugin Name: MaxButtons
4
  Plugin URI: http://maxbuttons.com
5
  Description: The best WordPress button generator. This is the free version; the Pro version <a href="http://maxbuttons.com/?ref=mbfree">can be found here</a>.
6
+ Version: 8.0.4
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
9
  Text Domain: maxbuttons
16
  if (! defined('MAXBUTTONS_ROOT_FILE'))
17
  define("MAXBUTTONS_ROOT_FILE", __FILE__);
18
  if (! defined('MAXBUTTONS_VERSION_NUM'))
19
+ define('MAXBUTTONS_VERSION_NUM', '8.0.4');
20
 
21
+ define('MAXBUTTONS_RELEASE',"15 July 2020");
22
 
23
  if (! function_exists('MaxButtons\maxbutton_double_load'))
24
  {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: wordpress button plugin, share button, wordpress buttons, css3 button gene
4
  Requires at least: 4.8
5
  Tested up to: 5.4.2
6
  Requires PHP: 5.6
7
- Stable tag: 8.0.1
8
 
9
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
10
 
@@ -264,6 +264,10 @@ Secondly, please use latin only characters for button name ( Basic settings) and
264
 
265
  == Changelog ==
266
 
 
 
 
 
267
  = 8.0.1 =
268
 
269
  * Fix for Beaver Builder
4
  Requires at least: 4.8
5
  Tested up to: 5.4.2
6
  Requires PHP: 5.6
7
+ Stable tag: 8.0.4
8
 
9
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
10
 
264
 
265
  == Changelog ==
266
 
267
+ = 8.0.4 =
268
+
269
+ * Fix - Container alignment could crash style compile when used in responsive screens
270
+
271
  = 8.0.1 =
272
 
273
  * Fix for Beaver Builder