WordPress Button Plugin MaxButtons - Version 6.20.1

Version Description

  • Fix - warnings when using Origins Sitebuilder
Download this release

Release Info

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

Code changes from version 6.19.1 to 6.20.1

Files changed (69) hide show
  1. assets/css/style.css +1 -1
  2. assets/integrations/shortcake/class-field-maxbutton.php +2 -1
  3. assets/integrations/shortcake/shortcake.php +6 -4
  4. assets/integrations/siteorigins_builder/sitebuilder.php +5 -4
  5. assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php +2 -0
  6. assets/libraries/scssphp/scss.inc.php +1 -0
  7. assets/libraries/simple-template/simple_template.php +14 -9
  8. assets/scss/_editor.scss +3 -3
  9. assets/scss/_elements.scss +3 -3
  10. blocks/advanced.php +1 -2
  11. blocks/basic.php +2 -4
  12. blocks/border.php +2 -3
  13. blocks/color.php +1 -2
  14. blocks/container.php +2 -2
  15. blocks/dimension.php +1 -0
  16. blocks/gradient.php +1 -3
  17. blocks/icon.php +3 -0
  18. blocks/meta.php +3 -0
  19. blocks/responsive.php +1 -4
  20. blocks/text.php +1 -3
  21. blocks/tpl/button.tpl +1 -1
  22. blocks/tpl/color.tpl +2 -2
  23. blocks/tpl/end.tpl +1 -1
  24. blocks/tpl/option_select.tpl +1 -1
  25. blocks/tpl/start.tpl +1 -0
  26. classes/admin-class.php +1 -0
  27. classes/block.php +8 -7
  28. classes/blocks.php +88 -5
  29. classes/button.php +108 -113
  30. classes/buttons.php +1 -1
  31. classes/collection-block.php +1 -0
  32. classes/collection.php +5 -5
  33. classes/collections.php +22 -7
  34. classes/field.php +12 -5
  35. classes/groups.php +0 -35
  36. classes/installation.php +7 -2
  37. classes/integrations.php +2 -4
  38. classes/max-utils.php +20 -6
  39. classes/maxCSSParser.php +9 -4
  40. classes/maxbuttons-class.php +15 -14
  41. classes/pack.php +1 -0
  42. classes/social-networks.php +2 -0
  43. collections/basic-block.php +1 -0
  44. collections/basic-collection.php +1 -0
  45. collections/layout-block.php +1 -0
  46. collections/picker-block.php +3 -2
  47. collections/preview-block.php +1 -0
  48. collections/social-block.php +5 -1
  49. collections/social-collection.php +1 -0
  50. includes/admin_footer.php +1 -1
  51. includes/admin_header.php +1 -0
  52. includes/button_editor_popup.php +0 -56
  53. includes/maxbuttons-admin-helper.php +8 -9
  54. includes/maxbuttons-button.php +2 -1
  55. includes/maxbuttons-collection-edit.php +3 -0
  56. includes/maxbuttons-collection-list.php +8 -1
  57. includes/maxbuttons-collections.php +2 -0
  58. includes/maxbuttons-controller.php +1 -0
  59. includes/maxbuttons-list-trash.php +3 -0
  60. includes/maxbuttons-list.php +3 -0
  61. includes/maxbuttons-no-simplexml.php +3 -0
  62. includes/maxbuttons-pro.php +2 -0
  63. includes/maxbuttons-settings.php +5 -3
  64. includes/maxbuttons-support.php +4 -1
  65. js/maxajax.js +9 -13
  66. js/maxmodal.js +14 -3
  67. js/min/maxmodal.js +1 -1
  68. maxbuttons.php +19 -17
  69. readme.txt +14 -2
