WordPress Button Plugin MaxButtons - Version 8.8.2

Version Description

  • Fix - Text-shadow buttons without color could trigger a crash in certain cases.
Download this release

Release Info

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

Code changes from version 8.8.1 to 8.8.2

assets/css/style.css CHANGED
@@ -488,7 +488,7 @@
488
  border-top: solid 1px #cccccc;
489
  background-color: #ffffff;
490
  }
491
- #maxbuttons .option-container > .inside [data-show]:not(.condshow), #maxbuttons .option-container > .inside .option[data-show]:not(.condshow), #maxbuttons .block_sidebar > .inside [data-show]:not(.condshow), #maxbuttons .block_sidebar > .inside .option[data-show]:not(.condshow) {
492
  opacity: 0;
493
  display: none;
494
  }
488
  border-top: solid 1px #cccccc;
489
  background-color: #ffffff;
490
  }
491
+ #maxbuttons .option-container > .inside [data-show]:not(.condshow), #maxbuttons .option-container > .inside .option[data-show]:not(.condshow), #maxbuttons .option-container > .inside [data-has]:not(.condshow), #maxbuttons .option-container > .inside .option[data-has]:not(.condshow), #maxbuttons .block_sidebar > .inside [data-show]:not(.condshow), #maxbuttons .block_sidebar > .inside .option[data-show]:not(.condshow), #maxbuttons .block_sidebar > .inside [data-has]:not(.condshow), #maxbuttons .block_sidebar > .inside .option[data-has]:not(.condshow) {
492
  opacity: 0;
493
  display: none;
494
  }
assets/scss/_editor.scss CHANGED
@@ -175,7 +175,7 @@
175
  padding: 10px 55px 10px 15px; // 55px is to make space for sidebars in PRO
176
  border-top: solid 1px #cccccc;
177
  background-color: #ffffff;
