Version Description
- Technical maintenance
- Tested up to 4.9.1.
- Fixed interface issue with conditional Javascript for sharing plugin
Download this release
Release Info
Developer | basszje |
Plugin | WordPress Button Plugin MaxButtons |
Version | 6.26 |
Comparing to | |
See all releases |
Code changes from version 6.25 to 6.26
- assets/css/style.css +1 -1
- assets/libraries/simple-template/simple_template.php +63 -63
- assets/scss/_elements.scss +1 -1
- blocks/advanced.php +99 -100
- blocks/border.php +0 -1
- blocks/container.php +148 -132
- blocks/dimension.php +28 -53
- blocks/icon.php +35 -5
- blocks/text.php +1 -4
- blocks/tpl/color.tpl +1 -1
- blocks/tpl/start.tpl +1 -1
- classes/field.php +70 -63
- js/maxbuttons-admin.js +4 -5
- js/maxmodal.js +1 -2
- js/min/maxbuttons-admin.js +1 -1
- maxbuttons.php +4 -4
- readme.txt +8 -2
assets/css/style.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.mb_colorpicker{z-index:200}.ads .button-primary{display:block;margin:0 auto 20px auto;width:210px;text-align:center;overflow:visible}.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.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}#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 .social-share-move{padding:15px;border:0}#maxbuttons .social-share-move .inside{border:0}#maxbuttons .social-share-move h3{font-size:28px;line-height:30px}#maxbuttons .social-share-move p{font-size:16px}#maxbuttons .social-share-move a{width:200px;height:auto;font-size:30px;line-height:32px;padding:12px 0;text-align:center}#maxbuttons .collection-addnew{display:inline-block}@media (max-width: 780px){#maxbuttons .collection-addnew{margin-left:5px}}#maxbuttons .collection_list .collection{position:relative;background-color:#fff;padding:15px;border-radius:15px;margin:15px 0}#maxbuttons .collection_list .collection h3{display:inline-block;width:90%;margin-top:0;font-size:18px;line-height:20px}#maxbuttons .collection_list .collection h3 a{color:#000;font-size:25px;text-decoration:none}#maxbuttons .collection_list .collection h3 a:hover{text-decoration:underline}#maxbuttons .collection_list .collection h3 .dashicons{color:#ccc;margin-left:15px}#maxbuttons .collection_list .collection h3 .button-count{font-weight:400;font-size:15px;margin-left:15px;vertical-align:top}#maxbuttons .collection_list .collection .collection_remove{top:10px;right:15px;font-size:25px;font-weight:400;position:absolute;cursor:pointer}#maxbuttons .collection_list .collection.welcome p{font-size:14px;line-height:22px}#maxbuttons .collection_list .collection-container{position:relative;width:100%;display:inline-block;clear:both}#maxbuttons .collection_list .collection-container .maxcollection{position:static !important}#maxbuttons .inside .preview_collection.option label{display:inline-block;float:none;font-size:25px;width:100%}#maxbuttons .mb_collection_selection{display:inline-block;min-height:300px;margin:25px 0}#maxbuttons .mb_collection_selection .sortable .item{margin-bottom:25px;position:relative;padding-left:30px;min-height:45px;clear:both}#maxbuttons .mb_collection_selection .sortable .item .button-remove{margin-top:5px;position:absolute;left:20px;top:-15px;border:1px solid #000;border-radius:11px;width:20px;height:20px;background-color:rgba(0,0,0,0.5)}#maxbuttons .mb_collection_selection .sortable .item .button-remove:hover{cursor:pointer}#maxbuttons .mb_collection_selection .sortable .item .button-remove span{color:#fff;font-size:16px;padding-top:2px;overflow:hidden}#maxbuttons .mb_collection_selection .sortable-placeholder{border:3px dashed #aaa;height:45px;width:344px;background:#ccc}#maxbuttons .mb_collection_selection .button_data{display:none}#maxbuttons .mb-social-options{float:right;width:45%;border:1px solid #000;height:100%}#maxbuttons .mb-buttons-selection{float:left;width:45%;overflow:hidden;border:1px solid #000}#maxbuttons .mb-preview-window{position:fixed;top:40%;right:20px;width:30%;max-width:45%;max-height:90vh;background-color:rgba(255,255,255,0.7);border:1px solid #000;z-index:500 !important;overflow:hidden;display:none}@media (max-width: 780px){#maxbuttons .mb-preview-window{position:relative;left:0;top:0;bottom:0;right:0;width:100%;height:auto;display:inline-block;border-color:#ccc}}#maxbuttons .mb-preview-window .mb-preview-wrapper{position:relative;display:inline-block;width:100%}#maxbuttons .sub-tabs .preview-on{background-color:#00b9eb;color:#fff}#maxbuttons .sub-tabs .preview-on::before{line-height:24px}#maxbuttons #picker-back{top:0;left:0;right:0;bottom:0;background-color:#000;z-index:110000;position:fixed;opacity:0.7;display:none}#maxbuttons #picker-modal,#maxbuttons .max-modal.picker-modal{display:none;width:calc(100% - 60px);min-height:300px;top:30px;bottom:30px;left:30px;right:30px;z-index:160000}#maxbuttons #picker-modal .modal_header,#maxbuttons .max-modal.picker-modal .modal_header{height:15px;display:block;overflow:hidden;top:0;left:0;bottom:0;right:0;border:0}#maxbuttons #picker-modal .picker-packages,#maxbuttons .max-modal.picker-modal .picker-packages{top:31px;left:0;width:205px;bottom:0;background-color:#f3f3f3;position:absolute;border-right:1px solid #ccc;overflow-x:hidden;overflow-y:auto}#maxbuttons #picker-modal .picker-packages ul,#maxbuttons .max-modal.picker-modal .picker-packages ul{margin-top:4px}#maxbuttons #picker-modal .picker-packages li a,#maxbuttons .max-modal.picker-modal .picker-packages li a{padding:6px 20px;display:block;color:#0073aa;text-decoration:none;font-size:13px;line-height:16px}#maxbuttons #picker-modal .picker-packages li a:hover,#maxbuttons .max-modal.picker-modal .picker-packages li a:hover{background:rgba(0,0,0,0.04) none repeat scroll 0 0;color:#21759b}#maxbuttons #picker-modal .picker-packages li a.pack-active,#maxbuttons .max-modal.picker-modal .picker-packages li a.pack-active{font-weight:700;color:#000}#maxbuttons #picker-modal .picker-main,#maxbuttons .max-modal.picker-modal .picker-main{left:206px;top:31px;right:0;bottom:60px;position:absolute;border-bottom:1px solid #dddddd;overflow-y:scroll;background-color:#fff}#maxbuttons #picker-modal .picker-main .screen,#maxbuttons .max-modal.picker-modal .picker-main .screen{margin:5px 5px}#maxbuttons #picker-modal .picker-main .screen .tablenav-pages,#maxbuttons .max-modal.picker-modal .picker-main .screen .tablenav-pages{float:none;margin-left:1%}#maxbuttons #picker-modal .picker-main .item,#maxbuttons .max-modal.picker-modal .picker-main .item{padding:5px;margin:5px 0 5px 1%;border:1px solid #000;width:16%;height:auto;float:left;text-align:center;position:relative;background-color:#eee;border:1px solid #b4b9be;display:inline-block}#maxbuttons #picker-modal .picker-main .item .button_data,#maxbuttons .max-modal.picker-modal .picker-main .item .button_data{display:none}#maxbuttons #picker-modal .picker-main .item .button_name,#maxbuttons .max-modal.picker-modal .picker-main .item .button_name{clear:left;display:block;margin-top:15px;font-size:9px}#maxbuttons #picker-modal .picker-main .item .button-selected,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected{position:absolute;font-size:20px;top:-10px;right:-10px;width:24px;height:24px;color:#fff;background-color:#1e8cbe;z-index:100;border-radius:12px}#maxbuttons #picker-modal .picker-main .item .button-selected span,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected span{padding-top:2px}#maxbuttons #picker-modal .picker-inselection,#maxbuttons .max-modal.picker-modal .picker-inselection{height:60px;display:block;position:absolute;bottom:0;right:0;left:206px;overflow:hidden}#maxbuttons #picker-modal .picker-inselection .info,#maxbuttons .max-modal.picker-modal .picker-inselection .info{height:60px;float:left;display:inline-block;padding:10px 15px;display:none}#maxbuttons #picker-modal .picker-inselection .info .clear-selection,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection{color:#ff0000;display:block;padding:0}#maxbuttons #picker-modal .picker-inselection .info .clear-selection:hover,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection:hover{background-color:#ff0000;color:#fff}#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:inline-block;position:absolute;overflow:hidden;padding-top:5px;height:100%;left:130px;right:180px}@media (max-width: 780px){#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:none}}#maxbuttons #picker-modal .picker-inselection .items .item,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item{height:40px;width:40px;overflow:hidden;float:left;margin:3px;position:relative}#maxbuttons #picker-modal .picker-inselection .items .item .button_name,#maxbuttons #picker-modal .picker-inselection .items .item .button_data,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_name,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_data{display:none}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove{display:none;position:absolute;width:30px;height:30px;left:2px;border-radius:15px;top:2px;background-color:rgba(0,0,0,0.5)}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove span,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove span{font-size:20px;color:#fff;padding-left:5px;padding-top:5px}#maxbuttons #picker-modal .picker-inselection .items .item:hover .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item:hover .button-remove{display:block}#maxbuttons #picker-modal .picker-inselection .add,#maxbuttons .max-modal.picker-modal .picker-inselection .add{float:right;margin-top:15px;margin-right:15px;height:100%}#maxbuttons .social_block .social-option{clear:both;margin-top:25px}#maxbuttons .social_block .social-option .shortcode-container{display:inline-block}#maxbuttons .social_block .social-option .button_name{display:inline-block;margin-left:10px;vertical-align:middle;font-weight:700}#maxbuttons #mbfeedback .link{height:25px;width:100px;position:fixed;top:40%;right:0;z-index:1000;transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}#maxbuttons #mbfeedback .link a{background:#ccc;height:25px;width:70px;padding:8px 16px;color:#fff;font-family:Arial, sans-serif;font-size:15px;font-weight:bold;text-decoration:none;line-height:15px;border-bottom:solid 1px #333;border-left:solid 1px #333;border-right:solid 1px #fff}#maxbuttons #mbfeedback .link a::hover{background:#06c}#maxbuttons .ad-wrap{width:27%;float:left;max-width:300px;margin-left:1%;min-width:200px;margin-top:41px}#maxbuttons .ad-wrap .ads{background:#fff;margin-bottom:20px;text-align:center}#maxbuttons .ad-wrap .ads.image-ad{background:none;margin-top:20px}#maxbuttons .ad-wrap .ads.image-ad img{max-width:100%}#maxbuttons .ad-wrap .ads>a{text-decoration:none}#maxbuttons .ad-wrap .ads .header{background-color:#88c5c2;color:#fff;font-size:18px;text-transform:uppercase;padding:12px}#maxbuttons .ad-wrap .ads h3{text-align:center;padding-bottom:14px}#maxbuttons .ad-wrap .ads ul{list-style:none}#maxbuttons .ad-wrap .ads ul li{font-weight:bold;text-decoration:none;color:#000000}#maxbuttons .ad-wrap .ads ul li.plus{font-size:38px;font-weight:700;color:#88c5c2}#maxbuttons .ad-wrap .ads span.img{text-align:center;display:block}#maxbuttons .ad-wrap .ads .ads_button_wrap{margin:20px 0 30px;display:inline-block}#maxbuttons .ad-wrap .ads .ads_button_wrap .button{color:#fff;background-color:#88c5c2;font-size:16px;font-weight:bold;border:0;padding:0 40px}@media screen and (max-width: 960px){#maxbuttons .ad-wrap{display:none}}#maxbuttons.maxbuttons-pro-gopro .main{width:95%;max-width:860px}#maxbuttons.maxbuttons-pro-gopro h1.title{margin:0;font-size:24px;display:inline-block}#maxbuttons.maxbuttons-pro-gopro h1.title .big-maxg-btn{display:inline-block;background-color:#86c5c2;border-color:#73a3a8;margin:0 10px;vertical-align:super;line-height:23px;border-top:0;border-left:0;border-right:0;top:5px}#maxbuttons.maxbuttons-pro-gopro h1.title img{vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .logo{margin:0;display:inline-block;margin-top:14px}#maxbuttons.maxbuttons-pro-gopro .logo .simple-btn{color:#62c0e6;text-decoration:underline}#maxbuttons.maxbuttons-pro-gopro .default-section{text-align:center;padding:0px 10px}#maxbuttons.maxbuttons-pro-gopro .default-section p{position:relative;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:16px;margin:17px 0;color:#5b5b5b}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(even){background-color:#fff}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(odd){background-color:#faf5f1}#maxbuttons.maxbuttons-pro-gopro .default-section .big-maxg-btn{background-color:#fd8d61;border-color:#f0702b;font-size:36px;margin:10px}#maxbuttons.maxbuttons-pro-gopro .default-section h2{font-family:'Quicksand', sans-serif;font-weight:bold;color:#88c5c2;font-size:36px;line-height:38px;max-width:80%;margin:14px auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating{width:380px;margin:0 auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating p{margin:10px 0 0;font-size:22px;color:#000}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row p{font-weight:bold}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row img{width:106px;height:106px}#maxbuttons.maxbuttons-pro-gopro .social-row div{margin-bottom:5px}#maxbuttons.maxbuttons-pro-gopro .social-row p{background:#fff;padding:15px 5px 0 5px;margin:15px 0 0 15px;font-weight:700}#maxbuttons.maxbuttons-pro-gopro .social-row img{margin-top:15px}#maxbuttons.maxbuttons-pro-gopro .social-row p{min-height:162px}#maxbuttons.maxbuttons-pro-gopro .container{width:inherit;margin:0 auto;padding:30px 0}#maxbuttons.maxbuttons-pro-gopro img{max-width:100%}#maxbuttons.maxbuttons-pro-gopro .icon-row,#maxbuttons.maxbuttons-pro-gopro .image-row{position:relative}#maxbuttons.maxbuttons-pro-gopro .width-100{width:100%;margin-bottom:15px}#maxbuttons.maxbuttons-pro-gopro .width-33{width:33.33333333%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .width-50{width:50%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .clearfix{clear:both}#maxbuttons.maxbuttons-pro-gopro .bordered{border-radius:30px;padding:16px;background-color:#fff;box-sizing:border-box}@media (max-width: 780px){#maxbuttons.maxbuttons-pro-gopro .bordered{border:0;padding:8}}#maxbuttons.maxbuttons-pro-gopro .bordered p{margin:0 0 10px}#maxbuttons.maxbuttons-pro-gopro .inline-block{display:inline-block !important;vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn{font-family:'Quicksand', sans-serif;font-size:20px;color:#fff;font-weight:bold;padding:10px 15px;transition:all linear .2s;display:block;text-align:center;border-bottom:4px solid;text-transform:uppercase;border-radius:10px;text-decoration:none;line-height:42px}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover,#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:focus{color:#fff;text-decoration:none;outline:none}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover{box-shadow:0 8px 6px -6px rgba(0,0,0,0.5)}.maxmodal-data{display:none}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.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 .social-share-move{padding:15px;border:0}#maxbuttons .social-share-move .inside{border:0}#maxbuttons .social-share-move h3{font-size:28px;line-height:30px}#maxbuttons .social-share-move p{font-size:16px}#maxbuttons .social-share-move a{width:200px;height:auto;font-size:30px;line-height:32px;padding:12px 0;text-align:center}#maxbuttons .collection-addnew{display:inline-block}@media (max-width: 780px){#maxbuttons .collection-addnew{margin-left:5px}}#maxbuttons .collection_list .collection{position:relative;background-color:#fff;padding:15px;border-radius:15px;margin:15px 0}#maxbuttons .collection_list .collection h3{display:inline-block;width:90%;margin-top:0;font-size:18px;line-height:20px}#maxbuttons .collection_list .collection h3 a{color:#000;font-size:25px;text-decoration:none}#maxbuttons .collection_list .collection h3 a:hover{text-decoration:underline}#maxbuttons .collection_list .collection h3 .dashicons{color:#ccc;margin-left:15px}#maxbuttons .collection_list .collection h3 .button-count{font-weight:400;font-size:15px;margin-left:15px;vertical-align:top}#maxbuttons .collection_list .collection .collection_remove{top:10px;right:15px;font-size:25px;font-weight:400;position:absolute;cursor:pointer}#maxbuttons .collection_list .collection.welcome p{font-size:14px;line-height:22px}#maxbuttons .collection_list .collection-container{position:relative;width:100%;display:inline-block;clear:both}#maxbuttons .collection_list .collection-container .maxcollection{position:static !important}#maxbuttons .inside .preview_collection.option label{display:inline-block;float:none;font-size:25px;width:100%}#maxbuttons .mb_collection_selection{display:inline-block;min-height:300px;margin:25px 0}#maxbuttons .mb_collection_selection .sortable .item{margin-bottom:25px;position:relative;padding-left:30px;min-height:45px;clear:both}#maxbuttons .mb_collection_selection .sortable .item .button-remove{margin-top:5px;position:absolute;left:20px;top:-15px;border:1px solid #000;border-radius:11px;width:20px;height:20px;background-color:rgba(0,0,0,0.5)}#maxbuttons .mb_collection_selection .sortable .item .button-remove:hover{cursor:pointer}#maxbuttons .mb_collection_selection .sortable .item .button-remove span{color:#fff;font-size:16px;padding-top:2px;overflow:hidden}#maxbuttons .mb_collection_selection .sortable-placeholder{border:3px dashed #aaa;height:45px;width:344px;background:#ccc}#maxbuttons .mb_collection_selection .button_data{display:none}#maxbuttons .mb-social-options{float:right;width:45%;border:1px solid #000;height:100%}#maxbuttons .mb-buttons-selection{float:left;width:45%;overflow:hidden;border:1px solid #000}#maxbuttons .mb-preview-window{position:fixed;top:40%;right:20px;width:30%;max-width:45%;max-height:90vh;background-color:rgba(255,255,255,0.7);border:1px solid #000;z-index:500 !important;overflow:hidden;display:none}@media (max-width: 780px){#maxbuttons .mb-preview-window{position:relative;left:0;top:0;bottom:0;right:0;width:100%;height:auto;display:inline-block;border-color:#ccc}}#maxbuttons .mb-preview-window .mb-preview-wrapper{position:relative;display:inline-block;width:100%}#maxbuttons .sub-tabs .preview-on{background-color:#00b9eb;color:#fff}#maxbuttons .sub-tabs .preview-on::before{line-height:24px}#maxbuttons #picker-back{top:0;left:0;right:0;bottom:0;background-color:#000;z-index:110000;position:fixed;opacity:0.7;display:none}#maxbuttons #picker-modal,#maxbuttons .max-modal.picker-modal{display:none;width:calc(100% - 60px);min-height:300px;top:30px;bottom:30px;left:30px;right:30px;z-index:160000}#maxbuttons #picker-modal .modal_header,#maxbuttons .max-modal.picker-modal .modal_header{height:15px;display:block;overflow:hidden;top:0;left:0;bottom:0;right:0;border:0}#maxbuttons #picker-modal .picker-packages,#maxbuttons .max-modal.picker-modal .picker-packages{top:31px;left:0;width:205px;bottom:0;background-color:#f3f3f3;position:absolute;border-right:1px solid #ccc;overflow-x:hidden;overflow-y:auto}#maxbuttons #picker-modal .picker-packages ul,#maxbuttons .max-modal.picker-modal .picker-packages ul{margin-top:4px}#maxbuttons #picker-modal .picker-packages li a,#maxbuttons .max-modal.picker-modal .picker-packages li a{padding:6px 20px;display:block;color:#0073aa;text-decoration:none;font-size:13px;line-height:16px}#maxbuttons #picker-modal .picker-packages li a:hover,#maxbuttons .max-modal.picker-modal .picker-packages li a:hover{background:rgba(0,0,0,0.04) none repeat scroll 0 0;color:#21759b}#maxbuttons #picker-modal .picker-packages li a.pack-active,#maxbuttons .max-modal.picker-modal .picker-packages li a.pack-active{font-weight:700;color:#000}#maxbuttons #picker-modal .picker-main,#maxbuttons .max-modal.picker-modal .picker-main{left:206px;top:31px;right:0;bottom:60px;position:absolute;border-bottom:1px solid #dddddd;overflow-y:scroll;background-color:#fff}#maxbuttons #picker-modal .picker-main .screen,#maxbuttons .max-modal.picker-modal .picker-main .screen{margin:5px 5px}#maxbuttons #picker-modal .picker-main .screen .tablenav-pages,#maxbuttons .max-modal.picker-modal .picker-main .screen .tablenav-pages{float:none;margin-left:1%}#maxbuttons #picker-modal .picker-main .item,#maxbuttons .max-modal.picker-modal .picker-main .item{padding:5px;margin:5px 0 5px 1%;border:1px solid #000;width:16%;height:auto;float:left;text-align:center;position:relative;background-color:#eee;border:1px solid #b4b9be;display:inline-block}#maxbuttons #picker-modal .picker-main .item .button_data,#maxbuttons .max-modal.picker-modal .picker-main .item .button_data{display:none}#maxbuttons #picker-modal .picker-main .item .button_name,#maxbuttons .max-modal.picker-modal .picker-main .item .button_name{clear:left;display:block;margin-top:15px;font-size:9px}#maxbuttons #picker-modal .picker-main .item .button-selected,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected{position:absolute;font-size:20px;top:-10px;right:-10px;width:24px;height:24px;color:#fff;background-color:#1e8cbe;z-index:100;border-radius:12px}#maxbuttons #picker-modal .picker-main .item .button-selected span,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected span{padding-top:2px}#maxbuttons #picker-modal .picker-inselection,#maxbuttons .max-modal.picker-modal .picker-inselection{height:60px;display:block;position:absolute;bottom:0;right:0;left:206px;overflow:hidden}#maxbuttons #picker-modal .picker-inselection .info,#maxbuttons .max-modal.picker-modal .picker-inselection .info{height:60px;float:left;display:inline-block;padding:10px 15px;display:none}#maxbuttons #picker-modal .picker-inselection .info .clear-selection,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection{color:#ff0000;display:block;padding:0}#maxbuttons #picker-modal .picker-inselection .info .clear-selection:hover,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection:hover{background-color:#ff0000;color:#fff}#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:inline-block;position:absolute;overflow:hidden;padding-top:5px;height:100%;left:130px;right:180px}@media (max-width: 780px){#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:none}}#maxbuttons #picker-modal .picker-inselection .items .item,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item{height:40px;width:40px;overflow:hidden;float:left;margin:3px;position:relative}#maxbuttons #picker-modal .picker-inselection .items .item .button_name,#maxbuttons #picker-modal .picker-inselection .items .item .button_data,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_name,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_data{display:none}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove{display:none;position:absolute;width:30px;height:30px;left:2px;border-radius:15px;top:2px;background-color:rgba(0,0,0,0.5)}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove span,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove span{font-size:20px;color:#fff;padding-left:5px;padding-top:5px}#maxbuttons #picker-modal .picker-inselection .items .item:hover .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item:hover .button-remove{display:block}#maxbuttons #picker-modal .picker-inselection .add,#maxbuttons .max-modal.picker-modal .picker-inselection .add{float:right;margin-top:15px;margin-right:15px;height:100%}#maxbuttons .social_block .social-option{clear:both;margin-top:25px}#maxbuttons .social_block .social-option .shortcode-container{display:inline-block}#maxbuttons .social_block .social-option .button_name{display:inline-block;margin-left:10px;vertical-align:middle;font-weight:700}#maxbuttons #mbfeedback .link{height:25px;width:100px;position:fixed;top:40%;right:0;z-index:1000;transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}#maxbuttons #mbfeedback .link a{background:#ccc;height:25px;width:70px;padding:8px 16px;color:#fff;font-family:Arial, sans-serif;font-size:15px;font-weight:bold;text-decoration:none;line-height:15px;border-bottom:solid 1px #333;border-left:solid 1px #333;border-right:solid 1px #fff}#maxbuttons #mbfeedback .link a::hover{background:#06c}#maxbuttons .ad-wrap{width:27%;float:left;max-width:300px;margin-left:1%;min-width:200px;margin-top:41px}#maxbuttons .ad-wrap .ads{background:#fff;margin-bottom:20px;text-align:center}#maxbuttons .ad-wrap .ads.image-ad{background:none;margin-top:20px}#maxbuttons .ad-wrap .ads.image-ad img{max-width:100%}#maxbuttons .ad-wrap .ads>a{text-decoration:none}#maxbuttons .ad-wrap .ads .header{background-color:#88c5c2;color:#fff;font-size:18px;text-transform:uppercase;padding:12px}#maxbuttons .ad-wrap .ads h3{text-align:center;padding-bottom:14px}#maxbuttons .ad-wrap .ads ul{list-style:none}#maxbuttons .ad-wrap .ads ul li{font-weight:bold;text-decoration:none;color:#000000}#maxbuttons .ad-wrap .ads ul li.plus{font-size:38px;font-weight:700;color:#88c5c2}#maxbuttons .ad-wrap .ads span.img{text-align:center;display:block}#maxbuttons .ad-wrap .ads .ads_button_wrap{margin:20px 0 30px;display:inline-block}#maxbuttons .ad-wrap .ads .ads_button_wrap .button{color:#fff;background-color:#88c5c2;font-size:16px;font-weight:bold;border:0;padding:0 40px}@media screen and (max-width: 960px){#maxbuttons .ad-wrap{display:none}}#maxbuttons.maxbuttons-pro-gopro .main{width:95%;max-width:860px}#maxbuttons.maxbuttons-pro-gopro h1.title{margin:0;font-size:24px;display:inline-block}#maxbuttons.maxbuttons-pro-gopro h1.title .big-maxg-btn{display:inline-block;background-color:#86c5c2;border-color:#73a3a8;margin:0 10px;vertical-align:super;line-height:23px;border-top:0;border-left:0;border-right:0;top:5px}#maxbuttons.maxbuttons-pro-gopro h1.title img{vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .logo{margin:0;display:inline-block;margin-top:14px}#maxbuttons.maxbuttons-pro-gopro .logo .simple-btn{color:#62c0e6;text-decoration:underline}#maxbuttons.maxbuttons-pro-gopro .default-section{text-align:center;padding:0px 10px}#maxbuttons.maxbuttons-pro-gopro .default-section p{position:relative;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:16px;margin:17px 0;color:#5b5b5b}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(even){background-color:#fff}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(odd){background-color:#faf5f1}#maxbuttons.maxbuttons-pro-gopro .default-section .big-maxg-btn{background-color:#fd8d61;border-color:#f0702b;font-size:36px;margin:10px}#maxbuttons.maxbuttons-pro-gopro .default-section h2{font-family:'Quicksand', sans-serif;font-weight:bold;color:#88c5c2;font-size:36px;line-height:38px;max-width:80%;margin:14px auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating{width:380px;margin:0 auto}#maxbuttons.maxbuttons-pro-gopro .default-section .rating p{margin:10px 0 0;font-size:22px;color:#000}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row p{font-weight:bold}#maxbuttons.maxbuttons-pro-gopro .default-section .icon-row img{width:106px;height:106px}#maxbuttons.maxbuttons-pro-gopro .social-row div{margin-bottom:5px}#maxbuttons.maxbuttons-pro-gopro .social-row p{background:#fff;padding:15px 5px 0 5px;margin:15px 0 0 15px;font-weight:700}#maxbuttons.maxbuttons-pro-gopro .social-row img{margin-top:15px}#maxbuttons.maxbuttons-pro-gopro .social-row p{min-height:162px}#maxbuttons.maxbuttons-pro-gopro .container{width:inherit;margin:0 auto;padding:30px 0}#maxbuttons.maxbuttons-pro-gopro img{max-width:100%}#maxbuttons.maxbuttons-pro-gopro .icon-row,#maxbuttons.maxbuttons-pro-gopro .image-row{position:relative}#maxbuttons.maxbuttons-pro-gopro .width-100{width:100%;margin-bottom:15px}#maxbuttons.maxbuttons-pro-gopro .width-33{width:33.33333333%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .width-50{width:50%;float:left;padding:0 15px;margin:0 -15px 40px}#maxbuttons.maxbuttons-pro-gopro .clearfix{clear:both}#maxbuttons.maxbuttons-pro-gopro .bordered{border-radius:30px;padding:16px;background-color:#fff;box-sizing:border-box}@media (max-width: 780px){#maxbuttons.maxbuttons-pro-gopro .bordered{border:0;padding:8}}#maxbuttons.maxbuttons-pro-gopro .bordered p{margin:0 0 10px}#maxbuttons.maxbuttons-pro-gopro .inline-block{display:inline-block !important;vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn{font-family:'Quicksand', sans-serif;font-size:20px;color:#fff;font-weight:bold;padding:10px 15px;transition:all linear .2s;display:block;text-align:center;border-bottom:4px solid;text-transform:uppercase;border-radius:10px;text-decoration:none;line-height:42px}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover,#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:focus{color:#fff;text-decoration:none;outline:none}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover{box-shadow:0 8px 6px -6px rgba(0,0,0,0.5)}.maxmodal-data{display:none}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}
|
assets/libraries/simple-template/simple_template.php
CHANGED
@@ -5,130 +5,130 @@ defined('ABSPATH') or die('No direct access permitted');
|
|
5 |
|
6 |
class simpleTemplate
|
7 |
{
|
8 |
-
private $version = '1.1.1';
|
9 |
-
|
10 |
-
public static function parse($template_file, $object)
|
11 |
{
|
12 |
-
if ($template_file == '')
|
13 |
{
|
14 |
return false;
|
15 |
}
|
16 |
-
$template = file_get_contents($template_file);
|
|
|
17 |
|
|
|
|
|
|
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
$template = static::checkvar($template, $object);
|
22 |
-
|
23 |
-
|
24 |
-
return $template;
|
25 |
}
|
26 |
-
|
27 |
public static function checkvar($template, $object)
|
28 |
{
|
29 |
-
preg_match_all('/%%(.*?)%%/im', $template, $matches);
|
30 |
-
|
31 |
-
if(isset($matches[1]) && count($matches[1]) > 0)
|
32 |
{
|
33 |
for($i = 0; $i < count($matches[1]); $i++)
|
34 |
{
|
35 |
-
$match = $matches[1][$i];
|
36 |
-
$replace = $matches[0][$i];
|
37 |
-
|
38 |
-
if (! isset($object->$match))
|
39 |
-
continue;
|
40 |
-
|
41 |
-
$template = str_replace($replace, $object->$match, $template);
|
42 |
}
|
43 |
-
}
|
44 |
-
return $template;
|
45 |
}
|
46 |
-
|
47 |
-
public static function checkif($template, $object)
|
48 |
{
|
49 |
$count = preg_match_all('/{if:(.*?)}(.*){\/if:(\1)}/i', $template, $matches);
|
50 |
-
|
51 |
-
if (! isset($matches[0]) || $count == 0)
|
52 |
-
return $template; // no statements;
|
53 |
-
|
54 |
-
/* matches[0] = full statement
|
55 |
matches[1] = name of field + possible value
|
56 |
-
matches[2] = inner content
|
57 |
*/
|
58 |
|
59 |
-
for($i = 0; $i < $count; $i++)
|
60 |
{
|
61 |
-
|
62 |
$full = $matches[0][$i];
|
63 |
-
$field = $matches[1][$i];
|
64 |
$value = null;
|
65 |
|
66 |
if (strstr($field, '=')) // check for value construct
|
67 |
{
|
68 |
list($field, $value) = explode('=', $field);
|
69 |
-
}
|
70 |
-
|
71 |
-
|
72 |
-
$content = $matches[2][$i];
|
73 |
|
74 |
-
|
|
|
|
|
75 |
{ // match
|
76 |
-
|
|
|
77 |
}
|
78 |
else
|
79 |
{ // no match
|
80 |
-
$template = str_replace($full, '', $template);
|
81 |
-
}
|
82 |
}
|
83 |
-
return $template;
|
84 |
}
|
85 |
-
|
86 |
-
public static function checkfor($template, $object)
|
87 |
{
|
88 |
$count = preg_match_all('/\{for:(.*)\}(.*)\{\/for:(.*)\}/isU', $template, $matches);
|
89 |
|
90 |
-
if (! isset($matches[0]) || $count == 0)
|
91 |
-
return $template; // no statements;
|
92 |
-
|
93 |
for ($i = 0; $i < $count; $i++)
|
94 |
{
|
95 |
-
$content = '';
|
96 |
-
$field = $matches[1][$i];
|
97 |
-
$repeatline = $matches[2][$i];
|
98 |
-
|
99 |
if (isset($object->$field))
|
100 |
{
|
101 |
foreach($object->$field as $key => $item)
|
102 |
{
|
103 |
if (is_array($item))
|
104 |
{
|
105 |
-
|
106 |
-
$line = $repeatline;
|
107 |
-
|
108 |
foreach($item as $subkey => $subitem)
|
109 |
{
|
110 |
$line = str_replace('%%' . $subkey . '%%',$subitem, $line);
|
111 |
$line = static::checkif($line, $object);
|
112 |
}
|
113 |
-
$line = str_replace('%%key%%', $key, $line);
|
114 |
$content .= $line;
|
115 |
}
|
116 |
else
|
117 |
-
{
|
118 |
$line = str_replace('%%key%%',$key, $repeatline);
|
119 |
-
|
120 |
-
$line = static::checkif($line, $object); // check if statements in the loop.
|
121 |
$content .= str_replace('%%item%%', $item, $line);
|
122 |
}
|
123 |
}
|
124 |
-
|
125 |
}
|
126 |
$template = str_replace($matches[0][$i], $content, $template);
|
127 |
-
|
128 |
}
|
129 |
|
130 |
return $template;
|
131 |
}
|
132 |
-
|
133 |
|
134 |
}
|
5 |
|
6 |
class simpleTemplate
|
7 |
{
|
8 |
+
private $version = '1.1.1';
|
9 |
+
|
10 |
+
public static function parse($template_file, $object)
|
11 |
{
|
12 |
+
if ($template_file == '')
|
13 |
{
|
14 |
return false;
|
15 |
}
|
16 |
+
$template = file_get_contents($template_file);
|
17 |
+
|
18 |
|
19 |
+
$template = static::checkfor($template, $object);
|
20 |
+
$template = static::checkif($template, $object);
|
21 |
+
$template = static::checkvar($template, $object);
|
22 |
|
23 |
+
|
24 |
+
return $template;
|
|
|
|
|
|
|
|
|
25 |
}
|
26 |
+
|
27 |
public static function checkvar($template, $object)
|
28 |
{
|
29 |
+
preg_match_all('/%%(.*?)%%/im', $template, $matches);
|
30 |
+
if(isset($matches[1]) && count($matches[1]) > 0)
|
|
|
31 |
{
|
32 |
for($i = 0; $i < count($matches[1]); $i++)
|
33 |
{
|
34 |
+
$match = $matches[1][$i];
|
35 |
+
$replace = $matches[0][$i];
|
36 |
+
|
37 |
+
if (! isset($object->$match))
|
38 |
+
continue;
|
39 |
+
|
40 |
+
$template = str_replace($replace, $object->$match, $template);
|
41 |
}
|
42 |
+
}
|
43 |
+
return $template;
|
44 |
}
|
45 |
+
|
46 |
+
public static function checkif($template, $object)
|
47 |
{
|
48 |
$count = preg_match_all('/{if:(.*?)}(.*){\/if:(\1)}/i', $template, $matches);
|
49 |
+
|
50 |
+
if (! isset($matches[0]) || $count == 0)
|
51 |
+
return $template; // no statements;
|
52 |
+
|
53 |
+
/* matches[0] = full statement
|
54 |
matches[1] = name of field + possible value
|
55 |
+
matches[2] = inner content
|
56 |
*/
|
57 |
|
58 |
+
for($i = 0; $i < $count; $i++)
|
59 |
{
|
60 |
+
|
61 |
$full = $matches[0][$i];
|
62 |
+
$field = $matches[1][$i];
|
63 |
$value = null;
|
64 |
|
65 |
if (strstr($field, '=')) // check for value construct
|
66 |
{
|
67 |
list($field, $value) = explode('=', $field);
|
68 |
+
}
|
69 |
+
|
|
|
|
|
70 |
|
71 |
+
$content = $matches[2][$i];
|
72 |
+
|
73 |
+
if (isset($object->$field) && ($value == null || $object->$field == $value) )
|
74 |
{ // match
|
75 |
+
|
76 |
+
$template = str_replace($full, $content, $template);
|
77 |
}
|
78 |
else
|
79 |
{ // no match
|
80 |
+
$template = str_replace($full, '', $template);
|
81 |
+
}
|
82 |
}
|
83 |
+
return $template;
|
84 |
}
|
85 |
+
|
86 |
+
public static function checkfor($template, $object)
|
87 |
{
|
88 |
$count = preg_match_all('/\{for:(.*)\}(.*)\{\/for:(.*)\}/isU', $template, $matches);
|
89 |
|
90 |
+
if (! isset($matches[0]) || $count == 0)
|
91 |
+
return $template; // no statements;
|
92 |
+
|
93 |
for ($i = 0; $i < $count; $i++)
|
94 |
{
|
95 |
+
$content = '';
|
96 |
+
$field = $matches[1][$i];
|
97 |
+
$repeatline = $matches[2][$i];
|
98 |
+
|
99 |
if (isset($object->$field))
|
100 |
{
|
101 |
foreach($object->$field as $key => $item)
|
102 |
{
|
103 |
if (is_array($item))
|
104 |
{
|
105 |
+
|
106 |
+
$line = $repeatline;
|
107 |
+
|
108 |
foreach($item as $subkey => $subitem)
|
109 |
{
|
110 |
$line = str_replace('%%' . $subkey . '%%',$subitem, $line);
|
111 |
$line = static::checkif($line, $object);
|
112 |
}
|
113 |
+
$line = str_replace('%%key%%', $key, $line);
|
114 |
$content .= $line;
|
115 |
}
|
116 |
else
|
117 |
+
{
|
118 |
$line = str_replace('%%key%%',$key, $repeatline);
|
119 |
+
|
120 |
+
$line = static::checkif($line, $object); // check if statements in the loop.
|
121 |
$content .= str_replace('%%item%%', $item, $line);
|
122 |
}
|
123 |
}
|
124 |
+
|
125 |
}
|
126 |
$template = str_replace($matches[0][$i], $content, $template);
|
127 |
+
|
128 |
}
|
129 |
|
130 |
return $template;
|
131 |
}
|
132 |
+
|
133 |
|
134 |
}
|
assets/scss/_elements.scss
CHANGED
@@ -12,7 +12,7 @@ select {
|
|
12 |
margin-right: 15px;
|
13 |
//margin-top: 3px;
|
14 |
min-height: 35px;
|
15 |
-
|
16 |
|
17 |
img { vertical-align: middle; }
|
18 |
&.mbcolor { min-width: 50px; }
|
12 |
margin-right: 15px;
|
13 |
//margin-top: 3px;
|
14 |
min-height: 35px;
|
15 |
+
vertical-align: top;
|
16 |
|
17 |
img { vertical-align: middle; }
|
18 |
&.mbcolor { min-width: 50px; }
|
blocks/advanced.php
CHANGED
@@ -1,193 +1,192 @@
|
|
1 |
<?php
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
-
$blockClass["advanced"] = "advancedBlock";
|
5 |
-
$blockOrder[80][] = "advanced";
|
6 |
|
7 |
|
8 |
-
class advancedBlock extends maxBlock
|
9 |
{
|
10 |
-
protected $blockname = "advanced";
|
11 |
protected $fields = array("important_css" => array("default" => "0"),
|
12 |
-
"custom_rel" => array('default' => ''),
|
13 |
-
"extra_classes" => array('default' => ''),
|
14 |
"external_css" => array("default" => "0"),
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
20 |
public function __construct()
|
21 |
{
|
22 |
-
parent::__construct();
|
23 |
add_filter('mb/button/rawcss', array($this, 'parse_css_advanced'), 1001, 2); // run once
|
24 |
//add_filter('mb-css-blocks', array($this, 'preview_external_css'), 100 )
|
25 |
}
|
26 |
-
|
27 |
public function parse_css($css, $mode = 'normal')
|
28 |
{
|
29 |
$css = parent::parse_css($css);
|
30 |
-
$data = $this->data[$this->blockname];
|
31 |
|
32 |
if (isset($data["important_css"]) && $data["important_css"] == 1)
|
33 |
{
|
34 |
-
$css["settings"]["important"] = 1;
|
35 |
-
}
|
36 |
|
37 |
-
return $css;
|
38 |
}
|
39 |
-
|
40 |
public function parse_css_advanced($css, $mode)
|
41 |
{
|
42 |
-
$data = $this->data[$this->blockname];
|
43 |
|
44 |
-
if (isset($data["external_css"]) && $data["external_css"] == 1 && $mode == 'normal')
|
45 |
{
|
46 |
-
|
47 |
return array(
|
48 |
-
"normal" => array(),
|
49 |
"hover" => array());
|
50 |
}
|
51 |
|
52 |
return $css;
|
53 |
}
|
54 |
-
|
55 |
public function parse_button($domObj, $mode = 'normal')
|
56 |
{
|
57 |
-
|
58 |
-
$data = $this->data[$this->blockname];
|
59 |
-
|
60 |
-
$button_id = $this->data["id"];
|
61 |
-
|
62 |
-
$anchor = $domObj->find("a",0);
|
63 |
-
|
64 |
if (isset($data["custom_rel"]) && trim($data["custom_rel"]) != '')
|
65 |
{
|
66 |
-
$rel = '';
|
67 |
$custom_rel = trim($data["custom_rel"]);
|
68 |
-
if (isset($anchor->rel) && $anchor->rel != '')
|
69 |
{
|
70 |
$anchor->rel .= ' ';
|
71 |
}
|
72 |
-
|
73 |
$anchor->rel .= $custom_rel;
|
74 |
}
|
75 |
-
|
76 |
-
if (isset($data["extra_classes"]) && trim($data["extra_classes"]) != '')
|
77 |
{
|
78 |
-
$extra = trim($data["extra_classes"]);
|
79 |
-
$anchor->class .= ' ' . $extra;
|
80 |
-
|
81 |
}
|
82 |
-
|
83 |
-
if (isset($data["external_css"]) && $data["external_css"] == 1)
|
84 |
{
|
85 |
-
$anchor->class .= ' external-css ' ;
|
86 |
}
|
87 |
-
|
88 |
-
return $domObj;
|
89 |
-
|
90 |
}
|
91 |
-
|
92 |
-
public function admin_fields()
|
93 |
{
|
94 |
-
$data = $this->data[$this->blockname];
|
|
|
95 |
|
96 |
foreach($this->fields as $field => $options)
|
97 |
-
{
|
98 |
-
$default = (isset($options["default"])) ? $options["default"] : '';
|
99 |
$$field = (isset($data[$field])) ? $data[$field] : $default;
|
100 |
-
${$field . "_default"} = $default;
|
101 |
-
|
102 |
-
global $maxbuttons_container_alignments;
|
103 |
}
|
104 |
-
|
105 |
-
|
106 |
-
?>
|
107 |
-
|
108 |
<div class="option-container mb_tab">
|
109 |
<div class="title"><?php _e('Advanced', 'maxbuttons') ?></div>
|
110 |
<div class="inside advanced">
|
111 |
-
|
112 |
-
<?php
|
113 |
-
|
114 |
-
|
115 |
-
$fspacer->label = __('Use !Important', 'maxbuttons');
|
116 |
-
$fspacer->name = '';
|
117 |
-
$fspacer->note = __('Adding !important to the button styles can help avoid potential conflicts with your theme styles.', 'maxbuttons') ;
|
118 |
-
$fspacer->output('start');
|
119 |
-
*/
|
120 |
-
|
121 |
-
$imp = new maxField('switch');
|
122 |
$imp->note = __('Adding !important to the button styles can help avoid potential conflicts with your theme styles.', 'maxbuttons') ;
|
123 |
-
$imp->id = 'important_css';
|
124 |
$imp->name = $imp->id;
|
125 |
-
$imp->value = 1;
|
126 |
$imp->label = __('Use !Important', 'maxbuttons');
|
127 |
$imp->checked = checked(maxBlocks::getValue('important_css'), 1, false);
|
128 |
//$imp->value = maxBlocks::getValue('important_css');
|
129 |
-
|
130 |
-
|
131 |
-
$
|
132 |
-
|
133 |
-
$class
|
|
|
|
|
134 |
$class->label = __("Extra classes","maxbuttons");
|
135 |
-
$class->value = maxBlocks::getValue($class->id);
|
136 |
$class->note = __("Useful for custom code or other plugins who target classes", "maxbuttons");
|
137 |
$class->output('start','end');
|
138 |
-
|
139 |
-
$
|
|
|
|
|
140 |
$rel->id = 'custom_rel';
|
141 |
-
$rel->name = $rel->id;
|
142 |
$rel->label = __("Custom Rel Tag","maxbuttons");
|
143 |
-
$rel->value = maxBlocks::getValue($rel->id);
|
144 |
$rel->note = __("Useful when button is targeting lightbox and/or popup plugins that use this method", "maxbuttons");
|
145 |
$rel->output('start','end');
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
|
|
|
|
|
|
150 |
$nocss = new maxField('switch');
|
151 |
-
$nocss->note = __('By default, the CSS styles for the button are rendered within a <style> block in the HTML body. Enabling the "Use External CSS" option allows you to put the CSS code for the button into your theme stylesheet instead.', 'maxbuttons');
|
152 |
$nocss->label = __('Use External CSS', 'maxbuttons');
|
153 |
-
$nocss->id = 'external_css';
|
154 |
$nocss->value = 1;
|
155 |
-
$nocss->name = $nocss->id;
|
156 |
$nocss->checked = checked($external_css, 1, false);
|
157 |
$nocss->output('start','');
|
158 |
-
|
159 |
-
$nospace = new maxField('spacer');
|
160 |
-
$nospace->content = __("Warning: This will remove all styling of the buttons!","maxbuttons");
|
161 |
-
$nospace->output('','end');
|
162 |
-
?>
|
163 |
-
|
164 |
<div class="option-design">
|
165 |
<div class="label"> </div>
|
166 |
<div class="input"><a id="view_css_modal" name="view_css" href="javascript:void(0)" class="button maxmodal" data-modal="view-css"><?php _e('View CSS', 'maxbuttons') ?></a></div>
|
167 |
<div class="clear"></div>
|
168 |
-
|
169 |
-
<div id="view-css" class="maxmodal-data" >
|
170 |
<h3 class="title"><?php _e("External CSS","maxbuttons"); ?></h3>
|
171 |
<div class="content">
|
172 |
<p><?php _e('If the "Use External CSS" option is enabled for this button, copy and paste the CSS code below into your theme stylesheet.', 'maxbuttons') ?></p>
|
173 |
-
|
174 |
<textarea id="maxbutton-css" readonly="readonly">
|
175 |
-
<?php
|
176 |
if (isset($this->data["id"]) && $this->data['id'] > 0)
|
177 |
{
|
178 |
$id = $this->data["id"];
|
179 |
-
$b = new maxButton();
|
180 |
|
181 |
$b->set($id);
|
182 |
$b->parse_button();
|
183 |
-
$b->parse_css("preview");
|
184 |
|
185 |
echo $b->getparsedCSS();
|
186 |
-
|
187 |
}
|
188 |
else
|
189 |
{ _e("Please save the button first","maxbuttons"); }
|
190 |
-
|
191 |
?></textarea>
|
192 |
</div>
|
193 |
<div class='controls'>
|
@@ -200,7 +199,7 @@ class advancedBlock extends maxBlock
|
|
200 |
</div>
|
201 |
</div>
|
202 |
|
203 |
-
<?php
|
204 |
} // admin_fields
|
205 |
|
206 |
} // class
|
1 |
<?php
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
+
$blockClass["advanced"] = "advancedBlock";
|
5 |
+
$blockOrder[80][] = "advanced";
|
6 |
|
7 |
|
8 |
+
class advancedBlock extends maxBlock
|
9 |
{
|
10 |
+
protected $blockname = "advanced";
|
11 |
protected $fields = array("important_css" => array("default" => "0"),
|
12 |
+
"custom_rel" => array('default' => ''),
|
13 |
+
"extra_classes" => array('default' => ''),
|
14 |
"external_css" => array("default" => "0"),
|
|
|
15 |
|
16 |
+
|
17 |
+
|
18 |
+
);
|
19 |
+
|
20 |
public function __construct()
|
21 |
{
|
22 |
+
parent::__construct();
|
23 |
add_filter('mb/button/rawcss', array($this, 'parse_css_advanced'), 1001, 2); // run once
|
24 |
//add_filter('mb-css-blocks', array($this, 'preview_external_css'), 100 )
|
25 |
}
|
26 |
+
|
27 |
public function parse_css($css, $mode = 'normal')
|
28 |
{
|
29 |
$css = parent::parse_css($css);
|
30 |
+
$data = $this->data[$this->blockname];
|
31 |
|
32 |
if (isset($data["important_css"]) && $data["important_css"] == 1)
|
33 |
{
|
34 |
+
$css["settings"]["important"] = 1;
|
35 |
+
}
|
36 |
|
37 |
+
return $css;
|
38 |
}
|
39 |
+
|
40 |
public function parse_css_advanced($css, $mode)
|
41 |
{
|
42 |
+
$data = $this->data[$this->blockname];
|
43 |
|
44 |
+
if (isset($data["external_css"]) && $data["external_css"] == 1 && $mode == 'normal')
|
45 |
{
|
46 |
+
|
47 |
return array(
|
48 |
+
"normal" => array(),
|
49 |
"hover" => array());
|
50 |
}
|
51 |
|
52 |
return $css;
|
53 |
}
|
54 |
+
|
55 |
public function parse_button($domObj, $mode = 'normal')
|
56 |
{
|
57 |
+
|
58 |
+
$data = $this->data[$this->blockname];
|
59 |
+
|
60 |
+
$button_id = $this->data["id"];
|
61 |
+
|
62 |
+
$anchor = $domObj->find("a",0);
|
63 |
+
|
64 |
if (isset($data["custom_rel"]) && trim($data["custom_rel"]) != '')
|
65 |
{
|
66 |
+
$rel = '';
|
67 |
$custom_rel = trim($data["custom_rel"]);
|
68 |
+
if (isset($anchor->rel) && $anchor->rel != '')
|
69 |
{
|
70 |
$anchor->rel .= ' ';
|
71 |
}
|
72 |
+
|
73 |
$anchor->rel .= $custom_rel;
|
74 |
}
|
75 |
+
|
76 |
+
if (isset($data["extra_classes"]) && trim($data["extra_classes"]) != '')
|
77 |
{
|
78 |
+
$extra = trim($data["extra_classes"]);
|
79 |
+
$anchor->class .= ' ' . $extra;
|
80 |
+
|
81 |
}
|
82 |
+
|
83 |
+
if (isset($data["external_css"]) && $data["external_css"] == 1)
|
84 |
{
|
85 |
+
$anchor->class .= ' external-css ' ;
|
86 |
}
|
87 |
+
|
88 |
+
return $domObj;
|
89 |
+
|
90 |
}
|
91 |
+
|
92 |
+
public function admin_fields()
|
93 |
{
|
94 |
+
$data = $this->data[$this->blockname];
|
95 |
+
$admin = MB()->getClass('admin');
|
96 |
|
97 |
foreach($this->fields as $field => $options)
|
98 |
+
{
|
99 |
+
$default = (isset($options["default"])) ? $options["default"] : '';
|
100 |
$$field = (isset($data[$field])) ? $data[$field] : $default;
|
101 |
+
${$field . "_default"} = $default;
|
102 |
+
|
103 |
+
global $maxbuttons_container_alignments;
|
104 |
}
|
105 |
+
?>
|
106 |
+
|
|
|
|
|
107 |
<div class="option-container mb_tab">
|
108 |
<div class="title"><?php _e('Advanced', 'maxbuttons') ?></div>
|
109 |
<div class="inside advanced">
|
110 |
+
|
111 |
+
<?php
|
112 |
+
|
113 |
+
$imp = new maxField('switch');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
$imp->note = __('Adding !important to the button styles can help avoid potential conflicts with your theme styles.', 'maxbuttons') ;
|
115 |
+
$imp->id = 'important_css';
|
116 |
$imp->name = $imp->id;
|
117 |
+
$imp->value = 1;
|
118 |
$imp->label = __('Use !Important', 'maxbuttons');
|
119 |
$imp->checked = checked(maxBlocks::getValue('important_css'), 1, false);
|
120 |
//$imp->value = maxBlocks::getValue('important_css');
|
121 |
+
//$imp->output('start','end');
|
122 |
+
|
123 |
+
$admin->addField($imp, 'start', 'end');
|
124 |
+
|
125 |
+
$class = new maxField();
|
126 |
+
$class->id = 'extra_classes';
|
127 |
+
$class->name = $class->id;
|
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');
|
134 |
+
|
135 |
+
$rel = new maxField();
|
136 |
$rel->id = 'custom_rel';
|
137 |
+
$rel->name = $rel->id;
|
138 |
$rel->label = __("Custom Rel Tag","maxbuttons");
|
139 |
+
$rel->value = maxBlocks::getValue($rel->id);
|
140 |
$rel->note = __("Useful when button is targeting lightbox and/or popup plugins that use this method", "maxbuttons");
|
141 |
$rel->output('start','end');
|
142 |
+
|
143 |
+
$admin->addField($rel, 'start', 'end');
|
144 |
+
|
145 |
+
// do_action('mb-after-advanced');
|
146 |
+
|
147 |
+
$admin->display_fields();
|
148 |
+
|
149 |
$nocss = new maxField('switch');
|
150 |
+
$nocss->note = __('By default, the CSS styles for the button are rendered within a <style> block in the HTML body. Enabling the "Use External CSS" option allows you to put the CSS code for the button into your theme stylesheet instead.', 'maxbuttons');
|
151 |
$nocss->label = __('Use External CSS', 'maxbuttons');
|
152 |
+
$nocss->id = 'external_css';
|
153 |
$nocss->value = 1;
|
154 |
+
$nocss->name = $nocss->id;
|
155 |
$nocss->checked = checked($external_css, 1, false);
|
156 |
$nocss->output('start','');
|
157 |
+
|
158 |
+
$nospace = new maxField('spacer');
|
159 |
+
$nospace->content = __("Warning: This will remove all styling of the buttons!","maxbuttons");
|
160 |
+
$nospace->output('','end');
|
161 |
+
?>
|
162 |
+
|
163 |
<div class="option-design">
|
164 |
<div class="label"> </div>
|
165 |
<div class="input"><a id="view_css_modal" name="view_css" href="javascript:void(0)" class="button maxmodal" data-modal="view-css"><?php _e('View CSS', 'maxbuttons') ?></a></div>
|
166 |
<div class="clear"></div>
|
167 |
+
|
168 |
+
<div id="view-css" class="maxmodal-data" >
|
169 |
<h3 class="title"><?php _e("External CSS","maxbuttons"); ?></h3>
|
170 |
<div class="content">
|
171 |
<p><?php _e('If the "Use External CSS" option is enabled for this button, copy and paste the CSS code below into your theme stylesheet.', 'maxbuttons') ?></p>
|
172 |
+
|
173 |
<textarea id="maxbutton-css" readonly="readonly">
|
174 |
+
<?php
|
175 |
if (isset($this->data["id"]) && $this->data['id'] > 0)
|
176 |
{
|
177 |
$id = $this->data["id"];
|
178 |
+
$b = new maxButton();
|
179 |
|
180 |
$b->set($id);
|
181 |
$b->parse_button();
|
182 |
+
$b->parse_css("preview");
|
183 |
|
184 |
echo $b->getparsedCSS();
|
185 |
+
|
186 |
}
|
187 |
else
|
188 |
{ _e("Please save the button first","maxbuttons"); }
|
189 |
+
|
190 |
?></textarea>
|
191 |
</div>
|
192 |
<div class='controls'>
|
199 |
</div>
|
200 |
</div>
|
201 |
|
202 |
+
<?php
|
203 |
} // admin_fields
|
204 |
|
205 |
} // class
|
blocks/border.php
CHANGED
@@ -63,7 +63,6 @@ class borderBlock extends maxBlock
|
|
63 |
$map["radius_bottom_left"]["func"] = "updateRadius";
|
64 |
$map["radius_bottom_right"]["func"] = "updateRadius";
|
65 |
|
66 |
-
|
67 |
return $map;
|
68 |
}
|
69 |
|
63 |
$map["radius_bottom_left"]["func"] = "updateRadius";
|
64 |
$map["radius_bottom_right"]["func"] = "updateRadius";
|
65 |
|
|
|
66 |
return $map;
|
67 |
}
|
68 |
|
blocks/container.php
CHANGED
@@ -1,112 +1,114 @@
|
|
1 |
<?php
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
-
$blockClass["container"] = "containerBlock";
|
5 |
$blockOrder[70][] = "container";
|
6 |
-
|
7 |
use \simple_html_dom as simple_html_dom;
|
8 |
|
9 |
-
class containerBlock extends maxBlock
|
10 |
{
|
11 |
-
protected $blockname = "container";
|
12 |
protected $fields = array("container_enabled" => array("default" => "0"),
|
13 |
"container_center_div_wrap" => array("default" => "0"),
|
14 |
-
|
15 |
"container_width" => array("default" => "0px",
|
16 |
-
"css" => "width",
|
17 |
"csspart" => "mb-container"),
|
18 |
"container_margin_top" => array("default" => "0px",
|
19 |
"css" => "margin-top",
|
20 |
-
"csspart" => "mb-container"),
|
21 |
"container_margin_right" => array("default" => "0px",
|
22 |
-
"css" => "margin-right",
|
23 |
"csspart" => "mb-container"),
|
24 |
"container_margin_bottom" => array("default" => "0px",
|
25 |
-
"css" => "margin-bottom",
|
26 |
"csspart" => "mb-container"),
|
27 |
"container_margin_left" => array("default" => "0px",
|
28 |
-
"css" => "margin-left",
|
29 |
-
"csspart" => "mb-container"),
|
30 |
"container_alignment" => array("default" => "",
|
31 |
-
"css" => "align",
|
32 |
-
"csspart" => "mb-container"),
|
33 |
-
);
|
34 |
-
|
35 |
-
|
36 |
public function parse_button($domObj, $mode = 'normal')
|
37 |
{
|
38 |
-
$data = $this->data[$this->blockname];
|
39 |
-
$id = $this->data["id"];
|
40 |
|
41 |
if ($mode == 'editor')
|
42 |
return $domObj; // in previews no container object
|
43 |
-
|
44 |
-
|
45 |
-
if ($data["container_enabled"] == 1)
|
46 |
{
|
47 |
-
$anchor = $domObj->find("a",0);
|
48 |
-
$anchor->outertext = "<span class='maxbutton-" . $id . "-container mb-container'>" . $anchor->outertext . "</span>";
|
|
|
49 |
|
50 |
-
|
51 |
-
if ($data["container_center_div_wrap"] == 1) // I heard you like wrapping...
|
52 |
{
|
53 |
-
$anchor->outertext = "<span class='mb-center maxbutton-" . $id . "-center'>" . $anchor->outertext . "</span>";
|
54 |
-
|
55 |
}
|
56 |
-
// reload the dom model with new divs
|
57 |
-
$newhtml = $domObj->save();
|
58 |
-
$domObj = new simple_html_dom();
|
59 |
$domObj->load($newhtml);
|
60 |
}
|
61 |
-
|
62 |
|
63 |
-
|
|
|
64 |
return $domObj;
|
65 |
}
|
66 |
|
67 |
public function parse_css($css, $mode = 'normal')
|
68 |
{
|
69 |
$css = parent::parse_css($css);
|
70 |
-
$data = $this->data[$this->blockname];
|
71 |
|
72 |
-
$csspart = 'mb-container';
|
73 |
$csspseudo = 'normal';
|
74 |
-
|
75 |
-
$css["mb-container"]["normal"]["display"] = "block";
|
76 |
-
$css["mb-center"]["normal"]["display"] = "block";
|
77 |
-
$css["mb-center"]["normal"]["text-align"] = "center";
|
78 |
-
|
79 |
-
if (isset($css[$csspart][$csspseudo]["align"]))
|
80 |
{
|
81 |
|
82 |
if ($css[$csspart][$csspseudo]["align"] != '')
|
83 |
-
{
|
84 |
|
85 |
-
$stat = explode(":", $css[$csspart][$csspseudo]["align"]);
|
86 |
$css[$csspart][$csspseudo][ $stat[0] ] = $stat[1];
|
87 |
}
|
88 |
-
unset($css[$csspart][$csspseudo]["align"]);
|
89 |
}
|
90 |
if ( isset($css[$csspart][$csspseudo]["width"]) && $data["container_width"] == 0)
|
91 |
{
|
92 |
unset($css[$csspart][$csspseudo]["width"]);
|
93 |
}
|
94 |
-
return $css;
|
95 |
-
|
96 |
}
|
97 |
-
|
98 |
|
99 |
|
100 |
-
|
|
|
101 |
{
|
102 |
-
$data = $this->data[$this->blockname];
|
|
|
|
|
103 |
foreach($this->fields as $field => $options)
|
104 |
-
{
|
105 |
-
$default = (isset($options["default"])) ? $options["default"] : '';
|
106 |
$$field = (isset($data[$field])) ? $data[$field] : $default;
|
107 |
-
${$field . "_default"} = $default;
|
108 |
-
|
109 |
-
|
110 |
}
|
111 |
$maxbuttons_container_alignments = array(
|
112 |
'' => '',
|
@@ -115,106 +117,120 @@ class containerBlock extends maxBlock
|
|
115 |
'float: right' => 'float: right'
|
116 |
);
|
117 |
|
118 |
-
$icon_url = MB()->get_plugin_url() . 'images/icons/' ;
|
119 |
-
|
120 |
-
?>
|
121 |
<div class="option-container mb_tab">
|
122 |
<div class="title"><?php _e('Container', 'maxbuttons') ?></div>
|
123 |
<div class="inside">
|
124 |
<?php
|
125 |
-
|
126 |
-
$
|
127 |
-
$
|
128 |
-
$
|
129 |
-
|
130 |
-
$u_container =
|
131 |
-
|
132 |
-
$u_container->
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
$
|
138 |
-
|
139 |
-
|
140 |
//$fspacer
|
141 |
-
$fspacer->name = '';
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
|
|
|
|
146 |
$wrap_cont->id = $wrap_cont->name;
|
147 |
-
$wrap_cont->value = 1;
|
148 |
-
$wrap_cont->checked = checked( maxBlocks::getValue('container_center_div_wrap'), 1, false);
|
149 |
-
$wrap_cont->label = __('Center the container', 'maxbuttons');
|
150 |
-
|
151 |
|
152 |
-
|
153 |
-
|
|
|
|
|
154 |
$container_width->id = $container_width->name;
|
155 |
-
$container_width->min = 0;
|
156 |
-
$container_width->value = maxUtils::strip_px( maxBlocks::getValue('container_width') );
|
157 |
$container_width->label = __('Width', 'maxbuttons');
|
158 |
$container_width->inputclass = 'small';
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
161 |
// Margin - trouble
|
162 |
-
$ptop = new maxField('number');
|
163 |
-
$ptop->label = __('Margin', 'maxbuttons');
|
164 |
$ptop->id = 'container_margin_top';
|
165 |
-
$ptop->name = $ptop->id;
|
166 |
-
$ptop->min = 0;
|
167 |
$ptop->inputclass = 'tiny';
|
168 |
-
$ptop->before_input = '<img src="' . $icon_url . 'p_top.png" title="' . __("Margin Top","maxbuttons") . '" >';
|
169 |
-
$ptop->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_top'));
|
170 |
-
|
171 |
-
|
172 |
|
173 |
-
|
174 |
-
|
|
|
175 |
$pright->id = 'container_margin_right';
|
176 |
-
$pright->name = $pright->id;
|
177 |
$pright->min = 0;
|
178 |
-
$pright->inputclass = 'tiny';
|
179 |
-
$pright->before_input = '<img src="' . $icon_url . 'p_right.png" class="icon padding" title="' . __("Margin Right","maxbuttons") . '" >';
|
180 |
-
$pright->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_right'));
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
|
|
185 |
$pbottom->id = 'container_margin_bottom';
|
186 |
-
$pbottom->name = $pbottom->id;
|
187 |
-
$pbottom->min = 0;
|
188 |
-
$pbottom->inputclass = 'tiny';
|
189 |
-
$pbottom->before_input = '<img src="' . $icon_url . 'p_bottom.png" class="icon padding" title="' . __("Margin Bottom","maxbuttons") . '" >';
|
190 |
-
$pbottom->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_bottom'));
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
|
|
195 |
$pleft->id = 'container_margin_left';
|
196 |
-
$pleft->name = $pleft->id;
|
197 |
-
$pleft->min = 0;
|
198 |
-
$pleft->inputclass = 'tiny';
|
199 |
-
$pleft->before_input = '<img src="' . $icon_url . 'p_left.png" class="icon padding" title="' . __("Margin Left","maxbuttons") . '" >';
|
200 |
-
$pleft->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_left'));
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
$align = new maxField('generic');
|
206 |
-
$align->label = __('Alignment','maxbuttons');
|
207 |
-
$align->name = 'container_alignment';
|
208 |
-
$align->id = $align->name;
|
209 |
-
$align->value= maxBlocks::getValue('container_alignment');
|
210 |
-
//$align->setDefault(maxBlocks::getDefault('container_alignment'));
|
211 |
-
$align->content = maxUtils::selectify($align->name, $maxbuttons_container_alignments, $align->value);
|
212 |
-
$align->output('start', 'end');
|
213 |
-
|
214 |
-
|
|
|
|
|
|
|
|
|
215 |
</div>
|
216 |
</div>
|
217 |
-
<?php
|
218 |
} // admin_fields
|
219 |
|
220 |
} // class
|
1 |
<?php
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
+
$blockClass["container"] = "containerBlock";
|
5 |
$blockOrder[70][] = "container";
|
6 |
+
|
7 |
use \simple_html_dom as simple_html_dom;
|
8 |
|
9 |
+
class containerBlock extends maxBlock
|
10 |
{
|
11 |
+
protected $blockname = "container";
|
12 |
protected $fields = array("container_enabled" => array("default" => "0"),
|
13 |
"container_center_div_wrap" => array("default" => "0"),
|
14 |
+
|
15 |
"container_width" => array("default" => "0px",
|
16 |
+
"css" => "width",
|
17 |
"csspart" => "mb-container"),
|
18 |
"container_margin_top" => array("default" => "0px",
|
19 |
"css" => "margin-top",
|
20 |
+
"csspart" => "mb-container"),
|
21 |
"container_margin_right" => array("default" => "0px",
|
22 |
+
"css" => "margin-right",
|
23 |
"csspart" => "mb-container"),
|
24 |
"container_margin_bottom" => array("default" => "0px",
|
25 |
+
"css" => "margin-bottom",
|
26 |
"csspart" => "mb-container"),
|
27 |
"container_margin_left" => array("default" => "0px",
|
28 |
+
"css" => "margin-left",
|
29 |
+
"csspart" => "mb-container"),
|
30 |
"container_alignment" => array("default" => "",
|
31 |
+
"css" => "align",
|
32 |
+
"csspart" => "mb-container"),
|
33 |
+
);
|
34 |
+
|
35 |
+
|
36 |
public function parse_button($domObj, $mode = 'normal')
|
37 |
{
|
38 |
+
$data = $this->data[$this->blockname];
|
39 |
+
$id = $this->data["id"];
|
40 |
|
41 |
if ($mode == 'editor')
|
42 |
return $domObj; // in previews no container object
|
43 |
+
|
44 |
+
|
45 |
+
if ($data["container_enabled"] == 1)
|
46 |
{
|
47 |
+
$anchor = $domObj->find("a",0);
|
48 |
+
$anchor->outertext = "<span class='maxbutton-" . $id . "-container mb-container'>" . $anchor->outertext . "</span>";
|
49 |
+
|
50 |
|
51 |
+
if ($data["container_center_div_wrap"] == 1) // I heard you like wrapping...
|
|
|
52 |
{
|
53 |
+
$anchor->outertext = "<span class='mb-center maxbutton-" . $id . "-center'>" . $anchor->outertext . "</span>";
|
54 |
+
|
55 |
}
|
56 |
+
// reload the dom model with new divs
|
57 |
+
$newhtml = $domObj->save();
|
58 |
+
$domObj = new simple_html_dom();
|
59 |
$domObj->load($newhtml);
|
60 |
}
|
|
|
61 |
|
62 |
+
|
63 |
+
|
64 |
return $domObj;
|
65 |
}
|
66 |
|
67 |
public function parse_css($css, $mode = 'normal')
|
68 |
{
|
69 |
$css = parent::parse_css($css);
|
70 |
+
$data = $this->data[$this->blockname];
|
71 |
|
72 |
+
$csspart = 'mb-container';
|
73 |
$csspseudo = 'normal';
|
74 |
+
|
75 |
+
$css["mb-container"]["normal"]["display"] = "block";
|
76 |
+
$css["mb-center"]["normal"]["display"] = "block";
|
77 |
+
$css["mb-center"]["normal"]["text-align"] = "center";
|
78 |
+
|
79 |
+
if (isset($css[$csspart][$csspseudo]["align"]))
|
80 |
{
|
81 |
|
82 |
if ($css[$csspart][$csspseudo]["align"] != '')
|
83 |
+
{
|
84 |
|
85 |
+
$stat = explode(":", $css[$csspart][$csspseudo]["align"]);
|
86 |
$css[$csspart][$csspseudo][ $stat[0] ] = $stat[1];
|
87 |
}
|
88 |
+
unset($css[$csspart][$csspseudo]["align"]);
|
89 |
}
|
90 |
if ( isset($css[$csspart][$csspseudo]["width"]) && $data["container_width"] == 0)
|
91 |
{
|
92 |
unset($css[$csspart][$csspseudo]["width"]);
|
93 |
}
|
94 |
+
return $css;
|
95 |
+
|
96 |
}
|
|
|
97 |
|
98 |
|
99 |
+
|
100 |
+
public function admin_fields()
|
101 |
{
|
102 |
+
$data = $this->data[$this->blockname];
|
103 |
+
$admin = MB()->getClass('admin');
|
104 |
+
|
105 |
foreach($this->fields as $field => $options)
|
106 |
+
{
|
107 |
+
$default = (isset($options["default"])) ? $options["default"] : '';
|
108 |
$$field = (isset($data[$field])) ? $data[$field] : $default;
|
109 |
+
${$field . "_default"} = $default;
|
110 |
+
|
111 |
+
|
112 |
}
|
113 |
$maxbuttons_container_alignments = array(
|
114 |
'' => '',
|
117 |
'float: right' => 'float: right'
|
118 |
);
|
119 |
|
120 |
+
$icon_url = MB()->get_plugin_url() . 'images/icons/' ;
|
121 |
+
|
122 |
+
?>
|
123 |
<div class="option-container mb_tab">
|
124 |
<div class="title"><?php _e('Container', 'maxbuttons') ?></div>
|
125 |
<div class="inside">
|
126 |
<?php
|
127 |
+
|
128 |
+
$u_container = new maxField('switch');
|
129 |
+
$u_container->label = __('Use Container', 'maxbuttons');
|
130 |
+
$u_container->name = 'container_enabled';
|
131 |
+
$u_container->id = $u_container->name;
|
132 |
+
$u_container->value = 1;
|
133 |
+
|
134 |
+
$u_container->checked = checked( maxBlocks::getValue('container_enabled'), 1, false);
|
135 |
+
//$u_container->output('start', 'end');
|
136 |
+
|
137 |
+
$admin->addField($u_container, 'start', 'end');
|
138 |
+
|
139 |
+
$fspacer = new maxField('spacer');
|
140 |
+
// $fspacer->id = 'fspace';
|
141 |
+
//$fspacer->name = $fspacer->id;
|
142 |
//$fspacer
|
143 |
+
$fspacer->name = '';
|
144 |
+
// $fspacer->output('start');
|
145 |
+
|
146 |
+
$admin->addField($fspacer, 'start');
|
147 |
+
|
148 |
+
$wrap_cont = new maxField('switch');
|
149 |
+
$wrap_cont->name = 'container_center_div_wrap';
|
150 |
$wrap_cont->id = $wrap_cont->name;
|
151 |
+
$wrap_cont->value = 1;
|
152 |
+
$wrap_cont->checked = checked( maxBlocks::getValue('container_center_div_wrap'), 1, false);
|
153 |
+
$wrap_cont->label = __('Center the container', 'maxbuttons');
|
154 |
+
//$wrap_cont->output('','end');
|
155 |
|
156 |
+
$admin->addField($wrap_cont, '', 'end');
|
157 |
+
|
158 |
+
$container_width = new maxField('number');
|
159 |
+
$container_width->name = 'container_width';
|
160 |
$container_width->id = $container_width->name;
|
161 |
+
$container_width->min = 0;
|
162 |
+
$container_width->value = maxUtils::strip_px( maxBlocks::getValue('container_width') );
|
163 |
$container_width->label = __('Width', 'maxbuttons');
|
164 |
$container_width->inputclass = 'small';
|
165 |
+
// $container_width->output('start','end');
|
166 |
+
|
167 |
+
$admin->addField($container_width, 'start', 'end');
|
168 |
+
|
169 |
+
|
170 |
// Margin - trouble
|
171 |
+
$ptop = new maxField('number');
|
172 |
+
$ptop->label = __('Margin', 'maxbuttons');
|
173 |
$ptop->id = 'container_margin_top';
|
174 |
+
$ptop->name = $ptop->id;
|
175 |
+
$ptop->min = 0;
|
176 |
$ptop->inputclass = 'tiny';
|
177 |
+
$ptop->before_input = '<img src="' . $icon_url . 'p_top.png" title="' . __("Margin Top","maxbuttons") . '" >';
|
178 |
+
$ptop->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_top'));
|
179 |
+
|
180 |
+
// $ptop->output('start');
|
181 |
|
182 |
+
$admin->addField($ptop, 'start');
|
183 |
+
|
184 |
+
$pright = new maxField('number');
|
185 |
$pright->id = 'container_margin_right';
|
186 |
+
$pright->name = $pright->id;
|
187 |
$pright->min = 0;
|
188 |
+
$pright->inputclass = 'tiny';
|
189 |
+
$pright->before_input = '<img src="' . $icon_url . 'p_right.png" class="icon padding" title="' . __("Margin Right","maxbuttons") . '" >';
|
190 |
+
$pright->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_right'));
|
191 |
+
|
192 |
+
// $pright->output();
|
193 |
+
$admin->addField($pright);
|
194 |
+
|
195 |
+
$pbottom = new maxField('number');
|
196 |
$pbottom->id = 'container_margin_bottom';
|
197 |
+
$pbottom->name = $pbottom->id;
|
198 |
+
$pbottom->min = 0;
|
199 |
+
$pbottom->inputclass = 'tiny';
|
200 |
+
$pbottom->before_input = '<img src="' . $icon_url . 'p_bottom.png" class="icon padding" title="' . __("Margin Bottom","maxbuttons") . '" >';
|
201 |
+
$pbottom->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_bottom'));
|
202 |
+
|
203 |
+
// $pbottom->output();
|
204 |
+
$admin->addField($pbottom);
|
205 |
+
|
206 |
+
$pleft = new maxField('number');
|
207 |
$pleft->id = 'container_margin_left';
|
208 |
+
$pleft->name = $pleft->id;
|
209 |
+
$pleft->min = 0;
|
210 |
+
$pleft->inputclass = 'tiny';
|
211 |
+
$pleft->before_input = '<img src="' . $icon_url . 'p_left.png" class="icon padding" title="' . __("Margin Left","maxbuttons") . '" >';
|
212 |
+
$pleft->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_left'));
|
213 |
+
|
214 |
+
//$pleft->output('','end');
|
215 |
+
$admin->addField($pleft, '', 'end');
|
216 |
+
|
217 |
$align = new maxField('generic');
|
218 |
+
$align->label = __('Alignment','maxbuttons');
|
219 |
+
$align->name = 'container_alignment';
|
220 |
+
$align->id = $align->name;
|
221 |
+
$align->value= maxBlocks::getValue('container_alignment');
|
222 |
+
//$align->setDefault(maxBlocks::getDefault('container_alignment'));
|
223 |
+
$align->content = maxUtils::selectify($align->name, $maxbuttons_container_alignments, $align->value);
|
224 |
+
$align->output('start', 'end');
|
225 |
+
|
226 |
+
$admin->addField($align, 'start', 'end');
|
227 |
+
|
228 |
+
$admin->display_fields();
|
229 |
+
?>
|
230 |
+
|
231 |
</div>
|
232 |
</div>
|
233 |
+
<?php
|
234 |
} // admin_fields
|
235 |
|
236 |
} // class
|
blocks/dimension.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
$blockClass["dimension"] = "dimensionBlock";
|
@@ -6,82 +6,57 @@ $blockOrder[20][] = "dimension";
|
|
6 |
|
7 |
class dimensionBlock extends maxBlock
|
8 |
{
|
9 |
-
protected $blockname = "dimension";
|
10 |
-
protected $fields = array("button_width" => array("default" => '160px',
|
11 |
-
"css" => "width",
|
12 |
-
),
|
13 |
-
"button_height" => array("default" => '50px',
|
14 |
"css" => "height")
|
15 |
-
);
|
16 |
-
|
17 |
-
public function parse_css($css, $mode = 'normal')
|
18 |
{
|
19 |
-
$css = parent::parse_css($css, $mode);
|
20 |
|
21 |
-
if (! isset($css["maxbutton"]["normal"]["width"])) return $css;
|
22 |
-
|
23 |
-
// do not allow zero's.
|
24 |
if (isset($css["maxbutton"]["normal"]["width"]) && ($css["maxbutton"]["normal"]["width"] == 0 || $css["maxbutton"]["normal"]["width"] == '') )
|
25 |
unset($css["maxbutton"]["normal"]["width"]);
|
26 |
|
27 |
if (isset($css["maxbutton"]["normal"]["height"]) && ($css["maxbutton"]["normal"]["height"] == 0 || $css["maxbutton"]["normal"]["height"] == '') )
|
28 |
unset($css["maxbutton"]["normal"]["height"]);
|
29 |
-
|
30 |
-
|
31 |
-
/* if ($css["normal"]["width"] > maxbuttons_strip_px(0) || $css["normal"]["height"] > maxbuttons_strip_px(0))
|
32 |
{
|
33 |
-
$css["normal"]["display"] = "inline-block";
|
34 |
}
|
35 |
*/
|
36 |
-
|
37 |
return $css;
|
38 |
}
|
39 |
|
40 |
public function map_fields($map)
|
41 |
{
|
42 |
$map = parent::map_fields($map);
|
43 |
-
|
44 |
-
$map["button_width"]["func"] = "updateDimension";
|
45 |
-
$map["button_height"]["func"] = "updateDimension";
|
46 |
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
49 |
}
|
50 |
-
|
51 |
|
52 |
public function admin_fields()
|
53 |
{
|
54 |
return;
|
55 |
-
|
56 |
-
$data = $this->data[$this->blockname];
|
57 |
-
|
58 |
-
foreach($this->fields as $field => $options)
|
59 |
-
{
|
60 |
-
$default = (isset($options["default"])) ? $options["default"] : '';
|
61 |
-
${$field} = (isset($data[$field])) ? $data[$field] : $default;
|
62 |
-
${$field . "_default"} = $default;
|
63 |
-
}
|
64 |
-
?>
|
65 |
-
<div class="mb_tab option-container">
|
66 |
-
<div class="title"><?php _e('Dimensions', 'maxbuttons') ?></div>
|
67 |
-
<div class="inside">
|
68 |
-
<div class="option-design">
|
69 |
-
<div class="label"><?php _e('Button Width', 'maxbuttons') ?></div>
|
70 |
-
<div class="input"><input class="tiny-nopad" type="text" id="button_width" name="button_width" value="<?php echo maxUtils::strip_px($button_width) ?>" />px</div>
|
71 |
-
<div class="clear"></div>
|
72 |
-
</div>
|
73 |
-
<div class="option-design">
|
74 |
-
<div class="label"><?php _e('Button Height', 'maxbuttons') ?></div>
|
75 |
-
<div class="input"><input class="tiny-nopad" type="text" id="button_height" name="button_height" value="<?php echo maxUtils::strip_px($button_height) ?>" />px</div>
|
76 |
-
<div class="clear"></div>
|
77 |
-
</div>
|
78 |
-
</div>
|
79 |
-
</div>
|
80 |
-
<?php
|
81 |
} // admin_fields
|
82 |
-
|
83 |
-
|
84 |
|
85 |
-
|
|
|
|
|
86 |
|
87 |
?>
|
1 |
+
<?php
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
$blockClass["dimension"] = "dimensionBlock";
|
6 |
|
7 |
class dimensionBlock extends maxBlock
|
8 |
{
|
9 |
+
protected $blockname = "dimension";
|
10 |
+
protected $fields = array("button_width" => array("default" => '160px',
|
11 |
+
"css" => "width",
|
12 |
+
),
|
13 |
+
"button_height" => array("default" => '50px',
|
14 |
"css" => "height")
|
15 |
+
);
|
16 |
+
|
17 |
+
public function parse_css($css, $mode = 'normal')
|
18 |
{
|
19 |
+
$css = parent::parse_css($css, $mode);
|
20 |
|
21 |
+
if (! isset($css["maxbutton"]["normal"]["width"])) return $css;
|
22 |
+
|
23 |
+
// do not allow zero's.
|
24 |
if (isset($css["maxbutton"]["normal"]["width"]) && ($css["maxbutton"]["normal"]["width"] == 0 || $css["maxbutton"]["normal"]["width"] == '') )
|
25 |
unset($css["maxbutton"]["normal"]["width"]);
|
26 |
|
27 |
if (isset($css["maxbutton"]["normal"]["height"]) && ($css["maxbutton"]["normal"]["height"] == 0 || $css["maxbutton"]["normal"]["height"] == '') )
|
28 |
unset($css["maxbutton"]["normal"]["height"]);
|
29 |
+
|
30 |
+
|
31 |
+
/* if ($css["normal"]["width"] > maxbuttons_strip_px(0) || $css["normal"]["height"] > maxbuttons_strip_px(0))
|
32 |
{
|
33 |
+
$css["normal"]["display"] = "inline-block";
|
34 |
}
|
35 |
*/
|
36 |
+
|
37 |
return $css;
|
38 |
}
|
39 |
|
40 |
public function map_fields($map)
|
41 |
{
|
42 |
$map = parent::map_fields($map);
|
|
|
|
|
|
|
43 |
|
44 |
+
$map["button_width"]["func"] = "updateDimension";
|
45 |
+
$map["button_height"]["func"] = "updateDimension";
|
46 |
+
|
47 |
+
return $map;
|
48 |
+
|
49 |
}
|
50 |
+
|
51 |
|
52 |
public function admin_fields()
|
53 |
{
|
54 |
return;
|
55 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
} // admin_fields
|
|
|
|
|
57 |
|
58 |
+
|
59 |
+
|
60 |
+
} // class
|
61 |
|
62 |
?>
|
blocks/icon.php
CHANGED
@@ -22,12 +22,13 @@ class iconBlock extends maxBlock
|
|
22 |
),
|
23 |
"icon_url" => array('default' => '',
|
24 |
'css' => ''),
|
|
|
25 |
/*"background_url" => array('default' => '',
|
26 |
'css' => 'background-image',
|
27 |
), */
|
28 |
/* "icon_alt" => array('default' => '',
|
29 |
'css' => ''),
|
30 |
-
*/
|
31 |
|
32 |
"icon_position" => array('default' => 'left',
|
33 |
'css' => 'text-align',
|
@@ -71,9 +72,36 @@ class iconBlock extends maxBlock
|
|
71 |
$url = $css["maxbutton"]["normal"]["background-image"];
|
72 |
$css["maxbutton"]["normal"]["background-image"] = "url($url)";
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
print_R($css["maxbutton"]);
|
76 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
if (isset($css[$csspart][$csspseudo]["text-align"]) && $css[$csspart][$csspseudo]["text-align"] != '')
|
79 |
{
|
@@ -95,8 +123,7 @@ class iconBlock extends maxBlock
|
|
95 |
}
|
96 |
}
|
97 |
|
98 |
-
|
99 |
-
return $css;
|
100 |
}
|
101 |
|
102 |
public function parse_button($domObj, $mode = 'normal')
|
@@ -105,7 +132,9 @@ class iconBlock extends maxBlock
|
|
105 |
if (count($data) == 0)
|
106 |
return $domObj; // no icons present here.
|
107 |
|
108 |
-
|
|
|
|
|
109 |
|
110 |
$icon_url = $data["icon_url"];
|
111 |
$use_fa_icon= $data["use_fa_icon"];
|
@@ -123,7 +152,8 @@ class iconBlock extends maxBlock
|
|
123 |
}
|
124 |
else
|
125 |
{
|
126 |
-
|
|
|
127 |
}
|
128 |
if ($position == 'bottom')
|
129 |
$anchor->innertext = $anchor->innertext . $anchor_text;
|
22 |
),
|
23 |
"icon_url" => array('default' => '',
|
24 |
'css' => ''),
|
25 |
+
'icon_size' => array('default' => '',),
|
26 |
/*"background_url" => array('default' => '',
|
27 |
'css' => 'background-image',
|
28 |
), */
|
29 |
/* "icon_alt" => array('default' => '',
|
30 |
'css' => ''),
|
31 |
+
*/
|
32 |
|
33 |
"icon_position" => array('default' => 'left',
|
34 |
'css' => 'text-align',
|
72 |
$url = $css["maxbutton"]["normal"]["background-image"];
|
73 |
$css["maxbutton"]["normal"]["background-image"] = "url($url)";
|
74 |
|
75 |
+
} if (isset($css[$csspart][$csspseudo]["text-align"]) && $css[$csspart][$csspseudo]["text-align"] != '')
|
76 |
+
{
|
77 |
+
switch( $css[$csspart][$csspseudo]["text-align"])
|
78 |
+
{
|
79 |
+
case "left":
|
80 |
+
$css[$csspart][$csspseudo]["float"] = 'left';
|
81 |
+
unset($css[$csspart][$csspseudo]["text-align"]);
|
82 |
+
break;
|
83 |
+
case "right":
|
84 |
+
$css[$csspart][$csspseudo]["float"] = 'right';
|
85 |
+
unset($css[$csspart][$csspseudo]["text-align"]);
|
86 |
+
|
87 |
+
break;
|
88 |
+
case "top":
|
89 |
+
case "bottom":
|
90 |
+
$css[$csspart][$csspseudo]["text-align"] = 'center';
|
91 |
+
break;
|
92 |
+
}
|
93 |
}
|
94 |
print_R($css["maxbutton"]);
|
95 |
*/
|
96 |
+
$css = $this->parse_rule_textalign($css, 'mb-icon', 'normal');
|
97 |
+
|
98 |
+
|
99 |
+
return $css;
|
100 |
+
}
|
101 |
+
|
102 |
+
/* Parse text align rule. Used for alignment of images and icons. In seperate function since it needs to process different pseudo's */
|
103 |
+
public function parse_rule_textalign($css, $csspart, $csspseudo)
|
104 |
+
{
|
105 |
|
106 |
if (isset($css[$csspart][$csspseudo]["text-align"]) && $css[$csspart][$csspseudo]["text-align"] != '')
|
107 |
{
|
123 |
}
|
124 |
}
|
125 |
|
126 |
+
return $css;
|
|
|
127 |
}
|
128 |
|
129 |
public function parse_button($domObj, $mode = 'normal')
|
132 |
if (count($data) == 0)
|
133 |
return $domObj; // no icons present here.
|
134 |
|
135 |
+
//$button_id = $this->data["id"];
|
136 |
+
|
137 |
+
$icon_id = isset($data['icon_id']) ? $data['icon_id'] : 0;
|
138 |
|
139 |
$icon_url = $data["icon_url"];
|
140 |
$use_fa_icon= $data["use_fa_icon"];
|
152 |
}
|
153 |
else
|
154 |
{
|
155 |
+
$icon_alt = get_post_meta( $icon_id, '_wp_attachment_image_alt', true );
|
156 |
+
$anchor_text = '<span class="mb-icon "><img src="' . $data["icon_url"] . '" alt="' . $icon_alt . '" border="0" /></span>' ;
|
157 |
}
|
158 |
if ($position == 'bottom')
|
159 |
$anchor->innertext = $anchor->innertext . $anchor_text;
|
blocks/text.php
CHANGED
@@ -19,10 +19,7 @@ class textBlock extends maxBlock
|
|
19 |
"font_size" => array("default" => "15px",
|
20 |
"css" => "font-size",
|
21 |
"csspart" => 'mb-text' ),
|
22 |
-
|
23 |
-
"css" => "font_size_unit",
|
24 |
-
"csspart" => "mb-text",
|
25 |
-
), */
|
26 |
"text_align" => array(
|
27 |
"default" => "center",
|
28 |
"css" => "text-align",
|
19 |
"font_size" => array("default" => "15px",
|
20 |
"css" => "font-size",
|
21 |
"csspart" => 'mb-text' ),
|
22 |
+
|
|
|
|
|
|
|
23 |
"text_align" => array(
|
24 |
"default" => "center",
|
25 |
"css" => "text-align",
|
blocks/tpl/color.tpl
CHANGED
@@ -3,5 +3,5 @@
|
|
3 |
<div class="input mbcolor %%name%%" {if:conditional}data-show="%%conditional%%"{/if:conditional}>
|
4 |
|
5 |
<input type="text" name="%%name%%" id="%%id%%" class="color-field" value="%%value%%">
|
6 |
-
{if:copycolor} <div class="arrows %%copypos%%" data-id="%%id%%" data-bind="%%bindto%%"><div class='right'><span class='arrow-right' title='%%right_title%%'></div><div class='left'><span class='arrow-left' title='%%left_title%%'></div></div> {/if:copycolor}
|
7 |
</div>
|
3 |
<div class="input mbcolor %%name%%" {if:conditional}data-show="%%conditional%%"{/if:conditional}>
|
4 |
|
5 |
<input type="text" name="%%name%%" id="%%id%%" class="color-field" value="%%value%%">
|
6 |
+
{if:copycolor} <div class="arrows %%copypos%%" data-id="%%id%%" data-bind="%%bindto%%"><div class='right'><span class='arrow-right' title='%%right_title%%'></div><div class='left'><span class='arrow-left' title='%%left_title%%'></div></div> {/if:copycolor}
|
7 |
</div>
|
blocks/tpl/start.tpl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
<!-- start -->
|
2 |
-
<div class="%%main_class%% %%name%%" {if:start_conditional}data
|
3 |
{if:note}<p class='note'>%%note%%</p>{/if:note}
|
1 |
<!-- start -->
|
2 |
+
<div class="%%main_class%% %%name%%" {if:start_conditional}data-%%start_cond_type%%="%%start_conditional%%"{/if:start_conditional}>
|
3 |
{if:note}<p class='note'>%%note%%</p>{/if:note}
|
classes/field.php
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
-
<?php
|
2 |
-
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
|
5 |
class maxField
|
6 |
{
|
7 |
|
8 |
/* Static class variables */
|
9 |
-
static $templates = '';
|
10 |
-
static $position = 0;
|
11 |
|
12 |
-
/* Field data */
|
13 |
-
public $id;
|
14 |
-
public $name;
|
15 |
public $value = '';
|
16 |
-
|
17 |
/* Layout options */
|
18 |
-
public $note;
|
19 |
public $label;
|
20 |
-
public $title;
|
21 |
public $default;
|
22 |
|
23 |
-
// Specific options */
|
24 |
public $placeholder = ''; // text / textarea
|
25 |
public $icon; // checkbox-icon
|
26 |
public $checked = ''; // checkbox / radio
|
@@ -28,92 +28,99 @@ class maxField
|
|
28 |
public $before_input; // text
|
29 |
public $content = ''; // generic / spacer
|
30 |
public $min; // number
|
31 |
-
|
32 |
-
/* Border radius */
|
33 |
-
public $radius_tl;
|
34 |
-
public $radius_tr;
|
35 |
-
public $radius_bl, $radius_br;
|
36 |
-
|
37 |
-
//
|
38 |
-
|
39 |
-
|
40 |
-
public $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
public $main_class = 'option'; // row class - start template
|
42 |
-
public $esc_function = 'esc_attr';
|
43 |
-
|
44 |
/* Publish brake */
|
45 |
-
public $publish = true;
|
46 |
-
public $output = '';
|
47 |
-
|
48 |
-
public function __construct($template = 'text', $args = array() )
|
49 |
{
|
50 |
-
self::$position++;
|
51 |
-
$this->template = $template;
|
52 |
-
|
53 |
-
foreach($args as $item => $value)
|
54 |
{
|
55 |
$this->{$item} = $value;
|
56 |
-
|
57 |
}
|
58 |
-
}
|
59 |
-
|
60 |
-
static function setTemplates($templates)
|
61 |
{
|
62 |
-
self::$templates = $templates;
|
63 |
-
|
64 |
}
|
65 |
-
|
66 |
-
|
67 |
-
public function setDefault($default)
|
68 |
{
|
69 |
-
$this->default = __('Default:','maxbuttons') . ' ' . $default;
|
70 |
-
|
71 |
}
|
72 |
-
|
73 |
/** Output field interface
|
74 |
-
*
|
75 |
-
* @param $start_tpl Prepend a template before this field ( e.g. row defition )
|
76 |
* @param $end_tpl Append a template after this field
|
77 |
*/
|
78 |
-
|
79 |
-
public function output($start_tpl = '', $end_tpl = '')
|
80 |
{
|
81 |
-
if ($this->esc_function)
|
82 |
{
|
83 |
-
$this->value = call_user_func($this->esc_function, $this->value);
|
84 |
}
|
85 |
-
|
86 |
-
$output = '';
|
87 |
-
if ($start_tpl != '')
|
88 |
{
|
89 |
$start_tpl = self::$templates[$start_tpl];
|
90 |
$output .= simpleTemplate::parse($start_tpl['path'], $this);
|
91 |
}
|
92 |
|
93 |
-
$template = self::$templates[$this->template]; // template name;
|
94 |
do_action('mb/editor/before-field-' . $this->id, $this);
|
95 |
-
|
96 |
-
$output .= simpleTemplate::parse($template['path'], $this);
|
97 |
-
|
98 |
|
99 |
-
|
|
|
|
|
|
|
100 |
{
|
101 |
if (! is_array($end_tpl))
|
102 |
$end_tpl = array($end_tpl);
|
103 |
-
|
104 |
foreach($end_tpl as $tpl)
|
105 |
{
|
106 |
$tpl = self::$templates[$tpl];
|
107 |
$output .= simpleTemplate::parse($tpl['path'], $this);
|
108 |
}
|
109 |
}
|
110 |
-
|
111 |
-
if ($this->publish)
|
112 |
-
echo $output;
|
113 |
-
do_action('mb/editor/after-field-'. $this->id); // hook for extra fields.
|
114 |
|
115 |
$this->output = $output;
|
116 |
-
return $output;
|
117 |
}
|
118 |
|
119 |
|
1 |
+
<?php
|
2 |
+
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
|
5 |
class maxField
|
6 |
{
|
7 |
|
8 |
/* Static class variables */
|
9 |
+
static $templates = '';
|
10 |
+
static $position = 0;
|
11 |
|
12 |
+
/* Field data */
|
13 |
+
public $id;
|
14 |
+
public $name;
|
15 |
public $value = '';
|
16 |
+
|
17 |
/* Layout options */
|
18 |
+
public $note;
|
19 |
public $label;
|
20 |
+
public $title;
|
21 |
public $default;
|
22 |
|
23 |
+
// Specific options */
|
24 |
public $placeholder = ''; // text / textarea
|
25 |
public $icon; // checkbox-icon
|
26 |
public $checked = ''; // checkbox / radio
|
28 |
public $before_input; // text
|
29 |
public $content = ''; // generic / spacer
|
30 |
public $min; // number
|
31 |
+
|
32 |
+
/* Border radius */
|
33 |
+
public $radius_tl;
|
34 |
+
public $radius_tr;
|
35 |
+
public $radius_bl, $radius_br;
|
36 |
+
|
37 |
+
// conditionals
|
38 |
+
public $start_conditional; // conditional defined in start.tpl / row start
|
39 |
+
public $start_cond_type = 'show'; // show / has conditional
|
40 |
+
public $conditional;
|
41 |
+
|
42 |
+
//public
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
/* Template */
|
47 |
+
public $template;
|
48 |
public $main_class = 'option'; // row class - start template
|
49 |
+
public $esc_function = 'esc_attr';
|
50 |
+
|
51 |
/* Publish brake */
|
52 |
+
public $publish = true;
|
53 |
+
public $output = '';
|
54 |
+
|
55 |
+
public function __construct($template = 'text', $args = array() )
|
56 |
{
|
57 |
+
self::$position++;
|
58 |
+
$this->template = $template;
|
59 |
+
|
60 |
+
foreach($args as $item => $value)
|
61 |
{
|
62 |
$this->{$item} = $value;
|
63 |
+
|
64 |
}
|
65 |
+
}
|
66 |
+
|
67 |
+
static function setTemplates($templates)
|
68 |
{
|
69 |
+
self::$templates = apply_filters('mb/editor/templates', $templates);
|
70 |
+
|
71 |
}
|
72 |
+
|
73 |
+
|
74 |
+
public function setDefault($default)
|
75 |
{
|
76 |
+
$this->default = __('Default:','maxbuttons') . ' ' . $default;
|
77 |
+
|
78 |
}
|
79 |
+
|
80 |
/** Output field interface
|
81 |
+
*
|
82 |
+
* @param $start_tpl Prepend a template before this field ( e.g. row defition )
|
83 |
* @param $end_tpl Append a template after this field
|
84 |
*/
|
85 |
+
|
86 |
+
public function output($start_tpl = '', $end_tpl = '')
|
87 |
{
|
88 |
+
if ($this->esc_function)
|
89 |
{
|
90 |
+
$this->value = call_user_func($this->esc_function, $this->value);
|
91 |
}
|
92 |
+
|
93 |
+
$output = '';
|
94 |
+
if ($start_tpl != '')
|
95 |
{
|
96 |
$start_tpl = self::$templates[$start_tpl];
|
97 |
$output .= simpleTemplate::parse($start_tpl['path'], $this);
|
98 |
}
|
99 |
|
100 |
+
$template = self::$templates[$this->template]; // template name;
|
101 |
do_action('mb/editor/before-field-' . $this->id, $this);
|
|
|
|
|
|
|
102 |
|
103 |
+
$output .= simpleTemplate::parse($template['path'], $this);
|
104 |
+
|
105 |
+
|
106 |
+
if ($end_tpl != '')
|
107 |
{
|
108 |
if (! is_array($end_tpl))
|
109 |
$end_tpl = array($end_tpl);
|
110 |
+
|
111 |
foreach($end_tpl as $tpl)
|
112 |
{
|
113 |
$tpl = self::$templates[$tpl];
|
114 |
$output .= simpleTemplate::parse($tpl['path'], $this);
|
115 |
}
|
116 |
}
|
117 |
+
|
118 |
+
if ($this->publish)
|
119 |
+
echo $output;
|
120 |
+
do_action('mb/editor/after-field-'. $this->id); // hook for extra fields.
|
121 |
|
122 |
$this->output = $output;
|
123 |
+
return $output;
|
124 |
}
|
125 |
|
126 |
|
js/maxbuttons-admin.js
CHANGED
@@ -623,8 +623,7 @@ maxAdmin.prototype.initConditionials = function ()
|
|
623 |
if ( $('[name="' + target + '"]').length > 1) // trigger change to test condition
|
624 |
{
|
625 |
// this statement doesn't work in MBPRO for some reason
|
626 |
-
|
627 |
-
$('[name="' + target + '"]:checked').change(); // radio button
|
628 |
|
629 |
}
|
630 |
else {
|
@@ -640,6 +639,8 @@ maxAdmin.prototype.initConditionials = function ()
|
|
640 |
|
641 |
$(document).on('change', '[name="' + target + '"]', {target: target, child: this, values: values}, $.proxy(mAP.updateHasConditional, mAP) );
|
642 |
|
|
|
|
|
643 |
});
|
644 |
|
645 |
|
@@ -684,7 +685,6 @@ maxAdmin.prototype.updateConditional = function (event)
|
|
684 |
|
685 |
maxAdmin.prototype.updateHasConditional = function(event)
|
686 |
{
|
687 |
-
|
688 |
var mAP = this;
|
689 |
var data = event.data;
|
690 |
|
@@ -702,11 +702,10 @@ maxAdmin.prototype.updateHasConditional = function(event)
|
|
702 |
if (cond_values.indexOf(target_val) >= 0)
|
703 |
{
|
704 |
hascond = true;
|
705 |
-
return
|
706 |
}
|
707 |
});
|
708 |
|
709 |
-
|
710 |
if (hascond)
|
711 |
{
|
712 |
$(cond_child).fadeIn('fast');
|
623 |
if ( $('[name="' + target + '"]').length > 1) // trigger change to test condition
|
624 |
{
|
625 |
// this statement doesn't work in MBPRO for some reason
|
626 |
+
$('[name="' + target + '"]:checked').change(['conditional']); // radio button
|
|
|
627 |
|
628 |
}
|
629 |
else {
|
639 |
|
640 |
$(document).on('change', '[name="' + target + '"]', {target: target, child: this, values: values}, $.proxy(mAP.updateHasConditional, mAP) );
|
641 |
|
642 |
+
$('[name="' + target + '"]').trigger('change', ['conditional']);
|
643 |
+
|
644 |
});
|
645 |
|
646 |
|
685 |
|
686 |
maxAdmin.prototype.updateHasConditional = function(event)
|
687 |
{
|
|
|
688 |
var mAP = this;
|
689 |
var data = event.data;
|
690 |
|
702 |
if (cond_values.indexOf(target_val) >= 0)
|
703 |
{
|
704 |
hascond = true;
|
705 |
+
return false;
|
706 |
}
|
707 |
});
|
708 |
|
|
|
709 |
if (hascond)
|
710 |
{
|
711 |
$(cond_child).fadeIn('fast');
|
js/maxmodal.js
CHANGED
@@ -224,13 +224,12 @@ jQuery(document).ready(function($) {
|
|
224 |
else
|
225 |
this.setHeight = false;
|
226 |
|
227 |
-
|
228 |
var title = $(data).find('.title').text();
|
229 |
var controls = $(data).find('.controls').html();
|
230 |
var content = $(data).find('.content').html();
|
231 |
|
232 |
this.newModal(id);
|
233 |
-
this.setTitle(title)
|
234 |
this.setContent(content);
|
235 |
this.setControls(controls);
|
236 |
|
224 |
else
|
225 |
this.setHeight = false;
|
226 |
|
|
|
227 |
var title = $(data).find('.title').text();
|
228 |
var controls = $(data).find('.controls').html();
|
229 |
var content = $(data).find('.content').html();
|
230 |
|
231 |
this.newModal(id);
|
232 |
+
this.setTitle(title);
|
233 |
this.setContent(content);
|
234 |
this.setControls(controls);
|
235 |
|
js/min/maxbuttons-admin.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var maxAdmin;jQuery(document).ready(function($){maxAdmin=function(){return this},maxAdmin.prototype={colorUpdateTime:!0,fields:null,button_id:null,form_updated:!1,tabs:null},maxAdmin.prototype.init=function(){this.button_id=$('input[name="button_id"]').val(),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault()}),$(document).on("click",".output .preview-toggle",$.proxy(this.toggle_preview,this)),$("#maxbuttons .input-paging").on("change",$.proxy(this.do_paging,this)),$(".manual-toggle").on("click",$.proxy(this.toggleManual,this)),$(".manual-entry").draggable({cancel:"p, li"}),$(document).on("submit","form.mb_ajax_save",$.proxy(this.formAjaxSave,this)),$(document).on("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)),$("input").not(".color-field").on("keyup change",$.proxy(this.update_preview,this)),$("input.color-field").on("focus",$.proxy(this.select_field,this)),$("select").on("change",$.proxy(this.update_preview,this)),$(window).on("beforeunload",$.proxy(function(){if(this.form_updated)return maxcol_wp.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(e){e.preventDefault(),this.saveIndicator(!0);var target=$(e.target),field=$(target).data("field");if(void 0===field)var id=$(target).attr("id");else var id=field;var data=this.fields[id];void 0!==data&&(void 0!==data.css&&(value=target.val(),void 0!==data.css_unit&&-1==value.indexOf(data.css_unit)&&(value+=data.css_unit),target.is(":checkbox")&&!target.is(":checked")&&(value=""),this.putCSS(data,value)),void 0!==data.attr&&$(".output .result").find("a").attr(data.attr,target.val()),void 0!==data.func&&eval("this."+data.func+"(target)"))},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=mb_ajax.ajaxurl,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()),d=parseInt($("#gradient_end_opacity"+a).val());if(o||(i=n,d=r),isNaN(r)&&(r=100),isNaN(d)&&(d=100),t)s=$(".output .result").find("a.hover");else var s=$(".output .result").find("a.normal");s.css("background","linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+d/100+") )"),s.css("background","-moz-linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+d/100+") )"),s.css("background","-o-linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+d/100+") )"),s.css("background","-webkit-gradient(linear, left top, left bottom, color-stop("+e+"%, rgba("+n+","+r/100+")), color-stop(1, rgba("+i+","+d/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(),d=$(t).attr("id"),s=this.fields[d];s.css="textShadow";var l=e+"px "+o+"px "+n+"px "+i;this.putCSS(s,l,"normal"),l=e+"px "+o+"px "+n+"px "+r,this.putCSS(s,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').change():$('[name="'+e+'"]').trigger("change",["conditional"])}),$("[data-has]").each(function(){var a=$(this).data("has"),e=a.target,o=a.values;$(document).on("change",'[name="'+e+'"]',{target:e,child:this,values:o},$.proxy(t.updateHasConditional,t))})},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=!1;$('[name="'+n+'"]').each(function(){var t=$(this).val();if(e.indexOf(t)>=0)return i=!0,!0}),i?$(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 |
+
var maxAdmin;jQuery(document).ready(function($){maxAdmin=function(){return this},maxAdmin.prototype={colorUpdateTime:!0,fields:null,button_id:null,form_updated:!1,tabs:null},maxAdmin.prototype.init=function(){this.button_id=$('input[name="button_id"]').val(),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault()}),$(document).on("click",".output .preview-toggle",$.proxy(this.toggle_preview,this)),$("#maxbuttons .input-paging").on("change",$.proxy(this.do_paging,this)),$(".manual-toggle").on("click",$.proxy(this.toggleManual,this)),$(".manual-entry").draggable({cancel:"p, li"}),$(document).on("submit","form.mb_ajax_save",$.proxy(this.formAjaxSave,this)),$(document).on("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)),$("input").not(".color-field").on("keyup change",$.proxy(this.update_preview,this)),$("input.color-field").on("focus",$.proxy(this.select_field,this)),$("select").on("change",$.proxy(this.update_preview,this)),$(window).on("beforeunload",$.proxy(function(){if(this.form_updated)return maxcol_wp.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(e){e.preventDefault(),this.saveIndicator(!0);var target=$(e.target),field=$(target).data("field");if(void 0===field)var id=$(target).attr("id");else var id=field;var data=this.fields[id];void 0!==data&&(void 0!==data.css&&(value=target.val(),void 0!==data.css_unit&&-1==value.indexOf(data.css_unit)&&(value+=data.css_unit),target.is(":checkbox")&&!target.is(":checked")&&(value=""),this.putCSS(data,value)),void 0!==data.attr&&$(".output .result").find("a").attr(data.attr,target.val()),void 0!==data.func&&eval("this."+data.func+"(target)"))},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=mb_ajax.ajaxurl,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()),d=parseInt($("#gradient_end_opacity"+a).val());if(o||(i=n,d=r),isNaN(r)&&(r=100),isNaN(d)&&(d=100),t)s=$(".output .result").find("a.hover");else var s=$(".output .result").find("a.normal");s.css("background","linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+d/100+") )"),s.css("background","-moz-linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+d/100+") )"),s.css("background","-o-linear-gradient( rgba("+n+","+r/100+") "+e+"%, rgba("+i+","+d/100+") )"),s.css("background","-webkit-gradient(linear, left top, left bottom, color-stop("+e+"%, rgba("+n+","+r/100+")), color-stop(1, rgba("+i+","+d/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(),d=$(t).attr("id"),s=this.fields[d];s.css="textShadow";var l=e+"px "+o+"px "+n+"px "+i;this.putCSS(s,l,"normal"),l=e+"px "+o+"px "+n+"px "+r,this.putCSS(s,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').change(["conditional"]):$('[name="'+e+'"]').trigger("change",["conditional"])}),$("[data-has]").each(function(){var a=$(this).data("has"),e=a.target,o=a.values;$(document).on("change",'[name="'+e+'"]',{target:e,child:this,values:o},$.proxy(t.updateHasConditional,t)),$('[name="'+e+'"]').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=!1;$('[name="'+n+'"]').each(function(){var t=$(this).val();if(e.indexOf(t)>=0)return i=!0,!1}),i?$(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())}});
|
maxbuttons.php
CHANGED
@@ -3,22 +3,22 @@
|
|
3 |
Plugin Name: MaxButtons
|
4 |
Plugin URI: http://maxbuttons.com
|
5 |
Description: The best WordPress button generator. This is the free version; the Pro version <a href="http://maxbuttons.com/?ref=mbfree">can be found here</a>.
|
6 |
-
Version: 6.
|
7 |
Author: Max Foundry
|
8 |
Author URI: http://maxfoundry.com
|
9 |
Text Domain: maxbuttons
|
10 |
Domain Path: /languages
|
11 |
|
12 |
-
Copyright
|
13 |
*/
|
14 |
namespace MaxButtons;
|
15 |
|
16 |
if (! defined('MAXBUTTONS_ROOT_FILE'))
|
17 |
define("MAXBUTTONS_ROOT_FILE", __FILE__);
|
18 |
if (! defined('MAXBUTTONS_VERSION_NUM'))
|
19 |
-
define('MAXBUTTONS_VERSION_NUM', '6.
|
20 |
|
21 |
-
define('MAXBUTTONS_RELEASE',"
|
22 |
|
23 |
|
24 |
if (! function_exists('MaxButtons\maxbutton_double_load'))
|
3 |
Plugin Name: MaxButtons
|
4 |
Plugin URI: http://maxbuttons.com
|
5 |
Description: The best WordPress button generator. This is the free version; the Pro version <a href="http://maxbuttons.com/?ref=mbfree">can be found here</a>.
|
6 |
+
Version: 6.26
|
7 |
Author: Max Foundry
|
8 |
Author URI: http://maxfoundry.com
|
9 |
Text Domain: maxbuttons
|
10 |
Domain Path: /languages
|
11 |
|
12 |
+
Copyright 2018 Max Foundry, LLC (http://maxfoundry.com)
|
13 |
*/
|
14 |
namespace MaxButtons;
|
15 |
|
16 |
if (! defined('MAXBUTTONS_ROOT_FILE'))
|
17 |
define("MAXBUTTONS_ROOT_FILE", __FILE__);
|
18 |
if (! defined('MAXBUTTONS_VERSION_NUM'))
|
19 |
+
define('MAXBUTTONS_VERSION_NUM', '6.26');
|
20 |
|
21 |
+
define('MAXBUTTONS_RELEASE',"05 Jan 2017");
|
22 |
|
23 |
|
24 |
if (! function_exists('MaxButtons\maxbutton_double_load'))
|
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.0
|
5 |
-
Tested up to: 4.9
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 6.
|
8 |
|
9 |
WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
|
10 |
|
@@ -245,6 +245,12 @@ This depends on the slider plugin you are using. Most of the well-known ones are
|
|
245 |
|
246 |
== Changelog ==
|
247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
= 6.25 =
|
249 |
|
250 |
* New setting for extra URL Schemes
|
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.0
|
5 |
+
Tested up to: 4.9.1
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 6.26
|
8 |
|
9 |
WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
|
10 |
|
245 |
|
246 |
== Changelog ==
|
247 |
|
248 |
+
= 6.26 =
|
249 |
+
|
250 |
+
* Technical maintenance
|
251 |
+
* Tested up to 4.9.1.
|
252 |
+
* Fixed interface issue with conditional Javascript for sharing plugin
|
253 |
+
|
254 |
= 6.25 =
|
255 |
|
256 |
* New setting for extra URL Schemes
|