WordPress Button Plugin MaxButtons - Version 6.11.1

Version Description

  • Removed holiday sale
Download this release

Release Info

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

Code changes from version 6.11 to 6.11.1

classes/admin-class.php CHANGED
@@ -46,7 +46,6 @@ class maxButtonsAdmin
46
 
47
  function getButtons($args = array())
48
  {
49
-
50
  $defaults = array(
51
  "status" => "publish",
52
  "orderby" => "id",
@@ -106,7 +105,7 @@ class maxButtonsAdmin
106
  $sql .= " LIMIT $offset, $limit ";
107
  }
108
 
109
- $sql = $this->wpdb->prepare($sql,$escape , ARRAY_A);
110
 
111
  $buttons = $this->wpdb->get_results($sql, ARRAY_A);
112
 
46
 
47
  function getButtons($args = array())
48
  {
 
49
  $defaults = array(
50
  "status" => "publish",
51
  "orderby" => "id",
105
  $sql .= " LIMIT $offset, $limit ";
106
  }
107
 
108
+ $sql = $this->wpdb->prepare($sql,$escape);
109
 
110
  $buttons = $this->wpdb->get_results($sql, ARRAY_A);
111
 
includes/maxbuttons-admin-helper.php CHANGED
@@ -24,17 +24,7 @@ class maxAdmin
24
  $version = self::getAdVersion();
25
  $url = self::getCheckoutURL();
26
 
27
- if (! isset($_GET['action'])): // overview page
28
- ?>
29
- <p><a href="http://maxfoundry.com/products/?ref=mbfree" target="_blank"><img src="<?php echo MB()->get_plugin_url() ?>images/max-foundry.png" alt="Max Foundry" title="Max Foundry" /></a> </p>
30
- <p style='color: red; font-size: 14px;'>Holiday sale on MaxButtons PRO <br>
31
- Just $10 with GETBUTTONLOVE10 code<br>
32
- <a href='https://maxbuttons.com/checkout/?edd_action=add_to_cart&download_id=24035&discount=GETBUTTONLOVE10'
33
- target="_blank" style="color:red">Click here</a>
34
- </p>
35
- <?php
36
- else:
37
- // below old - not holiday sale
38
  ?>
39
  <?php _e('Brought to you by', 'maxbuttons') ?>
40
  <a href="http://maxfoundry.com/products/?ref=mbfree" target="_blank"><img src="<?php echo MB()->get_plugin_url() ?>images/max-foundry.png" alt="Max Foundry" title="Max Foundry" /></a>
@@ -42,7 +32,7 @@ class maxAdmin
42
 
43
  <?php $twitlink = 'https://twitter.com/intent/user?original_referer=http%3A%2F%2Flocal.max%2Fwp-admin%2Fadmin.php%3Fpage%3Dmaxbuttons-controller&amp;ref_src=twsrc%5Etfw&amp;region=count_link&amp;screen_name=maxfoundry&amp;tw_p=followbutton';
44
  ?>
45
- <?php endif;
46
  return; ?>
47
  <!--
48
  <div class="twitter-follow">
24
  $version = self::getAdVersion();
25
  $url = self::getCheckoutURL();
26
 
27
+
 
 
 
 
 
 
 
 
 
 
28
  ?>
29
  <?php _e('Brought to you by', 'maxbuttons') ?>
30
  <a href="http://maxfoundry.com/products/?ref=mbfree" target="_blank"><img src="<?php echo MB()->get_plugin_url() ?>images/max-foundry.png" alt="Max Foundry" title="Max Foundry" /></a>
32
 
33
  <?php $twitlink = 'https://twitter.com/intent/user?original_referer=http%3A%2F%2Flocal.max%2Fwp-admin%2Fadmin.php%3Fpage%3Dmaxbuttons-controller&amp;ref_src=twsrc%5Etfw&amp;region=count_link&amp;screen_name=maxfoundry&amp;tw_p=followbutton';
34
  ?>
35
+ <?php
36
  return; ?>
37
  <!--
38
  <div class="twitter-follow">
includes/maxbuttons-button.php CHANGED
@@ -71,7 +71,7 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
71
  <span class='title'><?php _e("Removing button","maxbuttons"); ?></span>
72
  <span class="content"><p><?php _e("You are about to permanently remove this button. Are you sure?", "maxbuttons"); ?></p></span>
73
  <div class='controls'>
74
- <a href="<?php admin_url() ?>admin.php?page=maxbuttons-controller&action=delete&id=<?php echo $button_id ?>" class="button-primary big"><?php _e("Yes","maxbuttons"); ?></a>
75
  &nbsp;&nbsp;
76
  <a class="modal_close button-primary"><?php _e("No", "maxbuttons"); ?></a>
77
 
71
  <span class='title'><?php _e("Removing button","maxbuttons"); ?></span>
72
  <span class="content"><p><?php _e("You are about to permanently remove this button. Are you sure?", "maxbuttons"); ?></p></span>
73
  <div class='controls'>
74
+ <a href="<?php admin_url() ?>admin.php?page=maxbuttons-controller&action=delete&id=<?php echo $button_id ?>" data-id="<?php echo $button_id ?>" class="button-primary big" id='maxbutton-delete-yes'><?php _e("Yes","maxbuttons"); ?></a>
75
  &nbsp;&nbsp;
76
  <a class="modal_close button-primary"><?php _e("No", "maxbuttons"); ?></a>
77
 
includes/maxbuttons-delete.php CHANGED
@@ -1,13 +1,22 @@
1
  <?php
 
 
 
 
 
2
  if (isset($_GET['id']) && $_GET['id'] != '') {
 
3
  $button = new maxButton();
4
  $button_id = intval($_GET["id"]); // validation
5
 
6
- $button->delete(intval($_GET['id']));
7
-
8
- //maxbuttons_button_delete_permanently($_GET['id']);
9
  }
10
-
 
 
 
 
11
  ?>
12
  <script type="text/javascript">
13
  window.location = "<?php admin_url() ?>admin.php?page=maxbuttons-controller&action=list&status=trash&message=1delete";
1
  <?php
2
+ /*if (! check_admin_referer("button-edit","maxbuttons_button"))
3
+ {
4
+ exit("Request not valid");
5
+ }*/
6
+
7
  if (isset($_GET['id']) && $_GET['id'] != '') {
8
+
9
  $button = new maxButton();
10
  $button_id = intval($_GET["id"]); // validation
11
 
12
+ $button->delete($button_id);
13
+
 
14
  }
15
+ // not great.
16
+ $_GET['message'] = '1delete';
17
+ $_GET['status'] = 'trash';
18
+ include_once 'maxbuttons-list.php';
19
+ return;
20
  ?>
21
  <script type="text/javascript">
22
  window.location = "<?php admin_url() ?>admin.php?page=maxbuttons-controller&action=list&status=trash&message=1delete";
includes/maxbuttons-list.php CHANGED
@@ -177,11 +177,8 @@ $mbadmin->get_header(array("title" => $page_title, "title_action" => $action));
177
  </p>
178
  <?php
179
  do_action("mb-display-meta");
180
-
181
 
182
  ?>
183
-
184
-
185
  <form method="post">
186
  <input type="hidden" name="view" value="<?php echo $view ?>" />
187
  <?php wp_nonce_field("mb-list","mb-list-nonce"); ?>
@@ -244,8 +241,10 @@ $mbadmin->get_header(array("title" => $page_title, "title_action" => $action));
244
  </span>
245
  <span class='col col_shortcode'><?php _e('Shortcode', 'maxbuttons') ?></span>
246
  </div> <!-- heading -->
247
- <?php foreach ($published_buttons as $b):
248
- $id = $b["id"];
 
 
249
  if($view == 'trash')
250
  $button->set($id,'','trash');
251
  else
@@ -291,10 +290,12 @@ $mbadmin->get_header(array("title" => $page_title, "title_action" => $action));
291
  if ($name)
292
  echo "<span class='name'>$name</span> ";
293
  }
 
294
  ?>
295
  </div>
296
-
297
- <?php endif;
 
298
  ?>
299
  </span>
300
  <span class="col col_name"><a class="button-name" href="<?php admin_url() ?>admin.php?page=maxbuttons-controller&action=button&id=<?php echo $id ?>"><?php echo $button->getName() ?></a>
@@ -304,7 +305,9 @@ $mbadmin->get_header(array("title" => $page_title, "title_action" => $action));
304
  <span class="col col_shortcode"> [maxbutton id="<?php echo $id ?>"]<br />
305
  [maxbutton name="<?php echo $button->getName() ?>"]</span>
306
  </div>
307
- <?php endforeach; // buttons ?>
 
 
308
 
309
 
310
  </div> <!-- button-list -->
177
  </p>
178
  <?php
179
  do_action("mb-display-meta");
 
180
 
181
  ?>
 
 
182
  <form method="post">
183
  <input type="hidden" name="view" value="<?php echo $view ?>" />
184
  <?php wp_nonce_field("mb-list","mb-list-nonce"); ?>
241
  </span>
242
  <span class='col col_shortcode'><?php _e('Shortcode', 'maxbuttons') ?></span>
243
  </div> <!-- heading -->
244
+
245
+ <?php
246
+ foreach ($published_buttons as $b):
247
+ $id = $b['id'];
248
  if($view == 'trash')
249
  $button->set($id,'','trash');
250
  else
290
  if ($name)
291
  echo "<span class='name'>$name</span> ";
292
  }
