Version Description
- 'Add button'-Dialog improvements, plus all shortcode attributes now available in interface
- New shortcode attribute 'extraclass' to add extra classes
- Fixed issue where media script and modal script would interfere with each other
- Added No optimize string for Autoptimize users
- Updates to support page
- Improvements to shortcode visibility
- Fixed Javascript bug that could cause issues with other not-isolated plugins
- Tested on WordPress 4.9.6.
Download this release
Release Info
Developer | basszje |
Plugin | WordPress Button Plugin MaxButtons |
Version | 7.2 |
Comparing to | |
See all releases |
Code changes from version 7.1.3 to 7.2
- assets/css/style.css +1 -1
- assets/integrations/shortcake/class-field-maxbutton.php +1 -1
- assets/integrations/shortcake/edit-attribute-field-maxbutton.js +23 -6
- assets/integrations/siteorigins_builder/fields/maxbutton.class.php +45 -7
- assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php +1 -0
- assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/tpl/base.php +13 -18
- assets/scss/_editor.scss +21 -5
- assets/scss/_elements.scss +0 -2
- assets/scss/_maxmodal.scss +3 -1
- assets/scss/_media_button.scss +82 -65
- assets/scss/_overview.scss +6 -1
- assets/scss/_support.scss +24 -54
- blocks/advanced.php +1 -0
- blocks/basic.php +11 -5
- blocks/container.php +3 -4
- blocks/tpl/option_select.tpl +4 -2
- blocks/tpl/text.tpl +1 -1
- classes/admin-class.php +194 -13
- classes/button.php +45 -64
- classes/integrations.php +1 -0
- classes/maxbuttons-class.php +49 -18
- includes/maxbuttons-button.php +8 -6
- includes/maxbuttons-collections.php +0 -6
- includes/maxbuttons-support.php +27 -72
- includes/maxbuttons-welcome.php +11 -0
- js/init.js +0 -2
- js/maxbuttons-admin.js +2 -1
- js/maxbuttons_media_button.js +0 -326
- js/maxmodal.js +33 -24
- js/media_button.js +280 -0
- js/min/maxbuttons-admin.js +1 -1
- js/min/maxbuttons_media_button.js +0 -1
- js/min/maxmodal.js +1 -1
- js/min/media_button.js +1 -0
- maxbuttons.php +3 -4
- readme.txt +20 -5
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}.max-load-spinner{background:url("/wp-admin/images/wpspin_light.gif") no-repeat;background-size:16px 16px;opacity:.9;width:16px;height:16px;display:inline-block;vertical-align:middle;position:absolute;top:50%;left:50%;margin-left:-8px;margin-top:-8px;z-index:10}.max-load-spinner.large{background:url("/wp-admin/images/wpspin_light-2x.gif") no-repeat;width:32px;height:32px}.max-load-overlay{position:absolute;top:0;left:0;right:0;bottom:0;opacity:0.80;background-color:#f0f0f0;z-index:9}#maxbuttons{display:inline-block;width:100%}#maxbuttons .message,#maxbuttons .mb-message{border:solid 1px #e6db55;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:10px;margin:10px 0px 20px 0px;clear:both;background:#fff}#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 .mb-message.warning{border-left:4px solid #ffba00}#maxbuttons .mb-message.error{border-left:4px solid #ff0000}#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 .maxbutton-welcome-container{margin:25px 0;padding:15px;border:1px solid #ccc;background:#fff}#maxbuttons .maxbutton-welcome-container h3{font-size:26px}#maxbuttons .maxbutton-welcome-container p.started{font-size:16px}#maxbuttons .maxbutton-welcome-container ul{list-style-type:disc;margin-left:25px}#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.hidden,#maxbuttons .option-container>.inside .option-design.hidden{display:none}#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{clear:both;font-weight:700;display:block;margin:5px 0;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;vertical-align:top}#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 .maxajax-load-spinner{width:16px;height:16px;background:url("/wp-admin/images/wpspin_light.gif") no-repeat;opacity:0.9s;display:inline-block;margin:0 10px;z-index:10;vertical-align:middle}#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{margin-top:0px}#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 .input_label{display:inline-block;vertical-align:top}#maxbuttons .option .input_label.left{margin-right:10px}#maxbuttons .option .input_label.right{margin-left:10px}#maxbuttons .option .range_value{margin-top:5px}#maxbuttons .option .range_value output{clear:both;font-size:18px;text-align:center;width:100%;display:inline-block}#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}#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-color-result-text{display:none}#maxbuttons .input.mbcolor .wp-picker-input-wrap{padding:0}#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;transition:.8s}#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-left:hover{border-right-color:#33b3db}#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 .arrow-right:hover{border-left-color:#33b3db}#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 [type='range']{-webkit-appearance:none;width:250px}#maxbuttons [type='range']:focus{outline:0}#maxbuttons [type='range']:focus::-webkit-slider-runnable-track{background:#fff}#maxbuttons [type='range']:focus::-ms-fill-lower{background:#fff}#maxbuttons [type='range']:focus::-ms-fill-upper{background:#fff}#maxbuttons [type='range']::-webkit-slider-runnable-track{cursor:pointer;height:12px;transition:all .2s ease;width:250px;background:#fff;border:1px solid #cfd8dc;border-radius:10px}#maxbuttons [type='range']::-webkit-slider-thumb{background:#179588;border:0px solid #eceff1;border-radius:12px;cursor:pointer;height:24px;width:24px;-webkit-appearance:none;margin-top:-7px}#maxbuttons [type='range']::-moz-range-track{cursor:pointer;height:12px;transition:all .2s ease;width:250px;background:#fff;border:1px solid #cfd8dc;border-radius:10px}#maxbuttons [type='range']::-moz-range-thumb{background:#179588;border:0px solid #eceff1;border-radius:12px;cursor:pointer;height:24px;width:24px}#maxbuttons [type='range']::-ms-track{cursor:pointer;height:12px;transition:all .2s ease;width:250px;background:transparent;border-color:transparent;border-width:12px 0;color:transparent}#maxbuttons [type='range']::-ms-fill-lower{background:#f2f2f2;border:1px solid #cfd8dc;border-radius:20px}#maxbuttons [type='range']::-ms-fill-upper{background:#fff;border:1px solid #cfd8dc;border-radius:20px}#maxbuttons [type='range']::-ms-thumb{background:#179588;border:0px solid #eceff1;border-radius:12px;cursor:pointer;height:24px;width:24px;margin-top:0}#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)}#maxbuttons.maxbuttons-collections-gosocial .social-share-move{background-color:#fff}#maxbuttons.maxbuttons-collections-gosocial .social-share-move .container{padding:15px}#maxbuttons.maxbuttons-collections-gosocial .topbox h1{display:inline-block;font-size:36px;font-weight:700}#maxbuttons.maxbuttons-collections-gosocial .topbox .icon-left{float:left;margin:0 15px 15px 0;display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .topbox h3{display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .topbox:after{clear:both}#maxbuttons.maxbuttons-collections-gosocial .imagebox{clear:both}#maxbuttons.maxbuttons-collections-gosocial .featurebox{margin:20px 0;display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .featurebox h3{display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .featurebox .block{width:45%;float:left;margin-right:3px}#maxbuttons.maxbuttons-collections-gosocial .linkbox{clear:both;margin:30px auto;text-align:center;display:inline-block;width:100%}#maxbuttons.maxbuttons-collections-gosocial .linkbox .install-now{font-size:30px;height:50px;padding-top:10px}.maxmodal-data{display:none}body.max-modal-active{overflow:hidden}.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)}.max-modal.fullscreen{width:auto;max-width:auto;max-height:auto;left:10px;right:10px;top:10px;bottom:10px}@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:100%;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}.max-load-spinner{background:url("/wp-admin/images/wpspin_light.gif") no-repeat;background-size:16px 16px;opacity:.9;width:16px;height:16px;display:inline-block;vertical-align:middle;position:absolute;top:50%;left:50%;margin-left:-8px;margin-top:-8px;z-index:10}.max-load-spinner.large{background:url("/wp-admin/images/wpspin_light-2x.gif") no-repeat;width:32px;height:32px}.max-load-overlay{position:absolute;top:0;left:0;right:0;bottom:0;opacity:0.80;background-color:#f0f0f0;z-index:9}#maxbuttons{display:inline-block;width:100%}#maxbuttons .message,#maxbuttons .mb-message{border:solid 1px #e6db55;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:10px;margin:10px 0px 20px 0px;clear:both;background:#fff}#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 .mb-message.warning{border-left:4px solid #ffba00}#maxbuttons .mb-message.error{border-left:4px solid #ff0000}#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 .maxbutton-welcome-container{margin:25px 0;padding:15px;border:1px solid #ccc;background:#fff}#maxbuttons .maxbutton-welcome-container h3{font-size:26px}#maxbuttons .maxbutton-welcome-container p.started{font-size:18px}#maxbuttons .maxbutton-welcome-container p{font-size:14px;line-height:18px}#maxbuttons .maxbutton-welcome-container h3{font-size:20px}#maxbuttons .maxbutton-welcome-container ul{list-style-type:disc;margin-left:25px}#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;font-size:24px;color:#666;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 10px;top:-7px;left:25px;min-width:150px;border-radius:5px;text-align:left;z-index:1000;border:1px solid #ccc;line-height:15px}#maxbuttons .option-container .help span .shortcode,#maxbuttons .option-container .help span .mb-message.mb-notice{color:555;white-space:nowrap}#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.hidden,#maxbuttons .option-container>.inside .option-design.hidden{display:none}#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 h4,#maxbuttons .mb-message.mb-notice h4{font-size:16px}#maxbuttons .mb-message.shortcode strong,#maxbuttons .mb-message.mb-notice strong{font-weight:600}#maxbuttons .mb-message.shortcode .expanded,#maxbuttons .mb-message.mb-notice .expanded{display:none}#maxbuttons .mb-message.shortcode .expanded p,#maxbuttons .mb-message.mb-notice .expanded p{font-size:14px;line-height:22px}#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{clear:both;font-weight:700;display:block;margin:5px 0;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;vertical-align:top}#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 .maxajax-load-spinner{width:16px;height:16px;background:url("/wp-admin/images/wpspin_light.gif") no-repeat;opacity:0.9s;display:inline-block;margin:0 10px;z-index:10;vertical-align:middle}#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{margin-top:0px}#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 .input_label{display:inline-block;vertical-align:top}#maxbuttons .option .input_label.left{margin-right:10px}#maxbuttons .option .input_label.right{margin-left:10px}#maxbuttons .option .range_value{margin-top:5px}#maxbuttons .option .range_value output{clear:both;font-size:18px;text-align:center;width:100%;display:inline-block}#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}#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-color-result-text{display:none}#maxbuttons .input.mbcolor .wp-picker-input-wrap{padding:0}#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;transition:.8s}#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-left:hover{border-right-color:#33b3db}#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 .arrow-right:hover{border-left-color:#33b3db}#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 [type='range']{-webkit-appearance:none;width:250px}#maxbuttons [type='range']:focus{outline:0}#maxbuttons [type='range']:focus::-webkit-slider-runnable-track{background:#fff}#maxbuttons [type='range']:focus::-ms-fill-lower{background:#fff}#maxbuttons [type='range']:focus::-ms-fill-upper{background:#fff}#maxbuttons [type='range']::-webkit-slider-runnable-track{cursor:pointer;height:12px;transition:all .2s ease;width:250px;background:#fff;border:1px solid #cfd8dc;border-radius:10px}#maxbuttons [type='range']::-webkit-slider-thumb{background:#179588;border:0px solid #eceff1;border-radius:12px;cursor:pointer;height:24px;width:24px;-webkit-appearance:none;margin-top:-7px}#maxbuttons [type='range']::-moz-range-track{cursor:pointer;height:12px;transition:all .2s ease;width:250px;background:#fff;border:1px solid #cfd8dc;border-radius:10px}#maxbuttons [type='range']::-moz-range-thumb{background:#179588;border:0px solid #eceff1;border-radius:12px;cursor:pointer;height:24px;width:24px}#maxbuttons [type='range']::-ms-track{cursor:pointer;height:12px;transition:all .2s ease;width:250px;background:transparent;border-color:transparent;border-width:12px 0;color:transparent}#maxbuttons [type='range']::-ms-fill-lower{background:#f2f2f2;border:1px solid #cfd8dc;border-radius:20px}#maxbuttons [type='range']::-ms-fill-upper{background:#fff;border:1px solid #cfd8dc;border-radius:20px}#maxbuttons [type='range']::-ms-thumb{background:#179588;border:0px solid #eceff1;border-radius:12px;cursor:pointer;height:24px;width:24px;margin-top:0}#maxbuttons .support.tiles{display:flex}#maxbuttons .support.tiles>div{background-color:#0073aa;margin:0 25px 0 0;padding:16px}#maxbuttons .support.tiles>div a{color:#fff;text-align:center;font-size:20px;text-decoration:none}#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)}#maxbuttons.maxbuttons-collections-gosocial .social-share-move{background-color:#fff}#maxbuttons.maxbuttons-collections-gosocial .social-share-move .container{padding:15px}#maxbuttons.maxbuttons-collections-gosocial .topbox h1{display:inline-block;font-size:36px;font-weight:700}#maxbuttons.maxbuttons-collections-gosocial .topbox .icon-left{float:left;margin:0 15px 15px 0;display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .topbox h3{display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .topbox:after{clear:both}#maxbuttons.maxbuttons-collections-gosocial .imagebox{clear:both}#maxbuttons.maxbuttons-collections-gosocial .featurebox{margin:20px 0;display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .featurebox h3{display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .featurebox .block{width:45%;float:left;margin-right:3px}#maxbuttons.maxbuttons-collections-gosocial .linkbox{clear:both;margin:30px auto;text-align:center;display:inline-block;width:100%}#maxbuttons.maxbuttons-collections-gosocial .linkbox .install-now{font-size:30px;height:50px;padding-top:10px}.maxmodal-data{display:none}body.max-modal-active{overflow:hidden}.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)}.max-modal.fullscreen{width:auto;max-width:auto;max-height:auto;left:10px;right:10px;top:10px;bottom:10px}@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;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-popup .modal_content{min-height:250px;max-height:100%;margin-bottom:45px}.media-popup .ajax-content{margin:0;overflow-y:auto}.media-popup .ajax-content .button-list{display:flex;margin:25px 0;padding:8px 0}.media-popup .ajax-content .button-list .button-id{flex:1}.media-popup .ajax-content .button-list .button-preview{flex:3;overflow:hidden}.media-popup .ajax-content .button-list .button-name{flex:1}.media-popup .ajax-content .button-select{cursor:pointer;border:1px solid #fff}.media-popup .ajax-content .button-select.selected{border-top:1px solid #0085ba;border-bottom:1px solid #0085ba;background:#f7f7f7}.media-popup .tablenav{margin:10px 0;clear:both;min-height:20px}.media-popup .tablenav span{font-size:15px;cursor:pointer}.media-popup .tablenav .input-paging{width:55px}.media-popup .tablenav a:hover{color:#000}.media-popup .tablenav a.disabled{color:#aaa;cursor:default}.media-popup .shortcode-options{margin:0 auto 35px auto;display:inline-block}.media-popup .shortcode-options .button-preview{overflow:hidden}.media-popup .shortcode-options .option{clear:both;margin:15px 0}.media-popup .shortcode-options .input{display:inline-block}.media-popup .shortcode-options input{display:inline-block;padding:4px}.media-popup .shortcode-options label{margin-right:25px;display:inline-block;width:150px;line-height:20px;font-weight:700}.media-popup .shortcode-options p{clear:both}.media-popup .shortcode-options input[type='button']{clear:both;float:none}.media-popup .shortcode-options .more-field{display:none}.media-popup .maxajax-load-spinner{background:transparent url("../../images/spinner.gif") no-repeat scroll 0 0/20px 20px;display:inline-block;margin:5px 5px 0 0;height:40px;opacity:0.7;vertical-align:middle;width:40px}.media-popup .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
@@ -110,7 +110,7 @@ class Shortcake_Field_MaxButton
|
|
110 |
|
111 |
<script type="text/html" id="tmpl-fusion-shortcake-field-maxbutton">
|
112 |
<div class="field-block shortcode-ui-field-maxbutton shortcode-ui-attribute-{{ data.attr }}">
|
113 |
-
<button class="button-primary maxbutton_media_button" data-nonce="{{ data.nonce }}" name="{{ data.attr }}" value="{{ data.value }}">{{data.meta.select}}</button>
|
114 |
<p class='button_preview'> </p>
|
115 |
|
116 |
|
110 |
|
111 |
<script type="text/html" id="tmpl-fusion-shortcake-field-maxbutton">
|
112 |
<div class="field-block shortcode-ui-field-maxbutton shortcode-ui-attribute-{{ data.attr }}">
|
113 |
+
<button class="button-primary maxbutton_media_button" type="button" data-nonce="{{ data.nonce }}" name="{{ data.attr }}" value="{{ data.value }}">{{data.meta.select}}</button>
|
114 |
<p class='button_preview'> </p>
|
115 |
|
116 |
|
assets/integrations/shortcake/edit-attribute-field-maxbutton.js
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
|
9 |
updateButton: function(id)
|
10 |
{
|
|
|
11 |
this.setValue(id);
|
12 |
var preview = this.$el.find('.button_preview');
|
13 |
|
@@ -30,23 +31,30 @@
|
|
30 |
|
31 |
render: function ()
|
32 |
{
|
|
|
33 |
var self = this;
|
34 |
-
var maxMedia = window.maxMedia;
|
|
|
|
|
|
|
|
|
35 |
|
36 |
var data = jQuery.extend( {
|
37 |
id: 'shortcode-ui-' + this.model.get( 'attr' ) + '-' + this.model.cid,
|
38 |
}, this.model.toJSON() );
|
39 |
|
40 |
-
maxMedia.setCallback( $.proxy(this.updateButton, this) );
|
41 |
|
42 |
this.$el.html( this.template( data ) );
|
43 |
-
this.triggerCallbacks();
|
44 |
|
45 |
-
$(document).on('
|
46 |
{
|
47 |
-
|
|
|
|
|
|
|
48 |
|
49 |
-
});
|
50 |
|
51 |
$(document).on('modal_close', function ()
|
52 |
{
|
@@ -56,8 +64,17 @@
|
|
56 |
this.updateButton( this.model.get( 'value' ) );
|
57 |
|
58 |
return this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
|
|
|
|
|
61 |
}); // extend
|
62 |
|
63 |
} )( jQuery );
|
8 |
|
9 |
updateButton: function(id)
|
10 |
{
|
11 |
+
|
12 |
this.setValue(id);
|
13 |
var preview = this.$el.find('.button_preview');
|
14 |
|
31 |
|
32 |
render: function ()
|
33 |
{
|
34 |
+
|
35 |
var self = this;
|
36 |
+
//var maxMedia = window.maxFoundry.maxMedia;
|
37 |
+
this.cake_mm = new window.maxFoundry.maxMedia();
|
38 |
+
|
39 |
+
this.cake_mm.init({callback: $.proxy(this.callback, this), useShortCodeOptions: false});
|
40 |
+
//cake_mm.openModal();
|
41 |
|
42 |
var data = jQuery.extend( {
|
43 |
id: 'shortcode-ui-' + this.model.get( 'attr' ) + '-' + this.model.cid,
|
44 |
}, this.model.toJSON() );
|
45 |
|
46 |
+
//maxMedia.setCallback( $.proxy(this.updateButton, this) );
|
47 |
|
48 |
this.$el.html( this.template( data ) );
|
49 |
+
//this.triggerCallbacks();
|
50 |
|
51 |
+
$(document).on('click', '.maxbutton_media_button', $.proxy(function(e)
|
52 |
{
|
53 |
+
e.preventDefault();
|
54 |
+
this.cake_mm.openModal();
|
55 |
+
$('.media-modal, .media-modal-backdrop').hide();
|
56 |
+
},this));
|
57 |
|
|
|
58 |
|
59 |
$(document).on('modal_close', function ()
|
60 |
{
|
64 |
this.updateButton( this.model.get( 'value' ) );
|
65 |
|
66 |
return this;
|
67 |
+
},
|
68 |
+
|
69 |
+
callback: function(id)
|
70 |
+
{
|
71 |
+
this.updateButton(id);
|
72 |
+
this.cake_mm.close();
|
73 |
+
$('.media-modal, .media-modal-backdrop').show();
|
74 |
}
|
75 |
|
76 |
+
|
77 |
+
|
78 |
}); // extend
|
79 |
|
80 |
} )( jQuery );
|
assets/integrations/siteorigins_builder/fields/maxbutton.class.php
CHANGED
@@ -76,20 +76,58 @@ class MaxButton_Widget_Field_MaxButton extends \SiteOrigin_Widget_Field_Base {
|
|
76 |
protected function render_field( $value, $instance ) {
|
77 |
$nonce = wp_create_nonce('maxajax');
|
78 |
|
|
|
|
|
|
|
79 |
?>
|
80 |
<script language="javascript">
|
|
|
|
|
|
|
|
|
|
|
81 |
function insertSOPageBuilder(id)
|
82 |
{
|
83 |
-
var
|
84 |
-
var
|
85 |
|
|
|
86 |
jQuery('.mbselected.' + mbbutton_number).find(".the_button").html(button);
|
87 |
-
jQuery('.mbselected.' + mbbutton_number).find(".sop_button_id").val(
|
|
|
|
|
88 |
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
</script>
|
92 |
-
<button class="button-primary maxbutton_media_button" id="mbbutton-<?php echo static::$field_count ?>" data-nonce="<?php echo $nonce ?>" data-callback='insertSOPageBuilder'><?php _e("Select a Button"); ?></button>
|
93 |
|
94 |
<p><h3><?php _e('Selected Button', 'maxbuttons') ?></h3></p>
|
95 |
<div class='mbselected <?php echo $this->element_id ?>'>
|
@@ -102,11 +140,11 @@ class MaxButton_Widget_Field_MaxButton extends \SiteOrigin_Widget_Field_Base {
|
|
102 |
$button->set($value);
|
103 |
$button->display(array('load_css' => 'inline') );
|
104 |
}
|
105 |
-
//echo "<P>" . $number . ' -- ' . static::$field_count . ' ' . $this->element_id . " (rnd/fc)</p>"
|
106 |
-
|
107 |
?> </span>
|
108 |
|
109 |
<input type="hidden" class='sop_button_id' value="<?php echo esc_attr( is_array( $value ) ? '-1' : $value ) ?>" name="<?php echo esc_attr( $this->element_name ) ?>" class="siteorigin-widget-input" />
|
|
|
|
|
110 |
</div>
|
111 |
<?php
|
112 |
}
|
@@ -115,7 +153,7 @@ class MaxButton_Widget_Field_MaxButton extends \SiteOrigin_Widget_Field_Base {
|
|
115 |
// $instance was added somehow by siteorigin making the plugin crash - added null for backward compat.
|
116 |
protected function sanitize_field_input( $value, $instance = null ) {
|
117 |
// MB value should be integer - button_id
|
118 |
-
return intval(
|
119 |
}
|
120 |
|
121 |
public function sanitize_instance( $instance ) {
|
76 |
protected function render_field( $value, $instance ) {
|
77 |
$nonce = wp_create_nonce('maxajax');
|
78 |
|
79 |
+
if ($value == '' || ! is_numeric($value))
|
80 |
+
$value = 0;
|
81 |
+
|
82 |
?>
|
83 |
<script language="javascript">
|
84 |
+
var sop_mm = new window.maxFoundry.maxMedia();
|
85 |
+
var mbbutton_number = '<?php echo $this->element_id ?>';
|
86 |
+
|
87 |
+
var current_button_id = <?php echo $value ?>;
|
88 |
+
|
89 |
function insertSOPageBuilder(id)
|
90 |
{
|
91 |
+
var button = jQuery('.media-popup .maxbutton-' + id).parents('.shortcode-container').children().clone();
|
92 |
+
var button_id = id;
|
93 |
|
94 |
+
//renderShortcode(shortcode);
|
95 |
jQuery('.mbselected.' + mbbutton_number).find(".the_button").html(button);
|
96 |
+
jQuery('.mbselected.' + mbbutton_number).find(".sop_button_id").val(button_id);
|
97 |
+
|
98 |
+
sop_mm.close();
|
99 |
return false;
|
100 |
+
}
|
101 |
+
|
102 |
+
/*function renderShortcode(shortcode)
|
103 |
+
{
|
104 |
+
var maxajax = window.maxFoundry.maxAjax;
|
105 |
+
var data = maxajax.ajaxInit();
|
106 |
+
data['plugin_action'] = 'shortcode';
|
107 |
+
data['shortcode'] = shortcode;
|
108 |
+
|
109 |
+
maxajax.ajaxPost(data, function(result) {
|
110 |
+
if (result)
|
111 |
+
{
|
112 |
+
var result = JSON.parse(result);
|
113 |
+
jQuery('.mbselected.' + mbbutton_number).find(".the_button").html(result.shortcode);
|
114 |
+
}
|
115 |
+
});
|
116 |
+
} */
|
117 |
+
|
118 |
+
function openButtonModal()
|
119 |
+
{
|
120 |
+
sop_mm.init({callback: insertSOPageBuilder, useShortCodeOptions: false});
|
121 |
+
sop_mm.openModal();
|
122 |
+
}
|
123 |
|
124 |
+
|
125 |
+
if ( isNaN(current_button_id) || current_button_id <= 0 )
|
126 |
+
{
|
127 |
+
//openButtonModal();
|
128 |
}
|
129 |
</script>
|
130 |
+
<button class="button-primary maxbutton_media_button" id="mbbutton-<?php echo static::$field_count ?>" data-nonce="<?php echo $nonce ?>" data-callback='insertSOPageBuilder' onClick='openButtonModal()'><?php _e("Select a Button"); ?></button>
|
131 |
|
132 |
<p><h3><?php _e('Selected Button', 'maxbuttons') ?></h3></p>
|
133 |
<div class='mbselected <?php echo $this->element_id ?>'>
|
140 |
$button->set($value);
|
141 |
$button->display(array('load_css' => 'inline') );
|
142 |
}
|
|
|
|
|
143 |
?> </span>
|
144 |
|
145 |
<input type="hidden" class='sop_button_id' value="<?php echo esc_attr( is_array( $value ) ? '-1' : $value ) ?>" name="<?php echo esc_attr( $this->element_name ) ?>" class="siteorigin-widget-input" />
|
146 |
+
|
147 |
+
|
148 |
</div>
|
149 |
<?php
|
150 |
}
|
153 |
// $instance was added somehow by siteorigin making the plugin crash - added null for backward compat.
|
154 |
protected function sanitize_field_input( $value, $instance = null ) {
|
155 |
// MB value should be integer - button_id
|
156 |
+
return intval($value);
|
157 |
}
|
158 |
|
159 |
public function sanitize_instance( $instance ) {
|
assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php
CHANGED
@@ -29,6 +29,7 @@ class Widget_MaxButtons_Widget extends \SiteOrigin_Widget {
|
|
29 |
'label' => __('Select a maxbutton','maxbuttons'),
|
30 |
// 'library' => 'maxbuttons',
|
31 |
),
|
|
|
32 |
'text' => array(
|
33 |
'type' => 'text',
|
34 |
'label' => __('Button text [optional]', 'maxbuttons'),
|
29 |
'label' => __('Select a maxbutton','maxbuttons'),
|
30 |
// 'library' => 'maxbuttons',
|
31 |
),
|
32 |
+
|
33 |
'text' => array(
|
34 |
'type' => 'text',
|
35 |
'label' => __('Button text [optional]', 'maxbuttons'),
|
assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/tpl/base.php
CHANGED
@@ -1,31 +1,26 @@
|
|
1 |
<?php
|
2 |
-
namespace MaxButtons;
|
3 |
|
4 |
-
$button_class = MB()->getClass('button');
|
5 |
-
|
6 |
-
//$args = array();
|
7 |
|
8 |
-
// $args["load_css"] = 'inline';
|
9 |
|
10 |
$id = isset($instance["id"]) ? $instance["id"] : 0;
|
11 |
-
if ($id == 0)
|
12 |
-
return; // no button set no button
|
13 |
|
14 |
-
|
15 |
-
$url = isset($instance["url"]) ? sow_esc_url($instance["url"]) : '';
|
16 |
-
$text = isset($instance["text"]) ? $instance["text"] : '';
|
17 |
-
$window = isset($instance["window"]) ? $instance["window"] : 0;
|
18 |
-
if ($window == 1) $window = 'new';
|
19 |
|
20 |
-
$
|
|
|
|
|
|
|
21 |
|
|
|
22 |
|
23 |
if (isset($instance["is_preview"]) && $instance["is_preview"])
|
24 |
-
$shortcode_args["style"] = "inline";
|
25 |
|
26 |
-
echo $button_class->shortcode($shortcode_args);
|
27 |
-
//$button_class->display($args);
|
28 |
|
29 |
-
return;
|
30 |
?>
|
31 |
-
|
1 |
<?php
|
2 |
+
namespace MaxButtons;
|
3 |
|
4 |
+
$button_class = MB()->getClass('button');
|
|
|
|
|
5 |
|
|
|
6 |
|
7 |
$id = isset($instance["id"]) ? $instance["id"] : 0;
|
8 |
+
if ($id == 0)
|
9 |
+
return; // no button set no button
|
10 |
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
$url = isset($instance["url"]) ? sow_esc_url($instance["url"]) : '';
|
13 |
+
$text = isset($instance["text"]) ? $instance["text"] : '';
|
14 |
+
$window = isset($instance["window"]) ? $instance["window"] : 0;
|
15 |
+
if ($window == 1) $window = 'new';
|
16 |
|
17 |
+
$shortcode_args = array("id" => $id, "url" => $url, "text" => $text, "window" => $window);
|
18 |
|
19 |
if (isset($instance["is_preview"]) && $instance["is_preview"])
|
20 |
+
$shortcode_args["style"] = "inline";
|
21 |
|
22 |
+
echo $button_class->shortcode($shortcode_args);
|
23 |
+
//$button_class->display($args);
|
24 |
|
25 |
+
return;
|
26 |
?>
|
|
assets/scss/_editor.scss
CHANGED
@@ -47,9 +47,10 @@
|
|
47 |
.help {
|
48 |
|
49 |
position: relative;
|
50 |
-
width: 18px;
|
51 |
-
height: 18px;
|
52 |
-
font-size:
|
|
|
53 |
margin-left: 10px;
|
54 |
|
55 |
span {
|
@@ -59,15 +60,23 @@
|
|
59 |
color: #000;
|
60 |
position: absolute;
|
61 |
display: none;
|
62 |
-
padding: 10px
|
63 |
top: -7px;
|
64 |
left: 25px;
|
65 |
min-width: 150px;
|
66 |
border-radius: 5px;
|
67 |
-
text-align:
|
68 |
z-index: 1000; // above all
|
69 |
border: 1px solid #ccc;
|
70 |
line-height: 15px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
}
|
73 |
&:hover span {
|
@@ -175,8 +184,15 @@
|
|
175 |
|
176 |
|
177 |
.mb-message.shortcode {
|
|
|
|
|
|
|
|
|
|
|
178 |
.expanded {
|
179 |
display: none;
|
|
|
|
|
180 |
.example {
|
181 |
strong { width: 300px;
|
182 |
display: inline-block;
|
47 |
.help {
|
48 |
|
49 |
position: relative;
|
50 |
+
//width: 18px;
|
51 |
+
//height: 18px;
|
52 |
+
font-size: 24px;
|
53 |
+
color: #666;
|
54 |
margin-left: 10px;
|
55 |
|
56 |
span {
|
60 |
color: #000;
|
61 |
position: absolute;
|
62 |
display: none;
|
63 |
+
padding: 10px 10px;
|
64 |
top: -7px;
|
65 |
left: 25px;
|
66 |
min-width: 150px;
|
67 |
border-radius: 5px;
|
68 |
+
text-align: left;
|
69 |
z-index: 1000; // above all
|
70 |
border: 1px solid #ccc;
|
71 |
line-height: 15px;
|
72 |
+
p {
|
73 |
+
// white-space: nowrap;
|
74 |
+
}
|
75 |
+
.shortcode {
|
76 |
+
color: 555;
|
77 |
+
// text-decoration: underline;
|
78 |
+
white-space: nowrap;
|
79 |
+
}
|
80 |
|
81 |
}
|
82 |
&:hover span {
|
184 |
|
185 |
|
186 |
.mb-message.shortcode {
|
187 |
+
h4 {
|
188 |
+
font-size: 16px;
|
189 |
+
}
|
190 |
+
strong { font-weight: 600; }
|
191 |
+
|
192 |
.expanded {
|
193 |
display: none;
|
194 |
+
p { font-size: 14px; line-height: 22px; }
|
195 |
+
|
196 |
.example {
|
197 |
strong { width: 300px;
|
198 |
display: inline-block;
|
assets/scss/_elements.scss
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
|
2 |
/* Here be elements for the editors.Standardized somehow */
|
3 |
-
|
4 |
-
|
5 |
select {
|
6 |
width: 150px;
|
7 |
&.small { width: auto; } // small as can be.
|
1 |
|
2 |
/* Here be elements for the editors.Standardized somehow */
|
|
|
|
|
3 |
select {
|
4 |
width: 150px;
|
5 |
&.small { width: auto; } // small as can be.
|
assets/scss/_maxmodal.scss
CHANGED
@@ -101,7 +101,7 @@ body.max-modal-active {
|
|
101 |
text-align: center;
|
102 |
padding: 5px 15px 10px;
|
103 |
//display: inline-block;
|
104 |
-
height: 100%;
|
105 |
//margin-top: -40px;
|
106 |
overflow-y: auto;
|
107 |
}
|
@@ -116,6 +116,8 @@ body.max-modal-active {
|
|
116 |
}
|
117 |
}
|
118 |
|
|
|
|
|
119 |
/* Fixes for Beaver Builder, which loads without WP backend styles */
|
120 |
.tablenav .tablenav-pages a, .tablenav-pages-navspan {
|
121 |
background: #e5e5e5 none repeat scroll 0 0;
|
101 |
text-align: center;
|
102 |
padding: 5px 15px 10px;
|
103 |
//display: inline-block;
|
104 |
+
//height: 100%;
|
105 |
//margin-top: -40px;
|
106 |
overflow-y: auto;
|
107 |
}
|
116 |
}
|
117 |
}
|
118 |
|
119 |
+
|
120 |
+
|
121 |
/* Fixes for Beaver Builder, which loads without WP backend styles */
|
122 |
.tablenav .tablenav-pages a, .tablenav-pages-navspan {
|
123 |
background: #e5e5e5 none repeat scroll 0 0;
|
assets/scss/_media_button.scss
CHANGED
@@ -1,114 +1,131 @@
|
|
1 |
-
.media-
|
2 |
{
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
overflow-y: auto;
|
6 |
-
|
7 |
-
.
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
17 |
}
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
20 |
.button-select {
|
21 |
-
cursor: pointer;
|
22 |
-
border: 1px solid #fff;
|
23 |
}
|
24 |
.button-select.selected {
|
25 |
border-top: 1px solid #0085ba;
|
26 |
-
border-bottom: 1px solid #0085ba;
|
27 |
background: #f7f7f7;
|
28 |
-
|
29 |
-
.col_insert .small {
|
30 |
-
font-weight: 700;
|
31 |
-
}
|
32 |
-
}
|
33 |
-
.col_insert {
|
34 |
-
width: 150px;
|
35 |
-
padding-top: 15px;
|
36 |
-
.small {
|
37 |
-
font-size: 10px;
|
38 |
-
}
|
39 |
}
|
40 |
-
}
|
41 |
-
|
42 |
-
|
|
|
43 |
margin: 10px 0;
|
44 |
-
|
|
|
45 |
span {
|
46 |
-
font-size: 15px;
|
47 |
-
|
48 |
-
|
49 |
cursor: pointer;
|
50 |
}
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
|
55 |
-
.
|
56 |
-
width: 400px;
|
57 |
-
margin: 0 auto;
|
58 |
display: inline-block;
|
59 |
-
.
|
60 |
-
|
61 |
-
}
|
62 |
-
h3 {
|
63 |
//margin-bottom: 15px;
|
64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
input {
|
66 |
-
margin-bottom: 10px;
|
67 |
display: inline-block;
|
68 |
-
|
69 |
}
|
70 |
-
|
|
|
71 |
margin-right: 25px;
|
72 |
display:inline-block;
|
73 |
-
|
74 |
-
|
75 |
-
width: 100px;
|
76 |
line-height: 20px;
|
77 |
font-weight: 700;
|
78 |
}
|
79 |
-
|
80 |
-
p {
|
81 |
clear: both;
|
82 |
}
|
83 |
input[type='button'] {
|
84 |
clear: both;
|
85 |
float: none;
|
86 |
}
|
|
|
87 |
|
88 |
}
|
89 |
-
|
90 |
-
.
|
91 |
background: rgba(0, 0, 0, 0) url("../../images/spinner.gif") no-repeat scroll 0 0 / 20px 20px;
|
92 |
display: inline-block;
|
93 |
-
|
94 |
margin: 5px 5px 0 0;
|
95 |
height: 40px;
|
96 |
opacity: 0.7;
|
97 |
vertical-align: middle;
|
98 |
-
|
99 |
-
width: 40px;
|
100 |
-
|
101 |
-
}
|
102 |
.controls {
|
103 |
position: absolute;
|
104 |
-
width: 100%;
|
105 |
padding: 10px 0;
|
106 |
background: #f3f3f3;
|
107 |
text-align: right;
|
108 |
-
bottom: 0;
|
109 |
-
left: 0;
|
110 |
border-top: 1px solid #ccc;
|
111 |
-
|
112 |
}
|
113 |
|
114 |
}
|
1 |
+
.media-popup
|
2 |
{
|
3 |
+
.modal_content {
|
4 |
+
min-height: 250px;
|
5 |
+
max-height: 100%;
|
6 |
+
margin-bottom: 45px;
|
7 |
+
}
|
8 |
+
|
9 |
+
.ajax-content {
|
10 |
+
margin: 0;
|
11 |
overflow-y: auto;
|
12 |
+
|
13 |
+
.button-list {
|
14 |
+
display: flex;
|
15 |
+
margin: 25px 0;
|
16 |
+
padding: 8px 0;
|
17 |
+
|
18 |
+
.button-id {
|
19 |
+
flex: 1;
|
20 |
+
}
|
21 |
+
.button-preview {
|
22 |
+
flex: 3;
|
23 |
+
overflow: hidden;
|
24 |
}
|
25 |
+
.button-name {
|
26 |
+
flex: 1;
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
30 |
+
|
31 |
.button-select {
|
32 |
+
cursor: pointer;
|
33 |
+
border: 1px solid #fff;
|
34 |
}
|
35 |
.button-select.selected {
|
36 |
border-top: 1px solid #0085ba;
|
37 |
+
border-bottom: 1px solid #0085ba;
|
38 |
background: #f7f7f7;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
+
}
|
41 |
+
|
42 |
+
.tablenav {
|
43 |
+
//width: 100%;
|
44 |
margin: 10px 0;
|
45 |
+
clear: both;
|
46 |
+
min-height: 20px;
|
47 |
span {
|
48 |
+
font-size: 15px;
|
49 |
+
// font-weight: 700;
|
50 |
+
// float: left;
|
51 |
cursor: pointer;
|
52 |
}
|
53 |
+
//.next { float: right; }
|
54 |
+
.input-paging { width: 55px; }
|
55 |
+
a:hover {
|
56 |
+
color: #000;
|
57 |
+
}
|
58 |
+
a.disabled {
|
59 |
+
color: #aaa;
|
60 |
+
cursor: default;
|
61 |
+
}
|
62 |
}
|
63 |
|
64 |
+
.shortcode-options {
|
65 |
+
//width: 400px;
|
66 |
+
margin: 0 auto 35px auto;
|
67 |
display: inline-block;
|
68 |
+
.button-preview {
|
69 |
+
overflow: hidden;
|
70 |
+
}
|
71 |
+
h3 {
|
72 |
//margin-bottom: 15px;
|
73 |
}
|
74 |
+
.option {
|
75 |
+
clear: both;
|
76 |
+
margin: 15px 0;
|
77 |
+
}
|
78 |
+
.input {
|
79 |
+
display: inline-block;
|
80 |
+
|
81 |
+
}
|
82 |
input {
|
|
|
83 |
display: inline-block;
|
84 |
+
padding: 4px;
|
85 |
}
|
86 |
+
|
87 |
+
label {
|
88 |
margin-right: 25px;
|
89 |
display:inline-block;
|
90 |
+
|
91 |
+
width: 150px;
|
|
|
92 |
line-height: 20px;
|
93 |
font-weight: 700;
|
94 |
}
|
95 |
+
|
96 |
+
p {
|
97 |
clear: both;
|
98 |
}
|
99 |
input[type='button'] {
|
100 |
clear: both;
|
101 |
float: none;
|
102 |
}
|
103 |
+
.more-field { display: none; }
|
104 |
|
105 |
}
|
106 |
+
|
107 |
+
.maxajax-load-spinner {
|
108 |
background: rgba(0, 0, 0, 0) url("../../images/spinner.gif") no-repeat scroll 0 0 / 20px 20px;
|
109 |
display: inline-block;
|
110 |
+
// float: right;
|
111 |
margin: 5px 5px 0 0;
|
112 |
height: 40px;
|
113 |
opacity: 0.7;
|
114 |
vertical-align: middle;
|
115 |
+
// visibility: hidden;
|
116 |
+
width: 40px;
|
117 |
+
|
118 |
+
}
|
119 |
.controls {
|
120 |
position: absolute;
|
121 |
+
width: 100%;
|
122 |
padding: 10px 0;
|
123 |
background: #f3f3f3;
|
124 |
text-align: right;
|
125 |
+
bottom: 0;
|
126 |
+
left: 0;
|
127 |
border-top: 1px solid #ccc;
|
128 |
+
|
129 |
}
|
130 |
|
131 |
}
|
assets/scss/_overview.scss
CHANGED
@@ -173,12 +173,17 @@ p.status
|
|
173 |
padding: 15px;
|
174 |
border: 1px solid #ccc;
|
175 |
background: #fff;
|
|
|
176 |
h3 {
|
177 |
font-size: 26px;
|
178 |
}
|
179 |
p.started {
|
180 |
-
font-size:
|
|
|
|
|
|
|
181 |
}
|
|
|
182 |
ul {
|
183 |
list-style-type: disc;
|
184 |
margin-left: 25px;
|
173 |
padding: 15px;
|
174 |
border: 1px solid #ccc;
|
175 |
background: #fff;
|
176 |
+
|
177 |
h3 {
|
178 |
font-size: 26px;
|
179 |
}
|
180 |
p.started {
|
181 |
+
font-size: 18px;
|
182 |
+
}
|
183 |
+
p {
|
184 |
+
font-size: 14px; line-height: 18px;
|
185 |
}
|
186 |
+
h3 { font-size: 20px; }
|
187 |
ul {
|
188 |
list-style-type: disc;
|
189 |
margin-left: 25px;
|
assets/scss/_support.scss
CHANGED
@@ -1,68 +1,38 @@
|
|
1 |
|
2 |
|
3 |
-
// RSS Feed are the support questions on the page.
|
4 |
-
.
|
5 |
-
|
6 |
-
clear: both;
|
7 |
-
margin-bottom: 20px;
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
17 |
}
|
18 |
|
19 |
-
a {
|
20 |
-
min-height: 110px;
|
21 |
-
max-height: 110px;
|
22 |
-
overflow: hidden;
|
23 |
-
background: #fff;
|
24 |
-
width: 100%;
|
25 |
-
display: block;
|
26 |
-
padding: 10px;
|
27 |
-
box-sizing: border-box;
|
28 |
-
border: 1px solid #bbb;
|
29 |
-
//min-height: 100px;
|
30 |
-
text-decoration: none;
|
31 |
-
transition: all 200ms;
|
32 |
-
border-radius: 2px;
|
33 |
-
&:hover {
|
34 |
-
background: #f9f9f9;
|
35 |
-
span {
|
36 |
-
color: #0074a2;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
span {
|
40 |
-
color: #2ea2cc;
|
41 |
-
font-weight: bold;
|
42 |
-
font-size: 1.2em;
|
43 |
-
line-height: 1.5em;
|
44 |
-
}
|
45 |
-
}
|
46 |
-
}
|
47 |
}
|
48 |
-
|
49 |
|
50 |
.system_info {
|
51 |
-
width: 90%;
|
52 |
-
background-color: #fff;
|
53 |
-
border: 1px solid #000;
|
54 |
padding: 15px;
|
55 |
-
.info {
|
56 |
-
margin: 5px 0;
|
57 |
-
|
58 |
-
label {
|
59 |
width: 250px;
|
60 |
display: inline-block;
|
61 |
-
clear: both;
|
62 |
}
|
63 |
-
|
64 |
-
}
|
65 |
|
66 |
-
}
|
67 |
|
68 |
-
|
1 |
|
2 |
|
3 |
+
// RSS Feed are the support questions on the page.
|
4 |
+
.support.tiles {
|
5 |
+
display: flex;
|
|
|
|
|
6 |
|
7 |
+
> div {
|
8 |
+
/// height: 50px;
|
9 |
+
background-color: #0073aa;
|
10 |
+
margin: 0 25px 0 0;
|
11 |
+
padding: 16px;
|
12 |
+
a {
|
13 |
+
color: #fff;
|
14 |
+
text-align: center;
|
15 |
+
font-size: 20px;
|
16 |
+
text-decoration: none;
|
17 |
+
}
|
18 |
}
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
|
|
21 |
|
22 |
.system_info {
|
23 |
+
width: 90%;
|
24 |
+
background-color: #fff;
|
25 |
+
border: 1px solid #000;
|
26 |
padding: 15px;
|
27 |
+
.info {
|
28 |
+
margin: 5px 0;
|
29 |
+
|
30 |
+
label {
|
31 |
width: 250px;
|
32 |
display: inline-block;
|
33 |
+
clear: both;
|
34 |
}
|
|
|
|
|
35 |
|
36 |
+
}
|
37 |
|
38 |
+
}
|
blocks/advanced.php
CHANGED
@@ -128,6 +128,7 @@ class advancedBlock extends maxBlock
|
|
128 |
$class->label = __("Extra classes","maxbuttons");
|
129 |
$class->value = maxBlocks::getValue($class->id);
|
130 |
$class->note = __("Useful for custom code or other plugins who target classes", "maxbuttons");
|
|
|
131 |
//$class->output('start','end');
|
132 |
|
133 |
$admin->addField($class, 'start', 'end');
|
128 |
$class->label = __("Extra classes","maxbuttons");
|
129 |
$class->value = maxBlocks::getValue($class->id);
|
130 |
$class->note = __("Useful for custom code or other plugins who target classes", "maxbuttons");
|
131 |
+
$class->help = "<p class='shortcode'>Shortcode attribute : extraclass </p> <p>Using attribute will add classes, not replace them </p> ";
|
132 |
//$class->output('start','end');
|
133 |
|
134 |
$admin->addField($class, 'start', 'end');
|
blocks/basic.php
CHANGED
@@ -46,7 +46,7 @@ class basicBlock extends maxBlock
|
|
46 |
$css["maxbutton"]["normal"]["text-decoration"] = "none";
|
47 |
// $css["maxbutton"]["normal"]["white-space"] = "nowrap"; // hinders correct rendering of oneline-multilines
|
48 |
$css["maxbutton"]["normal"]["display"] = "inline-block";
|
49 |
-
$css["maxbutton"]["normal"]["vertical-align"] = 'middle';
|
50 |
|
51 |
/*if (isset($data["url"]) && $data["url"] == '') // don't show clickable anchor if there is no URL.
|
52 |
{
|
@@ -247,6 +247,11 @@ class basicBlock extends maxBlock
|
|
247 |
$field_url->id = 'url';
|
248 |
$field_url->placeholder = __("http://","maxbuttons");
|
249 |
$field_url->name = $field_url->id;
|
|
|
|
|
|
|
|
|
|
|
250 |
|
251 |
//$field_url->output('start','end');
|
252 |
$admin->addField($field_url,'start', 'end');
|
@@ -288,6 +293,8 @@ class basicBlock extends maxBlock
|
|
288 |
$field_title->name = 'link_title'; // title is too generic
|
289 |
$field_title->id = $field_title->name;
|
290 |
$field_title->value = maxBlocks::getValue('link_title');
|
|
|
|
|
291 |
|
292 |
//$field_title->output('start','end');
|
293 |
$admin->addField($field_title, 'start', 'end');
|
@@ -305,14 +312,13 @@ class basicBlock extends maxBlock
|
|
305 |
// FONTS
|
306 |
$fonts = MB()->getClass('admin')->loadFonts();
|
307 |
|
308 |
-
$field_font = new maxField('
|
309 |
$field_font->label = __('Font','maxbuttons');
|
310 |
$field_font->name = 'font';
|
311 |
$field_font->id = $field_font->name;
|
312 |
-
$field_font->
|
313 |
-
$field_font->
|
314 |
|
315 |
-
//$field_font->output('start');
|
316 |
$admin->addField($field_font,'start');
|
317 |
?>
|
318 |
|
46 |
$css["maxbutton"]["normal"]["text-decoration"] = "none";
|
47 |
// $css["maxbutton"]["normal"]["white-space"] = "nowrap"; // hinders correct rendering of oneline-multilines
|
48 |
$css["maxbutton"]["normal"]["display"] = "inline-block";
|
49 |
+
$css["maxbutton"]["normal"]["vertical-align"] = 'middle';
|
50 |
|
51 |
/*if (isset($data["url"]) && $data["url"] == '') // don't show clickable anchor if there is no URL.
|
52 |
{
|
247 |
$field_url->id = 'url';
|
248 |
$field_url->placeholder = __("http://","maxbuttons");
|
249 |
$field_url->name = $field_url->id;
|
250 |
+
$field_url->help = "<p>Enter any URL you wish to link to. </p>
|
251 |
+
<p>Examples: <br><ul><li> https://example.com </li>
|
252 |
+
<li> /local-page/ </li>
|
253 |
+
<li> javascript:window.history.back(); </li></ul></p>
|
254 |
+
<p class='shortcode'> Shortcode attribute : url </p> ";
|
255 |
|
256 |
//$field_url->output('start','end');
|
257 |
$admin->addField($field_url,'start', 'end');
|
293 |
$field_title->name = 'link_title'; // title is too generic
|
294 |
$field_title->id = $field_title->name;
|
295 |
$field_title->value = maxBlocks::getValue('link_title');
|
296 |
+
$field_title->help = __('<p>This text will appear when hovering over the button</p>
|
297 |
+
<p class="shortcode">Shortcode attribute : linktitle', 'maxbuttons');
|
298 |
|
299 |
//$field_title->output('start','end');
|
300 |
$admin->addField($field_title, 'start', 'end');
|
312 |
// FONTS
|
313 |
$fonts = MB()->getClass('admin')->loadFonts();
|
314 |
|
315 |
+
$field_font = new maxField('option_select');
|
316 |
$field_font->label = __('Font','maxbuttons');
|
317 |
$field_font->name = 'font';
|
318 |
$field_font->id = $field_font->name;
|
319 |
+
$field_font->selected = maxBlocks::getValue('font');
|
320 |
+
$field_font->options = $fonts;
|
321 |
|
|
|
322 |
$admin->addField($field_font,'start');
|
323 |
?>
|
324 |
|
blocks/container.php
CHANGED
@@ -213,14 +213,13 @@ class containerBlock extends maxBlock
|
|
213 |
//$pleft->output('','end');
|
214 |
$admin->addField($pleft, '', 'end');
|
215 |
|
216 |
-
$align = new maxField('
|
217 |
$align->label = __('Alignment','maxbuttons');
|
218 |
$align->name = 'container_alignment';
|
219 |
$align->id = $align->name;
|
220 |
-
$align->
|
221 |
//$align->setDefault(maxBlocks::getDefault('container_alignment'));
|
222 |
-
$align->
|
223 |
-
//$align->output('start', 'end');
|
224 |
|
225 |
$admin->addField($align, 'start', 'end');
|
226 |
|
213 |
//$pleft->output('','end');
|
214 |
$admin->addField($pleft, '', 'end');
|
215 |
|
216 |
+
$align = new maxField('option_select');
|
217 |
$align->label = __('Alignment','maxbuttons');
|
218 |
$align->name = 'container_alignment';
|
219 |
$align->id = $align->name;
|
220 |
+
$align->selected = maxBlocks::getValue('container_alignment');
|
221 |
//$align->setDefault(maxBlocks::getDefault('container_alignment'));
|
222 |
+
$align->options = $maxbuttons_container_alignments; // maxUtils::selectify($align->name, $maxbuttons_container_alignments, $align->value);
|
|
|
223 |
|
224 |
$admin->addField($align, 'start', 'end');
|
225 |
|
blocks/tpl/option_select.tpl
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
-
{if:label} <label for='%%id%%' class='color'>%%label%%</label> {/if:label}
|
2 |
{if:before_input} %%before_input%% {/if:before_input}
|
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}
|
1 |
+
{if:label} <label for='%%id%%' class='color'>%%label%%</label> {/if:label}
|
2 |
{if:before_input} %%before_input%% {/if:before_input}
|
3 |
<div class="input option_select %%name%%" {if:conditional}data-show="%%conditional%%"{/if:conditional}>
|
4 |
+
<select name='%%name%%' id='%%id%%'
|
5 |
+
{if:disabled} disabled {/if:disabled}
|
6 |
+
>
|
7 |
{for:options}
|
8 |
<option value='%%key%%' {if:selected=%%key%%} selected {/if:selected=%%key%%} >%%item%%</option>
|
9 |
{/for:options}
|
blocks/tpl/text.tpl
CHANGED
@@ -8,5 +8,5 @@
|
|
8 |
{if:inputclass}class="%%inputclass%%"{/if:inputclass}
|
9 |
{if:disabled} disabled {/if:disabled}
|
10 |
/>
|
11 |
-
{if:help}<div class="help
|
12 |
</div>
|
8 |
{if:inputclass}class="%%inputclass%%"{/if:inputclass}
|
9 |
{if:disabled} disabled {/if:disabled}
|
10 |
/>
|
11 |
+
{if:help}<div class="help dashicons dashicons-info "><span>%%help%%</span></div>{/if:help}
|
12 |
</div>
|
classes/admin-class.php
CHANGED
@@ -56,7 +56,12 @@ class maxButtonsAdmin
|
|
56 |
$this->fields = apply_filters('mb/editor/addfield', $this->fields, $field);
|
57 |
|
58 |
$this->defined_fields[] = $field_id;
|
59 |
-
do_action('mb/editor/afterfield/'. $field_id);
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
public function display_fields($clean = true, $return = false)
|
@@ -241,21 +246,21 @@ class maxButtonsAdmin
|
|
241 |
return $return;
|
242 |
}
|
243 |
|
244 |
-
static function getAjaxButtons()
|
245 |
{
|
246 |
|
247 |
$admin = self::getInstance();
|
248 |
$args = array();
|
249 |
|
250 |
-
$paged = (isset($
|
251 |
if ($paged > 0)
|
252 |
$args["paged" ] = $paged;
|
253 |
|
254 |
-
|
255 |
$button = MB()->getClass('button');
|
256 |
$buttons = $admin->getButtons($args);
|
257 |
|
258 |
-
|
|
|
259 |
|
260 |
echo '<div class="tablenav top"> ';
|
261 |
echo "<span class='hint'>" . __('Click on a button to select it and add the shortcode to the editor', 'maxbuttons') . "</span>";
|
@@ -268,8 +273,8 @@ class maxButtonsAdmin
|
|
268 |
{
|
269 |
|
270 |
$url = admin_url('admin.php?page=maxbuttons-controller&action=edit');
|
271 |
-
echo "<
|
272 |
-
echo "<
|
273 |
"<a href='$url' target='_blank'>", "</a>") . "</strong></p>";
|
274 |
|
275 |
}
|
@@ -279,16 +284,16 @@ class maxButtonsAdmin
|
|
279 |
|
280 |
$button_id = $b["id"];
|
281 |
$button->set($button_id);
|
282 |
-
echo "<div class='button-
|
283 |
-
echo "<span class='
|
284 |
|
285 |
echo "<span class='small'>[ID: $button_id ]</span>
|
286 |
</span> ";
|
287 |
|
288 |
-
echo "<span class='
|
289 |
$button->display(array("mode" => "preview", "load_css" => "inline" ));
|
290 |
echo "</div></span>";
|
291 |
-
echo "<span class='
|
292 |
echo "</div>";
|
293 |
}
|
294 |
echo '<div class="tablenav bottom"> ';
|
@@ -297,12 +302,188 @@ class maxButtonsAdmin
|
|
297 |
echo '</div>';
|
298 |
|
299 |
|
300 |
-
echo "</div
|
301 |
-
echo "<p> </p>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
|
303 |
exit();
|
304 |
|
305 |
}
|
|
|
|
|
306 |
function get_header($args =array() )
|
307 |
{
|
308 |
$defaults = array(
|
56 |
$this->fields = apply_filters('mb/editor/addfield', $this->fields, $field);
|
57 |
|
58 |
$this->defined_fields[] = $field_id;
|
59 |
+
do_action('mb/editor/afterfield/'. $field_id, $field);
|
60 |
+
}
|
61 |
+
|
62 |
+
public function getFields()
|
63 |
+
{
|
64 |
+
return $this->fields;
|
65 |
}
|
66 |
|
67 |
public function display_fields($clean = true, $return = false)
|
246 |
return $return;
|
247 |
}
|
248 |
|
249 |
+
static public function getAjaxButtons($post)
|
250 |
{
|
251 |
|
252 |
$admin = self::getInstance();
|
253 |
$args = array();
|
254 |
|
255 |
+
$paged = (isset($post["page"])) ? intval($post["page"]) : 1;
|
256 |
if ($paged > 0)
|
257 |
$args["paged" ] = $paged;
|
258 |
|
|
|
259 |
$button = MB()->getClass('button');
|
260 |
$buttons = $admin->getButtons($args);
|
261 |
|
262 |
+
ob_start();
|
263 |
+
echo "<div class='ajax-content'>";
|
264 |
|
265 |
echo '<div class="tablenav top"> ';
|
266 |
echo "<span class='hint'>" . __('Click on a button to select it and add the shortcode to the editor', 'maxbuttons') . "</span>";
|
273 |
{
|
274 |
|
275 |
$url = admin_url('admin.php?page=maxbuttons-controller&action=edit');
|
276 |
+
echo "<h3 class='nobuttons-header'>" . __("You didn't create any buttons yet!","maxbuttons") . "</h3>";
|
277 |
+
echo "<p class='nobuttons-link'>" . sprintf(__("Click %shere%s to add one", "maxbuttons"),
|
278 |
"<a href='$url' target='_blank'>", "</a>") . "</strong></p>";
|
279 |
|
280 |
}
|
284 |
|
285 |
$button_id = $b["id"];
|
286 |
$button->set($button_id);
|
287 |
+
echo "<div class='button-list button-select' data-button='$button_id'>";
|
288 |
+
echo "<span class='button-id'> ";
|
289 |
|
290 |
echo "<span class='small'>[ID: $button_id ]</span>
|
291 |
</span> ";
|
292 |
|
293 |
+
echo "<span class='button-preview'><div class='shortcode-container'>";
|
294 |
$button->display(array("mode" => "preview", "load_css" => "inline" ));
|
295 |
echo "</div></span>";
|
296 |
+
echo "<span class='button-name'>" . $button->getName() . "</span>";
|
297 |
echo "</div>";
|
298 |
}
|
299 |
echo '<div class="tablenav bottom"> ';
|
302 |
echo '</div>';
|
303 |
|
304 |
|
305 |
+
echo "</div>";
|
306 |
+
echo "<p style='height:80px;'> </p>";
|
307 |
+
|
308 |
+
$output = ob_get_contents();
|
309 |
+
ob_end_clean();
|
310 |
+
|
311 |
+
$result = array('output' => $output,
|
312 |
+
'action' => 'buttons_load');
|
313 |
+
|
314 |
+
echo json_encode($result);
|
315 |
+
|
316 |
+
exit();
|
317 |
+
|
318 |
+
}
|
319 |
+
|
320 |
+
static public function ajaxShortcode($post)
|
321 |
+
{
|
322 |
+
$shortcode = isset($post['shortcode']) ? sanitize_text_field($post['shortcode']) : false;
|
323 |
+
|
324 |
+
$output = '';
|
325 |
+
|
326 |
+
if ($shortcode)
|
327 |
+
{
|
328 |
+
$shortcode = stripslashes($shortcode);
|
329 |
+
$output = do_shortcode($shortcode);
|
330 |
+
|
331 |
+
}
|
332 |
+
$result = array('shortcode' => $output);
|
333 |
+
|
334 |
+
echo json_encode($result);
|
335 |
+
exit();
|
336 |
+
}
|
337 |
+
|
338 |
+
static public function mediaShortcodeOptions($post)
|
339 |
+
{
|
340 |
+
$button_id = isset($post['button_id']) ? intval($post['button_id']) : false;
|
341 |
+
|
342 |
+
$result = array('output' => '',
|
343 |
+
'action' => 'shortcode_options');
|
344 |
+
|
345 |
+
$button = new maxButton();
|
346 |
+
$button->set($button_id);
|
347 |
+
|
348 |
+
//$data = $button->getd
|
349 |
+
|
350 |
+
$data = array(
|
351 |
+
'url' => maxBlocks::getValue('url'),
|
352 |
+
'text' => maxBlocks::getValue('text'),
|
353 |
+
'new_window' => maxBlocks::getValue('new_window'),
|
354 |
+
'nofollow' => maxBlocks::getValue('nofollow'),
|
355 |
+
'link_title' => maxBlocks::getValue('link_title'),
|
356 |
+
);
|
357 |
+
|
358 |
+
// hook spec. qtrans.
|
359 |
+
$mode = 'preview';
|
360 |
+
$preview = true;
|
361 |
+
$compile = false;
|
362 |
+
$data = apply_filters('mb/button/data_before_display', $data, $mode, array('preview' => $preview, 'compile' => $compile) );
|
363 |
+
|
364 |
+
$admin = self::getInstance();
|
365 |
+
$shortcode_data = array(); // data array to build shortcodes and check default values
|
366 |
+
|
367 |
+
$display_args = array('echo'=> false, 'load_css' => 'inline');
|
368 |
+
$preview = new maxField('generic');
|
369 |
+
$preview->name = 'button-preview';
|
370 |
+
$preview->content = '<h3>' . __('Shortcode Options') . '</h3>
|
371 |
+
<p>' . $button->display($display_args) . '</p>
|
372 |
+
<p>' . __('Change the options to add shortcode attributes. ', 'maxbuttons') . '</p>';
|
373 |
+
|
374 |
+
$admin->addField($preview, 'start','end');
|
375 |
+
|
376 |
+
$url = new maxField('text');
|
377 |
+
$url->id = 'shortcode_url';
|
378 |
+
$url->name = $url->id;
|
379 |
+
$url->placeholder = 'http://';
|
380 |
+
$url->label = __('Button URL', 'maxbuttons');
|
381 |
+
$url->value = $data['url'];
|
382 |
+
$shortcode_data[] = array(
|
383 |
+
'name' => $url->name,
|
384 |
+
'original' => $url->value,
|
385 |
+
'shortcode' => 'url',
|
386 |
+
);
|
387 |
+
|
388 |
+
$admin->addField($url, 'start','end');
|
389 |
+
|
390 |
+
$text = new maxField('text');
|
391 |
+
$text->id = 'shortcode_text';
|
392 |
+
$text->name = $text->id;
|
393 |
+
$text->label = __('Button Text', 'maxbuttons');
|
394 |
+
$text->value = $data['text'];
|
395 |
+
$shortcode_data[] = array(
|
396 |
+
'name' => $text->name,
|
397 |
+
'original' => $text->value,
|
398 |
+
'shortcode' => 'text',
|
399 |
+
);
|
400 |
+
|
401 |
+
$admin->addField($text, 'start', 'end');
|
402 |
+
|
403 |
+
$more = new maxField('generic');
|
404 |
+
$more->name = 'more';
|
405 |
+
$more->content = '<div class="more-options"><a href="#">' . __('More Options', 'maxbuttons') . '</a></div>';
|
406 |
+
|
407 |
+
$admin->addField($more, 'start', 'end');
|
408 |
+
|
409 |
+
$new_window = new maxField('checkbox');
|
410 |
+
$new_window->id = 'shortcode_window';
|
411 |
+
$new_window->name = $new_window->id;
|
412 |
+
$new_window->label = __('Open in New Window', 'maxbuttons');
|
413 |
+
$new_window->value = 1;
|
414 |
+
$new_window->main_class = 'option more-field';
|
415 |
+
$new_window->checked = checked( $data['new_window'], 1, false);
|
416 |
+
$shortcode_data[] = array(
|
417 |
+
'name' => $new_window->name,
|
418 |
+
'original' => ( $data['new_window'] == 1) ? true : false,
|
419 |
+
'shortcode' => 'window',
|
420 |
+
'checked' => 'new',
|
421 |
+
'unchecked' => 'same',
|
422 |
+
);
|
423 |
+
|
424 |
+
$admin->addField($new_window, 'start', 'end');
|
425 |
+
|
426 |
+
$ffollow = new maxField('checkbox');
|
427 |
+
$ffollow->label = __('Use rel="nofollow"', 'maxbuttons');
|
428 |
+
$ffollow->value = 1;
|
429 |
+
$ffollow->name = 'shortcode_nofollow';
|
430 |
+
$ffollow->id = $ffollow->name;
|
431 |
+
$ffollow->main_class = 'option more-field';
|
432 |
+
$ffollow->checked = checked( $data['nofollow'] , 1, false);
|
433 |
+
$shortcode_data[] = array(
|
434 |
+
'name' => $ffollow->name,
|
435 |
+
'original' => ( $data['nofollow'] == 1) ? true : false,
|
436 |
+
'shortcode' => 'nofollow',
|
437 |
+
'checked' => 'true',
|
438 |
+
'unchecked' => 'false',
|
439 |
+
);
|
440 |
+
|
441 |
+
|
442 |
+
$admin->addField($ffollow, 'start','end');
|
443 |
+
|
444 |
+
$field_title = new maxField('text');
|
445 |
+
$field_title->label = __('Button Tooltip', 'maxbuttons');
|
446 |
+
$field_title->name = 'shortcode_link_title'; // title is too generic
|
447 |
+
$field_title->id = $field_title->name;
|
448 |
+
$field_title->main_class = 'option more-field';
|
449 |
+
$field_title->value = $data['link_title'];
|
450 |
+
|
451 |
+
$shortcode_data[] = array(
|
452 |
+
'name' => $field_title->name,
|
453 |
+
'original' => $field_title->value,
|
454 |
+
'shortcode' => 'linktitle',
|
455 |
+
);
|
456 |
+
|
457 |
+
$admin->addField($field_title, 'start','end');
|
458 |
+
|
459 |
+
$class = new maxField();
|
460 |
+
$class->id = 'shortcode_extra_classes';
|
461 |
+
$class->name = $class->id;
|
462 |
+
$class->label = __("Extra classes","maxbuttons");
|
463 |
+
$class->value = '';
|
464 |
+
$class->main_class = 'option more-field';
|
465 |
+
|
466 |
+
$shortcode_data[] = array(
|
467 |
+
'name' => $class->name,
|
468 |
+
'original' => $class->value,
|
469 |
+
'shortcode' => 'extraclass',
|
470 |
+
);
|
471 |
+
|
472 |
+
$admin->addField($class, 'start', 'end');
|
473 |
+
|
474 |
+
$shortcode_data = apply_filters('mb/media/shortcode_data', $shortcode_data);
|
475 |
+
|
476 |
+
$result['output'] = '<div class="ajax-content shortcode-options">' . $admin->display_fields(true,true) . '</div>';
|
477 |
+
$result['shortcodeData'] = $shortcode_data;
|
478 |
+
$result['button_id'] = $button_id;
|
479 |
+
|
480 |
+
echo json_encode($result);
|
481 |
|
482 |
exit();
|
483 |
|
484 |
}
|
485 |
+
|
486 |
+
|
487 |
function get_header($args =array() )
|
488 |
{
|
489 |
$defaults = array(
|
classes/button.php
CHANGED
@@ -781,28 +781,28 @@ class maxButton
|
|
781 |
*/
|
782 |
public function shortcode($atts)
|
783 |
{
|
784 |
-
|
785 |
-
'id' =>
|
786 |
-
'name' =>
|
787 |
-
'text' =>
|
788 |
-
'url' =>
|
789 |
-
'linktitle' =>
|
790 |
-
'window' =>
|
791 |
-
'nofollow' =>
|
792 |
-
'nocache' =>
|
|
|
793 |
'style' => 'footer',
|
794 |
-
'exclude' => ''
|
795 |
|
796 |
-
), $atts)
|
797 |
|
798 |
-
$button_id = $id;
|
799 |
-
$button_name = $name;
|
800 |
|
801 |
-
if ($button_id > 0)
|
802 |
$result = $this->set($button_id);
|
803 |
-
elseif ($button_name
|
804 |
$result = $this->set(0, $button_name);
|
805 |
-
else return; // no button id
|
806 |
|
807 |
/* Shortcode cache control
|
808 |
|
@@ -810,64 +810,56 @@ class maxButton
|
|
810 |
|
811 |
@param boolean $nocache True / False
|
812 |
*/
|
813 |
-
$compile = apply_filters("mb/shortcode/nocache", $nocache);
|
814 |
|
815 |
if (! $result)
|
816 |
-
return; //
|
817 |
|
818 |
// If we're not in the admin and the button is in the trash, just return nothing
|
819 |
-
|
820 |
-
return
|
821 |
-
}
|
822 |
-
// Check to handle excludes
|
823 |
-
if ("{$exclude}" != '') {
|
824 |
-
global $post;
|
825 |
-
|
826 |
-
// Don't render the button if excluded from the current post/page
|
827 |
-
$exclude = explode(',', "{$exclude}");
|
828 |
-
if (in_array($post->ID, $exclude)) {
|
829 |
-
return '';
|
830 |
-
}
|
831 |
}
|
832 |
|
833 |
// Override shortcode options comparing to default button data.
|
834 |
-
|
835 |
-
|
|
|
836 |
{
|
837 |
-
$this->data["text"]["text"] = $text;
|
838 |
-
$overrides = true;
|
839 |
}
|
840 |
-
if ($url != '')
|
841 |
-
{
|
842 |
|
843 |
-
|
844 |
-
//$compile = true; // css change forces recompile
|
845 |
-
$overrides = true;
|
846 |
-
}
|
847 |
-
if ($window != '' && $window =='new')
|
848 |
{
|
849 |
-
$this->data["basic"]["
|
850 |
-
$overrides = true;
|
851 |
}
|
852 |
-
|
|
|
853 |
{
|
854 |
-
$
|
855 |
-
|
|
|
|
|
856 |
}
|
857 |
|
858 |
-
if ($
|
859 |
{
|
860 |
-
$
|
861 |
-
|
|
|
|
|
862 |
}
|
863 |
|
864 |
-
if ($linktitle
|
865 |
{
|
866 |
-
$this->data['basic']['link_title'] = $linktitle;
|
867 |
-
$overrides = true;
|
868 |
}
|
869 |
|
870 |
-
|
|
|
|
|
|
|
|
|
|
|
871 |
{
|
872 |
case "inline":
|
873 |
$load_css = 'inline';
|
@@ -878,20 +870,9 @@ class maxButton
|
|
878 |
}
|
879 |
|
880 |
// allow for more flexible changes and data manipulation.
|
881 |
-
$data = $this->data;
|
882 |
$this->data = $this->shortcode_overrides($this->data, $atts);
|
883 |
$this->data = apply_filters('mb/shortcode/data', $this->data, $atts);
|
884 |
|
885 |
-
/* if ($data !== $this->data)
|
886 |
-
{
|
887 |
-
$overrides = true;
|
888 |
-
}
|
889 |
-
*/
|
890 |
-
/* if ($overrides)
|
891 |
-
{
|
892 |
-
do_action('mb-data-load', $this->data);
|
893 |
-
}
|
894 |
-
*/
|
895 |
// if there are no reasons not to display; display
|
896 |
$args = array("echo" => false,
|
897 |
"load_css" => $load_css,
|
781 |
*/
|
782 |
public function shortcode($atts)
|
783 |
{
|
784 |
+
$atts = shortcode_atts(array(
|
785 |
+
'id' => null,
|
786 |
+
'name' => null,
|
787 |
+
'text' => null,
|
788 |
+
'url' => null,
|
789 |
+
'linktitle' => null,
|
790 |
+
'window' => null,
|
791 |
+
'nofollow' => null,
|
792 |
+
'nocache' => null,
|
793 |
+
'extraclass' => null,
|
794 |
'style' => 'footer',
|
|
|
795 |
|
796 |
+
), $atts, 'maxbutton');
|
797 |
|
798 |
+
$button_id = $atts['id'];
|
799 |
+
$button_name = $atts['name'];
|
800 |
|
801 |
+
if (! is_null($button_id) && $button_id > 0)
|
802 |
$result = $this->set($button_id);
|
803 |
+
elseif (! is_null($button_name))
|
804 |
$result = $this->set(0, $button_name);
|
805 |
+
else return; // no button id or name given
|
806 |
|
807 |
/* Shortcode cache control
|
808 |
|
810 |
|
811 |
@param boolean $nocache True / False
|
812 |
*/
|
813 |
+
$compile = apply_filters("mb/shortcode/nocache", $atts['nocache'] );
|
814 |
|
815 |
if (! $result)
|
816 |
+
return; // button doesn't exist
|
817 |
|
818 |
// If we're not in the admin and the button is in the trash, just return nothing
|
819 |
+
if (!is_admin() && $this->status == 'trash') {
|
820 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
821 |
}
|
822 |
|
823 |
// Override shortcode options comparing to default button data.
|
824 |
+
//$overrides = false;
|
825 |
+
|
826 |
+
if (! is_null($atts['text']) && $atts['text'] !== '')
|
827 |
{
|
828 |
+
$this->data["text"]["text"] = $atts['text'];
|
|
|
829 |
}
|
|
|
|
|
830 |
|
831 |
+
if (! is_null($atts['url']) && $atts['url'] !== '')
|
|
|
|
|
|
|
|
|
832 |
{
|
833 |
+
$this->data["basic"]["url"] = $atts['url'];
|
|
|
834 |
}
|
835 |
+
|
836 |
+
if (! is_null($atts['window']) )
|
837 |
{
|
838 |
+
if ($atts['window'] == 'new' )
|
839 |
+
$this->data["basic"]["new_window"] = 1;
|
840 |
+
elseif ($atts['window'] == 'same')
|
841 |
+
$this->data["basic"]["new_window"] = 0;
|
842 |
}
|
843 |
|
844 |
+
if (! is_null($atts['nofollow']) )
|
845 |
{
|
846 |
+
if ($atts['nofollow'] == 'true')
|
847 |
+
$this->data["basic"]["nofollow"] = 1;
|
848 |
+
elseif ($atts['nofollow'] == 'false')
|
849 |
+
$this->data["basic"]["nofollow"] = 0;
|
850 |
}
|
851 |
|
852 |
+
if (! is_null($atts['linktitle']) )
|
853 |
{
|
854 |
+
$this->data['basic']['link_title'] = $atts['linktitle'];
|
|
|
855 |
}
|
856 |
|
857 |
+
if (! is_null($atts['extraclass']))
|
858 |
+
{
|
859 |
+
$this->data['advanced']['extra_classes'] = ' ' . $atts['extraclass'];
|
860 |
+
}
|
861 |
+
|
862 |
+
switch($atts['style'])
|
863 |
{
|
864 |
case "inline":
|
865 |
$load_css = 'inline';
|
870 |
}
|
871 |
|
872 |
// allow for more flexible changes and data manipulation.
|
|
|
873 |
$this->data = $this->shortcode_overrides($this->data, $atts);
|
874 |
$this->data = apply_filters('mb/shortcode/data', $this->data, $atts);
|
875 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
876 |
// if there are no reasons not to display; display
|
877 |
$args = array("echo" => false,
|
878 |
"load_css" => $load_css,
|
classes/integrations.php
CHANGED
@@ -32,6 +32,7 @@ class maxIntegrations
|
|
32 |
require_once( $integration_path . "shortcake/shortcake.php");
|
33 |
// require_once( $integration_path . "gutenberg/gutenberg.php");
|
34 |
|
|
|
35 |
do_action('maxbutton-direct-integrations');
|
36 |
|
37 |
}
|
32 |
require_once( $integration_path . "shortcake/shortcake.php");
|
33 |
// require_once( $integration_path . "gutenberg/gutenberg.php");
|
34 |
|
35 |
+
|
36 |
do_action('maxbutton-direct-integrations');
|
37 |
|
38 |
}
|
classes/maxbuttons-class.php
CHANGED
@@ -71,7 +71,10 @@ class maxButtonsPlugin
|
|
71 |
|
72 |
//add_action("wp_ajax_getAjaxButtons", array(maxUtils::namespaceit('maxButtonsAdmin'), 'getAjaxButtons'));
|
73 |
add_action('maxbuttons/ajax/getAjaxButtons', array(maxUtils::namespaceit('maxButtonsAdmin'), 'getAjaxButtons') );
|
|
|
74 |
add_action('maxbuttons/ajax/save_review_notice_status', array(maxUtils::namespaceit('maxAdmin'), "setReviewNoticeStatus") );
|
|
|
|
|
75 |
//add_action("wp_ajax_set_review_notice_status", array($this, "setReviewNoticeStatus"));
|
76 |
|
77 |
|
@@ -278,7 +281,7 @@ class maxButtonsPlugin
|
|
278 |
}
|
279 |
}
|
280 |
|
281 |
-
function load_admin_page(
|
282 |
{
|
283 |
$page = sanitize_text_field($_GET["page"]);
|
284 |
|
@@ -395,17 +398,7 @@ class maxButtonsPlugin
|
|
395 |
wp_enqueue_script('maxbuttons-tabs', $js_url . 'maxtabs.js', array('jquery') ,$version, true);
|
396 |
wp_enqueue_script('maxbuttons-responsive', $js_url . 'responsive.js', array('jquery'), $version, true );
|
397 |
|
398 |
-
|
399 |
-
wp_localize_script('maxbuttons-ajax', 'maxajax',
|
400 |
-
array(
|
401 |
-
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
402 |
-
'ajax_action' => 'maxajax',
|
403 |
-
'nonce' => wp_create_nonce('maxajax'),
|
404 |
-
'leave_page' => __("You have unsaved data, are you sure you want to leave the page?","maxbuttons"),
|
405 |
-
));
|
406 |
-
|
407 |
-
wp_enqueue_script('maxbuttons-ajax');
|
408 |
-
|
409 |
$this->load_modal_script();
|
410 |
}
|
411 |
|
@@ -432,6 +425,29 @@ class maxButtonsPlugin
|
|
432 |
|
433 |
}
|
434 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
/** Load Media Buttons Script
|
436 |
*
|
437 |
* Useful for integrations that don't implement the media button but uses the media button JS for loading the button picker
|
@@ -447,13 +463,16 @@ class maxButtonsPlugin
|
|
447 |
|
448 |
//$this->load_library('fontawesome');
|
449 |
|
450 |
-
wp_register_script('mb-media-button', $js_url . '
|
|
|
451 |
$this->load_modal_script();
|
|
|
452 |
|
453 |
wp_add_inline_script( 'maxbuttons-modal', '$ = jQuery;' );
|
454 |
|
455 |
$translations = array(
|
456 |
'insert' => __('Insert Button into Editor', 'maxbuttons'),
|
|
|
457 |
'loading' => __("Loading your buttons","maxbuttons"),
|
458 |
'select' => __('Click on a button from the list below to place the button shortcode in the editor.', 'maxbuttons'),
|
459 |
'cancel' => __('Cancel', 'maxbuttons'),
|
@@ -487,10 +506,22 @@ class maxButtonsPlugin
|
|
487 |
|
488 |
$title = __('Add Button', 'maxbuttons');
|
489 |
$icon = $this->plugin_url . 'images/mb-peach-icon.png';
|
490 |
-
|
491 |
$img = '<span class="wp-media-buttons-icon" style="background-image: url(' . $icon . '); width: 16px; height: 16px; margin-top: 1px;"></span>';
|
492 |
-
$output = '<a href="javascript:void(0);" class="button maxbutton_media_button"
|
493 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
494 |
|
495 |
echo $output;
|
496 |
}
|
@@ -587,7 +618,7 @@ class maxButtonsPlugin
|
|
587 |
// add tag
|
588 |
if ($type == 'css')
|
589 |
{
|
590 |
-
echo "<!--email_off--><style type='text/css'>";
|
591 |
}
|
592 |
foreach ($part as $id => $statements)
|
593 |
{
|
@@ -596,7 +627,7 @@ class maxButtonsPlugin
|
|
596 |
}
|
597 |
if ($type == 'css')
|
598 |
{
|
599 |
-
echo "</style><!--/email_off-->\n";
|
600 |
}
|
601 |
}
|
602 |
|
71 |
|
72 |
//add_action("wp_ajax_getAjaxButtons", array(maxUtils::namespaceit('maxButtonsAdmin'), 'getAjaxButtons'));
|
73 |
add_action('maxbuttons/ajax/getAjaxButtons', array(maxUtils::namespaceit('maxButtonsAdmin'), 'getAjaxButtons') );
|
74 |
+
add_action('maxbuttons/ajax/mediaShortcodeOptions', array(maxUtils::namespaceit('maxButtonsAdmin'), 'mediaShortcodeOptions'));
|
75 |
add_action('maxbuttons/ajax/save_review_notice_status', array(maxUtils::namespaceit('maxAdmin'), "setReviewNoticeStatus") );
|
76 |
+
add_action('maxbuttons/ajax/shortcode', array(maxUtils::namespaceit('maxButtonsAdmin'), 'ajaxShortcode'));
|
77 |
+
|
78 |
//add_action("wp_ajax_set_review_notice_status", array($this, "setReviewNoticeStatus"));
|
79 |
|
80 |
|
281 |
}
|
282 |
}
|
283 |
|
284 |
+
function load_admin_page()
|
285 |
{
|
286 |
$page = sanitize_text_field($_GET["page"]);
|
287 |
|
398 |
wp_enqueue_script('maxbuttons-tabs', $js_url . 'maxtabs.js', array('jquery') ,$version, true);
|
399 |
wp_enqueue_script('maxbuttons-responsive', $js_url . 'responsive.js', array('jquery'), $version, true );
|
400 |
|
401 |
+
$this->load_ajax_script();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
$this->load_modal_script();
|
403 |
}
|
404 |
|
425 |
|
426 |
}
|
427 |
|
428 |
+
/** Load MaxAjax services
|
429 |
+
*
|
430 |
+
* MaxButtons Ajax Library.
|
431 |
+
*/
|
432 |
+
public function load_ajax_script()
|
433 |
+
{
|
434 |
+
$version = MAXBUTTONS_VERSION_NUM;
|
435 |
+
$js_url = trailingslashit($this->plugin_url . 'js');
|
436 |
+
if (! $this->debug_mode)
|
437 |
+
$js_url .= 'min/';
|
438 |
+
|
439 |
+
wp_register_script('maxbuttons-ajax', $js_url . 'maxajax.js', array('jquery'), $version, true);
|
440 |
+
wp_localize_script('maxbuttons-ajax', 'maxajax',
|
441 |
+
array(
|
442 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
443 |
+
'ajax_action' => 'maxajax',
|
444 |
+
'nonce' => wp_create_nonce('maxajax'),
|
445 |
+
'leave_page' => __("You have unsaved data, are you sure you want to leave the page?","maxbuttons"),
|
446 |
+
));
|
447 |
+
|
448 |
+
wp_enqueue_script('maxbuttons-ajax');
|
449 |
+
}
|
450 |
+
|
451 |
/** Load Media Buttons Script
|
452 |
*
|
453 |
* Useful for integrations that don't implement the media button but uses the media button JS for loading the button picker
|
463 |
|
464 |
//$this->load_library('fontawesome');
|
465 |
|
466 |
+
wp_register_script('mb-media-button', $js_url . 'media_button.js', array('jquery', 'maxbuttons-modal', 'maxbuttons-ajax'), $version, true);
|
467 |
+
|
468 |
$this->load_modal_script();
|
469 |
+
$this->load_ajax_script();
|
470 |
|
471 |
wp_add_inline_script( 'maxbuttons-modal', '$ = jQuery;' );
|
472 |
|
473 |
$translations = array(
|
474 |
'insert' => __('Insert Button into Editor', 'maxbuttons'),
|
475 |
+
'use' => __('Use this Button', 'maxbuttons'),
|
476 |
'loading' => __("Loading your buttons","maxbuttons"),
|
477 |
'select' => __('Click on a button from the list below to place the button shortcode in the editor.', 'maxbuttons'),
|
478 |
'cancel' => __('Cancel', 'maxbuttons'),
|
506 |
|
507 |
$title = __('Add Button', 'maxbuttons');
|
508 |
$icon = $this->plugin_url . 'images/mb-peach-icon.png';
|
509 |
+
//$nonce = wp_create_nonce('maxajax');
|
510 |
$img = '<span class="wp-media-buttons-icon" style="background-image: url(' . $icon . '); width: 16px; height: 16px; margin-top: 1px;"></span>';
|
511 |
+
$output = '<a href="javascript:void(0);" class="button maxbutton_media_button" onclick="loadMediaModal()"
|
512 |
+
title="' . $title . '" style="padding-left: .4em;">' . $img . ' ' . $title . '</a>';
|
513 |
+
|
514 |
+
$output .= '<script language="javascript">
|
515 |
+
function loadMediaModal()
|
516 |
+
{
|
517 |
+
var mm = new window.maxFoundry.maxMedia();
|
518 |
+
mm.init();
|
519 |
+
mm.openModal();
|
520 |
+
|
521 |
+
}
|
522 |
+
</script>';
|
523 |
+
|
524 |
+
|
525 |
|
526 |
echo $output;
|
527 |
}
|
618 |
// add tag
|
619 |
if ($type == 'css')
|
620 |
{
|
621 |
+
echo "<!--noptimize--><!--email_off--><style type='text/css'>";
|
622 |
}
|
623 |
foreach ($part as $id => $statements)
|
624 |
{
|
627 |
}
|
628 |
if ($type == 'css')
|
629 |
{
|
630 |
+
echo "</style><!--/email_off--><!--/noptimize-->\n";
|
631 |
}
|
632 |
}
|
633 |
|
includes/maxbuttons-button.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
|
5 |
-
$button = MB()->getClass("button");
|
6 |
$button_id = 0;
|
7 |
|
8 |
if ($_POST) {
|
@@ -158,8 +158,10 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
|
158 |
|
159 |
<p><?php _e("Shortcode options can make using MaxButtons much easier! Check all possible options", 'maxbuttons'); ?> </p>
|
160 |
|
161 |
-
<span class='shortcode-expand closed'><?php _e("
|
162 |
-
|
|
|
|
|
163 |
</span>
|
164 |
|
165 |
<div class="expanded">
|
@@ -179,12 +181,12 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
|
179 |
[maxbutton id="<?php echo $button_id ?>" text="yourtext" url="http://yoururl" linktitle="tooltip" window="new" nofollow="true"]
|
180 |
</p>
|
181 |
|
182 |
-
<h4><?php _e("
|
183 |
<p><?php _e("If you use this button on a static page, on multiple pages, or upload your theme to another WordPress installation choose an unique name and use ",
|
184 |
"maxbuttons"); ?> <strong>[maxbutton name='my-buy-button' url='http://yoururl']</strong>.
|
|
|
185 |
|
186 |
-
|
187 |
-
<?php _e("By using this syntax when you edit and save your button it will be changed everywhere it is used on your site. If you delete the button and create a new one with the same name the new button will be used on your site.","maxbuttons"); ?>
|
188 |
</p>
|
189 |
|
190 |
</div>
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
|
5 |
+
$button = MB()->getClass("button");
|
6 |
$button_id = 0;
|
7 |
|
8 |
if ($_POST) {
|
158 |
|
159 |
<p><?php _e("Shortcode options can make using MaxButtons much easier! Check all possible options", 'maxbuttons'); ?> </p>
|
160 |
|
161 |
+
<span class='shortcode-expand closed'><h4><?php _e("How to make your life easier","maxbuttons"); ?>
|
162 |
+
<span class="dashicons-before dashicons-arrow-down"></span>
|
163 |
+
</h4>
|
164 |
+
|
165 |
</span>
|
166 |
|
167 |
<div class="expanded">
|
181 |
[maxbutton id="<?php echo $button_id ?>" text="yourtext" url="http://yoururl" linktitle="tooltip" window="new" nofollow="true"]
|
182 |
</p>
|
183 |
|
184 |
+
<h4><?php _e("More tips","maxbuttons"); ?></h4>
|
185 |
<p><?php _e("If you use this button on a static page, on multiple pages, or upload your theme to another WordPress installation choose an unique name and use ",
|
186 |
"maxbuttons"); ?> <strong>[maxbutton name='my-buy-button' url='http://yoururl']</strong>.
|
187 |
+
</p>
|
188 |
|
189 |
+
<p> <?php _e("By using this syntax when you edit and save your button it will be changed everywhere it is used on your site. If you delete the button and create a new one with the same name the new button will be used on your site. Easy!","maxbuttons"); ?>
|
|
|
190 |
</p>
|
191 |
|
192 |
</div>
|
includes/maxbuttons-collections.php
CHANGED
@@ -2,12 +2,6 @@
|
|
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"]) : '';
|
7 |
-
|
8 |
-
|
9 |
-
if (! extension_loaded('simplexml') )
|
10 |
-
$action = 'nosimplexml';
|
11 |
|
12 |
require_once('social-share.php');
|
13 |
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
require_once('social-share.php');
|
7 |
|
includes/maxbuttons-support.php
CHANGED
@@ -5,12 +5,9 @@ defined('ABSPATH') or die('No direct access permitted');
|
|
5 |
$theme = wp_get_theme();
|
6 |
$browser = maxbuttons_get_browser();
|
7 |
|
8 |
-
if(is_admin()) {
|
9 |
-
// wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css', '', '4.0.1', false);
|
10 |
-
}
|
11 |
|
12 |
function maxbuttons_system_label($label, $value, $spaces_between) {
|
13 |
-
$output = "<label>$label</label>";
|
14 |
return "<div class='info'>" . $output . trim($value) . "</div>" ;
|
15 |
}
|
16 |
|
@@ -32,7 +29,7 @@ function maxbuttons_get_browser() {
|
|
32 |
elseif (preg_match('/windows|win32/i', $user_agent)) {
|
33 |
$platform = 'Windows';
|
34 |
}
|
35 |
-
|
36 |
// Next get the name of the user agent yes seperately and for good reason
|
37 |
if (preg_match('/MSIE/i', $user_agent) && !preg_match('/Opera/i', $user_agent)) {
|
38 |
$browser_name = 'Internet Explorer';
|
@@ -58,14 +55,14 @@ function maxbuttons_get_browser() {
|
|
58 |
$browser_name = 'Netscape';
|
59 |
$browser_name_short = "Netscape";
|
60 |
}
|
61 |
-
|
62 |
// Finally get the correct version number
|
63 |
$known = array('Version', $browser_name_short, 'other');
|
64 |
$pattern = '#(?<browser>' . join('|', $known) . ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
|
65 |
if (!preg_match_all($pattern, $user_agent, $matches)) {
|
66 |
// We have no matching number just continue
|
67 |
}
|
68 |
-
|
69 |
// See how many we have
|
70 |
$i = count($matches['browser']);
|
71 |
if ($i != 1) {
|
@@ -81,10 +78,10 @@ function maxbuttons_get_browser() {
|
|
81 |
else {
|
82 |
$version= $matches['version'][0];
|
83 |
}
|
84 |
-
|
85 |
// Check if we have a number
|
86 |
if ($version == null || $version == "") { $version = "?"; }
|
87 |
-
|
88 |
return array(
|
89 |
'user_agent' => $user_agent,
|
90 |
'name' => $browser_name,
|
@@ -116,75 +113,33 @@ function check_charset() {
|
|
116 |
$kludge = 'Not yet enabled';
|
117 |
}
|
118 |
|
119 |
-
$charr = check_charset();
|
|
|
120 |
|
121 |
?>
|
122 |
<?php
|
123 |
-
$support_link = apply_filters("mb-support-link", 'http://wordpress.org/support/plugin/maxbuttons');
|
124 |
|
125 |
-
$admin = MB()->getClass('admin');
|
126 |
-
$page_title = __("Support","maxbuttons");
|
127 |
$action = "<a href='$support_link' class='page-title-action add-new-h2' target='_blank'>" . __("Go to support","maxbuttons") . "</a>";
|
128 |
$admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
129 |
?>
|
130 |
-
|
131 |
-
<h4><?php printf(__('All support is handled through the %sSupport Forums%s.', 'maxbuttons'), "<a href='$support_link' target='_blank'>" , '</a>') ?></h4>
|
132 |
-
|
133 |
-
<div class="rss-feed">
|
134 |
-
<h3><?php _e('Latest Support Questions', 'maxbuttons'); ?></h3>
|
135 |
-
<?php
|
136 |
-
if( ini_get('allow_url_fopen') && extension_loaded('simplexml') ):
|
137 |
-
|
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 |
-
{
|
145 |
-
echo "EX";
|
146 |
-
}
|
147 |
-
|
148 |
-
echo '<ul >';
|
149 |
-
$i = 0;
|
150 |
-
foreach($x->channel->item as $entry) {
|
151 |
-
if(strpos($entry->title, 'Bas Schuiling') === false) {
|
152 |
-
$title = $entry->title;
|
153 |
-
$title = explode(" ", $title);
|
154 |
-
if (count($title) <= 7)
|
155 |
-
$title = array_slice($title, 2); // small reply format
|
156 |
-
else
|
157 |
-
$title = array_slice($title, 7);
|
158 |
-
$time = $entry->pubDate;
|
159 |
-
$time = substr($time, 0, -9);
|
160 |
-
|
161 |
-
$support_title = '';
|
162 |
-
foreach($title as $word) {
|
163 |
-
$word = str_replace("\"", "", $word);
|
164 |
-
$support_title .= $word . ' ';
|
165 |
-
}
|
166 |
-
$support_title = trim($support_title);
|
167 |
-
echo '<li><a href="' . $entry->link . '" target="_blank" title="' . $support_title . '"><span>' . $support_title . '</span><br />' . $time . '</a></li>';
|
168 |
-
$i++;
|
169 |
-
if($i == 9) break;
|
170 |
-
}
|
171 |
-
}
|
172 |
-
echo '</ul>';
|
173 |
-
else:
|
174 |
-
echo _e("Your server doesn't allow us to fetch the latest support questions", "maxbuttons");
|
175 |
-
|
176 |
-
endif; // ini_get
|
177 |
-
?>
|
178 |
-
</div>
|
179 |
|
|
|
|
|
|
|
|
|
180 |
|
|
|
181 |
|
|
|
182 |
|
183 |
<h4><?php _e('You may be asked to provide the information below to help troubleshoot your issue.', 'maxbuttons') ?></h4>
|
184 |
-
|
185 |
-
<form>
|
186 |
-
|
187 |
-
<div class='system_info'>
|
188 |
----- Begin System Info ----- <br />
|
189 |
|
190 |
|
@@ -195,7 +150,7 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
|
195 |
<?php
|
196 |
global $wpdb;
|
197 |
$mysql_version = $wpdb->db_version();
|
198 |
-
|
199 |
|
200 |
echo maxbuttons_system_label('MySQL Version:', $mysql_version, 8) ?>
|
201 |
|
@@ -234,11 +189,11 @@ foreach ($plugins as $plugin_path => $plugin) {
|
|
234 |
// Only show active plugins
|
235 |
if (in_array($plugin_path, $active_plugins)) {
|
236 |
echo maxbuttons_system_label('-', $plugin['Name'] . ' ' . $plugin['Version'], 1);
|
237 |
-
|
238 |
if (isset($plugin['PluginURI'])) {
|
239 |
echo maxbuttons_system_label('', $plugin['PluginURI'], 2);
|
240 |
}
|
241 |
-
|
242 |
echo "\n";
|
243 |
}
|
244 |
}
|
@@ -248,7 +203,7 @@ foreach ($plugins as $plugin_path => $plugin) {
|
|
248 |
</form>
|
249 |
</div>
|
250 |
<div class="ad-wrap">
|
251 |
-
<?php do_action("mb-display-ads"); ?>
|
252 |
</div>
|
253 |
-
|
254 |
-
<?php $admin->get_footer(); ?>
|
5 |
$theme = wp_get_theme();
|
6 |
$browser = maxbuttons_get_browser();
|
7 |
|
|
|
|
|
|
|
8 |
|
9 |
function maxbuttons_system_label($label, $value, $spaces_between) {
|
10 |
+
$output = "<label>$label</label>";
|
11 |
return "<div class='info'>" . $output . trim($value) . "</div>" ;
|
12 |
}
|
13 |
|
29 |
elseif (preg_match('/windows|win32/i', $user_agent)) {
|
30 |
$platform = 'Windows';
|
31 |
}
|
32 |
+
|
33 |
// Next get the name of the user agent yes seperately and for good reason
|
34 |
if (preg_match('/MSIE/i', $user_agent) && !preg_match('/Opera/i', $user_agent)) {
|
35 |
$browser_name = 'Internet Explorer';
|
55 |
$browser_name = 'Netscape';
|
56 |
$browser_name_short = "Netscape";
|
57 |
}
|
58 |
+
|
59 |
// Finally get the correct version number
|
60 |
$known = array('Version', $browser_name_short, 'other');
|
61 |
$pattern = '#(?<browser>' . join('|', $known) . ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
|
62 |
if (!preg_match_all($pattern, $user_agent, $matches)) {
|
63 |
// We have no matching number just continue
|
64 |
}
|
65 |
+
|
66 |
// See how many we have
|
67 |
$i = count($matches['browser']);
|
68 |
if ($i != 1) {
|
78 |
else {
|
79 |
$version= $matches['version'][0];
|
80 |
}
|
81 |
+
|
82 |
// Check if we have a number
|
83 |
if ($version == null || $version == "") { $version = "?"; }
|
84 |
+
|
85 |
return array(
|
86 |
'user_agent' => $user_agent,
|
87 |
'name' => $browser_name,
|
113 |
$kludge = 'Not yet enabled';
|
114 |
}
|
115 |
|
116 |
+
$charr = check_charset();
|
117 |
+
|
118 |
|
119 |
?>
|
120 |
<?php
|
121 |
+
$support_link = apply_filters("mb-support-link", 'http://wordpress.org/support/plugin/maxbuttons');
|
122 |
|
123 |
+
$admin = MB()->getClass('admin');
|
124 |
+
$page_title = __("Support","maxbuttons");
|
125 |
$action = "<a href='$support_link' class='page-title-action add-new-h2' target='_blank'>" . __("Go to support","maxbuttons") . "</a>";
|
126 |
$admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
127 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
+
<div class='support tiles'>
|
130 |
+
<div>
|
131 |
+
<a href='https://wordpress.org/plugins/maxbuttons/#faq' target="_blank">Frequently Asked Questions</a>
|
132 |
+
</div>
|
133 |
|
134 |
+
<div><?php printf(__('%sSupport Forums%s.', 'maxbuttons'), "<a href='$support_link' target='_blank'>" , '</a>') ?></div>
|
135 |
|
136 |
+
</div>
|
137 |
|
138 |
<h4><?php _e('You may be asked to provide the information below to help troubleshoot your issue.', 'maxbuttons') ?></h4>
|
139 |
+
|
140 |
+
<form>
|
141 |
+
|
142 |
+
<div class='system_info'>
|
143 |
----- Begin System Info ----- <br />
|
144 |
|
145 |
|
150 |
<?php
|
151 |
global $wpdb;
|
152 |
$mysql_version = $wpdb->db_version();
|
153 |
+
|
154 |
|
155 |
echo maxbuttons_system_label('MySQL Version:', $mysql_version, 8) ?>
|
156 |
|
189 |
// Only show active plugins
|
190 |
if (in_array($plugin_path, $active_plugins)) {
|
191 |
echo maxbuttons_system_label('-', $plugin['Name'] . ' ' . $plugin['Version'], 1);
|
192 |
+
|
193 |
if (isset($plugin['PluginURI'])) {
|
194 |
echo maxbuttons_system_label('', $plugin['PluginURI'], 2);
|
195 |
}
|
196 |
+
|
197 |
echo "\n";
|
198 |
}
|
199 |
}
|
203 |
</form>
|
204 |
</div>
|
205 |
<div class="ad-wrap">
|
206 |
+
<?php do_action("mb-display-ads"); ?>
|
207 |
</div>
|
208 |
+
|
209 |
+
<?php $admin->get_footer(); ?>
|
includes/maxbuttons-welcome.php
CHANGED
@@ -13,5 +13,16 @@
|
|
13 |
<li><a href="https://wordpress.org/support/plugin/maxbuttons" target="_blank"><?php _e('Support Forums','maxbuttons'); ?></a></li>
|
14 |
</ul>
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
</div>
|
13 |
<li><a href="https://wordpress.org/support/plugin/maxbuttons" target="_blank"><?php _e('Support Forums','maxbuttons'); ?></a></li>
|
14 |
</ul>
|
15 |
|
16 |
+
<br>
|
17 |
+
<h3>Organize your Designs</h3>
|
18 |
+
|
19 |
+
<p>MaxButtons uses shortcodes. These are small snippets you can copy into your posts and pages. You will see a button which will make this easier.</p>
|
20 |
+
|
21 |
+
<p>Do Not Repeat! If you have a button design you can use this many times. Even with different text and link</p>
|
22 |
+
|
23 |
+
|
24 |
+
<p>[maxbutton id=1 url="http://example.com" text="Example Text"]</p>
|
25 |
+
|
26 |
+
|
27 |
|
28 |
</div>
|
js/init.js
CHANGED
@@ -22,8 +22,6 @@ jQuery(document).ready(function(jq) {
|
|
22 |
window.maxFoundry.maxTabs = new maxTabs();
|
23 |
window.maxFoundry.maxTabs.init();
|
24 |
|
25 |
-
//window.maxFoundry.maxcollection = new maxCollection();
|
26 |
-
//window.maxFoundry.maxcollection.init();
|
27 |
}
|
28 |
|
29 |
runMaxInit();
|
22 |
window.maxFoundry.maxTabs = new maxTabs();
|
23 |
window.maxFoundry.maxTabs.init();
|
24 |
|
|
|
|
|
25 |
}
|
26 |
|
27 |
runMaxInit();
|
js/maxbuttons-admin.js
CHANGED
@@ -8,6 +8,7 @@ function maxAdmin()
|
|
8 |
maxAdmin.prototype = {
|
9 |
//initialized: false,
|
10 |
colorUpdateTime: true,
|
|
|
11 |
fields: null,
|
12 |
button_id: null,
|
13 |
form_updated: false,
|
@@ -65,7 +66,7 @@ maxAdmin.prototype.init = function () {
|
|
65 |
$('#maxbuttons .color-field').wpColorPicker(
|
66 |
{
|
67 |
width: 300,
|
68 |
-
|
69 |
change: $.proxy( _.throttle(function(event, ui) {
|
70 |
event.preventDefault();
|
71 |
var color = ui.color.toString();
|
8 |
maxAdmin.prototype = {
|
9 |
//initialized: false,
|
10 |
colorUpdateTime: true,
|
11 |
+
colorPalettes: true,
|
12 |
fields: null,
|
13 |
button_id: null,
|
14 |
form_updated: false,
|
66 |
$('#maxbuttons .color-field').wpColorPicker(
|
67 |
{
|
68 |
width: 300,
|
69 |
+
palettes: this.colorPalettes,
|
70 |
change: $.proxy( _.throttle(function(event, ui) {
|
71 |
event.preventDefault();
|
72 |
var color = ui.color.toString();
|
js/maxbuttons_media_button.js
DELETED
@@ -1,326 +0,0 @@
|
|
1 |
-
//var maxMedia;
|
2 |
-
jQuery(document).ready(function(jq) {
|
3 |
-
$ = jq;
|
4 |
-
|
5 |
-
/* Add button for the post editor screen + integrations */
|
6 |
-
function maxMedia() {
|
7 |
-
|
8 |
-
this.callback = null; // callback function when clicking 'insert button'
|
9 |
-
this.parent = '#poststuff'; // option parent flag as location to write button window.
|
10 |
-
this.window_loaded = null;
|
11 |
-
this.maxm = null;
|
12 |
-
this.closeOnCallback = true;
|
13 |
-
}
|
14 |
-
|
15 |
-
/* Default events and callback */
|
16 |
-
maxMedia.prototype.init = function()
|
17 |
-
{
|
18 |
-
this.maxm = new maxModal();
|
19 |
-
this.maxm.init();
|
20 |
-
|
21 |
-
$(document).on('click','.maxbutton_media_button',$.proxy(this.clickAddButton, this));
|
22 |
-
this.callback = 'this.buttonToEditor'; // default
|
23 |
-
}
|
24 |
-
|
25 |
-
/* Set the callback after selecting a button in the window */
|
26 |
-
maxMedia.prototype.setCallback = function (callback)
|
27 |
-
{
|
28 |
-
|
29 |
-
if (typeof callback !== 'function')
|
30 |
-
{
|
31 |
-
if (typeof window[callback] === 'function')
|
32 |
-
callback = window[callback];
|
33 |
-
else if (typeof eval(callback) === 'function')
|
34 |
-
{
|
35 |
-
callback = eval(callback);
|
36 |
-
}
|
37 |
-
else
|
38 |
-
return false;
|
39 |
-
}
|
40 |
-
|
41 |
-
this.callback = callback;
|
42 |
-
}
|
43 |
-
|
44 |
-
/** Show the screen for shortcode options, like changing the text and url */
|
45 |
-
maxMedia.prototype.showShortcodeOptions = function(button_id, target)
|
46 |
-
{
|
47 |
-
this.closeOnCallback = false;
|
48 |
-
|
49 |
-
$currentModal = this.maxm.currentModal;
|
50 |
-
|
51 |
-
var button = $('[data-button="' + button_id + '"]').find('.shortcode-container');
|
52 |
-
|
53 |
-
options = $('<div class="shortcode_options">');
|
54 |
-
|
55 |
-
|
56 |
-
$('<input>',
|
57 |
-
{
|
58 |
-
'type' : 'hidden',
|
59 |
-
'id' : 'mb_shortcode_id',
|
60 |
-
'name' : 'button_id',
|
61 |
-
}).val(button_id).appendTo(options);
|
62 |
-
|
63 |
-
$('<h3>').text('Shortcode Options').appendTo(options);
|
64 |
-
|
65 |
-
$('<div class="button_example">').append(button).appendTo(options);
|
66 |
-
|
67 |
-
$('<label>', {
|
68 |
-
'for' : 'mb_shortcode_url',
|
69 |
-
}).text(mbtrans.short_url_label).appendTo(options);
|
70 |
-
|
71 |
-
|
72 |
-
$('<input>', {
|
73 |
-
'type' : 'text',
|
74 |
-
'id' : 'mb_shortcode_url',
|
75 |
-
'name' : 'shortcode_url',
|
76 |
-
'placeholder' : 'http://',
|
77 |
-
}).on('change, keyup',
|
78 |
-
function (e) {
|
79 |
-
var url = $(e.target).val();
|
80 |
-
$('.button_example').find('.maxbutton').prop('href', url);
|
81 |
-
}).appendTo(options);
|
82 |
-
|
83 |
-
|
84 |
-
$('<label>', {
|
85 |
-
'for' : 'mb_shortcode_text',
|
86 |
-
}).text(mbtrans.short_text_label).appendTo(options);
|
87 |
-
|
88 |
-
|
89 |
-
$('<input>', {
|
90 |
-
'type' : 'text',
|
91 |
-
'name' : 'shortcode_text',
|
92 |
-
'id' : 'mb_shortcode_text',
|
93 |
-
}).on('change, keyup',
|
94 |
-
function (e) {
|
95 |
-
var text = $(e.target).val();
|
96 |
-
$('.button_example').find('.mb-text').text(text);
|
97 |
-
}).appendTo(options);
|
98 |
-
|
99 |
-
$('<p>').text(mbtrans.short_options_explain).appendTo(options);
|
100 |
-
|
101 |
-
$('<input>', {
|
102 |
-
'type' : 'button',
|
103 |
-
'name' : 'add_shortcode',
|
104 |
-
'class' : 'button-primary',
|
105 |
-
'value' : mbtrans.short_add_button,
|
106 |
-
|
107 |
-
}).on('click', $.proxy(this.addShortcodeOptions, this)).appendTo(options);
|
108 |
-
|
109 |
-
|
110 |
-
this.maxm.setContent( options );
|
111 |
-
this.maxm.checkResize();
|
112 |
-
|
113 |
-
}
|
114 |
-
|
115 |
-
/** Function to add shortcode option to data, then delegate to browser **/
|
116 |
-
maxMedia.prototype.addShortcodeOptions = function(e)
|
117 |
-
{
|
118 |
-
e.preventDefault();
|
119 |
-
|
120 |
-
var url = $('#mb_shortcode_url').val();
|
121 |
-
var text = $('#mb_shortcode_text').val();
|
122 |
-
var button_id = $('#mb_shortcode_id').val();
|
123 |
-
|
124 |
-
this.buttonToEditor(button_id, url, text);
|
125 |
-
|
126 |
-
|
127 |
-
}
|
128 |
-
|
129 |
-
/** Event that fires when the 'add button' button is clicked **/
|
130 |
-
maxMedia.prototype.clickAddButton = function (e)
|
131 |
-
{
|
132 |
-
e.preventDefault();
|
133 |
-
e.stopPropagation();
|
134 |
-
$(document).off('click','.pagination span'); // prevent multiple events
|
135 |
-
var self = this;
|
136 |
-
var nonce = $(e.target).data('nonce');
|
137 |
-
|
138 |
-
if (typeof $(e.target).data('callback') !== 'undefined')
|
139 |
-
{
|
140 |
-
this.setCallback($(e.target).data('callback'));
|
141 |
-
}
|
142 |
-
|
143 |
-
if (typeof $(e.target).data('parent') !== 'undefined')
|
144 |
-
{
|
145 |
-
this.parent = $(e.target).data('parent');
|
146 |
-
}
|
147 |
-
|
148 |
-
$(document).on('click', '.button-row', $.proxy(function (e)
|
149 |
-
{
|
150 |
-
var target = $(e.target);
|
151 |
-
|
152 |
-
if ( typeof $(target).data('button') === 'undefined')
|
153 |
-
{
|
154 |
-
target = $(target).parents('.button-row');
|
155 |
-
}
|
156 |
-
|
157 |
-
var button = $(target).data('button');
|
158 |
-
$('.button-row').removeClass('selected');
|
159 |
-
$(target).addClass('selected');
|
160 |
-
$('.controls .insert').data('button', button);
|
161 |
-
this.maxm.currentModal.find('.controls .insert').removeClass('disabled');
|
162 |
-
},this));
|
163 |
-
|
164 |
-
$(document).on('click','.pagination span, .pagination-links a', function (e) // eventception
|
165 |
-
{
|
166 |
-
e.preventDefault();
|
167 |
-
if ( $(e.target).hasClass('disabled'))
|
168 |
-
return false;
|
169 |
-
|
170 |
-
var page = $(e.target).data('page');
|
171 |
-
if (page <= 1) page = 1;
|
172 |
-
|
173 |
-
self.loadPostEditScreen(page, nonce);
|
174 |
-
});
|
175 |
-
$(document).on('change', '.input-paging', function (e)
|
176 |
-
{
|
177 |
-
e.preventDefault();
|
178 |
-
var page = parseInt($(e.target).val());
|
179 |
-
self.loadPostEditScreen(page, nonce);
|
180 |
-
});
|
181 |
-
|
182 |
-
this.loadPostEditScreen(0, nonce);
|
183 |
-
}
|
184 |
-
|
185 |
-
|
186 |
-
// Callback is the add function on button select
|
187 |
-
maxMedia.prototype.loadPostEditScreen = function(page, nonce)
|
188 |
-
{
|
189 |
-
if (typeof page == 'undefined')
|
190 |
-
page = 0;
|
191 |
-
|
192 |
-
var data = {
|
193 |
-
action: 'maxajax',
|
194 |
-
plugin_action: 'getAjaxButtons',
|
195 |
-
nonce: nonce,
|
196 |
-
paged : page,
|
197 |
-
//callback: callback,
|
198 |
-
};
|
199 |
-
var url = mbtrans.ajax_url;
|
200 |
-
var self = this;
|
201 |
-
|
202 |
-
// show load spinner if any
|
203 |
-
$('.media-buttons .loading').css('visibility', 'visible');
|
204 |
-
|
205 |
-
$.ajax({
|
206 |
-
url: url,
|
207 |
-
data: data,
|
208 |
-
method: 'POST',
|
209 |
-
success: function (res)
|
210 |
-
{
|
211 |
-
self.putResults(res)
|
212 |
-
},
|
213 |
-
|
214 |
-
});
|
215 |
-
|
216 |
-
return false;
|
217 |
-
}
|
218 |
-
maxMedia.prototype.showPostEditScreen = function ()
|
219 |
-
{
|
220 |
-
|
221 |
-
this.maxm.parent = this.parent;
|
222 |
-
this.maxm.newModal('media-buttons');
|
223 |
-
|
224 |
-
this.maxm.setTitle(mbtrans.windowtitle);
|
225 |
-
|
226 |
-
$(document).trigger('mb_media_buttons_open', this.maxm);
|
227 |
-
|
228 |
-
this.maxm.show();
|
229 |
-
this.window_loaded = true;
|
230 |
-
|
231 |
-
}
|
232 |
-
|
233 |
-
maxMedia.prototype.putResults = function(res)
|
234 |
-
{
|
235 |
-
|
236 |
-
this.showPostEditScreen();
|
237 |
-
$('.media-buttons .loading').css('visibility', 'hidden');
|
238 |
-
|
239 |
-
this.maxm.addControl('insert', '', $.proxy(this.insertAction, this) );
|
240 |
-
this.maxm.setContent(res);
|
241 |
-
this.maxm.setControls();
|
242 |
-
this.maxm.checkResize();
|
243 |
-
|
244 |
-
this.resize();
|
245 |
-
|
246 |
-
// this feature resizes
|
247 |
-
$(window).on('resize', $.proxy(this.resize, this));
|
248 |
-
|
249 |
-
// events
|
250 |
-
$(document).on('click', ".maxbutton-preview", function(e) { e.preventDefault(); }); // prevent button clicks
|
251 |
-
|
252 |
-
$(document).trigger('mb_media_put_results', [res, this.maxm] );
|
253 |
-
}
|
254 |
-
|
255 |
-
/** Contains the -inner- window to force scrollbar if inner part is bigger. **/
|
256 |
-
maxMedia.prototype.resize = function(e)
|
257 |
-
{
|
258 |
-
//contentHeight = this.maxm.currentModal.find('.modal_content').height();
|
259 |
-
|
260 |
-
if (this.maxm.currentModal === null)
|
261 |
-
return; // nothing to resize
|
262 |
-
|
263 |
-
topHeight = this.maxm.currentModal.find('.modal_header').height() + 17; // padding
|
264 |
-
controlsHeight = this.maxm.currentModal.find('.controls').height() + 21;
|
265 |
-
modalHeight = this.maxm.currentModal.height();
|
266 |
-
|
267 |
-
this.maxm.currentModal.find('.modal_content').css('height', modalHeight - topHeight - controlsHeight)
|
268 |
-
this.maxm.currentModal.find('.controls .insert').addClass('disabled');
|
269 |
-
|
270 |
-
}
|
271 |
-
|
272 |
-
/** Action to fires when the 'insert button' is clicked in the modal **/
|
273 |
-
maxMedia.prototype.insertAction = function(e)
|
274 |
-
{
|
275 |
-
e.preventDefault();
|
276 |
-
var button_id = $(e.target).data('button');
|
277 |
-
if (typeof button_id === 'undefined' || parseInt(button_id) <= 0)
|
278 |
-
return; // no button yet.
|
279 |
-
|
280 |
-
if (typeof this.callback == 'function')
|
281 |
-
this.callback(button_id, $(e.target) );
|
282 |
-
|
283 |
-
if (this.closeOnCallback)
|
284 |
-
{
|
285 |
-
this.maxm.close();
|
286 |
-
$(document).trigger('mb_media_buttons_close');
|
287 |
-
}
|
288 |
-
}
|
289 |
-
|
290 |
-
maxMedia.prototype.buttonToEditor = function(button_id, url, text)
|
291 |
-
{
|
292 |
-
var shortcode = '[maxbutton id="' + button_id + '"';
|
293 |
-
|
294 |
-
if (typeof url !== 'undefined' && url.length > 1)
|
295 |
-
shortcode += ' url="' + url + '"';
|
296 |
-
|
297 |
-
if (typeof text !== 'undefined' && text.length > 1)
|
298 |
-
shortcode += ' text="' + text + '"';
|
299 |
-
|
300 |
-
shortcode += ' ] ';
|
301 |
-
window.send_to_editor(shortcode);
|
302 |
-
this.maxm.close();
|
303 |
-
}
|
304 |
-
|
305 |
-
maxMedia.prototype.getEditor = function ()
|
306 |
-
{
|
307 |
-
|
308 |
-
var h2style = 'line-height: 32px; padding-left: 40px; background: url("' + mbtrans.icon + '") no-repeat';
|
309 |
-
var cancelstyle = 'margin-left: 10px; margin-top: 10px;';
|
310 |
-
var editor = $('<div>', { id: 'maxbutton-add-button', class: 'content' });
|
311 |
-
|
312 |
-
//.append( $('<a>', { 'class' : 'button-secondary', 'style' : cancelstyle }).text(mbtrans.cancel)
|
313 |
-
editor.append( $('<h2>', { 'style' : h2style } ).text(mbtrans.insert) )
|
314 |
-
.append( $('<p>').text(mbtrans.select) )
|
315 |
-
.append( $('<div>', { id: 'mb_media_buttons' }).append( '<div class="loading"></div>' )
|
316 |
-
|
317 |
-
);
|
318 |
-
|
319 |
-
return editor;
|
320 |
-
|
321 |
-
}
|
322 |
-
|
323 |
-
window.maxMedia = new maxMedia();
|
324 |
-
window.maxMedia.init();
|
325 |
-
|
326 |
-
}); // jquery
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/maxmodal.js
CHANGED
@@ -46,10 +46,10 @@ jQuery(document).ready(function(jq) {
|
|
46 |
|
47 |
maxModal.prototype.show = function()
|
48 |
{
|
49 |
-
|
50 |
$('.maxmodal_overlay').remove();
|
51 |
$('body').removeClass('max-modal-active');
|
52 |
this.writeOverlay();
|
|
|
53 |
|
54 |
if (this.setWidth)
|
55 |
{
|
@@ -60,12 +60,22 @@ jQuery(document).ready(function(jq) {
|
|
60 |
this.currentModal.height(this.setHeight);
|
61 |
}
|
62 |
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
65 |
|
|
|
|
|
|
|
|
|
66 |
var top = (this.windowHeight - modalHeight) / 2;
|
67 |
var left = (this.windowWidth - modalWidth) / 2;
|
68 |
|
|
|
|
|
69 |
if (top < 30)
|
70 |
{
|
71 |
top = 30; // top + admin bar
|
@@ -75,14 +85,19 @@ jQuery(document).ready(function(jq) {
|
|
75 |
left: 0;
|
76 |
}
|
77 |
|
78 |
-
if (modalHeight > this.windowHeight)
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
80 |
|
|
|
81 |
this.currentModal.css('left', left + 'px');
|
82 |
this.currentModal.css('top', top + 'px');
|
83 |
this.currentModal.css('height', modalHeight);
|
84 |
|
85 |
-
this.currentModal.show();
|
86 |
|
87 |
$('.maxmodal_overlay').show();
|
88 |
$('body').addClass('max-modal-active');
|
@@ -109,6 +124,8 @@ jQuery(document).ready(function(jq) {
|
|
109 |
|
110 |
this.currentModal.removeAttr('style');
|
111 |
this.currentModal.find('.modal_content').removeAttr('style');
|
|
|
|
|
112 |
// redo sizes, repaint.
|
113 |
|
114 |
this.show();
|
@@ -140,10 +157,15 @@ jQuery(document).ready(function(jq) {
|
|
140 |
this.currentModal.find('.modal_title').text(title);
|
141 |
}
|
142 |
|
|
|
|
|
|
|
|
|
|
|
143 |
maxModal.prototype.setControls = function(controls)
|
144 |
{
|
145 |
var content = this.currentModal.find('.modal_content');
|
146 |
-
var controldiv = $('<div class="controls">');
|
147 |
|
148 |
for(i =0; i < this.controls.length; i++)
|
149 |
controldiv.append(this.controls[i]);
|
@@ -176,8 +198,10 @@ jQuery(document).ready(function(jq) {
|
|
176 |
case 'cancel':
|
177 |
text = modaltext.cancel;
|
178 |
break;
|
179 |
-
|
180 |
-
|
|
|
|
|
181 |
break;
|
182 |
}
|
183 |
|
@@ -243,26 +267,12 @@ jQuery(document).ready(function(jq) {
|
|
243 |
var funcName = data.data('load') + '(modal)';
|
244 |
var callFunc = new Function ('modal', funcName);
|
245 |
|
246 |
-
|
247 |
-
/* Args coming!
|
248 |
-
if (typeof(data.data('load-args') !== 'undefined')
|
249 |
-
{
|
250 |
-
var args = data.data('load-args').split(',');
|
251 |
-
|
252 |
-
for(i=0; i< args.length; i++)
|
253 |
-
{
|
254 |
-
|
255 |
-
}
|
256 |
-
}
|
257 |
-
*/
|
258 |
-
|
259 |
try
|
260 |
{
|
261 |
callFunc(this);
|
262 |
}
|
263 |
catch(err)
|
264 |
{
|
265 |
-
ex
|
266 |
console.log('MB Modal Callback Error: ' + err.message);
|
267 |
console.log('MB Mobdal tried calling: ' + funcName);
|
268 |
}
|
@@ -273,7 +283,6 @@ ex
|
|
273 |
|
274 |
maxModal.prototype.newModal = function(id)
|
275 |
{
|
276 |
-
|
277 |
if (this.currentModal !== null)
|
278 |
this.close();
|
279 |
|
46 |
|
47 |
maxModal.prototype.show = function()
|
48 |
{
|
|
|
49 |
$('.maxmodal_overlay').remove();
|
50 |
$('body').removeClass('max-modal-active');
|
51 |
this.writeOverlay();
|
52 |
+
this.currentModal.show();
|
53 |
|
54 |
if (this.setWidth)
|
55 |
{
|
60 |
this.currentModal.height(this.setHeight);
|
61 |
}
|
62 |
|
63 |
+
$m = this.currentModal;
|
64 |
+
|
65 |
+
var headerHeight = $m.find('.modal_header').outerHeight();
|
66 |
+
|
67 |
+
var contentHeight = $m.find('.modal_content').outerHeight();
|
68 |
+
var contentWidth = $m.find('.modal_content').width();
|
69 |
|
70 |
+
var controlsHeight = $m.find('.modal_controls').outerHeight();
|
71 |
+
|
72 |
+
var modalHeight = headerHeight + contentHeight + controlsHeight; //this.currentModal.height();
|
73 |
+
var modalWidth = contentWidth; //this.currentModal.width();
|
74 |
var top = (this.windowHeight - modalHeight) / 2;
|
75 |
var left = (this.windowWidth - modalWidth) / 2;
|
76 |
|
77 |
+
|
78 |
+
|
79 |
if (top < 30)
|
80 |
{
|
81 |
top = 30; // top + admin bar
|
85 |
left: 0;
|
86 |
}
|
87 |
|
88 |
+
if (modalHeight > this.windowHeight) // if height is higher than screen supports
|
89 |
+
{
|
90 |
+
newHeight = this.windowHeight - top - 5;
|
91 |
+
this.currentModal.height(newHeight);
|
92 |
+
|
93 |
+
var newContentH = newHeight - headerHeight - controlsHeight;
|
94 |
+
$m.find('.modal_content').height(newContentH);
|
95 |
|
96 |
+
}
|
97 |
this.currentModal.css('left', left + 'px');
|
98 |
this.currentModal.css('top', top + 'px');
|
99 |
this.currentModal.css('height', modalHeight);
|
100 |
|
|
|
101 |
|
102 |
$('.maxmodal_overlay').show();
|
103 |
$('body').addClass('max-modal-active');
|
124 |
|
125 |
this.currentModal.removeAttr('style');
|
126 |
this.currentModal.find('.modal_content').removeAttr('style');
|
127 |
+
this.currentModal.removeAttr('style');
|
128 |
+
|
129 |
// redo sizes, repaint.
|
130 |
|
131 |
this.show();
|
157 |
this.currentModal.find('.modal_title').text(title);
|
158 |
}
|
159 |
|
160 |
+
maxModal.prototype.resetControls = function()
|
161 |
+
{
|
162 |
+
this.controls = [];
|
163 |
+
}
|
164 |
+
|
165 |
maxModal.prototype.setControls = function(controls)
|
166 |
{
|
167 |
var content = this.currentModal.find('.modal_content');
|
168 |
+
var controldiv = $('<div class="modal_controls controls">');
|
169 |
|
170 |
for(i =0; i < this.controls.length; i++)
|
171 |
controldiv.append(this.controls[i]);
|
198 |
case 'cancel':
|
199 |
text = modaltext.cancel;
|
200 |
break;
|
201 |
+
|
202 |
+
default:
|
203 |
+
text = type; // if nothing else
|
204 |
+
type = 'custom';
|
205 |
break;
|
206 |
}
|
207 |
|
267 |
var funcName = data.data('load') + '(modal)';
|
268 |
var callFunc = new Function ('modal', funcName);
|
269 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
try
|
271 |
{
|
272 |
callFunc(this);
|
273 |
}
|
274 |
catch(err)
|
275 |
{
|
|
|
276 |
console.log('MB Modal Callback Error: ' + err.message);
|
277 |
console.log('MB Mobdal tried calling: ' + funcName);
|
278 |
}
|
283 |
|
284 |
maxModal.prototype.newModal = function(id)
|
285 |
{
|
|
|
286 |
if (this.currentModal !== null)
|
287 |
this.close();
|
288 |
|
js/media_button.js
ADDED
@@ -0,0 +1,280 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// media buttons v2
|
2 |
+
jQuery(document).ready(function(jq) {
|
3 |
+
$ = jq;
|
4 |
+
|
5 |
+
maxMedia.prototype = {
|
6 |
+
parent: 'body',
|
7 |
+
is_active: false,
|
8 |
+
maxmodal: null,
|
9 |
+
maxajax: null,
|
10 |
+
callback: null,
|
11 |
+
useShortCodeOptions: true,
|
12 |
+
shortcodeData: null,
|
13 |
+
getPage: 1,
|
14 |
+
ajaxSuccessHandler: null,
|
15 |
+
|
16 |
+
|
17 |
+
};
|
18 |
+
|
19 |
+
function maxMedia() {
|
20 |
+
if (typeof window.maxFoundry.maxmodal == 'undefined')
|
21 |
+
{
|
22 |
+
window.maxFoundry.maxmodal = new maxModal();
|
23 |
+
window.maxFoundry.maxmodal.init();
|
24 |
+
}
|
25 |
+
if (typeof window.maxFoundry.maxAjax == 'undefined')
|
26 |
+
{
|
27 |
+
window.maxFoundry.maxAjax = new maxAjax();
|
28 |
+
window.maxFoundry.maxAjax.init();
|
29 |
+
}
|
30 |
+
|
31 |
+
this.maxmodal = window.maxFoundry.maxmodal;
|
32 |
+
this.maxajax = window.maxFoundry.maxAjax;
|
33 |
+
}
|
34 |
+
|
35 |
+
// here the vars go.
|
36 |
+
maxMedia.prototype.init = function(options)
|
37 |
+
{
|
38 |
+
if (typeof options !== 'undefined')
|
39 |
+
{
|
40 |
+
if (typeof options.callback !== 'undefined')
|
41 |
+
this.callback = options.callback || null;
|
42 |
+
// this.bar = options.requiredArg;
|
43 |
+
if (typeof options.useShortCodeOptions !== 'undefined')
|
44 |
+
this.useShortCodeOptions = options.useShortCodeOptions;
|
45 |
+
if (typeof options.parent !== 'undefined')
|
46 |
+
{
|
47 |
+
this.parent = options.parent;
|
48 |
+
}
|
49 |
+
|
50 |
+
}
|
51 |
+
this.ajaxSuccessHandler = $.proxy(this.putContent, this);
|
52 |
+
|
53 |
+
$(document).off('click','.pagination span, .pagination-links a');
|
54 |
+
$(document).on('click','.pagination span, .pagination-links a', $.proxy(this.doPagination, this)); // should be more specific
|
55 |
+
|
56 |
+
$(document).off('media_button_content_buttons_load');
|
57 |
+
$(document).on('media_button_content_buttons_load', $.proxy(this.hookButtonAction, this));
|
58 |
+
|
59 |
+
$(document).off('media_button_content_shortcode_options');
|
60 |
+
$(document).on('media_button_content_shortcode_options', $.proxy(this.hookShortCodeAction, this));
|
61 |
+
}
|
62 |
+
|
63 |
+
maxMedia.prototype.openModal = function()
|
64 |
+
{
|
65 |
+
this.maxmodal.newModal('media-popup');
|
66 |
+
|
67 |
+
this.maxmodal.parent = this.parent;
|
68 |
+
this.maxmodal.setTitle(mbtrans.windowtitle);
|
69 |
+
|
70 |
+
this.maxmodal.setContent('<span class="loading"></span>');
|
71 |
+
this.maxmodal.show();
|
72 |
+
|
73 |
+
this.maxajax.showSpinner( $('.loading') );
|
74 |
+
this.loadButtons();
|
75 |
+
|
76 |
+
this.is_active = true;
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
+
maxMedia.prototype.loadButtons = function()
|
81 |
+
{
|
82 |
+
|
83 |
+
var data = this.maxajax.ajaxInit();
|
84 |
+
data['plugin_action'] = 'getAjaxButtons';
|
85 |
+
data['page'] = this.getPage;
|
86 |
+
|
87 |
+
|
88 |
+
this.maxajax.ajaxPost(data, this.ajaxSuccessHandler);
|
89 |
+
}
|
90 |
+
|
91 |
+
maxMedia.prototype.putContent = function(result)
|
92 |
+
{
|
93 |
+
var result = JSON.parse(result);
|
94 |
+
this.maxajax.removeSpinner();
|
95 |
+
|
96 |
+
if (typeof result.output !== 'undefined')
|
97 |
+
{
|
98 |
+
this.maxmodal.setContent(result.output);
|
99 |
+
}
|
100 |
+
if (typeof result.action !== 'undefined')
|
101 |
+
{
|
102 |
+
$(document).trigger('media_button_content_' + result.action, result);
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
maxMedia.prototype.hookButtonAction = function()
|
107 |
+
{
|
108 |
+
$(document).off('click', '.button-list');
|
109 |
+
$(document).on('click', '.button-list', $.proxy(function (e) // this selects the button, and enables / disabled the insert button based on that.
|
110 |
+
{
|
111 |
+
var target = $(e.target);
|
112 |
+
|
113 |
+
if ( typeof $(target).data('button') === 'undefined')
|
114 |
+
{
|
115 |
+
target = $(target).parents('.button-list');
|
116 |
+
}
|
117 |
+
|
118 |
+
var button = $(target).data('button');
|
119 |
+
$('.button-list').removeClass('selected');
|
120 |
+
$(target).addClass('selected');
|
121 |
+
$('.controls .button-primary').data('button', button);
|
122 |
+
|
123 |
+
this.maxmodal.currentModal.find('.controls .button-primary').removeClass('disabled');
|
124 |
+
},this));
|
125 |
+
|
126 |
+
$(document).off('click', ".button-preview a");
|
127 |
+
$(document).on('click', ".button-preview a", function(e) { e.preventDefault(); }); // prevent button clicks
|
128 |
+
|
129 |
+
this.maxmodal.resetControls();
|
130 |
+
|
131 |
+
|
132 |
+
if (this.useShortCodeOptions) // check if second window is required
|
133 |
+
this.maxmodal.addControl(mbtrans.use, '', $.proxy(this.shortCodeOptions, this) );
|
134 |
+
else
|
135 |
+
this.maxmodal.addControl(mbtrans.insert, '', $.proxy(this.selectAction, this) );
|
136 |
+
|
137 |
+
this.maxmodal.setControls();
|
138 |
+
this.maxmodal.currentModal.find('.controls .button-primary').addClass('disabled');
|
139 |
+
|
140 |
+
this.maxmodal.checkResize();
|
141 |
+
|
142 |
+
// this.hookPagination();
|
143 |
+
|
144 |
+
}
|
145 |
+
|
146 |
+
// load the shortcode options screen
|
147 |
+
maxMedia.prototype.hookShortCodeAction = function (e, result)
|
148 |
+
{
|
149 |
+
|
150 |
+
this.shortcodeData = result.shortcodeData;
|
151 |
+
var button_id = result.button_id;
|
152 |
+
|
153 |
+
this.maxmodal.resetControls();
|
154 |
+
this.maxmodal.addControl(mbtrans.insert, '', $.proxy(this.selectAction, this) );
|
155 |
+
this.maxmodal.setControls();
|
156 |
+
|
157 |
+
$(this.maxmodal.currentModal).find('.controls .button-primary').data('button', button_id);
|
158 |
+
|
159 |
+
$(this.maxmodal.currentModal).find('.more-options a').off('click');
|
160 |
+
$(this.maxmodal.currentModal).find('.more-options a').on('click', $.proxy(function (e) {
|
161 |
+
$(this.maxmodal.currentModal).find('.more-field').show();
|
162 |
+
$(e.target).parents('.option .more').hide();
|
163 |
+
this.maxmodal.checkResize();
|
164 |
+
}, this));
|
165 |
+
|
166 |
+
this.maxmodal.checkResize();
|
167 |
+
|
168 |
+
}
|
169 |
+
|
170 |
+
// action to select a button, and get button id.
|
171 |
+
maxMedia.prototype.selectAction = function(e)
|
172 |
+
{
|
173 |
+
e.preventDefault();
|
174 |
+
if ($(e.target).hasClass('disabled'))
|
175 |
+
return; // disabled buttons don't say yes.
|
176 |
+
|
177 |
+
var button_id = $(e.target).data('button');
|
178 |
+
|
179 |
+
if (typeof button_id === 'undefined' || parseInt(button_id) <= 0)
|
180 |
+
return; // no button yet.
|
181 |
+
|
182 |
+
if (typeof this.callback == 'function')
|
183 |
+
{
|
184 |
+
this.callback(button_id, $(e.target) );
|
185 |
+
}
|
186 |
+
else
|
187 |
+
{
|
188 |
+
this.buttonToEditor(button_id);
|
189 |
+
this.close();
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
// ajax query for shortcode options
|
194 |
+
maxMedia.prototype.shortCodeOptions = function (e)
|
195 |
+
{
|
196 |
+
e.preventDefault();
|
197 |
+
if ($(e.target).hasClass('disabled'))
|
198 |
+
return; // disabled buttons don't say yes.
|
199 |
+
|
200 |
+
var button_id = $(e.target).data('button');
|
201 |
+
var data = this.maxajax.ajaxInit();
|
202 |
+
data['plugin_action'] = 'mediaShortcodeOptions';
|
203 |
+
data['button_id'] = button_id;
|
204 |
+
|
205 |
+
this.maxajax.ajaxPost(data, this.ajaxSuccessHandler);
|
206 |
+
}
|
207 |
+
|
208 |
+
/*maxMedia.prototype.hookPagination = function ()
|
209 |
+
{
|
210 |
+
$(document).off('click','.pagination span, .pagination-links a');
|
211 |
+
$(document).on('click','.pagination span, .pagination-links a', $.proxy(this.doPagination, this));
|
212 |
+
} */
|
213 |
+
|
214 |
+
maxMedia.prototype.doPagination = function (e)
|
215 |
+
{
|
216 |
+
e.preventDefault();
|
217 |
+
|
218 |
+
if ( $(e.target).hasClass('disabled'))
|
219 |
+
return false;
|
220 |
+
|
221 |
+
var page = $(e.target).data('page');
|
222 |
+
if (page <= 1) page = 1;
|
223 |
+
|
224 |
+
this.getPage = page;
|
225 |
+
this.loadButtons();
|
226 |
+
}
|
227 |
+
|
228 |
+
// create the shortcode to send to the editor.
|
229 |
+
maxMedia.prototype.generateShortcode = function (button_id)
|
230 |
+
{
|
231 |
+
var shortcode = '[maxbutton id="' + button_id + '"';
|
232 |
+
if (typeof this.shortcodeData !== 'undefined')
|
233 |
+
{
|
234 |
+
$(this.shortcodeData).each(function(index, el){
|
235 |
+
var input = $('input[name="' + el.name + '"]');
|
236 |
+
var inputval = $('input[name="' + el.name + '"]').val();
|
237 |
+
|
238 |
+
if (input.attr('type') == 'checkbox')
|
239 |
+
{
|
240 |
+
|
241 |
+
var checked = input.is(':checked');
|
242 |
+
|
243 |
+
if (checked != el.original)
|
244 |
+
{
|
245 |
+
if (checked)
|
246 |
+
shortcode += ' ' + el.shortcode + '="' + el.checked + '"';
|
247 |
+
else
|
248 |
+
shortcode += ' ' + el.shortcode + '="' + el.unchecked + '"';
|
249 |
+
}
|
250 |
+
}
|
251 |
+
else if (inputval != el.original)
|
252 |
+
{
|
253 |
+
shortcode += ' ' + el.shortcode + '="' + inputval + '"';
|
254 |
+
}
|
255 |
+
});
|
256 |
+
}
|
257 |
+
|
258 |
+
|
259 |
+
shortcode += ' ] ';
|
260 |
+
return shortcode;
|
261 |
+
}
|
262 |
+
|
263 |
+
maxMedia.prototype.buttonToEditor = function (button_id)
|
264 |
+
{
|
265 |
+
shortcode = this.generateShortcode(button_id);
|
266 |
+
window.send_to_editor(shortcode, button_id);
|
267 |
+
}
|
268 |
+
|
269 |
+
maxMedia.prototype.close = function()
|
270 |
+
{
|
271 |
+
this.maxmodal.close();
|
272 |
+
}
|
273 |
+
|
274 |
+
if (typeof window.maxFoundry === 'undefined')
|
275 |
+
window.maxFoundry = {};
|
276 |
+
|
277 |
+
window.maxFoundry.maxMedia = maxMedia;
|
278 |
+
//window.maxFoundry.maxMedia.init();
|
279 |
+
|
280 |
+
}); // jquery
|
js/min/maxbuttons-admin.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function maxAdmin(){}var $=jQuery;maxAdmin.prototype={colorUpdateTime:!0,fields:null,button_id:null,form_updated:!1,tabs:null},maxAdmin.prototype.init=function(){this.button_id=$('input[name="button_id"]').val(),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault()}),$(document).on("click",".output .preview-toggle",$.proxy(this.toggle_preview,this)),$("#maxbuttons .input-paging").on("change",$.proxy(this.do_paging,this)),$(".manual-toggle").on("click",$.proxy(this.toggleManual,this)),$(".manual-entry").draggable({cancel:"p, li"}),$(document).on("submit","form.mb_ajax_save",$.proxy(this.formAjaxSave,this)),$(document).on("click","[data-buttonaction]",$.proxy(this.button_action,this)),$(document).on("reInitConditionals",$.proxy(this.initConditionials,this)),this.initConditionials(),$(document).on("change, input",'input[type="range"]',$.proxy(this.updateRange,this)),this.updateRange(null),0!=$("#new-button-form").length&&(this.button_id>0&&$("#maxbuttons .mb-message").show(),this.initResponsive(),$("#maxbuttons .output").draggable({cancel:".nodrag"}),$("#maxbuttons .color-field").wpColorPicker({width:300,change:$.proxy(_.throttle(function(t,a){t.preventDefault();var e=a.color.toString();this.update_color(t,a,e)},200),this)}),$(".input.mbcolor .arrows").on("click",$.proxy(this.copyColor,this)),$("#radius_toggle").on("click",$.proxy(this.toggleRadiusLock,this)),"undefined"!=typeof buttonFieldMap&&(this.fields=$.parseJSON(buttonFieldMap)),$("#maxbuttons input").not(".color-field").on("keyup change",$.proxy(this.update_preview,this)),$("#maxbuttons input.color-field").on("focus",$.proxy(this.select_field,this)),$("#maxbuttons select").on("change",$.proxy(this.update_preview,this)),$(window).on("beforeunload",$.proxy(function(){if(this.form_updated)return maxajax.leave_page},this)),$(document).on("keyup","input",function(t){if(t.keyCode&&13==t.keyCode)return $(":input")[$(":input").index(document.activeElement)+1].focus(),!1}),$(".button-save").click($.proxy(function(){return this.saveIndicator(!1),$("#new-button-form").submit(),!1},this)),$(".shortcode-expand").on("click",this.toggleShortcode))},maxAdmin.prototype.repaint_preview=function(){$('.mb_tab input[type="text"]').trigger("change"),$('.mb_tab input[type="number"]').trigger("change"),$(".mb_tab select").trigger("change"),$('.mb_tab input[type="hidden"]').trigger("change"),$('.mb_tab input[type="radio"]:checked').trigger("change"),$('.mb_tab input[type="checkbox"]:checked').trigger("change")},maxAdmin.prototype.update_preview=function(t){t.preventDefault(),this.saveIndicator(!0);var a=$(t.target),e=$(a).data("field");if(void 0===e)o=$(a).attr("id");else var o=e;var n=this.fields[o];if(void 0!==n&&(void 0!==n.css&&(value=a.val(),void 0!==n.css_unit&&-1==value.indexOf(n.css_unit)&&(value+=n.css_unit),a.is(":checkbox")&&!a.is(":checked")&&(value=""),this.putCSS(n,value)),void 0!==n.attr&&$(".output .result").find("a").attr(n.attr,a.val()),void 0!==n.func)){var i=n.func;i.indexOf(".")<0?i="self."+i+"(target)":i+="(target)";try{new Function("target","self",i)(a,this)}catch(t){console.log(t)}}},maxAdmin.prototype.select_field=function(t){$(t.target).select()},maxAdmin.prototype.button_action=function(t){t.preventDefault();var a=$(t.target).data("buttonaction");this.form_updated=!1;var e=$(t.target).data("buttonid"),o=$('input[name="'+a+'_nonce"]').val(),n=maxajax.ajax_url,i={action:"mb_button_action",button_action:a,button_id:e,nonce:o};$.post({url:n,data:i,success:function(t){response=JSON.parse(t),void 0!==response.redirection&&(window.location=response.redirection)},error:function(){console.log("error in button action"+a)}})},maxAdmin.prototype.checkCopyModal=function(t){this.form_updated?t.currentModal.find(".mb-message").show():$(t.currentModal).find(".mb-message").hide()},maxAdmin.prototype.toggle_preview=function(t){$(".output .inner").is(":hidden")?($(".output .inner").show(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up")):($(".output .inner").hide(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-up").addClass("dashicons-arrow-down"))},maxAdmin.prototype.putCSS=function(t,a,e){var o=".maxbutton";if("hover"==(e=e||"both")?o="a.hover ":"normal"==e&&(o="a.normal "),void 0!==t.csspart){var n=t.csspart.split(",");for(i=0;i<n.length;i++){var r=o+" ."+n[i];$(".output .result").find(r).css(t.css,a)}}else $(".output .result").find(o).css(t.css,a)},maxAdmin.prototype.update_color=function(t,a,e){t.preventDefault(),this.saveIndicator(!0);var o=$(t.target);-1===e.indexOf("#")&&(e="#"+e);var n=o.attr("id");if($("#"+n).val(e),-1!==n.indexOf("box_shadow"))this.updateBoxShadow(o);else if(-1!==n.indexOf("text_shadow"))this.updateTextShadow(o);else if(-1!==n.indexOf("gradient"))-1==n.indexOf("hover")?this.updateGradient():this.updateGradient(!0);else{if("button_preview"!=n){-1==n.indexOf("hover")?state="normal":state="hover";var i=this.fields[n];return void this.putCSS(i,e,state)}$(".output .result").css("backgroundColor",e)}},maxAdmin.prototype.copyColor=function(t){t.preventDefault(),t.stopPropagation();var a=$(t.target),e=$(t.target).parents("[data-bind]"),o="#"+e.data("id"),n="#"+e.data("bind");if(a.hasClass("arrow-right"))i="right";else var i="left";if(e.hasClass("right"))r="left";else var r="right";"left"==r?copy="right"==i:"right"==r&&(copy="right"!=i),copy?($(n).val($(o).val()),$(n).trigger("change"),$(n).wpColorPicker("color",$(o).val())):($(o).val($(n).val()),$(o).trigger("change"),$(o).wpColorPicker("color",$(n).val()))},maxAdmin.prototype.updateGradient=function(t){var a="";(t=t||!1)&&(a="_hover");var e=parseInt($("#gradient_stop").val());isNaN(e)&&(e=45);var o=$("#use_gradient").prop("checked"),n=this.hexToRgb($("#gradient_start_color"+a).val()),i=this.hexToRgb($("#gradient_end_color"+a).val()),r=parseInt($("#gradient_start_opacity"+a).val()),s=parseInt($("#gradient_end_opacity"+a).val());if(o||(i=n,s=r),isNaN(r)&&(r=100),isNaN(s)&&(s=100),t)d=$(".output .result").find("a.hover");else var d=$(".output .result").find("a.normal");d.css("background","linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+s/100+") )"),d.css("background","-moz-linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+s/100+") )"),d.css("background","-o-linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+s/100+") )"),d.css("background","-webkit-gradient(linear, left top, left bottom, color-stop("+e+"%, rgba("+n+","+r/100+")), color-stop(1, rgba("+i+","+s/100+") ));")},maxAdmin.prototype.hexToRgb=function(t){t=t.replace("#","");var a=parseInt(t,16);return(a>>16&255)+","+(a>>8&255)+","+(255&a)},maxAdmin.prototype.updateBoxShadow=function(t){t=t||null;var a=$("#box_shadow_offset_left").val(),e=$("#box_shadow_offset_top").val(),o=$("#box_shadow_width").val(),n=$("#box_shadow_spread").val(),i=$("#box_shadow_color").val(),r=$("#box_shadow_color_hover").val();$(".output .result").find("a.normal").css("boxShadow",a+"px "+e+"px "+o+"px "+n+"px "+i),$(".output .result").find("a.hover").css("boxShadow",a+"px "+e+"px "+o+"px "+n+"px "+r)},maxAdmin.prototype.updateTextShadow=function(t,a){a=a||!1;var e=$("#text_shadow_offset_left").val(),o=$("#text_shadow_offset_top").val(),n=$("#text_shadow_width").val(),i=$("#text_shadow_color").val(),r=$("#text_shadow_color_hover").val(),s=$(t).attr("id"),d=this.fields[s];d.css="textShadow";var l=e+"px "+o+"px "+n+"px "+i;this.putCSS(d,l,"normal"),l=e+"px "+o+"px "+n+"px "+r,this.putCSS(d,l,"hover")},maxAdmin.prototype.updateAnchorText=function(t){0===$(".output .result").find("a .mb-text").length&&($(".output .result").find("a").append('<span class="mb-text"></span>'),$(".output .result").find("a .mb-text").css({display:"block","line-height":"1em","box-sizing":"border-box"}),this.repaint_preview()),$(".output .result").find("a .mb-text").text(t.val())},maxAdmin.prototype.updateGradientOpacity=function(t){this.updateGradient(!0),this.updateGradient(!1)},maxAdmin.prototype.updateDimension=function(t){var a=$(t).val(),e=$(t).attr("id"),o=this.fields[e];a>0?this.putCSS(o,a):this.putCSS(o,"auto")},maxAdmin.prototype.updateRadius=function(t){var a=t.val(),e=["radius_bottom_left","radius_bottom_right","radius_top_left","radius_top_right"];if("lock"==$("#radius_toggle").data("lock"))for(i=0;i<e.length;i++){var o=e[i];$("#"+o).val(a);var n=this.fields[o];this.putCSS(n,a+"px")}},maxAdmin.prototype.toggleRadiusLock=function(t){var a=$(t.target),e=$(a).data("lock");"lock"==e?($(a).removeClass("dashicons-lock").addClass("dashicons-unlock"),$(a).data("lock","unlock")):"unlock"==e&&($(a).removeClass("dashicons-unlock").addClass("dashicons-lock"),$(a).data("lock","lock"))},maxAdmin.prototype.initResponsive=function(){window.maxFoundry.maxadmin.responsive=new mbResponsive,window.maxFoundry.maxadmin.responsive.init(this)},maxAdmin.prototype.do_paging=function(t){var a=parseInt($(t.target).val());if(a<=parseInt($(t.target).attr("max"))){var e=$(t.target).data("url");window.location=e+"&paged="+a}},maxAdmin.prototype.toggleShortcode=function(t){$(".shortcode-expand").hasClass("closed")?($(" .mb-message.shortcode .expanded").css("display","inline-block"),$(".shortcode-expand span").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up"),$(".shortcode-expand").removeClass("closed").addClass("open")):($(" .mb-message.shortcode .expanded").css("display","none"),$(".shortcode-expand span").addClass("dashicons-arrow-down").removeClass("dashicons-arrow-up"),$(".shortcode-expand").addClass("closed").removeClass("open"))},maxAdmin.prototype.toggleManual=function(t){t.preventDefault();var a=$(t.target),e=a.data("target"),o=$('.manual-entry[data-manual="'+e+'"]');if(o.is(":visible"))return o.hide(),!0;var n=$('[data-options="'+e+'"]').position().top+a.height();o.css("top",n),o.css("right",15),o.css("left","auto"),o.show()},maxAdmin.prototype.initConditionials=function(){var t=this;$("[data-show]").each(function(){var a=$(this).data("show"),e=a.target,o=a.values;$(document).on("change",'[name="'+e+'"]',{child:this,values:o},$.proxy(t.updateConditional,t)),$('[name="'+e+'"]').length>1?$('[name="'+e+'"]:checked').trigger("change",["conditional"]):$('[name="'+e+'"]').trigger("change",["conditional"])});var a=[];$("[data-has]").each(function(){var e=$(this).data("has"),o=e.target,n=e.values;$('[name="'+o+'"]').on("change",{target:o,child:this,values:n},$.proxy(t.updateHasConditional,t));var i='[name="'+o+'"]';$.inArray(i,a),a.push(i)}),a.length>0&&$(a.toString()).first().trigger("change",["conditional"])},maxAdmin.prototype.updateConditional=function(t){var a=t.data,e=a.values,o=a.child,n=$(t.currentTarget),i=$(n).val();if("checkbox"===n.attr("type")){var r=$(n).prop("checked");i="checked"==e&&r?"checked":"unchecked"!=e||r?0:"unchecked"}e.indexOf(i)>=0?($(o).fadeIn("fast"),$(o).find("input, select").trigger("change")):($(o).fadeOut("fast"),$(o).find("input, select").trigger("change"))},maxAdmin.prototype.updateHasConditional=function(t){var a=t.data,e=a.values,o=a.child,n=a.target,i=[];$(e).each(function(t){i.push("[value="+this+"]")}),$('[name="'+n+'"]').filter(i.toString()).length>0?$(o).fadeIn("fast"):$(o).fadeOut("fast")},maxAdmin.prototype.updateRange=function(t){if(void 0===t||null===t)a=$('input[type="range"]');else var a=[t.target];$(a).each(function(){var t=$(this).val();$(this).parents(".input").find(".range_value output").val(t+"%")})},maxAdmin.prototype.saveIndicator=function(t){this.form_updated=!!t},maxAdmin.prototype.formAjaxSave=function(t){t.preventDefault();var a=mb_ajax.ajaxurl,e=$(t.target).serialize();$.ajax({type:"POST",url:a,data:e}).done($.proxy(this.saveDone,this))},maxAdmin.prototype.saveDone=function(t){$("[data-form]").prop("disabled",!1);var a=$.parseJSON(t),e=a.result,o=a.title,n=a.data.id;if(void 0!==a.data.new_nonce){a.data.new_nonce;$('input[name="nonce"]').val(a.data.new_nonce)}if(e){$('input[name="collection_id"]').val(n);var i=window.location.href;-1===i.indexOf("collection_id")&&window.history.replaceState({},"",i+"&collection_id="+n),$(document).trigger("mbFormSaved");var r=$('input[name="sorted"]').val();$('input[name="previous_selection"]').val(r),a.data.reload&&document.location.reload(!0)}e||($modal=window.maxFoundry.maxModal,$modal.newModal("collection_error"),$modal.setTitle(o),$modal.setContent(a.body),$modal.setControls('<button class="modal_close button-primary">'+a.close_text+"</button>"),$modal.show())};
|
1 |
+
function maxAdmin(){}var $=jQuery;maxAdmin.prototype={colorUpdateTime:!0,colorPalettes:!0,fields:null,button_id:null,form_updated:!1,tabs:null},maxAdmin.prototype.init=function(){this.button_id=$('input[name="button_id"]').val(),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault()}),$(document).on("click",".output .preview-toggle",$.proxy(this.toggle_preview,this)),$("#maxbuttons .input-paging").on("change",$.proxy(this.do_paging,this)),$(".manual-toggle").on("click",$.proxy(this.toggleManual,this)),$(".manual-entry").draggable({cancel:"p, li"}),$(document).on("submit","form.mb_ajax_save",$.proxy(this.formAjaxSave,this)),$(document).on("click","[data-buttonaction]",$.proxy(this.button_action,this)),$(document).on("reInitConditionals",$.proxy(this.initConditionials,this)),this.initConditionials(),$(document).on("change, input",'input[type="range"]',$.proxy(this.updateRange,this)),this.updateRange(null),0!=$("#new-button-form").length&&(this.button_id>0&&$("#maxbuttons .mb-message").show(),this.initResponsive(),$("#maxbuttons .output").draggable({cancel:".nodrag"}),$("#maxbuttons .color-field").wpColorPicker({width:300,palettes:this.colorPalettes,change:$.proxy(_.throttle(function(t,a){t.preventDefault();var e=a.color.toString();this.update_color(t,a,e)},200),this)}),$(".input.mbcolor .arrows").on("click",$.proxy(this.copyColor,this)),$("#radius_toggle").on("click",$.proxy(this.toggleRadiusLock,this)),"undefined"!=typeof buttonFieldMap&&(this.fields=$.parseJSON(buttonFieldMap)),$("#maxbuttons input").not(".color-field").on("keyup change",$.proxy(this.update_preview,this)),$("#maxbuttons input.color-field").on("focus",$.proxy(this.select_field,this)),$("#maxbuttons select").on("change",$.proxy(this.update_preview,this)),$(window).on("beforeunload",$.proxy(function(){if(this.form_updated)return maxajax.leave_page},this)),$(document).on("keyup","input",function(t){if(t.keyCode&&13==t.keyCode)return $(":input")[$(":input").index(document.activeElement)+1].focus(),!1}),$(".button-save").click($.proxy(function(){return this.saveIndicator(!1),$("#new-button-form").submit(),!1},this)),$(".shortcode-expand").on("click",this.toggleShortcode))},maxAdmin.prototype.repaint_preview=function(){$('.mb_tab input[type="text"]').trigger("change"),$('.mb_tab input[type="number"]').trigger("change"),$(".mb_tab select").trigger("change"),$('.mb_tab input[type="hidden"]').trigger("change"),$('.mb_tab input[type="radio"]:checked').trigger("change"),$('.mb_tab input[type="checkbox"]:checked').trigger("change")},maxAdmin.prototype.update_preview=function(t){t.preventDefault(),this.saveIndicator(!0);var a=$(t.target),e=$(a).data("field");if(void 0===e)o=$(a).attr("id");else var o=e;var n=this.fields[o];if(void 0!==n&&(void 0!==n.css&&(value=a.val(),void 0!==n.css_unit&&-1==value.indexOf(n.css_unit)&&(value+=n.css_unit),a.is(":checkbox")&&!a.is(":checked")&&(value=""),this.putCSS(n,value)),void 0!==n.attr&&$(".output .result").find("a").attr(n.attr,a.val()),void 0!==n.func)){var i=n.func;i.indexOf(".")<0?i="self."+i+"(target)":i+="(target)";try{new Function("target","self",i)(a,this)}catch(t){console.log(t)}}},maxAdmin.prototype.select_field=function(t){$(t.target).select()},maxAdmin.prototype.button_action=function(t){t.preventDefault();var a=$(t.target).data("buttonaction");this.form_updated=!1;var e=$(t.target).data("buttonid"),o=$('input[name="'+a+'_nonce"]').val(),n=maxajax.ajax_url,i={action:"mb_button_action",button_action:a,button_id:e,nonce:o};$.post({url:n,data:i,success:function(t){response=JSON.parse(t),void 0!==response.redirection&&(window.location=response.redirection)},error:function(){console.log("error in button action"+a)}})},maxAdmin.prototype.checkCopyModal=function(t){this.form_updated?t.currentModal.find(".mb-message").show():$(t.currentModal).find(".mb-message").hide()},maxAdmin.prototype.toggle_preview=function(t){$(".output .inner").is(":hidden")?($(".output .inner").show(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up")):($(".output .inner").hide(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-up").addClass("dashicons-arrow-down"))},maxAdmin.prototype.putCSS=function(t,a,e){var o=".maxbutton";if("hover"==(e=e||"both")?o="a.hover ":"normal"==e&&(o="a.normal "),void 0!==t.csspart){var n=t.csspart.split(",");for(i=0;i<n.length;i++){var r=o+" ."+n[i];$(".output .result").find(r).css(t.css,a)}}else $(".output .result").find(o).css(t.css,a)},maxAdmin.prototype.update_color=function(t,a,e){t.preventDefault(),this.saveIndicator(!0);var o=$(t.target);-1===e.indexOf("#")&&(e="#"+e);var n=o.attr("id");if($("#"+n).val(e),-1!==n.indexOf("box_shadow"))this.updateBoxShadow(o);else if(-1!==n.indexOf("text_shadow"))this.updateTextShadow(o);else if(-1!==n.indexOf("gradient"))-1==n.indexOf("hover")?this.updateGradient():this.updateGradient(!0);else{if("button_preview"!=n){-1==n.indexOf("hover")?state="normal":state="hover";var i=this.fields[n];return void this.putCSS(i,e,state)}$(".output .result").css("backgroundColor",e)}},maxAdmin.prototype.copyColor=function(t){t.preventDefault(),t.stopPropagation();var a=$(t.target),e=$(t.target).parents("[data-bind]"),o="#"+e.data("id"),n="#"+e.data("bind");if(a.hasClass("arrow-right"))i="right";else var i="left";if(e.hasClass("right"))r="left";else var r="right";"left"==r?copy="right"==i:"right"==r&&(copy="right"!=i),copy?($(n).val($(o).val()),$(n).trigger("change"),$(n).wpColorPicker("color",$(o).val())):($(o).val($(n).val()),$(o).trigger("change"),$(o).wpColorPicker("color",$(n).val()))},maxAdmin.prototype.updateGradient=function(t){var a="";(t=t||!1)&&(a="_hover");var e=parseInt($("#gradient_stop").val());isNaN(e)&&(e=45);var o=$("#use_gradient").prop("checked"),n=this.hexToRgb($("#gradient_start_color"+a).val()),i=this.hexToRgb($("#gradient_end_color"+a).val()),r=parseInt($("#gradient_start_opacity"+a).val()),s=parseInt($("#gradient_end_opacity"+a).val());if(o||(i=n,s=r),isNaN(r)&&(r=100),isNaN(s)&&(s=100),t)d=$(".output .result").find("a.hover");else var d=$(".output .result").find("a.normal");d.css("background","linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+s/100+") )"),d.css("background","-moz-linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+s/100+") )"),d.css("background","-o-linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+s/100+") )"),d.css("background","-webkit-gradient(linear, left top, left bottom, color-stop("+e+"%, rgba("+n+","+r/100+")), color-stop(1, rgba("+i+","+s/100+") ));")},maxAdmin.prototype.hexToRgb=function(t){t=t.replace("#","");var a=parseInt(t,16);return(a>>16&255)+","+(a>>8&255)+","+(255&a)},maxAdmin.prototype.updateBoxShadow=function(t){t=t||null;var a=$("#box_shadow_offset_left").val(),e=$("#box_shadow_offset_top").val(),o=$("#box_shadow_width").val(),n=$("#box_shadow_spread").val(),i=$("#box_shadow_color").val(),r=$("#box_shadow_color_hover").val();$(".output .result").find("a.normal").css("boxShadow",a+"px "+e+"px "+o+"px "+n+"px "+i),$(".output .result").find("a.hover").css("boxShadow",a+"px "+e+"px "+o+"px "+n+"px "+r)},maxAdmin.prototype.updateTextShadow=function(t,a){a=a||!1;var e=$("#text_shadow_offset_left").val(),o=$("#text_shadow_offset_top").val(),n=$("#text_shadow_width").val(),i=$("#text_shadow_color").val(),r=$("#text_shadow_color_hover").val(),s=$(t).attr("id"),d=this.fields[s];d.css="textShadow";var l=e+"px "+o+"px "+n+"px "+i;this.putCSS(d,l,"normal"),l=e+"px "+o+"px "+n+"px "+r,this.putCSS(d,l,"hover")},maxAdmin.prototype.updateAnchorText=function(t){0===$(".output .result").find("a .mb-text").length&&($(".output .result").find("a").append('<span class="mb-text"></span>'),$(".output .result").find("a .mb-text").css({display:"block","line-height":"1em","box-sizing":"border-box"}),this.repaint_preview()),$(".output .result").find("a .mb-text").text(t.val())},maxAdmin.prototype.updateGradientOpacity=function(t){this.updateGradient(!0),this.updateGradient(!1)},maxAdmin.prototype.updateDimension=function(t){var a=$(t).val(),e=$(t).attr("id"),o=this.fields[e];a>0?this.putCSS(o,a):this.putCSS(o,"auto")},maxAdmin.prototype.updateRadius=function(t){var a=t.val(),e=["radius_bottom_left","radius_bottom_right","radius_top_left","radius_top_right"];if("lock"==$("#radius_toggle").data("lock"))for(i=0;i<e.length;i++){var o=e[i];$("#"+o).val(a);var n=this.fields[o];this.putCSS(n,a+"px")}},maxAdmin.prototype.toggleRadiusLock=function(t){var a=$(t.target),e=$(a).data("lock");"lock"==e?($(a).removeClass("dashicons-lock").addClass("dashicons-unlock"),$(a).data("lock","unlock")):"unlock"==e&&($(a).removeClass("dashicons-unlock").addClass("dashicons-lock"),$(a).data("lock","lock"))},maxAdmin.prototype.initResponsive=function(){window.maxFoundry.maxadmin.responsive=new mbResponsive,window.maxFoundry.maxadmin.responsive.init(this)},maxAdmin.prototype.do_paging=function(t){var a=parseInt($(t.target).val());if(a<=parseInt($(t.target).attr("max"))){var e=$(t.target).data("url");window.location=e+"&paged="+a}},maxAdmin.prototype.toggleShortcode=function(t){$(".shortcode-expand").hasClass("closed")?($(" .mb-message.shortcode .expanded").css("display","inline-block"),$(".shortcode-expand span").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up"),$(".shortcode-expand").removeClass("closed").addClass("open")):($(" .mb-message.shortcode .expanded").css("display","none"),$(".shortcode-expand span").addClass("dashicons-arrow-down").removeClass("dashicons-arrow-up"),$(".shortcode-expand").addClass("closed").removeClass("open"))},maxAdmin.prototype.toggleManual=function(t){t.preventDefault();var a=$(t.target),e=a.data("target"),o=$('.manual-entry[data-manual="'+e+'"]');if(o.is(":visible"))return o.hide(),!0;var n=$('[data-options="'+e+'"]').position().top+a.height();o.css("top",n),o.css("right",15),o.css("left","auto"),o.show()},maxAdmin.prototype.initConditionials=function(){var t=this;$("[data-show]").each(function(){var a=$(this).data("show"),e=a.target,o=a.values;$(document).on("change",'[name="'+e+'"]',{child:this,values:o},$.proxy(t.updateConditional,t)),$('[name="'+e+'"]').length>1?$('[name="'+e+'"]:checked').trigger("change",["conditional"]):$('[name="'+e+'"]').trigger("change",["conditional"])});var a=[];$("[data-has]").each(function(){var e=$(this).data("has"),o=e.target,n=e.values;$('[name="'+o+'"]').on("change",{target:o,child:this,values:n},$.proxy(t.updateHasConditional,t));var i='[name="'+o+'"]';$.inArray(i,a),a.push(i)}),a.length>0&&$(a.toString()).first().trigger("change",["conditional"])},maxAdmin.prototype.updateConditional=function(t){var a=t.data,e=a.values,o=a.child,n=$(t.currentTarget),i=$(n).val();if("checkbox"===n.attr("type")){var r=$(n).prop("checked");i="checked"==e&&r?"checked":"unchecked"!=e||r?0:"unchecked"}e.indexOf(i)>=0?($(o).fadeIn("fast"),$(o).find("input, select").trigger("change")):($(o).fadeOut("fast"),$(o).find("input, select").trigger("change"))},maxAdmin.prototype.updateHasConditional=function(t){var a=t.data,e=a.values,o=a.child,n=a.target,i=[];$(e).each(function(t){i.push("[value="+this+"]")}),$('[name="'+n+'"]').filter(i.toString()).length>0?$(o).fadeIn("fast"):$(o).fadeOut("fast")},maxAdmin.prototype.updateRange=function(t){if(void 0===t||null===t)a=$('input[type="range"]');else var a=[t.target];$(a).each(function(){var t=$(this).val();$(this).parents(".input").find(".range_value output").val(t+"%")})},maxAdmin.prototype.saveIndicator=function(t){this.form_updated=!!t},maxAdmin.prototype.formAjaxSave=function(t){t.preventDefault();var a=mb_ajax.ajaxurl,e=$(t.target).serialize();$.ajax({type:"POST",url:a,data:e}).done($.proxy(this.saveDone,this))},maxAdmin.prototype.saveDone=function(t){$("[data-form]").prop("disabled",!1);var a=$.parseJSON(t),e=a.result,o=a.title,n=a.data.id;if(void 0!==a.data.new_nonce){a.data.new_nonce;$('input[name="nonce"]').val(a.data.new_nonce)}if(e){$('input[name="collection_id"]').val(n);var i=window.location.href;-1===i.indexOf("collection_id")&&window.history.replaceState({},"",i+"&collection_id="+n),$(document).trigger("mbFormSaved");var r=$('input[name="sorted"]').val();$('input[name="previous_selection"]').val(r),a.data.reload&&document.location.reload(!0)}e||($modal=window.maxFoundry.maxModal,$modal.newModal("collection_error"),$modal.setTitle(o),$modal.setContent(a.body),$modal.setControls('<button class="modal_close button-primary">'+a.close_text+"</button>"),$modal.show())};
|
js/min/maxbuttons_media_button.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(jq){function maxMedia(){this.callback=null,this.parent="#poststuff",this.window_loaded=null,this.maxm=null,this.closeOnCallback=!0}$=jq,maxMedia.prototype.init=function(){this.maxm=new maxModal,this.maxm.init(),$(document).on("click",".maxbutton_media_button",$.proxy(this.clickAddButton,this)),this.callback="this.buttonToEditor"},maxMedia.prototype.setCallback=function(callback){if("function"!=typeof callback)if("function"==typeof window[callback])callback=window[callback];else{if("function"!=typeof eval(callback))return!1;callback=eval(callback)}this.callback=callback},maxMedia.prototype.showShortcodeOptions=function(t,a){this.closeOnCallback=!1,$currentModal=this.maxm.currentModal;var o=$('[data-button="'+t+'"]').find(".shortcode-container");options=$('<div class="shortcode_options">'),$("<input>",{type:"hidden",id:"mb_shortcode_id",name:"button_id"}).val(t).appendTo(options),$("<h3>").text("Shortcode Options").appendTo(options),$('<div class="button_example">').append(o).appendTo(options),$("<label>",{for:"mb_shortcode_url"}).text(mbtrans.short_url_label).appendTo(options),$("<input>",{type:"text",id:"mb_shortcode_url",name:"shortcode_url",placeholder:"http://"}).on("change, keyup",function(t){var a=$(t.target).val();$(".button_example").find(".maxbutton").prop("href",a)}).appendTo(options),$("<label>",{for:"mb_shortcode_text"}).text(mbtrans.short_text_label).appendTo(options),$("<input>",{type:"text",name:"shortcode_text",id:"mb_shortcode_text"}).on("change, keyup",function(t){var a=$(t.target).val();$(".button_example").find(".mb-text").text(a)}).appendTo(options),$("<p>").text(mbtrans.short_options_explain).appendTo(options),$("<input>",{type:"button",name:"add_shortcode",class:"button-primary",value:mbtrans.short_add_button}).on("click",$.proxy(this.addShortcodeOptions,this)).appendTo(options),this.maxm.setContent(options),this.maxm.checkResize()},maxMedia.prototype.addShortcodeOptions=function(t){t.preventDefault();var a=$("#mb_shortcode_url").val(),o=$("#mb_shortcode_text").val(),e=$("#mb_shortcode_id").val();this.buttonToEditor(e,a,o)},maxMedia.prototype.clickAddButton=function(t){t.preventDefault(),t.stopPropagation(),$(document).off("click",".pagination span");var a=this,o=$(t.target).data("nonce");void 0!==$(t.target).data("callback")&&this.setCallback($(t.target).data("callback")),void 0!==$(t.target).data("parent")&&(this.parent=$(t.target).data("parent")),$(document).on("click",".button-row",$.proxy(function(t){var a=$(t.target);void 0===$(a).data("button")&&(a=$(a).parents(".button-row"));var o=$(a).data("button");$(".button-row").removeClass("selected"),$(a).addClass("selected"),$(".controls .insert").data("button",o),this.maxm.currentModal.find(".controls .insert").removeClass("disabled")},this)),$(document).on("click",".pagination span, .pagination-links a",function(t){if(t.preventDefault(),$(t.target).hasClass("disabled"))return!1;var e=$(t.target).data("page");e<=1&&(e=1),a.loadPostEditScreen(e,o)}),$(document).on("change",".input-paging",function(t){t.preventDefault();var e=parseInt($(t.target).val());a.loadPostEditScreen(e,o)}),this.loadPostEditScreen(0,o)},maxMedia.prototype.loadPostEditScreen=function(t,a){void 0===t&&(t=0);var o={action:"maxajax",plugin_action:"getAjaxButtons",nonce:a,paged:t},e=mbtrans.ajax_url,n=this;return $(".media-buttons .loading").css("visibility","visible"),$.ajax({url:e,data:o,method:"POST",success:function(t){n.putResults(t)}}),!1},maxMedia.prototype.showPostEditScreen=function(){this.maxm.parent=this.parent,this.maxm.newModal("media-buttons"),this.maxm.setTitle(mbtrans.windowtitle),$(document).trigger("mb_media_buttons_open",this.maxm),this.maxm.show(),this.window_loaded=!0},maxMedia.prototype.putResults=function(t){this.showPostEditScreen(),$(".media-buttons .loading").css("visibility","hidden"),this.maxm.addControl("insert","",$.proxy(this.insertAction,this)),this.maxm.setContent(t),this.maxm.setControls(),this.maxm.checkResize(),this.resize(),$(window).on("resize",$.proxy(this.resize,this)),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault()}),$(document).trigger("mb_media_put_results",[t,this.maxm])},maxMedia.prototype.resize=function(t){null!==this.maxm.currentModal&&(topHeight=this.maxm.currentModal.find(".modal_header").height()+17,controlsHeight=this.maxm.currentModal.find(".controls").height()+21,modalHeight=this.maxm.currentModal.height(),this.maxm.currentModal.find(".modal_content").css("height",modalHeight-topHeight-controlsHeight),this.maxm.currentModal.find(".controls .insert").addClass("disabled"))},maxMedia.prototype.insertAction=function(t){t.preventDefault();var a=$(t.target).data("button");void 0===a||parseInt(a)<=0||("function"==typeof this.callback&&this.callback(a,$(t.target)),this.closeOnCallback&&(this.maxm.close(),$(document).trigger("mb_media_buttons_close")))},maxMedia.prototype.buttonToEditor=function(t,a,o){var e='[maxbutton id="'+t+'"';void 0!==a&&a.length>1&&(e+=' url="'+a+'"'),void 0!==o&&o.length>1&&(e+=' text="'+o+'"'),e+=" ] ",window.send_to_editor(e),this.maxm.close()},maxMedia.prototype.getEditor=function(){var t='line-height: 32px; padding-left: 40px; background: url("'+mbtrans.icon+'") no-repeat',a=$("<div>",{id:"maxbutton-add-button",class:"content"});return a.append($("<h2>",{style:t}).text(mbtrans.insert)).append($("<p>").text(mbtrans.select)).append($("<div>",{id:"mb_media_buttons"}).append('<div class="loading"></div>')),a},window.maxMedia=new maxMedia,window.maxMedia.init()});
|
|
js/min/maxmodal.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var maxModal;jQuery(document).ready(function(t){$=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=$(window).height(),this.windowWidth=$(window).width(),$(document).off("click",".maxmodal"),$(document).on("click",".maxmodal",$.proxy(this.buildModal,this)),$(window).on("resize",$.proxy(this.checkResize,this))},maxModal.prototype.focus=function(){this.currentModal.show()},maxModal.prototype.get=function(){return this.currentModal},maxModal.prototype.show=function(){$(".maxmodal_overlay").remove(),$("body").removeClass("max-modal-active"),this.writeOverlay(),this.setWidth&&this.currentModal.width(this.setWidth),this.setHeight&&this.currentModal.height(this.setHeight);var t
|
1 |
+
var maxModal;jQuery(document).ready(function(t){$=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=$(window).height(),this.windowWidth=$(window).width(),$(document).off("click",".maxmodal"),$(document).on("click",".maxmodal",$.proxy(this.buildModal,this)),$(window).on("resize",$.proxy(this.checkResize,this))},maxModal.prototype.focus=function(){this.currentModal.show()},maxModal.prototype.get=function(){return this.currentModal},maxModal.prototype.show=function(){$(".maxmodal_overlay").remove(),$("body").removeClass("max-modal-active"),this.writeOverlay(),this.currentModal.show(),this.setWidth&&this.currentModal.width(this.setWidth),this.setHeight&&this.currentModal.height(this.setHeight),$m=this.currentModal;var t=$m.find(".modal_header").outerHeight(),o=$m.find(".modal_content").outerHeight(),e=$m.find(".modal_content").width(),a=$m.find(".modal_controls").outerHeight(),i=t+o+a,d=e,n=(this.windowHeight-i)/2,s=(this.windowWidth-d)/2;if(n<30&&(n=30),i>this.windowHeight){newHeight=this.windowHeight-n-5,this.currentModal.height(newHeight);var l=newHeight-t-a;$m.find(".modal_content").height(l)}this.currentModal.css("left",s+"px"),this.currentModal.css("top",n+"px"),this.currentModal.css("height",i),$(".maxmodal_overlay").show(),$("body").addClass("max-modal-active"),$(document).off("keydown",$.proxy(this.keyPressHandler,this)),$(document).on("keydown",$.proxy(this.keyPressHandler,this)),this.currentModal.focus()},maxModal.prototype.keyPressHandler=function(t){27===t.keyCode&&this.close()},maxModal.prototype.checkResize=function(){this.windowHeight=$(window).height(),this.windowWidth=$(window).width(),null!==this.currentModal&&(this.currentModal.removeAttr("style"),this.currentModal.find(".modal_content").removeAttr("style"),this.currentModal.removeAttr("style"),this.show())},maxModal.prototype.close=function(){this.currentModal.trigger("modal_close",[this]),this.currentModal.remove(),this.currentModal=null,$(".maxmodal_overlay").remove(),$("body").removeClass("max-modal-active"),$(document).off("keydown",$.proxy(this.keyPressHandler,this))},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.resetControls=function(){this.controls=[]},maxModal.prototype.setControls=function(t){var o=this.currentModal.find(".modal_content"),e=$('<div class="modal_controls controls">');for(i=0;i<this.controls.length;i++)e.append(this.controls[i]);void 0!==t&&e.append(t),o.append(e),$(this.currentModal).find(".modal_close").off("click"),$(this.currentModal).find(".modal_close").on("click",$.proxy(this.close,this))},maxModal.prototype.addControl=function(t,o,e){var a="";switch(t){case"yes":a=modaltext.yes;break;case"ok":a=modaltext.ok;break;case"no":a=modaltext.no;break;case"cancel":a=modaltext.cancel;break;default:a=t,t="custom"}var i=$('<a class="button-primary '+t+'">'+a+"</a>");i.on("click",o,e),this.controls.push(i)},maxModal.prototype.setContent=function(t){this.currentModal.find(".modal_content").html(t)},maxModal.prototype.buildModal=function(t){t.preventDefault();var o=$(t.target);void 0===o.data("modal")&&(o=o.parents(".maxmodal")),this.target=o;var e=o.data("modal"),a=$("#"+e);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 i=$(a).find(".title").text(),d=$(a).find(".controls").html(),n=$(a).find(".content").html();if(this.newModal(e),this.setTitle(i),this.setContent(n),this.setControls(d),void 0!==$(a).data("load")){var s=a.data("load")+"(modal)",l=new Function("modal",s);try{l(this)}catch(t){console.log("MB Modal Callback Error: "+t.message),console.log("MB Mobdal tried calling: "+s)}}this.show()},maxModal.prototype.newModal=function(t){null!==this.currentModal&&this.close();var o=$('<div class="max-modal '+t+'" > \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 $(this.parent).length>0?$(this.parent).append(o):$("body").append(o),$(o).draggable({handle:".modal_header"}),this.modals.push(o),this.currentModal=o,this.controls=[],this},maxModal.prototype.writeOverlay=function(){$(this.parent).append('<div class="maxmodal_overlay"></div>'),$(".maxmodal_overlay").on("click",$.proxy(this.close,this))}});
|
js/min/media_button.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(document).ready(function(t){function o(){void 0===window.maxFoundry.maxmodal&&(window.maxFoundry.maxmodal=new maxModal,window.maxFoundry.maxmodal.init()),void 0===window.maxFoundry.maxAjax&&(window.maxFoundry.maxAjax=new maxAjax,window.maxFoundry.maxAjax.init()),this.maxmodal=window.maxFoundry.maxmodal,this.maxajax=window.maxFoundry.maxAjax}$=t,(o.prototype={parent:"body",is_active:!1,maxmodal:null,maxajax:null,callback:null,useShortCodeOptions:!0,shortcodeData:null,getPage:1,ajaxSuccessHandler:null}).init=function(t){void 0!==t&&(void 0!==t.callback&&(this.callback=t.callback||null),void 0!==t.useShortCodeOptions&&(this.useShortCodeOptions=t.useShortCodeOptions),void 0!==t.parent&&(this.parent=t.parent)),this.ajaxSuccessHandler=$.proxy(this.putContent,this),$(document).off("click",".pagination span, .pagination-links a"),$(document).on("click",".pagination span, .pagination-links a",$.proxy(this.doPagination,this)),$(document).off("media_button_content_buttons_load"),$(document).on("media_button_content_buttons_load",$.proxy(this.hookButtonAction,this)),$(document).off("media_button_content_shortcode_options"),$(document).on("media_button_content_shortcode_options",$.proxy(this.hookShortCodeAction,this))},o.prototype.openModal=function(){this.maxmodal.newModal("media-popup"),this.maxmodal.parent=this.parent,this.maxmodal.setTitle(mbtrans.windowtitle),this.maxmodal.setContent('<span class="loading"></span>'),this.maxmodal.show(),this.maxajax.showSpinner($(".loading")),this.loadButtons(),this.is_active=!0},o.prototype.loadButtons=function(){var t=this.maxajax.ajaxInit();t.plugin_action="getAjaxButtons",t.page=this.getPage,this.maxajax.ajaxPost(t,this.ajaxSuccessHandler)},o.prototype.putContent=function(t){t=JSON.parse(t);this.maxajax.removeSpinner(),void 0!==t.output&&this.maxmodal.setContent(t.output),void 0!==t.action&&$(document).trigger("media_button_content_"+t.action,t)},o.prototype.hookButtonAction=function(){$(document).off("click",".button-list"),$(document).on("click",".button-list",$.proxy(function(t){var o=$(t.target);void 0===$(o).data("button")&&(o=$(o).parents(".button-list"));var a=$(o).data("button");$(".button-list").removeClass("selected"),$(o).addClass("selected"),$(".controls .button-primary").data("button",a),this.maxmodal.currentModal.find(".controls .button-primary").removeClass("disabled")},this)),$(document).off("click",".button-preview a"),$(document).on("click",".button-preview a",function(t){t.preventDefault()}),this.maxmodal.resetControls(),this.useShortCodeOptions?this.maxmodal.addControl(mbtrans.use,"",$.proxy(this.shortCodeOptions,this)):this.maxmodal.addControl(mbtrans.insert,"",$.proxy(this.selectAction,this)),this.maxmodal.setControls(),this.maxmodal.currentModal.find(".controls .button-primary").addClass("disabled"),this.maxmodal.checkResize()},o.prototype.hookShortCodeAction=function(t,o){this.shortcodeData=o.shortcodeData;var a=o.button_id;this.maxmodal.resetControls(),this.maxmodal.addControl(mbtrans.insert,"",$.proxy(this.selectAction,this)),this.maxmodal.setControls(),$(this.maxmodal.currentModal).find(".controls .button-primary").data("button",a),$(this.maxmodal.currentModal).find(".more-options a").off("click"),$(this.maxmodal.currentModal).find(".more-options a").on("click",$.proxy(function(t){$(this.maxmodal.currentModal).find(".more-field").show(),$(t.target).parents(".option .more").hide(),this.maxmodal.checkResize()},this)),this.maxmodal.checkResize()},o.prototype.selectAction=function(t){if(t.preventDefault(),!$(t.target).hasClass("disabled")){var o=$(t.target).data("button");void 0===o||parseInt(o)<=0||("function"==typeof this.callback?this.callback(o,$(t.target)):(this.buttonToEditor(o),this.close()))}},o.prototype.shortCodeOptions=function(t){if(t.preventDefault(),!$(t.target).hasClass("disabled")){var o=$(t.target).data("button"),a=this.maxajax.ajaxInit();a.plugin_action="mediaShortcodeOptions",a.button_id=o,this.maxajax.ajaxPost(a,this.ajaxSuccessHandler)}},o.prototype.doPagination=function(t){if(t.preventDefault(),$(t.target).hasClass("disabled"))return!1;var o=$(t.target).data("page");o<=1&&(o=1),this.getPage=o,this.loadButtons()},o.prototype.generateShortcode=function(t){var o='[maxbutton id="'+t+'"';return void 0!==this.shortcodeData&&$(this.shortcodeData).each(function(t,a){var n=$('input[name="'+a.name+'"]'),i=$('input[name="'+a.name+'"]').val();if("checkbox"==n.attr("type")){var e=n.is(":checked");e!=a.original&&(o+=e?" "+a.shortcode+'="'+a.checked+'"':" "+a.shortcode+'="'+a.unchecked+'"')}else i!=a.original&&(o+=" "+a.shortcode+'="'+i+'"')}),o+=" ] "},o.prototype.buttonToEditor=function(t){shortcode=this.generateShortcode(t),window.send_to_editor(shortcode,t)},o.prototype.close=function(){this.maxmodal.close()},void 0===window.maxFoundry&&(window.maxFoundry={}),window.maxFoundry.maxMedia=o});
|
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: 7.
|
7 |
Author: Max Foundry
|
8 |
Author URI: http://maxfoundry.com
|
9 |
Text Domain: maxbuttons
|
@@ -16,9 +16,9 @@ namespace MaxButtons;
|
|
16 |
if (! defined('MAXBUTTONS_ROOT_FILE'))
|
17 |
define("MAXBUTTONS_ROOT_FILE", __FILE__);
|
18 |
if (! defined('MAXBUTTONS_VERSION_NUM'))
|
19 |
-
define('MAXBUTTONS_VERSION_NUM', '7.
|
20 |
|
21 |
-
define('MAXBUTTONS_RELEASE',"
|
22 |
|
23 |
|
24 |
if (! function_exists('MaxButtons\maxbutton_double_load'))
|
@@ -37,7 +37,6 @@ if (function_exists("MaxButtons\MB"))
|
|
37 |
return;
|
38 |
}
|
39 |
|
40 |
-
|
41 |
// In case of development, copy this to wp-config.php
|
42 |
// define("MAXBUTTONS_DEBUG", true);
|
43 |
// define("MAXBUTTONS_BENCHMARK",true);
|
3 |
Plugin Name: MaxButtons
|
4 |
Plugin URI: http://maxbuttons.com
|
5 |
Description: The best WordPress button generator. This is the free version; the Pro version <a href="http://maxbuttons.com/?ref=mbfree">can be found here</a>.
|
6 |
+
Version: 7.2
|
7 |
Author: Max Foundry
|
8 |
Author URI: http://maxfoundry.com
|
9 |
Text Domain: maxbuttons
|
16 |
if (! defined('MAXBUTTONS_ROOT_FILE'))
|
17 |
define("MAXBUTTONS_ROOT_FILE", __FILE__);
|
18 |
if (! defined('MAXBUTTONS_VERSION_NUM'))
|
19 |
+
define('MAXBUTTONS_VERSION_NUM', '7.2');
|
20 |
|
21 |
+
define('MAXBUTTONS_RELEASE',"4 Jun 2018");
|
22 |
|
23 |
|
24 |
if (! function_exists('MaxButtons\maxbutton_double_load'))
|
37 |
return;
|
38 |
}
|
39 |
|
|
|
40 |
// In case of development, copy this to wp-config.php
|
41 |
// define("MAXBUTTONS_DEBUG", true);
|
42 |
// define("MAXBUTTONS_BENCHMARK",true);
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: maxfoundry, basszje, arcware, johnbhartley
|
3 |
Tags: wordpress button plugin, share button, wordpress buttons, css3 button generator, responsive buttons, css wordpress button
|
4 |
Requires at least: 4.8
|
5 |
-
Tested up to: 4.9.
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 7.
|
8 |
|
9 |
WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
|
10 |
|
@@ -177,11 +177,11 @@ To change text and link :
|
|
177 |
|
178 |
If you only want to change one of the two, just leave the not needed option out.
|
179 |
|
180 |
-
|
181 |
|
182 |
[maxbutton id="1" text="yourtext" url="http://yoururl" window="new" nofollow="true"]
|
183 |
|
184 |
-
You should *never* copy buttons if you only have a different line of text and / or link on any button.
|
185 |
|
186 |
= How do I use the shortcode in a sidebar/widget? =
|
187 |
|
@@ -243,6 +243,10 @@ By default WordPress can't display shortcodes in a menu. You can use this [plugi
|
|
243 |
|
244 |
This depends on the slider plugin you are using. Most of the well-known ones are allowing the use of shortcodes within the slides. To find out if your plugin can handle that, please ask the slider vendor.
|
245 |
|
|
|
|
|
|
|
|
|
246 |
= Non-Latin language users =
|
247 |
|
248 |
The plugin works with users of non-lating languages with a few exceptions. First, the character set of the Database Table should be in UTF-8. If you see '????' characters in the plugin, go to Settings -> Advanced. There is a button to set the tabel to UTF-8
|
@@ -251,6 +255,17 @@ Secondly, please use latin only characters for button name ( Basic settings) and
|
|
251 |
|
252 |
== Changelog ==
|
253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
= 7.1.3. =
|
255 |
|
256 |
* Fixed legacy issue with social share that could crash plugin in certain cases
|
@@ -405,7 +420,7 @@ Secondly, please use latin only characters for button name ( Basic settings) and
|
|
405 |
|
406 |
= 7. 0 =
|
407 |
|
408 |
-
Social Share has been split of into it's own plugin. Check your site if you are using this feature.
|
409 |
|
410 |
= 4.0 =
|
411 |
|
2 |
Contributors: maxfoundry, basszje, arcware, johnbhartley
|
3 |
Tags: wordpress button plugin, share button, wordpress buttons, css3 button generator, responsive buttons, css wordpress button
|
4 |
Requires at least: 4.8
|
5 |
+
Tested up to: 4.9.6
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 7.2
|
8 |
|
9 |
WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
|
10 |
|
177 |
|
178 |
If you only want to change one of the two, just leave the not needed option out.
|
179 |
|
180 |
+
Most often used options:
|
181 |
|
182 |
[maxbutton id="1" text="yourtext" url="http://yoururl" window="new" nofollow="true"]
|
183 |
|
184 |
+
You should *never* copy buttons if you only have a different line of text and / or link on any button. You can use the 'add button' dialog from your posts and pages to easily use this options
|
185 |
|
186 |
= How do I use the shortcode in a sidebar/widget? =
|
187 |
|
243 |
|
244 |
This depends on the slider plugin you are using. Most of the well-known ones are allowing the use of shortcodes within the slides. To find out if your plugin can handle that, please ask the slider vendor.
|
245 |
|
246 |
+
= I use Autoptimize with MaxButtons =
|
247 |
+
|
248 |
+
If you use Autoptimize plugin and see weird result, try to load the pageby adding ?ao_noptimize=1 to the URL. If the buttons load normally then the issue is with Autoptimize. You can enter an exclusion for .maxbutton in the CSS exclusions.
|
249 |
+
|
250 |
= Non-Latin language users =
|
251 |
|
252 |
The plugin works with users of non-lating languages with a few exceptions. First, the character set of the Database Table should be in UTF-8. If you see '????' characters in the plugin, go to Settings -> Advanced. There is a button to set the tabel to UTF-8
|
255 |
|
256 |
== Changelog ==
|
257 |
|
258 |
+
= 7.2 =
|
259 |
+
|
260 |
+
* 'Add button'-Dialog improvements, plus all shortcode attributes now available in interface
|
261 |
+
* New shortcode attribute 'extraclass' to add extra classes
|
262 |
+
* Fixed issue where media script and modal script would interfere with each other
|
263 |
+
* Added No optimize string for Autoptimize users
|
264 |
+
* Updates to support page
|
265 |
+
* Improvements to shortcode visibility
|
266 |
+
* Fixed Javascript bug that could cause issues with other not-isolated plugins
|
267 |
+
* Tested on WordPress 4.9.6.
|
268 |
+
|
269 |
= 7.1.3. =
|
270 |
|
271 |
* Fixed legacy issue with social share that could crash plugin in certain cases
|
420 |
|
421 |
= 7. 0 =
|
422 |
|
423 |
+
Social Share has been split of into it's own plugin. Check your site if you are using this feature.
|
424 |
|
425 |
= 4.0 =
|
426 |
|