WordPress Button Plugin MaxButtons - Version 8.8.4

Version Description

  • Added integer check on gradient to prevent crash on bad data.
Download this release

Release Info

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

Code changes from version 8.8.3 to 8.8.4

classes/max-utils.php CHANGED
@@ -77,6 +77,7 @@ class maxUtils
77
  static function hex2rgba($color, $opacity) {
78
  // Grab the hex color and remove #
79
 
 
80
  /* Check if color is already rgba. This can happen with transparency. */
81
  if (strpos($color, 'rgba') !== false)
82
  return $color;
77
  static function hex2rgba($color, $opacity) {
78
  // Grab the hex color and remove #
79
 
80
+
81
  /* Check if color is already rgba. This can happen with transparency. */
82
  if (strpos($color, 'rgba') !== false)
83
  return $color;
classes/maxCSSParser.php CHANGED
@@ -595,14 +595,16 @@ class maxCSSParser
595
 
596
  $background = ( isset($values['background'])) ? $values['background'] : false;
597
 
 
598
  $start = isset($results["gradient-start-color"]) ? $results["gradient-start-color"] : '';
599
  $end = isset( $results["gradient-end-color"] ) ? $results["gradient-end-color"] : '';
600
- $start_opacity = isset( $results["gradient-start-opacity"] ) ? $results["gradient-start-opacity"] : '';
601
- $end_opacity = isset( $results["gradient-end-opacity"] ) ? $results["gradient-end-opacity"] : '';
602
  $stop = (isset( $results["gradient-stop"]) && $results["gradient-stop"] != '') ? $results["gradient-stop"] . "%" : '45%';
603
  // default to use ( old situation )
604
  $use_gradient = (isset($results['gradient-use-gradient']) && $results['gradient-use-gradient'] != '') ? $results['gradient-use-gradient'] : 1;
605
 
 
606
  $start = maxUtils::hex2rgba($start, $start_opacity);
607
  $end = maxUtils::hex2rgba($end, $end_opacity);
608
 
595
 
596
  $background = ( isset($values['background'])) ? $values['background'] : false;
597
 
598
+
599
  $start = isset($results["gradient-start-color"]) ? $results["gradient-start-color"] : '';
600
  $end = isset( $results["gradient-end-color"] ) ? $results["gradient-end-color"] : '';
601
+ $start_opacity = isset( $results["gradient-start-opacity"] ) ? intval($results["gradient-start-opacity"]) : '';
602
+ $end_opacity = isset( $results["gradient-end-opacity"] ) ? intval($results["gradient-end-opacity"]) : '';
603
  $stop = (isset( $results["gradient-stop"]) && $results["gradient-stop"] != '') ? $results["gradient-stop"] . "%" : '45%';
604
  // default to use ( old situation )
605
  $use_gradient = (isset($results['gradient-use-gradient']) && $results['gradient-use-gradient'] != '') ? $results['gradient-use-gradient'] : 1;
606
 
607
+
608
  $start = maxUtils::hex2rgba($start, $start_opacity);
609
  $end = maxUtils::hex2rgba($end, $end_opacity);
610
 
classes/maxbuttons-class.php CHANGED
@@ -239,6 +239,7 @@ class maxButtonsPlugin
239
 
240
  load_textdomain($domain, WP_LANG_DIR.'/maxbuttons/'.$domain.'-'.$locale.'.mo');
241
  $res = load_plugin_textdomain('maxbuttons', false, $this->plugin_name . '/languages/');
 
242
  }
243
 
244
 
239
 
240
  load_textdomain($domain, WP_LANG_DIR.'/maxbuttons/'.$domain.'-'.$locale.'.mo');
241
  $res = load_plugin_textdomain('maxbuttons', false, $this->plugin_name . '/languages/');
242
+
243
  }
244
 
245
 