assets/css/style.css CHANGED
@@ -1 +1 @@
1
- .mb_colorpicker{z-index:200}.ads .button-primary{display:block;margin:0 auto 20px auto;width:210px;text-align:center;overflow:visible}#maxbuttons{display:inline-block;width:100%}#maxbuttons .message,#maxbuttons .mb-message{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:10px;margin:10px 0px 20px 0px;clear:both}#maxbuttons .main{position:relative;z-index:500;margin-top:15px;width:72%;float:left}#maxbuttons .mb-message.error{font-weight:700}#maxbuttons .mb-message.shortcode,#maxbuttons .mb-message.mb-notice{border:solid 1px #e6db55;background-color:#ffffe0}#maxbuttons .button-bar,#maxbuttons .form-actions,#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1){margin:15px 0;padding:10px;background:#fbfbfb none repeat scroll 0 0;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);min-height:28px}#maxbuttons h1>span{vertical-align:top;float:left}@media (max-width: 1024px){#maxbuttons h1>span{float:none}}#maxbuttons .logo{font-weight:400;font-size:13px;overflow:hidden;text-align:center}@media (max-width: 1024px){#maxbuttons .logo{text-align:left;margin-top:15px}}#maxbuttons .logo img{vertical-align:middle;padding-left:5px;padding-right:5px}#maxbuttons .logo .fb-like{margin-top:5px;height:20px;padding:0;margin-left:180px;overflow:hidden}#maxbuttons .logo .fb-like span{vertical-align:top !important}#maxbuttons .dummy-heading{display:none}@media screen and (max-width: 960px){#maxbuttons .main{width:100%}}#maxbuttons .tablenav .input-paging{width:55px}#maxbuttons .ads ul li{margin-bottom:4px}#maxbuttons .preview-buttons{background-color:#fff;border:1px solid #dfdfdf;overflow:hidden}#maxbuttons .preview-buttons .heading{width:100%;clear:both;display:inline-block;border-bottom:1px solid #dfdfdf}#maxbuttons .preview-buttons .heading>span{display:inline-block;font-weight:700;font-size:14px;float:left}#maxbuttons .preview-buttons .button-row{width:100%;clear:both;display:inline-block;border-bottom:1px solid #dfdfdf}#maxbuttons .preview-buttons .button-row>span{display:inline-block;font-size:13px;float:left;overflow:hidden}#maxbuttons .preview-buttons .button-row .actions{margin:10px 0;padding:10px 0px 10px 8px;display:inline-block;z-index:11;width:50%;background-color:#fff;position:relative}#maxbuttons .preview-buttons .col{padding:10px 0 10px 1%}#maxbuttons .preview-buttons .col_check{width:20px}#maxbuttons .preview-buttons .col_button{width:60%;overflow:hidden}@media (max-width: 780px){#maxbuttons .preview-buttons .col_button{width:70%;margin-right:5%}}#maxbuttons .preview-buttons .col_name{width:15%}@media (max-width: 780px){#maxbuttons .preview-buttons .col_name{display:none !important}}#maxbuttons .preview-buttons .col_shortcode{width:15%;padding-right:0}#maxbuttons p.status a{text-decoration:none}#maxbuttons p.status span.count{color:#999999}#maxbuttons .button-list{margin-top:10px}#maxbuttons .button-list p{font-size:13px}#maxbuttons .button-list a{text-decoration:none}#maxbuttons .button-list a.button-name{font-weight:bold}#maxbuttons .button-list .shortcode-container{margin:10px 0px 10px 2px}#maxbuttons .button-list .collection_notice{text-align:right;margin:10px 5px 0 0;padding-top:10px;float:right}#maxbuttons .shortcode-container .mb-container{margin:0 !important;float:none !important;max-width:100% !important}#maxbuttons .shortcode-container .mb-center{text-align:left !important}#maxbuttons .pagination-links a.disabled{color:#aaa;cursor:default}#maxbuttons .pagination-links a.disabled:hover{background:#e4e4e4 none repeat scroll 0 0;cursor:default;border:1px solid #d2d2d2}#maxbuttons .pagination{width:100%;display:inline-block;margin:15px 0 5px}#maxbuttons .pagination li{float:left;margin-right:5px}#maxbuttons .pagination li a,#maxbuttons .pagination li span{background:#ccc;vertical-align:middle;padding:4px 10px 8px;height:15px;display:inline-block;border:1px solid #eee;text-decoration:none;font-size:14px;font-weight:bold}#maxbuttons.maxbuttons-controller-edit .main,#maxbuttons.maxbuttons-controller-button .main{width:auto;max-width:1200px}#maxbuttons .option-container{margin-bottom:20px;border:solid 1px #cccccc;border-radius:3px 3px 3px 3px;-webkit-border-radius:3px 3px 3px 3px;background-color:#fff}#maxbuttons .option-container .title{font-size:18px;padding:9px 8px 9px 10px;text-align:left;text-shadow:0px 1px 0px #ffffff;position:relative}#maxbuttons .option-container .section-title{padding:15px;margin-top:10px;font-weight:700;font-size:16px}#maxbuttons .option-container .section-title{background-color:#fff}#maxbuttons .option-container .option-list{display:inline-block}#maxbuttons .option-container .option-list:after{clear:both}#maxbuttons .option-container .option-list .help{float:right;margin-top:5px}#maxbuttons .option-container .help{position:relative;width:18px;height:18px;font-size:18px;margin-left:10px}#maxbuttons .option-container .help span{font-family:"Open Sans",sans-serif;font-size:12px;background-color:#fff;color:#000;position:absolute;display:none;padding:10px 5px;top:-7px;left:25px;min-width:150px;border-radius:5px;text-align:center;z-index:1000;border:1px solid #ccc;line-height:15px}#maxbuttons .option-container .help:hover span{display:block}#maxbuttons .option-container>.inside{padding:10px 15px 10px 15px;border-top:solid 1px #cccccc;background-color:#ffffff}#maxbuttons .option-container>.inside .option,#maxbuttons .option-container>.inside .option-design{margin-bottom:10px;display:block;position:relative}#maxbuttons .option-container>.inside .option .label,#maxbuttons .option-container>.inside .option>label,#maxbuttons .option-container>.inside .option-design .label,#maxbuttons .option-container>.inside .option-design>label{display:inline-block;font-weight:bold;padding-left:3px;padding-top:5px;width:145px;vertical-align:top;cursor:default;min-height:25px}#maxbuttons .option-container>.inside .option .label[for],#maxbuttons .option-container>.inside .option>label[for],#maxbuttons .option-container>.inside .option-design .label[for],#maxbuttons .option-container>.inside .option-design>label[for]{cursor:pointer}@media (max-width: 780px){#maxbuttons .option-container>.inside .option .label,#maxbuttons .option-container>.inside .option>label,#maxbuttons .option-container>.inside .option-design .label,#maxbuttons .option-container>.inside .option-design>label{font-size:14px}}#maxbuttons .option-container>.inside .option:after,#maxbuttons .option-container>.inside .option:before,#maxbuttons .option-container>.inside .option-design:after,#maxbuttons .option-container>.inside .option-design:before{clear:both}#maxbuttons .option-container>.inside .option label{margin-top:2px}#maxbuttons .option-container>.inside .option label.color{margin-top:5px}#maxbuttons .option-container>.inside .option label:nth-of-type(2){margin-left:30px;width:115px}#maxbuttons .option-container>.inside .option .control-group{display:inline-block}#maxbuttons .option-container>.inside .option .rotate-left{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(-45), M12=-sin(-45), M21=sin(-45), M22=cos(-45));-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(-45), M12=-sin(-45), M21=sin(-45), M22=cos(-45))";zoom:1}#maxbuttons .option-container>.inside .option .rotate-right{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(45), M12=-sin(45), M21=sin(45), M22=cos(45));-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(45), M12=-sin(45), M21=sin(45), M22=cos(45))";zoom:1}#maxbuttons .option-design{margin-bottom:10px}#maxbuttons .option-design .input td div.cell-label{padding:1px 10px 0px 5px;font-weight:bold;border-bottom:solid 1px #d1d1d1;width:180px;font-size:13px;height:30px}#maxbuttons .option-design .default-other{font-size:13px}#maxbuttons .option p.note,#maxbuttons .option-design p.note{font-style:italic;display:inline-block;clear:both;color:#808080;padding-left:3px;margin-top:10px;margin-bottom:5px;margin-left:0;display:block}#maxbuttons .mb-message.shortcode .expanded,#maxbuttons .mb-message.mb-notice .expanded{display:none}#maxbuttons .mb-message.shortcode .expanded .example strong,#maxbuttons .mb-message.mb-notice .expanded .example strong{width:300px;display:inline-block}#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{float:right;cursor:pointer}@media (max-width: 1024px){#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{float:none;text-align:left;margin:10px 0;display:block}}#maxbuttons .manual-box{float:right;margin:3px 15px;top:0;right:0}#maxbuttons .manual-box a{text-align:center;width:100%;background:#e0e0e0 none repeat scroll 0 0;font-size:13px;font-weight:600;margin-left:4px;margin-top:5px;padding:4px 8px;position:relative;text-decoration:none;text-shadow:none}#maxbuttons .manual-entry{display:none;position:absolute;border:1px solid #000;background:#fff;width:45%;right:25px;z-index:199;box-sizing:border-box;padding-bottom:20px}#maxbuttons .manual-entry h3{font-size:18px;width:calc(100%);box-sizing:border-box;padding:10px 0;border-bottom:1px solid #ccc;text-align:center;margin:0;padding-right:35px;position:relative}#maxbuttons .manual-entry h3 span{box-sizing:border-box;cursor:pointer;width:35px;height:100%;font-size:25px;display:inline-block;position:absolute;right:5px;top:0;padding-top:8px}#maxbuttons .manual-entry h4,#maxbuttons .manual-entry p,#maxbuttons .manual-entry ol,#maxbuttons .manual-entry ul{padding:0 15px}#maxbuttons .manual-entry h4{font-size:16px}#maxbuttons .manual-entry p{font-size:13px}#maxbuttons .output{position:fixed;top:45px;right:20px;background-color:#ffffff;border:solid 1px #414141;box-shadow:0px 0px 6px #808080;z-index:99;width:auto;min-width:300px}@media (max-width: 780px){#maxbuttons .output{-webkit-box-shadow:0 0 0 0;-moz-box-shadow:0 0 0 0;box-shadow:0 0 0 0;top:0;left:0;right:0;position:relative;margin-bottom:15px;border-color:#ccc}}#maxbuttons .output .header{color:#222222;background-color:#ffffff;border-bottom:solid 1px #cccccc;font-family:"Open Sans", sans-serif;font-size:16px;font-weight:bold;padding:8px 0px 8px 10px;cursor:move;position:relative}#maxbuttons .output .header .preview-toggle{float:right;font-size:30px;width:30px;position:absolute;top:3px;right:0}#maxbuttons .output .inner{padding:5px}#maxbuttons .output .inner p{padding:5px 0 5px 5px}#maxbuttons .output .input.color{float:left;position:relative;margin-top:5px}#maxbuttons .output .input.color .wp-picker-container.wp-picker-active{padding:30px;border:1px solid #ccc;background-color:#fff;position:absolute;bottom:-15px;left:-270px;z-index:102;-webkit-box-shadow:4px 1px 5px #ccc;-moz-box-shadow:4px 1px 5px #ccc;box-shadow:4px 1px 5px #ccc}#maxbuttons .output .note{float:left;margin:8px 0px 0px 10px}#maxbuttons .output .result{padding:20px 5px}#maxbuttons .output .result p{padding:5px 0px 5px 0px;margin:0}#maxbuttons .output .result.preview-border-box>*{box-sizing:border-box}#maxbuttons .conditional-option{display:none}#maxbuttons .media_query{width:640px;margin:0 20px 15px 0;border:1px solid #ccc;padding:10px 15px;display:inline-block;clear:both;position:relative}#maxbuttons .media_query .removebutton{position:absolute;right:10px;top:10px;cursor:pointer;z-index:100;padding:10px 5px}#maxbuttons .media_query input:after{clear:both}#maxbuttons .media_query .label{clear:both;margin-bottom:15px}#maxbuttons .media_query label.title{padding:0;font-size:20px}#maxbuttons .media_query .custom.hidden{display:none}#maxbuttons .media_query .option.custom label:nth-of-type(2){margin-left:95px}#maxbuttons .media_query .description{padding:15px 0px;text-align:left}#maxbuttons .media_query select{width:60px}#maxbuttons .media_query .input input{margin-top:0px;padding-top:2px}#maxbuttons .media_queries_options .new-query{margin-top:25px}#maxbuttons .media_queries_options .new-query select{width:auto}#maxbuttons .media_option_prot,#maxbuttons #media_desc{display:none}#maxbuttons .copy-warning{width:400px;margin:0 auto;position:relative;line-height:1.1}#maxbuttons .copy-warning:before{content:"\f534";font-size:40px;color:#ff0000;width:35px;height:35px;font-family:"Dashicons";position:absolute;left:20px;top:40%;margin-top:-14px}#maxbuttons .copy-warning .example{margin-bottom:5px}#maxbuttons .form-actions a{margin-right:10px}#maxbuttons select{width:150px}#maxbuttons select.small{width:auto}#maxbuttons .input{display:inline-block;margin-right:15px;min-height:35px}#maxbuttons .input img{vertical-align:middle}#maxbuttons .input.color{min-width:50px}#maxbuttons .input.checkbox input{margin-top:0}#maxbuttons .input.checkbox label{line-height:16px;margin-top:0 !important}#maxbuttons input[type='text']{width:450px}@media (max-width: 780px){#maxbuttons input[type='text']{width:350px}}#maxbuttons input[type='text'].tiny{width:35px;vertical-align:middle}#maxbuttons input[type='text'].small{width:50px}#maxbuttons input[type='text'].medium{width:150px}#maxbuttons input[type='text'].tiny-nopad{width:35px}#maxbuttons input[type='number']{vertical-align:middle}#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:55px}@media (max-width: 780px){#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:60px}}#maxbuttons input[type='number'].small{width:70px}@media (max-width: 780px){#maxbuttons input[type='number'].small{width:75px}}#maxbuttons textarea{width:450px;height:80px}#maxbuttons .option-container .inside .option label.color:nth-of-type(2){margin-left:37px}#maxbuttons .option-container .inside .option.url{margin-bottom:0}#maxbuttons .option-container .inside .option.url_options{margin:5px 0 10px}#maxbuttons .option-container .inside .option.url_options .nofollow{margin-left:35px}#maxbuttons .option-container .inside .option.url_options label,#maxbuttons .option-container .inside .option.rel_options label{font-weight:400}#maxbuttons .option-container .inside .option.font .checkbox{margin-right:2px}#maxbuttons .option-container .inside .option.font .radio{margin-right:0}#maxbuttons .option-container .inside .option.font .input.font{margin-right:2px}#maxbuttons .option-container .inside .option.font .input.font_size{margin-right:0}#maxbuttons .option-container .inside .option.font .input.font_size:after{display:block}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font{display:inline-block}#maxbuttons .option-container .inside .option.font:after{clear:both}#maxbuttons .option-container .inside .option.font>*{float:left}}#maxbuttons .option-container .inside .option.font .control-group.font_weight{margin-left:28px}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font .control-group.font_weight{clear:left;margin-left:148px;margin-top:10px}}#maxbuttons .option-container .inside .option.font .control-group.text_align{margin-left:48px}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font .control-group.text_align{margin-left:20px;margin-top:10px}}#maxbuttons .option-container .inside .option.padding_top .input,#maxbuttons .option-container .inside .option.container_margin_top .input{margin-right:30px}#maxbuttons .option-container .inside .option.padding_top .input:last-of-type,#maxbuttons .option-container .inside .option.container_margin_top .input:last-of-type{margin-right:0}@media (max-width: 780px){#maxbuttons .option-container .inside .option.padding_top .input,#maxbuttons .option-container .inside .option.container_margin_top .input{margin-right:15px}}#maxbuttons .option-container .inside .option.text_color label{padding-top:10px}#maxbuttons .option-container .inside .option.text_color label:nth-of-type(2){margin-left:51px}#maxbuttons .option-container .inside .option.description label{padding-top:35px}#maxbuttons .option-container .inside .option .radius-wrap{position:relative;margin-left:45px;display:inline-block}#maxbuttons .option-container .inside .option.radius .label:first-child{width:100px;float:left}#maxbuttons .option-container .inside .option.radius .bottom,#maxbuttons .option-container .inside .option.radius .top{position:relative}#maxbuttons .option-container .inside .option.radius .bottom .input,#maxbuttons .option-container .inside .option.radius .top .input{margin-right:0;margin-left:0}#maxbuttons .option-container .inside .option.radius .bottom .dashicons:nth-child(3),#maxbuttons .option-container .inside .option.radius .top .dashicons:nth-child(3){margin-right:10px}#maxbuttons .option-container .inside .option.radius .top{margin-bottom:10px}#maxbuttons .option-container .inside .option.radius label{display:inline-block;font-weight:700;width:90px;margin-left:5px;cursor:default}#maxbuttons .option-container .inside .option.radius .dashicons{font-size:35px;height:35px;width:35px;color:#ccc}#maxbuttons .option-container .inside .option.radius .top .dashicons{margin-top:-5px}#maxbuttons .option-container .inside .option.radius .bottom .dashicons{margin-top:5px}#maxbuttons .option-container .inside .option.radius #radius_toggle{position:absolute;left:46%;top:25px;font-size:30px;cursor:pointer}#maxbuttons .option-container .inside .option.gradient_head .label:nth-child(even){width:120px}#maxbuttons .option-container .inside .option .gradient_end_color,#maxbuttons .option-container .inside .option .gradient_end_color_hover{margin-left:58px}#maxbuttons .default{display:inline-block;padding-left:10px;padding-top:4px;font-style:italic;color:#808080}#maxbuttons .default .other{padding-left:40px;padding-top:8px}#maxbuttons .mb-button{width:38px;height:38px;background-color:#eceded;display:inline-block;margin-right:6px;cursor:pointer;display:none}#maxbuttons .mb-button span{text-align:center;padding:9px 0;width:100%;line-height:20px}#maxbuttons .check_button{display:none}#maxbuttons .check_button+label{background-position:center center;background-repeat:no-repeat;background-color:#fff;display:inline-block;border:1px solid #ddd;font_weight:normal;padding:4px}@media (max-width: 780px){#maxbuttons .check_button+label{padding:10px}}#maxbuttons .check_button.text+label{padding:5px}#maxbuttons .check_button.icon+label i{width:20px;height:20px;color:#545454}#maxbuttons .check_button.icon+label i:focus{outline:none}#maxbuttons .check_button:checked+label{background:#ebebeb none repeat scroll 0 0;border-color:#999999;box-shadow:0 2px 5px -3px rgba(0,0,0,0.3) inset}#maxbuttons .option .switch_label{padding-top:2px !important;margin:0 !important}#maxbuttons .switch_button{margin-left:-5px}#maxbuttons .switch_button label{padding:8px 5px}#maxbuttons .switch_button label:focus{outline:none}#maxbuttons .switch_button input{display:none}#maxbuttons .switch_button input:checked ~ .the_switch{background:#6fbeb5}#maxbuttons .switch_button input:checked ~ .the_switch:after{left:26px;background:#179588}#maxbuttons .switch_button input::disabled ~ .the_switch{background:#d5d5d5;pointer-events:none}#maxbuttons .switch_button input:disabled ~ .the_switch:after{background:#bcbdbc}#maxbuttons .switch_button .the_switch{position:relative;display:inline-block;height:15px;width:50px;background:#898989;border-radius:100px;cursor:pointer;transition:all 0.3s ease}#maxbuttons .switch_button .the_switch:after{position:absolute;left:-2px;top:-3px;display:block;width:24px;height:24px;border-radius:100px;background:#aaa;box-shadow:0px 3px 3px rgba(0,0,0,0.05);content:'';transition:all 0.2s ease}#maxbuttons .switch_button .the_switch:active:after{transform:scale(0.9, 0.85)}#maxbuttons .switch_button .the_switch:focus{outline:none}#maxbuttons .input.color{margin-top:5px;position:relative}#maxbuttons .input.color .wp-picker-clear{display:none}#maxbuttons .input.color input[type="text"]{width:75px;line-height:22px}#maxbuttons .input.color .wp-color-picker{width:inherit}#maxbuttons .input.color .wp-color-result{-webkit-box-shadow:-1px 1px 2px #999;-moz-box-shadow:-1px 1px 2px #999;box-shadow:-1px 1px 2px #999;height:30px;border:0;font-size:900px}#maxbuttons .input.color .wp-color-result:after{font-size:12px;line-height:30px;display:none}#maxbuttons .input.color .wp-color-result:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 5px rgba(30,140,190,0.8);-moz-box-shadow:0 0 5px rgba(30,140,190,0.8);box-shadow:0 0 5px rgba(30,140,190,0.8)}#maxbuttons .input.color .wp-picker-active+.arrows{display:inline-block}#maxbuttons .input.color .arrows{position:absolute;display:none;top:0;margin-top:40%}#maxbuttons .input.color .arrows.right{right:-45px}#maxbuttons .input.color .arrows.left{left:-35px}#maxbuttons .input.color .arrows .arrow-left,#maxbuttons .input.color .arrows .arrow-right{width:0;height:0;font-size:0;line-height:0;vertical-align:bottom;cursor:pointer}#maxbuttons .input.color .arrows .arrow-left{border-top:30px solid transparent;border-bottom:30px solid transparent;border-right:20px solid #ccc}#maxbuttons .input.color .arrows .arrow-right{border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:20px solid #ccc;margin-top:35px}#maxbuttons .input.color .arrows .left,#maxbuttons .input.color .arrows .right{display:inline-block;float:left;clear:both;width:35px;height:45px}#maxbuttons .input.color .arrows .left{margin-top:15px}#maxbuttons .rss-feed{overflow:hidden;clear:both;margin-bottom:20px}#maxbuttons .rss-feed li{width:32%;margin-right:2%;float:left;margin-bottom:2%}#maxbuttons .rss-feed li:nth-child(3n){margin-right:0}#maxbuttons .rss-feed li a{min-height:110px;max-height:110px;overflow:hidden;background:#fff;width:100%;display:block;padding:10px;box-sizing:border-box;border:1px solid #bbb;text-decoration:none;transition:all 200ms;border-radius:2px}#maxbuttons .rss-feed li a:hover{background:#f9f9f9}#maxbuttons .rss-feed li a:hover span{color:#0074a2}#maxbuttons .rss-feed li a span{color:#2ea2cc;font-weight:bold;font-size:1.2em;line-height:1.5em}#maxbuttons .system_info{width:90%;background-color:#fff;border:1px solid #000;padding:15px}#maxbuttons .system_info .info{margin:5px 0}#maxbuttons .system_info .info label{width:250px;display:inline-block;clear:both}#maxbuttons.maxbuttons-settings .option-container .inside .option-design{margin:20px 0}#maxbuttons.maxbuttons-settings .option-container .inside .option-design label{line-height:14px;height:40px;vertical-align:top;width:200px}#maxbuttons h2.tabs{margin:1em 0;min-height:35px}#maxbuttons h2.sub-tabs,#maxbuttons h2.submit-tab{list-style:none;clear:both;margin-bottom:0}#maxbuttons h2.sub-tabs a,#maxbuttons h2.submit-tab a{font-weight:400;font-size:14px;cursor:pointer}#maxbuttons h2.sub-tabs a .dashicons,#maxbuttons h2.submit-tab a .dashicons{margin-right:10px;line-height:24px}#maxbuttons h2.sub-tabs .save-indicator,#maxbuttons h2.submit-tab .save-indicator{float:right;font-size:25px;display:none;margin-right:10px}#maxbuttons h2.sub-tabs .save-indicator.dashicons-warning,#maxbuttons h2.submit-tab .save-indicator.dashicons-warning{color:#ff0000}#maxbuttons h2.sub-tabs .save-indicator.dashicons-yes,#maxbuttons h2.submit-tab .save-indicator.dashicons-yes{color:#00ff00}#maxbuttons.mb_tabs_active .mb_tab{border:0px;background:none;border-radius:0 0 0 0;-webkit-border-radius:0 0 0 0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) button{top:0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) .right{float:right}#maxbuttons.mb_tabs_active .mb_tab>.inside{border:1px solid #e5e5e5}#maxbuttons.maxbuttons-collections-edit .main{width:100%;max-width:none}#maxbuttons .collection-addnew{display:inline-block}@media (max-width: 780px){#maxbuttons .collection-addnew{margin-left:5px}}#maxbuttons .collection_list .collection{position:relative;background-color:#fff;padding:15px;border-radius:15px;margin:15px 0}#maxbuttons .collection_list .collection h3{display:inline-block;width:90%;margin-top:0;font-size:18px;line-height:20px}#maxbuttons .collection_list .collection h3 a{color:#000;font-size:25px;text-decoration:none}#maxbuttons .collection_list .collection h3 a:hover{text-decoration:underline}#maxbuttons .collection_list .collection h3 .dashicons{color:#ccc;margin-left:15px}#maxbuttons .collection_list .collection h3 .button-count{font-weight:400;font-size:15px;margin-left:15px;vertical-align:top}#maxbuttons .collection_list .collection .collection_remove{top:10px;right:15px;font-size:25px;font-weight:400;position:absolute;cursor:pointer}#maxbuttons .collection_list .collection.welcome p{font-size:14px;line-height:22px}#maxbuttons .collection_list .collection-container{position:relative;width:100%;display:inline-block;clear:both}#maxbuttons .collection_list .collection-container .maxcollection{position:static !important}#maxbuttons .inside .preview_collection.option label{display:inline-block;float:none;font-size:25px;width:100%}#maxbuttons .mb_collection_selection{display:inline-block;min-height:300px;margin:25px 0}#maxbuttons .mb_collection_selection .sortable .item{margin-bottom:25px;position:relative;padding-left:30px;min-height:45px;clear:both}#maxbuttons .mb_collection_selection .sortable .item .button-remove{margin-top:5px;position:absolute;left:20px;top:-15px;border:1px solid #000;border-radius:11px;width:20px;height:20px;background-color:rgba(0,0,0,0.5)}#maxbuttons .mb_collection_selection .sortable .item .button-remove:hover{cursor:pointer}#maxbuttons .mb_collection_selection .sortable .item .button-remove span{color:#fff;font-size:16px;padding-top:2px;overflow:hidden}#maxbuttons .mb_collection_selection .sortable-placeholder{border:3px dashed #aaa;height:45px;width:344px;background:#ccc}#maxbuttons .mb_collection_selection .button_data{display:none}#maxbuttons .mb-social-options{float:right;width:45%;border:1px solid #000;height:100%}#maxbuttons .mb-buttons-selection{float:left;width:45%;overflow:hidden;border:1px solid #000}#maxbuttons .mb-preview-window{position:fixed;top:40%;right:20px;width:30%;max-width:45%;max-height:90vh;background-color:rgba(255,255,255,0.7);border:1px solid #000;z-index:500 !important;overflow:hidden;display:none}@media (max-width: 780px){#maxbuttons .mb-preview-window{position:relative;left:0;top:0;bottom:0;right:0;width:100%;height:auto;display:inline-block;border-color:#ccc}}#maxbuttons .mb-preview-window .mb-preview-wrapper{position:relative;display:inline-block;width:100%}#maxbuttons .sub-tabs .preview-on{background-color:#00b9eb;color:#fff}#maxbuttons .sub-tabs .preview-on::before{line-height:24px}#maxbuttons #picker-back{top:0;left:0;right:0;bottom:0;background-color:#000;z-index:110000;position:fixed;opacity:0.7;display:none}#maxbuttons #picker-modal,#maxbuttons .max-modal.picker-modal{display:none;width:calc(100% - 60px);min-height:300px;top:30px;bottom:30px;left:30px;right:30px;z-index:160000}#maxbuttons #picker-modal .modal_header,#maxbuttons .max-modal.picker-modal .modal_header{height:15px;display:block;overflow:hidden;top:0;left:0;bottom:0;right:0;border:0}#maxbuttons #picker-modal .picker-packages,#maxbuttons .max-modal.picker-modal .picker-packages{top:31px;left:0;width:205px;bottom:0;background-color:#f3f3f3;position:absolute;border-right:1px solid #ccc;overflow-x:hidden;overflow-y:auto}#maxbuttons #picker-modal .picker-packages ul,#maxbuttons .max-modal.picker-modal .picker-packages ul{margin-top:4px}#maxbuttons #picker-modal .picker-packages li a,#maxbuttons .max-modal.picker-modal .picker-packages li a{padding:6px 20px;display:block;color:#0073aa;text-decoration:none;font-size:13px;line-height:16px}#maxbuttons #picker-modal .picker-packages li a:hover,#maxbuttons .max-modal.picker-modal .picker-packages li a:hover{background:rgba(0,0,0,0.04) none repeat scroll 0 0;color:#21759b}#maxbuttons #picker-modal .picker-packages li a.pack-active,#maxbuttons .max-modal.picker-modal .picker-packages li a.pack-active{font-weight:700;color:#000}#maxbuttons #picker-modal .picker-main,#maxbuttons .max-modal.picker-modal .picker-main{left:206px;top:31px;right:0;bottom:60px;position:absolute;border-bottom:1px solid #dddddd;overflow-y:scroll;background-color:#fff}#maxbuttons #picker-modal .picker-main .screen,#maxbuttons .max-modal.picker-modal .picker-main .screen{margin:5px 5px}#maxbuttons #picker-modal .picker-main .screen .tablenav-pages,#maxbuttons .max-modal.picker-modal .picker-main .screen .tablenav-pages{float:none;margin-left:1%}#maxbuttons #picker-modal .picker-main .item,#maxbuttons .max-modal.picker-modal .picker-main .item{padding:5px;margin:5px 0 5px 1%;border:1px solid #000;width:16%;height:auto;float:left;text-align:center;position:relative;background-color:#eee;border:1px solid #b4b9be;display:inline-block}#maxbuttons #picker-modal .picker-main .item .button_data,#maxbuttons .max-modal.picker-modal .picker-main .item .button_data{display:none}#maxbuttons #picker-modal .picker-main .item .button_name,#maxbuttons .max-modal.picker-modal .picker-main .item .button_name{clear:left;display:block;margin-top:15px;font-size:9px}#maxbuttons #picker-modal .picker-main .item .button-selected,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected{position:absolute;font-size:20px;top:-10px;right:-10px;width:24px;height:24px;color:#fff;background-color:#1e8cbe;z-index:100;border-radius:12px}#maxbuttons #picker-modal .picker-main .item .button-selected span,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected span{padding-top:2px}#maxbuttons #picker-modal .picker-inselection,#maxbuttons .max-modal.picker-modal .picker-inselection{height:60px;display:block;position:absolute;bottom:0;right:0;left:206px;overflow:hidden}#maxbuttons #picker-modal .picker-inselection .info,#maxbuttons .max-modal.picker-modal .picker-inselection .info{height:60px;float:left;display:inline-block;padding:10px 15px;display:none}#maxbuttons #picker-modal .picker-inselection .info .clear-selection,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection{color:#ff0000;display:block;padding:0}#maxbuttons #picker-modal .picker-inselection .info .clear-selection:hover,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection:hover{background-color:#ff0000;color:#fff}#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:inline-block;position:absolute;overflow:hidden;padding-top:5px;height:100%;left:130px;right:180px}@media (max-width: 780px){#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:none}}#maxbuttons #picker-modal .picker-inselection .items .item,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item{height:40px;width:40px;overflow:hidden;float:left;margin:3px;position:relative}#maxbuttons #picker-modal .picker-inselection .items .item .button_name,#maxbuttons #picker-modal .picker-inselection .items .item .button_data,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_name,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_data{display:none}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove{display:none;position:absolute;width:30px;height:30px;left:2px;border-radius:15px;top:2px;background-color:rgba(0,0,0,0.5)}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove span,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove span{font-size:20px;color:#fff;padding-left:5px;padding-top:5px}#maxbuttons #picker-modal .picker-inselection .items .item:hover .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item:hover .button-remove{display:block}#maxbuttons #picker-modal .picker-inselection .add,#maxbuttons .max-modal.picker-modal .picker-inselection .add{float:right;margin-top:15px;margin-right:15px;height:100%}#maxbuttons .social_block .social-option{clear:both;margin-top:25px}#maxbuttons .social_block .social-option .shortcode-container{display:inline-block}#maxbuttons .social_block .social-option .button_name{display:inline-block;margin-left:10px;vertical-align:middle;font-weight:700}#maxbuttons #mbfeedback .link{height:25px;width:100px;position:fixed;top:40%;right:0;z-index:1000;transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}#maxbuttons #mbfeedback .link a{background:#ccc;height:25px;width:70px;padding:8px 16px;color:#fff;font-family:Arial, sans-serif;font-size:15px;font-weight:bold;text-decoration:none;line-height:15px;border-bottom:solid 1px #333;border-left:solid 1px #333;border-right:solid 1px #fff}#maxbuttons #mbfeedback .link a::hover{background:#06c}#maxbuttons .ad-wrap{width:27%;float:left;max-width:300px;margin-left:1%;min-width:200px;margin-top:41px}#maxbuttons .ad-wrap .ads{background:#fff;margin-bottom:20px;text-align:center}#maxbuttons .ad-wrap .ads.image-ad{background:none;margin-top:20px}#maxbuttons .ad-wrap .ads.image-ad img{max-width:100%}#maxbuttons .ad-wrap .ads>a{text-decoration:none}#maxbuttons .ad-wrap .ads .header{background-color:#88c5c2;color:#fff;font-size:18px;text-transform:uppercase;padding:12px}#maxbuttons .ad-wrap .ads h3{text-align:center;padding-bottom:14px}#maxbuttons .ad-wrap .ads ul{list-style:none}#maxbuttons .ad-wrap .ads ul li{font-weight:bold;text-decoration:none;color:#000000}#maxbuttons .ad-wrap .ads ul li.plus{font-size:38px;font-weight:700;color:#88c5c2}#maxbuttons .ad-wrap .ads span.img{text-align:center;display:block}#maxbuttons .ad-wrap .ads .ads_button_wrap{margin:20px 0 30px;display:inline-block}#maxbuttons .ad-wrap .ads .ads_button_wrap .button{color:#fff;background-color:#88c5c2;font-size:16px;font-weight:bold;border:0;padding:0 40px}@media screen and (max-width: 960px){#maxbuttons .ad-wrap{display:none}}#maxbuttons.maxbuttons-pro-gopro .main{width:95%;max-width:860px}#maxbuttons.maxbuttons-pro-gopro h1.title{margin:0;font-size:24px;display:inline-block}#maxbuttons.maxbuttons-pro-gopro h1.title .big-maxg-btn{display:inline-block;background-color:#86c5c2;border-color:#73a3a8;margin:0 10px;vertical-align:super;line-height:23px;border-top:0;border-left:0;border-right:0;top:5px}#maxbuttons.maxbuttons-pro-gopro h1.title img{vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .logo{margin:0;display:inline-block;margin-top:14px}#maxbuttons.maxbuttons-pro-gopro .logo .simple-btn{color:#62c0e6;text-decoration:underline}#maxbuttons.maxbuttons-pro-gopro .default-section{text-align:center;padding:0px 10px}#maxbuttons.maxbuttons-pro-gopro .default-section p{position:relative;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:16px;margin:17px 0;color:#5b5b5b}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(even){background-color:#fff}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(odd){background-color:#faf5f1}#maxbuttons.maxbuttons-pro-gopro .default-section .big-maxg-btn{background-color:#fd8d61;border-color:#f0702b;font-size:36px;margin:10px}#maxbuttons.maxbuttons-pro-gopro .default-section h2{font-family:'Quicksand', sans-serif;font-weight:bold;color:#88c5c2;font-size:36px;line-height:38px;max-width:80%;margin:14px auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating{width:380px;margin:0 auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating p{margin:10px 0 0;font-size:22px;color:#000}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row p{font-weight:bold}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row img{width:106px;height:106px}#maxbuttons.maxbuttons-pro-gopro .social-row div{margin-bottom:5px}#maxbuttons.maxbuttons-pro-gopro .social-row p{background:#fff;padding:15px 5px 0 5px;margin:15px 0 0 15px;font-weight:700}#maxbuttons.maxbuttons-pro-gopro .social-row img{margin-top:15px}#maxbuttons.maxbuttons-pro-gopro .social-row p{min-height:162px}#maxbuttons.maxbuttons-pro-gopro .container{width:inherit;margin:0 auto;padding:30px 0}#maxbuttons.maxbuttons-pro-gopro img{max-width:100%}#maxbuttons.maxbuttons-pro-gopro .icon-row,#maxbuttons.maxbuttons-pro-gopro .image-row{position:relative}#maxbuttons.maxbuttons-pro-gopro .width-100{width:100%;margin-bottom:15px}#maxbuttons.maxbuttons-pro-gopro .width-33{width:33.33333333%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .width-50{width:50%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .clearfix{clear:both}#maxbuttons.maxbuttons-pro-gopro .bordered{border-radius:30px;padding:16px;background-color:#fff;box-sizing:border-box}@media (max-width: 780px){#maxbuttons.maxbuttons-pro-gopro .bordered{border:0;padding:8}}#maxbuttons.maxbuttons-pro-gopro .bordered p{margin:0 0 10px}#maxbuttons.maxbuttons-pro-gopro .inline-block{display:inline-block !important;vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn{font-family:'Quicksand', sans-serif;font-size:20px;color:#fff;font-weight:bold;padding:10px 15px;transition:all linear .2s;display:block;text-align:center;border-bottom:4px solid;text-transform:uppercase;border-radius:10px;text-decoration:none;line-height:42px}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover,#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:focus{color:#fff;text-decoration:none;outline:none}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover{box-shadow:0 8px 6px -6px rgba(0,0,0,0.5)}.maxmodal-data{display:none}.max-modal{display:none;width:60%;max-width:70%;height:auto;max-height:90vh;overflow:hidden;position:fixed;left:50%;top:50%;z-index:100101;display:none;background:#ffffff;border-radius:4px 4px 4px 4px;-webkit-border-radius:4px 4px 4px 4px;-webkit-box-shadow:-3px -3px 10px rgba(0,0,0,0.5);-moz-box-shadow:-3px -3px 10px rgba(0,0,0,0.5);box-shadow:-3px -3px 10px rgba(0,0,0,0.5)}@media (max-width: 960px){.max-modal{max-width:90%}}@media (max-width: 780px){.max-modal{max-width:100%}}.max-modal.success{border:4px solid green}.max-modal.error{border:4px solid red}.max-modal.error h3{background-color:#ff0000}.max-modal .content-area{background-color:#fff}.max-modal .modal_header{text-align:center;font-size:16px;font-weight:700;background-color:#f3f3f3;border-bottom:1px solid #ccc;padding:8px 5px;cursor:move}.max-modal .modal_header h3{margin:0;color:#444;font-weight:400;padding:0;text-align:center;text-shadow:none;font-size:16px}.max-modal .modal_header .modal_close{position:absolute;right:5px;top:8px;width:20px;height:20px;cursor:pointer;color:#444}.max-modal .modal_header .modal_close:hover{cursor:pointer;color:#111}.max-modal .content,.max-modal .modal_content{text-align:center;padding:5px 15px 10px;height:auto;overflow-y:auto}.max-modal textarea{overflow-x:auto}.max-modal .controls{padding:10px;text-align:center;clear:both}.max-modal .controls .button,.max-modal .controls .button-primary{margin-right:8px}.max-modal .tablenav .tablenav-pages a,.max-modal .tablenav-pages-navspan{background:#e5e5e5 none repeat scroll 0 0;border:1px solid #cccccc;display:inline-block;font-size:16px;font-weight:normal;line-height:1;min-width:17px;padding:3px 5px 7px;text-align:center}.max-modal textarea#maxbutton-css{width:100%;height:250px;font-family:Consolas, 'Courier New', 'Courier';font-size:13px;white-space:normal;word-wrap:break-word;overflow:none}.maxmodal_overlay{background:#000;left:0;right:0;bottom:0;top:0;height:100%;position:fixed;opacity:0.7;z-index:100100;display:none}.media-buttons #maxbuttons{margin:0;overflow-y:auto}.media-buttons #maxbuttons .preview-buttons{border:0;clear:both}.media-buttons #maxbuttons .preview-buttons .hint{font-size:12px;float:left;display:inline-block;line-height:30px;margin-top:3px}.media-buttons #maxbuttons .button-select{cursor:pointer;border:1px solid #fff}.media-buttons #maxbuttons .button-select.selected{border-top:1px solid #0085ba;border-bottom:1px solid #0085ba;background:#f7f7f7}.media-buttons #maxbuttons .button-select.selected .col_insert .small{font-weight:700}.media-buttons #maxbuttons .col_insert{width:150px;padding-top:15px}.media-buttons #maxbuttons .col_insert .small{font-size:10px}.media-buttons .pagination{width:100%;margin:10px 0;min-height:20px}.media-buttons .pagination span{font-size:15px;font-weight:700;float:left;cursor:pointer}.media-buttons .pagination .next{float:right}.media-buttons .shortcode_options{width:400px;margin:0 auto;display:inline-block}.media-buttons .shortcode_options .button_example{margin:15px}.media-buttons .shortcode_options input{margin-bottom:10px;display:inline-block;float:left}.media-buttons .shortcode_options label{margin-right:25px;display:inline-block;float:left;clear:left;width:100px;line-height:20px;font-weight:700}.media-buttons .shortcode_options p{clear:both}.media-buttons .shortcode_options input[type='button']{clear:both;float:none}.media-buttons .loading{background:transparent url("../../images/spinner.gif") no-repeat scroll 0 0/20px 20px;display:inline-block;float:right;margin:5px 5px 0 0;height:40px;opacity:0.7;vertical-align:middle;visibility:hidden;width:40px}.media-buttons .controls{position:absolute;width:100%;padding:10px 0;background:#f3f3f3;text-align:right;bottom:0;left:0;border-top:1px solid #ccc}
1
+ .mb_colorpicker{z-index:200}.ads .button-primary{display:block;margin:0 auto 20px auto;width:210px;text-align:center;overflow:visible}#maxbuttons{display:inline-block;width:100%}#maxbuttons .message,#maxbuttons .mb-message{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:10px;margin:10px 0px 20px 0px;clear:both}#maxbuttons .main{position:relative;z-index:500;margin-top:15px;width:72%;float:left}#maxbuttons .mb-message.error{font-weight:700}#maxbuttons .mb-message.shortcode,#maxbuttons .mb-message.mb-notice{border:solid 1px #e6db55;background-color:#ffffe0}#maxbuttons .button-bar,#maxbuttons .form-actions,#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1){margin:15px 0;padding:10px;background:#fbfbfb none repeat scroll 0 0;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);min-height:28px}#maxbuttons h1>span{vertical-align:top;float:left}@media (max-width: 1024px){#maxbuttons h1>span{float:none}}#maxbuttons .logo{font-weight:400;font-size:13px;overflow:hidden;text-align:center}@media (max-width: 1024px){#maxbuttons .logo{text-align:left;margin-top:15px}}#maxbuttons .logo img{vertical-align:middle;padding-left:5px;padding-right:5px}#maxbuttons .logo .fb-like{margin-top:5px;height:20px;padding:0;margin-left:180px;overflow:hidden}#maxbuttons .logo .fb-like span{vertical-align:top !important}#maxbuttons .dummy-heading{display:none}@media screen and (max-width: 960px){#maxbuttons .main{width:100%}}#maxbuttons .tablenav .input-paging{width:55px}#maxbuttons .ads ul li{margin-bottom:4px}#maxbuttons .preview-buttons{background-color:#fff;border:1px solid #dfdfdf;overflow:hidden}#maxbuttons .preview-buttons .heading{width:100%;clear:both;display:inline-block;border-bottom:1px solid #dfdfdf}#maxbuttons .preview-buttons .heading>span{display:inline-block;font-weight:700;font-size:14px;float:left}#maxbuttons .preview-buttons .button-row{width:100%;clear:both;display:inline-block;border-bottom:1px solid #dfdfdf}#maxbuttons .preview-buttons .button-row>span{display:inline-block;font-size:13px;float:left;overflow:hidden}#maxbuttons .preview-buttons .button-row .actions{margin:10px 0;padding:10px 0px 10px 8px;display:inline-block;z-index:11;width:50%;background-color:#fff;position:relative}#maxbuttons .preview-buttons .col{padding:10px 0 10px 1%}#maxbuttons .preview-buttons .col_check{width:20px}#maxbuttons .preview-buttons .col_button{width:60%;overflow:hidden}@media (max-width: 780px){#maxbuttons .preview-buttons .col_button{width:70%;margin-right:5%}}#maxbuttons .preview-buttons .col_name{width:15%}@media (max-width: 780px){#maxbuttons .preview-buttons .col_name{display:none !important}}#maxbuttons .preview-buttons .col_shortcode{width:15%;padding-right:0}#maxbuttons p.status a{text-decoration:none}#maxbuttons p.status span.count{color:#999999}#maxbuttons .button-list{margin-top:10px}#maxbuttons .button-list p{font-size:13px}#maxbuttons .button-list a{text-decoration:none}#maxbuttons .button-list a.button-name{font-weight:bold}#maxbuttons .button-list .shortcode-container{margin:10px 0px 10px 2px}#maxbuttons .button-list .collection_notice{text-align:right;margin:10px 5px 0 0;padding-top:10px;float:right}#maxbuttons .shortcode-container .mb-container{margin:0 !important;float:none !important;max-width:100% !important}#maxbuttons .shortcode-container .mb-center{text-align:left !important}#maxbuttons .pagination-links a.disabled{color:#aaa;cursor:default}#maxbuttons .pagination-links a.disabled:hover{background:#e4e4e4 none repeat scroll 0 0;cursor:default;border:1px solid #d2d2d2}#maxbuttons .pagination{width:100%;display:inline-block;margin:15px 0 5px}#maxbuttons .pagination li{float:left;margin-right:5px}#maxbuttons .pagination li a,#maxbuttons .pagination li span{background:#ccc;vertical-align:middle;padding:4px 10px 8px;height:15px;display:inline-block;border:1px solid #eee;text-decoration:none;font-size:14px;font-weight:bold}#maxbuttons.maxbuttons-controller-edit .main,#maxbuttons.maxbuttons-controller-button .main{width:auto;max-width:1200px}#maxbuttons .option-container{margin-bottom:20px;border:solid 1px #cccccc;border-radius:3px 3px 3px 3px;-webkit-border-radius:3px 3px 3px 3px;background-color:#fff}#maxbuttons .option-container .title{font-size:18px;padding:9px 8px 9px 10px;text-align:left;text-shadow:0px 1px 0px #ffffff;position:relative}#maxbuttons .option-container .section-title{padding:15px;margin-top:10px;font-weight:700;font-size:16px}#maxbuttons .option-container .section-title{background-color:#fff}#maxbuttons .option-container .option-list{display:inline-block}#maxbuttons .option-container .option-list:after{clear:both}#maxbuttons .option-container .option-list .help{float:right;margin-top:5px}#maxbuttons .option-container .help{position:relative;width:18px;height:18px;font-size:18px;margin-left:10px}#maxbuttons .option-container .help span{font-family:"Open Sans",sans-serif;font-size:12px;background-color:#fff;color:#000;position:absolute;display:none;padding:10px 5px;top:-7px;left:25px;min-width:150px;border-radius:5px;text-align:center;z-index:1000;border:1px solid #ccc;line-height:15px}#maxbuttons .option-container .help:hover span{display:block}#maxbuttons .option-container>.inside{padding:10px 15px 10px 15px;border-top:solid 1px #cccccc;background-color:#ffffff}#maxbuttons .option-container>.inside .option,#maxbuttons .option-container>.inside .option-design{margin-bottom:10px;display:block;position:relative}#maxbuttons .option-container>.inside .option .label,#maxbuttons .option-container>.inside .option>label,#maxbuttons .option-container>.inside .option-design .label,#maxbuttons .option-container>.inside .option-design>label{display:inline-block;font-weight:bold;padding-left:3px;padding-top:5px;width:145px;vertical-align:top;cursor:default;min-height:25px}#maxbuttons .option-container>.inside .option .label[for],#maxbuttons .option-container>.inside .option>label[for],#maxbuttons .option-container>.inside .option-design .label[for],#maxbuttons .option-container>.inside .option-design>label[for]{cursor:pointer}@media (max-width: 780px){#maxbuttons .option-container>.inside .option .label,#maxbuttons .option-container>.inside .option>label,#maxbuttons .option-container>.inside .option-design .label,#maxbuttons .option-container>.inside .option-design>label{font-size:14px}}#maxbuttons .option-container>.inside .option:after,#maxbuttons .option-container>.inside .option:before,#maxbuttons .option-container>.inside .option-design:after,#maxbuttons .option-container>.inside .option-design:before{clear:both}#maxbuttons .option-container>.inside .option label{margin-top:2px}#maxbuttons .option-container>.inside .option label.mbcolor{margin-top:5px}#maxbuttons .option-container>.inside .option label:nth-of-type(2){margin-left:30px;width:115px}#maxbuttons .option-container>.inside .option .control-group{display:inline-block}#maxbuttons .option-container>.inside .option .rotate-left{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(-45), M12=-sin(-45), M21=sin(-45), M22=cos(-45));-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(-45), M12=-sin(-45), M21=sin(-45), M22=cos(-45))";zoom:1}#maxbuttons .option-container>.inside .option .rotate-right{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(45), M12=-sin(45), M21=sin(45), M22=cos(45));-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=cos(45), M12=-sin(45), M21=sin(45), M22=cos(45))";zoom:1}#maxbuttons .option-design{margin-bottom:10px}#maxbuttons .option-design .input td div.cell-label{padding:1px 10px 0px 5px;font-weight:bold;border-bottom:solid 1px #d1d1d1;width:180px;font-size:13px;height:30px}#maxbuttons .option-design .default-other{font-size:13px}#maxbuttons .option p.note,#maxbuttons .option-design p.note{font-style:italic;display:inline-block;clear:both;color:#808080;padding-left:3px;margin-top:10px;margin-bottom:5px;margin-left:0;display:block}#maxbuttons .mb-message.shortcode .expanded,#maxbuttons .mb-message.mb-notice .expanded{display:none}#maxbuttons .mb-message.shortcode .expanded .example strong,#maxbuttons .mb-message.mb-notice .expanded .example strong{width:300px;display:inline-block}#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{float:right;cursor:pointer}@media (max-width: 1024px){#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{float:none;text-align:left;margin:10px 0;display:block}}#maxbuttons .manual-box{float:right;margin:3px 15px;top:0;right:0}#maxbuttons .manual-box a{text-align:center;width:100%;background:#e0e0e0 none repeat scroll 0 0;font-size:13px;font-weight:600;margin-left:4px;margin-top:5px;padding:4px 8px;position:relative;text-decoration:none;text-shadow:none}#maxbuttons .manual-entry{display:none;position:absolute;border:1px solid #000;background:#fff;width:45%;right:25px;z-index:199;box-sizing:border-box;padding-bottom:20px}#maxbuttons .manual-entry h3{font-size:18px;width:calc(100%);box-sizing:border-box;padding:10px 0;border-bottom:1px solid #ccc;text-align:center;margin:0;padding-right:35px;position:relative}#maxbuttons .manual-entry h3 span{box-sizing:border-box;cursor:pointer;width:35px;height:100%;font-size:25px;display:inline-block;position:absolute;right:5px;top:0;padding-top:8px}#maxbuttons .manual-entry h4,#maxbuttons .manual-entry p,#maxbuttons .manual-entry ol,#maxbuttons .manual-entry ul{padding:0 15px}#maxbuttons .manual-entry h4{font-size:16px}#maxbuttons .manual-entry p{font-size:13px}#maxbuttons .output{position:fixed;top:45px;right:20px;background-color:#ffffff;border:solid 1px #414141;box-shadow:0px 0px 6px #808080;z-index:99;width:auto;min-width:300px}@media (max-width: 780px){#maxbuttons .output{-webkit-box-shadow:0 0 0 0;-moz-box-shadow:0 0 0 0;box-shadow:0 0 0 0;top:0;left:0;right:0;position:relative;margin-bottom:15px;border-color:#ccc}}#maxbuttons .output .header{color:#222222;background-color:#ffffff;border-bottom:solid 1px #cccccc;font-family:"Open Sans", sans-serif;font-size:16px;font-weight:bold;padding:8px 0px 8px 10px;cursor:move;position:relative}#maxbuttons .output .header .preview-toggle{float:right;font-size:30px;width:30px;position:absolute;top:3px;right:0}#maxbuttons .output .inner{padding:5px}#maxbuttons .output .inner p{padding:5px 0 5px 5px}#maxbuttons .output .input.mbcolor{float:left;position:relative;margin-top:5px}#maxbuttons .output .input.mbcolor .wp-picker-container.wp-picker-active{padding:15px;border:1px solid #ccc;background-color:#fff;position:absolute;bottom:-15px;left:-270px;z-index:102;-webkit-box-shadow:4px 1px 5px #ccc;-moz-box-shadow:4px 1px 5px #ccc;box-shadow:4px 1px 5px #ccc}#maxbuttons .output .note{float:left;margin:8px 0px 0px 10px}#maxbuttons .output .result{padding:20px 5px}#maxbuttons .output .result p{padding:5px 0px 5px 0px;margin:0}#maxbuttons .output .result.preview-border-box>*{box-sizing:border-box}#maxbuttons .conditional-option{display:none}#maxbuttons .media_query{width:640px;margin:0 20px 15px 0;border:1px solid #ccc;padding:10px 15px;display:inline-block;clear:both;position:relative}#maxbuttons .media_query .removebutton{position:absolute;right:10px;top:10px;cursor:pointer;z-index:100;padding:10px 5px}#maxbuttons .media_query input:after{clear:both}#maxbuttons .media_query .label{clear:both;margin-bottom:15px}#maxbuttons .media_query label.title{padding:0;font-size:20px}#maxbuttons .media_query .custom.hidden{display:none}#maxbuttons .media_query .option.custom label:nth-of-type(2){margin-left:95px}#maxbuttons .media_query .description{padding:15px 0px;text-align:left}#maxbuttons .media_query select{width:60px}#maxbuttons .media_query .input input{margin-top:0px;padding-top:2px}#maxbuttons .media_queries_options .new-query{margin-top:25px}#maxbuttons .media_queries_options .new-query select{width:auto}#maxbuttons .media_option_prot,#maxbuttons #media_desc{display:none}#maxbuttons .copy-warning{width:400px;margin:0 auto;position:relative;line-height:1.1}#maxbuttons .copy-warning:before{content:"\f534";font-size:40px;color:#ff0000;width:35px;height:35px;font-family:"Dashicons";position:absolute;left:20px;top:40%;margin-top:-14px}#maxbuttons .copy-warning .example{margin-bottom:5px}#maxbuttons .form-actions a{margin-right:10px}#maxbuttons select{width:150px}#maxbuttons select.small{width:auto}#maxbuttons .input{display:inline-block;margin-right:15px;min-height:35px}#maxbuttons .input img{vertical-align:middle}#maxbuttons .input.mbcolor{min-width:50px}#maxbuttons .input.checkbox input{margin-top:0}#maxbuttons .input.checkbox label{line-height:16px;margin-top:0 !important}#maxbuttons input[type='text']{width:450px}@media (max-width: 780px){#maxbuttons input[type='text']{width:350px}}#maxbuttons input[type='text'].tiny{width:35px;vertical-align:middle}#maxbuttons input[type='text'].small{width:50px}#maxbuttons input[type='text'].medium{width:150px}#maxbuttons input[type='text'].tiny-nopad{width:35px}#maxbuttons input[type='number']{vertical-align:middle}#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:55px}@media (max-width: 780px){#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:60px}}#maxbuttons input[type='number'].small{width:70px}@media (max-width: 780px){#maxbuttons input[type='number'].small{width:75px}}#maxbuttons textarea{width:450px;height:80px}#maxbuttons .option-container .inside .option label.mbcolor:nth-of-type(2){margin-left:37px}#maxbuttons .option-container .inside .option.url{margin-bottom:0}#maxbuttons .option-container .inside .option.url_options{margin:5px 0 10px}#maxbuttons .option-container .inside .option.url_options .nofollow{margin-left:35px}#maxbuttons .option-container .inside .option.url_options label,#maxbuttons .option-container .inside .option.rel_options label{font-weight:400}#maxbuttons .option-container .inside .option.font .checkbox{margin-right:2px}#maxbuttons .option-container .inside .option.font .radio{margin-right:0}#maxbuttons .option-container .inside .option.font .input.font{margin-right:2px}#maxbuttons .option-container .inside .option.font .input.font_size{margin-right:0}#maxbuttons .option-container .inside .option.font .input.font_size:after{display:block}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font{display:inline-block}#maxbuttons .option-container .inside .option.font:after{clear:both}#maxbuttons .option-container .inside .option.font>*{float:left}}#maxbuttons .option-container .inside .option.font .control-group.font_weight{margin-left:28px}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font .control-group.font_weight{clear:left;margin-left:148px;margin-top:10px}}#maxbuttons .option-container .inside .option.font .control-group.text_align{margin-left:48px}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font .control-group.text_align{margin-left:20px;margin-top:10px}}#maxbuttons .option-container .inside .option.padding_top .input,#maxbuttons .option-container .inside .option.container_margin_top .input{margin-right:30px}#maxbuttons .option-container .inside .option.padding_top .input:last-of-type,#maxbuttons .option-container .inside .option.container_margin_top .input:last-of-type{margin-right:0}@media (max-width: 780px){#maxbuttons .option-container .inside .option.padding_top .input,#maxbuttons .option-container .inside .option.container_margin_top .input{margin-right:15px}}#maxbuttons .option-container .inside .option.text_color label{padding-top:10px}#maxbuttons .option-container .inside .option.text_color label:nth-of-type(2){margin-left:51px}#maxbuttons .option-container .inside .option.description label{padding-top:35px}#maxbuttons .option-container .inside .option .radius-wrap{position:relative;margin-left:45px;display:inline-block}#maxbuttons .option-container .inside .option.radius .label:first-child{width:100px;float:left}#maxbuttons .option-container .inside .option.radius .bottom,#maxbuttons .option-container .inside .option.radius .top{position:relative}#maxbuttons .option-container .inside .option.radius .bottom .input,#maxbuttons .option-container .inside .option.radius .top .input{margin-right:0;margin-left:0}#maxbuttons .option-container .inside .option.radius .bottom .dashicons:nth-child(3),#maxbuttons .option-container .inside .option.radius .top .dashicons:nth-child(3){margin-right:10px}#maxbuttons .option-container .inside .option.radius .top{margin-bottom:10px}#maxbuttons .option-container .inside .option.radius label{display:inline-block;font-weight:700;width:90px;margin-left:5px;cursor:default}#maxbuttons .option-container .inside .option.radius .dashicons{font-size:35px;height:35px;width:35px;color:#ccc}#maxbuttons .option-container .inside .option.radius .top .dashicons{margin-top:-5px}#maxbuttons .option-container .inside .option.radius .bottom .dashicons{margin-top:5px}#maxbuttons .option-container .inside .option.radius #radius_toggle{position:absolute;left:46%;top:25px;font-size:30px;cursor:pointer}#maxbuttons .option-container .inside .option.gradient_head .label:nth-child(even){width:120px}#maxbuttons .option-container .inside .option .gradient_end_color,#maxbuttons .option-container .inside .option .gradient_end_color_hover{margin-left:58px}#maxbuttons .default{display:inline-block;padding-left:10px;padding-top:4px;font-style:italic;color:#808080}#maxbuttons .default .other{padding-left:40px;padding-top:8px}#maxbuttons .mb-button{width:38px;height:38px;background-color:#eceded;display:inline-block;margin-right:6px;cursor:pointer;display:none}#maxbuttons .mb-button span{text-align:center;padding:9px 0;width:100%;line-height:20px}#maxbuttons .check_button{display:none}#maxbuttons .check_button+label{background-position:center center;background-repeat:no-repeat;background-color:#fff;display:inline-block;border:1px solid #ddd;font_weight:normal;padding:4px}@media (max-width: 780px){#maxbuttons .check_button+label{padding:10px}}#maxbuttons .check_button.text+label{padding:5px}#maxbuttons .check_button.icon+label i{width:20px;height:20px;color:#545454}#maxbuttons .check_button.icon+label i:focus{outline:none}#maxbuttons .check_button:checked+label{background:#ebebeb none repeat scroll 0 0;border-color:#999999;box-shadow:0 2px 5px -3px rgba(0,0,0,0.3) inset}#maxbuttons .option .switch_label{padding-top:2px !important;margin:0 !important}#maxbuttons .switch_button{margin-left:-5px}#maxbuttons .switch_button label{padding:8px 5px}#maxbuttons .switch_button label:focus{outline:none}#maxbuttons .switch_button input{display:none}#maxbuttons .switch_button input:checked ~ .the_switch{background:#6fbeb5}#maxbuttons .switch_button input:checked ~ .the_switch:after{left:26px;background:#179588}#maxbuttons .switch_button input::disabled ~ .the_switch{background:#d5d5d5;pointer-events:none}#maxbuttons .switch_button input:disabled ~ .the_switch:after{background:#bcbdbc}#maxbuttons .switch_button .the_switch{position:relative;display:inline-block;height:15px;width:50px;background:#898989;border-radius:100px;cursor:pointer;transition:all 0.3s ease}#maxbuttons .switch_button .the_switch:after{position:absolute;left:-2px;top:-3px;display:block;width:24px;height:24px;border-radius:100px;background:#aaa;box-shadow:0px 3px 3px rgba(0,0,0,0.05);content:'';transition:all 0.2s ease}#maxbuttons .switch_button .the_switch:active:after{transform:scale(0.9, 0.85)}#maxbuttons .switch_button .the_switch:focus{outline:none}#maxbuttons .input.mbcolor{margin-top:5px;position:relative}#maxbuttons .input.mbcolor .wp-picker-clear{display:none}#maxbuttons .input.mbcolor input[type="text"]{width:75px;line-height:22px}#maxbuttons .input.mbcolor .wp-color-picker{width:inherit}#maxbuttons .input.mbcolor .wp-color-result{-webkit-box-shadow:-1px 1px 2px #999;-moz-box-shadow:-1px 1px 2px #999;box-shadow:-1px 1px 2px #999;height:30px;border:0;font-size:900px}#maxbuttons .input.mbcolor .wp-color-result:after{font-size:12px;line-height:30px;display:none}#maxbuttons .input.mbcolor .wp-color-result:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 5px rgba(30,140,190,0.8);-moz-box-shadow:0 0 5px rgba(30,140,190,0.8);box-shadow:0 0 5px rgba(30,140,190,0.8)}#maxbuttons .input.mbcolor .wp-picker-active+.arrows{display:inline-block}#maxbuttons .input.mbcolor .arrows{position:absolute;display:none;top:0;margin-top:40%}#maxbuttons .input.mbcolor .arrows.right{right:-45px}#maxbuttons .input.mbcolor .arrows.left{left:-35px}#maxbuttons .input.mbcolor .arrows .arrow-left,#maxbuttons .input.mbcolor .arrows .arrow-right{width:0;height:0;font-size:0;line-height:0;vertical-align:bottom;cursor:pointer}#maxbuttons .input.mbcolor .arrows .arrow-left{border-top:30px solid transparent;border-bottom:30px solid transparent;border-right:20px solid #ccc}#maxbuttons .input.mbcolor .arrows .arrow-right{border-top:30px solid transparent;border-bottom:30px solid transparent;border-left:20px solid #ccc;margin-top:35px}#maxbuttons .input.mbcolor .arrows .left,#maxbuttons .input.mbcolor .arrows .right{display:inline-block;float:left;clear:both;width:35px;height:45px}#maxbuttons .input.mbcolor .arrows .left{margin-top:15px}#maxbuttons .rss-feed{overflow:hidden;clear:both;margin-bottom:20px}#maxbuttons .rss-feed li{width:32%;margin-right:2%;float:left;margin-bottom:2%}#maxbuttons .rss-feed li:nth-child(3n){margin-right:0}#maxbuttons .rss-feed li a{min-height:110px;max-height:110px;overflow:hidden;background:#fff;width:100%;display:block;padding:10px;box-sizing:border-box;border:1px solid #bbb;text-decoration:none;transition:all 200ms;border-radius:2px}#maxbuttons .rss-feed li a:hover{background:#f9f9f9}#maxbuttons .rss-feed li a:hover span{color:#0074a2}#maxbuttons .rss-feed li a span{color:#2ea2cc;font-weight:bold;font-size:1.2em;line-height:1.5em}#maxbuttons .system_info{width:90%;background-color:#fff;border:1px solid #000;padding:15px}#maxbuttons .system_info .info{margin:5px 0}#maxbuttons .system_info .info label{width:250px;display:inline-block;clear:both}#maxbuttons.maxbuttons-settings .option-container .inside .option-design{margin:20px 0}#maxbuttons.maxbuttons-settings .option-container .inside .option-design label{line-height:14px;height:40px;vertical-align:top;width:200px}#maxbuttons h2.tabs{margin:1em 0;min-height:35px}#maxbuttons h2.sub-tabs,#maxbuttons h2.submit-tab{list-style:none;clear:both;margin-bottom:0}#maxbuttons h2.sub-tabs a,#maxbuttons h2.submit-tab a{font-weight:400;font-size:14px;cursor:pointer}#maxbuttons h2.sub-tabs a .dashicons,#maxbuttons h2.submit-tab a .dashicons{margin-right:10px;line-height:24px}#maxbuttons h2.sub-tabs .save-indicator,#maxbuttons h2.submit-tab .save-indicator{float:right;font-size:25px;display:none;margin-right:10px}#maxbuttons h2.sub-tabs .save-indicator.dashicons-warning,#maxbuttons h2.submit-tab .save-indicator.dashicons-warning{color:#ff0000}#maxbuttons h2.sub-tabs .save-indicator.dashicons-yes,#maxbuttons h2.submit-tab .save-indicator.dashicons-yes{color:#00ff00}#maxbuttons.mb_tabs_active .mb_tab{border:0px;background:none;border-radius:0 0 0 0;-webkit-border-radius:0 0 0 0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) button{top:0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) .right{float:right}#maxbuttons.mb_tabs_active .mb_tab>.inside{border:1px solid #e5e5e5}#maxbuttons.maxbuttons-collections-edit .main{width:100%;max-width:none}#maxbuttons .collection-addnew{display:inline-block}@media (max-width: 780px){#maxbuttons .collection-addnew{margin-left:5px}}#maxbuttons .collection_list .collection{position:relative;background-color:#fff;padding:15px;border-radius:15px;margin:15px 0}#maxbuttons .collection_list .collection h3{display:inline-block;width:90%;margin-top:0;font-size:18px;line-height:20px}#maxbuttons .collection_list .collection h3 a{color:#000;font-size:25px;text-decoration:none}#maxbuttons .collection_list .collection h3 a:hover{text-decoration:underline}#maxbuttons .collection_list .collection h3 .dashicons{color:#ccc;margin-left:15px}#maxbuttons .collection_list .collection h3 .button-count{font-weight:400;font-size:15px;margin-left:15px;vertical-align:top}#maxbuttons .collection_list .collection .collection_remove{top:10px;right:15px;font-size:25px;font-weight:400;position:absolute;cursor:pointer}#maxbuttons .collection_list .collection.welcome p{font-size:14px;line-height:22px}#maxbuttons .collection_list .collection-container{position:relative;width:100%;display:inline-block;clear:both}#maxbuttons .collection_list .collection-container .maxcollection{position:static !important}#maxbuttons .inside .preview_collection.option label{display:inline-block;float:none;font-size:25px;width:100%}#maxbuttons .mb_collection_selection{display:inline-block;min-height:300px;margin:25px 0}#maxbuttons .mb_collection_selection .sortable .item{margin-bottom:25px;position:relative;padding-left:30px;min-height:45px;clear:both}#maxbuttons .mb_collection_selection .sortable .item .button-remove{margin-top:5px;position:absolute;left:20px;top:-15px;border:1px solid #000;border-radius:11px;width:20px;height:20px;background-color:rgba(0,0,0,0.5)}#maxbuttons .mb_collection_selection .sortable .item .button-remove:hover{cursor:pointer}#maxbuttons .mb_collection_selection .sortable .item .button-remove span{color:#fff;font-size:16px;padding-top:2px;overflow:hidden}#maxbuttons .mb_collection_selection .sortable-placeholder{border:3px dashed #aaa;height:45px;width:344px;background:#ccc}#maxbuttons .mb_collection_selection .button_data{display:none}#maxbuttons .mb-social-options{float:right;width:45%;border:1px solid #000;height:100%}#maxbuttons .mb-buttons-selection{float:left;width:45%;overflow:hidden;border:1px solid #000}#maxbuttons .mb-preview-window{position:fixed;top:40%;right:20px;width:30%;max-width:45%;max-height:90vh;background-color:rgba(255,255,255,0.7);border:1px solid #000;z-index:500 !important;overflow:hidden;display:none}@media (max-width: 780px){#maxbuttons .mb-preview-window{position:relative;left:0;top:0;bottom:0;right:0;width:100%;height:auto;display:inline-block;border-color:#ccc}}#maxbuttons .mb-preview-window .mb-preview-wrapper{position:relative;display:inline-block;width:100%}#maxbuttons .sub-tabs .preview-on{background-color:#00b9eb;color:#fff}#maxbuttons .sub-tabs .preview-on::before{line-height:24px}#maxbuttons #picker-back{top:0;left:0;right:0;bottom:0;background-color:#000;z-index:110000;position:fixed;opacity:0.7;display:none}#maxbuttons #picker-modal,#maxbuttons .max-modal.picker-modal{display:none;width:calc(100% - 60px);min-height:300px;top:30px;bottom:30px;left:30px;right:30px;z-index:160000}#maxbuttons #picker-modal .modal_header,#maxbuttons .max-modal.picker-modal .modal_header{height:15px;display:block;overflow:hidden;top:0;left:0;bottom:0;right:0;border:0}#maxbuttons #picker-modal .picker-packages,#maxbuttons .max-modal.picker-modal .picker-packages{top:31px;left:0;width:205px;bottom:0;background-color:#f3f3f3;position:absolute;border-right:1px solid #ccc;overflow-x:hidden;overflow-y:auto}#maxbuttons #picker-modal .picker-packages ul,#maxbuttons .max-modal.picker-modal .picker-packages ul{margin-top:4px}#maxbuttons #picker-modal .picker-packages li a,#maxbuttons .max-modal.picker-modal .picker-packages li a{padding:6px 20px;display:block;color:#0073aa;text-decoration:none;font-size:13px;line-height:16px}#maxbuttons #picker-modal .picker-packages li a:hover,#maxbuttons .max-modal.picker-modal .picker-packages li a:hover{background:rgba(0,0,0,0.04) none repeat scroll 0 0;color:#21759b}#maxbuttons #picker-modal .picker-packages li a.pack-active,#maxbuttons .max-modal.picker-modal .picker-packages li a.pack-active{font-weight:700;color:#000}#maxbuttons #picker-modal .picker-main,#maxbuttons .max-modal.picker-modal .picker-main{left:206px;top:31px;right:0;bottom:60px;position:absolute;border-bottom:1px solid #dddddd;overflow-y:scroll;background-color:#fff}#maxbuttons #picker-modal .picker-main .screen,#maxbuttons .max-modal.picker-modal .picker-main .screen{margin:5px 5px}#maxbuttons #picker-modal .picker-main .screen .tablenav-pages,#maxbuttons .max-modal.picker-modal .picker-main .screen .tablenav-pages{float:none;margin-left:1%}#maxbuttons #picker-modal .picker-main .item,#maxbuttons .max-modal.picker-modal .picker-main .item{padding:5px;margin:5px 0 5px 1%;border:1px solid #000;width:16%;height:auto;float:left;text-align:center;position:relative;background-color:#eee;border:1px solid #b4b9be;display:inline-block}#maxbuttons #picker-modal .picker-main .item .button_data,#maxbuttons .max-modal.picker-modal .picker-main .item .button_data{display:none}#maxbuttons #picker-modal .picker-main .item .button_name,#maxbuttons .max-modal.picker-modal .picker-main .item .button_name{clear:left;display:block;margin-top:15px;font-size:9px}#maxbuttons #picker-modal .picker-main .item .button-selected,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected{position:absolute;font-size:20px;top:-10px;right:-10px;width:24px;height:24px;color:#fff;background-color:#1e8cbe;z-index:100;border-radius:12px}#maxbuttons #picker-modal .picker-main .item .button-selected span,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected span{padding-top:2px}#maxbuttons #picker-modal .picker-inselection,#maxbuttons .max-modal.picker-modal .picker-inselection{height:60px;display:block;position:absolute;bottom:0;right:0;left:206px;overflow:hidden}#maxbuttons #picker-modal .picker-inselection .info,#maxbuttons .max-modal.picker-modal .picker-inselection .info{height:60px;float:left;display:inline-block;padding:10px 15px;display:none}#maxbuttons #picker-modal .picker-inselection .info .clear-selection,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection{color:#ff0000;display:block;padding:0}#maxbuttons #picker-modal .picker-inselection .info .clear-selection:hover,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection:hover{background-color:#ff0000;color:#fff}#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:inline-block;position:absolute;overflow:hidden;padding-top:5px;height:100%;left:130px;right:180px}@media (max-width: 780px){#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:none}}#maxbuttons #picker-modal .picker-inselection .items .item,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item{height:40px;width:40px;overflow:hidden;float:left;margin:3px;position:relative}#maxbuttons #picker-modal .picker-inselection .items .item .button_name,#maxbuttons #picker-modal .picker-inselection .items .item .button_data,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_name,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_data{display:none}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove{display:none;position:absolute;width:30px;height:30px;left:2px;border-radius:15px;top:2px;background-color:rgba(0,0,0,0.5)}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove span,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove span{font-size:20px;color:#fff;padding-left:5px;padding-top:5px}#maxbuttons #picker-modal .picker-inselection .items .item:hover .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item:hover .button-remove{display:block}#maxbuttons #picker-modal .picker-inselection .add,#maxbuttons .max-modal.picker-modal .picker-inselection .add{float:right;margin-top:15px;margin-right:15px;height:100%}#maxbuttons .social_block .social-option{clear:both;margin-top:25px}#maxbuttons .social_block .social-option .shortcode-container{display:inline-block}#maxbuttons .social_block .social-option .button_name{display:inline-block;margin-left:10px;vertical-align:middle;font-weight:700}#maxbuttons #mbfeedback .link{height:25px;width:100px;position:fixed;top:40%;right:0;z-index:1000;transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}#maxbuttons #mbfeedback .link a{background:#ccc;height:25px;width:70px;padding:8px 16px;color:#fff;font-family:Arial, sans-serif;font-size:15px;font-weight:bold;text-decoration:none;line-height:15px;border-bottom:solid 1px #333;border-left:solid 1px #333;border-right:solid 1px #fff}#maxbuttons #mbfeedback .link a::hover{background:#06c}#maxbuttons .ad-wrap{width:27%;float:left;max-width:300px;margin-left:1%;min-width:200px;margin-top:41px}#maxbuttons .ad-wrap .ads{background:#fff;margin-bottom:20px;text-align:center}#maxbuttons .ad-wrap .ads.image-ad{background:none;margin-top:20px}#maxbuttons .ad-wrap .ads.image-ad img{max-width:100%}#maxbuttons .ad-wrap .ads>a{text-decoration:none}#maxbuttons .ad-wrap .ads .header{background-color:#88c5c2;color:#fff;font-size:18px;text-transform:uppercase;padding:12px}#maxbuttons .ad-wrap .ads h3{text-align:center;padding-bottom:14px}#maxbuttons .ad-wrap .ads ul{list-style:none}#maxbuttons .ad-wrap .ads ul li{font-weight:bold;text-decoration:none;color:#000000}#maxbuttons .ad-wrap .ads ul li.plus{font-size:38px;font-weight:700;color:#88c5c2}#maxbuttons .ad-wrap .ads span.img{text-align:center;display:block}#maxbuttons .ad-wrap .ads .ads_button_wrap{margin:20px 0 30px;display:inline-block}#maxbuttons .ad-wrap .ads .ads_button_wrap .button{color:#fff;background-color:#88c5c2;font-size:16px;font-weight:bold;border:0;padding:0 40px}@media screen and (max-width: 960px){#maxbuttons .ad-wrap{display:none}}#maxbuttons.maxbuttons-pro-gopro .main{width:95%;max-width:860px}#maxbuttons.maxbuttons-pro-gopro h1.title{margin:0;font-size:24px;display:inline-block}#maxbuttons.maxbuttons-pro-gopro h1.title .big-maxg-btn{display:inline-block;background-color:#86c5c2;border-color:#73a3a8;margin:0 10px;vertical-align:super;line-height:23px;border-top:0;border-left:0;border-right:0;top:5px}#maxbuttons.maxbuttons-pro-gopro h1.title img{vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .logo{margin:0;display:inline-block;margin-top:14px}#maxbuttons.maxbuttons-pro-gopro .logo .simple-btn{color:#62c0e6;text-decoration:underline}#maxbuttons.maxbuttons-pro-gopro .default-section{text-align:center;padding:0px 10px}#maxbuttons.maxbuttons-pro-gopro .default-section p{position:relative;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:16px;margin:17px 0;color:#5b5b5b}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(even){background-color:#fff}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(odd){background-color:#faf5f1}#maxbuttons.maxbuttons-pro-gopro .default-section .big-maxg-btn{background-color:#fd8d61;border-color:#f0702b;font-size:36px;margin:10px}#maxbuttons.maxbuttons-pro-gopro .default-section h2{font-family:'Quicksand', sans-serif;font-weight:bold;color:#88c5c2;font-size:36px;line-height:38px;max-width:80%;margin:14px auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating{width:380px;margin:0 auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating p{margin:10px 0 0;font-size:22px;color:#000}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row p{font-weight:bold}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row img{width:106px;height:106px}#maxbuttons.maxbuttons-pro-gopro .social-row div{margin-bottom:5px}#maxbuttons.maxbuttons-pro-gopro .social-row p{background:#fff;padding:15px 5px 0 5px;margin:15px 0 0 15px;font-weight:700}#maxbuttons.maxbuttons-pro-gopro .social-row img{margin-top:15px}#maxbuttons.maxbuttons-pro-gopro .social-row p{min-height:162px}#maxbuttons.maxbuttons-pro-gopro .container{width:inherit;margin:0 auto;padding:30px 0}#maxbuttons.maxbuttons-pro-gopro img{max-width:100%}#maxbuttons.maxbuttons-pro-gopro .icon-row,#maxbuttons.maxbuttons-pro-gopro .image-row{position:relative}#maxbuttons.maxbuttons-pro-gopro .width-100{width:100%;margin-bottom:15px}#maxbuttons.maxbuttons-pro-gopro .width-33{width:33.33333333%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .width-50{width:50%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .clearfix{clear:both}#maxbuttons.maxbuttons-pro-gopro .bordered{border-radius:30px;padding:16px;background-color:#fff;box-sizing:border-box}@media (max-width: 780px){#maxbuttons.maxbuttons-pro-gopro .bordered{border:0;padding:8}}#maxbuttons.maxbuttons-pro-gopro .bordered p{margin:0 0 10px}#maxbuttons.maxbuttons-pro-gopro .inline-block{display:inline-block !important;vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn{font-family:'Quicksand', sans-serif;font-size:20px;color:#fff;font-weight:bold;padding:10px 15px;transition:all linear .2s;display:block;text-align:center;border-bottom:4px solid;text-transform:uppercase;border-radius:10px;text-decoration:none;line-height:42px}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover,#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:focus{color:#fff;text-decoration:none;outline:none}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover{box-shadow:0 8px 6px -6px rgba(0,0,0,0.5)}.maxmodal-data{display:none}.max-modal{display:none;width:60%;max-width:70%;height:auto;max-height:90vh;overflow:hidden;position:fixed;left:50%;top:50%;z-index:100101;display:none;background:#ffffff;border-radius:4px 4px 4px 4px;-webkit-border-radius:4px 4px 4px 4px;-webkit-box-shadow:-3px -3px 10px rgba(0,0,0,0.5);-moz-box-shadow:-3px -3px 10px rgba(0,0,0,0.5);box-shadow:-3px -3px 10px rgba(0,0,0,0.5)}@media (max-width: 960px){.max-modal{max-width:90%}}@media (max-width: 780px){.max-modal{max-width:100%}}.max-modal.success{border:4px solid green}.max-modal.error{border:4px solid red}.max-modal.error h3{background-color:#ff0000}.max-modal .content-area{background-color:#fff}.max-modal .modal_header{text-align:center;font-size:16px;font-weight:700;background-color:#f3f3f3;border-bottom:1px solid #ccc;padding:8px 5px;cursor:move}.max-modal .modal_header h3{margin:0;color:#444;font-weight:400;padding:0;text-align:center;text-shadow:none;font-size:16px}.max-modal .modal_header .modal_close{position:absolute;right:5px;top:8px;width:20px;height:20px;cursor:pointer;color:#444}.max-modal .modal_header .modal_close:hover{cursor:pointer;color:#111}.max-modal .content,.max-modal .modal_content{text-align:center;padding:5px 15px 10px;height:auto;overflow-y:auto}.max-modal textarea{overflow-x:auto}.max-modal .controls{padding:10px;text-align:center;clear:both}.max-modal .controls .button,.max-modal .controls .button-primary{margin-right:8px}.max-modal .tablenav .tablenav-pages a,.max-modal .tablenav-pages-navspan{background:#e5e5e5 none repeat scroll 0 0;border:1px solid #cccccc;display:inline-block;font-size:16px;font-weight:normal;line-height:1;min-width:17px;padding:3px 5px 7px;text-align:center}.max-modal textarea#maxbutton-css{width:100%;height:250px;font-family:Consolas, 'Courier New', 'Courier';font-size:13px;white-space:normal;word-wrap:break-word;overflow:none}.maxmodal_overlay{background:#000;left:0;right:0;bottom:0;top:0;height:100%;position:fixed;opacity:0.7;z-index:100100;display:none}.media-buttons #maxbuttons{margin:0;overflow-y:auto}.media-buttons #maxbuttons .preview-buttons{border:0;clear:both}.media-buttons #maxbuttons .preview-buttons .hint{font-size:12px;float:left;display:inline-block;line-height:30px;margin-top:3px}.media-buttons #maxbuttons .button-select{cursor:pointer;border:1px solid #fff}.media-buttons #maxbuttons .button-select.selected{border-top:1px solid #0085ba;border-bottom:1px solid #0085ba;background:#f7f7f7}.media-buttons #maxbuttons .button-select.selected .col_insert .small{font-weight:700}.media-buttons #maxbuttons .col_insert{width:150px;padding-top:15px}.media-buttons #maxbuttons .col_insert .small{font-size:10px}.media-buttons .pagination{width:100%;margin:10px 0;min-height:20px}.media-buttons .pagination span{font-size:15px;font-weight:700;float:left;cursor:pointer}.media-buttons .pagination .next{float:right}.media-buttons .shortcode_options{width:400px;margin:0 auto;display:inline-block}.media-buttons .shortcode_options .button_example{margin:15px}.media-buttons .shortcode_options input{margin-bottom:10px;display:inline-block;float:left}.media-buttons .shortcode_options label{margin-right:25px;display:inline-block;float:left;clear:left;width:100px;line-height:20px;font-weight:700}.media-buttons .shortcode_options p{clear:both}.media-buttons .shortcode_options input[type='button']{clear:both;float:none}.media-buttons .loading{background:transparent url("../../images/spinner.gif") no-repeat scroll 0 0/20px 20px;display:inline-block;float:right;margin:5px 5px 0 0;height:40px;opacity:0.7;vertical-align:middle;visibility:hidden;width:40px}.media-buttons .controls{position:absolute;width:100%;padding:10px 0;background:#f3f3f3;text-align:right;bottom:0;left:0;border-top:1px solid #ccc}
assets/integrations/shortcake/class-field-maxbutton.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
-
 