293
+
294
  ?>
295
  </div>
296
+
297
+ <?php
298
+ endif;
299
  ?>
300
  </span>
301
  <span class="col col_name"><a class="button-name" href="<?php admin_url() ?>admin.php?page=maxbuttons-controller&action=button&id=<?php echo $id ?>"><?php echo $button->getName() ?></a>
305
  <span class="col col_shortcode"> [maxbutton id="<?php echo $id ?>"]<br />
306
  [maxbutton name="<?php echo $button->getName() ?>"]</span>
307
  </div>
308
+ <?php endforeach;
309
+
310
+ // buttons ?>
311
 
312
 
313
  </div> <!-- button-list -->
js/maxbuttons-admin.js CHANGED
@@ -100,6 +100,8 @@ maxAdmin.prototype.init = function () {
100
  // Expand shortcode tabs for more examples.
101
  $('.shortcode-expand').on('click', this.toggleShortcode);
102
 
 
 
103
 
104
  }; // INIT
105
 
@@ -164,6 +166,14 @@ maxAdmin.prototype.select_field = function(e)
164
  {
165
  $(e.target).select();
166
  }
 
 
 
 
 
 
 
 
167
 
168
  maxAdmin.prototype.toggle_preview = function (e)
169
  {
100
  // Expand shortcode tabs for more examples.
101
  $('.shortcode-expand').on('click', this.toggleShortcode);
102
 
103
+ // Delete Button dialog
104
+ $(document).on('click', '#delete-button-yes', $.proxy(this.delete_button,this) );
105
 
106
  }; // INIT