178
- [data-show]:not(.condshow), .option[data-show]:not(.condshow)
179
  {
180
  opacity: 0;
181
  display: none;
175
  padding: 10px 55px 10px 15px; // 55px is to make space for sidebars in PRO
176
  border-top: solid 1px #cccccc;
177
  background-color: #ffffff;
178
+ [data-show]:not(.condshow), .option[data-show]:not(.condshow), [data-has]:not(.condshow), .option[data-has]:not(.condshow)
179
  {
180
  opacity: 0;
181
  display: none;
classes/blocks.php CHANGED
@@ -36,7 +36,6 @@ class maxBlocks
36
  $newBlocks = array();
37
  $templates = array();
38
 
39
-
40
  foreach($block_paths as $block_path)
41
  {
42
  $dir_iterator = new RecursiveDirectoryIterator($block_path, FilesystemIterator::SKIP_DOTS);
36
  $newBlocks = array();
37
  $templates = array();
38
 
 
39
  foreach($block_paths as $block_path)
40
  {
41
  $dir_iterator = new RecursiveDirectoryIterator($block_path, FilesystemIterator::SKIP_DOTS);
classes/maxCSSParser.php CHANGED
@@ -665,7 +665,7 @@ class maxCSSParser
665
  $width = isset($results["text-shadow-width"]) ? $results["text-shadow-width"] : 0;
666
  $left = isset($results["text-shadow-left"]) ? $results["text-shadow-left"] : 0;
667
  $top = isset($results["text-shadow-top"]) ? $results["text-shadow-top"] : 0;
668
- $color = isset($results["text-shadow-color"]) ? $results["text-shadow-color"] : rgba(0,0,0,0);
669
  $important = ($this->is_important()) ? "!important" : "";
670
 
671
  if ($width == 0 && $left == 0 && $top == 0)
665
  $width = isset($results["text-shadow-width"]) ? $results["text-shadow-width"] : 0;
666
  $left = isset($results["text-shadow-left"]) ? $results["text-shadow-left"] : 0;
667
  $top = isset($results["text-shadow-top"]) ? $results["text-shadow-top"] : 0;
668
+ $color = isset($results["text-shadow-color"]) ? $results["text-shadow-color"] : "rgba(0,0,0,0)";
669
  $important = ($this->is_important()) ? "!important" : "";
670
 
671
  if ($width == 0 && $left == 0 && $top == 0)
js/maxbuttons-admin.js CHANGED
@@ -547,10 +547,13 @@ maxAdmin.prototype.updateHasConditional = function(event)
547
  if (hascond)
548
  {
549
  $(cond_child).addClass('condshow').animate({'opacity': 1}, 300);
 
550
  }
551
  else
552
  {
553
  $(cond_child).animate({'opacity': 0}, 300, function () { $(cond_child).removeClass('condshow')});
 
 
554
  }
555
 
556
  }
547
  if (hascond)
548
  {
549
  $(cond_child).addClass('condshow').animate({'opacity': 1}, 300);
550
+ $(cond_child).find('input, select').trigger('change');
551
  }
552
  else
553
  {
554
  $(cond_child).animate({'opacity': 0}, 300, function () { $(cond_child).removeClass('condshow')});
555
+ $(cond_child).find('input, select').trigger('change');
556
+
557
  }
558
 
559
  }
js/min/maxbuttons-admin.js CHANGED
@@ -1 +1 @@
1
- function maxAdmin(){}var $=jQuery;maxAdmin.prototype={colorUpdateTime:!0,colorPalettes:!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(e){e.preventDefault(),e.stopPropagation()}),$("#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("click","[data-buttonaction]",$.proxy(this.button_action,this)),$(document).on("reInitConditionals",$.proxy(this.initConditionials,this)),this.initConditionials(),$("#maxbuttons").on("change, input",'input[type="range"]',$.proxy(this.updateRange,this)),this.updateRange(null),$("#bulk-action-all").on("click",$.proxy(this.checkAllInputs,this)),0!=$("#new-button-form").length&&(this.button_id>0&&$("#maxbuttons .mb-message").show(),$(document).on("livePreviewUpdate",$.proxy(this.saveIndicator,this)),$(".screen-option").on("click",$.proxy(this.change_screen_event,this)),$(".remove-screen").on("click",$.proxy(this.remove_screen,this)),$("#maxbuttons .output").draggable({cancel:".nodrag"}),$(".iris-picker-inner .iris-square-value").removeAttr("href"),$(document).on("click",".iris-picker-inner .iris-square-value",function(e){return e.preventDefault(),e.stopPropagation(),!1}),$(".input.mbcolor .arrows").on("click",$.proxy(this.copyColor,this)),$('[id$="radius_toggle"]').on("click",$.proxy(this.toggleRadiusLock,this)),$(".output .preview-toggle").on("click",$.proxy(this.toggle_preview,this)),$("#maxbuttons input.mb-color-field").on("focus",$.proxy(this.select_field,this)),$(window).on("beforeunload",$.proxy(function(){if(this.form_updated)return maxajax.leave_page},this)),$(document).on("keyup","input",function(e){if(e.keyCode&&13==e.keyCode)return $(":input")[$(":input").index(document.activeElement)+1].focus(),!1}),$(".button-save").on("click",$.proxy(function(e){return this.saveIndicator(null,!1),"new_add_screen"==$(e.target).attr("id")&&$("#add_new_screen").val("yes"),$("#new-button-form").trigger("submit"),!1},this)),$(".shortcode-expand").on("click",this.toggleShortcode),$("#url_button").on("click",$.proxy(this.openURLDialog,this)),$(".block_sidebar .open_control").on("click",this.toggleSidebar),$(window).on("maxbuttons-js-init-done",$.proxy(this.loadLivePreview,this)),1==$('input[name="button_is_new"]').val()&&this.saveIndicator(null,!0))},maxAdmin.prototype.loadLivePreview=function(){if("function"==typeof window.maxFoundry.livePreview?(this.livePreview=new window.maxFoundry.livePreview,this.livePreview.init(),$(document).trigger("livepreview-loaded")):alert("Live Preview not loaded, button preview not functional"),void 0!==window.location.hash&&window.location.hash.length>0){var e=window.location.hash.replace("#","");this.change_screen(e)}},maxAdmin.prototype.change_screen_event=function(e){e.preventDefault();var t=$(e.target);void 0===t.data("screenid")&&(t=t.parents(".screen-option"));var o=t.data("screenid");void 0!==o&&this.change_screen(o)},maxAdmin.prototype.change_screen=function(e){var t=$(".screen-option.option-active").data("screenid"),o=$('.screen-option[data-screenid="'+e+'"]');"new"!=e&&$("#current_screen").val(e),t!==e&&(window.location.hash=e,$(".screen-option").removeClass("option-active"),o.addClass("option-active"),$(document).trigger("changed_screen",e),$(".mbscreen-editor").removeClass("current-screen"),$("#screen_"+e).addClass("current-screen"))},maxAdmin.prototype.remove_screen=function(e){if(confirm(maxadmin_settings.remove_confirm)){var t=$(e.target),o=t.parents(".mbscreen-editor").data("screenid");t.parents(".mbscreen-editor").remove(),$('.screen-option[data-screenid="'+o+'"]').remove(),$('input[name="screens[]"][value="'+o+'"]').remove(),$(".removed-note").show(),this.change_screen("default"),this.saveIndicator(null,!0)}},maxAdmin.prototype.toggle_preview=function(e){$(".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.select_field=function(e){$(e.target).select()},maxAdmin.prototype.button_action=function(e){e.preventDefault();var t=$(e.target).data("buttonaction"),o=$(e.target).data("confirm");if(this.form_updated=!1,void 0!==o){if(!window.confirm(o))return}var n=$(e.target).data("buttonid"),a=$('input[name="'+t+'_nonce"]').val(),i=$('input[name="paged"]').val(),r=maxajax.ajax_url,s={action:"mb_button_action",button_action:t,button_id:n,nonce:a};void 0!==i&&(s.paged=i),$.post({url:r,data:s,success:function(e){response=JSON.parse(e),void 0!==response.redirection&&(window.location=response.redirection)},error:function(){console.error("error in button action"+t)}})},maxAdmin.prototype.checkCopyModal=function(e){this.form_updated?e.currentModal.find(".mb-message").show():$(e.currentModal).find(".mb-message").hide()},maxAdmin.prototype.copyColor=function(e){e.preventDefault(),e.stopPropagation();var t=$(e.target),o=$(e.target).parents("[data-bind]"),n="#"+o.data("id"),a="#"+o.data("bind");if(t.hasClass("arrow-right"))i="right";else var i="left";if(o.hasClass("right"))r="left";else var r="right";"left"==r?copy="right"==i:"right"==r&&(copy="right"!=i),copy?($(a).val($(n).val()),$(a).trigger("change"),$(a).wpColorPicker("color",$(n).val())):($(n).val($(a).val()),$(n).trigger("change"),$(n).wpColorPicker("color",$(a).val()))},maxAdmin.prototype.toggleRadiusLock=function(e){var t=$(e.target),o=$(t).data("lock");"lock"==o?($(t).removeClass("dashicons-lock").addClass("dashicons-unlock"),$(t).data("lock","unlock")):"unlock"==o&&($(t).removeClass("dashicons-unlock").addClass("dashicons-lock"),$(t).data("lock","lock"))},maxAdmin.prototype.initResponsive=function(){},maxAdmin.prototype.do_paging=function(e){var t=parseInt($(e.target).val());if(t<=parseInt($(e.target).attr("max"))){var o=$(e.target).data("url");window.location=o+"&paged="+t}},maxAdmin.prototype.toggleShortcode=function(e){$(".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(e){e.preventDefault();var t=$(e.target),o=t.data("target"),n=$('.manual-entry[data-manual="'+o+'"]');if(n.is(":visible"))return n.hide(),!0;var a=t.parents(".option-container");n.css("top","0px"),n.css("right","-25%"),n.prependTo(a),n.show()},maxAdmin.prototype.resetConditionals=function(){$("[data-show], [data-has]").each(function(){var e=$(this).data("show");if(void 0===e&&(e=$(this).data("has")),void 0!==e){var t=e.target;$(document).off("change",'[name="'+t+'"]')}else console.error($(this)+"has a improperly set conditional")})},maxAdmin.prototype.initConditionials=function(){var e=this;this.resetConditionals(),$("[data-show]").each(function(){var t=$(this).data("show"),o=t.target,n=t.values;$(document).on("change",'[name="'+o+'"]',{child:this,values:n},$.proxy(e.updateConditional,e)),$('[name="'+o+'"]').length>1?$('[name="'+o+'"]:checked').trigger("change",["conditional"]):$('[name="'+o+'"]').trigger("change",["conditional"])});var t=[];$("[data-has]").each(function(){var o=$(this).data("has"),n=o.target,a=o.values;$('[name="'+n+'"]').on("change",{target:n,child:this,values:a},$.proxy(e.updateHasConditional,e));var i='[name="'+n+'"]';$.inArray(i,t),t.push(i)}),t.length>0&&$(t.toString()).first().trigger("change",["conditional"])},maxAdmin.prototype.updateConditional=function(e){var t=e.data,o=t.values,n=t.child,a=$(e.currentTarget),i=$(a).val();if("checkbox"===a.attr("type")){var r=$(a).prop("checked");i="checked"==o&&r?"checked":"unchecked"!=o||r?0:"unchecked"}o.indexOf(i)>=0?($(n).addClass("condshow").animate({opacity:1},300),$(n).find("input, select").trigger("change")):($(n).animate({opacity:0},300,function(){$(n).removeClass("condshow")}),$(n).find("input, select").trigger("change"))},maxAdmin.prototype.updateHasConditional=function(e){var t=e.data,o=t.values,n=t.child,a=t.target,i=[];$(o).each(function(e){i.push("[value="+this+"]")}),$('[name="'+a+'"]').filter(i.toString()).length>0?$(n).addClass("condshow").animate({opacity:1},300):$(n).animate({opacity:0},300,function(){$(n).removeClass("condshow")})},maxAdmin.prototype.updateRange=function(e){if(void 0===e||null===e)t=$('input[type="range"]');else var t=[e.target];$(t).each(function(){var e=$(this).val();$(this).parents(".input").find(".range_value output").val(e+"%")})},maxAdmin.prototype.saveIndicator=function(e,t){t?(this.form_updated=!0,$(".button-save").removeClass("disabled").addClass("button-primary")):(this.form_updated=!1,$(".button-save").addClass("disabled").removeClass("button-primary"))},maxAdmin.prototype.formAjaxSave=function(e){e.preventDefault();var t=mb_ajax.ajaxurl,o=$(e.target).serialize();$.ajax({type:"POST",url:t,data:o}).done($.proxy(this.saveDone,this))},maxAdmin.prototype.saveDone=function(e){$("[data-form]").prop("disabled",!1);var t=JSON.parse(e),o=t.result,n=t.title,a=t.data.id;if(void 0!==t.data.new_nonce){t.data.new_nonce;$('input[name="nonce"]').val(t.data.new_nonce)}if(o){$('input[name="collection_id"]').val(a);var i=window.location.href;-1===i.indexOf("collection_id")&&window.history.replaceState({},"",i+"&collection_id="+a),$(document).trigger("mbFormSaved");var r=$('input[name="sorted"]').val();$('input[name="previous_selection"]').val(r),t.data.reload&&document.location.reload(!0)}o||($modal=window.maxFoundry.maxModal,$modal.newModal("collection_error"),$modal.setTitle(n),$modal.setContent(t.body),$modal.setControls('<button class="modal_close button-primary">'+t.close_text+"</button>"),$modal.show())},maxAdmin.prototype.openURLDialog=function(e){return window.wpActiveEditor="url",-1==window.ajaxurl.indexOf("ajax_maxbuttons")&&(window.ajaxurl=window.ajaxurl+"?ajax_maxbuttons=editor"),wpLink.open(),$("#link-options").hide(),$(".query-results").css("top","70px"),$("#wp-link-submit").off("click keyup change"),$("#wp-link-submit").on("click",$.proxy(this.updateLink,this)),!1},maxAdmin.prototype.updateLink=function(e){e.preventDefault();var t=$("#url").val(),o=$("#wp-link-url").val(),n=maxadmin_settings.homeurl;return o=o.replace(n,""),$("#url").val(o),t!=o&&$(document).trigger("livePreviewUpdate",!0),wpLink.close(),!1},maxAdmin.prototype.toggleSidebar=function(e){var t=e.target,o=$(t).parents(".block_sidebar");o.hasClass("active")?o.removeClass("active"):o.addClass("active")},maxAdmin.prototype.checkAllInputs=function(e){e.preventDefault;for(var t=document.getElementById("bulk-action-all").checked,o=document.querySelectorAll('input[name="button-id[]"]'),n=0;n<o.length;n++)o[n].checked=t};
1
+ function maxAdmin(){}var $=jQuery;maxAdmin.prototype={colorUpdateTime:!0,colorPalettes:!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(e){e.preventDefault(),e.stopPropagation()}),$("#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("click","[data-buttonaction]",$.proxy(this.button_action,this)),$(document).on("reInitConditionals",$.proxy(this.initConditionials,this)),this.initConditionials(),$("#maxbuttons").on("change, input",'input[type="range"]',$.proxy(this.updateRange,this)),this.updateRange(null),$("#bulk-action-all").on("click",$.proxy(this.checkAllInputs,this)),0!=$("#new-button-form").length&&(this.button_id>0&&$("#maxbuttons .mb-message").show(),$(document).on("livePreviewUpdate",$.proxy(this.saveIndicator,this)),$(".screen-option").on("click",$.proxy(this.change_screen_event,this)),$(".remove-screen").on("click",$.proxy(this.remove_screen,this)),$("#maxbuttons .output").draggable({cancel:".nodrag"}),$(".iris-picker-inner .iris-square-value").removeAttr("href"),$(document).on("click",".iris-picker-inner .iris-square-value",function(e){return e.preventDefault(),e.stopPropagation(),!1}),$(".input.mbcolor .arrows").on("click",$.proxy(this.copyColor,this)),$('[id$="radius_toggle"]').on("click",$.proxy(this.toggleRadiusLock,this)),$(".output .preview-toggle").on("click",$.proxy(this.toggle_preview,this)),$("#maxbuttons input.mb-color-field").on("focus",$.proxy(this.select_field,this)),$(window).on("beforeunload",$.proxy(function(){if(this.form_updated)return maxajax.leave_page},this)),$(document).on("keyup","input",function(e){if(e.keyCode&&13==e.keyCode)return $(":input")[$(":input").index(document.activeElement)+1].focus(),!1}),$(".button-save").on("click",$.proxy(function(e){return this.saveIndicator(null,!1),"new_add_screen"==$(e.target).attr("id")&&$("#add_new_screen").val("yes"),$("#new-button-form").trigger("submit"),!1},this)),$(".shortcode-expand").on("click",this.toggleShortcode),$("#url_button").on("click",$.proxy(this.openURLDialog,this)),$(".block_sidebar .open_control").on("click",this.toggleSidebar),$(window).on("maxbuttons-js-init-done",$.proxy(this.loadLivePreview,this)),1==$('input[name="button_is_new"]').val()&&this.saveIndicator(null,!0))},maxAdmin.prototype.loadLivePreview=function(){if("function"==typeof window.maxFoundry.livePreview?(this.livePreview=new window.maxFoundry.livePreview,this.livePreview.init(),$(document).trigger("livepreview-loaded")):alert("Live Preview not loaded, button preview not functional"),void 0!==window.location.hash&&window.location.hash.length>0){var e=window.location.hash.replace("#","");this.change_screen(e)}},maxAdmin.prototype.change_screen_event=function(e){e.preventDefault();var t=$(e.target);void 0===t.data("screenid")&&(t=t.parents(".screen-option"));var o=t.data("screenid");void 0!==o&&this.change_screen(o)},maxAdmin.prototype.change_screen=function(e){var t=$(".screen-option.option-active").data("screenid"),o=$('.screen-option[data-screenid="'+e+'"]');"new"!=e&&$("#current_screen").val(e),t!==e&&(window.location.hash=e,$(".screen-option").removeClass("option-active"),o.addClass("option-active"),$(document).trigger("changed_screen",e),$(".mbscreen-editor").removeClass("current-screen"),$("#screen_"+e).addClass("current-screen"))},maxAdmin.prototype.remove_screen=function(e){if(confirm(maxadmin_settings.remove_confirm)){var t=$(e.target),o=t.parents(".mbscreen-editor").data("screenid");t.parents(".mbscreen-editor").remove(),$('.screen-option[data-screenid="'+o+'"]').remove(),$('input[name="screens[]"][value="'+o+'"]').remove(),$(".removed-note").show(),this.change_screen("default"),this.saveIndicator(null,!0)}},maxAdmin.prototype.toggle_preview=function(e){$(".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.select_field=function(e){$(e.target).select()},maxAdmin.prototype.button_action=function(e){e.preventDefault();var t=$(e.target).data("buttonaction"),o=$(e.target).data("confirm");if(this.form_updated=!1,void 0!==o){if(!window.confirm(o))return}var n=$(e.target).data("buttonid"),a=$('input[name="'+t+'_nonce"]').val(),i=$('input[name="paged"]').val(),r=maxajax.ajax_url,s={action:"mb_button_action",button_action:t,button_id:n,nonce:a};void 0!==i&&(s.paged=i),$.post({url:r,data:s,success:function(e){response=JSON.parse(e),void 0!==response.redirection&&(window.location=response.redirection)},error:function(){console.error("error in button action"+t)}})},maxAdmin.prototype.checkCopyModal=function(e){this.form_updated?e.currentModal.find(".mb-message").show():$(e.currentModal).find(".mb-message").hide()},maxAdmin.prototype.copyColor=function(e){e.preventDefault(),e.stopPropagation();var t=$(e.target),o=$(e.target).parents("[data-bind]"),n="#"+o.data("id"),a="#"+o.data("bind");if(t.hasClass("arrow-right"))i="right";else var i="left";if(o.hasClass("right"))r="left";else var r="right";"left"==r?copy="right"==i:"right"==r&&(copy="right"!=i),copy?($(a).val($(n).val()),$(a).trigger("change"),$(a).wpColorPicker("color",$(n).val())):($(n).val($(a).val()),$(n).trigger("change"),$(n).wpColorPicker("color",$(a).val()))},maxAdmin.prototype.toggleRadiusLock=function(e){var t=$(e.target),o=$(t).data("lock");"lock"==o?($(t).removeClass("dashicons-lock").addClass("dashicons-unlock"),$(t).data("lock","unlock")):"unlock"==o&&($(t).removeClass("dashicons-unlock").addClass("dashicons-lock"),$(t).data("lock","lock"))},maxAdmin.prototype.initResponsive=function(){},maxAdmin.prototype.do_paging=function(e){var t=parseInt($(e.target).val());if(t<=parseInt($(e.target).attr("max"))){var o=$(e.target).data("url");window.location=o+"&paged="+t}},maxAdmin.prototype.toggleShortcode=function(e){$(".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(e){e.preventDefault();var t=$(e.target),o=t.data("target"),n=$('.manual-entry[data-manual="'+o+'"]');if(n.is(":visible"))return n.hide(),!0;var a=t.parents(".option-container");n.css("top","0px"),n.css("right","-25%"),n.prependTo(a),n.show()},maxAdmin.prototype.resetConditionals=function(){$("[data-show], [data-has]").each(function(){var e=$(this).data("show");if(void 0===e&&(e=$(this).data("has")),void 0!==e){var t=e.target;$(document).off("change",'[name="'+t+'"]')}else console.error($(this)+"has a improperly set conditional")})},maxAdmin.prototype.initConditionials=function(){var e=this;this.resetConditionals(),$("[data-show]").each(function(){var t=$(this).data("show"),o=t.target,n=t.values;$(document).on("change",'[name="'+o+'"]',{child:this,values:n},$.proxy(e.updateConditional,e)),$('[name="'+o+'"]').length>1?$('[name="'+o+'"]:checked').trigger("change",["conditional"]):$('[name="'+o+'"]').trigger("change",["conditional"])});var t=[];$("[data-has]").each(function(){var o=$(this).data("has"),n=o.target,a=o.values;$('[name="'+n+'"]').on("change",{target:n,child:this,values:a},$.proxy(e.updateHasConditional,e));var i='[name="'+n+'"]';$.inArray(i,t),t.push(i)}),t.length>0&&$(t.toString()).first().trigger("change",["conditional"])},maxAdmin.prototype.updateConditional=function(e){var t=e.data,o=t.values,n=t.child,a=$(e.currentTarget),i=$(a).val();if("checkbox"===a.attr("type")){var r=$(a).prop("checked");i="checked"==o&&r?"checked":"unchecked"!=o||r?0:"unchecked"}o.indexOf(i)>=0?($(n).addClass("condshow").animate({opacity:1},300),$(n).find("input, select").trigger("change")):($(n).animate({opacity:0},300,function(){$(n).removeClass("condshow")}),$(n).find("input, select").trigger("change"))},maxAdmin.prototype.updateHasConditional=function(e){var t=e.data,o=t.values,n=t.child,a=t.target,i=[];$(o).each(function(e){i.push("[value="+this+"]")}),$('[name="'+a+'"]').filter(i.toString()).length>0?($(n).addClass("condshow").animate({opacity:1},300),$(n).find("input, select").trigger("change")):($(n).animate({opacity:0},300,function(){$(n).removeClass("condshow")}),$(n).find("input, select").trigger("change"))},maxAdmin.prototype.updateRange=function(e){if(void 0===e||null===e)t=$('input[type="range"]');else var t=[e.target];$(t).each(function(){var e=$(this).val();$(this).parents(".input").find(".range_value output").val(e+"%")})},maxAdmin.prototype.saveIndicator=function(e,t){t?(this.form_updated=!0,$(".button-save").removeClass("disabled").addClass("button-primary")):(this.form_updated=!1,$(".button-save").addClass("disabled").removeClass("button-primary"))},maxAdmin.prototype.formAjaxSave=function(e){e.preventDefault();var t=mb_ajax.ajaxurl,o=$(e.target).serialize();$.ajax({type:"POST",url:t,data:o}).done($.proxy(this.saveDone,this))},maxAdmin.prototype.saveDone=function(e){$("[data-form]").prop("disabled",!1);var t=JSON.parse(e),o=t.result,n=t.title,a=t.data.id;if(void 0!==t.data.new_nonce){t.data.new_nonce;$('input[name="nonce"]').val(t.data.new_nonce)}if(o){$('input[name="collection_id"]').val(a);var i=window.location.href;-1===i.indexOf("collection_id")&&window.history.replaceState({},"",i+"&collection_id="+a),$(document).trigger("mbFormSaved");var r=$('input[name="sorted"]').val();$('input[name="previous_selection"]').val(r),t.data.reload&&document.location.reload(!0)}o||($modal=window.maxFoundry.maxModal,$modal.newModal("collection_error"),$modal.setTitle(n),$modal.setContent(t.body),$modal.setControls('<button class="modal_close button-primary">'+t.close_text+"</button>"),$modal.show())},maxAdmin.prototype.openURLDialog=function(e){return window.wpActiveEditor="url",-1==window.ajaxurl.indexOf("ajax_maxbuttons")&&(window.ajaxurl=window.ajaxurl+"?ajax_maxbuttons=editor"),wpLink.open(),$("#link-options").hide(),$(".query-results").css("top","70px"),$("#wp-link-submit").off("click keyup change"),$("#wp-link-submit").on("click",$.proxy(this.updateLink,this)),!1},maxAdmin.prototype.updateLink=function(e){e.preventDefault();var t=$("#url").val(),o=$("#wp-link-url").val(),n=maxadmin_settings.homeurl;return o=o.replace(n,""),$("#url").val(o),t!=o&&$(document).trigger("livePreviewUpdate",!0),wpLink.close(),!1},maxAdmin.prototype.toggleSidebar=function(e){var t=e.target,o=$(t).parents(".block_sidebar");o.hasClass("active")?o.removeClass("active"):o.addClass("active")},maxAdmin.prototype.checkAllInputs=function(e){e.preventDefault;for(var t=document.getElementById("bulk-action-all").checked,o=document.querySelectorAll('input[name="button-id[]"]'),n=0;n<o.length;n++)o[n].checked=t};
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.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.8.1');
20
 
21
- define('MAXBUTTONS_RELEASE',"8 October 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.2
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.2');
20
 
21
+ define('MAXBUTTONS_RELEASE',"4 November 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.1
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,11 @@ Secondly, please use latin only characters for button name ( Basic settings) and
268
 
269
  == Changelog ==
270
 
 
 
 
 
 
271
  = 8.8.1 =
272
 
273
  * Fix - Moved external libraries to own namespace to prevent conflicts.
4
  Requires at least: 4.8
5
  Tested up to: 5.8
6
  Requires PHP: 7.0
7
+ Stable tag: 8.8.2
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
+
272
+ = 8.8.2 =
273
+
274
+ * Fix - Text-shadow buttons without color could trigger a crash in certain cases.
275
+
276
  = 8.8.1 =
277
 
278
  * Fix - Moved external libraries to own namespace to prevent conflicts.