3
  // Maxbutton field class
4
 
5
  class Shortcake_Field_MaxButton
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
  // Maxbutton field class
5
 
6
  class Shortcake_Field_MaxButton
assets/integrations/shortcake/shortcake.php CHANGED
@@ -1,4 +1,6 @@
1
  <?php
 
 
2
 
3
  class mbCake
4
  {
@@ -6,12 +8,12 @@ class mbCake
6
 
7
  public static function init()
8
  {
9
- add_action('register_shortcode_ui', array('mbCake', 'register'));
10
- add_action('init', array('mbCake', 'initField'));
11
- add_action('shortcode_ui_after_do_shortcode', array('mbCake', 'shortcode'));
12
 
13
  // Load FA within TinyMCE
14
- add_action('admin_enqueue_scripts', array('mbCake', 'editor_styles')) ;
15
 
16
  }
17
 
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
 
5
  class mbCake
6
  {
8
 
9
  public static function init()
10
  {
11
+ add_action('register_shortcode_ui', array(maxUtils::namespaceit('mbCake'), 'register'));
12
+ add_action('init', array(maxUtils::namespaceit('mbCake'), 'initField'));
13
+ add_action('shortcode_ui_after_do_shortcode', array(maxUtils::namespaceit('mbCake'), 'shortcode'));
14
 
15
  // Load FA within TinyMCE
16
+ add_action('admin_enqueue_scripts', array(maxUtils::namespaceit('mbCake'), 'editor_styles')) ;
17
 
18
  }
19
 
assets/integrations/siteorigins_builder/sitebuilder.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  // Add a MaxButton widget to the pagebuilder
4
 
@@ -12,14 +13,14 @@ function maxButtons_add_widget_tabs($tabs) {
12
 
13
  return $tabs;
14
  }
15
- add_filter('siteorigin_panels_widget_dialog_tabs', 'maxbuttons_add_widget_tabs', 20);
16
 
17
  function maxbuttons_add_widgets($folders)
18
  {
19
  $folders[] = plugin_dir_path(__FILE__). 'widgets/';
20
  return $folders;
21
  }
22
- add_filter('siteorigin_widgets_widget_folders', 'maxbuttons_add_widgets', 20);
23
 
24
 
25
 
@@ -28,13 +29,13 @@ function maxbuttons_fields_class_paths( $class_paths ) {
28
  $class_paths[] = plugin_dir_path( __FILE__ ) . "fields/";
29
  return $class_paths;
30
  }
31
- add_filter( 'siteorigin_widgets_field_class_paths', 'maxbuttons_fields_class_paths', 20 );
32
 
33
  function maxbuttons_class_prefixes( $class_prefixes ) {
34
  $class_prefixes[] = 'MaxButton_Widget_Field_';
35
  return $class_prefixes;
36
  }
37
- add_filter( 'siteorigin_widgets_field_class_prefixes', 'maxbuttons_class_prefixes', 20 );
38
 
39
 
40
 
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  // Add a MaxButton widget to the pagebuilder
5
 
13
 
14
  return $tabs;
15
  }
16
+ add_filter('siteorigin_panels_widget_dialog_tabs', maxUtils::namespaceit('maxbuttons_add_widget_tabs'), 20);
17
 
18
  function maxbuttons_add_widgets($folders)
19
  {
20
  $folders[] = plugin_dir_path(__FILE__). 'widgets/';
21
  return $folders;
22
  }
23
+ add_filter('siteorigin_widgets_widget_folders', maxUtils::namespaceit('maxbuttons_add_widgets'), 20);
24
 
25
 
26
 
29
  $class_paths[] = plugin_dir_path( __FILE__ ) . "fields/";
30
  return $class_paths;
31
  }