js/init.js CHANGED
@@ -21,7 +21,6 @@ jQuery(document).ready(function(jq) {
21
  //console.error('Could not Load Live Preview');
22
  }
23
 
24
-
25
  window.maxFoundry.maxadmin = new maxAdmin();
26
  window.maxFoundry.maxadmin.init();
27
 
@@ -45,6 +44,7 @@ jQuery(document).ready(function(jq) {
45
  var mbErrors = [];
46
 
47
  window.setTimeout(function () {
 
48
  if (typeof window.maxFoundry === 'undefined')
49
  {
50
  console.error('Detected MaxButtons load failure');
@@ -70,12 +70,12 @@ window.setTimeout(function () {
70
  el.parentNode.insertBefore(errormsg, el.nextSibling);
71
 
72
  }
73
- }, 8000);
 
74
 
75
  window.addEventListener('error', function (event)
76
  {
77
- // console.log(event);
78
  var note = event.message + ' - ' + event.filename + ':' + event.lineno + '<br>';
79
- console.log('Adding error' + note);
80
  mbErrors.push(note);
81
  });
21
  //console.error('Could not Load Live Preview');
22
  }
23
 
 
24
  window.maxFoundry.maxadmin = new maxAdmin();
25
  window.maxFoundry.maxadmin.init();
26
 
44
  var mbErrors = [];
45
 
46
  window.setTimeout(function () {
47
+
48
  if (typeof window.maxFoundry === 'undefined')
49
  {
50
  console.error('Detected MaxButtons load failure');
70
  el.parentNode.insertBefore(errormsg, el.nextSibling);
71
 
72
  }
73
+ }, 4000);
74
+
75
 
76
  window.addEventListener('error', function (event)
77
  {
 
78
  var note = event.message + ' - ' + event.filename + ':' + event.lineno + '<br>';
79
+ console.error('Detected Error ' + note);
80
  mbErrors.push(note);
81
  });
js/maxbuttons-admin.js CHANGED
@@ -482,6 +482,7 @@ maxAdmin.prototype.initConditionials = function ()
482
 
483
  maxAdmin.prototype.updateConditional = function (event)
484
  {
 
485
  var data = event.data;
486
  var cond_values = data.values;
487
  var cond_child = data.child;
482
 
483
  maxAdmin.prototype.updateConditional = function (event)
484
  {
485
+
486
  var data = event.data;
487
  var cond_values = data.values;
488
  var cond_child = data.child;
js/min/init.js CHANGED
@@ -1 +1 @@
1
- var $=jQuery;jQuery(document).ready(function(n){$=n,void 0===window.maxFoundry&&(window.maxFoundry={}),"function"==typeof maxLivePreview&&(window.maxFoundry.livePreview=maxLivePreview),window.maxFoundry.maxadmin=new maxAdmin,window.maxFoundry.maxadmin.init(),window.maxFoundry.maxmodal=new maxModal,window.maxFoundry.maxmodal.init(),window.maxFoundry.maxAjax=new maxAjax,window.maxFoundry.maxAjax.init(),window.maxFoundry.maxTabs=new maxTabs,window.maxFoundry.maxTabs.init(),$(window).trigger("maxbuttons-js-init-done")});var mbErrors=[];window.setTimeout(function(){if(void 0===window.maxFoundry){if(console.error("Detected MaxButtons load failure"),"undefined"==typeof maxbuttons_init||void 0===maxbuttons_init.initFailed)return console.error("Detected MaxButtons is not loaded, but can't find the text to express it"),!1;var n=document.querySelector("h1.title"),e=document.createElement("div");if(e.className="notice notice-error",e.innerHTML="<h1>"+maxbuttons_init.initFailedTitle+"</h1><p>"+maxbuttons_init.initFailed+"</p>",mbErrors.length>0)for(e.innerHTML+=maxbuttons_init.initFailedDetectedErrors,i=0;i<mbErrors.length;i++)e.innerHTML+=mbErrors[i];n.parentNode.insertBefore(e,n.nextSibling)}},8e3),window.addEventListener("error",function(n){var i=n.message+" - "+n.filename+":"+n.lineno+"<br>";console.log("Adding error"+i),mbErrors.push(i)});
1
+ var $=jQuery;jQuery(document).ready(function(n){$=n,void 0===window.maxFoundry&&(window.maxFoundry={}),"function"==typeof maxLivePreview&&(window.maxFoundry.livePreview=maxLivePreview),window.maxFoundry.maxadmin=new maxAdmin,window.maxFoundry.maxadmin.init(),window.maxFoundry.maxmodal=new maxModal,window.maxFoundry.maxmodal.init(),window.maxFoundry.maxAjax=new maxAjax,window.maxFoundry.maxAjax.init(),window.maxFoundry.maxTabs=new maxTabs,window.maxFoundry.maxTabs.init(),$(window).trigger("maxbuttons-js-init-done")});var mbErrors=[];window.setTimeout(function(){if(void 0===window.maxFoundry){if(console.error("Detected MaxButtons load failure"),"undefined"==typeof maxbuttons_init||void 0===maxbuttons_init.initFailed)return console.error("Detected MaxButtons is not loaded, but can't find the text to express it"),!1;var n=document.querySelector("h1.title"),e=document.createElement("div");if(e.className="notice notice-error",e.innerHTML="<h1>"+maxbuttons_init.initFailedTitle+"</h1><p>"+maxbuttons_init.initFailed+"</p>",mbErrors.length>0)for(e.innerHTML+=maxbuttons_init.initFailedDetectedErrors,i=0;i<mbErrors.length;i++)e.innerHTML+=mbErrors[i];n.parentNode.insertBefore(e,n.nextSibling)}},4e3),window.addEventListener("error",function(n){var i=n.message+" - "+n.filename+":"+n.lineno+"<br>";console.error("Detected Error "+i),mbErrors.push(i)});
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.8.3
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.8.3');
20
 
21
- define('MAXBUTTONS_RELEASE',"2 December 2021");
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.8.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.8.4');
20
 
21
+ define('MAXBUTTONS_RELEASE',"24 December 2021");
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.8
6
  Requires PHP: 7.0
7
- Stable tag: 8.8.3
8
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
9
 
10
  == Description ==
@@ -268,6 +268,10 @@ Secondly, please use latin only characters for button name ( Basic settings) and
268
 
269
  == Changelog ==
270
 
 
 
 
 
271
  = 8.8.3 =
272
 
273
  * New - Auto-Tablepress integration will only add button once to output inline, to avoid repetition.
4
  Requires at least: 4.8
5
  Tested up to: 5.8
6
  Requires PHP: 7.0
7
+ Stable tag: 8.8.4
8
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
9
 
10
  == Description ==
268
 
269
  == Changelog ==
270
 
271
+ = 8.8.4 =
272
+
273
+ * Added integer check on gradient to prevent crash on bad data.
274
+
275
  = 8.8.3 =
276
 
277
  * New - Auto-Tablepress integration will only add button once to output inline, to avoid repetition.