WordPress Button Plugin MaxButtons - Version 6.10

Version Description

  • Fixed color issue with preview color running one click behind
  • Fixed issue with hover gradients, when gradients are off
  • Fixed text shadow issue in CSS output
Download this release

Release Info

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

Code changes from version 6.9 to 6.10

blocks/gradient.php CHANGED
@@ -25,7 +25,8 @@ class gradientBlock extends maxBlock
25
  "css" => "gradient-end-opacity",
26
  "csspseudo" => "hover"),
27
  'use_gradient' => array('default' => '0',
28
- 'css' => 'gradient-use-gradient',
 
29
  ),
30
 
31
  );
25
  "css" => "gradient-end-opacity",
26
  "csspseudo" => "hover"),
27
  'use_gradient' => array('default' => '0',
28
+ 'css' => 'gradient-use-gradient',
29
+ 'csspseudo' => 'normal,hover',
30
  ),
31
 
32
  );
classes/maxCSSParser.php CHANGED
@@ -411,12 +411,15 @@ class maxCSSParser
411
  {
412
 
413
  $results = preg_grep("/^$mixin/i",array_keys($values) );
 
 
 
414
  $mixin_array = array();
415
  foreach($results as $result)
416
  {
417
  $mixin_array[$result] = $values[$result];
418
  }
419
-
420
  if (count($mixin_array) > 0)
421
  {
422
  switch($mixin)
@@ -456,16 +459,17 @@ class maxCSSParser
456
  $important = ($this->is_important()) ? "!important" : "";
457
  //$values = $this->add_include($values, "linear-gradient($start,$end,$stop,$important)");
458
 
459
- if ($use_gradient == 1)
460
  {
461
  $values = $this->add_include($values, "linear-gradient($start,$end,$stop,$important)");
462
  }
463
  else {
464
  $values['background-color'] = $start;
465
  }
 
466
  // remove the non-css keys from the value array ( field names )
467
  $values = array_diff_key($values, $results);
468
-
469
  return $values;
470
 
471
  }
@@ -498,7 +502,10 @@ class maxCSSParser
498
  $important = ($this->is_important()) ? "!important" : "";
499
 
500
  if ($width == 0 && $left == 0 && $top == 0)
 
 
501
  return $values;
 
502
 
503
  $values = $this->add_include($values, "text-shadow ($left,$top,$width,$color $important)");
504
 
411
  {
412
 
413
  $results = preg_grep("/^$mixin/i",array_keys($values) );
414
+ if (count($results) === 0)
415
+ continue; // no mixins.
416
+
417
  $mixin_array = array();
418
  foreach($results as $result)
419
  {
420
  $mixin_array[$result] = $values[$result];
421
  }
422
+
423
  if (count($mixin_array) > 0)
424
  {
425
  switch($mixin)
459
  $important = ($this->is_important()) ? "!important" : "";
460
  //$values = $this->add_include($values, "linear-gradient($start,$end,$stop,$important)");
461
 
462
+ if ($use_gradient == 1)
463
  {
464
  $values = $this->add_include($values, "linear-gradient($start,$end,$stop,$important)");
465
  }
466
  else {
467
  $values['background-color'] = $start;
468
  }
469
+
470
  // remove the non-css keys from the value array ( field names )
471
  $values = array_diff_key($values, $results);
472
+
473
  return $values;
474
 
475
  }
502
  $important = ($this->is_important()) ? "!important" : "";
503
 
504
  if ($width == 0 && $left == 0 && $top == 0)
505
+ {
506
+ $values = array_diff_key($values, $results); // remove them from the values, prevent incorrect output.
507
  return $values;
508
+ }
509
 
510
  $values = $this->add_include($values, "text-shadow ($left,$top,$width,$color $important)");
511
 
js/maxbuttons-admin.js CHANGED
@@ -67,6 +67,7 @@ maxAdmin.prototype.init = function () {
67
  width: 300,
68
 
69
  change: $.proxy( _.throttle(function(event, ui) {
 
70
  var color = ui.color.toString();
71
  this.update_color(event,ui, color);
72
  }, 200), this),
@@ -206,9 +207,8 @@ maxAdmin.prototype.putCSS = function(data,value,state)
206
  }
207
 
208
  maxAdmin.prototype.update_color = function(event, ui, color)
209
- {
210
  event.preventDefault();
211
-
212
  this.saveIndicator(true);
213
 
214
  var target = $(event.target);
@@ -217,9 +217,10 @@ maxAdmin.prototype.update_color = function(event, ui, color)
217
  if (color.indexOf('#') === -1)
218
  color = '#' + color;
219
 
220
- var id = target.attr('id');
 
221
 
222
-
223
  if(id.indexOf('box_shadow') !== -1)
224
  {
225
  this.updateBoxShadow(target);
67
  width: 300,
68
 
69
  change: $.proxy( _.throttle(function(event, ui) {
70
+ event.preventDefault();
71
  var color = ui.color.toString();
72
  this.update_color(event,ui, color);
73
  }, 200), this),
207
  }
208
 
209
  maxAdmin.prototype.update_color = function(event, ui, color)
210
+ {
211
  event.preventDefault();
 
212
  this.saveIndicator(true);
213
 
214
  var target = $(event.target);
217
  if (color.indexOf('#') === -1)
218
  color = '#' + color;
219
 
220
+ var id = target.attr('id');
221
+ $('#' + id).val(color); // otherwise field value is running 1 click behind.
222
 
223
+
224
  if(id.indexOf('box_shadow') !== -1)
225
  {
226
  this.updateBoxShadow(target);
js/min/maxbuttons-admin.js CHANGED
@@ -1 +1 @@
1
- var maxAdmin;jQuery(document).ready(function($){maxAdmin=function(){return this},maxAdmin.prototype={colorUpdateTime:!0,fields:null,button_id:null,form_updated:!1,tabs:null},maxAdmin.prototype.init=function(){this.button_id=$('input[name="button_id"]').val(),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault()}),$(document).on("click",".output .preview-toggle",$.proxy(this.toggle_preview,this)),$("#maxbuttons .input-paging").on("change",$.proxy(this.do_paging,this)),$(".manual-toggle").on("click",$.proxy(this.toggleManual,this)),$(".manual-entry").draggable({cancel:"p, li"}),$(document).on("submit","form.mb_ajax_save",$.proxy(this.formAjaxSave,this)),$(document).on("reInitConditionals",$.proxy(this.initConditionials,this)),this.initConditionials(),0!=$("#new-button-form").length&&(this.button_id>0&&$("#maxbuttons .mb-message").show(),this.initResponsive(),$("#maxbuttons .output").draggable({cancel:".nodrag"}),$(".color-field").wpColorPicker({width:300,change:$.proxy(_.throttle(function(t,e){var a=e.color.toString();this.update_color(t,e,a)},200),this)}),$(".input.color .arrows").on("click",$.proxy(this.copyColor,this)),$("#radius_toggle").on("click",$.proxy(this.toggleRadiusLock,this)),"undefined"!=typeof buttonFieldMap&&(this.fields=$.parseJSON(buttonFieldMap)),$("input").not(".color-field").on("keyup change",$.proxy(this.update_preview,this)),$("input.color-field").on("focus",$.proxy(this.select_field,this)),$("select").on("change",$.proxy(this.update_preview,this)),$(window).on("beforeunload",$.proxy(function(){return this.form_updated?maxcol_wp.leave_page:void 0},this)),$(".button-save").click($.proxy(function(){return this.saveIndicator(!1),$("#new-button-form").submit(),!1},this)),$(".shortcode-expand").on("click",this.toggleShortcode))},maxAdmin.prototype.repaint_preview=function(){$('.mb_tab input[type="text"]').trigger("change"),$('.mb_tab input[type="number"]').trigger("change"),$(".mb_tab select").trigger("change"),$('.mb_tab input[type="hidden"]').trigger("change"),$('.mb_tab input[type="radio"]:checked').trigger("change"),$('.mb_tab input[type="checkbox"]:checked').trigger("change")},maxAdmin.prototype.update_preview=function(e){e.preventDefault(),this.saveIndicator(!0);var target=$(e.target),field=$(target).data("field");if("undefined"==typeof field)var id=$(target).attr("id");else var id=field;var data=this.fields[id];"undefined"!=typeof data&&("undefined"!=typeof data.css&&(value=target.val(),"undefined"!=typeof data.css_unit&&-1==value.indexOf(data.css_unit)&&(value+=data.css_unit),target.is(":checkbox")&&!target.is(":checked")&&(value=""),this.putCSS(data,value)),"undefined"!=typeof data.attr&&$(".output .result").find("a").attr(data.attr,target.val()),"undefined"!=typeof data.func&&eval("this."+data.func+"(target)"))},maxAdmin.prototype.select_field=function(t){$(t.target).select()},maxAdmin.prototype.toggle_preview=function(){$(".output .inner").is(":hidden")?($(".output .inner").show(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up")):($(".output .inner").hide(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-up").addClass("dashicons-arrow-down"))},maxAdmin.prototype.putCSS=function(t,e,a){a=a||"both";var o=".maxbutton";if("hover"==a?o="a.hover ":"normal"==a&&(o="a.normal "),"undefined"!=typeof t.csspart){var n=t.csspart.split(",");for(i=0;i<n.length;i++){var r=n[i],d=o+" ."+r;$(".output .result").find(d).css(t.css,e)}}else $(".output .result").find(o).css(t.css,e)},maxAdmin.prototype.update_color=function(t,e,a){t.preventDefault(),this.saveIndicator(!0);var o=$(t.target);-1===a.indexOf("#")&&(a="#"+a);var i=o.attr("id");if(-1!==i.indexOf("box_shadow"))this.updateBoxShadow(o);else if(-1!==i.indexOf("text_shadow"))this.updateTextShadow(o);else if(-1!==i.indexOf("gradient"))-1==i.indexOf("hover")?this.updateGradient():this.updateGradient(!0);else{if("button_preview"!=i){state=-1==i.indexOf("hover")?"normal":"hover";var n=this.fields[i];return void this.putCSS(n,a,state)}$(".output .result").css("backgroundColor",a)}},maxAdmin.prototype.copyColor=function(t){t.preventDefault(),t.stopPropagation();var e=$(t.target),a=$(t.target).parents("[data-bind]"),o="#"+a.data("id"),i="#"+a.data("bind");if(e.hasClass("arrow-right"))var n="right";else var n="left";if(a.hasClass("right"))var r="left";else var r="right";"left"==r?copy="right"==n?!0:!1:"right"==r&&(copy="right"==n?!1:!0),copy?($(i).val($(o).val()),$(i).trigger("change"),$(i).wpColorPicker("color",$(o).val())):($(o).val($(i).val()),$(o).trigger("change"),$(o).wpColorPicker("color",$(i).val()))},maxAdmin.prototype.updateGradient=function(t){t=t||!1;var e="";t&&(e="_hover");var a=parseInt($("#gradient_stop").val());isNaN(a)&&(a=45);var o=$("#use_gradient").prop("checked"),i=this.hexToRgb($("#gradient_start_color"+e).val()),n=this.hexToRgb($("#gradient_end_color"+e).val()),r=parseInt($("#gradient_start_opacity"+e).val()),d=parseInt($("#gradient_end_opacity"+e).val());if(o||(n=i,d=r),isNaN(r)&&(r=100),isNaN(d)&&(d=100),t)var s=$(".output .result").find("a.hover");else var s=$(".output .result").find("a.normal");s.css("background","linear-gradient( rgba("+i+","+r/100+") "+a+"%, rgba("+n+","+d/100+") )"),s.css("background","-moz-linear-gradient( rgba("+i+","+r/100+") "+a+"%, rgba("+n+","+d/100+") )"),s.css("background","-o-linear-gradient( rgba("+i+","+r/100+") "+a+"%, rgba("+n+","+d/100+") )"),s.css("background","-webkit-gradient(linear, left top, left bottom, color-stop("+a+"%, rgba("+i+","+r/100+")), color-stop(1, rgba("+n+","+d/100+") ));")},maxAdmin.prototype.hexToRgb=function(t){t=t.replace("#","");var e=parseInt(t,16),a=e>>16&255,o=e>>8&255,i=255&e;return a+","+o+","+i},maxAdmin.prototype.updateBoxShadow=function(t){t=t||null;var e=$("#box_shadow_offset_left").val(),a=$("#box_shadow_offset_top").val(),o=$("#box_shadow_width").val(),i=$("#box_shadow_spread").val(),n=$("#box_shadow_color").val(),r=$("#box_shadow_color_hover").val();$(".output .result").find("a.normal").css("boxShadow",e+"px "+a+"px "+o+"px "+i+"px "+n),$(".output .result").find("a.hover").css("boxShadow",e+"px "+a+"px "+o+"px "+i+"px "+r)},maxAdmin.prototype.updateTextShadow=function(t,e){e=e||!1;var a=$("#text_shadow_offset_left").val(),o=$("#text_shadow_offset_top").val(),i=$("#text_shadow_width").val(),n=$("#text_shadow_color").val(),r=$("#text_shadow_color_hover").val(),d=$(t).attr("id"),s=this.fields[d];s.css="textShadow";var p=a+"px "+o+"px "+i+"px "+n;this.putCSS(s,p,"normal"),p=a+"px "+o+"px "+i+"px "+r,this.putCSS(s,p,"hover")},maxAdmin.prototype.updateAnchorText=function(t){var e=$(".output .result").find("a .mb-text");0===e.length&&($(".output .result").find("a").append('<span class="mb-text"></span>'),$(".output .result").find("a .mb-text").css({display:"block","line-height":"1em","box-sizing":"border-box"}),this.repaint_preview()),$(".output .result").find("a .mb-text").text(t.val())},maxAdmin.prototype.updateGradientOpacity=function(){this.updateGradient(!0),this.updateGradient(!1)},maxAdmin.prototype.updateDimension=function(t){var e=$(t).val(),a=$(t).attr("id"),o=this.fields[a];e>0?this.putCSS(o,e):this.putCSS(o,"auto")},maxAdmin.prototype.updateRadius=function(t){var e=t.val(),a=["radius_bottom_left","radius_bottom_right","radius_top_left","radius_top_right"];if("lock"==$("#radius_toggle").data("lock"))for(i=0;i<a.length;i++){var o=a[i];$("#"+o).val(e);var n=this.fields[o];this.putCSS(n,e+"px")}},maxAdmin.prototype.toggleRadiusLock=function(t){var e=$(t.target),a=$(e).data("lock");"lock"==a?($(e).removeClass("dashicons-lock").addClass("dashicons-unlock"),$(e).data("lock","unlock")):"unlock"==a&&($(e).removeClass("dashicons-unlock").addClass("dashicons-lock"),$(e).data("lock","lock"))},maxAdmin.prototype.initResponsive=function(){window.maxFoundry.maxadmin.responsive=new mbResponsive($),window.maxFoundry.maxadmin.responsive.init(this)},maxAdmin.prototype.do_paging=function(t){var e=parseInt($(t.target).val());if(e<=parseInt($(t.target).attr("max"))){var a=$(t.target).data("url");window.location=a+"&paged="+e}},maxAdmin.prototype.toggleShortcode=function(){$(".shortcode-expand").hasClass("closed")?($(" .mb-message.shortcode .expanded").css("display","inline-block"),$(".shortcode-expand span").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up"),$(".shortcode-expand").removeClass("closed").addClass("open")):($(" .mb-message.shortcode .expanded").css("display","none"),$(".shortcode-expand span").addClass("dashicons-arrow-down").removeClass("dashicons-arrow-up"),$(".shortcode-expand").addClass("closed").removeClass("open"))},maxAdmin.prototype.toggleManual=function(t){t.preventDefault();var e=$(t.target),a=e.data("target"),o=$('.manual-entry[data-manual="'+a+'"]');if(o.is(":visible"))return o.hide(),!0;var i=$('[data-options="'+a+'"]').position(),n=i.top+e.height();o.css("top",n),o.css("right",15),o.css("left","auto"),o.show()},maxAdmin.prototype.initConditionials=function(){var t=this;$("[data-show]").each(function(){var e=$(this).data("show"),a=e.target,o=e.values;$(document).on("change",'[name="'+a+'"]',{child:this,values:o},$.proxy(t.updateConditional,t)),$('[name="'+a+'"]').trigger("change")})},maxAdmin.prototype.updateConditional=function(t){var e=t.data,a=e.values,o=e.child,i=$(t.currentTarget),n=$(i).val();if("checkbox"===i.attr("type")){var r=$(i).prop("checked");n="checked"==a&&r?"checked":"unchecked"!=a||r?0:"unchecked"}a.indexOf(n)>=0?($(o).fadeIn("fast"),$(o).find("input, select").trigger("change")):($(o).fadeOut("fast"),$(o).find("input, select").trigger("change"))},maxAdmin.prototype.saveIndicator=function(t){this.form_updated=t?!0:!1},maxAdmin.prototype.formAjaxSave=function(t){t.preventDefault();var e=mb_ajax.ajaxurl,a=$(t.target),o=a.serialize();$.ajax({type:"POST",url:e,data:o}).done($.proxy(this.saveDone,this))},maxAdmin.prototype.buttonSubmit=function(t){t.preventDefault(),$("[data-form]").prop("disabled",!0);var e=$(t.target).data("form");$("#"+e).submit()},maxAdmin.prototype.saveDone=function(t){$("[data-form]").prop("disabled",!1);var e=$.parseJSON(t),a=e.result,o=e.title,i=e.data.id;if("undefined"!=typeof e.data.new_nonce){{e.data.new_nonce}$('input[name="nonce"]').val(e.data.new_nonce)}if(a){$('input[name="collection_id"]').val(i);var n=window.location.href;-1===n.indexOf("collection_id")&&window.history.replaceState({},"",n+"&collection_id="+i),$(document).trigger("mbFormSaved");var r=$('input[name="sorted"]').val();$('input[name="previous_selection"]').val(r),e.data.reload&&document.location.reload(!0)}a||($modal=window.maxFoundry.maxmodal,$modal.newModal("collection_error"),$modal.setTitle(o),$modal.setContent(e.body),$modal.setControls('<button class="modal_close button-primary">'+e.close_text+"</button>"),$modal.show())}});
1
+ var maxAdmin;jQuery(document).ready(function($){maxAdmin=function(){return this},maxAdmin.prototype={colorUpdateTime:!0,fields:null,button_id:null,form_updated:!1,tabs:null},maxAdmin.prototype.init=function(){this.button_id=$('input[name="button_id"]').val(),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault()}),$(document).on("click",".output .preview-toggle",$.proxy(this.toggle_preview,this)),$("#maxbuttons .input-paging").on("change",$.proxy(this.do_paging,this)),$(".manual-toggle").on("click",$.proxy(this.toggleManual,this)),$(".manual-entry").draggable({cancel:"p, li"}),$(document).on("submit","form.mb_ajax_save",$.proxy(this.formAjaxSave,this)),$(document).on("reInitConditionals",$.proxy(this.initConditionials,this)),this.initConditionials(),0!=$("#new-button-form").length&&(this.button_id>0&&$("#maxbuttons .mb-message").show(),this.initResponsive(),$("#maxbuttons .output").draggable({cancel:".nodrag"}),$(".color-field").wpColorPicker({width:300,change:$.proxy(_.throttle(function(t,e){t.preventDefault();var a=e.color.toString();this.update_color(t,e,a)},200),this)}),$(".input.color .arrows").on("click",$.proxy(this.copyColor,this)),$("#radius_toggle").on("click",$.proxy(this.toggleRadiusLock,this)),"undefined"!=typeof buttonFieldMap&&(this.fields=$.parseJSON(buttonFieldMap)),$("input").not(".color-field").on("keyup change",$.proxy(this.update_preview,this)),$("input.color-field").on("focus",$.proxy(this.select_field,this)),$("select").on("change",$.proxy(this.update_preview,this)),$(window).on("beforeunload",$.proxy(function(){return this.form_updated?maxcol_wp.leave_page:void 0},this)),$(".button-save").click($.proxy(function(){return this.saveIndicator(!1),$("#new-button-form").submit(),!1},this)),$(".shortcode-expand").on("click",this.toggleShortcode))},maxAdmin.prototype.repaint_preview=function(){$('.mb_tab input[type="text"]').trigger("change"),$('.mb_tab input[type="number"]').trigger("change"),$(".mb_tab select").trigger("change"),$('.mb_tab input[type="hidden"]').trigger("change"),$('.mb_tab input[type="radio"]:checked').trigger("change"),$('.mb_tab input[type="checkbox"]:checked').trigger("change")},maxAdmin.prototype.update_preview=function(e){e.preventDefault(),this.saveIndicator(!0);var target=$(e.target),field=$(target).data("field");if("undefined"==typeof field)var id=$(target).attr("id");else var id=field;var data=this.fields[id];"undefined"!=typeof data&&("undefined"!=typeof data.css&&(value=target.val(),"undefined"!=typeof data.css_unit&&-1==value.indexOf(data.css_unit)&&(value+=data.css_unit),target.is(":checkbox")&&!target.is(":checked")&&(value=""),this.putCSS(data,value)),"undefined"!=typeof data.attr&&$(".output .result").find("a").attr(data.attr,target.val()),"undefined"!=typeof data.func&&eval("this."+data.func+"(target)"))},maxAdmin.prototype.select_field=function(t){$(t.target).select()},maxAdmin.prototype.toggle_preview=function(){$(".output .inner").is(":hidden")?($(".output .inner").show(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up")):($(".output .inner").hide(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-up").addClass("dashicons-arrow-down"))},maxAdmin.prototype.putCSS=function(t,e,a){a=a||"both";var o=".maxbutton";if("hover"==a?o="a.hover ":"normal"==a&&(o="a.normal "),"undefined"!=typeof t.csspart){var n=t.csspart.split(",");for(i=0;i<n.length;i++){var r=n[i],d=o+" ."+r;$(".output .result").find(d).css(t.css,e)}}else $(".output .result").find(o).css(t.css,e)},maxAdmin.prototype.update_color=function(t,e,a){t.preventDefault(),this.saveIndicator(!0);var o=$(t.target);-1===a.indexOf("#")&&(a="#"+a);var i=o.attr("id");if($("#"+i).val(a),-1!==i.indexOf("box_shadow"))this.updateBoxShadow(o);else if(-1!==i.indexOf("text_shadow"))this.updateTextShadow(o);else if(-1!==i.indexOf("gradient"))-1==i.indexOf("hover")?this.updateGradient():this.updateGradient(!0);else{if("button_preview"!=i){state=-1==i.indexOf("hover")?"normal":"hover";var n=this.fields[i];return void this.putCSS(n,a,state)}$(".output .result").css("backgroundColor",a)}},maxAdmin.prototype.copyColor=function(t){t.preventDefault(),t.stopPropagation();var e=$(t.target),a=$(t.target).parents("[data-bind]"),o="#"+a.data("id"),i="#"+a.data("bind");if(e.hasClass("arrow-right"))var n="right";else var n="left";if(a.hasClass("right"))var r="left";else var r="right";"left"==r?copy="right"==n?!0:!1:"right"==r&&(copy="right"==n?!1:!0),copy?($(i).val($(o).val()),$(i).trigger("change"),$(i).wpColorPicker("color",$(o).val())):($(o).val($(i).val()),$(o).trigger("change"),$(o).wpColorPicker("color",$(i).val()))},maxAdmin.prototype.updateGradient=function(t){t=t||!1;var e="";t&&(e="_hover");var a=parseInt($("#gradient_stop").val());isNaN(a)&&(a=45);var o=$("#use_gradient").prop("checked"),i=this.hexToRgb($("#gradient_start_color"+e).val()),n=this.hexToRgb($("#gradient_end_color"+e).val()),r=parseInt($("#gradient_start_opacity"+e).val()),d=parseInt($("#gradient_end_opacity"+e).val());if(o||(n=i,d=r),isNaN(r)&&(r=100),isNaN(d)&&(d=100),t)var s=$(".output .result").find("a.hover");else var s=$(".output .result").find("a.normal");s.css("background","linear-gradient( rgba("+i+","+r/100+") "+a+"%, rgba("+n+","+d/100+") )"),s.css("background","-moz-linear-gradient( rgba("+i+","+r/100+") "+a+"%, rgba("+n+","+d/100+") )"),s.css("background","-o-linear-gradient( rgba("+i+","+r/100+") "+a+"%, rgba("+n+","+d/100+") )"),s.css("background","-webkit-gradient(linear, left top, left bottom, color-stop("+a+"%, rgba("+i+","+r/100+")), color-stop(1, rgba("+n+","+d/100+") ));")},maxAdmin.prototype.hexToRgb=function(t){t=t.replace("#","");var e=parseInt(t,16),a=e>>16&255,o=e>>8&255,i=255&e;return a+","+o+","+i},maxAdmin.prototype.updateBoxShadow=function(t){t=t||null;var e=$("#box_shadow_offset_left").val(),a=$("#box_shadow_offset_top").val(),o=$("#box_shadow_width").val(),i=$("#box_shadow_spread").val(),n=$("#box_shadow_color").val(),r=$("#box_shadow_color_hover").val();$(".output .result").find("a.normal").css("boxShadow",e+"px "+a+"px "+o+"px "+i+"px "+n),$(".output .result").find("a.hover").css("boxShadow",e+"px "+a+"px "+o+"px "+i+"px "+r)},maxAdmin.prototype.updateTextShadow=function(t,e){e=e||!1;var a=$("#text_shadow_offset_left").val(),o=$("#text_shadow_offset_top").val(),i=$("#text_shadow_width").val(),n=$("#text_shadow_color").val(),r=$("#text_shadow_color_hover").val(),d=$(t).attr("id"),s=this.fields[d];s.css="textShadow";var l=a+"px "+o+"px "+i+"px "+n;this.putCSS(s,l,"normal"),l=a+"px "+o+"px "+i+"px "+r,this.putCSS(s,l,"hover")},maxAdmin.prototype.updateAnchorText=function(t){var e=$(".output .result").find("a .mb-text");0===e.length&&($(".output .result").find("a").append('<span class="mb-text"></span>'),$(".output .result").find("a .mb-text").css({display:"block","line-height":"1em","box-sizing":"border-box"}),this.repaint_preview()),$(".output .result").find("a .mb-text").text(t.val())},maxAdmin.prototype.updateGradientOpacity=function(){this.updateGradient(!0),this.updateGradient(!1)},maxAdmin.prototype.updateDimension=function(t){var e=$(t).val(),a=$(t).attr("id"),o=this.fields[a];e>0?this.putCSS(o,e):this.putCSS(o,"auto")},maxAdmin.prototype.updateRadius=function(t){var e=t.val(),a=["radius_bottom_left","radius_bottom_right","radius_top_left","radius_top_right"];if("lock"==$("#radius_toggle").data("lock"))for(i=0;i<a.length;i++){var o=a[i];$("#"+o).val(e);var n=this.fields[o];this.putCSS(n,e+"px")}},maxAdmin.prototype.toggleRadiusLock=function(t){var e=$(t.target),a=$(e).data("lock");"lock"==a?($(e).removeClass("dashicons-lock").addClass("dashicons-unlock"),$(e).data("lock","unlock")):"unlock"==a&&($(e).removeClass("dashicons-unlock").addClass("dashicons-lock"),$(e).data("lock","lock"))},maxAdmin.prototype.initResponsive=function(){window.maxFoundry.maxadmin.responsive=new mbResponsive($),window.maxFoundry.maxadmin.responsive.init(this)},maxAdmin.prototype.do_paging=function(t){var e=parseInt($(t.target).val());if(e<=parseInt($(t.target).attr("max"))){var a=$(t.target).data("url");window.location=a+"&paged="+e}},maxAdmin.prototype.toggleShortcode=function(){$(".shortcode-expand").hasClass("closed")?($(" .mb-message.shortcode .expanded").css("display","inline-block"),$(".shortcode-expand span").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up"),$(".shortcode-expand").removeClass("closed").addClass("open")):($(" .mb-message.shortcode .expanded").css("display","none"),$(".shortcode-expand span").addClass("dashicons-arrow-down").removeClass("dashicons-arrow-up"),$(".shortcode-expand").addClass("closed").removeClass("open"))},maxAdmin.prototype.toggleManual=function(t){t.preventDefault();var e=$(t.target),a=e.data("target"),o=$('.manual-entry[data-manual="'+a+'"]');if(o.is(":visible"))return o.hide(),!0;var i=$('[data-options="'+a+'"]').position(),n=i.top+e.height();o.css("top",n),o.css("right",15),o.css("left","auto"),o.show()},maxAdmin.prototype.initConditionials=function(){var t=this;$("[data-show]").each(function(){var e=$(this).data("show"),a=e.target,o=e.values;$(document).on("change",'[name="'+a+'"]',{child:this,values:o},$.proxy(t.updateConditional,t)),$('[name="'+a+'"]').trigger("change")})},maxAdmin.prototype.updateConditional=function(t){var e=t.data,a=e.values,o=e.child,i=$(t.currentTarget),n=$(i).val();if("checkbox"===i.attr("type")){var r=$(i).prop("checked");n="checked"==a&&r?"checked":"unchecked"!=a||r?0:"unchecked"}a.indexOf(n)>=0?($(o).fadeIn("fast"),$(o).find("input, select").trigger("change")):($(o).fadeOut("fast"),$(o).find("input, select").trigger("change"))},maxAdmin.prototype.saveIndicator=function(t){this.form_updated=t?!0:!1},maxAdmin.prototype.formAjaxSave=function(t){t.preventDefault();var e=mb_ajax.ajaxurl,a=$(t.target),o=a.serialize();$.ajax({type:"POST",url:e,data:o}).done($.proxy(this.saveDone,this))},maxAdmin.prototype.buttonSubmit=function(t){t.preventDefault(),$("[data-form]").prop("disabled",!0);var e=$(t.target).data("form");$("#"+e).submit()},maxAdmin.prototype.saveDone=function(t){$("[data-form]").prop("disabled",!1);var e=$.parseJSON(t),a=e.result,o=e.title,i=e.data.id;if("undefined"!=typeof e.data.new_nonce){{e.data.new_nonce}$('input[name="nonce"]').val(e.data.new_nonce)}if(a){$('input[name="collection_id"]').val(i);var n=window.location.href;-1===n.indexOf("collection_id")&&window.history.replaceState({},"",n+"&collection_id="+i),$(document).trigger("mbFormSaved");var r=$('input[name="sorted"]').val();$('input[name="previous_selection"]').val(r),e.data.reload&&document.location.reload(!0)}a||($modal=window.maxFoundry.maxmodal,$modal.newModal("collection_error"),$modal.setTitle(o),$modal.setContent(e.body),$modal.setControls('<button class="modal_close button-primary">'+e.close_text+"</button>"),$modal.show())}});
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: 6.9
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
9
  Text Domain: maxbuttons
@@ -45,8 +45,8 @@ if (function_exists("MB"))
45
 
46
 
47
  define("MAXBUTTONS_ROOT_FILE", __FILE__);
48
- define('MAXBUTTONS_VERSION_NUM', '6.9');
49
- define('MAXBUTTONS_RELEASE',"5 Dec 2016");
50
 
51
  // In case of development, copy this to wp-config.php
52
  // define("MAXBUTTONS_DEBUG", true);
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: 6.10
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
9
  Text Domain: maxbuttons
45
 
46
 
47
  define("MAXBUTTONS_ROOT_FILE", __FILE__);
48
+ define('MAXBUTTONS_VERSION_NUM', '6.10');
49
+ define('MAXBUTTONS_RELEASE',"12 Dec 2016");
50
 
51
  // In case of development, copy this to wp-config.php
52
  // define("MAXBUTTONS_DEBUG", true);
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: maxfoundry, basszje, arcware, johnbhartley
3
  Tags: wordpress button plugin, best wordpress button plugin, wordpress button, wordpress buttons, wordpress buttons plugin, social share, wp button creator, button generator, css3 button plugin, css3 button generator, css wordpress button, css3 wordpress button, create button icon, button shortcode, social icon, button, buttons, sharing, sharing buttons, widget, sidebar, Visual Composer, siteorigin, Contact Form 7, Beaver Builder, Easy Digital Download, contact form, page builder, wordpress button generator, css3 button plugin, css3 button generator, css wordpress button, css3 wordpress button, simple social buttons, wp button plugin, button generator, create button icon, font awesome, fontawesome, responsive, responsive buttons, google, google event tracking, google analytics, facebook, facebook icon, facebook like, floating social media, icon, icons,like, linkedin, linkedin icon, social media, css button generator, social icons, social media icons, social media plugin, social profiles, tweet, twitter, tweet button, gradient
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
- Stable tag: 6.9
7
 
8
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons and social share icons.
9
 
@@ -228,6 +228,12 @@ This depends on the slider plugin you are using. Most of the well-known ones are
228
 
229
  == Changelog ==
230
 
 
 
 
 
 
 
231
  = 6.9 =
232
 
233
  * Tested for WP 4.7
3
  Tags: wordpress button plugin, best wordpress button plugin, wordpress button, wordpress buttons, wordpress buttons plugin, social share, wp button creator, button generator, css3 button plugin, css3 button generator, css wordpress button, css3 wordpress button, create button icon, button shortcode, social icon, button, buttons, sharing, sharing buttons, widget, sidebar, Visual Composer, siteorigin, Contact Form 7, Beaver Builder, Easy Digital Download, contact form, page builder, wordpress button generator, css3 button plugin, css3 button generator, css wordpress button, css3 wordpress button, simple social buttons, wp button plugin, button generator, create button icon, font awesome, fontawesome, responsive, responsive buttons, google, google event tracking, google analytics, facebook, facebook icon, facebook like, floating social media, icon, icons,like, linkedin, linkedin icon, social media, css button generator, social icons, social media icons, social media plugin, social profiles, tweet, twitter, tweet button, gradient
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
+ Stable tag: 6.10
7
 
8
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons and social share icons.
9
 
228
 
229
  == Changelog ==
230
 
231
+ = 6.10 =
232
+
233
+ * Fixed color issue with preview color running one click behind
234
+ * Fixed issue with hover gradients, when gradients are off
235
+ * Fixed text shadow issue in CSS output
236
+
237
  = 6.9 =
238
 
239
  * Tested for WP 4.7