32
+ add_filter( 'siteorigin_widgets_field_class_paths', maxUtils::namespaceit('maxbuttons_fields_class_paths'), 20 );
33
 
34
  function maxbuttons_class_prefixes( $class_prefixes ) {
35
  $class_prefixes[] = 'MaxButton_Widget_Field_';
36
  return $class_prefixes;
37
  }
38
+ add_filter( 'siteorigin_widgets_field_class_prefixes', maxUtils::namespaceit('maxbuttons_class_prefixes'), 20 );
39
 
40
 
41
 
assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php CHANGED
@@ -1,4 +1,6 @@
1
  <?php
 
 
2
  /*
3
  Widget Name: MaxButtons
4
  Description: MaxButtons widget
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
  /*
5
  Widget Name: MaxButtons
6
  Description: MaxButtons widget
assets/libraries/scssphp/scss.inc.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  if (version_compare(PHP_VERSION, '5.3') < 0) {
3
  die('Requires PHP 5.3 or above');
4
  }
1
  <?php
2
+
3
  if (version_compare(PHP_VERSION, '5.3') < 0) {
4
  die('Requires PHP 5.3 or above');
5
  }
assets/libraries/simple-template/simple_template.php CHANGED
@@ -14,9 +14,10 @@ class simpleTemplate
14
  return false;
15
  }
16
  $template = file_get_contents($template_file);
17
-
18
- $template = static::checkif($template, $object);
19
- $template = static::checkfor($template, $object);
 
20
  $template = static::checkvar($template, $object);
21
 
22
 
@@ -66,15 +67,16 @@ class simpleTemplate
66
  {
67
  list($field, $value) = explode('=', $field);
68
  }
 
69
 
70
  $content = $matches[2][$i];
71
 
72
  if (isset($object->$field) && ($value == null || $object->$field == $value) )
73
- {
74
  $template = str_replace($full, $content, $template);
75
  }
76
  else
77
- {
78
  $template = str_replace($full, '', $template);
79
  }
80
  }
@@ -83,8 +85,8 @@ class simpleTemplate
83
 
84
  public static function checkfor($template, $object)
85
  {
86
- $count = preg_match_all('/\{for:(.*)\}(.*)\{\/for:(.*)\}/is', $template, $matches);
87
-
88
  if (! isset($matches[0]) || $count == 0)
89
  return $template; // no statements;
90
 
@@ -93,19 +95,20 @@ class simpleTemplate
93
  $content = '';
94
  $field = $matches[1][$i];
95
  $repeatline = $matches[2][$i];
96
-
97
  if (isset($object->$field))
98
  {
99
  foreach($object->$field as $key => $item)
100
  {
101
  if (is_array($item))
102
  {
 
103
  $line = $repeatline;
104
 
105
  foreach($item as $subkey => $subitem)
106
  {
107
  $line = str_replace('%%' . $subkey . '%%',$subitem, $line);
108
-
109
  }
110
  $line = str_replace('%%key%%', $key, $line);
111
  $content .= $line;
@@ -113,6 +116,8 @@ class simpleTemplate
113
  else
114
  {
115
  $line = str_replace('%%key%%',$key, $repeatline);
 
 
116
  $content .= str_replace('%%item%%', $item, $line);
117
  }
118
  }
14
  return false;
15
  }
16
  $template = file_get_contents($template_file);
17
+
18
+
19
+ $template = static::checkfor($template, $object);
20
+ $template = static::checkif($template, $object);
21
  $template = static::checkvar($template, $object);
22
 
23
 
67
  {
68
  list($field, $value) = explode('=', $field);
69
  }
70
+
71
 
72
  $content = $matches[2][$i];
73
 
74
  if (isset($object->$field) && ($value == null || $object->$field == $value) )
75
+ { // match
76
  $template = str_replace($full, $content, $template);
77
  }
78
  else
79
+ { // no match
80
  $template = str_replace($full, '', $template);
81
  }
82
  }
85
 
86
  public static function checkfor($template, $object)
87
  {
88
+ $count = preg_match_all('/\{for:(.*)\}(.*)\{\/for:(.*)\}/isU', $template, $matches);
89
+
90
  if (! isset($matches[0]) || $count == 0)
91
  return $template; // no statements;
92
 
95
  $content = '';
96
  $field = $matches[1][$i];
97
  $repeatline = $matches[2][$i];
98
+
99
  if (isset($object->$field))
100
  {
101
  foreach($object->$field as $key => $item)
102
  {
103
  if (is_array($item))
104
  {
105
+
106
  $line = $repeatline;
107
 
108
  foreach($item as $subkey => $subitem)
109
  {
110
  $line = str_replace('%%' . $subkey . '%%',$subitem, $line);
111
+ $line = static::checkif($line, $object);
112
  }
113
  $line = str_replace('%%key%%', $key, $line);
114
  $content .= $line;
116
  else
117
  {
118
  $line = str_replace('%%key%%',$key, $repeatline);
119
+
120
+ $line = static::checkif($line, $object); // check if statements in the loop.
121
  $content .= str_replace('%%item%%', $item, $line);
122
  }
123
  }
assets/scss/_editor.scss CHANGED
@@ -117,7 +117,7 @@
117
  // note that nth targets elements, not classes so nth
118
  label {
119
  margin-top: 2px;
120
- &.color { margin-top: 5px; }
121
  }
122
 
123
  label:nth-of-type(2) {
@@ -314,13 +314,13 @@
314
  padding: 5px 0 5px 5px;
315
  }
316
  }
317
- .input.color {
318
  float: left;
319
  position: relative;
320
  margin-top: 5px;
321
 
322
  .wp-picker-container.wp-picker-active {
323
- padding: 30px;
324
  border: 1px solid #ccc;
325
  background-color: #fff;
326
  position: absolute;
117
  // note that nth targets elements, not classes so nth
118
  label {
119
  margin-top: 2px;
120
+ &.mbcolor { margin-top: 5px; }
121
  }
122
 
123
  label:nth-of-type(2) {
314
  padding: 5px 0 5px 5px;
315
  }
316
  }
317
+ .input.mbcolor {
318
  float: left;
319
  position: relative;
320
  margin-top: 5px;
321
 
322
  .wp-picker-container.wp-picker-active {
323
+ padding: 15px;
324
  border: 1px solid #ccc;
325
  background-color: #fff;
326
  position: absolute;
assets/scss/_elements.scss CHANGED
@@ -14,7 +14,7 @@ select {
14
 
15
 
16
  img { vertical-align: middle; }
17
- &.color { min-width: 50px; }
18
  &.checkbox { //padding-top: 8px;
19
  input { margin-top: 0; }
20
  label {
@@ -82,7 +82,7 @@ textarea {
82
 
83
  // finetuning
84
  .option-container .inside .option {
85
- label.color:nth-of-type(2) {
86
  margin-left: 37px;
87
 
88
  }
@@ -336,7 +336,7 @@ textarea {
336
 
337
  /** COLORPICKER **/