107
 
166
  {
167
  $(e.target).select();
168
  }
169
+
170
+ maxAdmin.prototype.delete_button = function (e)
171
+ {
172
+ this.form_updated = false;
173
+ var button_id = $(e.target).data('id');
174
+ //window.location =
175
+ //<?php admin_url() ?>admin.php?page=maxbuttons-controller&action=delete&id=<?php echo $button_id ?>
176
+ }
177
 
178
  maxAdmin.prototype.toggle_preview = function (e)
179
  {
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){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())}});
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),$(document).on("click","#delete-button-yes",$.proxy(this.delete_button,this)))},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.delete_button=function(t){this.form_updated=!1;$(t.target).data("id")},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.11
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.11');
49
- define('MAXBUTTONS_RELEASE',"19 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.11.1
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.11.1');
49
+ define('MAXBUTTONS_RELEASE',"23 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.11
7
 
8
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons and social share icons.
9
 
@@ -228,6 +228,10 @@ This depends on the slider plugin you are using. Most of the well-known ones are
228
 
229
  == Changelog ==
230
 
 
 
 
 
231
  = 6.11 =
232
 
233
  * Shortcode options in add button dialog
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.11.1
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.11.1 =
232
+
233
+ * Removed holiday sale
234
+
235
  = 6.11 =
236
 
237
  * Shortcode options in add button dialog