338
 
339
- .input.color {
340
  margin-top: 5px;
341
  position: relative;
342
 
14
 
15
 
16
  img { vertical-align: middle; }
17
+ &.mbcolor { min-width: 50px; }
18
  &.checkbox { //padding-top: 8px;
19
  input { margin-top: 0; }
20
  label {
82
 
83
  // finetuning
84
  .option-container .inside .option {
85
+ label.mbcolor:nth-of-type(2) {
86
  margin-left: 37px;
87
 
88
  }
336
 
337
  /** COLORPICKER **/
338
 
339
+ .input.mbcolor {
340
  margin-top: 5px;
341
  position: relative;
342
 
blocks/advanced.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $blockClass["advanced"] = "advancedBlock";
4
  $blockOrder[80][] = "advanced";
5
 
6
- use MaxButtons\maxBlocks as maxBlocks;
7
- use MaxButtons\maxField as maxField;
8
 
9
  class advancedBlock extends maxBlock
10
  {
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $blockClass["advanced"] = "advancedBlock";
5
  $blockOrder[80][] = "advanced";
6
 
 
 
7
 
8
  class advancedBlock extends maxBlock
9
  {
blocks/basic.php CHANGED
@@ -1,11 +1,10 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  $blockClass["basic"] = "basicBlock";
5
  $blockOrder[0][] = "basic";
6
 
7
- use MaxButtons\maxBlocks as maxBlocks;
8
- use MaxButtons\maxField as maxField;
9
 
10
  class basicBlock extends maxBlock
11
  {
@@ -18,7 +17,7 @@ class basicBlock extends maxBlock
18
  "new_window" => array("default" => 0),
19
  "nofollow" => array("default" => 0)
20
  );
21
- protected $protocols = array("http","https",'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'sms', 'callto', 'fax', 'xmpp', "javascript"); // allowed url protocols for esc_url functions
22
 
23
 
24
  function __construct()
@@ -142,7 +141,6 @@ class basicBlock extends maxBlock
142
  {
143
 
144
  $data = $this->data[$this->blockname];
145
-
146
  $button_id = $this->data["id"];
147
 
148
  $anchor = $domObj->find("a",0);
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  $blockClass["basic"] = "basicBlock";
6
  $blockOrder[0][] = "basic";
7
 
 
 
8
 
9
  class basicBlock extends maxBlock
10
  {
17
  "new_window" => array("default" => 0),
18
  "nofollow" => array("default" => 0)
19
  );
20
+ protected $protocols = array("http","https",'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'sms', 'callto', 'fax', 'xmpp', "javascript", 'file'); // allowed url protocols for esc_url functions
21
 
22
 
23
  function __construct()
141
  {
142
 
143
  $data = $this->data[$this->blockname];
 
144
  $button_id = $this->data["id"];
145
 
146
  $anchor = $domObj->find("a",0);
blocks/border.php CHANGED
@@ -1,11 +1,9 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $blockClass["border"] = "borderBlock";
4
  $blockOrder[30][] = "border";
5
 
6
- use MaxButtons\maxBlocks as maxBlocks;
7
- use MaxButtons\maxField as maxField;
8
-
9
  class borderBlock extends maxBlock
10
  {
11
  protected $blockname = "border";
@@ -71,6 +69,7 @@ class borderBlock extends maxBlock
71
 
72
  public function admin_fields()
73
  {
 
74
  $data = $this->data[$this->blockname];
75
  foreach($this->fields as $field => $options)
76
  {
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $blockClass["border"] = "borderBlock";
5
  $blockOrder[30][] = "border";
6
 
 
 
 
7
  class borderBlock extends maxBlock
8
  {
9
  protected $blockname = "border";
69
 
70
  public function admin_fields()
71
  {
72
+
73
  $data = $this->data[$this->blockname];
74
  foreach($this->fields as $field => $options)
75
  {
blocks/color.php CHANGED
@@ -1,11 +1,10 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  $blockClass["color"] = "colorBlock";
5
  $blockOrder[10][] = "color";
6
 
7
- use MaxButtons\maxBlocks as maxBlocks;
8
- use MaxButtons\maxField as maxField;
9
 
10
  class colorBlock extends maxBlock
11
  {
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  $blockClass["color"] = "colorBlock";
6
  $blockOrder[10][] = "color";
7
 
 
 
8
 
9
  class colorBlock extends maxBlock
10
  {
blocks/container.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $blockClass["container"] = "containerBlock";
4
  $blockOrder[70][] = "container";
5
 
6
- use MaxButtons\maxBlocks as maxBlocks;
7
- use MaxButtons\maxField as maxField;
8
 
9
  class containerBlock extends maxBlock
10
  {
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $blockClass["container"] = "containerBlock";
5
  $blockOrder[70][] = "container";
6
 
7
+ use \simple_html_dom as simple_html_dom;
 
8
 
9
  class containerBlock extends maxBlock
10
  {
blocks/dimension.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $blockClass["dimension"] = "dimensionBlock";
4
  $blockOrder[20][] = "dimension";
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $blockClass["dimension"] = "dimensionBlock";
5
  $blockOrder[20][] = "dimension";
blocks/gradient.php CHANGED
@@ -1,10 +1,8 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $blockClass["gradient"] = "gradientBlock";
4
  $blockOrder[40][] = "gradient";
5
-
6
- use MaxButtons\maxBlocks as maxBlocks;
7
- use MaxButtons\maxField as maxField;
8
 
9
  class gradientBlock extends maxBlock
10
  {
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $blockClass["gradient"] = "gradientBlock";
5
  $blockOrder[40][] = "gradient";
 
 
 
6
 
7
  class gradientBlock extends maxBlock
8
  {
blocks/icon.php CHANGED
@@ -1,8 +1,11 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $blockClass["icon"] = "iconBlock";
4
  $blockOrder[60][] = "icon";
5
 
 
 
6
  class iconBlock extends maxBlock
7
  {
8
  protected $blockname = "icon";
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $blockClass["icon"] = "iconBlock";
5
  $blockOrder[60][] = "icon";
6
 
7
+ use \simple_html_dom as simple_html_dom;
8
+
9
  class iconBlock extends maxBlock
10
  {
11
  protected $blockname = "icon";
blocks/meta.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
  $blockClass["meta"] = "metaBlock";
3
  $blockOrder[100][] = "meta";
4
 
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
+
5
  $blockClass["meta"] = "metaBlock";
6
  $blockOrder[100][] = "meta";
7
 
blocks/responsive.php CHANGED
@@ -1,12 +1,9 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $blockClass["responsive"] = "responsiveBlock";
4
  $blockOrder[90][] = "responsive";
5
 
6
- use MaxButtons\maxBlocks as maxBlocks;
7
- use MaxButtons\maxField as maxField;
8
-
9
-
10
  class responsiveBlock extends maxBlock
11
  {
12
  protected $blockname = 'responsive';
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $blockClass["responsive"] = "responsiveBlock";
5
  $blockOrder[90][] = "responsive";
6
 
 
 
 
 
7
  class responsiveBlock extends maxBlock
8
  {
9
  protected $blockname = 'responsive';
blocks/text.php CHANGED
@@ -1,11 +1,9 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $blockClass["text"] = "textBlock";
4
  $blockOrder[50][] = "text";
5
 
6
- use MaxButtons\maxBlocks as maxBlocks;
7
- use MaxButtons\maxField as maxField;
8
-
9
  class textBlock extends maxBlock
10
  {
11
 
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $blockClass["text"] = "textBlock";
5
  $blockOrder[50][] = "text";
6
 
 
 
 
7
  class textBlock extends maxBlock
8
  {
9
 
blocks/tpl/button.tpl CHANGED
@@ -1,5 +1,5 @@
1
  {if:label}<label>%%label%%</label>{/if:label}
2
- <div class='input checkbox %%name%%'>
3
  <button id='%%id%%' type='button' class='button {if:inputclass}%%inputclass%%{/if:inputclass}'
4
  {if:modal}data-modal='%%modal%%'{/if:modal} > %%button_label%% </button>
5
 
1
  {if:label}<label>%%label%%</label>{/if:label}
2
+ <div class='input %%name%%' {if:conditional}data-show="%%conditional%%"{/if:conditional}>
3
  <button id='%%id%%' type='button' class='button {if:inputclass}%%inputclass%%{/if:inputclass}'
4
  {if:modal}data-modal='%%modal%%'{/if:modal} > %%button_label%% </button>
5
 
blocks/tpl/color.tpl CHANGED
@@ -1,6 +1,6 @@
1
- {if:label} <label for='%%id%%' class='color'>%%label%%</label> {/if:label}
2
 
3
- <div class="input color %%name%%" {if:conditional}data-show="%%conditional%%"{/if:conditional}>
4
 
5
  <input type="text" name="%%name%%" id="%%id%%" class="color-field" value="%%value%%">
6
  {if:copycolor} <div class="arrows %%copypos%%" data-id="%%id%%" data-bind="%%bindto%%"><div class='right'><span class='arrow-right'></div><div class='left'><span class='arrow-left'></div></div> {/if:copycolor}
1
+ {if:label} <label for='%%id%%' class='mbcolor'>%%label%%</label> {/if:label}
2
 
3
+ <div class="input mbcolor %%name%%" {if:conditional}data-show="%%conditional%%"{/if:conditional}>
4
 
5
  <input type="text" name="%%name%%" id="%%id%%" class="color-field" value="%%value%%">
6
  {if:copycolor} <div class="arrows %%copypos%%" data-id="%%id%%" data-bind="%%bindto%%"><div class='right'><span class='arrow-right'></div><div class='left'><span class='arrow-left'></div></div> {/if:copycolor}
blocks/tpl/end.tpl CHANGED
@@ -1 +1 @@
1
- </div>
1
+ </div> <!-- end -->
blocks/tpl/option_select.tpl CHANGED
@@ -3,7 +3,7 @@
3
  <div class="input option_select %%name%%" {if:conditional}data-show="%%conditional%%"{/if:conditional}>
4
  <select name='%%name%%' id='%%id%%'>
5
  {for:options}
6
- <option name='%%key%%'>%%item%%</option>
7
  {/for:options}
8
  </select>
9
  </div>
3
  <div class="input option_select %%name%%" {if:conditional}data-show="%%conditional%%"{/if:conditional}>
4
  <select name='%%name%%' id='%%id%%'>
5
  {for:options}
6
+ <option value='%%key%%' {if:selected=%%key%%} selected {/if:selected=%%key%%} >%%item%%</option>
7
  {/for:options}
8
  </select>
9
  </div>
blocks/tpl/start.tpl CHANGED
@@ -1,2 +1,3 @@
 
1
  <div class="%%main_class%% %%name%%" {if:start_conditional}data-show="%%start_conditional%%"{/if:start_conditional}>
2
  {if:note}<p class='note'>%%note%%</p>{/if:note}
1
+ <!-- start -->
2
  <div class="%%main_class%% %%name%%" {if:start_conditional}data-show="%%start_conditional%%"{/if:start_conditional}>
3
  {if:note}<p class='note'>%%note%%</p>{/if:note}
classes/admin-class.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  class maxButtonsAdmin
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  class maxButtonsAdmin
classes/block.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  /** A block is a combination of related settings.
@@ -22,16 +23,16 @@ abstract class maxBlock
22
  {
23
 
24
  // filters for save_post, display etc. Buttons class will the filters.
25
- add_filter('mb-save-fields', array($this, 'save_fields'),10,2);
26
- add_action('mb-admin-fields', array($this,'admin_fields' ) );
27
- add_action('mb-data-load', array($this,'set') );
28
 
29
- add_filter('mb-parse-button', array($this, 'parse_button'),10,2 );
30
- add_filter('mb-js-blocks', array($this, 'parse_js'), 10, 2);
31
  //add_filter('mb-parse-element-preview', array($this,'parse_element'), 10,2);
32
 
33
- add_filter('mb-css-blocks', array($this, 'parse_css'),10,2 );
34
- add_filter('mb-field-map', array($this, 'map_fields') );
35
 
36
 
37
  $this->fields = apply_filters($this->blockname. "-block-fields",$this->fields);
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  /** A block is a combination of related settings.
23
  {
24
 
25
  // filters for save_post, display etc. Buttons class will the filters.
26
+ //add_filter('mb-save-fields', array($this, 'save_fields'),10,2);
27
+ //add_action('mb-admin-fields', array($this,'admin_fields' ) );
28
+ //add_action('mb-data-load', array($this,'set') );
29
 
30
+ //add_filter('mb-parse-button', array($this, 'parse_button'),10,2 );
31
+ //add_filter('mb-js-blocks', array($this, 'parse_js'), 10, 2);
32
  //add_filter('mb-parse-element-preview', array($this,'parse_element'), 10,2);
33
 
34
+ //add_filter('mb-css-blocks', array($this, 'parse_css'),10,2 );
35
+ //add_filter('mb-field-map', array($this, 'map_fields') );
36
 
37
 
38
  $this->fields = apply_filters($this->blockname. "-block-fields",$this->fields);
classes/blocks.php CHANGED
@@ -6,21 +6,103 @@ defined('ABSPATH') or die('No direct access permitted');
6
  *
7
  * Class for general block functions - transitional
8
  */
9
- use MaxButtons\maxBlocks as maxBlocks;
 
 
10
 
11
  class maxBlocks
12
  {
13
  protected static $blocks; // collection!
 
14
 
15
  protected static $data; // full data array
16
  protected static $fields = array(); // all fields
17
 
18
  public static function init()
19
  {
20
- add_action('mb-data-load', array('MaxButtons\maxBlocks', 'data') );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  }
22
 
23
- public static function data($data)
 
 
 
 
 
 
 
 
 
24
  {
25
  $new_data = array(); //egalite
26
  foreach($data as $block => $fields)
@@ -34,8 +116,9 @@ class maxBlocks
34
  public static function add($block)
35
  {
36
  $name = $block->get_name();
37
- self::$blocks[$name] = $block;
38
- self::$fields = array_merge(self::$fields, $block->get_fields());
 
39
  }
40
 
41
  public static function getValue($fieldname)
6
  *
7
  * Class for general block functions - transitional
8
  */
9
+ use \RecursiveDirectoryIterator as RecursiveDirectoryIterator;
10
+ use \RecursiveIteratorIterator as RecursiveIteratorIterator;
11
+ use \FilesystemIterator as FilesystemIterator;
12
 
13
  class maxBlocks
14
  {
15
  protected static $blocks; // collection!
16
+ protected static $block_classes;
17
 
18
  protected static $data; // full data array
19
  protected static $fields = array(); // all fields
20
 
21
  public static function init()
22
  {
23
+
24
+ }
25
+
26
+ /** Find the block classes */
27
+ public static function initBlocks()
28
+ {
29
+
30
+ $block_paths = apply_filters('mb-block-paths', array(MB()->get_plugin_path() . "blocks/") );
31
+
32
+ //global $blockClass; // load requires only onc
33
+
34
+ $newBlocks = array();
35
+ $templates = array();
36
+
37
+
38
+ foreach($block_paths as $block_path)
39
+ {
40
+ $dir_iterator = new RecursiveDirectoryIterator($block_path, FilesystemIterator::SKIP_DOTS);
41
+ $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST);
42
+
43
+ foreach ($iterator as $fileinfo)
44
+ {
45
+
46
+ $path = $fileinfo->getRealPath();
47
+ // THIS IS PHP > 5.3.6
48
+ //$extension = $fileinfo->getExtension();
49
+ $extension = pathinfo($path, PATHINFO_EXTENSION);
50
+
51
+ if ($fileinfo->isFile() )
52
+ {
53
+ if ($extension == 'php')
54
+ {
55
+ require_once($path);
56
+ }
57
+ elseif($extension == 'tpl')
58
+ {
59
+ $filename = $fileinfo->getBasename('.tpl');
60
+ $templates[$filename] = array('path' => $path);
61
+ }
62
+ }
63
+ }
64
+
65
+ }
66
+ ksort($blockOrder);
67
+ foreach($blockOrder as $prio => $blockArray)
68
+ {
69
+ foreach($blockArray as $block)
70
+ {
71
+ if (isset($blockClass[$block]))
72
+ $newBlocks[$block] = $blockClass[$block];
73
+
74
+ }
75
+ }
76
+ $blockClass = $newBlocks;
77
+ if (is_admin())
78
+ {
79
+ // possible issue with some hosters faking is_admin flag.
80
+ if (class_exists( maxUtils::namespaceit('maxBlocks') ) && class_exists( maxUtils::namespaceit('maxBlocks') ) )
81
+ {
82
+ maxField::setTemplates($templates);
83
+
84
+ }
85
+ else
86
+ {
87
+ error_log('[MaxButtons] - MaxField class is not set within admin context. This can cause issues when using button editor');
88
+ }
89
+ }
90
+
91
+ //$this->loadBlockClasses($blockClass);
92
+
93
+ static::$block_classes = array_values($blockClass);
94
  }
95
 
96
+ public static function getBlockClasses()
97
+ {
98
+ if ( is_null(static::$block_classes) )
99
+ self::initBlocks();
100
+
101
+ return static::$block_classes;
102
+ }
103
+
104
+
105
+ public static function setData($data)
106
  {
107
  $new_data = array(); //egalite
108
  foreach($data as $block => $fields)
116
  public static function add($block)
117
  {
118
  $name = $block->get_name();
119
+
120
+ static::$blocks[$name] = $block;
121
+ static::$fields = array_merge(self::$fields, $block->get_fields());
122
  }
123
 
124
  public static function getValue($fieldname)
classes/button.php CHANGED
@@ -1,13 +1,12 @@
1
  <?php
2
-
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  /* Datamodel and base functionality for a button
6
 
7
  */
8
 
9
- use MaxButtons\maxBlocks as maxBlocks;
10
- use MaxButtons\maxField as maxField;
11
 
12
  class maxButton
13
  {
@@ -21,10 +20,10 @@ class maxButton
21
  protected $button_loaded = false;
22
 
23
  protected $data = array();
24
- protected $blocks; //= array('basic', 'text' , 'border', 'color', 'gradient', 'container', 'advanced', 'responsive'); // Blocks
25
  protected $templates = array(); // .tpl files
26
 
27
- protected $button_css = array('normal' => array() ,':hover' => array() ,':visited' => array(), "responsive" => array());
28
  protected $button_js = array();
29
 
30
  // output conditions
@@ -33,7 +32,7 @@ class maxButton
33
 
34
  protected $cssParser = false;
35
  protected $parsed_css = '';
36
-
37
 
38
  /* Class constructor
39
 
@@ -48,105 +47,45 @@ class maxButton
48
  // get all files from blocks map
49
 
50
  // get all blocks via apply filters, do init. Init should not load anything big.
 
51
 
52
-
53
- $block_paths = apply_filters('mb-block-paths', array(MB()->get_plugin_path() . "blocks/") );
54
-
55
- global $blockClass; // load requires only once
56
-
57
- if ($blockClass == '' || count($blockClass) == 0)
58
- {
59
-
60
- $newBlocks = array();
61
-
62
- foreach($block_paths as $block_path)
63
- {
64
- $dir_iterator = new RecursiveDirectoryIterator($block_path, FilesystemIterator::SKIP_DOTS);
65
- $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST);
66
-
67
- foreach ($iterator as $fileinfo)
68
- {
69
-
70
- $path = $fileinfo->getRealPath();
71
- // THIS IS PHP > 5.3.6
72
- //$extension = $fileinfo->getExtension();
73
- $extension = pathinfo($path, PATHINFO_EXTENSION);
74
-
75
- if ($fileinfo->isFile() )
76
- {
77
- if ($extension == 'php')
78
- {
79
- require_once($path);
80
- }
81
- elseif($extension == 'tpl')
82
- {
83
- $filename = $fileinfo->getBasename('.tpl');
84
- $this->templates[$filename] = array('path' => $path);
85
- }
86
- }
87
- }
88
-
89
- }
90
- ksort($blockOrder);
91
- foreach($blockOrder as $prio => $blockArray)
92
- {
93
- foreach($blockArray as $block)
94
- {
95
- if (isset($blockClass[$block]))
96
- $newBlocks[$block] = $blockClass[$block];
97
-
98
- }
99
- }
100
- $blockClass = $newBlocks;
101
- if (is_admin())
102
- {
103
- // possible issue with some hosters faking is_admin flag.
104
- if (class_exists('MaxButtons\maxBlocks') && class_exists('MaxButtons\maxBlocks') )
105
- {
106
- maxField::setTemplates($this->templates);
107
- maxBlocks::init();
108
- }
109
- else
110
- {
111
- error_log('[MaxButtons] - MaxField class is not set within admin context. This can cause issues when using button editor');
112
- }
113
- }
114
- $this->loadBlockClasses($blockClass);
115
-
116
-
117
-
118
- }
119
-
120
- $this->blocks = array_keys($blockClass);
121
  }
122
 
123
  /* Makes overriding block features possible by subclass
124
 
125
  */
126
- private function loadBlockClasses($classes)
127
  {
 
128
  // set blocks to the 'block name' that survived.
129
  maxUtils::addTime("Load Block classes");
130
 
131
- $classes = apply_filters("mb_blockclassesload", $classes);
132
-
 
133
 
134
- foreach($classes as $block => $class)
 
 
 
 
 
135
  {
136
- $block = new $class();
137
- if (is_admin())
138
- maxBlocks::add($block); // block collection.
139
  }
 
140
 
141
- do_action("mb_blockclassesloaded", $classes);
 
 
142
 
143
  }
144
 
145
- /** Simple function to retrieve loaded blocks - * Questionable if in use */
146
- public function getDefinedBlocks()
147
  {
148
  return $this->blocks;
149
- }
150
 
151
  /** Get Data from Database and set variables
152
  *
@@ -194,35 +133,45 @@ class maxButton
194
  unset($this->data);
195
  unset($this->button_css);
196
  $this->id = 0; // clear id
197
- $this->button_css = array('normal' => array() ,':hover' => array() ,':visited' => array(), "responsive" => array());
198
  $this->button_js = array();
199
  $this->data = array('id' => 0);
200
  $this->data = $this->save(array(),false);
 
201
  $this->cache = '';
202
  $this->button_loaded = false;
203
- $this->reloadData();
 
 
 
 
 
204
  }
205
 
206
  function setupData($data)
207
  {
 
208
  maxUtils::addTime("Button: Setup data");
209
  foreach($this->blocks as $block)
210
  {
 
211
 
212
- if (array_key_exists($block, $data)) // strangely isset doesn't work
213
  {
214
- $this->data[$block] = maybe_unserialize($data[$block]); // allow to feed unserialized stuff not from dbase
215
- if (! is_array($this->data[$block]))
216
  {
217
- $this->data[$block] = json_decode($data[$block], true);
218
  }
219
 
220
  }
221
  }
222
-
223
  $this->id = $data["id"];
224
 
225
- $this->document_id = maxButtons::getDocumentID(array("button_id" => $this->id));
 
 
226
  $this->cache = isset($data["cache"]) ? trim($data["cache"]) : ''; // not set at button packs / non-dbase buttons!
227
  $this->data["id"] = $this->id; // needed for certain blocks, to be button aware.
228
  $this->data["document_id"] = $this->document_id; // bound to JS and others.
@@ -230,7 +179,14 @@ class maxButton
230
  $this->status = $data["status"];
231
  $this->description = $this->data["basic"]["description"];
232
 
233
- do_action('mb-data-load', $this->data);
 
 
 
 
 
 
 
234
 
235
  return true;
236
 
@@ -294,6 +250,7 @@ class maxButton
294
  $this->cache = $cache;
295
  }
296
 
 
297
  function setData($blockname, $data )
298
  {
299
  foreach($data as $key => $value)
@@ -302,15 +259,17 @@ class maxButton
302
 
303
  }
304
  }
 
305
 
306
- /* Tell all blocks to reload the daa
307
 
308
  This function will tell all loaded blocks to reload it's data. This is needed when data is changed after the initial button load.
309
 
310
  */
311
  function reloadData()
312
  {
313
- do_action('mb-data-load', $this->data);
 
314
 
315
  }
316
 
@@ -340,7 +299,11 @@ class maxButton
340
  else
341
  {
342
  /* Internal filter, please don't use */
343
- $css = apply_filters('mb-css-blocks', $css, $mode);
 
 
 
 
344
 
345
  /* Filter the raw CSS array before compile
346
 
@@ -377,7 +340,12 @@ class maxButton
377
  {
378
  maxUtils::addTime("Button :: parse JS");
379
  $js = $this->button_js;
380
- $js = apply_filters('mb-js-blocks', $js, $mode);
 
 
 
 
 
381
  $this->button_js = $js;
382
  }
383
 
@@ -406,7 +374,12 @@ class maxButton
406
  $domObj = new simple_html_dom();
407
  $domObj->load('<a class="' . $classes . '"></a>');
408
 
409
- $domObj = apply_filters('mb-parse-button', $domObj, $mode, $this->id);
 
 
 
 
 
410
 
411
  $domObj->load($domObj->save());
412
 
@@ -419,7 +392,12 @@ class maxButton
419
  /* Display all data and html to allow users to edit button settings */
420
  public function admin_fields()
421
  {
422
- do_action('mb-admin-fields' );
 
 
 
 
 
423
 
424
  }
425
 
@@ -447,10 +425,10 @@ class maxButton
447
  if (! $args["mode"] == 'editor' )
448
  return;
449
 
450
- $data = apply_filters("mb-save-fields", array(), array() ); // load defaults
451
- $data["id"] = 0;
452
- $this->data = $data;
453
- do_action('mb-data-load', $data);
454
  }
455
 
456
  $mode = (isset($args["mode"])) ? $args["mode"] : "normal";
@@ -472,11 +450,11 @@ class maxButton
472
  break;
473
  }
474
 
475
- //echo "<PRE>"; print_R($this->id); print_R($this->data); echo "</PRE>";
476
- // Apply filters for genera data override
477
 
478
  $this->data = apply_filters('mb/button/data_before_display', $this->data, $mode, array('preview' => $preview, 'compile' => $compile) ); // hooks
479
- $this->reloadData(); // reload
480
 
481
 
482
  if ( $this->load_css == "element" || $args["preview_part"] != "full" || $args["compile"] == true) { // if css output is on element, for to compile - otherwise inline styles will not be loaded.
@@ -486,7 +464,12 @@ class maxButton
486
  else
487
  $compile = false;
488
 
 
489
 
 
 
 
 
490
 
491
  $domObj = $this->parse_button($mode);
492
 
@@ -565,7 +548,11 @@ class maxButton
565
  public function display_field_map()
566
  {
567
  $map = array();
568
- $map = apply_filters("mb-field-map",$map);
 
 
 
 
569
 
570
 
571
  echo "<script language='javascript'>";
@@ -670,7 +657,13 @@ class maxButton
670
  public function save($post, $savedb = true)
671
  {
672
  $post = stripslashes_deep($post); // don't multiply slashes please.
673
- $data = apply_filters('mb-save-fields',$this->data, $post);
 
 
 
 
 
 
674
 
675
  if (! $savedb ) return $data;
676
  return $this->update($data); // save to db.
@@ -686,10 +679,12 @@ class maxButton
686
  $fields = array();
687
  foreach($this->blocks as $block)
688
  {
689
- if (isset($data[$block]))
 
 
690
  {
691
- $blockData = $data[$block];
692
- $fields[$block] = json_encode($blockData);
693
  }
694
  }
695
  if (isset($data["name"])) { // other fields.
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  /* Datamodel and base functionality for a button
6
 
7
  */
8
 
9
+ use \simple_html_dom as simple_html_dom;
 
10
 
11
  class maxButton
12
  {
20
  protected $button_loaded = false;
21
 
22
  protected $data = array();
23
+ protected $blocks; // Block Classes
24
  protected $templates = array(); // .tpl files
25
 
26
+ protected $button_css = array();
27
  protected $button_js = array();
28
 
29
  // output conditions
32
 
33
  protected $cssParser = false;
34
  protected $parsed_css = '';
35
+
36
 
37
  /* Class constructor
38
 
47
  // get all files from blocks map
48
 
49
  // get all blocks via apply filters, do init. Init should not load anything big.
50
+ $this->loadBlockClasses();
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  }
53
 
54
  /* Makes overriding block features possible by subclass
55
 
56
  */
57
+ private function loadBlockClasses()
58
  {
59
+
60
  // set blocks to the 'block name' that survived.
61
  maxUtils::addTime("Load Block classes");
62
 
63
+ //$classes = apply_filters("mb_blockclassesload", $classes);
64
+ $class_array = maxBlocks::getBlockClasses();
65
+ $classes = array_map(maxUtils::namespaceit('maxUtils::array_namespace'), $class_array );
66
 
67
+ foreach($classes as $block => $class)
68
+ {
69
+ $block = new $class();
70
+
71
+ $this->blocks[] = $block;
72
+ if (is_admin())
73
  {
74
+ maxBlocks::add($block); // block collection.
 
 
75
  }
76
+ }
77
 
78
+
79
+ $this->clear(); // init
80
+ do_action("mb\blockclasses", $class_array);
81
 
82
  }
83
 
84
+ /** Simple function to retrieve loaded blocks - * Used by install class */
85
+ public function getBlocks()
86
  {
87
  return $this->blocks;
88
+ }
89
 
90
  /** Get Data from Database and set variables
91
  *
133
  unset($this->data);
134
  unset($this->button_css);
135
  $this->id = 0; // clear id
136
+ $this->button_css = array();
137
  $this->button_js = array();
138
  $this->data = array('id' => 0);
139
  $this->data = $this->save(array(),false);
140
+
141
  $this->cache = '';
142
  $this->button_loaded = false;
143
+
144
+ foreach($this->blocks as $block)
145
+ {
146
+ $block->set($this->data); // reset blocks
147
+ }
148
+
149
  }
150
 
151
  function setupData($data)
152
  {
153
+
154
  maxUtils::addTime("Button: Setup data");
155
  foreach($this->blocks as $block)
156
  {
157
+ $block_name = $block->get_name();
158
 
159
+ if (array_key_exists($block_name, $data)) // strangely isset doesn't work
160
  {
161
+ $this->data[$block_name] = maybe_unserialize($data[$block_name]); // allow to feed unserialized stuff not from dbase
162
+ if (! is_array($this->data[$block_name]))
163
  {
164
+ $this->data[$block_name] = json_decode($data[$block_name], true);
165
  }
166
 
167
  }
168
  }
169
+
170
  $this->id = $data["id"];
171
 
172
+ // Because PHP 5.3
173
+ $class = maxUtils::namespaceit('maxButtons');
174
+ $this->document_id = $class::getDocumentID(array("button_id" => $this->id));
175
  $this->cache = isset($data["cache"]) ? trim($data["cache"]) : ''; // not set at button packs / non-dbase buttons!
176
  $this->data["id"] = $this->id; // needed for certain blocks, to be button aware.
177
  $this->data["document_id"] = $this->document_id; // bound to JS and others.
179
  $this->status = $data["status"];
180
  $this->description = $this->data["basic"]["description"];
181
 
182
+ //do_action('mb-data-load', $this->data);
183
+ foreach($this->blocks as $block)
184
+ {
185
+ $block->set($this->data);
186
+ }
187
+
188
+ maxBlocks::setData($this->data);
189
+
190
 
191
  return true;
192
 
250
  $this->cache = $cache;
251
  }
252
 
253
+ /* Used by collections and import. Use sparingly. Button data is reput to blocks on display */
254
  function setData($blockname, $data )
255
  {
256
  foreach($data as $key => $value)
259
 
260
  }
261
  }
262
+
263
 
264
+ /* Tell all blocks to reload the data
265
 
266
  This function will tell all loaded blocks to reload it's data. This is needed when data is changed after the initial button load.
267
 
268
  */
269
  function reloadData()
270
  {
271
+ exit('reload Data - do not use');
272
+ //do_action('mb-data-load', $this->data);
273
 
274
  }
275
 
299
  else
300
  {
301
  /* Internal filter, please don't use */
302
+ foreach($this->blocks as $block)
303
+ {
304
+ $css = $block->parse_css($css, $mode);
305
+ }
306
+ //$css = apply_filters('mb-css-blocks', $css, $mode);
307
 
308
  /* Filter the raw CSS array before compile
309
 
340
  {
341
  maxUtils::addTime("Button :: parse JS");
342
  $js = $this->button_js;
343
+ foreach($this->blocks as $block)
344
+ {
345
+ $js = $block->parse_js($js,$mode);
346
+
347
+ }
348
+
349
  $this->button_js = $js;
350
  }
351
 
374
  $domObj = new simple_html_dom();
375
  $domObj->load('<a class="' . $classes . '"></a>');
376
 
377
+
378
+ foreach($this->blocks as $block)
379
+ {
380
+ $domObj = $block->parse_button($domObj, $mode);
381
+ }
382
+
383
 
384
  $domObj->load($domObj->save());
385
 
392
  /* Display all data and html to allow users to edit button settings */
393
  public function admin_fields()
394
  {
395
+ foreach($this->blocks as $block)
396
+ {
397
+ $block->admin_fields();
398
+
399
+ }
400
+ //do_action('mb-admin-fields' );
401
 
402
  }
403
 
425
  if (! $args["mode"] == 'editor' )
426
  return;
427
 
428
+ $this->clear();
429
+
430
+ $this->data["id"] = 0;
431
+ //do_action('mb-data-load', $data);
432
  }
433
 
434
  $mode = (isset($args["mode"])) ? $args["mode"] : "normal";
450
  break;
451
  }
452
 
453
+
454
+ // Apply filters for general data override
455
 
456
  $this->data = apply_filters('mb/button/data_before_display', $this->data, $mode, array('preview' => $preview, 'compile' => $compile) ); // hooks
457
+
458
 
459
 
460
  if ( $this->load_css == "element" || $args["preview_part"] != "full" || $args["compile"] == true) { // if css output is on element, for to compile - otherwise inline styles will not be loaded.
464
  else
465
  $compile = false;
466
 
467
+ // reload the data into the blocks, might have been altered by shortcode, filters etc.
468
 
469
+ foreach($this->blocks as $block)
470
+ {
471
+ $block->set($this->data);
472
+ }
473
 
474
  $domObj = $this->parse_button($mode);
475
 
548
  public function display_field_map()
549
  {
550
  $map = array();
551
+ foreach($this->blocks as $block)
552
+ {
553
+ $map = $block->map_fields($map);
554
+ }
555
+ //$map = apply_filters("mb-field-map",$map);
556
 
557
 
558
  echo "<script language='javascript'>";
657
  public function save($post, $savedb = true)
658
  {
659
  $post = stripslashes_deep($post); // don't multiply slashes please.
660
+ //$data = apply_filters('mb-save-fields',$this->data, $post);
661
+ $data = $this->data;
662
+
663
+ foreach($this->blocks as $block)
664
+ {
665
+ $data = $block->save_fields($data, $post);
666
+ }
667
 
668
  if (! $savedb ) return $data;
669
  return $this->update($data); // save to db.
679
  $fields = array();
680
  foreach($this->blocks as $block)
681
  {
682
+ $block_name = $block->get_name();
683
+
684
+ if (isset($data[$block_name]))
685
  {
686
+ $blockData = $data[$block_name];
687
+ $fields[$block_name] = json_encode($blockData);
688
  }
689
  }
690
  if (isset($data["name"])) { // other fields.
classes/buttons.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
-
3
  /** Buttons class - handles paging issues and sanity check for individual buttons
4
  */
5
  class maxButtons
1
  <?php
2
+ namespace MaxButtons;
3
  /** Buttons class - handles paging issues and sanity check for individual buttons
4
  */
5
  class maxButtons
classes/collection-block.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  abstract class collectionBlock
1
  <?php
2
+ namespace maxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  abstract class collectionBlock
classes/collection.php CHANGED
@@ -1,6 +1,9 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
 
 
4
  class maxCollection
5
  {
6
  protected $collection_type = 'none';
@@ -495,10 +498,7 @@ class maxCollection
495
 
496
  if ($args["js_tag"])
497
  {
498
- $output .= "<script type='text/javascript'> ";
499
- // $output .= " if (typeof MBcollection" . $this->collection_id . " == 'undefined') { ";
500
- // $output .= " function MBcollection" . $this->collection_id . "() { ";
501
-
502
 
503
  }
504
 
@@ -702,7 +702,7 @@ class maxCollection
702
  $name = $button->getName();
703
 
704
  $meta = isset($button_data["meta"]) ? $button_data["meta"] : array();
705
- do_action('mb-data-load',$button_data); // weakness of the bubbling filter model
706
 
707
  $output .= "<div class='item shortcode-container' data-id='$button_id'> ";
708
  $output .= $button->display(array("mode" => "preview", 'echo' => false, 'load_css' => 'inline') ); //"mode" => "preview", "compile" => true,
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
+ use \simple_html_dom as simple_html_dom;
6
+
7
  class maxCollection
8
  {
9
  protected $collection_type = 'none';
498
 
499
  if ($args["js_tag"])
500
  {
501
+ $output .= "<script type='text/javascript'> ";
 
 
 
502
 
503
  }
504
 
702
  $name = $button->getName();
703
 
704
  $meta = isset($button_data["meta"]) ? $button_data["meta"] : array();
705
+ //do_action('mb-data-load',$button_data); // weakness of the bubbling filter model
706
 
707
  $output .= "<div class='item shortcode-container' data-id='$button_id'> ";
708
  $output .= $button->display(array("mode" => "preview", 'echo' => false, 'load_css' => 'inline') ); //"mode" => "preview", "compile" => true,
classes/collections.php CHANGED
@@ -1,6 +1,12 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
 
 
 
 
 
4
  class maxCollections
5
  {
6
  static $init = false;
@@ -63,7 +69,8 @@ class maxCollections
63
  // check for admin side, we need not hooks nor queries for this.
64
  if (is_admin())
65
  return;
66
-
 
67
  global $pagenow;
68
  if ( in_array($pagenow, array('wp-login.php', 'wp-register.php')) )
69
  return;
@@ -71,7 +78,9 @@ class maxCollections
71
  global $wpdb;
72
  $table = maxUtils::get_collection_table_name();
73
  $sql = "select collection_id, collection_key, collection_value from $table where
74
- collection_key in ('show_homepage','show_page','show_post', 'show_archive') ";
 
 
75
  $results = $wpdb->get_results($sql, ARRAY_A);
76
 
77
  $hook_array = array();
@@ -108,12 +117,12 @@ class maxCollections
108
 
109
  if (isset($hook_array["post"]) && count($hook_array["post"]) > 0)
110
  {
111
- add_filter("the_content", array('maxCollections', "doContentHooks"));
112
  }
113
  if (isset($hook_array["once"]) && count($hook_array["once"]) > 0)
114
  {
115
  //self::doFooterHooks(); // the stuff that goes once.
116
- add_action('wp_head', array('maxCollections', 'doFooterHooks'));
117
  }
118
 
119
  if (count($hook_array) > 0)
@@ -435,8 +444,10 @@ class maxCollections
435
  if (! self::$init) self::init();
436
 
437
  if (isset(self::$collectionClass[$name]))
438
- return new self::$collectionClass[$name];
439
-
 
 
440
  }
441
 
442
  /* This will find an user defined collection from the database by ID */
@@ -452,6 +463,9 @@ class maxCollections
452
  $type = $results["collection_type"];
453
 
454
  $usecol = self::getCollection($type);
 
 
 
455
  $usecol->set($id);
456
  return $usecol;
457
  }
@@ -488,7 +502,8 @@ class maxCollections
488
 
489
  if (isset(self::$collectionBlock[$name]))
490
  {
491
- return new self::$collectionBlock[$name];
 
492
  }
493
  else return false;
494
  }
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
+ use \RecursiveDirectoryIterator as RecursiveDirectoryIterator;
6
+ use \FilesystemIterator as FilesystemIterator;
7
+ use \RecursiveIteratorIterator as RecursiveIteratorIterator;
8
+
9
+
10
  class maxCollections
11
  {
12
  static $init = false;
69
  // check for admin side, we need not hooks nor queries for this.
70
  if (is_admin())
71
  return;
72
+
73
+
74
  global $pagenow;
75
  if ( in_array($pagenow, array('wp-login.php', 'wp-register.php')) )
76
  return;
78
  global $wpdb;
79
  $table = maxUtils::get_collection_table_name();
80
  $sql = "select collection_id, collection_key, collection_value from $table where
81
+ collection_key in ('show_homepage','show_page','show_post', 'show_archive')
82
+ and collection_id IN (select collection_id from $table where collection_key = 'collection_type'
83
+ and collection_value = 'social' ) ";
84
  $results = $wpdb->get_results($sql, ARRAY_A);
85
 
86
  $hook_array = array();
117
 
118
  if (isset($hook_array["post"]) && count($hook_array["post"]) > 0)
119
  {
120
+ add_filter("the_content", array(maxUtils::namespaceit('maxCollections'), "doContentHooks"));
121
  }
122
  if (isset($hook_array["once"]) && count($hook_array["once"]) > 0)
123
  {
124
  //self::doFooterHooks(); // the stuff that goes once.
125
+ add_action('wp_head', array(maxUtils::namespaceit('maxCollections'), 'doFooterHooks'));
126
  }
127
 
128
  if (count($hook_array) > 0)
444
  if (! self::$init) self::init();
445
 
446
  if (isset(self::$collectionClass[$name]))
447
+ {
448
+ $class = maxUtils::namespaceit(self::$collectionClass[$name]);
449
+ return new $class;
450
+ }
451
  }
452
 
453
  /* This will find an user defined collection from the database by ID */
463
  $type = $results["collection_type"];
464
 
465
  $usecol = self::getCollection($type);
466
+ if (! $usecol)
467
+ return false;
468
+
469
  $usecol->set($id);
470
  return $usecol;
471
  }
502
 
503
  if (isset(self::$collectionBlock[$name]))
504
  {
505
+ $class = maxUtils::namespaceit(self::$collectionBlock[$name]);
506
+ return new $class;
507
  }
508
  else return false;
509
  }
classes/field.php CHANGED
@@ -45,17 +45,24 @@ class maxField
45
  public $publish = true;
46
  public $output = '';
47
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  static function setTemplates($templates)
49
  {
50
  self::$templates = $templates;
51
 
52
  }
53
 
54
- public function __construct($template = 'text')
55
- {
56
- self::$position++;
57
- $this->template = $template;
58
- }
59
 
60
  public function setDefault($default)
61
  {
45
  public $publish = true;
46
  public $output = '';
47
 
48
+ public function __construct($template = 'text', $args = array() )
49
+ {
50
+ self::$position++;
51
+ $this->template = $template;
52
+
53
+ foreach($args as $item => $value)
54
+ {
55
+ $this->{$item} = $value;
56
+
57
+ }
58
+ }
59
+
60
  static function setTemplates($templates)
61
  {
62
  self::$templates = $templates;
63
 
64
  }
65
 
 
 
 
 
 
66
 
67
  public function setDefault($default)
68
  {
classes/groups.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- // handler for grouping buttons
3
-
4
- class maxGroups
5
- {
6
-
7
- function __construct()
8
- {
9
-
10
-
11
-
12
- }
13
-
14
- function set()
15
- {
16
-
17
-
18
- }
19
-
20
- function delete()
21
- {
22
-
23
-
24
- }
25
-
26
-
27
- function addButtons()
28
- {
29
-
30
-
31
- }
32
-
33
-
34
-
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/installation.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
  class maxInstall
3
  {
4
  static function activation_hook($network_wide) {
@@ -229,7 +232,7 @@ class maxInstall
229
 
230
  $table_name = maxUtils::get_table_name();
231
  $button = new maxButton();
232
- $blocks = $button->getDefinedBlocks();
233
 
234
  // IMPORTANT: There MUST be two spaces between the PRIMARY KEY keywords
235
  // and the column name, and the column name MUST be in parenthesis.
@@ -243,7 +246,9 @@ class maxInstall
243
 
244
  foreach($blocks as $block)
245
  {
246
- $sql .= "" . $block . " TEXT NULL, \n ";
 
 
247
  }
248
 
249
  $sql .= "updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
+
5
  class maxInstall
6
  {
7
  static function activation_hook($network_wide) {
232
 
233
  $table_name = maxUtils::get_table_name();
234
  $button = new maxButton();
235
+ $blocks = $button->getBlocks();
236
 
237
  // IMPORTANT: There MUST be two spaces between the PRIMARY KEY keywords
238
  // and the column name, and the column name MUST be in parenthesis.
246
 
247
  foreach($blocks as $block)
248
  {
249
+ $block_name = $block->get_name();
250
+
251
+ $sql .= "" . $block_name . " TEXT NULL, \n ";
252
  }
253
 
254
  $sql .= "updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
classes/integrations.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  // probably load this after all plugins are loaded.
@@ -9,7 +10,7 @@ class maxIntegrations
9
  static function init()
10
  {
11
  // check and init after plugin loaded.
12
- add_action('plugins_loaded', array('maxIntegrations', 'load_integrations'), 999);
13
 
14
  // integrations that fire right now, like ones that are based on actions and filters.
15
  // This are the ones that also can't crash the plugin, since it's hook based - no hook - no call.
@@ -34,7 +35,4 @@ class maxIntegrations
34
 
35
  }
36
 
37
-
38
-
39
-
40
  } // class
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  // probably load this after all plugins are loaded.
10
  static function init()
11
  {
12
  // check and init after plugin loaded.
13
+ add_action('plugins_loaded', array(maxUtils::namespaceit('maxIntegrations'), 'load_integrations'), 999);
14
 
15
  // integrations that fire right now, like ones that are based on actions and filters.
16
  // This are the ones that also can't crash the plugin, since it's hook based - no hook - no call.
35
 
36
  }
37
 
 
 
 
38
  } // class
classes/max-utils.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  // new class for the future.
@@ -8,23 +9,36 @@ class maxUtils
8
  protected static $timings = array();
9
  protected static $time_operations = array();
10
  protected static $timer = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  // central ajax action handler
13
  public static function ajax_action()
14
  {
15
  $status = 'error';
16
- $message = __( sprintf("No Handler found for action %s", $action), 'maxbuttons');
17
-
18
  $plugin_action = isset($_POST['plugin_action']) ? sanitize_text_field($_POST['plugin_action']) : '';
19
  $nonce = isset($_POST['nonce']) ? $_POST['nonce'] : false;
20
-
 
21
  if (! wp_verify_nonce($nonce, 'maxajax') )
22
  {
23
  $message = __('Nonce not verified', 'maxbuttons');
24
  }
25
  else
26
  {
27
- var_dump($plugin_action);
28
  do_action('maxbuttons/ajax/' . $plugin_action, $_POST);
29
  }
30
 
@@ -321,9 +335,9 @@ class maxUtils
321
  self::$timer = microtime(true);
322
 
323
  if (is_admin())
324
- add_filter("admin_footer",array('maxUtils', "showTime"), 100);
325
  else
326
- add_action("wp_footer",array('maxUtils', "showTime"));
327
 
328
  }
329
 
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  // new class for the future.
9
  protected static $timings = array();
10
  protected static $time_operations = array();
11
  protected static $timer = 0;
12
+
13
+
14
+ /** Callback for array filter to prepend namepaces. **/
15
+ public static function array_namespace($var)
16
+ {
17
+ $namespace = __NAMESPACE__ . '\\'; // PHP 5.3
18
+ return ($namespace . $var);
19
+ }
20
+
21
+ public static function namespaceit($var)
22
+ {
23
+ $namespace = __NAMESPACE__ . '\\'; // PHP 5.3
24
+ return $namespace . $var;
25
+ }
26
 
27
  // central ajax action handler
28
  public static function ajax_action()
29
  {
30
  $status = 'error';
31
+
 
32
  $plugin_action = isset($_POST['plugin_action']) ? sanitize_text_field($_POST['plugin_action']) : '';
33
  $nonce = isset($_POST['nonce']) ? $_POST['nonce'] : false;
34
+ $message = __( sprintf("No Handler found for action %s ", $plugin_action), 'maxbuttons');
35
+
36
  if (! wp_verify_nonce($nonce, 'maxajax') )
37
  {
38
  $message = __('Nonce not verified', 'maxbuttons');
39
  }
40
  else
41
  {
 
42
  do_action('maxbuttons/ajax/' . $plugin_action, $_POST);
43
  }
44
 
335
  self::$timer = microtime(true);
336
 
337
  if (is_admin())
338
+ add_filter("admin_footer",array(self::namespaceit('maxUtils'), "showTime"), 100);
339
  else
340
+ add_action("wp_footer",array(self::namespaceit('maxUtils'), "showTime"));
341
 
342
  }
343
 
classes/maxCSSParser.php CHANGED
@@ -1,4 +1,6 @@
1
  <?php
 
 
2
  /* Class to Parse CSS. Load as array with diffent pseudo-types,
3
  ability to add nested and new root blocks
4
  parses via scss
@@ -7,6 +9,9 @@
7
  auto-discovery of fields via domobj.
8
 
9
  */
 
 
 
10
  class maxCSSParser
11
  {
12
  protected $struct = array();
@@ -161,14 +166,13 @@ class maxCSSParser
161
 
162
  $tag = $el_data["tag"];
163
  $element_data = $this->findData($this->data, $element);
164
-
165
  // not using scss selectors here since there is trouble w/ the :pseudo selector, which should be put on the maxbutton / a tag.
166
  if ($element != '')
167
  { $el_add .= " ." . $element;
168
 
169
  }
170
-
171
-
172
  if (isset($element_data["responsive"]))
173
  {
174
  $responsive = $element_data["responsive"]; // doing that at the end
@@ -184,7 +188,7 @@ class maxCSSParser
184
  {
185
  // select the maxbutton case, ending with either space or next class -dot.
186
  $ps_selector = preg_replace('/.maxbutton$|.maxbutton([.| ])/i',".maxbutton:$pseudo\$1",$el_add);
187
-
188
  $this->output_css .= " $ps_selector { ";
189
  }
190
  else {
@@ -197,6 +201,7 @@ class maxCSSParser
197
  {
198
 
199
  $statement = $this->parse_cssline($values, $cssTag,$cssVal); ///"$cssTag $css_sep $cssVal$unit$css_end ";
 
200
  if ($statement)
201
  {
202
  $this->output_css .= $statement ;
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
  /* Class to Parse CSS. Load as array with diffent pseudo-types,
5
  ability to add nested and new root blocks
6
  parses via scss
9
  auto-discovery of fields via domobj.
10
 
11
  */
12
+
13
+ use \Exception as Exception;
14
+
15
  class maxCSSParser
16
  {
17
  protected $struct = array();
166
 
167
  $tag = $el_data["tag"];
168
  $element_data = $this->findData($this->data, $element);
169
+
170
  // not using scss selectors here since there is trouble w/ the :pseudo selector, which should be put on the maxbutton / a tag.
171
  if ($element != '')
172
  { $el_add .= " ." . $element;
173
 
174
  }
175
+
 
176
  if (isset($element_data["responsive"]))
177
  {
178
  $responsive = $element_data["responsive"]; // doing that at the end
188
  {
189
  // select the maxbutton case, ending with either space or next class -dot.
190
  $ps_selector = preg_replace('/.maxbutton$|.maxbutton([.| ])/i',".maxbutton:$pseudo\$1",$el_add);
191
+
192
  $this->output_css .= " $ps_selector { ";
193
  }
194
  else {
201
  {
202
 
203
  $statement = $this->parse_cssline($values, $cssTag,$cssVal); ///"$cssTag $css_sep $cssVal$unit$css_end ";
204
+
205
  if ($statement)
206
  {
207
  $this->output_css .= $statement ;
classes/maxbuttons-class.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  define('MAXBUTTONS_VERSION_KEY', 'maxbuttons_version');
@@ -53,12 +54,12 @@ class maxButtonsPlugin
53
  {
54
  add_action('admin_enqueue_scripts', array($this,'add_admin_styles'));
55
  add_action('admin_enqueue_scripts', array($this,'add_admin_scripts'));
56
- add_action('admin_enqueue_scripts', array('maxUtils', 'fixFAConflict'),999);
57
 
58
  add_action('admin_init', array($this,'register_settings' ));
59
 
60
  add_action('admin_init', array($this, 'do_review_notice')); // Ask for review
61
- add_action('admin_init', array('maxInstall','check_database'));
62
 
63
  add_action('admin_menu', array($this, 'admin_menu'));
64
  add_action('admin_footer', array($this, "footer"));
@@ -69,23 +70,23 @@ class maxButtonsPlugin
69
  add_action("mb/collection/display_notices", array($this,"display_notices"), 99);
70
  add_action('mb/header/display_notices', array($this, 'display_notices'), 99);
71
 
72
- add_action("wp_ajax_getAjaxButtons", array('maxButtonsAdmin', 'getAjaxButtons'));
73
  add_action("wp_ajax_set_review_notice_status", array($this, "setReviewNoticeStatus"));
74
 
75
  // Collection AJAX
76
- add_action("wp_ajax_collection-edit", array("maxCollections", "ajax_save"));
77
- add_action('wp_ajax_mbpro_collection_block', array("maxCollections", "ajax_action")); // all block level ajax stuff - for logged in users - backend
78
- add_action('wp_ajax_mb_button_action', array('maxButtons', "ajax_action"));
79
 
80
- add_action('wp_ajax_maxajax', array('maxUtils', 'ajax_action'));
81
  }
82
  // FRONT AJAX
83
- add_action('wp_ajax_mbpro_collection_block_front', array("maxCollections", "ajax_action_front")); // front end for all users
84
- add_action('wp_ajax_nopriv_mbpro_collection_block_front', array("maxCollections", "ajax_action_front"));
85
 
86
  // front scripts
87
  add_action('wp_enqueue_scripts', array($this, 'front_scripts'));
88
- add_action('wp_enqueue_scripts', array('maxUtils', 'fixFAConflict'),999);
89
 
90
  $this->setMainClasses(); // struct for override functionality
91
 
@@ -121,7 +122,7 @@ class maxButtonsPlugin
121
 
122
  );
123
 
124
- $this->mainClasses = $classes;
125
  }
126
 
127
  // from block loader action. Checks if all parts of the table are there, or panic if not.
@@ -159,7 +160,7 @@ class maxButtonsPlugin
159
 
160
  if (isset($this->mainClasses[$class]))
161
  {
162
- $load_class = $this->mainClasses[$class];
163
  if (method_exists($load_class,'getInstance'))
164
  {
165
  return $load_class::getInstance();
@@ -240,7 +241,7 @@ class maxButtonsPlugin
240
  $icon_url = $this->plugin_url . 'images/mb-peach-icon.png';
241
  $submenu_function = array($this, 'load_admin_page');
242
 
243
- add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url);
244
 
245
  // We add this submenu page with the same slug as the parent to ensure we don't get duplicates
246
  $sub_menu_title = __('Buttons', 'maxbuttons');
@@ -636,7 +637,7 @@ class maxButtonsPlugin
636
  // load style / script. It's seperated since it should show everywhere in admin.
637
  if ($display_review)
638
  {
639
- add_action( 'admin_notices', array('maxAdmin', 'mb_review_notice'));
640
  wp_enqueue_style('maxbuttons-review-notice', $this->plugin_url . 'assets/css/review_notice.css');
641
  wp_enqueue_script('maxbuttons-review-notice', $this->plugin_url . 'js/min/review-notice.js', array('jquery'), true);
642
 
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  define('MAXBUTTONS_VERSION_KEY', 'maxbuttons_version');
54
  {
55
  add_action('admin_enqueue_scripts', array($this,'add_admin_styles'));
56
  add_action('admin_enqueue_scripts', array($this,'add_admin_scripts'));
57
+ add_action('admin_enqueue_scripts', array(maxUtils::namespaceit('maxUtils'), 'fixFAConflict'),999);
58
 
59
  add_action('admin_init', array($this,'register_settings' ));
60
 
61
  add_action('admin_init', array($this, 'do_review_notice')); // Ask for review
62
+ add_action('admin_init', array(maxUtils::namespaceit('maxInstall'),'check_database'));
63
 
64
  add_action('admin_menu', array($this, 'admin_menu'));
65
  add_action('admin_footer', array($this, "footer"));
70
  add_action("mb/collection/display_notices", array($this,"display_notices"), 99);
71
  add_action('mb/header/display_notices', array($this, 'display_notices'), 99);
72
 
73
+ add_action("wp_ajax_getAjaxButtons", array(maxUtils::namespaceit('maxButtonsAdmin'), 'getAjaxButtons'));
74
  add_action("wp_ajax_set_review_notice_status", array($this, "setReviewNoticeStatus"));
75
 
76
  // Collection AJAX
77
+ add_action("wp_ajax_collection-edit", array(maxUtils::namespaceit("maxCollections"), "ajax_save"));
78
+ add_action('wp_ajax_mbpro_collection_block', array(maxUtils::namespaceit("maxCollections"), "ajax_action")); // all block level ajax stuff - for logged in users - backend
79
+ add_action('wp_ajax_mb_button_action', array(maxUtils::namespaceit('maxButtons'), "ajax_action"));
80
 
81
+ add_action('wp_ajax_maxajax', array(maxUtils::namespaceit('maxUtils'), 'ajax_action'));
82
  }
83
  // FRONT AJAX
84
+ add_action('wp_ajax_mbpro_collection_block_front', array(maxUtils::namespaceit("maxCollections"), "ajax_action_front")); // front end for all users
85
+ add_action('wp_ajax_nopriv_mbpro_collection_block_front', array(maxUtils::namespaceit("maxCollections"), "ajax_action_front"));
86
 
87
  // front scripts
88
  add_action('wp_enqueue_scripts', array($this, 'front_scripts'));
89
+ add_action('wp_enqueue_scripts', array(maxUtils::namespaceit('maxUtils'), 'fixFAConflict'),999);
90
 
91
  $this->setMainClasses(); // struct for override functionality
92
 
122
 
123
  );
124
 
125
+ $this->mainClasses = $classes;
126
  }
127
 
128
  // from block loader action. Checks if all parts of the table are there, or panic if not.
160
 
161
  if (isset($this->mainClasses[$class]))
162
  {
163
+ $load_class = maxUtils::namespaceit($this->mainClasses[$class]);
164
  if (method_exists($load_class,'getInstance'))
165
  {
166
  return $load_class::getInstance();
241
  $icon_url = $this->plugin_url . 'images/mb-peach-icon.png';
242
  $submenu_function = array($this, 'load_admin_page');
243
 
244
+ add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, 81);
245
 
246
  // We add this submenu page with the same slug as the parent to ensure we don't get duplicates
247
  $sub_menu_title = __('Buttons', 'maxbuttons');
637
  // load style / script. It's seperated since it should show everywhere in admin.
638
  if ($display_review)
639
  {
640
+ add_action( 'admin_notices', array( maxUtils::namespaceit('maxAdmin'), 'mb_review_notice'));
641
  wp_enqueue_style('maxbuttons-review-notice', $this->plugin_url . 'assets/css/review_notice.css');
642
  wp_enqueue_script('maxbuttons-review-notice', $this->plugin_url . 'js/min/review-notice.js', array('jquery'), true);
643
 
classes/pack.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  // basic pack reading functionality for social buttons
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  // basic pack reading functionality for social buttons
classes/social-networks.php CHANGED
@@ -1,4 +1,6 @@
1
  <?php
 
 
2
 
3
  class maxSN
4
  {
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
 
5
  class maxSN
6
  {
collections/basic-block.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $collectionBlock["basic"] = "basicCollectionBlock";
4
 
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $collectionBlock["basic"] = "basicCollectionBlock";
5
 
collections/basic-collection.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  $collectionClass["basic"] = "basicCollection";
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  $collectionClass["basic"] = "basicCollection";
collections/layout-block.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $collectionBlock["layout"] = "layoutCollectionBlock";
4
 
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $collectionBlock["layout"] = "layoutCollectionBlock";
5
 
collections/picker-block.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  $collectionBlock["picker"] = "pickerCollectionBlock";
@@ -80,7 +81,7 @@ class pickerCollectionBlock extends collectionBlock
80
  foreach($buttons as $button)
81
  {
82
 
83
- $button->reloadData();
84
  $button_id = $button->getID();
85
 
86
  $document_id = $button->getDocumentID();
@@ -211,7 +212,7 @@ class pickerCollectionBlock extends collectionBlock
211
  $mb_pick_modal = ob_get_contents();
212
 
213
  // print this outside of the main div since it messes with z-index
214
- add_action('mb-interface-end', 'mb_print_modal' );
215
  function mb_print_modal()
216
  {
217
  global $mb_pick_modal;
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  $collectionBlock["picker"] = "pickerCollectionBlock";
81
  foreach($buttons as $button)
82
  {
83
 
84
+ //$button->reloadData();
85
  $button_id = $button->getID();
86
 
87
  $document_id = $button->getDocumentID();
212
  $mb_pick_modal = ob_get_contents();
213
 
214
  // print this outside of the main div since it messes with z-index
215
+ add_action('mb-interface-end', maxUtils::namespaceit('mb_print_modal') );
216
  function mb_print_modal()
217
  {
218
  global $mb_pick_modal;
collections/preview-block.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $collectionBlock["preview"] = "previewCollectionBlock";
4
 
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $collectionBlock["preview"] = "previewCollectionBlock";
5
 
collections/social-block.php CHANGED
@@ -1,7 +1,10 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $collectionBlock["social"] = "socialCollectionBlock";
4
 
 
 
5
  class socialCollectionBlock extends collectionBlock
6
  {
7
  protected $blockname = "social";
@@ -87,7 +90,7 @@ class socialCollectionBlock extends collectionBlock
87
  $network = $field_data["network"];
88
  $maxSN = new maxSN($network);
89
  $network_name = $maxSN->getNetworkName();
90
-
91
  $display_count = $field_data["display_count"];
92
  $count_threshold = $field_data["count_threshold"];
93
 
@@ -292,6 +295,7 @@ class socialCollectionBlock extends collectionBlock
292
 
293
  function applyVars($string, $vars)
294
  {
 
295
  if (isset($vars["url"]))
296
  $string = str_replace("{url}", urlencode(esc_url($vars["url"])), $string);
297
  if (isset($vars["count"]))
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $collectionBlock["social"] = "socialCollectionBlock";
5
 
6
+ use \simple_html_dom as simple_html_dom;
7
+
8
  class socialCollectionBlock extends collectionBlock
9
  {
10
  protected $blockname = "social";
90
  $network = $field_data["network"];
91
  $maxSN = new maxSN($network);
92
  $network_name = $maxSN->getNetworkName();
93
+
94
  $display_count = $field_data["display_count"];
95
  $count_threshold = $field_data["count_threshold"];
96
 
295
 
296
  function applyVars($string, $vars)
297
  {
298
+
299
  if (isset($vars["url"]))
300
  $string = str_replace("{url}", urlencode(esc_url($vars["url"])), $string);
301
  if (isset($vars["count"]))
collections/social-collection.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
  $collectionClass["social"] = "socialCollection";
4
 
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
  $collectionClass["social"] = "socialCollection";
5
 
includes/admin_footer.php CHANGED
@@ -1,4 +1,4 @@
1
-
2
 
3
  </div> <!-- main -->
4
 
1
+ <?php namespace MaxButtons; ?>
2
 
3
  </div> <!-- main -->
4
 
includes/admin_header.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
 
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
 
includes/button_editor_popup.php DELETED
@@ -1,56 +0,0 @@
1
- <?php
2
- include_once 'arrays.php';
3
- //include_once 'constants.php';
4
- //do_action('admin_enqueue_scripts', 'maxbuttons-popup');
5
-
6
- //do_action('enqueue_scripts');
7
- //do_action('enqueue_styles');
8
-
9
-
10
- $button = MB()->getClass("button"); //new maxButton();
11
- $button_id = 0;
12
-
13
-
14
- if (isset($_GET['id']) && $_GET['id'] != '') {
15
- $button = MB()->getClass('button'); // reset
16
- $button_id = intval($_GET["id"]);
17
- }
18
- ?>
19
- <html>
20
- <head>
21
- <?php //wp_head();
22
-
23
- //echo "HEAD";
24
-
25
- //do_action('admin_print_scripts');
26
- //do_action('admin_print_styles');
27
- // wp_print_scripts();
28
- // wp_print_styles();
29
- exit('Button popup not found. Please contact support.');
30
- ?>
31
-
32
- </head>
33
- <body class="wp-admin wp-core-ui js maxbuttons_page_maxbuttons-button auto-fold admin-bar branch-4-4 version-4-4 admin-color-fresh locale-nl-nl customize-support svg">
34
- <?php
35
- //remove_action("mb-display-logo");
36
- //remove_action('mb-display-tabs');
37
- $admin = MB()->getClass("admin");
38
- $admin->get_header(array("tabs_active" => true));
39
-
40
-
41
- $button->admin_fields();
42
- ?>
43
-
44
-
45
- <?php
46
-
47
-
48
- //$admin->get_footer();
49
-
50
- ?>
51
- <?php
52
- //o_action('admin_print_scripts');
53
- //print_footer_scripts() ?>
54
- </body>
55
- </html>
56
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/maxbuttons-admin-helper.php CHANGED
@@ -1,17 +1,16 @@
1
  <?php
 
 
2
 
3
  /* Helper class for uniform elements in admin pages */
4
 
5
- add_action('mb-display-logo', array('maxAdmin','logo'));
6
- add_action('mb-display-title', array("maxAdmin",'rate_us'), 20);
7
- add_action('mb-display-tabs', array('maxAdmin','tab_menu'));
8
- add_action('mb-display-ads', array('maxAdmin', 'display_ads'));
9
- add_action('mb-display-pagination', array('maxAdmin', 'display_pagination'));
10
- //add_action('mb-display-reviewoffer', array('maxAdmin', 'display_reviewoffer')); // page telling about discount on review
11
 
12
- //add_action('mb-display-review-notice', array('maxAdmin', 'mb_review_notice'));
13
-
14
- add_action('mb-display-collection-welcome', array('maxAdmin', 'displayCollectionWelcome'));
15
 
16
 
17
  class maxAdmin
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
 
5
  /* Helper class for uniform elements in admin pages */
6
 
7
+ add_action('mb-display-logo', array(maxUtils::namespaceit('maxAdmin'),'logo'));
8
+ add_action('mb-display-title', array(maxUtils::namespaceit("maxAdmin"),'rate_us'), 20);
9
+ add_action('mb-display-tabs', array(maxUtils::namespaceit('maxAdmin'),'tab_menu'));
10
+ add_action('mb-display-ads', array(maxUtils::namespaceit('maxAdmin'), 'display_ads'));
11
+ add_action('mb-display-pagination', array(maxUtils::namespaceit('maxAdmin'), 'display_pagination'));
 
12
 
13
+ add_action('mb-display-collection-welcome', array(maxUtils::namespaceit('maxAdmin'), 'displayCollectionWelcome'));
 
 
14
 
15
 
16
  class maxAdmin
includes/maxbuttons-button.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  $button = MB()->getClass("button"); //new maxButton();
@@ -214,7 +215,7 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
214
 
215
  <input type='hidden' id='colorpicker_current' value=''>
216
 
217
- <div class="input color preview nodrag">
218
  <input type="text" name="button_preview" id="button_preview" class="color-field">
219
  </div>
220
 
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  $button = MB()->getClass("button"); //new maxButton();
215
 
216
  <input type='hidden' id='colorpicker_current' value=''>
217
 
218
+ <div class="input mbcolor preview nodrag">
219
  <input type="text" name="button_preview" id="button_preview" class="color-field">
220
  </div>
221
 
includes/maxbuttons-collection-edit.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
  global $page_title;
3
 
4
  $collections = MB()->getClass("collections");
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
+
5
  global $page_title;
6
 
7
  $collections = MB()->getClass("collections");
includes/maxbuttons-collection-list.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
  global $page_title;
3
  $page_title = __("Social Share", "maxbuttons");
4
  $admin = MB()->getClass("admin");
@@ -39,9 +42,13 @@ foreach ($collections as $index => $data)
39
  {
40
  $id = $data["collection_id"];
41
  $name = $maxCol->get_meta($id, "collection_name");
42
- $name = $name["collection_name"];
 
43
 
44
  $collection = maxCollections::getCollectionById($id);
 
 
 
45
  $collection_type = $collection->getType();
46
  $block_nonce = wp_create_nonce('mbpro_collection_block-' . $id);
47
 
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
+
5
  global $page_title;
6
  $page_title = __("Social Share", "maxbuttons");
7
  $admin = MB()->getClass("admin");
42
  {
43
  $id = $data["collection_id"];
44
  $name = $maxCol->get_meta($id, "collection_name");
45
+ $name = isset($name['collection_name']) ? $name["collection_name"] : '';
46
+
47
 
48
  $collection = maxCollections::getCollectionById($id);
49
+ if (! $collection)
50
+ continue;
51
+
52
  $collection_type = $collection->getType();
53
  $block_nonce = wp_create_nonce('mbpro_collection_block-' . $id);
54
 
includes/maxbuttons-collections.php CHANGED
@@ -1,4 +1,6 @@
1
  <?php
 
 
2
 
3
  $colID = (isset($_GET["colID"])) ? intval($_GET["colID"]) : '';
4
  $action = isset($_GET["action"]) ? sanitize_text_field($_GET["action"]) : '';
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
 
5
  $colID = (isset($_GET["colID"])) ? intval($_GET["colID"]) : '';
6
  $action = isset($_GET["action"]) ? sanitize_text_field($_GET["action"]) : '';
includes/maxbuttons-controller.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  defined('ABSPATH') or die('No direct access permitted');
3
 
4
  if (isset($_GET['action']) && $_GET['action'] != '') {
1
  <?php
2
+ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  if (isset($_GET['action']) && $_GET['action'] != '') {
includes/maxbuttons-list-trash.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
  $result = '';
3
 
4
  exit("Not used");
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
+
5
  $result = '';
6
 
7
  exit("Not used");
includes/maxbuttons-list.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
  $result = '';
3
  $button = MB()->getClass("button");
4
  $mbadmin = MB()->getClass("admin");
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
+
5
  $result = '';
6
  $button = MB()->getClass("button");
7
  $mbadmin = MB()->getClass("admin");
includes/maxbuttons-no-simplexml.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
  global $page_title;
3
  $page_title = __("Enable SimpleXML", "maxbuttons");
4
  $admin = MB()->getClass("admin");
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
+
5
  global $page_title;
6
  $page_title = __("Enable SimpleXML", "maxbuttons");
7
  $admin = MB()->getClass("admin");
includes/maxbuttons-pro.php CHANGED
@@ -1,4 +1,6 @@
1
  <?php
 
 
2
 
3
  $url = MB()->get_plugin_url();
4
  $img_url = $url . "images/gopro";
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
 
5
  $url = MB()->get_plugin_url();
6
  $img_url = $url . "images/gopro";
includes/maxbuttons-settings.php CHANGED
@@ -4,7 +4,7 @@ defined('ABSPATH') or die('No direct access permitted');
4
 
5
  // settings for this page are registered in register_setting ( main class )
6
 
7
- $button = new \maxButton(); // To load maxfield templates
8
 
9
  if(isset($_POST['alter_charset'])) {
10
 
@@ -23,7 +23,7 @@ if(isset($_POST['alter_charset'])) {
23
 
24
  if (isset($_POST["reset_cache"]))
25
  {
26
- $button = new \maxButton();
27
  $button->reset_cache();
28
 
29
  }
@@ -262,9 +262,11 @@ $admin->get_header(array("tabs_active" => true, "title" => $page_title) );
262
  $data = $button->get();
263
 
264
  $allfields = array();
 
265
  foreach($data as $block => $fields)
266
  {
267
- $allfields = array_merge($allfields, array_keys($fields));
 
268
 
269
  }
270
  $allfields = array_combine($allfields, $allfields);
4
 
5
  // settings for this page are registered in register_setting ( main class )
6
 
7
+ $button = new maxButton(); // To load maxfield templates
8
 
9
  if(isset($_POST['alter_charset'])) {
10
 
23
 
24
  if (isset($_POST["reset_cache"]))
25
  {
26
+ $button = new maxButton();
27
  $button->reset_cache();
28
 
29
  }
262
  $data = $button->get();
263
 
264
  $allfields = array();
265
+
266
  foreach($data as $block => $fields)
267
  {
268
+ if ( is_array($fields) )
269
+ $allfields = array_merge($allfields, array_keys($fields));
270
 
271
  }
272
  $allfields = array_combine($allfields, $allfields);
includes/maxbuttons-support.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
  $theme = wp_get_theme();
3
  $browser = maxbuttons_get_browser();
4
 
@@ -135,7 +138,7 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
135
  try{
136
  $content = file_get_contents('https://wordpress.org/support/rss/plugin/maxbuttons');
137
 
138
- $x = new SimpleXmlElement($content);
139
  }
140
  catch (Exception $e)
141
  {
1
  <?php
2
+ namespace MaxButtons;
3
+ defined('ABSPATH') or die('No direct access permitted');
4
+
5
  $theme = wp_get_theme();
6
  $browser = maxbuttons_get_browser();
7
 
138
  try{
139
  $content = file_get_contents('https://wordpress.org/support/rss/plugin/maxbuttons');
140
 
141
+ $x = new \SimpleXmlElement($content);
142
  }
143
  catch (Exception $e)
144
  {
js/maxajax.js CHANGED
@@ -83,18 +83,19 @@ maxAjax.prototype.showSpinner = function(target)
83
 
84
  maxAjax.prototype.ajaxPost = function(data, successHandler, errorHandler)
85
  {
86
-
 
87
  if (typeof successHandler == 'undefined')
88
  {
89
  var action = data['plugin_action'];
90
-
91
- var successHandler = this.defaultSuccessHandler;
92
 
93
  }
94
 
95
  if (typeof errorHandler == 'undefined')
96
  {
97
- var errorHandler = this.defaultErrorHandler;
 
98
  }
99
 
100
 
@@ -107,18 +108,13 @@ maxAjax.prototype.ajaxPost = function(data, successHandler, errorHandler)
107
  });
108
  }
109
 
110
- maxAjax.prototype.defaultSuccessHandler = function (result, status, object)
111
  {
112
- /// console.log(one);
113
- // console.log(two);
114
- // console.log(three);
115
- console.log(result);
116
- //$(data['spinner']).remove();
117
- // $(document).trigger('maxajax_success',[ action, data ]);
118
- // $(document).trigger('maxajax_success_' + action, data);
119
  }
120
 
121
- maxAjax.prototype.defaultErrorHandler = function(jq,status,error)
122
  {
123
  $(document).trigger('maxajax_error_' + action, jq, status, error);
124
  console.log(jq);
83
 
84
  maxAjax.prototype.ajaxPost = function(data, successHandler, errorHandler)
85
  {
86
+ var self = this;
87
+
88
  if (typeof successHandler == 'undefined')
89
  {
90
  var action = data['plugin_action'];
91
+ var successHandler = function (r,s,o,) { self.defaultSuccessHandler(r,s,o,action) } ;
 
92
 
93
  }
94
 
95
  if (typeof errorHandler == 'undefined')
96
  {
97
+ var action = data['plugin_action'];
98
+ var errorHandler = function (r,s,o,) { self.defaultErrorHandler(r,s,o,action) } ;
99
  }
100
 
101
 
108
  });
109
  }
110
 
111
+ maxAjax.prototype.defaultSuccessHandler = function (result, status, object, action)
112
  {
113
+ $(document).trigger('maxajax_success_' + action, [result, status, object]);
114
+
 
 
 
 
 
115
  }
116
 
117
+ maxAjax.prototype.defaultErrorHandler = function(jq,status,error, action)
118
  {
119
  $(document).trigger('maxajax_error_' + action, jq, status, error);
120
  console.log(jq);
js/maxmodal.js CHANGED
@@ -58,7 +58,7 @@ jQuery(document).ready(function($) {
58
 
59
  var modalHeight = this.currentModal.height();
60
  var modalWidth = this.currentModal.width();
61
-
62
  var top = (this.windowHeight - modalHeight) / 2;
63
  var left = (this.windowWidth - modalWidth) / 2;
64
 
@@ -109,12 +109,22 @@ jQuery(document).ready(function($) {
109
 
110
  maxModal.prototype.close = function()
111
  {
112
-
113
  this.currentModal.remove();
114
  this.currentModal = null;
115
  $('.maxmodal_overlay').remove();
116
  }
117
 
 
 
 
 
 
 
 
 
 
 
118
  maxModal.prototype.setTitle = function(title)
119
  {
120
  this.currentModal.find('.modal_title').text(title);
@@ -218,13 +228,14 @@ jQuery(document).ready(function($) {
218
 
219
 
220
  // callback on init
221
- if (typeof data.data('load') !== 'undefined')
222
  {
223
 
224
  // default call
225
  var funcName = data.data('load') + '(modal)';
226
  var callFunc = new Function ('modal', funcName);
227
 
 
228
  /* Args coming!
229
  if (typeof(data.data('load-args') !== 'undefined')
230
  {
58
 
59
  var modalHeight = this.currentModal.height();
60
  var modalWidth = this.currentModal.width();
61
+
62
  var top = (this.windowHeight - modalHeight) / 2;
63
  var left = (this.windowWidth - modalWidth) / 2;
64
 
109
 
110
  maxModal.prototype.close = function()
111
  {
112
+ this.currentModal.trigger('modal_close', [this]);
113
  this.currentModal.remove();
114
  this.currentModal = null;
115
  $('.maxmodal_overlay').remove();
116
  }
117
 
118
+ maxModal.prototype.fadeOut = function (timeOut)
119
+ {
120
+ if (typeof timeOut == undefined)
121
+ timeOut = 600;
122
+
123
+ var self = this;
124
+ this.currentModal.fadeOut(timeOut, function() { self.close(); } );
125
+
126
+ }
127
+
128
  maxModal.prototype.setTitle = function(title)
129
  {
130
  this.currentModal.find('.modal_title').text(title);
228
 
229
 
230
  // callback on init
231
+ if (typeof $(data).data('load') !== 'undefined')
232
  {
233
 
234
  // default call
235
  var funcName = data.data('load') + '(modal)';
236
  var callFunc = new Function ('modal', funcName);
237
 
238
+
239
  /* Args coming!
240
  if (typeof(data.data('load-args') !== 'undefined')
241
  {
js/min/maxmodal.js CHANGED
@@ -1 +1 @@
1
- var maxModal;jQuery(document).ready(function(t){maxModal=function(){},maxModal.prototype={currentModal:null,modals:[],controls:[],parent:"#maxbuttons",multiple:!1,windowHeight:!1,windowWidth:!1,setWidth:!1,setHeight:!1,target:!1},maxModal.prototype.init=function(){this.windowHeight=t(window).height(),this.windowWidth=t(window).width(),t(document).on("click",".maxmodal",t.proxy(this.buildModal,this)),t(window).on("resize",t.proxy(this.checkResize,this))},maxModal.prototype.focus=function(){this.currentModal.show()},maxModal.prototype.get=function(){return this.currentModal},maxModal.prototype.show=function(){t(".maxmodal_overlay").remove(),this.writeOverlay(),this.setWidth&&this.currentModal.width(this.setWidth),this.setHeight&&this.currentModal.height(this.setHeight);var o=this.currentModal.height(),e=this.currentModal.width(),a=(this.windowHeight-o)/2,i=(this.windowWidth-e)/2;30>a&&(a=30),o>this.windowHeight&&this.currentModal.height(this.windowHeight-a-5+"px"),this.currentModal.css("left",i+"px"),this.currentModal.css("top",a+"px"),this.currentModal.css("height",o),this.currentModal.show(),t(".maxmodal_overlay").show(),t(document).off("keydown",t.proxy(this.keyPressHandler,this)),t(document).on("keydown",t.proxy(this.keyPressHandler,this))},maxModal.prototype.keyPressHandler=function(t){27===t.keyCode&&this.close()},maxModal.prototype.checkResize=function(){this.windowHeight=t(window).height(),this.windowWidth=t(window).width(),null!==this.currentModal&&(this.currentModal.removeAttr("style"),this.currentModal.find(".modal_content").removeAttr("style"),this.show())},maxModal.prototype.close=function(){this.currentModal.remove(),this.currentModal=null,t(".maxmodal_overlay").remove()},maxModal.prototype.setTitle=function(t){this.currentModal.find(".modal_title").text(t)},maxModal.prototype.setControls=function(o){var e=this.currentModal.find(".modal_content"),a=t('<div class="controls">');for(i=0;i<this.controls.length;i++)a.append(this.controls[i]);"undefined"!=typeof o&&a.append(o),e.append(a),t(this.currentModal).find(".modal_close").off("click"),t(this.currentModal).find(".modal_close").on("click",t.proxy(this.close,this))},maxModal.prototype.addControl=function(o,e,a){var i="";switch(o){case"yes":i=modaltext.yes;break;case"ok":i=modaltext.ok;break;case"no":i=modaltext.no;break;case"cancel":i=modaltext.cancel;break;case"insert":i=mbtrans.insert}var d=t('<a class="button-primary '+o+'">'+i+"</a>");d.on("click",e,a),this.controls.push(d)},maxModal.prototype.setContent=function(t){this.currentModal.find(".modal_content").html(t)},maxModal.prototype.buildModal=function(o){o.preventDefault();var e=t(o.target);"undefined"==typeof e.data("modal")&&(e=e.parents(".maxmodal")),this.target=e;var a=e.data("modal"),i=t("#"+a);this.setWidth="undefined"!=typeof i.data("width")?i.data("width"):!1,this.setHeight="undefined"!=typeof i.data("height")?i.data("height"):!1;var d=t(i).find(".title").text(),n=t(i).find(".controls").html(),s=t(i).find(".content").html();if(this.newModal(a),this.setTitle(d),this.setContent(s),this.setControls(n),"undefined"!=typeof i.data("load")){var l=i.data("load")+"(modal)",r=new Function("modal",l);try{r(this)}catch(h){console.log("MB Modal Callback Error: "+h.message)}}this.show()},maxModal.prototype.newModal=function(o){null!==this.currentModal&&this.close();var e=t('<div class="max-modal '+o+'" > <div class="modal_header"> <div class="modal_close dashicons dashicons-no"></div><h3 class="modal_title"></h3> </div> <div class="inner modal_content"></div> </div>');return t(this.parent).length>0?t(this.parent).append(e):t("body").append(e),t(e).draggable({handle:".modal_header"}),this.modals.push(e),this.currentModal=e,this.controls=[],this},maxModal.prototype.writeOverlay=function(){t(this.parent).append('<div class="maxmodal_overlay"></div>'),t(".maxmodal_overlay").on("click",t.proxy(this.close,this))}});
1
+ var maxModal;jQuery(document).ready(function(t){(maxModal=function(){}).prototype={currentModal:null,modals:[],controls:[],parent:"#maxbuttons",multiple:!1,windowHeight:!1,windowWidth:!1,setWidth:!1,setHeight:!1,target:!1},maxModal.prototype.init=function(){this.windowHeight=t(window).height(),this.windowWidth=t(window).width(),t(document).on("click",".maxmodal",t.proxy(this.buildModal,this)),t(window).on("resize",t.proxy(this.checkResize,this))},maxModal.prototype.focus=function(){this.currentModal.show()},maxModal.prototype.get=function(){return this.currentModal},maxModal.prototype.show=function(){t(".maxmodal_overlay").remove(),this.writeOverlay(),this.setWidth&&this.currentModal.width(this.setWidth),this.setHeight&&this.currentModal.height(this.setHeight);var o=this.currentModal.height(),e=this.currentModal.width(),i=(this.windowHeight-o)/2,a=(this.windowWidth-e)/2;i<30&&(i=30),o>this.windowHeight&&this.currentModal.height(this.windowHeight-i-5+"px"),this.currentModal.css("left",a+"px"),this.currentModal.css("top",i+"px"),this.currentModal.css("height",o),this.currentModal.show(),t(".maxmodal_overlay").show(),t(document).off("keydown",t.proxy(this.keyPressHandler,this)),t(document).on("keydown",t.proxy(this.keyPressHandler,this))},maxModal.prototype.keyPressHandler=function(t){27===t.keyCode&&this.close()},maxModal.prototype.checkResize=function(){this.windowHeight=t(window).height(),this.windowWidth=t(window).width(),null!==this.currentModal&&(this.currentModal.removeAttr("style"),this.currentModal.find(".modal_content").removeAttr("style"),this.show())},maxModal.prototype.close=function(){this.currentModal.trigger("modal_close",[this]),this.currentModal.remove(),this.currentModal=null,t(".maxmodal_overlay").remove()},maxModal.prototype.fadeOut=function(t){void 0==typeof t&&(t=600);var o=this;this.currentModal.fadeOut(t,function(){o.close()})},maxModal.prototype.setTitle=function(t){this.currentModal.find(".modal_title").text(t)},maxModal.prototype.setControls=function(o){var e=this.currentModal.find(".modal_content"),a=t('<div class="controls">');for(i=0;i<this.controls.length;i++)a.append(this.controls[i]);void 0!==o&&a.append(o),e.append(a),t(this.currentModal).find(".modal_close").off("click"),t(this.currentModal).find(".modal_close").on("click",t.proxy(this.close,this))},maxModal.prototype.addControl=function(o,e,i){var a="";switch(o){case"yes":a=modaltext.yes;break;case"ok":a=modaltext.ok;break;case"no":a=modaltext.no;break;case"cancel":a=modaltext.cancel;break;case"insert":a=mbtrans.insert}var d=t('<a class="button-primary '+o+'">'+a+"</a>");d.on("click",e,i),this.controls.push(d)},maxModal.prototype.setContent=function(t){this.currentModal.find(".modal_content").html(t)},maxModal.prototype.buildModal=function(o){o.preventDefault();var e=t(o.target);void 0===e.data("modal")&&(e=e.parents(".maxmodal")),this.target=e;var i=e.data("modal"),a=t("#"+i);void 0!==a.data("width")?this.setWidth=a.data("width"):this.setWidth=!1,void 0!==a.data("height")?this.setHeight=a.data("height"):this.setHeight=!1;var d=t(a).find(".title").text(),s=t(a).find(".controls").html(),n=t(a).find(".content").html();if(this.newModal(i),this.setTitle(d),this.setContent(n),this.setControls(s),void 0!==t(a).data("load")){var l=a.data("load")+"(modal)",r=new Function("modal",l);try{r(this)}catch(t){console.log("MB Modal Callback Error: "+t.message)}}this.show()},maxModal.prototype.newModal=function(o){null!==this.currentModal&&this.close();var e=t('<div class="max-modal '+o+'" > \t\t\t\t\t\t <div class="modal_header"> \t\t\t\t\t\t\t <div class="modal_close dashicons dashicons-no"></div><h3 class="modal_title"></h3> \t\t\t\t\t\t </div> \t\t\t\t\t\t <div class="inner modal_content"></div>\t\t\t\t\t </div>');return t(this.parent).length>0?t(this.parent).append(e):t("body").append(e),t(e).draggable({handle:".modal_header"}),this.modals.push(e),this.currentModal=e,this.controls=[],this},maxModal.prototype.writeOverlay=function(){t(this.parent).append('<div class="maxmodal_overlay"></div>'),t(".maxmodal_overlay").on("click",t.proxy(this.close,this))}});
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.19.1
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
9
  Text Domain: maxbuttons
@@ -11,13 +11,17 @@ Domain Path: /languages
11
 
12
  Copyright 2017 Max Foundry, LLC (http://maxfoundry.com)
13
  */
 
14
 
15
- define("MAXBUTTONS_ROOT_FILE", __FILE__);
16
- define('MAXBUTTONS_VERSION_NUM', '6.19.1');
17
- define('MAXBUTTONS_RELEASE',"11 May 2017");
 
 
 
18
 
19
 
20
- if (! function_exists('maxbuttons_php52_nono'))
21
  {
22
  function maxbuttons_php52_nono()
23
  {
@@ -28,11 +32,11 @@ if (! function_exists('maxbuttons_php52_nono'))
28
  }
29
  if ( version_compare(PHP_VERSION, '5.3', '<' ) ) {
30
 
31
- add_action( 'admin_notices', 'maxbuttons_php52_nono' );
32
  return;
33
  }
34
 
35
- if (! function_exists('maxbutton_double_load'))
36
  {
37
  function maxbutton_double_load()
38
  {
@@ -42,9 +46,9 @@ if (! function_exists('maxbutton_double_load'))
42
  }
43
  }
44
 
45
- if (function_exists("MB"))
46
  {
47
- add_action('admin_notices', 'maxbutton_double_load');
48
  return;
49
  }
50
 
@@ -63,11 +67,9 @@ require_once("classes/max-utils.php");
63
 
64
  // more core
65
  require_once("classes/block.php");
66
- if (is_admin())
67
- {
68
- require_once('classes/field.php');
69
- require_once('classes/blocks.php');
70
- }
71
 
72
 
73
  require_once("classes/maxCSSParser.php");
@@ -91,7 +93,7 @@ if (! class_exists('simple_html_dom_node'))
91
 
92
 
93
  // runtime.
94
- if (! function_exists("MB")) {
95
  function MB()
96
  {
97
  return maxButtonsPlugin::getInstance();
@@ -101,6 +103,6 @@ $m = new maxButtonsPlugin();
101
 
102
 
103
  // Activation / deactivation
104
- register_activation_hook(__FILE__, array("maxInstall",'activation_hook') );
105
- register_deactivation_hook(__FILE__,array("maxInstall", 'deactivation_hook') );
106
 
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.20.1
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
9
  Text Domain: maxbuttons
11
 
12
  Copyright 2017 Max Foundry, LLC (http://maxfoundry.com)
13
  */
14
+ namespace MaxButtons;
15
 
16
+ if (! defined('MAXBUTTONS_ROOT_FILE'))
17
+ define("MAXBUTTONS_ROOT_FILE", __FILE__);
18
+ if (! defined('MAXBUTTONS_VERSION_NUM'))
19
+ define('MAXBUTTONS_VERSION_NUM', '6.20.1');
20
+
21
+ define('MAXBUTTONS_RELEASE',"19 Jun 2017");
22
 
23
 
24
+ if (! function_exists('MaxButtons\maxbuttons_php52_nono'))
25
  {
26
  function maxbuttons_php52_nono()
27
  {
32
  }
33
  if ( version_compare(PHP_VERSION, '5.3', '<' ) ) {
34
 
35
+ add_action( 'admin_notices', 'MaxButtons\maxbuttons_php52_nono' );
36
  return;
37
  }
38
 
39
+ if (! function_exists('MaxButtons\maxbutton_double_load'))
40
  {
41
  function maxbutton_double_load()
42
  {
46
  }
47
  }
48
 
49
+ if (function_exists("MaxButtons\MB"))
50
  {
51
+ add_action('admin_notices', 'MaxButtons\maxbutton_double_load');
52
  return;
53
  }
54
 
67
 
68
  // more core
69
  require_once("classes/block.php");
70
+
71
+ require_once('classes/field.php');
72
+ require_once('classes/blocks.php');
 
 
73
 
74
 
75
  require_once("classes/maxCSSParser.php");
93
 
94
 
95
  // runtime.
96
+ if (! function_exists("MaxButtons\MB")) {
97
  function MB()
98
  {
99
  return maxButtonsPlugin::getInstance();
103
 
104
 
105
  // Activation / deactivation
106
+ register_activation_hook(__FILE__, array(maxUtils::namespaceit("maxInstall"),'activation_hook') );
107
+ register_deactivation_hook(__FILE__,array(maxUtils::namespaceit("maxInstall"), 'deactivation_hook') );
108
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: maxfoundry, basszje, arcware, johnbhartley
3
  Tags: wordpress buttons, wordpress button plugin, social icons, css3 button generator, responsive buttons, css wordpress button
4
  Requires at least: 4.0
5
  Tested up to: 4.8
6
- Stable tag: 6.19.1
7
 
8
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons and social share icons.
9
 
@@ -245,6 +245,19 @@ This depends on the slider plugin you are using. Most of the well-known ones are
245
 
246
  == Changelog ==
247
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  = 6.19.1 =
249
 
250
  * Button overview loading in editor screen (fixed)
@@ -495,4 +508,3 @@ Please deactivate and then reactivate before using. If the save button does not
495
 
496
 
497
 
498
-
3
  Tags: wordpress buttons, wordpress button plugin, social icons, css3 button generator, responsive buttons, css wordpress button
4
  Requires at least: 4.0
5
  Tested up to: 4.8
6
+ Stable tag: 6.20.1
7
 
8
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons and social share icons.
9
 
245
 
246
  == Changelog ==
247
 
248
+ = 6.20.1 =
249
+
250
+ * Fix - warnings when using Origins Sitebuilder
251
+
252
+ = 6.20 =
253
+
254
+ * Big technical update and clean up of code
255
+ * Moved plugin to proper use of namespaces
256
+ * File:// now allowed for URL's
257
+ * Moved color class to mbcolor due to frequent issues with offending plugins.
258
+ * Tested for WP 4.8
259
+
260
+
261
  = 6.19.1 =
262
 
263
  * Button overview loading in editor screen (fixed)
508
 
509
 
510