Version Description
- New setting for extra URL Schemes
- Small layout color picker fix
- Renamed button title to tooltip for clarity
- Rename empty font setting to 'site default' for clarity
Download this release
Release Info
Developer | basszje |
Plugin | WordPress Button Plugin MaxButtons |
Version | 6.25 |
Comparing to | |
See all releases |
Code changes from version 6.24 to 6.25
- assets/css/style.css +1 -1
- assets/scss/_editor.scss +135 -134
- assets/scss/_elements.scss +1 -1
- blocks/basic.php +65 -46
- blocks/border.php +43 -12
- blocks/icon.php +103 -104
- classes/admin-class.php +57 -2
- classes/maxbuttons-class.php +339 -338
- includes/maxbuttons-button.php +104 -101
- includes/maxbuttons-settings.php +156 -147
- maxbuttons.php +3 -3
- readme.txt +9 -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 .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{padding-top:10px}#maxbuttons .option-container .inside .option.text_color label:nth-of-type(2){margin-left:51px}#maxbuttons .option-container .inside .option.description label{padding-top:35px}#maxbuttons .option-container .inside .option .radius-wrap{position:relative;margin-left:45px;display:inline-block}#maxbuttons .option-container .inside .option.radius .label:first-child{width:100px;float:left}#maxbuttons .option-container .inside .option.radius .bottom,#maxbuttons .option-container .inside .option.radius .top{position:relative}#maxbuttons .option-container .inside .option.radius .bottom .input,#maxbuttons .option-container .inside .option.radius .top .input{margin-right:0;margin-left:0}#maxbuttons .option-container .inside .option.radius .bottom .dashicons:nth-child(3),#maxbuttons .option-container .inside .option.radius .top .dashicons:nth-child(3){margin-right:10px}#maxbuttons .option-container .inside .option.radius .top{margin-bottom:10px}#maxbuttons .option-container .inside .option.radius label{display:inline-block;font-weight:700;width:90px;margin-left:5px;cursor:default}#maxbuttons .option-container .inside .option.radius .dashicons{font-size:35px;height:35px;width:35px;color:#ccc}#maxbuttons .option-container .inside .option.radius .top .dashicons{margin-top:-5px}#maxbuttons .option-container .inside .option.radius .bottom .dashicons{margin-top:5px}#maxbuttons .option-container .inside .option.radius #radius_toggle{position:absolute;left:46%;top:25px;font-size:30px;cursor:pointer}#maxbuttons .option-container .inside .option.gradient_head .label:nth-child(even){width:120px}#maxbuttons .option-container .inside .option .gradient_end_color,#maxbuttons .option-container .inside .option .gradient_end_color_hover{margin-left:58px}#maxbuttons .default{display:inline-block;padding-left:10px;padding-top:4px;font-style:italic;color:#808080}#maxbuttons .default .other{padding-left:40px;padding-top:8px}#maxbuttons .mb-button{width:38px;height:38px;background-color:#eceded;display:inline-block;margin-right:6px;cursor:pointer;display:none}#maxbuttons .mb-button span{text-align:center;padding:9px 0;width:100%;line-height:20px}#maxbuttons .check_button{display:none}#maxbuttons .check_button+label{background-position:center center;background-repeat:no-repeat;background-color:#fff;display:inline-block;border:1px solid #ddd;font_weight:normal;padding:4px}@media (max-width: 780px){#maxbuttons .check_button+label{padding:10px}}#maxbuttons .check_button.text+label{padding:5px}#maxbuttons .check_button.icon+label i{width:20px;height:20px;color:#545454}#maxbuttons .check_button.icon+label i:focus{outline:none}#maxbuttons .check_button:checked+label{background:#ebebeb none repeat scroll 0 0;border-color:#999999;box-shadow:0 2px 5px -3px rgba(0,0,0,0.3) inset}#maxbuttons .option .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}#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/scss/_editor.scss
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
// expand screen to full width
|
3 |
&.maxbuttons-controller-edit .main,
|
4 |
&.maxbuttons-controller-button .main {
|
5 |
-
width: auto;
|
6 |
max-width: 1200px;
|
7 |
}
|
8 |
|
@@ -11,47 +11,47 @@
|
|
11 |
border: solid 1px #cccccc;
|
12 |
@include border-radius(3px,3px,3px,3px);
|
13 |
background-color: #fff;
|
14 |
-
|
15 |
-
.title {
|
16 |
-
|
17 |
font-size: 18px;
|
18 |
padding: 9px 8px 9px 10px;
|
19 |
text-align: left;
|
20 |
text-shadow: 0px 1px 0px #ffffff;
|
21 |
position: relative;
|
22 |
}
|
23 |
-
.section-title {
|
24 |
-
padding: 15px;
|
25 |
margin-top: 10px;
|
26 |
font-weight: 700;
|
27 |
font-size: 16px;
|
28 |
}
|
29 |
|
30 |
// new struct layout
|
31 |
-
.section-title {
|
32 |
-
background-color: #fff;
|
33 |
-
|
34 |
}
|
35 |
-
|
36 |
-
// Used @ social sharing
|
37 |
-
.option-list {
|
38 |
-
//float: left;
|
39 |
display: inline-block;
|
40 |
-
&:after { clear: both; }
|
41 |
.help {
|
42 |
float: right;
|
43 |
margin-top: 5px;
|
44 |
}
|
45 |
}
|
46 |
|
47 |
-
.help {
|
48 |
-
|
49 |
-
position: relative;
|
50 |
-
width: 18px;
|
51 |
-
height: 18px;
|
52 |
font-size: 18px;
|
53 |
-
margin-left: 10px;
|
54 |
-
|
55 |
span {
|
56 |
font-family: "Open Sans",sans-serif;
|
57 |
font-size: 12px;
|
@@ -60,46 +60,48 @@
|
|
60 |
position: absolute;
|
61 |
display: none;
|
62 |
padding: 10px 5px;
|
63 |
-
top: -7px;
|
64 |
left: 25px;
|
65 |
min-width: 150px;
|
66 |
border-radius: 5px;
|
67 |
text-align: center;
|
68 |
z-index: 1000; // above all
|
69 |
-
border: 1px solid #ccc;
|
70 |
line-height: 15px;
|
71 |
-
|
72 |
}
|
73 |
-
&:hover span {
|
74 |
-
display: block;
|
75 |
}
|
76 |
}
|
77 |
-
}
|
78 |
-
|
79 |
-
|
80 |
.option-container > .inside {
|
81 |
padding: 10px 15px 10px 15px;
|
82 |
border-top: solid 1px #cccccc;
|
83 |
background-color: #ffffff;
|
84 |
-
|
85 |
// option-design should dissapear
|
86 |
// option finetuning in elements.scss
|
87 |
.option, .option-design {
|
88 |
margin-bottom: 10px;
|
89 |
-
display: block;
|
90 |
-
position: relative;
|
91 |
-
|
92 |
-
|
|
|
|
|
93 |
.label, > label{
|
94 |
display: inline-block;
|
95 |
font-weight: bold;
|
96 |
padding-left: 3px;
|
97 |
padding-top: 5px;
|
98 |
width: 145px;
|
99 |
-
vertical-align: top;
|
100 |
-
cursor: default;
|
101 |
-
min-height: 25px;
|
102 |
-
&[for]
|
103 |
{
|
104 |
cursor:pointer; // show label with for as link ( focus on field )
|
105 |
}
|
@@ -107,53 +109,53 @@
|
|
107 |
{
|
108 |
font-size: 14px;
|
109 |
}
|
110 |
-
}
|
111 |
|
112 |
|
113 |
-
&:after, &:before { clear: both; }
|
114 |
}
|
115 |
-
// new stuff
|
116 |
.option {
|
117 |
// note that nth targets elements, not classes so nth
|
118 |
-
label {
|
119 |
margin-top: 2px;
|
120 |
&.mbcolor { margin-top: 5px; }
|
121 |
}
|
122 |
-
|
123 |
-
label:nth-of-type(2) {
|
124 |
margin-left: 30px;
|
125 |
width: 115px;
|
126 |
-
}
|
127 |
.control-group {
|
128 |
display: inline-block;
|
129 |
}
|
130 |
-
.rotate-left { @include rotate(-45); }
|
131 |
-
.rotate-right { @include rotate(45); }
|
132 |
}
|
133 |
}
|
134 |
-
|
135 |
-
|
136 |
.option-design {
|
137 |
margin-bottom: 10px;
|
138 |
|
139 |
-
|
140 |
.input td div.cell-label {
|
141 |
padding: 1px 10px 0px 5px;
|
142 |
font-weight: bold;
|
143 |
border-bottom: solid 1px #d1d1d1;
|
144 |
width: 180px;
|
145 |
font-size: 13px;
|
146 |
-
height: 30px;
|
147 |
-
|
148 |
// For expirations of tables
|
149 |
-
//&:before { content: 'table cell'; color: #ff0000; }
|
150 |
}
|
151 |
.default-other { // default text
|
152 |
font-size: 13px;
|
153 |
}
|
154 |
/* Gone with tables
|
155 |
-
th, td.label {
|
156 |
-
font-size: 13px;
|
157 |
} */
|
158 |
}
|
159 |
|
@@ -172,42 +174,42 @@
|
|
172 |
|
173 |
|
174 |
|
175 |
-
.mb-message.shortcode {
|
176 |
.expanded {
|
177 |
display: none;
|
178 |
.example {
|
179 |
-
strong { width: 300px;
|
180 |
display: inline-block;
|
181 |
-
}
|
182 |
-
|
183 |
}
|
184 |
}
|
185 |
.shortcode-expand {
|
186 |
-
//float: right;
|
187 |
-
clear: both;
|
188 |
-
font-weight: 700;
|
189 |
display: block;
|
190 |
margin: 5px 0;
|
191 |
-
|
192 |
cursor: pointer;
|
193 |
-
@include bp(1024)
|
194 |
{
|
195 |
float: none;
|
196 |
text-align: left;
|
197 |
margin: 10px 0;
|
198 |
display: block;
|
199 |
}
|
200 |
-
}
|
201 |
}
|
202 |
|
203 |
.manual-box
|
204 |
{
|
205 |
float: right;
|
206 |
-
margin: 3px 15px;
|
207 |
top: 0;
|
208 |
right: 0;
|
209 |
|
210 |
-
a {
|
211 |
text-align:center;
|
212 |
width: 100%;
|
213 |
background: #e0e0e0 none repeat scroll 0 0;
|
@@ -222,21 +224,21 @@
|
|
222 |
|
223 |
}
|
224 |
}
|
225 |
-
|
226 |
-
.manual-entry {
|
227 |
display: none;
|
228 |
-
|
229 |
-
position: absolute;
|
230 |
border: 1px solid $c-border-dark;
|
231 |
background: rgba(255,255,255,1);
|
232 |
-
|
233 |
width: 45%;
|
234 |
right: 25px;
|
235 |
z-index: 199;
|
236 |
box-sizing: border-box;
|
237 |
padding-bottom: 20px;
|
238 |
-
|
239 |
-
h3 {
|
240 |
font-size: 18px;
|
241 |
width: calc(100%);
|
242 |
box-sizing: border-box;
|
@@ -246,29 +248,29 @@
|
|
246 |
margin: 0;
|
247 |
padding-right: 35px;
|
248 |
position: relative;
|
249 |
-
|
250 |
-
|
251 |
-
span {
|
252 |
box-sizing: border-box;
|
253 |
cursor: pointer;
|
254 |
width: 35px;
|
255 |
height: 100%;
|
256 |
font-size: 25px;
|
257 |
display: inline-block;
|
258 |
-
position: absolute;
|
259 |
right: 5px;
|
260 |
top: 0;
|
261 |
padding-top: 8px;
|
262 |
}
|
263 |
}
|
264 |
-
|
265 |
-
h4, p, ol, ul {
|
266 |
padding: 0 15px;
|
267 |
}
|
268 |
h4 { font-size: 16px; }
|
269 |
-
p { font-size: 13px; }
|
270 |
-
|
271 |
-
|
272 |
}
|
273 |
|
274 |
/* Preview window */
|
@@ -284,8 +286,8 @@
|
|
284 |
min-width: 300px;
|
285 |
@include bp(780) {
|
286 |
@include box-shadow(0,0,0,0);
|
287 |
-
top: 0;
|
288 |
-
left: 0;
|
289 |
right: 0;
|
290 |
position: relative;
|
291 |
margin-bottom: 15px;
|
@@ -309,21 +311,21 @@
|
|
309 |
position: absolute;
|
310 |
top: 3px;
|
311 |
right: 0;
|
312 |
-
|
313 |
}
|
314 |
-
}
|
315 |
.inner {
|
316 |
padding: 5px;
|
317 |
p {
|
318 |
|
319 |
padding: 5px 0 5px 5px;
|
320 |
}
|
321 |
-
}
|
322 |
-
.input.mbcolor {
|
323 |
float: left;
|
324 |
position: relative;
|
325 |
margin-top: 5px;
|
326 |
-
|
327 |
.wp-picker-container.wp-picker-active {
|
328 |
padding: 15px;
|
329 |
border: 1px solid #ccc;
|
@@ -333,7 +335,7 @@
|
|
333 |
left: -270px;
|
334 |
z-index: 102;
|
335 |
@include box-shadow(4px, 1px, 5px, #ccc);
|
336 |
-
}
|
337 |
}
|
338 |
.note {
|
339 |
float: left;
|
@@ -345,21 +347,21 @@
|
|
345 |
p {
|
346 |
padding: 5px 0px 5px 0px;
|
347 |
margin: 0;
|
348 |
-
}
|
349 |
&.preview-border-box > * {
|
350 |
-
box-sizing: border-box;
|
351 |
-
}
|
352 |
-
}
|
353 |
-
} // output
|
|
|
354 |
|
355 |
|
356 |
-
|
357 |
|
358 |
/* Conditionals */
|
359 |
-
.conditional-option { display: none; }
|
360 |
|
361 |
/* Media queries interface */
|
362 |
-
.media_query {
|
363 |
|
364 |
width: 640px;
|
365 |
margin: 0 20px 15px 0;
|
@@ -367,13 +369,13 @@
|
|
367 |
padding: 10px 15px;
|
368 |
display: inline-block;
|
369 |
clear: both;
|
370 |
-
|
371 |
position: relative;
|
372 |
|
373 |
-
.removebutton {
|
374 |
position: absolute;
|
375 |
-
right: 10px;
|
376 |
-
top: 10px;
|
377 |
cursor: pointer;
|
378 |
z-index: 100; // prevent label overlap;
|
379 |
padding: 10px 5px; // easier click
|
@@ -383,17 +385,17 @@
|
|
383 |
clear: both;
|
384 |
}
|
385 |
.label {
|
386 |
-
clear: both;
|
387 |
margin-bottom: 15px;
|
388 |
-
}
|
389 |
label.title {
|
390 |
-
padding: 0;
|
391 |
-
font-size: 20px;
|
392 |
}
|
393 |
.custom .label, .custom .input {
|
394 |
//float: left;
|
395 |
}
|
396 |
-
.custom.hidden { display: none; }
|
397 |
.option.custom label:nth-of-type(2)
|
398 |
{
|
399 |
margin-left: 95px;
|
@@ -404,55 +406,55 @@
|
|
404 |
//min-height: 45px;
|
405 |
}
|
406 |
select { width: 60px; }
|
407 |
-
.input input {
|
408 |
-
//min-height: 22px;
|
409 |
-
//min-width:40px;
|
410 |
margin-top: 0px;
|
411 |
//height: 28px;
|
412 |
padding-top: 2px;
|
413 |
-
}
|
414 |
-
|
415 |
-
} // media_query
|
416 |
|
417 |
-
.option-container .media_query label {
|
418 |
//display: block;
|
419 |
//font-size:16px;
|
420 |
//text-align: center;
|
421 |
// cursor: default;
|
422 |
}
|
423 |
-
|
424 |
-
.media_queries_options .new-query {
|
425 |
-
margin-top: 25px;
|
426 |
-
select {
|
427 |
width: auto;
|
428 |
}
|
429 |
}
|
430 |
-
|
431 |
-
|
432 |
.media_option_prot, #media_desc {
|
433 |
display: none;
|
434 |
}
|
435 |
|
436 |
// The warning layout for the copy button dialog
|
437 |
-
.copy-warning {
|
438 |
width: 400px;
|
439 |
-
margin: 0 auto;
|
440 |
position: relative;
|
441 |
line-height: 1.1;
|
442 |
|
443 |
&:before {
|
444 |
content: "\f534";
|
445 |
-
font-size: 40px;
|
446 |
-
color: #ff0000;
|
447 |
-
width: 35px;
|
448 |
-
height: 35px;
|
449 |
-
font-family: "Dashicons";
|
450 |
-
position: absolute;
|
451 |
-
left: 20px;
|
452 |
-
top: 40%;
|
453 |
margin-top: -14px;
|
454 |
}
|
455 |
-
|
456 |
.example {
|
457 |
margin-bottom: 5px;
|
458 |
}
|
@@ -462,7 +464,7 @@
|
|
462 |
|
463 |
.form-actions {
|
464 |
@extend .button-bar;
|
465 |
-
|
466 |
/* margin-top: 15px;
|
467 |
margin-bottom: 15px;
|
468 |
padding-bottom: 15px;
|
@@ -471,4 +473,3 @@
|
|
471 |
margin-right: 10px;
|
472 |
}
|
473 |
}
|
474 |
-
|
2 |
// expand screen to full width
|
3 |
&.maxbuttons-controller-edit .main,
|
4 |
&.maxbuttons-controller-button .main {
|
5 |
+
width: auto;
|
6 |
max-width: 1200px;
|
7 |
}
|
8 |
|
11 |
border: solid 1px #cccccc;
|
12 |
@include border-radius(3px,3px,3px,3px);
|
13 |
background-color: #fff;
|
14 |
+
|
15 |
+
.title {
|
16 |
+
|
17 |
font-size: 18px;
|
18 |
padding: 9px 8px 9px 10px;
|
19 |
text-align: left;
|
20 |
text-shadow: 0px 1px 0px #ffffff;
|
21 |
position: relative;
|
22 |
}
|
23 |
+
.section-title {
|
24 |
+
padding: 15px;
|
25 |
margin-top: 10px;
|
26 |
font-weight: 700;
|
27 |
font-size: 16px;
|
28 |
}
|
29 |
|
30 |
// new struct layout
|
31 |
+
.section-title {
|
32 |
+
background-color: #fff;
|
33 |
+
|
34 |
}
|
35 |
+
|
36 |
+
// Used @ social sharing
|
37 |
+
.option-list {
|
38 |
+
//float: left;
|
39 |
display: inline-block;
|
40 |
+
&:after { clear: both; }
|
41 |
.help {
|
42 |
float: right;
|
43 |
margin-top: 5px;
|
44 |
}
|
45 |
}
|
46 |
|
47 |
+
.help {
|
48 |
+
|
49 |
+
position: relative;
|
50 |
+
width: 18px;
|
51 |
+
height: 18px;
|
52 |
font-size: 18px;
|
53 |
+
margin-left: 10px;
|
54 |
+
|
55 |
span {
|
56 |
font-family: "Open Sans",sans-serif;
|
57 |
font-size: 12px;
|
60 |
position: absolute;
|
61 |
display: none;
|
62 |
padding: 10px 5px;
|
63 |
+
top: -7px;
|
64 |
left: 25px;
|
65 |
min-width: 150px;
|
66 |
border-radius: 5px;
|
67 |
text-align: center;
|
68 |
z-index: 1000; // above all
|
69 |
+
border: 1px solid #ccc;
|
70 |
line-height: 15px;
|
71 |
+
|
72 |
}
|
73 |
+
&:hover span {
|
74 |
+
display: block;
|
75 |
}
|
76 |
}
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
.option-container > .inside {
|
81 |
padding: 10px 15px 10px 15px;
|
82 |
border-top: solid 1px #cccccc;
|
83 |
background-color: #ffffff;
|
84 |
+
|
85 |
// option-design should dissapear
|
86 |
// option finetuning in elements.scss
|
87 |
.option, .option-design {
|
88 |
margin-bottom: 10px;
|
89 |
+
display: block;
|
90 |
+
position: relative;
|
91 |
+
&.hidden {
|
92 |
+
display: none;
|
93 |
+
}
|
94 |
+
// dot label on it's way out as well
|
95 |
.label, > label{
|
96 |
display: inline-block;
|
97 |
font-weight: bold;
|
98 |
padding-left: 3px;
|
99 |
padding-top: 5px;
|
100 |
width: 145px;
|
101 |
+
vertical-align: top;
|
102 |
+
cursor: default;
|
103 |
+
min-height: 25px;
|
104 |
+
&[for]
|
105 |
{
|
106 |
cursor:pointer; // show label with for as link ( focus on field )
|
107 |
}
|
109 |
{
|
110 |
font-size: 14px;
|
111 |
}
|
112 |
+
}
|
113 |
|
114 |
|
115 |
+
&:after, &:before { clear: both; }
|
116 |
}
|
117 |
+
// new stuff
|
118 |
.option {
|
119 |
// note that nth targets elements, not classes so nth
|
120 |
+
label {
|
121 |
margin-top: 2px;
|
122 |
&.mbcolor { margin-top: 5px; }
|
123 |
}
|
124 |
+
|
125 |
+
label:nth-of-type(2) {
|
126 |
margin-left: 30px;
|
127 |
width: 115px;
|
128 |
+
}
|
129 |
.control-group {
|
130 |
display: inline-block;
|
131 |
}
|
132 |
+
.rotate-left { @include rotate(-45); }
|
133 |
+
.rotate-right { @include rotate(45); }
|
134 |
}
|
135 |
}
|
136 |
+
|
137 |
+
|
138 |
.option-design {
|
139 |
margin-bottom: 10px;
|
140 |
|
141 |
+
|
142 |
.input td div.cell-label {
|
143 |
padding: 1px 10px 0px 5px;
|
144 |
font-weight: bold;
|
145 |
border-bottom: solid 1px #d1d1d1;
|
146 |
width: 180px;
|
147 |
font-size: 13px;
|
148 |
+
height: 30px;
|
149 |
+
|
150 |
// For expirations of tables
|
151 |
+
//&:before { content: 'table cell'; color: #ff0000; }
|
152 |
}
|
153 |
.default-other { // default text
|
154 |
font-size: 13px;
|
155 |
}
|
156 |
/* Gone with tables
|
157 |
+
th, td.label {
|
158 |
+
font-size: 13px;
|
159 |
} */
|
160 |
}
|
161 |
|
174 |
|
175 |
|
176 |
|
177 |
+
.mb-message.shortcode {
|
178 |
.expanded {
|
179 |
display: none;
|
180 |
.example {
|
181 |
+
strong { width: 300px;
|
182 |
display: inline-block;
|
183 |
+
}
|
184 |
+
|
185 |
}
|
186 |
}
|
187 |
.shortcode-expand {
|
188 |
+
//float: right;
|
189 |
+
clear: both;
|
190 |
+
font-weight: 700;
|
191 |
display: block;
|
192 |
margin: 5px 0;
|
193 |
+
|
194 |
cursor: pointer;
|
195 |
+
@include bp(1024)
|
196 |
{
|
197 |
float: none;
|
198 |
text-align: left;
|
199 |
margin: 10px 0;
|
200 |
display: block;
|
201 |
}
|
202 |
+
}
|
203 |
}
|
204 |
|
205 |
.manual-box
|
206 |
{
|
207 |
float: right;
|
208 |
+
margin: 3px 15px;
|
209 |
top: 0;
|
210 |
right: 0;
|
211 |
|
212 |
+
a {
|
213 |
text-align:center;
|
214 |
width: 100%;
|
215 |
background: #e0e0e0 none repeat scroll 0 0;
|
224 |
|
225 |
}
|
226 |
}
|
227 |
+
|
228 |
+
.manual-entry {
|
229 |
display: none;
|
230 |
+
|
231 |
+
position: absolute;
|
232 |
border: 1px solid $c-border-dark;
|
233 |
background: rgba(255,255,255,1);
|
234 |
+
|
235 |
width: 45%;
|
236 |
right: 25px;
|
237 |
z-index: 199;
|
238 |
box-sizing: border-box;
|
239 |
padding-bottom: 20px;
|
240 |
+
|
241 |
+
h3 {
|
242 |
font-size: 18px;
|
243 |
width: calc(100%);
|
244 |
box-sizing: border-box;
|
248 |
margin: 0;
|
249 |
padding-right: 35px;
|
250 |
position: relative;
|
251 |
+
|
252 |
+
|
253 |
+
span {
|
254 |
box-sizing: border-box;
|
255 |
cursor: pointer;
|
256 |
width: 35px;
|
257 |
height: 100%;
|
258 |
font-size: 25px;
|
259 |
display: inline-block;
|
260 |
+
position: absolute;
|
261 |
right: 5px;
|
262 |
top: 0;
|
263 |
padding-top: 8px;
|
264 |
}
|
265 |
}
|
266 |
+
|
267 |
+
h4, p, ol, ul {
|
268 |
padding: 0 15px;
|
269 |
}
|
270 |
h4 { font-size: 16px; }
|
271 |
+
p { font-size: 13px; }
|
272 |
+
|
273 |
+
|
274 |
}
|
275 |
|
276 |
/* Preview window */
|
286 |
min-width: 300px;
|
287 |
@include bp(780) {
|
288 |
@include box-shadow(0,0,0,0);
|
289 |
+
top: 0;
|
290 |
+
left: 0;
|
291 |
right: 0;
|
292 |
position: relative;
|
293 |
margin-bottom: 15px;
|
311 |
position: absolute;
|
312 |
top: 3px;
|
313 |
right: 0;
|
314 |
+
|
315 |
}
|
316 |
+
}
|
317 |
.inner {
|
318 |
padding: 5px;
|
319 |
p {
|
320 |
|
321 |
padding: 5px 0 5px 5px;
|
322 |
}
|
323 |
+
}
|
324 |
+
.input.mbcolor {
|
325 |
float: left;
|
326 |
position: relative;
|
327 |
margin-top: 5px;
|
328 |
+
|
329 |
.wp-picker-container.wp-picker-active {
|
330 |
padding: 15px;
|
331 |
border: 1px solid #ccc;
|
335 |
left: -270px;
|
336 |
z-index: 102;
|
337 |
@include box-shadow(4px, 1px, 5px, #ccc);
|
338 |
+
}
|
339 |
}
|
340 |
.note {
|
341 |
float: left;
|
347 |
p {
|
348 |
padding: 5px 0px 5px 0px;
|
349 |
margin: 0;
|
350 |
+
}
|
351 |
&.preview-border-box > * {
|
352 |
+
box-sizing: border-box;
|
353 |
+
}
|
354 |
+
}
|
355 |
+
} // output
|
356 |
+
|
357 |
|
358 |
|
|
|
359 |
|
360 |
/* Conditionals */
|
361 |
+
.conditional-option { display: none; }
|
362 |
|
363 |
/* Media queries interface */
|
364 |
+
.media_query {
|
365 |
|
366 |
width: 640px;
|
367 |
margin: 0 20px 15px 0;
|
369 |
padding: 10px 15px;
|
370 |
display: inline-block;
|
371 |
clear: both;
|
372 |
+
|
373 |
position: relative;
|
374 |
|
375 |
+
.removebutton {
|
376 |
position: absolute;
|
377 |
+
right: 10px;
|
378 |
+
top: 10px;
|
379 |
cursor: pointer;
|
380 |
z-index: 100; // prevent label overlap;
|
381 |
padding: 10px 5px; // easier click
|
385 |
clear: both;
|
386 |
}
|
387 |
.label {
|
388 |
+
clear: both;
|
389 |
margin-bottom: 15px;
|
390 |
+
}
|
391 |
label.title {
|
392 |
+
padding: 0;
|
393 |
+
font-size: 20px;
|
394 |
}
|
395 |
.custom .label, .custom .input {
|
396 |
//float: left;
|
397 |
}
|
398 |
+
.custom.hidden { display: none; }
|
399 |
.option.custom label:nth-of-type(2)
|
400 |
{
|
401 |
margin-left: 95px;
|
406 |
//min-height: 45px;
|
407 |
}
|
408 |
select { width: 60px; }
|
409 |
+
.input input {
|
410 |
+
//min-height: 22px;
|
411 |
+
//min-width:40px;
|
412 |
margin-top: 0px;
|
413 |
//height: 28px;
|
414 |
padding-top: 2px;
|
415 |
+
}
|
416 |
+
|
417 |
+
} // media_query
|
418 |
|
419 |
+
.option-container .media_query label {
|
420 |
//display: block;
|
421 |
//font-size:16px;
|
422 |
//text-align: center;
|
423 |
// cursor: default;
|
424 |
}
|
425 |
+
|
426 |
+
.media_queries_options .new-query {
|
427 |
+
margin-top: 25px;
|
428 |
+
select {
|
429 |
width: auto;
|
430 |
}
|
431 |
}
|
432 |
+
|
433 |
+
|
434 |
.media_option_prot, #media_desc {
|
435 |
display: none;
|
436 |
}
|
437 |
|
438 |
// The warning layout for the copy button dialog
|
439 |
+
.copy-warning {
|
440 |
width: 400px;
|
441 |
+
margin: 0 auto;
|
442 |
position: relative;
|
443 |
line-height: 1.1;
|
444 |
|
445 |
&:before {
|
446 |
content: "\f534";
|
447 |
+
font-size: 40px;
|
448 |
+
color: #ff0000;
|
449 |
+
width: 35px;
|
450 |
+
height: 35px;
|
451 |
+
font-family: "Dashicons";
|
452 |
+
position: absolute;
|
453 |
+
left: 20px;
|
454 |
+
top: 40%;
|
455 |
margin-top: -14px;
|
456 |
}
|
457 |
+
|
458 |
.example {
|
459 |
margin-bottom: 5px;
|
460 |
}
|
464 |
|
465 |
.form-actions {
|
466 |
@extend .button-bar;
|
467 |
+
|
468 |
/* margin-top: 15px;
|
469 |
margin-bottom: 15px;
|
470 |
padding-bottom: 15px;
|
473 |
margin-right: 10px;
|
474 |
}
|
475 |
}
|
|
assets/scss/_elements.scss
CHANGED
@@ -163,7 +163,7 @@ textarea {
|
|
163 |
}
|
164 |
|
165 |
}
|
166 |
-
&.text_color label {
|
167 |
&.text_color label:nth-of-type(2) { margin-left: 51px; }
|
168 |
&.description label { padding-top: 35px; }
|
169 |
|
163 |
}
|
164 |
|
165 |
}
|
166 |
+
&.text_color label { margin-top: 0px; }
|
167 |
&.text_color label:nth-of-type(2) { margin-left: 51px; }
|
168 |
&.description label { padding-top: 35px; }
|
169 |
|
blocks/basic.php
CHANGED
@@ -18,12 +18,19 @@ class basicBlock extends maxBlock
|
|
18 |
"new_window" => array("default" => 0),
|
19 |
"nofollow" => array("default" => 0)
|
20 |
);
|
21 |
-
protected $protocols = array("http","https",'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'sms', 'callto', 'fax', 'xmpp', "javascript", 'file', 'ms-windows-store', 'steam'); // allowed url protocols for esc_url functions
|
22 |
|
23 |
|
24 |
function __construct()
|
25 |
{
|
26 |
parent::__construct();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
28 |
|
29 |
|
@@ -50,8 +57,6 @@ class basicBlock extends maxBlock
|
|
50 |
|
51 |
}
|
52 |
|
53 |
-
|
54 |
-
|
55 |
public function save_fields($data, $post)
|
56 |
{
|
57 |
// Possible solution:
|
@@ -133,9 +138,7 @@ class basicBlock extends maxBlock
|
|
133 |
return true;
|
134 |
}
|
135 |
}
|
136 |
-
|
137 |
return false;
|
138 |
-
|
139 |
}
|
140 |
|
141 |
public function parse_button($domObj, $mode = 'normal')
|
@@ -195,17 +198,9 @@ class basicBlock extends maxBlock
|
|
195 |
|
196 |
public function admin_fields()
|
197 |
{
|
198 |
-
//parent::admin_fields();
|
199 |
|
200 |
-
|
201 |
-
|
202 |
-
/*foreach($this->fields as $field => $options)
|
203 |
-
{
|
204 |
-
$default = (isset($options["default"])) ? $options["default"] : '';
|
205 |
-
${$field} = (isset($data[$field])) ? $data[$field] : $default;
|
206 |
-
|
207 |
-
} */
|
208 |
-
$icon_url = MB()->get_plugin_url() . 'images/icons/' ;
|
209 |
?>
|
210 |
|
211 |
<div class="mb_tab option-container mb_tab">
|
@@ -223,8 +218,9 @@ class basicBlock extends maxBlock
|
|
223 |
$field_name->id = 'name';
|
224 |
$field_name->name = $field_name->id;
|
225 |
$field_name->placeholder = __("Button Name","maxbuttons");
|
226 |
-
|
227 |
|
|
|
228 |
|
229 |
// URL
|
230 |
$field_url = new maxField();
|
@@ -235,14 +231,16 @@ class basicBlock extends maxBlock
|
|
235 |
$field_url->placeholder = __("http://","maxbuttons");
|
236 |
$field_url->name = $field_url->id;
|
237 |
|
238 |
-
|
|
|
239 |
|
240 |
// Spacer
|
241 |
$fspacer = new maxField('spacer');
|
242 |
$fspacer->name = 'url_options';
|
243 |
$fspacer->label = ' ';
|
244 |
-
|
245 |
|
|
|
246 |
|
247 |
// New Window
|
248 |
$fwindow = new maxField('checkbox');
|
@@ -253,10 +251,8 @@ class basicBlock extends maxBlock
|
|
253 |
//$fwindow->inputclass = 'check_button';
|
254 |
$fwindow->checked = checked( maxBlocks::getValue('new_window'), 1, false);
|
255 |
|
256 |
-
|
257 |
-
|
258 |
-
//$fspacer->name ='rel_options';
|
259 |
-
//$fspacer->output('start');
|
260 |
|
261 |
// NoRel
|
262 |
$ffollow = new maxField('checkbox');
|
@@ -266,17 +262,18 @@ class basicBlock extends maxBlock
|
|
266 |
$ffollow->id = $ffollow->name;
|
267 |
$ffollow->checked = checked( maxBlocks::getValue('nofollow'), 1, false);
|
268 |
|
269 |
-
|
270 |
-
|
271 |
// TITLE
|
272 |
|
273 |
$field_title = new maxField();
|
274 |
-
$field_title->label = __('Button
|
275 |
$field_title->name = 'link_title'; // title is too generic
|
276 |
$field_title->id = $field_title->name;
|
277 |
$field_title->value = maxBlocks::getValue('link_title');
|
278 |
|
279 |
-
|
|
|
280 |
|
281 |
// TEXT
|
282 |
$field_text = new maxField();
|
@@ -285,7 +282,8 @@ class basicBlock extends maxBlock
|
|
285 |
$field_text->id = 'text';
|
286 |
$field_text->value = maxBlocks::getValue('text') ;
|
287 |
|
288 |
-
|
|
|
289 |
|
290 |
// FONTS
|
291 |
$fonts = MB()->getClass('admin')->loadFonts();
|
@@ -297,7 +295,8 @@ class basicBlock extends maxBlock
|
|
297 |
$field_font->value= maxBlocks::getValue('font');
|
298 |
$field_font->content = maxUtils::selectify($field_font->name, $fonts, $field_font->value);
|
299 |
|
300 |
-
|
|
|
301 |
?>
|
302 |
|
303 |
<?php
|
@@ -315,7 +314,8 @@ class basicBlock extends maxBlock
|
|
315 |
$field_size->value = maxUtils::strip_px(maxBlocks::getValue('font_size'));
|
316 |
//$field_size->content = maxUtils::selectify($field_size->name, $sizes, $field_size->value, '', 'small');
|
317 |
|
318 |
-
|
|
|
319 |
|
320 |
// Font style checkboxes
|
321 |
$fweight = new maxField('checkbox');
|
@@ -327,7 +327,8 @@ class basicBlock extends maxBlock
|
|
327 |
$fweight->inputclass = 'check_button icon';
|
328 |
$fweight->checked = checked( maxBlocks::getValue('font_weight'), 'bold', false);
|
329 |
|
330 |
-
|
|
|
331 |
|
332 |
$fstyle = new maxField('checkbox');
|
333 |
$fstyle->icon = 'dashicons-editor-italic';
|
@@ -338,8 +339,8 @@ class basicBlock extends maxBlock
|
|
338 |
$fstyle->inputclass = 'check_button icon';
|
339 |
$fstyle->checked = checked( maxBlocks::getValue('font_style'), 'italic', false);
|
340 |
|
341 |
-
|
342 |
-
|
343 |
|
344 |
$falign_left = new maxField('radio');
|
345 |
$falign_left->icon = 'dashicons-editor-alignleft';
|
@@ -350,7 +351,8 @@ class basicBlock extends maxBlock
|
|
350 |
$falign_left->inputclass = 'check_button icon';
|
351 |
$falign_left->checked = checked ( maxblocks::getValue('text_align'), 'left', false);
|
352 |
|
353 |
-
|
|
|
354 |
|
355 |
$falign_center = new maxField('radio');
|
356 |
$falign_center->icon = 'dashicons-editor-aligncenter';
|
@@ -361,7 +363,8 @@ class basicBlock extends maxBlock
|
|
361 |
$falign_center->inputclass = 'check_button icon';
|
362 |
$falign_center->checked = checked( maxblocks::getValue('text_align'), 'center', false);
|
363 |
|
364 |
-
|
|
|
365 |
|
366 |
$falign_right = new maxField('radio');
|
367 |
$falign_right->icon = 'dashicons-editor-alignright';
|
@@ -372,7 +375,8 @@ class basicBlock extends maxBlock
|
|
372 |
$falign_right->inputclass = 'check_button icon';
|
373 |
$falign_right->checked = checked( maxblocks::getValue('text_align'), 'right', false);
|
374 |
|
375 |
-
|
|
|
376 |
|
377 |
// Padding - trouble
|
378 |
$ptop = new maxField('number');
|
@@ -384,7 +388,8 @@ class basicBlock extends maxBlock
|
|
384 |
$ptop->before_input = '<img src="' . $icon_url . 'p_top.png" title="' . __("Padding Top","maxbuttons") . '" >';
|
385 |
$ptop->value = maxUtils::strip_px(maxBlocks::getValue('padding_top'));
|
386 |
|
387 |
-
|
|
|
388 |
|
389 |
$pright = new maxField('number');
|
390 |
$pright->id = 'padding_right';
|
@@ -394,7 +399,8 @@ class basicBlock extends maxBlock
|
|
394 |
$pright->before_input = '<img src="' . $icon_url . 'p_right.png" class="icon padding" title="' . __("Padding Right","maxbuttons") . '" >';
|
395 |
$pright->value = maxUtils::strip_px(maxBlocks::getValue('padding_right'));
|
396 |
|
397 |
-
|
|
|
398 |
|
399 |
$pbottom = new maxField('number');
|
400 |
$pbottom->id = 'padding_bottom';
|
@@ -404,7 +410,8 @@ class basicBlock extends maxBlock
|
|
404 |
$pbottom->before_input = '<img src="' . $icon_url . 'p_bottom.png" class="icon padding" title="' . __("Padding Bottom","maxbuttons") . '" >';
|
405 |
$pbottom->value = maxUtils::strip_px(maxBlocks::getValue('padding_bottom'));
|
406 |
|
407 |
-
|
|
|
408 |
|
409 |
$pleft = new maxField('number');
|
410 |
$pleft->id = 'padding_left';
|
@@ -414,7 +421,8 @@ class basicBlock extends maxBlock
|
|
414 |
$pleft->before_input = '<img src="' . $icon_url . 'p_left.png" class="icon padding" title="' . __("Padding Left","maxbuttons") . '" >';
|
415 |
$pleft->value = maxUtils::strip_px(maxBlocks::getValue('padding_left'));
|
416 |
|
417 |
-
|
|
|
418 |
|
419 |
|
420 |
// Text Color
|
@@ -428,7 +436,9 @@ class basicBlock extends maxBlock
|
|
428 |
$fcolor->copypos = 'right';
|
429 |
$fcolor->right_title = $color_copy_move;
|
430 |
$fcolor->left_title = $color_copy_self;
|
431 |
-
|
|
|
|
|
432 |
|
433 |
// Text Color Hover
|
434 |
$fcolor_hover = new maxField('color');
|
@@ -440,8 +450,10 @@ class basicBlock extends maxBlock
|
|
440 |
$fcolor_hover->bindto = $fcolor->id;
|
441 |
$fcolor_hover->copypos = 'left';
|
442 |
$fcolor_hover->right_title = $color_copy_self;
|
443 |
-
$fcolor_hover->left_title = $color_copy_move;
|
444 |
-
|
|
|
|
|
445 |
|
446 |
// Dimension : width
|
447 |
$field_width = new maxField('number');
|
@@ -451,7 +463,9 @@ class basicBlock extends maxBlock
|
|
451 |
$field_width->inputclass = 'small';
|
452 |
$field_width->min = 0;
|
453 |
$field_width->value= maxUtils::strip_px(maxBlocks::getValue('button_width')); // strippx?
|
454 |
-
|
|
|
|
|
455 |
|
456 |
// Dimension : height
|
457 |
$field_height = new maxField('number');
|
@@ -461,7 +475,9 @@ class basicBlock extends maxBlock
|
|
461 |
$field_height->inputclass = 'small';
|
462 |
$field_height->min = 0;
|
463 |
$field_height->value= maxUtils::strip_px(maxBlocks::getValue('button_height')); // strippx?
|
464 |
-
|
|
|
|
|
465 |
|
466 |
// Description
|
467 |
$description_hide = get_option('maxbuttons_hidedescription');
|
@@ -476,9 +492,12 @@ class basicBlock extends maxBlock
|
|
476 |
$field_desc->esc_function = 'esc_textarea';
|
477 |
$field_desc->value = maxBlocks::getValue('description') ;
|
478 |
$field_desc->placeholder = __('Brief explanation about how and where the button is used.','maxbuttons');
|
479 |
-
|
480 |
|
481 |
-
|
|
|
|
|
|
|
482 |
|
483 |
|
484 |
</div>
|
18 |
"new_window" => array("default" => 0),
|
19 |
"nofollow" => array("default" => 0)
|
20 |
);
|
21 |
+
protected $protocols = array("http","https",'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'sms', 'callto', 'fax', 'xmpp', "javascript", 'file', 'ms-windows-store', 'steam', 'webcal'); // allowed url protocols for esc_url functions
|
22 |
|
23 |
|
24 |
function __construct()
|
25 |
{
|
26 |
parent::__construct();
|
27 |
+
$extra_protocols = get_option('maxbuttons_protocol');
|
28 |
+
$extra_protocols = array_map('trim', array_filter(explode(',', $extra_protocols)));
|
29 |
+
|
30 |
+
if (is_array($extra_protocols) && count($extra_protocols) > 0)
|
31 |
+
{
|
32 |
+
$this->protocols = array_merge($this->protocols, $extra_protocols);
|
33 |
+
}
|
34 |
}
|
35 |
|
36 |
|
57 |
|
58 |
}
|
59 |
|
|
|
|
|
60 |
public function save_fields($data, $post)
|
61 |
{
|
62 |
// Possible solution:
|
138 |
return true;
|
139 |
}
|
140 |
}
|
|
|
141 |
return false;
|
|
|
142 |
}
|
143 |
|
144 |
public function parse_button($domObj, $mode = 'normal')
|
198 |
|
199 |
public function admin_fields()
|
200 |
{
|
|
|
201 |
|
202 |
+
$icon_url = MB()->get_plugin_url() . 'images/icons/';
|
203 |
+
$admin = MB()->getClass('admin');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
?>
|
205 |
|
206 |
<div class="mb_tab option-container mb_tab">
|
218 |
$field_name->id = 'name';
|
219 |
$field_name->name = $field_name->id;
|
220 |
$field_name->placeholder = __("Button Name","maxbuttons");
|
221 |
+
// $field_name->output('start','end');
|
222 |
|
223 |
+
$admin->addField($field_name, 'start', 'end');
|
224 |
|
225 |
// URL
|
226 |
$field_url = new maxField();
|
231 |
$field_url->placeholder = __("http://","maxbuttons");
|
232 |
$field_url->name = $field_url->id;
|
233 |
|
234 |
+
//$field_url->output('start','end');
|
235 |
+
$admin->addField($field_url,'start', 'end');
|
236 |
|
237 |
// Spacer
|
238 |
$fspacer = new maxField('spacer');
|
239 |
$fspacer->name = 'url_options';
|
240 |
$fspacer->label = ' ';
|
241 |
+
// $fspacer->output('start');
|
242 |
|
243 |
+
$admin->addField($fspacer, 'start');
|
244 |
|
245 |
// New Window
|
246 |
$fwindow = new maxField('checkbox');
|
251 |
//$fwindow->inputclass = 'check_button';
|
252 |
$fwindow->checked = checked( maxBlocks::getValue('new_window'), 1, false);
|
253 |
|
254 |
+
//$fwindow->output('','');
|
255 |
+
$admin->addField($fwindow);
|
|
|
|
|
256 |
|
257 |
// NoRel
|
258 |
$ffollow = new maxField('checkbox');
|
262 |
$ffollow->id = $ffollow->name;
|
263 |
$ffollow->checked = checked( maxBlocks::getValue('nofollow'), 1, false);
|
264 |
|
265 |
+
//$ffollow->output('','end');
|
266 |
+
$admin->addField($ffollow, '','end');
|
267 |
// TITLE
|
268 |
|
269 |
$field_title = new maxField();
|
270 |
+
$field_title->label = __('Button Tooltip', 'maxbuttons');
|
271 |
$field_title->name = 'link_title'; // title is too generic
|
272 |
$field_title->id = $field_title->name;
|
273 |
$field_title->value = maxBlocks::getValue('link_title');
|
274 |
|
275 |
+
//$field_title->output('start','end');
|
276 |
+
$admin->addField($field_title, 'start', 'end');
|
277 |
|
278 |
// TEXT
|
279 |
$field_text = new maxField();
|
282 |
$field_text->id = 'text';
|
283 |
$field_text->value = maxBlocks::getValue('text') ;
|
284 |
|
285 |
+
// $field_text->output('start','end');
|
286 |
+
$admin->addField($field_text, 'start', 'end');
|
287 |
|
288 |
// FONTS
|
289 |
$fonts = MB()->getClass('admin')->loadFonts();
|
295 |
$field_font->value= maxBlocks::getValue('font');
|
296 |
$field_font->content = maxUtils::selectify($field_font->name, $fonts, $field_font->value);
|
297 |
|
298 |
+
//$field_font->output('start');
|
299 |
+
$admin->addField($field_font,'start');
|
300 |
?>
|
301 |
|
302 |
<?php
|
314 |
$field_size->value = maxUtils::strip_px(maxBlocks::getValue('font_size'));
|
315 |
//$field_size->content = maxUtils::selectify($field_size->name, $sizes, $field_size->value, '', 'small');
|
316 |
|
317 |
+
//$field_size->output();
|
318 |
+
$admin->addField($field_size);
|
319 |
|
320 |
// Font style checkboxes
|
321 |
$fweight = new maxField('checkbox');
|
327 |
$fweight->inputclass = 'check_button icon';
|
328 |
$fweight->checked = checked( maxBlocks::getValue('font_weight'), 'bold', false);
|
329 |
|
330 |
+
// $fweight->output('group_start');
|
331 |
+
$admin->addField($fweight, 'group_start');
|
332 |
|
333 |
$fstyle = new maxField('checkbox');
|
334 |
$fstyle->icon = 'dashicons-editor-italic';
|
339 |
$fstyle->inputclass = 'check_button icon';
|
340 |
$fstyle->checked = checked( maxBlocks::getValue('font_style'), 'italic', false);
|
341 |
|
342 |
+
//$fstyle->output('','group_end');
|
343 |
+
$admin->addField($fstyle, '', 'group_end');
|
344 |
|
345 |
$falign_left = new maxField('radio');
|
346 |
$falign_left->icon = 'dashicons-editor-alignleft';
|
351 |
$falign_left->inputclass = 'check_button icon';
|
352 |
$falign_left->checked = checked ( maxblocks::getValue('text_align'), 'left', false);
|
353 |
|
354 |
+
//$falign_left->output('group_start');
|
355 |
+
$admin->addField($falign_left, 'group_start');
|
356 |
|
357 |
$falign_center = new maxField('radio');
|
358 |
$falign_center->icon = 'dashicons-editor-aligncenter';
|
363 |
$falign_center->inputclass = 'check_button icon';
|
364 |
$falign_center->checked = checked( maxblocks::getValue('text_align'), 'center', false);
|
365 |
|
366 |
+
//$falign_center->output();
|
367 |
+
$admin->addField($falign_center);
|
368 |
|
369 |
$falign_right = new maxField('radio');
|
370 |
$falign_right->icon = 'dashicons-editor-alignright';
|
375 |
$falign_right->inputclass = 'check_button icon';
|
376 |
$falign_right->checked = checked( maxblocks::getValue('text_align'), 'right', false);
|
377 |
|
378 |
+
//$falign_right->output('', array('group_end','end') );
|
379 |
+
$admin->addField($falign_right, '', array('group_end','end') );
|
380 |
|
381 |
// Padding - trouble
|
382 |
$ptop = new maxField('number');
|
388 |
$ptop->before_input = '<img src="' . $icon_url . 'p_top.png" title="' . __("Padding Top","maxbuttons") . '" >';
|
389 |
$ptop->value = maxUtils::strip_px(maxBlocks::getValue('padding_top'));
|
390 |
|
391 |
+
//$ptop->output('start');
|
392 |
+
$admin->addField($ptop,'start');
|
393 |
|
394 |
$pright = new maxField('number');
|
395 |
$pright->id = 'padding_right';
|
399 |
$pright->before_input = '<img src="' . $icon_url . 'p_right.png" class="icon padding" title="' . __("Padding Right","maxbuttons") . '" >';
|
400 |
$pright->value = maxUtils::strip_px(maxBlocks::getValue('padding_right'));
|
401 |
|
402 |
+
//$pright->output();
|
403 |
+
$admin->addField($pright);
|
404 |
|
405 |
$pbottom = new maxField('number');
|
406 |
$pbottom->id = 'padding_bottom';
|
410 |
$pbottom->before_input = '<img src="' . $icon_url . 'p_bottom.png" class="icon padding" title="' . __("Padding Bottom","maxbuttons") . '" >';
|
411 |
$pbottom->value = maxUtils::strip_px(maxBlocks::getValue('padding_bottom'));
|
412 |
|
413 |
+
//$pbottom->output();
|
414 |
+
$admin->addField($pbottom);
|
415 |
|
416 |
$pleft = new maxField('number');
|
417 |
$pleft->id = 'padding_left';
|
421 |
$pleft->before_input = '<img src="' . $icon_url . 'p_left.png" class="icon padding" title="' . __("Padding Left","maxbuttons") . '" >';
|
422 |
$pleft->value = maxUtils::strip_px(maxBlocks::getValue('padding_left'));
|
423 |
|
424 |
+
//$pleft->output('','end');
|
425 |
+
$admin->addField($pleft,'', 'end');
|
426 |
|
427 |
|
428 |
// Text Color
|
436 |
$fcolor->copypos = 'right';
|
437 |
$fcolor->right_title = $color_copy_move;
|
438 |
$fcolor->left_title = $color_copy_self;
|
439 |
+
|
440 |
+
// $fcolor->output('start');
|
441 |
+
$admin->addField($fcolor, 'start');
|
442 |
|
443 |
// Text Color Hover
|
444 |
$fcolor_hover = new maxField('color');
|
450 |
$fcolor_hover->bindto = $fcolor->id;
|
451 |
$fcolor_hover->copypos = 'left';
|
452 |
$fcolor_hover->right_title = $color_copy_self;
|
453 |
+
$fcolor_hover->left_title = $color_copy_move;
|
454 |
+
//$fcolor_hover->output('','end');
|
455 |
+
|
456 |
+
$admin->addField($fcolor_hover, '','end');
|
457 |
|
458 |
// Dimension : width
|
459 |
$field_width = new maxField('number');
|
463 |
$field_width->inputclass = 'small';
|
464 |
$field_width->min = 0;
|
465 |
$field_width->value= maxUtils::strip_px(maxBlocks::getValue('button_width')); // strippx?
|
466 |
+
//$field_width->output('start');
|
467 |
+
|
468 |
+
$admin->addField($field_width, 'start');
|
469 |
|
470 |
// Dimension : height
|
471 |
$field_height = new maxField('number');
|
475 |
$field_height->inputclass = 'small';
|
476 |
$field_height->min = 0;
|
477 |
$field_height->value= maxUtils::strip_px(maxBlocks::getValue('button_height')); // strippx?
|
478 |
+
//$field_height->output('','end');
|
479 |
+
|
480 |
+
$admin->addField($field_height, '', 'end');
|
481 |
|
482 |
// Description
|
483 |
$description_hide = get_option('maxbuttons_hidedescription');
|
492 |
$field_desc->esc_function = 'esc_textarea';
|
493 |
$field_desc->value = maxBlocks::getValue('description') ;
|
494 |
$field_desc->placeholder = __('Brief explanation about how and where the button is used.','maxbuttons');
|
495 |
+
//$field_desc->output('start','end');
|
496 |
|
497 |
+
$admin->addField($field_desc, 'start', 'end');
|
498 |
+
|
499 |
+
$admin->display_fields();
|
500 |
+
?>
|
501 |
|
502 |
|
503 |
</div>
|
blocks/border.php
CHANGED
@@ -92,6 +92,9 @@ class borderBlock extends maxBlock
|
|
92 |
|
93 |
$color_copy_self = __("Replace color from other field", "maxbuttons");
|
94 |
$color_copy_move = __("Copy Color to other field", "maxbuttons");
|
|
|
|
|
|
|
95 |
?>
|
96 |
<div class="option-container mb_tab">
|
97 |
<div class="title"><?php _e('Border', 'maxbuttons') ?></div>
|
@@ -103,7 +106,9 @@ class borderBlock extends maxBlock
|
|
103 |
$fspacer = new maxField('spacer');
|
104 |
$fspacer->label = __('Radius','maxbuttons');
|
105 |
$fspacer->name = 'radius';
|
106 |
-
|
|
|
|
|
107 |
|
108 |
// Radius left top
|
109 |
$radius_tleft = new maxField('number');
|
@@ -117,6 +122,8 @@ class borderBlock extends maxBlock
|
|
117 |
$radius_tleft->publish = false;
|
118 |
$rtl = $radius_tleft->output('');
|
119 |
|
|
|
|
|
120 |
// Radius right top
|
121 |
$radius_tright = new maxField('number');
|
122 |
//$radius_tright->label = __('Top Right', 'maxbuttons');
|
@@ -174,7 +181,9 @@ class borderBlock extends maxBlock
|
|
174 |
$radius->radius_br = $rbr;
|
175 |
$radius->label_br = __('Bottom Right','maxbuttons');
|
176 |
$radius->lock = $lock;
|
177 |
-
|
|
|
|
|
178 |
|
179 |
// Border style
|
180 |
$bstyle = new maxField('generic');
|
@@ -184,7 +193,9 @@ class borderBlock extends maxBlock
|
|
184 |
$bstyle->value= maxBlocks::getValue('border_style');
|
185 |
$bstyle->setDefault(maxBlocks::getDefault('border_style'));
|
186 |
$bstyle->content = maxUtils::selectify($bstyle->name, $maxbuttons_border_styles, $bstyle->value);
|
187 |
-
|
|
|
|
|
188 |
|
189 |
// Border width
|
190 |
$bwidth = new maxField('number');
|
@@ -194,7 +205,9 @@ class borderBlock extends maxBlock
|
|
194 |
$bwidth->value = maxUtils::strip_px( maxBlocks::getValue('border_width') );
|
195 |
$bwidth->min = 0;
|
196 |
$bwidth->inputclass = 'tiny';
|
197 |
-
|
|
|
|
|
198 |
|
199 |
// Border Color
|
200 |
$bcolor = new maxField('color');
|
@@ -207,7 +220,9 @@ class borderBlock extends maxBlock
|
|
207 |
$bcolor->copypos = 'right';
|
208 |
$bcolor->left_title = $color_copy_self;
|
209 |
$bcolor->right_title = $color_copy_move;
|
210 |
-
|
|
|
|
|
211 |
|
212 |
// Border Color Hover
|
213 |
$bcolor_hover = new maxField('color');
|
@@ -220,7 +235,9 @@ class borderBlock extends maxBlock
|
|
220 |
$bcolor_hover->copypos = 'left';
|
221 |
$bcolor_hover->left_title = $color_copy_move;
|
222 |
$bcolor_hover->right_title = $color_copy_self;
|
223 |
-
|
|
|
|
|
224 |
|
225 |
// Shadow offset left
|
226 |
$bshadow = new maxField('number');
|
@@ -229,7 +246,9 @@ class borderBlock extends maxBlock
|
|
229 |
$bshadow->id = $bshadow->name;
|
230 |
$bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_offset_left') );
|
231 |
$bshadow->inputclass = 'tiny';
|
232 |
-
|
|
|
|
|
233 |
|
234 |
// Shadow offset top
|
235 |
$bshadow = new maxField('number');
|
@@ -238,7 +257,9 @@ class borderBlock extends maxBlock
|
|
238 |
$bshadow->id = $bshadow->name;
|
239 |
$bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_offset_top') );
|
240 |
$bshadow->inputclass = 'tiny';
|
241 |
-
|
|
|
|
|
242 |
|
243 |
// Shadow width
|
244 |
$bshadow = new maxField('number');
|
@@ -247,7 +268,9 @@ class borderBlock extends maxBlock
|
|
247 |
$bshadow->id = $bshadow->name;
|
248 |
$bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_width') );
|
249 |
$bshadow->inputclass = 'tiny';
|
250 |
-
|
|
|
|
|
251 |
|
252 |
$bspread = new maxField('number');
|
253 |
$bspread->label = __('Shadow Spread', 'maxbuttons');
|
@@ -255,7 +278,9 @@ class borderBlock extends maxBlock
|
|
255 |
$bspread->id = 'box_shadow_spread';
|
256 |
$bspread->name = $bspread->id;
|
257 |
$bspread->inputclass = 'tiny';
|
258 |
-
|
|
|
|
|
259 |
|
260 |
// Border Shadow Color
|
261 |
$scolor = new maxField('color');
|
@@ -268,7 +293,9 @@ class borderBlock extends maxBlock
|
|
268 |
$scolor->copypos = 'right';
|
269 |
$scolor->left_title = $color_copy_self;
|
270 |
$scolor->right_title = $color_copy_move;
|
271 |
-
|
|
|
|
|
272 |
|
273 |
// Border Shadow Color Hover
|
274 |
$scolor_hover = new maxField('color');
|
@@ -281,7 +308,11 @@ class borderBlock extends maxBlock
|
|
281 |
$scolor_hover->copypos = 'left';
|
282 |
$scolor_hover->left_title = $color_copy_self;
|
283 |
$scolor_hover->right_title = $color_copy_move;
|
284 |
-
|
|
|
|
|
|
|
|
|
285 |
|
286 |
?>
|
287 |
|
92 |
|
93 |
$color_copy_self = __("Replace color from other field", "maxbuttons");
|
94 |
$color_copy_move = __("Copy Color to other field", "maxbuttons");
|
95 |
+
|
96 |
+
$admin = MB()->getClass('admin');
|
97 |
+
|
98 |
?>
|
99 |
<div class="option-container mb_tab">
|
100 |
<div class="title"><?php _e('Border', 'maxbuttons') ?></div>
|
106 |
$fspacer = new maxField('spacer');
|
107 |
$fspacer->label = __('Radius','maxbuttons');
|
108 |
$fspacer->name = 'radius';
|
109 |
+
// $fspacer->output('start');
|
110 |
+
|
111 |
+
$admin->addField($fspacer, 'start');
|
112 |
|
113 |
// Radius left top
|
114 |
$radius_tleft = new maxField('number');
|
122 |
$radius_tleft->publish = false;
|
123 |
$rtl = $radius_tleft->output('');
|
124 |
|
125 |
+
|
126 |
+
|
127 |
// Radius right top
|
128 |
$radius_tright = new maxField('number');
|
129 |
//$radius_tright->label = __('Top Right', 'maxbuttons');
|
181 |
$radius->radius_br = $rbr;
|
182 |
$radius->label_br = __('Bottom Right','maxbuttons');
|
183 |
$radius->lock = $lock;
|
184 |
+
//$radius->output('','end');
|
185 |
+
|
186 |
+
$admin->addField($radius, '', 'end');
|
187 |
|
188 |
// Border style
|
189 |
$bstyle = new maxField('generic');
|
193 |
$bstyle->value= maxBlocks::getValue('border_style');
|
194 |
$bstyle->setDefault(maxBlocks::getDefault('border_style'));
|
195 |
$bstyle->content = maxUtils::selectify($bstyle->name, $maxbuttons_border_styles, $bstyle->value);
|
196 |
+
//$bstyle->output('start', 'end');
|
197 |
+
|
198 |
+
$admin->addField($bstyle, 'start', 'end');
|
199 |
|
200 |
// Border width
|
201 |
$bwidth = new maxField('number');
|
205 |
$bwidth->value = maxUtils::strip_px( maxBlocks::getValue('border_width') );
|
206 |
$bwidth->min = 0;
|
207 |
$bwidth->inputclass = 'tiny';
|
208 |
+
//$bwidth->output('start','end');
|
209 |
+
|
210 |
+
$admin->addField($bwidth, 'start', 'end');
|
211 |
|
212 |
// Border Color
|
213 |
$bcolor = new maxField('color');
|
220 |
$bcolor->copypos = 'right';
|
221 |
$bcolor->left_title = $color_copy_self;
|
222 |
$bcolor->right_title = $color_copy_move;
|
223 |
+
//$bcolor->output('start');
|
224 |
+
|
225 |
+
$admin->addField($bcolor ,'start');
|
226 |
|
227 |
// Border Color Hover
|
228 |
$bcolor_hover = new maxField('color');
|
235 |
$bcolor_hover->copypos = 'left';
|
236 |
$bcolor_hover->left_title = $color_copy_move;
|
237 |
$bcolor_hover->right_title = $color_copy_self;
|
238 |
+
// $bcolor_hover->output('','end');
|
239 |
+
|
240 |
+
$admin->addField($bcolor_hover, '', 'end');
|
241 |
|
242 |
// Shadow offset left
|
243 |
$bshadow = new maxField('number');
|
246 |
$bshadow->id = $bshadow->name;
|
247 |
$bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_offset_left') );
|
248 |
$bshadow->inputclass = 'tiny';
|
249 |
+
//$bshadow->output('start');
|
250 |
+
|
251 |
+
$admin->addField($bshadow, 'start');
|
252 |
|
253 |
// Shadow offset top
|
254 |
$bshadow = new maxField('number');
|
257 |
$bshadow->id = $bshadow->name;
|
258 |
$bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_offset_top') );
|
259 |
$bshadow->inputclass = 'tiny';
|
260 |
+
// $bshadow->output('','end');
|
261 |
+
|
262 |
+
$admin->addField($bshadow, '', 'end');
|
263 |
|
264 |
// Shadow width
|
265 |
$bshadow = new maxField('number');
|
268 |
$bshadow->id = $bshadow->name;
|
269 |
$bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_width') );
|
270 |
$bshadow->inputclass = 'tiny';
|
271 |
+
//$bshadow->output('start','');
|
272 |
+
|
273 |
+
$admin->addField($bshadow, 'start', '');
|
274 |
|
275 |
$bspread = new maxField('number');
|
276 |
$bspread->label = __('Shadow Spread', 'maxbuttons');
|
278 |
$bspread->id = 'box_shadow_spread';
|
279 |
$bspread->name = $bspread->id;
|
280 |
$bspread->inputclass = 'tiny';
|
281 |
+
//$bspread->output('','end');
|
282 |
+
|
283 |
+
$admin->addField($bspread, '', 'end');
|
284 |
|
285 |
// Border Shadow Color
|
286 |
$scolor = new maxField('color');
|
293 |
$scolor->copypos = 'right';
|
294 |
$scolor->left_title = $color_copy_self;
|
295 |
$scolor->right_title = $color_copy_move;
|
296 |
+
//$scolor->output('start');
|
297 |
+
|
298 |
+
$admin->addField($scolor, 'start');
|
299 |
|
300 |
// Border Shadow Color Hover
|
301 |
$scolor_hover = new maxField('color');
|
308 |
$scolor_hover->copypos = 'left';
|
309 |
$scolor_hover->left_title = $color_copy_self;
|
310 |
$scolor_hover->right_title = $color_copy_move;
|
311 |
+
//$scolor_hover->output('','end');
|
312 |
+
|
313 |
+
$admin->addField($scolor_hover, '','end');
|
314 |
+
|
315 |
+
$admin->display_fields();
|
316 |
|
317 |
?>
|
318 |
|
blocks/icon.php
CHANGED
@@ -1,175 +1,174 @@
|
|
1 |
<?php
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
-
$blockClass["icon"] = "iconBlock";
|
5 |
-
$blockOrder[60][] = "icon";
|
6 |
|
7 |
use \simple_html_dom as simple_html_dom;
|
8 |
|
9 |
-
class iconBlock extends maxBlock
|
10 |
{
|
11 |
-
protected $blockname = "icon";
|
12 |
protected $fields = array("use_fa_icon" => array("default" => 0),
|
13 |
"fa_icon_value" => array("default" => '',
|
14 |
"css" => ''),
|
15 |
-
|
16 |
-
"fa_icon_size" => array("default" => '30px',
|
17 |
-
"css" => 'font-size',
|
18 |
"csspart" => "fa"),
|
19 |
-
|
20 |
-
"icon_id" => array('default' => '',
|
21 |
'css' => ''
|
22 |
-
),
|
23 |
-
"icon_url" => array('default' => '',
|
24 |
-
'css' => ''),
|
25 |
-
/*"background_url" => array('default' => '',
|
26 |
'css' => 'background-image',
|
27 |
-
), */
|
28 |
-
|
29 |
-
'css' => ''),
|
30 |
-
|
31 |
-
|
32 |
-
"icon_position" => array('default' => 'left',
|
33 |
-
'css' => 'text-align',
|
34 |
-
'csspart' => 'mb-icon'),
|
35 |
-
|
36 |
'icon_padding_top' => array('default' => '13px',
|
37 |
-
'css' => 'padding-top',
|
38 |
'csspart' => 'mb-icon'),
|
39 |
-
|
40 |
'icon_padding_right' => array('default' => '6px',
|
41 |
-
'css' => 'padding-right',
|
42 |
-
'csspart' => 'mb-icon'),
|
43 |
-
|
44 |
'icon_padding_bottom' => array('default' => '0px',
|
45 |
-
'css' => 'padding-bottom',
|
46 |
-
'csspart' => 'mb-icon'),
|
47 |
-
|
48 |
'icon_padding_left' => array('default' => '18px',
|
49 |
-
'css' => 'padding-left',
|
50 |
-
'csspart' => 'mb-icon'),
|
51 |
-
);
|
|
|
52 |
|
53 |
-
|
54 |
-
public function parse_css($css, $mode = 'normal')
|
55 |
{
|
56 |
|
57 |
-
$csspart = 'mb-icon';
|
58 |
-
$csspseudo = 'normal';
|
59 |
|
60 |
-
$data = isset($this->data[$this->blockname]) ? $this->data[$this->blockname] : array();
|
61 |
if (count($data) == 0)
|
62 |
return $css; // no icons present here.
|
63 |
-
|
64 |
-
$css = parent::parse_css($css);
|
65 |
$css["mb-icon"]["normal"]["line-height"] = "0px"; // prevent rendering bigger div than icon
|
66 |
$css["mb-icon"]["normal"]["display"] = "block";
|
67 |
-
$css['mb-icon']['normal']['background-color'] = 'unset'; // prevent background overwrite.
|
68 |
-
|
69 |
/*if (isset($css["maxbutton"]["normal"]["background-image"]))
|
70 |
{
|
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 |
-
{
|
80 |
switch( $css[$csspart][$csspseudo]["text-align"])
|
81 |
{
|
82 |
-
case "left":
|
83 |
$css[$csspart][$csspseudo]["float"] = 'left';
|
84 |
-
unset($css[$csspart][$csspseudo]["text-align"]);
|
85 |
break;
|
86 |
case "right":
|
87 |
$css[$csspart][$csspseudo]["float"] = 'right';
|
88 |
-
unset($css[$csspart][$csspseudo]["text-align"]);
|
89 |
-
|
90 |
-
break;
|
91 |
-
case "top":
|
92 |
-
case "bottom":
|
93 |
-
$css[$csspart][$csspseudo]["text-align"] = 'center';
|
94 |
break;
|
95 |
}
|
96 |
-
}
|
|
|
97 |
|
98 |
-
|
99 |
return $css;
|
100 |
}
|
101 |
-
|
102 |
public function parse_button($domObj, $mode = 'normal')
|
103 |
{
|
104 |
-
$data = isset($this->data[$this->blockname]) ? $this->data[$this->blockname] : array();
|
105 |
if (count($data) == 0)
|
106 |
return $domObj; // no icons present here.
|
107 |
-
|
108 |
-
$id = $this->data["id"];
|
109 |
-
|
110 |
-
$icon_url = $data["icon_url"];
|
111 |
-
$use_fa_icon= $data["use_fa_icon"];
|
112 |
-
$position = $data["icon_position"];
|
113 |
|
114 |
if ($icon_url == '' && ($use_fa_icon == 0 || $use_fa_icon == '') ) return $domObj; // no icon
|
115 |
-
|
116 |
-
$anchor = $domObj->find("a",0);
|
117 |
-
$anchor_text = '';
|
118 |
-
|
119 |
-
if ($use_fa_icon == 1)
|
120 |
{
|
121 |
-
if ($data["fa_icon_value"] == '') return $domObj; // still no icon
|
122 |
$anchor_text = '<span class="mb-icon "><i class="fa ' . $data["fa_icon_value"] . '"></i></span>';
|
123 |
}
|
124 |
-
else
|
125 |
{
|
126 |
-
$anchor_text = '<span class="mb-icon "><img src="' . $data["icon_url"] . '" alt="' . $data["icon_alt"] . '" border="0" /></span>' ;
|
127 |
-
}
|
128 |
if ($position == 'bottom')
|
129 |
-
$anchor->innertext = $anchor->innertext . $anchor_text;
|
130 |
else
|
131 |
$anchor->innertext = $anchor_text . $anchor->innertext;
|
132 |
-
|
133 |
-
$newhtml = $domObj->save();
|
134 |
-
|
135 |
-
$domObj = new simple_html_dom();
|
136 |
$domObj->load($newhtml);
|
137 |
|
138 |
-
return $domObj;
|
139 |
-
|
140 |
-
}
|
141 |
-
|
142 |
-
// empty save, leave the data alone plz.
|
143 |
public function save_fields($data, $post)
|
144 |
{
|
145 |
-
return $data;
|
146 |
}
|
147 |
|
148 |
-
public function admin_fields()
|
149 |
{
|
150 |
-
|
151 |
-
$data = isset($this->data[$this->blockname]) ? $this->data[$this->blockname] : array();
|
152 |
-
|
153 |
$icon_url = isset($data["icon_url"]) ? $data["icon_url"] : '';
|
154 |
-
|
155 |
-
if ($icon_url == '' )
|
156 |
return; // hide if no setting
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
?>
|
161 |
<div class="option-container mb_tab">
|
162 |
<div class="title"><?php _e('Icons and images', 'maxbuttons') ?></div>
|
163 |
-
<div class="inside">
|
164 |
-
<?php _e("This setting can only be changed in MaxButtons Pro","maxbuttons"); ?>
|
165 |
-
|
166 |
<p><img src="<?php echo $icon_url ?>"> </p>
|
167 |
</div>
|
168 |
-
</div>
|
169 |
-
<?php
|
170 |
-
|
171 |
-
|
172 |
}
|
173 |
|
174 |
} // class
|
175 |
-
|
1 |
<?php
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
+
$blockClass["icon"] = "iconBlock";
|
5 |
+
$blockOrder[60][] = "icon";
|
6 |
|
7 |
use \simple_html_dom as simple_html_dom;
|
8 |
|
9 |
+
class iconBlock extends maxBlock
|
10 |
{
|
11 |
+
protected $blockname = "icon";
|
12 |
protected $fields = array("use_fa_icon" => array("default" => 0),
|
13 |
"fa_icon_value" => array("default" => '',
|
14 |
"css" => ''),
|
15 |
+
|
16 |
+
"fa_icon_size" => array("default" => '30px',
|
17 |
+
"css" => 'font-size',
|
18 |
"csspart" => "fa"),
|
19 |
+
|
20 |
+
"icon_id" => array('default' => '',
|
21 |
'css' => ''
|
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',
|
34 |
+
'csspart' => 'mb-icon'),
|
35 |
+
|
36 |
'icon_padding_top' => array('default' => '13px',
|
37 |
+
'css' => 'padding-top',
|
38 |
'csspart' => 'mb-icon'),
|
39 |
+
|
40 |
'icon_padding_right' => array('default' => '6px',
|
41 |
+
'css' => 'padding-right',
|
42 |
+
'csspart' => 'mb-icon'),
|
43 |
+
|
44 |
'icon_padding_bottom' => array('default' => '0px',
|
45 |
+
'css' => 'padding-bottom',
|
46 |
+
'csspart' => 'mb-icon'),
|
47 |
+
|
48 |
'icon_padding_left' => array('default' => '18px',
|
49 |
+
'css' => 'padding-left',
|
50 |
+
'csspart' => 'mb-icon'),
|
51 |
+
);
|
52 |
+
|
53 |
|
54 |
+
public function parse_css($css, $mode = 'normal')
|
|
|
55 |
{
|
56 |
|
57 |
+
$csspart = 'mb-icon';
|
58 |
+
$csspseudo = 'normal';
|
59 |
|
60 |
+
$data = isset($this->data[$this->blockname]) ? $this->data[$this->blockname] : array();
|
61 |
if (count($data) == 0)
|
62 |
return $css; // no icons present here.
|
63 |
+
|
64 |
+
$css = parent::parse_css($css);
|
65 |
$css["mb-icon"]["normal"]["line-height"] = "0px"; // prevent rendering bigger div than icon
|
66 |
$css["mb-icon"]["normal"]["display"] = "block";
|
67 |
+
$css['mb-icon']['normal']['background-color'] = 'unset'; // prevent background overwrite.
|
68 |
+
|
69 |
/*if (isset($css["maxbutton"]["normal"]["background-image"]))
|
70 |
{
|
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 |
+
{
|
80 |
switch( $css[$csspart][$csspseudo]["text-align"])
|
81 |
{
|
82 |
+
case "left":
|
83 |
$css[$csspart][$csspseudo]["float"] = 'left';
|
84 |
+
unset($css[$csspart][$csspseudo]["text-align"]);
|
85 |
break;
|
86 |
case "right":
|
87 |
$css[$csspart][$csspseudo]["float"] = 'right';
|
88 |
+
unset($css[$csspart][$csspseudo]["text-align"]);
|
89 |
+
|
90 |
+
break;
|
91 |
+
case "top":
|
92 |
+
case "bottom":
|
93 |
+
$css[$csspart][$csspseudo]["text-align"] = 'center';
|
94 |
break;
|
95 |
}
|
96 |
+
}
|
97 |
+
|
98 |
|
|
|
99 |
return $css;
|
100 |
}
|
101 |
+
|
102 |
public function parse_button($domObj, $mode = 'normal')
|
103 |
{
|
104 |
+
$data = isset($this->data[$this->blockname]) ? $this->data[$this->blockname] : array();
|
105 |
if (count($data) == 0)
|
106 |
return $domObj; // no icons present here.
|
107 |
+
|
108 |
+
$id = $this->data["id"];
|
109 |
+
|
110 |
+
$icon_url = $data["icon_url"];
|
111 |
+
$use_fa_icon= $data["use_fa_icon"];
|
112 |
+
$position = $data["icon_position"];
|
113 |
|
114 |
if ($icon_url == '' && ($use_fa_icon == 0 || $use_fa_icon == '') ) return $domObj; // no icon
|
115 |
+
|
116 |
+
$anchor = $domObj->find("a",0);
|
117 |
+
$anchor_text = '';
|
118 |
+
|
119 |
+
if ($use_fa_icon == 1)
|
120 |
{
|
121 |
+
if ($data["fa_icon_value"] == '') return $domObj; // still no icon
|
122 |
$anchor_text = '<span class="mb-icon "><i class="fa ' . $data["fa_icon_value"] . '"></i></span>';
|
123 |
}
|
124 |
+
else
|
125 |
{
|
126 |
+
$anchor_text = '<span class="mb-icon "><img src="' . $data["icon_url"] . '" alt="' . $data["icon_alt"] . '" border="0" /></span>' ;
|
127 |
+
}
|
128 |
if ($position == 'bottom')
|
129 |
+
$anchor->innertext = $anchor->innertext . $anchor_text;
|
130 |
else
|
131 |
$anchor->innertext = $anchor_text . $anchor->innertext;
|
132 |
+
|
133 |
+
$newhtml = $domObj->save();
|
134 |
+
|
135 |
+
$domObj = new simple_html_dom();
|
136 |
$domObj->load($newhtml);
|
137 |
|
138 |
+
return $domObj;
|
139 |
+
|
140 |
+
}
|
141 |
+
|
142 |
+
// empty save, leave the data alone plz.
|
143 |
public function save_fields($data, $post)
|
144 |
{
|
145 |
+
return $data;
|
146 |
}
|
147 |
|
148 |
+
public function admin_fields()
|
149 |
{
|
150 |
+
|
151 |
+
$data = isset($this->data[$this->blockname]) ? $this->data[$this->blockname] : array();
|
152 |
+
|
153 |
$icon_url = isset($data["icon_url"]) ? $data["icon_url"] : '';
|
154 |
+
|
155 |
+
if ($icon_url == '' )
|
156 |
return; // hide if no setting
|
157 |
+
|
158 |
+
|
159 |
+
|
160 |
?>
|
161 |
<div class="option-container mb_tab">
|
162 |
<div class="title"><?php _e('Icons and images', 'maxbuttons') ?></div>
|
163 |
+
<div class="inside">
|
164 |
+
<?php _e("This setting can only be changed in MaxButtons Pro","maxbuttons"); ?>
|
165 |
+
|
166 |
<p><img src="<?php echo $icon_url ?>"> </p>
|
167 |
</div>
|
168 |
+
</div>
|
169 |
+
<?php
|
170 |
+
|
171 |
+
|
172 |
}
|
173 |
|
174 |
} // class
|
|
classes/admin-class.php
CHANGED
@@ -8,6 +8,10 @@ class maxButtonsAdmin
|
|
8 |
protected $wpdb;
|
9 |
protected static $instance = null;
|
10 |
|
|
|
|
|
|
|
|
|
11 |
function __construct()
|
12 |
{
|
13 |
global $wpdb;
|
@@ -26,7 +30,7 @@ class maxButtonsAdmin
|
|
26 |
public function loadFonts()
|
27 |
{
|
28 |
$fonts = array(
|
29 |
-
'' => '',
|
30 |
'Arial' => 'Arial',
|
31 |
'Courier New' => 'Courier New',
|
32 |
'Georgia' => 'Georgia',
|
@@ -38,6 +42,57 @@ class maxButtonsAdmin
|
|
38 |
return $fonts;
|
39 |
}
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
/* Get multiple buttons
|
42 |
|
43 |
Used for overview pages, retrieve buttons on basis of passed arguments.
|
@@ -304,7 +359,7 @@ class maxButtonsAdmin
|
|
304 |
if (! is_dir($dir))
|
305 |
return false;
|
306 |
|
307 |
-
$file = fopen( trailingslashit($dir) . "/maxbuttons.log", "a+");
|
308 |
$now = new DateTime() ;
|
309 |
$now_format = $now->format("d/M/Y H:i:s");
|
310 |
|
8 |
protected $wpdb;
|
9 |
protected static $instance = null;
|
10 |
|
11 |
+
protected $fields = array();
|
12 |
+
protected $defined_fields = array();
|
13 |
+
protected $defined_updatable = array();
|
14 |
+
|
15 |
function __construct()
|
16 |
{
|
17 |
global $wpdb;
|
30 |
public function loadFonts()
|
31 |
{
|
32 |
$fonts = array(
|
33 |
+
'' => __('[Site Default]','maxbuttons'),
|
34 |
'Arial' => 'Arial',
|
35 |
'Courier New' => 'Courier New',
|
36 |
'Georgia' => 'Georgia',
|
42 |
return $fonts;
|
43 |
}
|
44 |
|
45 |
+
|
46 |
+
// add a maxfield to be displayed on the admin.
|
47 |
+
public function addfield( $field, $start = '', $end = '')
|
48 |
+
{
|
49 |
+
$field_id = isset($field->id) ? $field->id : $field->template . \rand(0,1000);
|
50 |
+
|
51 |
+
$field->publish = false; // Output fields via class - never output.
|
52 |
+
|
53 |
+
$this->fields[$field_id] = array('field' => $field,
|
54 |
+
'start' => $start,
|
55 |
+
'end' => $end);
|
56 |
+
$this->fields = apply_filters('mb/editor/addfield', $this->fields, $field);
|
57 |
+
|
58 |
+
$this->defined_fields[] = $field_id;
|
59 |
+
do_action('mb/editor/afterfield/'. $field_id);
|
60 |
+
}
|
61 |
+
|
62 |
+
public function display_fields($clean = true, $return = false)
|
63 |
+
{
|
64 |
+
$fields = apply_filters('mb/display_fields', $this->fields);
|
65 |
+
$output = '';
|
66 |
+
|
67 |
+
|
68 |
+
foreach($fields as $id => $item)
|
69 |
+
{
|
70 |
+
$field = $item['field'];
|
71 |
+
$output .= $field->output($item['start'], $item['end']);
|
72 |
+
}
|
73 |
+
|
74 |
+
// auto-update system
|
75 |
+
$updatable = $this->defined_updatable;
|
76 |
+
foreach($updatable as $index => $field)
|
77 |
+
{
|
78 |
+
$updatable[$index] = '#' . $field;
|
79 |
+
}
|
80 |
+
|
81 |
+
$output .= ' <span class="updatables hidden">' . implode(',', $updatable) . '</span>';
|
82 |
+
|
83 |
+
if ($clean)
|
84 |
+
{
|
85 |
+
$this->fields = array();
|
86 |
+
$this->defined_updatable = array();
|
87 |
+
}
|
88 |
+
|
89 |
+
if (! $return)
|
90 |
+
echo $output;
|
91 |
+
else
|
92 |
+
return $output;
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
/* Get multiple buttons
|
97 |
|
98 |
Used for overview pages, retrieve buttons on basis of passed arguments.
|
359 |
if (! is_dir($dir))
|
360 |
return false;
|
361 |
|
362 |
+
$file = fopen( trailingslashit($dir) . "/maxbuttons.log", "a+");
|
363 |
$now = new DateTime() ;
|
364 |
$now_format = $now->format("d/M/Y H:i:s");
|
365 |
|
classes/maxbuttons-class.php
CHANGED
@@ -8,59 +8,59 @@ class maxButtonsPlugin
|
|
8 |
{
|
9 |
|
10 |
protected $installed_version = 0;
|
11 |
-
protected $plugin_name;
|
12 |
protected $plugin_url;
|
13 |
protected $plugin_path;
|
14 |
protected $debug_mode = false;
|
15 |
protected $footer = array();
|
16 |
|
17 |
-
protected static $notices = array();
|
18 |
-
|
19 |
-
protected $mainClasses = array();
|
20 |
-
|
21 |
protected static $instance;
|
22 |
-
|
23 |
-
/* Class constructor
|
24 |
Add hooks and actions used by this plugin. Sets plugin environment information
|
25 |
*/
|
26 |
function __construct()
|
27 |
{
|
28 |
-
maxUtils::timeInit(); // benchmark timer init.
|
29 |
|
30 |
$this->plugin_url = self::get_plugin_url(); //plugins_url() . '/' . $this->plugin_name;
|
31 |
-
$this->plugin_path = self::get_plugin_path(); //plugin_dir_path($rootfile);
|
32 |
$this->plugin_name = trim(basename($this->plugin_path), '/');
|
33 |
-
|
34 |
-
$this->installed_version = get_option(MAXBUTTONS_VERSION_KEY);
|
35 |
-
|
36 |
if ( defined('MAXBUTTONS_DEBUG') && MAXBUTTONS_DEBUG)
|
37 |
$this->debug_mode = true;
|
38 |
-
|
39 |
add_action('plugins_loaded', array($this, 'load_textdomain'));
|
40 |
|
41 |
add_filter('widget_text', 'do_shortcode');
|
42 |
-
add_shortcode('maxbutton', array($this, 'shortcode'));
|
|
|
|
|
|
|
43 |
|
44 |
-
add_action("mb-footer", array($this, 'do_footer'),10,3);
|
45 |
-
add_action("wp_footer", array($this, "footer"));
|
46 |
-
|
47 |
// Media buttons
|
48 |
add_action('media_buttons', array($this,'media_button'));
|
49 |
|
50 |
add_filter('plugin_action_links', array($this, "plugin_action_links"), 10, 2);
|
51 |
add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 2);
|
52 |
-
|
53 |
if( is_admin())
|
54 |
-
{
|
55 |
add_action('admin_enqueue_scripts', array($this,'add_admin_styles'));
|
56 |
-
add_action('admin_enqueue_scripts', array($this,'add_admin_scripts'));
|
57 |
add_action('admin_enqueue_scripts', array(maxUtils::namespaceit('maxUtils'), 'fixFAConflict'),999);
|
58 |
-
|
59 |
add_action('admin_init', array($this,'register_settings' ));
|
60 |
-
|
61 |
add_action('admin_init', array($this, 'do_review_notice')); // Ask for review
|
62 |
-
add_action('admin_init', array(maxUtils::namespaceit('maxInstall'),'check_database'));
|
63 |
-
|
64 |
add_action('admin_menu', array($this, 'admin_menu'));
|
65 |
add_action('admin_footer', array($this, "footer"));
|
66 |
add_filter("admin_footer_text",array($this, "admin_footer_text"));
|
@@ -69,157 +69,158 @@ class maxButtonsPlugin
|
|
69 |
add_action("mb/editor/display_notices", array($this,"display_notices"), 99);
|
70 |
add_action("mb/collection/display_notices", array($this,"display_notices"), 99);
|
71 |
add_action('mb/header/display_notices', array($this, 'display_notices'), 99);
|
72 |
-
|
73 |
add_action("wp_ajax_getAjaxButtons", array(maxUtils::namespaceit('maxButtonsAdmin'), 'getAjaxButtons'));
|
74 |
-
add_action("wp_ajax_set_review_notice_status", array($this, "setReviewNoticeStatus"));
|
75 |
|
76 |
// Collection AJAX
|
77 |
-
add_action("wp_ajax_collection-edit", array(maxUtils::namespaceit("maxCollections"), "ajax_save"));
|
78 |
-
add_action('wp_ajax_mbpro_collection_block', array(maxUtils::namespaceit("maxCollections"), "ajax_action")); // all block level ajax stuff - for logged in users - backend
|
79 |
-
add_action('wp_ajax_mb_button_action', array(maxUtils::namespaceit('maxButtons'), "ajax_action"));
|
80 |
-
|
81 |
-
add_action('wp_ajax_maxajax', array(maxUtils::namespaceit('maxUtils'), 'ajax_action'));
|
82 |
}
|
83 |
// FRONT AJAX
|
84 |
add_action('wp_ajax_mbpro_collection_block_front', array(maxUtils::namespaceit("maxCollections"), "ajax_action_front")); // front end for all users
|
85 |
-
add_action('wp_ajax_nopriv_mbpro_collection_block_front', array(maxUtils::namespaceit("maxCollections"), "ajax_action_front"));
|
86 |
-
|
87 |
// front scripts
|
88 |
add_action('wp_enqueue_scripts', array($this, 'front_scripts'));
|
89 |
add_action('wp_enqueue_scripts', array(maxUtils::namespaceit('maxUtils'), 'fixFAConflict'),999);
|
90 |
-
|
91 |
$this->setMainClasses(); // struct for override functionality
|
92 |
-
|
93 |
-
// The second the blocks are being loaded, check dbase integrity
|
94 |
-
add_action("mb_blockclassesloaded", array($this, "check_database"));
|
95 |
-
|
96 |
// setup page hooks and shortcode
|
97 |
add_shortcode('maxcollection', array($this, 'collection_shortcode'));
|
98 |
-
if (! is_admin())
|
99 |
$hook_bool = maxCollections::setupHooks(); // setup the hooks to insert collections
|
100 |
|
101 |
self::$instance = $this;
|
102 |
-
maxIntegrations::init(); // fire the integrations.
|
103 |
}
|
104 |
-
|
105 |
public static function getInstance()
|
106 |
{
|
107 |
return self::$instance;
|
108 |
}
|
109 |
-
|
110 |
public function setMainClasses()
|
111 |
{
|
112 |
$classes = array(
|
113 |
"button" => "maxButton",
|
114 |
"buttons" => "maxButtons",
|
115 |
-
"block" => "maxBlock",
|
116 |
-
"admin" => "maxButtonsAdmin",
|
117 |
-
"install" => "maxInstall",
|
118 |
"groups" => "maxGroups",
|
119 |
-
"collections" => "maxCollections",
|
120 |
"collection" => "maxCollection",
|
121 |
"pack" => "maxPack",
|
122 |
|
123 |
-
);
|
124 |
-
|
125 |
-
$this->mainClasses = $classes;
|
126 |
}
|
127 |
-
|
128 |
// from block loader action. Checks if all parts of the table are there, or panic if not.
|
129 |
public function check_database($blocks)
|
130 |
{
|
131 |
maxUtils::addTime("Check database");
|
132 |
-
|
133 |
-
$sql = "SELECT id,name,status,cache, created ";
|
134 |
-
foreach ($blocks as $block => $class)
|
135 |
{
|
136 |
-
$sql .= ", $block";
|
137 |
-
}
|
138 |
-
$sql .= " from " . maxUtils::get_table_name() . " limit 1";
|
139 |
-
|
140 |
-
global $wpdb;
|
141 |
$wpdb->hide_errors();
|
142 |
-
$result = $wpdb->get_results($sql);
|
143 |
-
|
144 |
-
|
145 |
-
// check this query for errors. If there is an error, one or more database fields are missing. Fix that.
|
146 |
-
if (isset($wpdb->last_error) && $wpdb->last_error != '')
|
147 |
{
|
148 |
-
|
149 |
-
$install = $this->getClass("install");
|
150 |
$install::create_database_table();
|
151 |
$install::migrate();
|
152 |
}
|
153 |
-
|
154 |
-
|
155 |
maxUtils::addTime("End check database");
|
156 |
}
|
157 |
-
|
158 |
public function getClass($class)
|
159 |
{
|
160 |
|
161 |
-
if (isset($this->mainClasses[$class]))
|
162 |
{
|
163 |
-
$load_class = maxUtils::namespaceit($this->mainClasses[$class]);
|
164 |
if (method_exists($load_class,'getInstance'))
|
165 |
{
|
166 |
-
return $load_class::getInstance();
|
167 |
}
|
168 |
return new $load_class;
|
169 |
}
|
170 |
}
|
171 |
-
|
172 |
/* Load the plugin textdomain */
|
173 |
public function load_textdomain()
|
174 |
{
|
175 |
-
// see: http://geertdedeckere.be/article/loading-wordpress-language-files-the-right-way
|
176 |
$domain = 'maxbuttons';
|
177 |
// The "plugin_locale" filter is also used in load_plugin_textdomain()
|
178 |
$locale = apply_filters('plugin_locale', get_locale(), $domain);
|
179 |
|
180 |
-
load_textdomain($domain, WP_LANG_DIR.'/maxbuttons/'.$domain.'-'.$locale.'.mo');
|
181 |
$res = load_plugin_textdomain('maxbuttons', false, $this->plugin_name . '/languages/');
|
182 |
-
|
183 |
}
|
184 |
-
|
185 |
-
|
186 |
/** WP Settings framework. Registers settings used on maxbuttons-settings.php page */
|
187 |
public function register_settings()
|
188 |
{
|
189 |
register_setting( 'maxbuttons_settings', 'maxbuttons_user_level' );
|
190 |
register_setting( 'maxbuttons_settings', 'maxbuttons_noshowtinymce' );
|
191 |
-
register_setting( 'maxbuttons_settings', 'maxbuttons_minify' );
|
192 |
-
register_setting( 'maxbuttons_settings', 'maxbuttons_hidedescription' );
|
193 |
register_setting( 'maxbuttons_settings', 'maxbuttons_forcefa') ;
|
194 |
-
register_setting( 'maxbuttons_settings', 'maxbuttons_borderbox');
|
|
|
195 |
}
|
196 |
-
|
197 |
-
protected function checkbox_option($options)
|
198 |
{
|
199 |
-
if (! isset($options["maxbuttons_minify"]))
|
200 |
-
$options["maxbuttons_minify"] = 0;
|
201 |
-
|
202 |
return $options;
|
203 |
-
|
204 |
}
|
205 |
|
206 |
/** Returns the full path of the plugin installation directory */
|
207 |
public static function get_plugin_path()
|
208 |
{
|
209 |
-
return plugin_dir_path(MAXBUTTONS_ROOT_FILE);
|
210 |
}
|
211 |
-
|
212 |
-
/** Returns the full URL of the plugin installation path */
|
213 |
public static function get_plugin_url()
|
214 |
{
|
215 |
$url = plugin_dir_url(MAXBUTTONS_ROOT_FILE);
|
216 |
return $url;
|
217 |
}
|
218 |
-
|
219 |
/** Returns the current installed version */
|
220 |
public function get_installed_version()
|
221 |
{
|
222 |
-
return $this->installed_version;
|
223 |
}
|
224 |
|
225 |
/** Installs and adds the main menu and the submenu items */
|
@@ -237,16 +238,16 @@ class maxButtonsPlugin
|
|
237 |
$capability = $maxbuttons_capabilities;
|
238 |
$admin_capability = 'manage_options';
|
239 |
$menu_slug = 'maxbuttons-controller';
|
240 |
-
$function = array($this, 'load_admin_page');
|
241 |
$icon_url = $this->plugin_url . 'images/mb-peach-icon.png';
|
242 |
-
$submenu_function = array($this, 'load_admin_page');
|
243 |
-
|
244 |
add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, 81);
|
245 |
-
|
246 |
// We add this submenu page with the same slug as the parent to ensure we don't get duplicates
|
247 |
$sub_menu_title = __('Buttons', 'maxbuttons');
|
248 |
$admin_pages[] = add_submenu_page($menu_slug, $page_title, $sub_menu_title, $capability, $menu_slug, $function);
|
249 |
-
|
250 |
// Now add the submenu page for the Add New page
|
251 |
$submenu_page_title = __('MaxButtons: Add/Edit Button', 'maxbuttons');
|
252 |
$submenu_title = __('Add New', 'maxbuttons');
|
@@ -259,7 +260,7 @@ class maxButtonsPlugin
|
|
259 |
$submenu_title = __('Social Share', 'maxbuttons');
|
260 |
$submenu_slug = 'maxbuttons-collections';
|
261 |
$admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function);
|
262 |
-
|
263 |
// Now add the submenu page for the Go Pro page
|
264 |
$submenu_page_title = __('MaxButtons: Upgrade to Pro', 'maxbuttons');
|
265 |
$submenu_title = __('Upgrade to Pro', 'maxbuttons');
|
@@ -280,179 +281,178 @@ class maxButtonsPlugin
|
|
280 |
$submenu_slug = 'maxbuttons-support';
|
281 |
//$submenu_function = 'maxbuttons_support';
|
282 |
$admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $admin_capability, $submenu_slug, $submenu_function);
|
283 |
-
|
284 |
-
}
|
285 |
-
|
286 |
function load_admin_page($page)
|
287 |
{
|
288 |
$page = sanitize_text_field($_GET["page"]);
|
289 |
-
|
290 |
-
switch($page)
|
291 |
{
|
292 |
-
case "maxbuttons-button":
|
293 |
-
$pagepath = "includes/maxbuttons-button.php";
|
294 |
break;
|
295 |
-
case "maxbuttons-support":
|
296 |
$pagepath = "includes/maxbuttons-support.php";
|
297 |
break;
|
298 |
-
case "maxbuttons-settings":
|
299 |
-
$pagepath = "includes/maxbuttons-settings.php";
|
300 |
break;
|
301 |
-
case "maxbuttons-pro":
|
302 |
-
$pagepath = "includes/maxbuttons-pro.php";
|
|
|
|
|
|
|
303 |
break;
|
304 |
-
case "maxbuttons-collections":
|
305 |
-
$pagepath = "includes/maxbuttons-collections.php";
|
306 |
-
break;
|
307 |
default:
|
308 |
-
$pagepath = "includes/maxbuttons-controller.php";
|
309 |
break;
|
310 |
}
|
311 |
-
$pagepath = $this->plugin_path . $pagepath;
|
312 |
-
|
313 |
-
include(apply_filters("mb-load-admin-page-$page", $pagepath));
|
314 |
}
|
315 |
|
316 |
|
317 |
-
function add_admin_styles($hook) {
|
318 |
-
// only hook in maxbuttons realm.
|
319 |
if ( strpos($hook,'maxbuttons') === false && $hook != 'post.php' && $hook != 'post-new.php' )
|
320 |
{
|
321 |
if (! isset($_GET['fl_builder'])) // exception for beaver builder
|
322 |
return;
|
323 |
}
|
324 |
-
|
325 |
-
|
326 |
-
|
|
|
327 |
if ($fa_url != false && $fa_url != '')
|
328 |
-
{
|
329 |
-
wp_register_style('mbpro-font-awesome', $fa_url
|
330 |
-
wp_enqueue_style('mbpro-font-awesome');
|
331 |
}
|
332 |
-
|
333 |
-
wp_enqueue_style('wp-color-picker');
|
334 |
-
wp_enqueue_style('maxbuttons-css', $this->plugin_url . 'assets/css/style.css');
|
335 |
-
|
336 |
}
|
337 |
|
338 |
-
/** Add Admin scripts
|
339 |
*
|
340 |
* Uses WP hook for Admin scripts to add needed js.
|
341 |
*/
|
342 |
-
function add_admin_scripts($hook) {
|
343 |
// only hook in maxbuttons realm.
|
344 |
-
if ( strpos($hook,'maxbuttons') === false ) //&& $hook != 'post.php' && $hook != 'post-new.php'
|
345 |
return;
|
346 |
-
|
347 |
$version = MAXBUTTONS_VERSION_NUM;
|
348 |
-
|
349 |
-
$js_url = trailingslashit($this->plugin_url . 'js');
|
350 |
-
if (! $this->debug_mode)
|
351 |
-
$js_url .= 'min/';
|
352 |
-
|
353 |
-
|
354 |
wp_enqueue_script('jquery-ui-draggable');
|
355 |
-
|
356 |
-
//wp_enqueue_script('maxbuttons-colorpicker-js', $js_url .'colpick.js', array('jquery'), $version, true);
|
357 |
|
358 |
-
wp_enqueue_script('maxbutton-admin', $js_url . 'maxbuttons-admin.js', array('jquery', 'jquery-ui-draggable', 'maxbuttons-tabs','maxbuttons-modal', 'wp-color-picker', 'underscore'),$version, true);
|
359 |
wp_enqueue_script('maxbutton-js-init', $js_url . 'init.js', array('maxbutton-admin','maxcollections','maxbuttons-modal'),$version, true);
|
360 |
-
wp_enqueue_script('maxbuttons-tabs', $js_url . 'maxtabs.js', array('jquery'),$version, true);
|
361 |
-
wp_enqueue_script('maxbuttons-responsive', $js_url . 'responsive.js', array('maxbutton-admin'), $version, true );
|
362 |
-
|
363 |
wp_register_script('maxbuttons-ajax', $js_url . 'maxajax.js', array('maxbutton-admin'), $version, true);
|
364 |
-
wp_localize_script('maxbuttons-ajax', 'maxajax',
|
365 |
array(
|
366 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
367 |
'ajax_action' => 'maxajax',
|
368 |
'nonce' => wp_create_nonce('maxajax'),
|
369 |
-
));
|
370 |
-
|
371 |
wp_enqueue_script('maxbuttons-ajax');
|
372 |
-
|
373 |
-
wp_register_script('maxcollections', $js_url . 'maxcollections.js',
|
374 |
-
array('jquery', 'maxbutton-admin', 'jquery-ui-sortable'),$version, true );
|
375 |
-
|
376 |
$local = array();
|
377 |
$local["ajaxurl"] = admin_url( 'admin-ajax.php' );
|
378 |
-
$local["maxurl"] = $this->plugin_url;
|
379 |
-
wp_localize_script('maxbutton-admin', 'mb_ajax', $local);
|
380 |
-
|
381 |
$local = array(
|
382 |
"leave_page" => __("You have unsaved data, are you sure you want to leave the page?","maxbuttons"),
|
383 |
-
'picker_title' => __('Select your buttons','maxbuttons'),
|
384 |
-
|
385 |
-
);
|
386 |
-
wp_localize_script('maxcollections', 'maxcol_wp', $local);
|
387 |
-
|
388 |
-
$this->load_modal_script();
|
389 |
-
|
390 |
-
wp_enqueue_script('maxcollections');
|
391 |
-
}
|
392 |
-
|
393 |
/** Load the Modal Script
|
394 |
* The modal script is the generic solution for all popups within the plugin.
|
395 |
*/
|
396 |
-
public function load_modal_script()
|
397 |
{
|
398 |
$version = MAXBUTTONS_VERSION_NUM;
|
399 |
-
$js_url = trailingslashit($this->plugin_url . 'js');
|
400 |
-
if (! $this->debug_mode)
|
401 |
-
$js_url .= 'min/';
|
402 |
-
|
403 |
-
wp_register_script('maxbuttons-modal', $js_url . 'maxmodal.js', array('jquery','jquery-ui-draggable'), $version, true);
|
404 |
-
// translations of controls and other elements that can be used in maxmodal
|
405 |
$translations = array(
|
406 |
-
'yes' => __("Yes","maxbuttons"),
|
407 |
-
'no' => __("No","maxbuttons"),
|
408 |
-
'ok' => __("OK","maxbuttons"),
|
409 |
-
'cancel' => __("Cancel","maxbuttons"),
|
410 |
-
);
|
411 |
-
wp_localize_script('maxbuttons-modal', 'modaltext', $translations);
|
412 |
-
wp_enqueue_script('maxbuttons-modal');
|
413 |
|
414 |
}
|
415 |
-
|
416 |
-
/** Load Media Buttons Script
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
*/
|
421 |
-
public function load_media_script()
|
422 |
{
|
423 |
$version = MAXBUTTONS_VERSION_NUM;
|
424 |
|
425 |
-
$js_url = trailingslashit($this->plugin_url . 'js');
|
426 |
-
if (! $this->debug_mode)
|
427 |
-
$js_url .= 'min/';
|
428 |
-
|
429 |
-
$fa_url = apply_filters("mb_fa_url", $this->plugin_url . 'assets/libraries/font-awesome/css/font-awesome.min.css');
|
430 |
if ($fa_url != false && $fa_url != '')
|
431 |
{
|
432 |
-
wp_register_style('mbpro-font-awesome', $fa_url);
|
433 |
-
wp_enqueue_style('mbpro-font-awesome');
|
434 |
}
|
435 |
-
|
436 |
-
wp_enqueue_script('mb-media-button', $js_url . 'maxbuttons_media_button.js', array('jquery', 'maxbuttons-modal'), $version, true);
|
437 |
$this->load_modal_script();
|
438 |
-
|
439 |
$translations = array(
|
440 |
-
'insert' => __('Insert Button into Editor', 'maxbuttons'),
|
441 |
-
'loading' => __("Loading your buttons","maxbuttons"),
|
442 |
-
'select' => __('Click on a button from the list below to place the button shortcode in the editor.', 'maxbuttons'),
|
443 |
-
'cancel' => __('Cancel', 'maxbuttons'),
|
444 |
-
'windowtitle' => __("Select a MaxButton","maxbuttons"),
|
445 |
-
'icon' => $this->plugin_url . 'images/mb-peach-32.png',
|
446 |
-
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
447 |
-
'short_url_label' => __('Button URL', 'maxbuttons'),
|
448 |
'short_text_label' => __('Button Text', 'maxbuttons'),
|
449 |
'short_options_explain' => __('If you want to change the URL or Text of the Button, enter the appropiate field. If you want to use the button values, just click Add to editor', 'maxbuttons'),
|
450 |
-
'short_add_button' => __('Add to Editor', 'maxbuttons'),
|
451 |
-
);
|
452 |
-
|
453 |
-
wp_localize_script('mb-media-button','mbtrans', $translations);
|
454 |
}
|
455 |
-
|
456 |
/** Load Media Button in WP editor
|
457 |
*
|
458 |
* The 'add button' interface in WP post and page editor to simplify adding buttons. Loads button plus required Javascript.
|
@@ -460,7 +460,7 @@ class maxButtonsPlugin
|
|
460 |
function media_button($editor_id) {
|
461 |
$output = '';
|
462 |
|
463 |
-
// options
|
464 |
if (get_option('maxbuttons_noshowtinymce') == 1) return;
|
465 |
|
466 |
$this->load_media_script();
|
@@ -470,90 +470,91 @@ class maxButtonsPlugin
|
|
470 |
$title = __('Add Button', 'maxbuttons');
|
471 |
$icon = $this->plugin_url . 'images/mb-peach-icon.png';
|
472 |
$img = '<span class="wp-media-buttons-icon" style="background-image: url(' . $icon . '); width: 16px; height: 16px; margin-top: 1px;"></span>';
|
473 |
-
$output = '<a href="javascript:void(0);" class="button maxbutton_media_button" data-callback="window.maxMedia.showShortcodeOptions" title="' . $title . '" style="padding-left: .4em;">' . $img . ' ' . $title . '</a>';
|
474 |
|
475 |
echo $output;
|
476 |
}
|
477 |
-
|
478 |
-
/** Scripts run on front-end
|
479 |
-
|
480 |
*/
|
481 |
-
public function front_scripts()
|
482 |
{
|
483 |
-
|
484 |
-
|
|
|
485 |
if ($fa_url != false && $fa_url != '')
|
486 |
{
|
487 |
-
wp_register_style('mbpro-font-awesome', $fa_url);
|
488 |
-
wp_enqueue_style('mbpro-font-awesome');
|
489 |
-
}
|
490 |
-
|
491 |
// load backend script on front in Beaver Builder
|
492 |
if (isset($_GET['fl_builder']))
|
493 |
{
|
494 |
-
$this->add_admin_styles('maxbuttons');
|
495 |
}
|
496 |
-
|
497 |
-
wp_enqueue_script('maxbuttons-front', $this->plugin_url . 'js/min/front.js', array('jquery'),
|
498 |
-
$local = array();
|
499 |
$local["ajaxurl"] = admin_url( 'admin-ajax.php' );
|
500 |
|
501 |
-
wp_localize_script('maxbuttons-front', 'mb_ajax', $local);
|
502 |
}
|
503 |
-
|
504 |
-
/** Extra text to display in admin footer */
|
505 |
function admin_footer_text($text)
|
506 |
{
|
507 |
if (! isset($_GET["page"]))
|
508 |
return $text;
|
509 |
-
|
510 |
if ( strpos($_GET["page"],'maxbuttons') === false)
|
511 |
-
return $text;
|
512 |
$text = '';
|
513 |
|
514 |
-
$text .= sprintf("If you like MaxButtons please give us a %s★★★★★%s rating!",
|
515 |
-
"<a href='https://wordpress.org/support/view/plugin-reviews/maxbuttons#postform' target='_blank'>",
|
516 |
-
"</a>") ;
|
517 |
-
return $text;
|
518 |
-
|
519 |
}
|
520 |
-
|
521 |
-
|
522 |
-
function shortcode($atts)
|
523 |
{
|
524 |
$button = $this->getClass("button");
|
525 |
-
return $button->shortcode($atts);
|
526 |
}
|
527 |
|
528 |
public function collection_shortcode($atts, $content = null)
|
529 |
{
|
530 |
$atts = shortcode_atts(array(
|
531 |
-
"id" => 0,
|
532 |
-
"name" => '',
|
533 |
-
"nocache" => false, // these are button options.
|
534 |
-
"mode" => "normal",
|
535 |
-
"style" => "footer",
|
536 |
),
|
537 |
-
|
538 |
$atts);
|
539 |
-
|
540 |
-
$id = intval($atts["id"]);
|
541 |
-
$name = sanitize_text_field($atts["name"]);
|
542 |
-
|
543 |
-
if ($id > 0)
|
544 |
$collection = maxCollections::getCollectionByID($id);
|
545 |
-
elseif ($atts["name"] != '')
|
546 |
$collection = maxCollections::getCollectionByName($name);
|
547 |
-
|
548 |
-
|
549 |
if ($collection)
|
550 |
return $collection->shortcode($atts,$content);
|
551 |
-
|
552 |
}
|
553 |
-
|
554 |
|
555 |
function plugin_action_links($links, $file) {
|
556 |
-
|
557 |
if ($file == plugin_basename(dirname(MAXBUTTONS_ROOT_FILE) . '/maxbuttons.php')) {
|
558 |
$label = __('Buttons', 'maxbuttons');
|
559 |
$dashboard_link = '<a href="' . admin_url() . 'admin.php?page=maxbuttons-controller&action=list">' . $label . '</a>';
|
@@ -568,139 +569,141 @@ class maxButtonsPlugin
|
|
568 |
if ($file == plugin_basename(dirname(__FILE__) . '/maxbuttons.php')) {
|
569 |
$links[] = sprintf(__('%sUpgrade to Pro Version%s', 'maxbuttons'), '<a href="http://maxbuttons.com/?ref=mbfree" target="_blank">', '</a>');
|
570 |
}
|
571 |
-
|
572 |
return $links;
|
573 |
}
|
574 |
|
575 |
|
576 |
function do_footer($id, $code, $type = "css")
|
577 |
{
|
578 |
-
|
579 |
-
$this->footer[$type][$id] = $code;
|
580 |
-
|
581 |
}
|
582 |
function footer()
|
583 |
{
|
584 |
if(count($this->footer) == 0) return; // nothing
|
585 |
-
|
586 |
-
foreach ($this->footer as $type => $part)
|
587 |
{
|
588 |
// add tag
|
589 |
-
if ($type == 'css')
|
590 |
{
|
591 |
echo "<!--email_off--><style type='text/css'>";
|
592 |
-
}
|
593 |
foreach ($part as $id => $statements)
|
594 |
{
|
595 |
-
if (strlen($statements) > 0) // prevent whitespace
|
596 |
-
echo $statements . "\n";
|
597 |
}
|
598 |
-
if ($type == 'css')
|
599 |
{
|
600 |
-
echo "</style><!--/email_off-->\n";
|
601 |
-
}
|
602 |
}
|
603 |
-
|
604 |
}
|
605 |
-
|
606 |
public function do_review_notice () {
|
607 |
-
|
608 |
-
$current_user_id = get_current_user_id();
|
|
|
|
|
609 |
$review = get_user_meta( $current_user_id, 'maxbuttons_review_notice' , true );
|
610 |
-
|
611 |
if ($review == '')
|
612 |
{
|
613 |
//$created = get_option("MBFREE_CREATED");
|
614 |
-
$show = time() + (7* DAY_IN_SECONDS);
|
615 |
update_user_meta($current_user_id, 'maxbuttons_review_notice', $show);
|
616 |
-
return;
|
617 |
}
|
618 |
|
619 |
-
|
620 |
$display_review = false;
|
621 |
-
|
622 |
-
if ($review == 'off')
|
623 |
-
{ return; // no show
|
624 |
-
|
625 |
}
|
626 |
elseif (is_numeric($review))
|
627 |
-
{
|
628 |
-
$now = time();
|
629 |
|
630 |
if ($now > $review)
|
631 |
-
{
|
632 |
$display_review = true;
|
633 |
|
634 |
}
|
635 |
}
|
636 |
-
|
637 |
-
// load style / script. It's seperated since it should show everywhere in admin.
|
638 |
if ($display_review)
|
639 |
{
|
640 |
add_action( 'admin_notices', array( maxUtils::namespaceit('maxAdmin'), 'mb_review_notice'));
|
641 |
-
wp_enqueue_style('maxbuttons-review-notice', $this->plugin_url . 'assets/css/review_notice.css');
|
642 |
-
wp_enqueue_script('maxbuttons-review-notice', $this->plugin_url . 'js/min/review-notice.js', array('jquery'),
|
643 |
|
644 |
-
$local = array();
|
645 |
$local["ajaxurl"] = admin_url( 'admin-ajax.php' );
|
646 |
wp_localize_script('maxbuttons-review-notice', 'mb_ajax_review', $local);
|
647 |
}
|
648 |
-
|
649 |
}
|
650 |
-
|
651 |
-
public function setReviewNoticeStatus()
|
652 |
{
|
653 |
-
$status = isset($_POST["status"]) ? sanitize_text_field($_POST["status"]) : '';
|
654 |
-
$current_user_id = get_current_user_id();
|
655 |
-
|
656 |
-
$updated = false;
|
657 |
-
|
658 |
-
if ($status == 'off')
|
659 |
{
|
660 |
-
$updated = true;
|
661 |
-
update_user_meta($current_user_id, 'maxbuttons_review_notice', 'off');
|
662 |
-
|
663 |
}
|
664 |
-
if ($status == 'later')
|
665 |
{
|
666 |
$updated = true;
|
667 |
-
$later = time() + (14 * DAY_IN_SECONDS );
|
668 |
-
|
669 |
-
update_user_meta($current_user_id, 'maxbuttons_review_notice', $later);
|
670 |
}
|
671 |
if ($status == 'reviewoffer-dismiss') // different ad!
|
672 |
{
|
673 |
-
$updated = true;
|
674 |
-
update_user_meta($current_user_id, 'maxbuttons_review_offer', 'off');
|
675 |
-
|
676 |
}
|
677 |
-
|
678 |
-
echo json_encode(array("updated" => $updated)) ;
|
679 |
-
|
680 |
-
exit();
|
681 |
}
|
682 |
-
|
683 |
-
/* Add a notice
|
684 |
-
|
685 |
-
The added notice will be displayed to the user in WordPress format.
|
686 |
@see display_notices
|
687 |
-
|
688 |
@param $type string message | notice | error | fatal
|
689 |
@param $message string User understandable message
|
690 |
-
|
691 |
*/
|
692 |
public static function add_notice($type, $message)
|
693 |
{
|
694 |
-
self::$notices[] = array("type" => $type,
|
695 |
"message" => $message
|
696 |
-
);
|
697 |
-
|
698 |
}
|
699 |
-
|
700 |
/* Display all notices
|
701 |
-
|
702 |
Then notices added by @see add_notice will be displayed. This function is called by an action hook
|
703 |
-
|
704 |
@param $echo echo the results or silently return.
|
705 |
@return string|null If not written to screen via echo, the HTML output will be returned
|
706 |
*/
|
@@ -708,26 +711,24 @@ class maxButtonsPlugin
|
|
708 |
{
|
709 |
|
710 |
if ($echo === '') $echo = true;
|
711 |
-
$notices = self::$notices;
|
712 |
-
$output = '';
|
713 |
if (count($notices) == 0)
|
714 |
return;
|
715 |
-
|
716 |
foreach($notices as $index => $notice)
|
717 |
{
|
718 |
-
$type = $notice["type"];
|
719 |
-
$message = $notice["message"];
|
720 |
-
$output .= "<div class='mb-message $type'> ";
|
721 |
-
$output .= $message ;
|
722 |
-
$output .= "</div>";
|
723 |
-
}
|
724 |
-
|
725 |
-
self::$notices = array(); // empty notices to prevent double display
|
726 |
-
|
727 |
-
if ($echo) echo $output;
|
728 |
else return $output;
|
729 |
}
|
730 |
-
|
731 |
-
} // class
|
732 |
-
|
733 |
|
|
8 |
{
|
9 |
|
10 |
protected $installed_version = 0;
|
11 |
+
protected $plugin_name;
|
12 |
protected $plugin_url;
|
13 |
protected $plugin_path;
|
14 |
protected $debug_mode = false;
|
15 |
protected $footer = array();
|
16 |
|
17 |
+
protected static $notices = array();
|
18 |
+
|
19 |
+
protected $mainClasses = array();
|
20 |
+
|
21 |
protected static $instance;
|
22 |
+
|
23 |
+
/* Class constructor
|
24 |
Add hooks and actions used by this plugin. Sets plugin environment information
|
25 |
*/
|
26 |
function __construct()
|
27 |
{
|
28 |
+
maxUtils::timeInit(); // benchmark timer init.
|
29 |
|
30 |
$this->plugin_url = self::get_plugin_url(); //plugins_url() . '/' . $this->plugin_name;
|
31 |
+
$this->plugin_path = self::get_plugin_path(); //plugin_dir_path($rootfile);
|
32 |
$this->plugin_name = trim(basename($this->plugin_path), '/');
|
33 |
+
|
34 |
+
$this->installed_version = get_option(MAXBUTTONS_VERSION_KEY);
|
35 |
+
|
36 |
if ( defined('MAXBUTTONS_DEBUG') && MAXBUTTONS_DEBUG)
|
37 |
$this->debug_mode = true;
|
38 |
+
|
39 |
add_action('plugins_loaded', array($this, 'load_textdomain'));
|
40 |
|
41 |
add_filter('widget_text', 'do_shortcode');
|
42 |
+
add_shortcode('maxbutton', array($this, 'shortcode'));
|
43 |
+
|
44 |
+
add_action("mb-footer", array($this, 'do_footer'),10,3);
|
45 |
+
add_action("wp_footer", array($this, "footer"));
|
46 |
|
|
|
|
|
|
|
47 |
// Media buttons
|
48 |
add_action('media_buttons', array($this,'media_button'));
|
49 |
|
50 |
add_filter('plugin_action_links', array($this, "plugin_action_links"), 10, 2);
|
51 |
add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 2);
|
52 |
+
|
53 |
if( is_admin())
|
54 |
+
{
|
55 |
add_action('admin_enqueue_scripts', array($this,'add_admin_styles'));
|
56 |
+
add_action('admin_enqueue_scripts', array($this,'add_admin_scripts'));
|
57 |
add_action('admin_enqueue_scripts', array(maxUtils::namespaceit('maxUtils'), 'fixFAConflict'),999);
|
58 |
+
|
59 |
add_action('admin_init', array($this,'register_settings' ));
|
60 |
+
|
61 |
add_action('admin_init', array($this, 'do_review_notice')); // Ask for review
|
62 |
+
add_action('admin_init', array(maxUtils::namespaceit('maxInstall'),'check_database'));
|
63 |
+
|
64 |
add_action('admin_menu', array($this, 'admin_menu'));
|
65 |
add_action('admin_footer', array($this, "footer"));
|
66 |
add_filter("admin_footer_text",array($this, "admin_footer_text"));
|
69 |
add_action("mb/editor/display_notices", array($this,"display_notices"), 99);
|
70 |
add_action("mb/collection/display_notices", array($this,"display_notices"), 99);
|
71 |
add_action('mb/header/display_notices', array($this, 'display_notices'), 99);
|
72 |
+
|
73 |
add_action("wp_ajax_getAjaxButtons", array(maxUtils::namespaceit('maxButtonsAdmin'), 'getAjaxButtons'));
|
74 |
+
add_action("wp_ajax_set_review_notice_status", array($this, "setReviewNoticeStatus"));
|
75 |
|
76 |
// Collection AJAX
|
77 |
+
add_action("wp_ajax_collection-edit", array(maxUtils::namespaceit("maxCollections"), "ajax_save"));
|
78 |
+
add_action('wp_ajax_mbpro_collection_block', array(maxUtils::namespaceit("maxCollections"), "ajax_action")); // all block level ajax stuff - for logged in users - backend
|
79 |
+
add_action('wp_ajax_mb_button_action', array(maxUtils::namespaceit('maxButtons'), "ajax_action"));
|
80 |
+
|
81 |
+
add_action('wp_ajax_maxajax', array(maxUtils::namespaceit('maxUtils'), 'ajax_action'));
|
82 |
}
|
83 |
// FRONT AJAX
|
84 |
add_action('wp_ajax_mbpro_collection_block_front', array(maxUtils::namespaceit("maxCollections"), "ajax_action_front")); // front end for all users
|
85 |
+
add_action('wp_ajax_nopriv_mbpro_collection_block_front', array(maxUtils::namespaceit("maxCollections"), "ajax_action_front"));
|
86 |
+
|
87 |
// front scripts
|
88 |
add_action('wp_enqueue_scripts', array($this, 'front_scripts'));
|
89 |
add_action('wp_enqueue_scripts', array(maxUtils::namespaceit('maxUtils'), 'fixFAConflict'),999);
|
90 |
+
|
91 |
$this->setMainClasses(); // struct for override functionality
|
92 |
+
|
93 |
+
// The second the blocks are being loaded, check dbase integrity
|
94 |
+
add_action("mb_blockclassesloaded", array($this, "check_database"));
|
95 |
+
|
96 |
// setup page hooks and shortcode
|
97 |
add_shortcode('maxcollection', array($this, 'collection_shortcode'));
|
98 |
+
if (! is_admin())
|
99 |
$hook_bool = maxCollections::setupHooks(); // setup the hooks to insert collections
|
100 |
|
101 |
self::$instance = $this;
|
102 |
+
maxIntegrations::init(); // fire the integrations.
|
103 |
}
|
104 |
+
|
105 |
public static function getInstance()
|
106 |
{
|
107 |
return self::$instance;
|
108 |
}
|
109 |
+
|
110 |
public function setMainClasses()
|
111 |
{
|
112 |
$classes = array(
|
113 |
"button" => "maxButton",
|
114 |
"buttons" => "maxButtons",
|
115 |
+
"block" => "maxBlock",
|
116 |
+
"admin" => "maxButtonsAdmin",
|
117 |
+
"install" => "maxInstall",
|
118 |
"groups" => "maxGroups",
|
119 |
+
"collections" => "maxCollections",
|
120 |
"collection" => "maxCollection",
|
121 |
"pack" => "maxPack",
|
122 |
|
123 |
+
);
|
124 |
+
|
125 |
+
$this->mainClasses = $classes;
|
126 |
}
|
127 |
+
|
128 |
// from block loader action. Checks if all parts of the table are there, or panic if not.
|
129 |
public function check_database($blocks)
|
130 |
{
|
131 |
maxUtils::addTime("Check database");
|
132 |
+
|
133 |
+
$sql = "SELECT id,name,status,cache, created ";
|
134 |
+
foreach ($blocks as $block => $class)
|
135 |
{
|
136 |
+
$sql .= ", $block";
|
137 |
+
}
|
138 |
+
$sql .= " from " . maxUtils::get_table_name() . " limit 1";
|
139 |
+
|
140 |
+
global $wpdb;
|
141 |
$wpdb->hide_errors();
|
142 |
+
$result = $wpdb->get_results($sql);
|
143 |
+
|
144 |
+
|
145 |
+
// check this query for errors. If there is an error, one or more database fields are missing. Fix that.
|
146 |
+
if (isset($wpdb->last_error) && $wpdb->last_error != '')
|
147 |
{
|
148 |
+
|
149 |
+
$install = $this->getClass("install");
|
150 |
$install::create_database_table();
|
151 |
$install::migrate();
|
152 |
}
|
153 |
+
|
154 |
+
|
155 |
maxUtils::addTime("End check database");
|
156 |
}
|
157 |
+
|
158 |
public function getClass($class)
|
159 |
{
|
160 |
|
161 |
+
if (isset($this->mainClasses[$class]))
|
162 |
{
|
163 |
+
$load_class = maxUtils::namespaceit($this->mainClasses[$class]);
|
164 |
if (method_exists($load_class,'getInstance'))
|
165 |
{
|
166 |
+
return $load_class::getInstance();
|
167 |
}
|
168 |
return new $load_class;
|
169 |
}
|
170 |
}
|
171 |
+
|
172 |
/* Load the plugin textdomain */
|
173 |
public function load_textdomain()
|
174 |
{
|
175 |
+
// see: http://geertdedeckere.be/article/loading-wordpress-language-files-the-right-way
|
176 |
$domain = 'maxbuttons';
|
177 |
// The "plugin_locale" filter is also used in load_plugin_textdomain()
|
178 |
$locale = apply_filters('plugin_locale', get_locale(), $domain);
|
179 |
|
180 |
+
load_textdomain($domain, WP_LANG_DIR.'/maxbuttons/'.$domain.'-'.$locale.'.mo');
|
181 |
$res = load_plugin_textdomain('maxbuttons', false, $this->plugin_name . '/languages/');
|
182 |
+
|
183 |
}
|
184 |
+
|
185 |
+
|
186 |
/** WP Settings framework. Registers settings used on maxbuttons-settings.php page */
|
187 |
public function register_settings()
|
188 |
{
|
189 |
register_setting( 'maxbuttons_settings', 'maxbuttons_user_level' );
|
190 |
register_setting( 'maxbuttons_settings', 'maxbuttons_noshowtinymce' );
|
191 |
+
register_setting( 'maxbuttons_settings', 'maxbuttons_minify' );
|
192 |
+
register_setting( 'maxbuttons_settings', 'maxbuttons_hidedescription' );
|
193 |
register_setting( 'maxbuttons_settings', 'maxbuttons_forcefa') ;
|
194 |
+
register_setting( 'maxbuttons_settings', 'maxbuttons_borderbox');
|
195 |
+
register_setting( 'maxbuttons_settings', 'maxbuttons_protocol');
|
196 |
}
|
197 |
+
|
198 |
+
protected function checkbox_option($options)
|
199 |
{
|
200 |
+
if (! isset($options["maxbuttons_minify"]))
|
201 |
+
$options["maxbuttons_minify"] = 0;
|
202 |
+
|
203 |
return $options;
|
204 |
+
|
205 |
}
|
206 |
|
207 |
/** Returns the full path of the plugin installation directory */
|
208 |
public static function get_plugin_path()
|
209 |
{
|
210 |
+
return plugin_dir_path(MAXBUTTONS_ROOT_FILE);
|
211 |
}
|
212 |
+
|
213 |
+
/** Returns the full URL of the plugin installation path */
|
214 |
public static function get_plugin_url()
|
215 |
{
|
216 |
$url = plugin_dir_url(MAXBUTTONS_ROOT_FILE);
|
217 |
return $url;
|
218 |
}
|
219 |
+
|
220 |
/** Returns the current installed version */
|
221 |
public function get_installed_version()
|
222 |
{
|
223 |
+
return $this->installed_version;
|
224 |
}
|
225 |
|
226 |
/** Installs and adds the main menu and the submenu items */
|
238 |
$capability = $maxbuttons_capabilities;
|
239 |
$admin_capability = 'manage_options';
|
240 |
$menu_slug = 'maxbuttons-controller';
|
241 |
+
$function = array($this, 'load_admin_page');
|
242 |
$icon_url = $this->plugin_url . 'images/mb-peach-icon.png';
|
243 |
+
$submenu_function = array($this, 'load_admin_page');
|
244 |
+
|
245 |
add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, 81);
|
246 |
+
|
247 |
// We add this submenu page with the same slug as the parent to ensure we don't get duplicates
|
248 |
$sub_menu_title = __('Buttons', 'maxbuttons');
|
249 |
$admin_pages[] = add_submenu_page($menu_slug, $page_title, $sub_menu_title, $capability, $menu_slug, $function);
|
250 |
+
|
251 |
// Now add the submenu page for the Add New page
|
252 |
$submenu_page_title = __('MaxButtons: Add/Edit Button', 'maxbuttons');
|
253 |
$submenu_title = __('Add New', 'maxbuttons');
|
260 |
$submenu_title = __('Social Share', 'maxbuttons');
|
261 |
$submenu_slug = 'maxbuttons-collections';
|
262 |
$admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function);
|
263 |
+
|
264 |
// Now add the submenu page for the Go Pro page
|
265 |
$submenu_page_title = __('MaxButtons: Upgrade to Pro', 'maxbuttons');
|
266 |
$submenu_title = __('Upgrade to Pro', 'maxbuttons');
|
281 |
$submenu_slug = 'maxbuttons-support';
|
282 |
//$submenu_function = 'maxbuttons_support';
|
283 |
$admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $admin_capability, $submenu_slug, $submenu_function);
|
284 |
+
|
285 |
+
}
|
286 |
+
|
287 |
function load_admin_page($page)
|
288 |
{
|
289 |
$page = sanitize_text_field($_GET["page"]);
|
290 |
+
|
291 |
+
switch($page)
|
292 |
{
|
293 |
+
case "maxbuttons-button":
|
294 |
+
$pagepath = "includes/maxbuttons-button.php";
|
295 |
break;
|
296 |
+
case "maxbuttons-support":
|
297 |
$pagepath = "includes/maxbuttons-support.php";
|
298 |
break;
|
299 |
+
case "maxbuttons-settings":
|
300 |
+
$pagepath = "includes/maxbuttons-settings.php";
|
301 |
break;
|
302 |
+
case "maxbuttons-pro":
|
303 |
+
$pagepath = "includes/maxbuttons-pro.php";
|
304 |
+
break;
|
305 |
+
case "maxbuttons-collections":
|
306 |
+
$pagepath = "includes/maxbuttons-collections.php";
|
307 |
break;
|
|
|
|
|
|
|
308 |
default:
|
309 |
+
$pagepath = "includes/maxbuttons-controller.php";
|
310 |
break;
|
311 |
}
|
312 |
+
$pagepath = $this->plugin_path . $pagepath;
|
313 |
+
|
314 |
+
include(apply_filters("mb-load-admin-page-$page", $pagepath));
|
315 |
}
|
316 |
|
317 |
|
318 |
+
function add_admin_styles($hook) {
|
319 |
+
// only hook in maxbuttons realm.
|
320 |
if ( strpos($hook,'maxbuttons') === false && $hook != 'post.php' && $hook != 'post-new.php' )
|
321 |
{
|
322 |
if (! isset($_GET['fl_builder'])) // exception for beaver builder
|
323 |
return;
|
324 |
}
|
325 |
+
|
326 |
+
$version = MAXBUTTONS_VERSION_NUM;
|
327 |
+
|
328 |
+
$fa_url = apply_filters("mb_fa_url", $this->plugin_url . 'assets/libraries/font-awesome/css/font-awesome.min.css', array(), $version);
|
329 |
if ($fa_url != false && $fa_url != '')
|
330 |
+
{
|
331 |
+
wp_register_style('mbpro-font-awesome', $fa_url, array(), $version);
|
332 |
+
wp_enqueue_style('mbpro-font-awesome');
|
333 |
}
|
334 |
+
|
335 |
+
wp_enqueue_style('wp-color-picker');
|
336 |
+
wp_enqueue_style('maxbuttons-css', $this->plugin_url . 'assets/css/style.css', array(), $version);
|
337 |
+
|
338 |
}
|
339 |
|
340 |
+
/** Add Admin scripts
|
341 |
*
|
342 |
* Uses WP hook for Admin scripts to add needed js.
|
343 |
*/
|
344 |
+
function add_admin_scripts($hook) {
|
345 |
// only hook in maxbuttons realm.
|
346 |
+
if ( strpos($hook,'maxbuttons') === false ) //&& $hook != 'post.php' && $hook != 'post-new.php'
|
347 |
return;
|
348 |
+
|
349 |
$version = MAXBUTTONS_VERSION_NUM;
|
350 |
+
|
351 |
+
$js_url = trailingslashit($this->plugin_url . 'js');
|
352 |
+
if (! $this->debug_mode)
|
353 |
+
$js_url .= 'min/';
|
354 |
+
|
355 |
+
|
356 |
wp_enqueue_script('jquery-ui-draggable');
|
|
|
|
|
357 |
|
358 |
+
wp_enqueue_script('maxbutton-admin', $js_url . 'maxbuttons-admin.js', array('jquery', 'jquery-ui-draggable', 'maxbuttons-tabs','maxbuttons-modal', 'wp-color-picker', 'underscore'),$version, true);
|
359 |
wp_enqueue_script('maxbutton-js-init', $js_url . 'init.js', array('maxbutton-admin','maxcollections','maxbuttons-modal'),$version, true);
|
360 |
+
wp_enqueue_script('maxbuttons-tabs', $js_url . 'maxtabs.js', array('jquery'),$version, true);
|
361 |
+
wp_enqueue_script('maxbuttons-responsive', $js_url . 'responsive.js', array('maxbutton-admin'), $version, true );
|
362 |
+
|
363 |
wp_register_script('maxbuttons-ajax', $js_url . 'maxajax.js', array('maxbutton-admin'), $version, true);
|
364 |
+
wp_localize_script('maxbuttons-ajax', 'maxajax',
|
365 |
array(
|
366 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
367 |
'ajax_action' => 'maxajax',
|
368 |
'nonce' => wp_create_nonce('maxajax'),
|
369 |
+
));
|
370 |
+
|
371 |
wp_enqueue_script('maxbuttons-ajax');
|
372 |
+
|
373 |
+
wp_register_script('maxcollections', $js_url . 'maxcollections.js',
|
374 |
+
array('jquery', 'maxbutton-admin', 'jquery-ui-sortable'),$version, true );
|
375 |
+
|
376 |
$local = array();
|
377 |
$local["ajaxurl"] = admin_url( 'admin-ajax.php' );
|
378 |
+
$local["maxurl"] = $this->plugin_url;
|
379 |
+
wp_localize_script('maxbutton-admin', 'mb_ajax', $local);
|
380 |
+
|
381 |
$local = array(
|
382 |
"leave_page" => __("You have unsaved data, are you sure you want to leave the page?","maxbuttons"),
|
383 |
+
'picker_title' => __('Select your buttons','maxbuttons'),
|
384 |
+
|
385 |
+
);
|
386 |
+
wp_localize_script('maxcollections', 'maxcol_wp', $local);
|
387 |
+
|
388 |
+
$this->load_modal_script();
|
389 |
+
|
390 |
+
wp_enqueue_script('maxcollections');
|
391 |
+
}
|
392 |
+
|
393 |
/** Load the Modal Script
|
394 |
* The modal script is the generic solution for all popups within the plugin.
|
395 |
*/
|
396 |
+
public function load_modal_script()
|
397 |
{
|
398 |
$version = MAXBUTTONS_VERSION_NUM;
|
399 |
+
$js_url = trailingslashit($this->plugin_url . 'js');
|
400 |
+
if (! $this->debug_mode)
|
401 |
+
$js_url .= 'min/';
|
402 |
+
|
403 |
+
wp_register_script('maxbuttons-modal', $js_url . 'maxmodal.js', array('jquery','jquery-ui-draggable'), $version, true);
|
404 |
+
// translations of controls and other elements that can be used in maxmodal
|
405 |
$translations = array(
|
406 |
+
'yes' => __("Yes","maxbuttons"),
|
407 |
+
'no' => __("No","maxbuttons"),
|
408 |
+
'ok' => __("OK","maxbuttons"),
|
409 |
+
'cancel' => __("Cancel","maxbuttons"),
|
410 |
+
);
|
411 |
+
wp_localize_script('maxbuttons-modal', 'modaltext', $translations);
|
412 |
+
wp_enqueue_script('maxbuttons-modal');
|
413 |
|
414 |
}
|
415 |
+
|
416 |
+
/** Load Media Buttons Script
|
417 |
+
*
|
418 |
+
* Useful for integrations that don't implement the media button but uses the media button JS for loading the button picker
|
419 |
+
*
|
420 |
*/
|
421 |
+
public function load_media_script()
|
422 |
{
|
423 |
$version = MAXBUTTONS_VERSION_NUM;
|
424 |
|
425 |
+
$js_url = trailingslashit($this->plugin_url . 'js');
|
426 |
+
if (! $this->debug_mode)
|
427 |
+
$js_url .= 'min/';
|
428 |
+
|
429 |
+
$fa_url = apply_filters("mb_fa_url", $this->plugin_url . 'assets/libraries/font-awesome/css/font-awesome.min.css');
|
430 |
if ($fa_url != false && $fa_url != '')
|
431 |
{
|
432 |
+
wp_register_style('mbpro-font-awesome', $fa_url, array(), $version);
|
433 |
+
wp_enqueue_style('mbpro-font-awesome');
|
434 |
}
|
435 |
+
|
436 |
+
wp_enqueue_script('mb-media-button', $js_url . 'maxbuttons_media_button.js', array('jquery', 'maxbuttons-modal'), $version, true);
|
437 |
$this->load_modal_script();
|
438 |
+
|
439 |
$translations = array(
|
440 |
+
'insert' => __('Insert Button into Editor', 'maxbuttons'),
|
441 |
+
'loading' => __("Loading your buttons","maxbuttons"),
|
442 |
+
'select' => __('Click on a button from the list below to place the button shortcode in the editor.', 'maxbuttons'),
|
443 |
+
'cancel' => __('Cancel', 'maxbuttons'),
|
444 |
+
'windowtitle' => __("Select a MaxButton","maxbuttons"),
|
445 |
+
'icon' => $this->plugin_url . 'images/mb-peach-32.png',
|
446 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
447 |
+
'short_url_label' => __('Button URL', 'maxbuttons'),
|
448 |
'short_text_label' => __('Button Text', 'maxbuttons'),
|
449 |
'short_options_explain' => __('If you want to change the URL or Text of the Button, enter the appropiate field. If you want to use the button values, just click Add to editor', 'maxbuttons'),
|
450 |
+
'short_add_button' => __('Add to Editor', 'maxbuttons'),
|
451 |
+
);
|
452 |
+
|
453 |
+
wp_localize_script('mb-media-button','mbtrans', $translations);
|
454 |
}
|
455 |
+
|
456 |
/** Load Media Button in WP editor
|
457 |
*
|
458 |
* The 'add button' interface in WP post and page editor to simplify adding buttons. Loads button plus required Javascript.
|
460 |
function media_button($editor_id) {
|
461 |
$output = '';
|
462 |
|
463 |
+
// options
|
464 |
if (get_option('maxbuttons_noshowtinymce') == 1) return;
|
465 |
|
466 |
$this->load_media_script();
|
470 |
$title = __('Add Button', 'maxbuttons');
|
471 |
$icon = $this->plugin_url . 'images/mb-peach-icon.png';
|
472 |
$img = '<span class="wp-media-buttons-icon" style="background-image: url(' . $icon . '); width: 16px; height: 16px; margin-top: 1px;"></span>';
|
473 |
+
$output = '<a href="javascript:void(0);" class="button maxbutton_media_button" data-callback="window.maxMedia.showShortcodeOptions" title="' . $title . '" style="padding-left: .4em;">' . $img . ' ' . $title . '</a>';
|
474 |
|
475 |
echo $output;
|
476 |
}
|
477 |
+
|
478 |
+
/** Scripts run on front-end
|
479 |
+
* Load font-awesome, and limited javascript for the front-end. This is being kept extremely limited for performance reasons.
|
480 |
*/
|
481 |
+
public function front_scripts()
|
482 |
{
|
483 |
+
$version = MAXBUTTONS_VERSION_NUM;
|
484 |
+
|
485 |
+
$fa_url = apply_filters("mb_fa_url", $this->plugin_url . 'assets/libraries/font-awesome/css/font-awesome.min.css');
|
486 |
if ($fa_url != false && $fa_url != '')
|
487 |
{
|
488 |
+
wp_register_style('mbpro-font-awesome', $fa_url, array(), $version);
|
489 |
+
wp_enqueue_style('mbpro-font-awesome');
|
490 |
+
}
|
491 |
+
|
492 |
// load backend script on front in Beaver Builder
|
493 |
if (isset($_GET['fl_builder']))
|
494 |
{
|
495 |
+
$this->add_admin_styles('maxbuttons');
|
496 |
}
|
497 |
+
|
498 |
+
wp_enqueue_script('maxbuttons-front', $this->plugin_url . 'js/min/front.js', array('jquery'), $version);
|
499 |
+
$local = array();
|
500 |
$local["ajaxurl"] = admin_url( 'admin-ajax.php' );
|
501 |
|
502 |
+
wp_localize_script('maxbuttons-front', 'mb_ajax', $local);
|
503 |
}
|
504 |
+
|
505 |
+
/** Extra text to display in admin footer */
|
506 |
function admin_footer_text($text)
|
507 |
{
|
508 |
if (! isset($_GET["page"]))
|
509 |
return $text;
|
510 |
+
|
511 |
if ( strpos($_GET["page"],'maxbuttons') === false)
|
512 |
+
return $text;
|
513 |
$text = '';
|
514 |
|
515 |
+
$text .= sprintf("If you like MaxButtons please give us a %s★★★★★%s rating!",
|
516 |
+
"<a href='https://wordpress.org/support/view/plugin-reviews/maxbuttons#postform' target='_blank'>",
|
517 |
+
"</a>") ;
|
518 |
+
return $text;
|
519 |
+
|
520 |
}
|
521 |
+
|
522 |
+
|
523 |
+
function shortcode($atts)
|
524 |
{
|
525 |
$button = $this->getClass("button");
|
526 |
+
return $button->shortcode($atts);
|
527 |
}
|
528 |
|
529 |
public function collection_shortcode($atts, $content = null)
|
530 |
{
|
531 |
$atts = shortcode_atts(array(
|
532 |
+
"id" => 0,
|
533 |
+
"name" => '',
|
534 |
+
"nocache" => false, // these are button options.
|
535 |
+
"mode" => "normal",
|
536 |
+
"style" => "footer",
|
537 |
),
|
538 |
+
|
539 |
$atts);
|
540 |
+
|
541 |
+
$id = intval($atts["id"]);
|
542 |
+
$name = sanitize_text_field($atts["name"]);
|
543 |
+
|
544 |
+
if ($id > 0)
|
545 |
$collection = maxCollections::getCollectionByID($id);
|
546 |
+
elseif ($atts["name"] != '')
|
547 |
$collection = maxCollections::getCollectionByName($name);
|
548 |
+
|
549 |
+
|
550 |
if ($collection)
|
551 |
return $collection->shortcode($atts,$content);
|
552 |
+
|
553 |
}
|
554 |
+
|
555 |
|
556 |
function plugin_action_links($links, $file) {
|
557 |
+
|
558 |
if ($file == plugin_basename(dirname(MAXBUTTONS_ROOT_FILE) . '/maxbuttons.php')) {
|
559 |
$label = __('Buttons', 'maxbuttons');
|
560 |
$dashboard_link = '<a href="' . admin_url() . 'admin.php?page=maxbuttons-controller&action=list">' . $label . '</a>';
|
569 |
if ($file == plugin_basename(dirname(__FILE__) . '/maxbuttons.php')) {
|
570 |
$links[] = sprintf(__('%sUpgrade to Pro Version%s', 'maxbuttons'), '<a href="http://maxbuttons.com/?ref=mbfree" target="_blank">', '</a>');
|
571 |
}
|
572 |
+
|
573 |
return $links;
|
574 |
}
|
575 |
|
576 |
|
577 |
function do_footer($id, $code, $type = "css")
|
578 |
{
|
579 |
+
|
580 |
+
$this->footer[$type][$id] = $code;
|
581 |
+
|
582 |
}
|
583 |
function footer()
|
584 |
{
|
585 |
if(count($this->footer) == 0) return; // nothing
|
586 |
+
|
587 |
+
foreach ($this->footer as $type => $part)
|
588 |
{
|
589 |
// add tag
|
590 |
+
if ($type == 'css')
|
591 |
{
|
592 |
echo "<!--email_off--><style type='text/css'>";
|
593 |
+
}
|
594 |
foreach ($part as $id => $statements)
|
595 |
{
|
596 |
+
if (strlen($statements) > 0) // prevent whitespace
|
597 |
+
echo $statements . "\n";
|
598 |
}
|
599 |
+
if ($type == 'css')
|
600 |
{
|
601 |
+
echo "</style><!--/email_off-->\n";
|
602 |
+
}
|
603 |
}
|
604 |
+
|
605 |
}
|
606 |
+
|
607 |
public function do_review_notice () {
|
608 |
+
|
609 |
+
$current_user_id = get_current_user_id();
|
610 |
+
$version = MAXBUTTONS_VERSION_NUM;
|
611 |
+
|
612 |
$review = get_user_meta( $current_user_id, 'maxbuttons_review_notice' , true );
|
613 |
+
|
614 |
if ($review == '')
|
615 |
{
|
616 |
//$created = get_option("MBFREE_CREATED");
|
617 |
+
$show = time() + (7* DAY_IN_SECONDS);
|
618 |
update_user_meta($current_user_id, 'maxbuttons_review_notice', $show);
|
619 |
+
return;
|
620 |
}
|
621 |
|
622 |
+
|
623 |
$display_review = false;
|
624 |
+
|
625 |
+
if ($review == 'off')
|
626 |
+
{ return; // no show
|
627 |
+
|
628 |
}
|
629 |
elseif (is_numeric($review))
|
630 |
+
{
|
631 |
+
$now = time();
|
632 |
|
633 |
if ($now > $review)
|
634 |
+
{
|
635 |
$display_review = true;
|
636 |
|
637 |
}
|
638 |
}
|
639 |
+
|
640 |
+
// load style / script. It's seperated since it should show everywhere in admin.
|
641 |
if ($display_review)
|
642 |
{
|
643 |
add_action( 'admin_notices', array( maxUtils::namespaceit('maxAdmin'), 'mb_review_notice'));
|
644 |
+
wp_enqueue_style('maxbuttons-review-notice', $this->plugin_url . 'assets/css/review_notice.css', array(), $version);
|
645 |
+
wp_enqueue_script('maxbuttons-review-notice', $this->plugin_url . 'js/min/review-notice.js', array('jquery'), $version);
|
646 |
|
647 |
+
$local = array();
|
648 |
$local["ajaxurl"] = admin_url( 'admin-ajax.php' );
|
649 |
wp_localize_script('maxbuttons-review-notice', 'mb_ajax_review', $local);
|
650 |
}
|
651 |
+
|
652 |
}
|
653 |
+
|
654 |
+
public function setReviewNoticeStatus()
|
655 |
{
|
656 |
+
$status = isset($_POST["status"]) ? sanitize_text_field($_POST["status"]) : '';
|
657 |
+
$current_user_id = get_current_user_id();
|
658 |
+
|
659 |
+
$updated = false;
|
660 |
+
|
661 |
+
if ($status == 'off')
|
662 |
{
|
663 |
+
$updated = true;
|
664 |
+
update_user_meta($current_user_id, 'maxbuttons_review_notice', 'off');
|
665 |
+
|
666 |
}
|
667 |
+
if ($status == 'later')
|
668 |
{
|
669 |
$updated = true;
|
670 |
+
$later = time() + (14 * DAY_IN_SECONDS );
|
671 |
+
|
672 |
+
update_user_meta($current_user_id, 'maxbuttons_review_notice', $later);
|
673 |
}
|
674 |
if ($status == 'reviewoffer-dismiss') // different ad!
|
675 |
{
|
676 |
+
$updated = true;
|
677 |
+
update_user_meta($current_user_id, 'maxbuttons_review_offer', 'off');
|
678 |
+
|
679 |
}
|
680 |
+
|
681 |
+
echo json_encode(array("updated" => $updated)) ;
|
682 |
+
|
683 |
+
exit();
|
684 |
}
|
685 |
+
|
686 |
+
/* Add a notice
|
687 |
+
|
688 |
+
The added notice will be displayed to the user in WordPress format.
|
689 |
@see display_notices
|
690 |
+
|
691 |
@param $type string message | notice | error | fatal
|
692 |
@param $message string User understandable message
|
693 |
+
|
694 |
*/
|
695 |
public static function add_notice($type, $message)
|
696 |
{
|
697 |
+
self::$notices[] = array("type" => $type,
|
698 |
"message" => $message
|
699 |
+
);
|
700 |
+
|
701 |
}
|
702 |
+
|
703 |
/* Display all notices
|
704 |
+
|
705 |
Then notices added by @see add_notice will be displayed. This function is called by an action hook
|
706 |
+
|
707 |
@param $echo echo the results or silently return.
|
708 |
@return string|null If not written to screen via echo, the HTML output will be returned
|
709 |
*/
|
711 |
{
|
712 |
|
713 |
if ($echo === '') $echo = true;
|
714 |
+
$notices = self::$notices;
|
715 |
+
$output = '';
|
716 |
if (count($notices) == 0)
|
717 |
return;
|
718 |
+
|
719 |
foreach($notices as $index => $notice)
|
720 |
{
|
721 |
+
$type = $notice["type"];
|
722 |
+
$message = $notice["message"];
|
723 |
+
$output .= "<div class='mb-message $type'> ";
|
724 |
+
$output .= $message ;
|
725 |
+
$output .= "</div>";
|
726 |
+
}
|
727 |
+
|
728 |
+
self::$notices = array(); // empty notices to prevent double display
|
729 |
+
|
730 |
+
if ($echo) echo $output;
|
731 |
else return $output;
|
732 |
}
|
|
|
|
|
|
|
733 |
|
734 |
+
} // class
|
includes/maxbuttons-button.php
CHANGED
@@ -3,72 +3,72 @@ namespace MaxButtons;
|
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
|
5 |
$button = MB()->getClass("button"); //new maxButton();
|
6 |
-
$button_id = 0;
|
7 |
|
8 |
if ($_POST) {
|
9 |
if (! check_admin_referer("button-edit","maxbuttons_button"))
|
10 |
{
|
11 |
-
exit("Request not valid");
|
12 |
-
}
|
13 |
-
|
14 |
-
$button_id = intval($_POST["button_id"]);
|
15 |
|
16 |
-
if ($button_id > 0)
|
17 |
$button->set($button_id);
|
18 |
-
$return = $button->save($_POST);
|
19 |
-
if (is_int($return) && $button_id <= 0)
|
20 |
$button_id = $return;
|
21 |
-
|
22 |
-
if ($button_id === 0)
|
23 |
{
|
24 |
-
error_log(__("Maxbuttons Error: Button id should never be zero","maxbuttons"));
|
25 |
-
|
26 |
}
|
27 |
-
|
28 |
-
$button->set($button_id);
|
29 |
wp_redirect(admin_url('admin.php?page=maxbuttons-controller&action=button&id=' . $button_id));
|
30 |
exit();
|
31 |
}
|
32 |
-
|
33 |
-
if (isset($_GET['id']) && $_GET['id'] != '') {
|
34 |
$button = MB()->getClass('button'); // reset
|
35 |
-
$button_id = intval($_GET["id"]);
|
36 |
-
if ($button_id == 0)
|
37 |
{
|
38 |
$error = __("Maxbuttons button id is zero. Your data is not saved correctly! Please check your database.","maxbuttons");
|
39 |
-
MB()->add_notice('error', $error);
|
40 |
}
|
41 |
// returns bool
|
42 |
$return = $button->set($button_id);
|
43 |
if ($return === false)
|
44 |
{
|
45 |
$error = __("MaxButtons could not find this button in the database. It might not be possible to save this button! Please check your database or contact support! ", "maxbuttons");
|
46 |
-
MB()->add_notice('error', $error);
|
47 |
}
|
48 |
}
|
49 |
|
50 |
-
|
51 |
-
$admin = MB()->getClass('admin');
|
52 |
-
$page_title = __("Button editor","maxbuttons");
|
53 |
$action = "<a class='page-title-action add-new-h2' href='" . admin_url() . "admin.php?page=maxbuttons-controller&action=edit'>" . __('Add New', 'maxbuttons') . "</a>";
|
54 |
$admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
55 |
-
?>
|
56 |
<form id="new-button-form" action="<?php echo admin_url('admin.php?page=maxbuttons-controller&action=button&noheader=true'); ?>" method="post">
|
57 |
-
<input type="hidden" name="button_id" value="<?php echo $button_id ?>">
|
58 |
<?php wp_nonce_field("button-edit","maxbuttons_button") ?>
|
59 |
-
<?php wp_nonce_field("button-copy","copy_nonce"); ?>
|
60 |
-
<?php wp_nonce_field("button-delete","delete_nonce"); ?>
|
61 |
-
<?php wp_nonce_field('button-trash', 'trash_nonce'); ?>
|
62 |
-
|
63 |
-
<div class="form-actions">
|
64 |
<a class="button-primary button button-save" href='javascript:void(0);'><?php _e('Save', 'maxbuttons') ?></a>
|
65 |
-
<?php if ($button_id > 0): ?>
|
66 |
<a id="button-copy" class="maxmodal button" data-modal='copy-button' href="javascript:void(0)"><?php _e('Copy', 'maxbuttons') ?></a>
|
67 |
<a id="button-trash" class="maxmodal button" data-modal = 'trash-button' href="javascript:void(0);"><?php _e('Move to Trash', 'maxbuttons') ?></a>
|
68 |
<a class="button maxmodal" href="javascript:void(0);" data-modal='delete-button'><?php _e("Delete","maxbuttons"); ?> </a>
|
69 |
-
<?php endif; // button_id > 0 ?>
|
70 |
-
|
71 |
-
<?php do_action('mb/editor/form-actions', $button); ?>
|
72 |
</div>
|
73 |
|
74 |
<!-- delete modal -->
|
@@ -78,9 +78,9 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
|
78 |
<div class='controls'>
|
79 |
<button type="button" class='button-primary' data-buttonaction='delete' data-buttonid='<?php echo $button_id ?>'>
|
80 |
<?php _e('Yes','maxbuttons'); ?></button>
|
81 |
-
|
82 |
<a class="modal_close button-primary"><?php _e("No", "maxbuttons"); ?></a>
|
83 |
-
|
84 |
</div>
|
85 |
</div>
|
86 |
|
@@ -91,38 +91,38 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
|
91 |
<div class='controls'>
|
92 |
<button type="button" class='button-primary' data-buttonaction='trash' data-buttonid='<?php echo $button_id ?>'>
|
93 |
<?php _e('Yes','maxbuttons'); ?></button>
|
94 |
-
|
95 |
<a class="modal_close button-primary"><?php _e("No", "maxbuttons"); ?></a>
|
96 |
-
|
97 |
</div>
|
98 |
</div>
|
99 |
-
|
100 |
<!-- copy modal -->
|
101 |
-
<div class='maxmodal-data' id='copy-button' data-load='window.maxFoundry.maxadmin.checkCopyModal'>
|
102 |
<span class='title'><?php _e("Copy this button","maxbuttons"); ?></span>
|
103 |
<span class="content">
|
104 |
-
|
105 |
-
<div class='copy-warning'>
|
106 |
<h3><?php _e('Probably you don\'t want to copy your button!', 'maxbuttons'); ?></h3>
|
107 |
<p><?php _e( sprintf("Changing %sText%s and %sURL%s can be done with the same button. %s This will save you time in the near future", "<b>","</b>","<b>","</b>","<br>"),'maxbuttons'); ?> </p>
|
108 |
-
|
109 |
<p class="example">
|
110 |
-
|
111 |
<strong><?php _e("Add the same button with different link","maxbuttons"); ?></strong><br>
|
112 |
[maxbutton id="<?php echo $button_id ?>" url="http://yoururl"]
|
113 |
</p>
|
114 |
-
|
115 |
<p class="example"><strong><?php _e("Use the same button but change the text","maxbuttons"); ?> </strong><br />
|
116 |
[maxbutton id="<?php echo $button_id ?>" text="yourtext"]
|
117 |
-
</p>
|
118 |
|
119 |
<p class="example"><strong><?php _e("Both","maxbuttons"); ?> </strong><br />
|
120 |
[maxbutton id="<?php echo $button_id ?>" text="yourtext" url="http://yoururl"]
|
121 |
-
</p>
|
122 |
-
|
123 |
</div>
|
124 |
|
125 |
-
|
126 |
<div class='mb-message mb-notice copy-notice hidden'><p><?php _e('Your button has not been saved. Any changes will be lost!','maxbuttons'); ?></p>
|
127 |
</div>
|
128 |
<p><?php _e("Do you want to copy this button to a new button?","maxbuttons"); ?></p>
|
@@ -134,111 +134,114 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
|
134 |
<a class='button modal_close'><?php _e("Cancel",'maxbuttons'); ?></a>
|
135 |
</span>
|
136 |
</div>
|
137 |
-
|
138 |
<?php
|
139 |
/** Display admin notices [deprecated]
|
140 |
* @ignore
|
141 |
*/
|
142 |
-
|
143 |
-
|
144 |
-
/** Display admin notices
|
145 |
*
|
146 |
-
* Hook to display admin notices on error and other occurences in the editor. Follows WP guidelines on format.
|
147 |
-
* @since 4.20
|
148 |
*/
|
149 |
-
do_action("mb/editor/display_notices");
|
150 |
-
?>
|
151 |
-
|
152 |
<?php if ($button_id > 0): ?>
|
153 |
<div class="mb-message shortcode">
|
154 |
<?php $button_name = $button->getName();
|
155 |
|
156 |
?>
|
157 |
<?php _e('To use this button, place the following shortcode anywhere you want it to appear in your site content:', 'maxbuttons') ?>
|
158 |
-
<strong>[maxbutton id="<?php echo $button_id ?>"]</strong>
|
159 |
-
|
|
|
|
|
|
|
160 |
<span class="dashicons-before dashicons-arrow-down"></span>
|
161 |
-
</span>
|
162 |
-
|
163 |
<div class="expanded">
|
164 |
-
<p class="example">
|
165 |
<strong><?php _e("Add a button by using the button name","maxbuttons"); ?></strong>
|
166 |
-
[maxbutton name="<?php echo $button_name; ?>"]
|
167 |
-
</p>
|
168 |
<p class="example">
|
169 |
-
<strong><?php _e("
|
170 |
[maxbutton id="<?php echo $button_id ?>" url="http://yoururl"]
|
171 |
</p>
|
172 |
-
|
173 |
-
<p class="example"><strong><?php _e("
|
174 |
[maxbutton id="<?php echo $button_id ?>" text="yourtext"]
|
175 |
</p>
|
176 |
<p class="example"><strong><?php _e("All possible shortcode options","maxbuttons"); ?></strong>
|
177 |
-
[maxbutton id="<?php echo $button_id ?>" text="yourtext" url="http://yoururl" window="new" nofollow="true"]
|
178 |
</p>
|
179 |
-
|
180 |
<h4><?php _e("Some tips","maxbuttons"); ?></h4>
|
181 |
-
<p><?php _e("If you use this button on a static page, on multiple pages, or upload your theme to another WordPress installation choose an unique name and use ",
|
182 |
"maxbuttons"); ?> <strong>[maxbutton name='my-buy-button' url='http://yoururl']</strong>.
|
183 |
|
184 |
-
|
185 |
<?php _e("By using this syntax when you edit and save your button it will be changed everywhere it is used on your site. If you delete the button and create a new one with the same name the new button will be used on your site.","maxbuttons"); ?>
|
186 |
</p>
|
187 |
-
|
188 |
</div>
|
189 |
</div>
|
190 |
<?php endif; ?>
|
191 |
|
192 |
<div class="output">
|
193 |
<div class="header"><?php _e('Preview', 'maxbuttons') ?>
|
194 |
-
<span class='preview-toggle dashicons dashicons-arrow-up'> </span>
|
195 |
</div>
|
196 |
-
<?php
|
197 |
-
$border_box = get_option('maxbuttons_borderbox');
|
198 |
-
$boxclass = '';
|
199 |
if ($border_box == 1) // box-sizing option.
|
200 |
-
$boxclass = 'preview-border-box';
|
201 |
?>
|
202 |
<div class="inner">
|
203 |
-
|
204 |
<p><?php _e('The top is the normal button, the bottom one is the hover.', 'maxbuttons') ?></p>
|
205 |
<div class="result <?php echo $boxclass ?>">
|
206 |
|
207 |
-
<?php $button->display(array("mode" => 'editor', "load_css" => "element")); ?>
|
208 |
-
|
209 |
<p> </p>
|
210 |
-
|
211 |
-
<?php $button->display(array("mode" => 'editor', "preview_part" => ":hover", "load_css" => "element")); ?>
|
212 |
-
|
213 |
-
<?php $button->display_field_map(); ?>
|
214 |
</div>
|
215 |
-
|
216 |
<input type='hidden' id='colorpicker_current' value=''>
|
217 |
-
|
218 |
-
<div class="input mbcolor preview nodrag">
|
219 |
-
<input type="text" name="button_preview" id="button_preview" class="color-field">
|
220 |
</div>
|
221 |
-
|
222 |
<div class="note"><?php _e('Change this color to see your button on a different background.', 'maxbuttons') ?></div>
|
223 |
<input type="hidden" id="button_preview" value='' />
|
224 |
<input style="display: none;" type="text" id="button_output" name="button_output" value="" />
|
225 |
|
226 |
<div class="clear"></div>
|
227 |
-
</div> <!-- inner -->
|
228 |
-
</div> <!-- output -->
|
229 |
-
|
230 |
-
<?php #### STARTING FIELDS;
|
231 |
-
|
232 |
-
|
233 |
$button->admin_fields();
|
234 |
-
|
235 |
-
?>
|
236 |
|
237 |
-
|
|
|
|
|
238 |
<a href="#" class="button-primary button-save"><?php _e('Save', 'maxbuttons') ?></a>
|
239 |
</div>
|
240 |
</form>
|
241 |
|
242 |
-
|
243 |
</div>
|
244 |
-
<?php $admin->get_footer(); ?>
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
|
5 |
$button = MB()->getClass("button"); //new maxButton();
|
6 |
+
$button_id = 0;
|
7 |
|
8 |
if ($_POST) {
|
9 |
if (! check_admin_referer("button-edit","maxbuttons_button"))
|
10 |
{
|
11 |
+
exit("Request not valid");
|
12 |
+
}
|
13 |
+
|
14 |
+
$button_id = intval($_POST["button_id"]);
|
15 |
|
16 |
+
if ($button_id > 0)
|
17 |
$button->set($button_id);
|
18 |
+
$return = $button->save($_POST);
|
19 |
+
if (is_int($return) && $button_id <= 0)
|
20 |
$button_id = $return;
|
21 |
+
|
22 |
+
if ($button_id === 0)
|
23 |
{
|
24 |
+
error_log(__("Maxbuttons Error: Button id should never be zero","maxbuttons"));
|
25 |
+
|
26 |
}
|
27 |
+
|
28 |
+
$button->set($button_id);
|
29 |
wp_redirect(admin_url('admin.php?page=maxbuttons-controller&action=button&id=' . $button_id));
|
30 |
exit();
|
31 |
}
|
32 |
+
|
33 |
+
if (isset($_GET['id']) && $_GET['id'] != '') {
|
34 |
$button = MB()->getClass('button'); // reset
|
35 |
+
$button_id = intval($_GET["id"]);
|
36 |
+
if ($button_id == 0)
|
37 |
{
|
38 |
$error = __("Maxbuttons button id is zero. Your data is not saved correctly! Please check your database.","maxbuttons");
|
39 |
+
MB()->add_notice('error', $error);
|
40 |
}
|
41 |
// returns bool
|
42 |
$return = $button->set($button_id);
|
43 |
if ($return === false)
|
44 |
{
|
45 |
$error = __("MaxButtons could not find this button in the database. It might not be possible to save this button! Please check your database or contact support! ", "maxbuttons");
|
46 |
+
MB()->add_notice('error', $error);
|
47 |
}
|
48 |
}
|
49 |
|
50 |
+
|
51 |
+
$admin = MB()->getClass('admin');
|
52 |
+
$page_title = __("Button editor","maxbuttons");
|
53 |
$action = "<a class='page-title-action add-new-h2' href='" . admin_url() . "admin.php?page=maxbuttons-controller&action=edit'>" . __('Add New', 'maxbuttons') . "</a>";
|
54 |
$admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
55 |
+
?>
|
56 |
<form id="new-button-form" action="<?php echo admin_url('admin.php?page=maxbuttons-controller&action=button&noheader=true'); ?>" method="post">
|
57 |
+
<input type="hidden" name="button_id" value="<?php echo $button_id ?>">
|
58 |
<?php wp_nonce_field("button-edit","maxbuttons_button") ?>
|
59 |
+
<?php wp_nonce_field("button-copy","copy_nonce"); ?>
|
60 |
+
<?php wp_nonce_field("button-delete","delete_nonce"); ?>
|
61 |
+
<?php wp_nonce_field('button-trash', 'trash_nonce'); ?>
|
62 |
+
|
63 |
+
<div class="form-actions">
|
64 |
<a class="button-primary button button-save" href='javascript:void(0);'><?php _e('Save', 'maxbuttons') ?></a>
|
65 |
+
<?php if ($button_id > 0): ?>
|
66 |
<a id="button-copy" class="maxmodal button" data-modal='copy-button' href="javascript:void(0)"><?php _e('Copy', 'maxbuttons') ?></a>
|
67 |
<a id="button-trash" class="maxmodal button" data-modal = 'trash-button' href="javascript:void(0);"><?php _e('Move to Trash', 'maxbuttons') ?></a>
|
68 |
<a class="button maxmodal" href="javascript:void(0);" data-modal='delete-button'><?php _e("Delete","maxbuttons"); ?> </a>
|
69 |
+
<?php endif; // button_id > 0 ?>
|
70 |
+
|
71 |
+
<?php do_action('mb/editor/form-actions', $button); ?>
|
72 |
</div>
|
73 |
|
74 |
<!-- delete modal -->
|
78 |
<div class='controls'>
|
79 |
<button type="button" class='button-primary' data-buttonaction='delete' data-buttonid='<?php echo $button_id ?>'>
|
80 |
<?php _e('Yes','maxbuttons'); ?></button>
|
81 |
+
|
82 |
<a class="modal_close button-primary"><?php _e("No", "maxbuttons"); ?></a>
|
83 |
+
|
84 |
</div>
|
85 |
</div>
|
86 |
|
91 |
<div class='controls'>
|
92 |
<button type="button" class='button-primary' data-buttonaction='trash' data-buttonid='<?php echo $button_id ?>'>
|
93 |
<?php _e('Yes','maxbuttons'); ?></button>
|
94 |
+
|
95 |
<a class="modal_close button-primary"><?php _e("No", "maxbuttons"); ?></a>
|
96 |
+
|
97 |
</div>
|
98 |
</div>
|
99 |
+
|
100 |
<!-- copy modal -->
|
101 |
+
<div class='maxmodal-data' id='copy-button' data-load='window.maxFoundry.maxadmin.checkCopyModal'>
|
102 |
<span class='title'><?php _e("Copy this button","maxbuttons"); ?></span>
|
103 |
<span class="content">
|
104 |
+
|
105 |
+
<div class='copy-warning'>
|
106 |
<h3><?php _e('Probably you don\'t want to copy your button!', 'maxbuttons'); ?></h3>
|
107 |
<p><?php _e( sprintf("Changing %sText%s and %sURL%s can be done with the same button. %s This will save you time in the near future", "<b>","</b>","<b>","</b>","<br>"),'maxbuttons'); ?> </p>
|
108 |
+
|
109 |
<p class="example">
|
110 |
+
|
111 |
<strong><?php _e("Add the same button with different link","maxbuttons"); ?></strong><br>
|
112 |
[maxbutton id="<?php echo $button_id ?>" url="http://yoururl"]
|
113 |
</p>
|
114 |
+
|
115 |
<p class="example"><strong><?php _e("Use the same button but change the text","maxbuttons"); ?> </strong><br />
|
116 |
[maxbutton id="<?php echo $button_id ?>" text="yourtext"]
|
117 |
+
</p>
|
118 |
|
119 |
<p class="example"><strong><?php _e("Both","maxbuttons"); ?> </strong><br />
|
120 |
[maxbutton id="<?php echo $button_id ?>" text="yourtext" url="http://yoururl"]
|
121 |
+
</p>
|
122 |
+
|
123 |
</div>
|
124 |
|
125 |
+
|
126 |
<div class='mb-message mb-notice copy-notice hidden'><p><?php _e('Your button has not been saved. Any changes will be lost!','maxbuttons'); ?></p>
|
127 |
</div>
|
128 |
<p><?php _e("Do you want to copy this button to a new button?","maxbuttons"); ?></p>
|
134 |
<a class='button modal_close'><?php _e("Cancel",'maxbuttons'); ?></a>
|
135 |
</span>
|
136 |
</div>
|
137 |
+
|
138 |
<?php
|
139 |
/** Display admin notices [deprecated]
|
140 |
* @ignore
|
141 |
*/
|
142 |
+
|
143 |
+
|
144 |
+
/** Display admin notices
|
145 |
*
|
146 |
+
* Hook to display admin notices on error and other occurences in the editor. Follows WP guidelines on format.
|
147 |
+
* @since 4.20
|
148 |
*/
|
149 |
+
do_action("mb/editor/display_notices");
|
150 |
+
?>
|
151 |
+
|
152 |
<?php if ($button_id > 0): ?>
|
153 |
<div class="mb-message shortcode">
|
154 |
<?php $button_name = $button->getName();
|
155 |
|
156 |
?>
|
157 |
<?php _e('To use this button, place the following shortcode anywhere you want it to appear in your site content:', 'maxbuttons') ?>
|
158 |
+
<strong>[maxbutton id="<?php echo $button_id ?>"]</strong>
|
159 |
+
|
160 |
+
<p><?php _e("Shortcode options can make using MaxButtons much easier! Check all possible options", 'maxbuttons'); ?> </p>
|
161 |
+
|
162 |
+
<span class='shortcode-expand closed'><?php _e("See more options","maxbuttons"); ?>
|
163 |
<span class="dashicons-before dashicons-arrow-down"></span>
|
164 |
+
</span>
|
165 |
+
|
166 |
<div class="expanded">
|
167 |
+
<p class="example">
|
168 |
<strong><?php _e("Add a button by using the button name","maxbuttons"); ?></strong>
|
169 |
+
[maxbutton name="<?php echo $button_name; ?>"]
|
170 |
+
</p>
|
171 |
<p class="example">
|
172 |
+
<strong><?php _e("Same button with different link","maxbuttons"); ?></strong>
|
173 |
[maxbutton id="<?php echo $button_id ?>" url="http://yoururl"]
|
174 |
</p>
|
175 |
+
|
176 |
+
<p class="example"><strong><?php _e("Same button with diffent text","maxbuttons"); ?> </strong>
|
177 |
[maxbutton id="<?php echo $button_id ?>" text="yourtext"]
|
178 |
</p>
|
179 |
<p class="example"><strong><?php _e("All possible shortcode options","maxbuttons"); ?></strong>
|
180 |
+
[maxbutton id="<?php echo $button_id ?>" text="yourtext" url="http://yoururl" linktitle="tooltip" window="new" nofollow="true"]
|
181 |
</p>
|
182 |
+
|
183 |
<h4><?php _e("Some tips","maxbuttons"); ?></h4>
|
184 |
+
<p><?php _e("If you use this button on a static page, on multiple pages, or upload your theme to another WordPress installation choose an unique name and use ",
|
185 |
"maxbuttons"); ?> <strong>[maxbutton name='my-buy-button' url='http://yoururl']</strong>.
|
186 |
|
187 |
+
|
188 |
<?php _e("By using this syntax when you edit and save your button it will be changed everywhere it is used on your site. If you delete the button and create a new one with the same name the new button will be used on your site.","maxbuttons"); ?>
|
189 |
</p>
|
190 |
+
|
191 |
</div>
|
192 |
</div>
|
193 |
<?php endif; ?>
|
194 |
|
195 |
<div class="output">
|
196 |
<div class="header"><?php _e('Preview', 'maxbuttons') ?>
|
197 |
+
<span class='preview-toggle dashicons dashicons-arrow-up'> </span>
|
198 |
</div>
|
199 |
+
<?php
|
200 |
+
$border_box = get_option('maxbuttons_borderbox');
|
201 |
+
$boxclass = '';
|
202 |
if ($border_box == 1) // box-sizing option.
|
203 |
+
$boxclass = 'preview-border-box';
|
204 |
?>
|
205 |
<div class="inner">
|
206 |
+
|
207 |
<p><?php _e('The top is the normal button, the bottom one is the hover.', 'maxbuttons') ?></p>
|
208 |
<div class="result <?php echo $boxclass ?>">
|
209 |
|
210 |
+
<?php $button->display(array("mode" => 'editor', "load_css" => "element")); ?>
|
211 |
+
|
212 |
<p> </p>
|
213 |
+
|
214 |
+
<?php $button->display(array("mode" => 'editor', "preview_part" => ":hover", "load_css" => "element")); ?>
|
215 |
+
|
216 |
+
<?php $button->display_field_map(); ?>
|
217 |
</div>
|
218 |
+
|
219 |
<input type='hidden' id='colorpicker_current' value=''>
|
220 |
+
|
221 |
+
<div class="input mbcolor preview nodrag">
|
222 |
+
<input type="text" name="button_preview" id="button_preview" class="color-field">
|
223 |
</div>
|
224 |
+
|
225 |
<div class="note"><?php _e('Change this color to see your button on a different background.', 'maxbuttons') ?></div>
|
226 |
<input type="hidden" id="button_preview" value='' />
|
227 |
<input style="display: none;" type="text" id="button_output" name="button_output" value="" />
|
228 |
|
229 |
<div class="clear"></div>
|
230 |
+
</div> <!-- inner -->
|
231 |
+
</div> <!-- output -->
|
232 |
+
|
233 |
+
<?php #### STARTING FIELDS;
|
234 |
+
|
235 |
+
|
236 |
$button->admin_fields();
|
|
|
|
|
237 |
|
238 |
+
?>
|
239 |
+
|
240 |
+
<div class="form-actions">
|
241 |
<a href="#" class="button-primary button-save"><?php _e('Save', 'maxbuttons') ?></a>
|
242 |
</div>
|
243 |
</form>
|
244 |
|
245 |
+
|
246 |
</div>
|
247 |
+
<?php $admin->get_footer(); ?>
|
includes/maxbuttons-settings.php
CHANGED
@@ -2,12 +2,12 @@
|
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
|
5 |
-
// settings for this page are registered in register_setting ( main class )
|
6 |
|
7 |
$button = new maxButton(); // To load maxfield templates
|
8 |
|
9 |
if(isset($_POST['alter_charset'])) {
|
10 |
-
|
11 |
global $maxbuttons_installed_version;
|
12 |
global $wpdb;
|
13 |
$table_name = maxUtils::get_table_name();
|
@@ -21,7 +21,7 @@ if(isset($_POST['alter_charset'])) {
|
|
21 |
$response = '';
|
22 |
}
|
23 |
|
24 |
-
if (isset($_POST["reset_cache"]))
|
25 |
{
|
26 |
$button = new maxButton();
|
27 |
$button->reset_cache();
|
@@ -30,72 +30,72 @@ if (isset($_POST["reset_cache"]))
|
|
30 |
|
31 |
if (isset($_POST["remigrate"]))
|
32 |
{
|
33 |
-
$install = MB()->getClass("install");
|
34 |
$install::create_database_table();
|
35 |
$install::migrate();
|
36 |
}
|
37 |
-
|
38 |
-
if (isset($_POST["replace"]) && check_admin_referer('mb_bulk_edit', 'bulk_edit'))
|
39 |
{
|
40 |
-
$search = sanitize_text_field($_POST["search"]);
|
41 |
-
$replace = sanitize_text_field($_POST["replace"]);
|
42 |
-
$field = sanitize_text_field($_POST["replace_field"]);
|
43 |
|
44 |
$button = new maxButton();
|
45 |
-
|
46 |
-
if ($field == '')
|
47 |
-
exit("FATAL");
|
48 |
-
|
49 |
-
$admin = MB()->getClass('admin');
|
50 |
-
$buttonsIDS = $admin->getButtons(array('limit' => -1));
|
51 |
-
|
52 |
-
$data_found = false;
|
53 |
-
|
54 |
foreach($buttonsIDS as $row)
|
55 |
{
|
56 |
-
$button_id = $row["id"];
|
57 |
-
$button->set($button_id);
|
58 |
-
$data = $button->get();
|
59 |
-
foreach($data as $block => $fields)
|
60 |
{
|
61 |
-
if (isset($fields[$field]))
|
62 |
{
|
63 |
-
$value = $fields[$field];
|
64 |
$data[$block][$field] = str_replace($search, $replace, $value);
|
65 |
-
$button->update($data);
|
66 |
-
|
67 |
-
$data_found = true;
|
68 |
continue;
|
69 |
}
|
70 |
-
|
71 |
if ($data_found)
|
72 |
{
|
73 |
-
$data_found = false;
|
74 |
continue;
|
75 |
}
|
76 |
}
|
77 |
-
|
78 |
-
|
79 |
}
|
80 |
-
|
81 |
-
}
|
82 |
-
|
83 |
?>
|
84 |
<?php
|
85 |
-
$admin = MB()->getClass('admin');
|
86 |
-
$page_title = __("Settings","maxbuttons");
|
87 |
$admin->get_header(array("tabs_active" => true, "title" => $page_title) );
|
88 |
?>
|
89 |
-
|
90 |
-
<div class="mb_tab"> <!-- first tab --->
|
91 |
<div class="title">
|
92 |
-
<span class="dashicons dashicons-list-view"></span>
|
93 |
<span class='title'><?php _e('Settings', 'maxbuttons') ?></span>
|
94 |
</div>
|
95 |
-
<div class="option-container">
|
96 |
<div class="title"><?php _e('Settings','maxbuttons'); ?></div>
|
97 |
<div class="inside">
|
98 |
-
|
99 |
<form method="post" action="options.php">
|
100 |
<div class="option-design">
|
101 |
|
@@ -111,130 +111,139 @@ $admin->get_header(array("tabs_active" => true, "title" => $page_title) );
|
|
111 |
</select>
|
112 |
<br />
|
113 |
<?php printf( __('For more details on user roles and permissions, click %s here%s.','maxbuttons'),
|
114 |
-
'<a target="_blank" href="https://codex.wordpress.org/Roles_and_Capabilities">',
|
115 |
-
"</a>");
|
116 |
?>
|
117 |
-
|
118 |
</div>
|
119 |
-
|
120 |
<div class="clear"></div>
|
121 |
-
</div><!-- option-design -->
|
122 |
-
|
123 |
<div class="option-design">
|
124 |
-
<?php
|
125 |
$option_noshow = get_option('maxbuttons_noshowtinymce');
|
126 |
-
|
127 |
-
$nomce = new maxField('switch');
|
128 |
$nomce->label = __('Hide "add button" in post editor toolbar', 'maxbuttons');
|
129 |
$nomce->name = 'maxbuttons_noshowtinymce';
|
130 |
$nomce->id = $nomce->name;
|
131 |
-
$nomce->value = '1';
|
132 |
-
$nomce->checked = checked($option_noshow, 1, false);
|
133 |
-
$nomce->output ('start','end');
|
134 |
-
?>
|
135 |
-
|
136 |
</div>
|
137 |
-
|
138 |
-
<?php
|
139 |
-
$option_minify = get_option("maxbuttons_minify", 1);
|
140 |
-
$option_description_hide = get_option('maxbuttons_hidedescription',0);
|
141 |
$option_borderbox = get_option('maxbuttons_borderbox', 0);
|
142 |
-
|
143 |
?>
|
144 |
-
<div class="option-design">
|
145 |
-
<?php
|
146 |
-
$minify = new maxField('switch');
|
147 |
$minify->note = __('Recommended, only turn off in case of issues. You will have to clear your cache after changing this setting', 'maxbuttons') ;
|
148 |
$minify->label = __('Minify Button CSS', 'maxbuttons');
|
149 |
$minify->name = 'maxbuttons_minify';
|
150 |
$minify->id = $minify->name;
|
151 |
-
$minify->value = '1';
|
152 |
-
$minify->checked = checked($option_minify, 1, false);
|
153 |
$minify->output ('start','end');
|
154 |
-
?>
|
155 |
</div>
|
156 |
-
|
157 |
<div class="option-design">
|
158 |
-
<?php
|
159 |
-
$desc = new maxField('switch');
|
160 |
$desc->label = __('Hide description field', 'maxbuttons');
|
161 |
$desc->name = 'maxbuttons_hidedescription';
|
162 |
$desc->id = $desc->name;
|
163 |
-
$desc->value = '1';
|
164 |
-
$desc->checked = checked($option_description_hide, 1, false);
|
165 |
$desc->output ('start','end');
|
166 |
-
?>
|
167 |
</div>
|
168 |
-
|
169 |
<div class='option-design'>
|
170 |
-
<?php
|
171 |
-
$bbox = new maxField('switch');
|
172 |
-
$bbox->label = __('Preview in Border Box mode','maxbuttons');
|
173 |
$bbox->note = __('A lot of modern themes render their templates as "border box". If you notice that padding
|
174 |
-
and borders looks differently on the site compared to preview, try to turn this option on', 'maxbuttons');
|
175 |
-
$bbox->name = 'maxbuttons_borderbox';
|
176 |
$bbox->id = $bbox->name;
|
177 |
$bbox->value = '1';
|
178 |
-
$bbox->checked = checked($option_borderbox, 1, false);
|
179 |
-
$bbox->output('start','end');
|
180 |
?>
|
181 |
</div>
|
182 |
-
|
183 |
<div class='option-design'>
|
184 |
-
<?php
|
185 |
-
$option_forcefa = get_option('maxbuttons_forcefa');
|
186 |
-
|
187 |
-
$fa = new maxField('switch');
|
188 |
-
$fa->label = __('FontAwesome conflict mode', 'maxbuttons');
|
189 |
-
$fa->note = __('If other plugins are conflicting with FontAwesome, tries to force plugin version.');
|
190 |
-
$fa->name = 'maxbuttons_forcefa';
|
191 |
-
$fa->id = $fa->name;
|
192 |
-
$fa->value = '1';
|
193 |
-
$fa->checked = checked($option_forcefa, 1, false);
|
194 |
-
$fa->output('start','end');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
?>
|
196 |
</div>
|
197 |
-
|
198 |
-
|
199 |
<?php do_action("maxbuttons_settings_end"); ?>
|
200 |
<?php submit_button(); ?>
|
201 |
-
</form>
|
202 |
</div>
|
203 |
</div>
|
204 |
|
205 |
-
|
206 |
-
<form method="POST">
|
207 |
<input type="hidden" name="reset_cache" value="true" />
|
208 |
-
<div class="option-container">
|
209 |
<div class="title"><?php _e("Clear button cache","maxbuttons"); ?></div>
|
210 |
<div class="inside">
|
211 |
-
<p><?php _e("Maxbuttons caches the style output allowing for lightning fast display of your buttons. In the event
|
212 |
this cache needs to be flushed and rebuilt you can reset the cache here.","maxbuttons"); ?></p>
|
213 |
<?php submit_button(__("Reset Cache", "maxbuttons") ); ?>
|
214 |
</div>
|
215 |
</div>
|
216 |
</form>
|
217 |
-
|
218 |
-
</div> <!-- /first tab --->
|
219 |
-
<div class="mb_tab"><!-- advanced tab -->
|
220 |
<div class="title">
|
221 |
-
<span class="dashicons dashicons-list-view"></span>
|
222 |
<span class='title'><?php _e('Advanced', 'maxbuttons') ?></span>
|
223 |
-
</div>
|
224 |
-
|
225 |
-
<form method="POST">
|
226 |
<div class="option-container">
|
227 |
-
|
228 |
<input type="hidden" name="remigrate" value="true" />
|
229 |
<div class="title"><?php _e("Retry Database migration","maxbuttons"); ?></div>
|
230 |
-
<div class="inside"><p><?php _e("In case the upgrade functionality failed to move your old buttons from MaxButtons before version 3, you can do so here manually. <strong>Attention</strong> The new database table (maxbuttonsv3) *must* be empty, and the old database table *must* contain buttons otherwise this will not run. Run this <strong>at your own risk</strong> - it is strongly advised to make a backup before doing so.", "maxbuttons"); ?></p>
|
231 |
<?php submit_button(__("Remigrate", "maxbuttons") ); ?>
|
232 |
</div>
|
233 |
-
|
234 |
-
|
235 |
</div>
|
236 |
</form>
|
237 |
-
|
238 |
<div class="option-container">
|
239 |
<div class="title"><?php _e('UTF8 Table Fix', 'maxbuttons') ?></div>
|
240 |
<div class="inside">
|
@@ -242,66 +251,66 @@ $admin->get_header(array("tabs_active" => true, "title" => $page_title) );
|
|
242 |
<h3 class="alert"><?php _e('WARNING: We strongly recommend backing up your database before altering the charset of the MaxButtons table in your WordPress database.', 'maxbuttons') ?></h3>
|
243 |
|
244 |
<h3><?php _e('The button below should help fix the "foreign character issue" some people experience when using MaxButtons. If you use foreign characters in your buttons and after saving see ????, use this button.', 'maxbuttons') ?></h3>
|
245 |
-
|
246 |
<form action="" method="POST">
|
247 |
<input type="submit" name="alter_charset" class="button-primary" value="<?php _e('Change MaxButtons Table To UTF8', 'maxbuttons') ?>" /> <?php echo $response; ?>
|
248 |
</form>
|
249 |
-
|
250 |
-
|
251 |
<div class="clear"></div>
|
252 |
</div>
|
253 |
</div>
|
254 |
-
</div>
|
255 |
-
|
256 |
-
<?php if (isset($_GET["show_replace"])): ?>
|
257 |
-
<form method="POST">
|
258 |
<div class="option-container">
|
259 |
-
<?php
|
260 |
-
$button = MB()->getClass('button');
|
261 |
-
$button->set(0);
|
262 |
-
$data = $button->get();
|
263 |
-
|
264 |
-
$allfields = array();
|
265 |
-
|
266 |
-
foreach($data as $block => $fields)
|
267 |
{
|
268 |
-
if ( is_array($fields) )
|
269 |
-
$allfields = array_merge($allfields, array_keys($fields));
|
270 |
-
|
271 |
}
|
272 |
$allfields = array_combine($allfields, $allfields);
|
273 |
-
|
274 |
wp_nonce_field( 'mb_bulk_edit','bulk_edit' );
|
275 |
?>
|
276 |
-
|
277 |
<input type="hidden" name="replace" value="true" />
|
278 |
<div class="title"> <?php _e("Bulk edit","maxbuttons"); ?></div>
|
279 |
-
|
280 |
<div class="inside" >
|
281 |
-
<p><strong><?php _e("Using Bulk editor MAY and probably WILL destroy your buttons. In case you wish to prevent this - please BACKUP all your buttons before proceeding!","maxbuttons"); ?></strong></p>
|
282 |
-
|
283 |
-
<div class="option"><label><?php _e("Field", "maxbuttons"); ?> </label> <?php echo maxUtils::selectify("replace_field", $allfields, 'url'); ?></div>
|
284 |
-
|
285 |
<div class="option"><label><?php _e("Search","maxbuttons"); ?> </label> <input type="text" name="search" value=""></div>
|
286 |
<div class="option"><label><?php _e("Replace","maxbuttons"); ?> </label> <input type="text" name="replace" value=""></div>
|
287 |
-
|
288 |
-
|
289 |
<p style="color: #ff0000"> <?php _e("I understand that this may destroy all my buttons", "maxbuttons"); ?></p>
|
290 |
-
|
291 |
-
<p><?php _e("", "maxbuttons"); ?></p>
|
292 |
<?php submit_button(__("Replace", "maxbuttons") ); ?>
|
293 |
</div>
|
294 |
</div>
|
295 |
</form>
|
296 |
-
|
297 |
-
<?php else: ?>
|
298 |
<a href="<?php echo add_query_arg('show_replace',true); ?>"><?php _e("I need to bulk edit something","maxbuttons"); ?></a>
|
299 |
-
<?php endif; ?>
|
300 |
-
|
301 |
</div>
|
302 |
-
</div> <!-- advanced tab -->
|
303 |
<div class="ad-wrap">
|
304 |
-
<?php do_action("mb-display-ads"); ?>
|
305 |
</div>
|
306 |
|
307 |
-
<?php $admin->get_footer(); ?>
|
2 |
namespace MaxButtons;
|
3 |
defined('ABSPATH') or die('No direct access permitted');
|
4 |
|
5 |
+
// settings for this page are registered in register_setting ( main class )
|
6 |
|
7 |
$button = new maxButton(); // To load maxfield templates
|
8 |
|
9 |
if(isset($_POST['alter_charset'])) {
|
10 |
+
|
11 |
global $maxbuttons_installed_version;
|
12 |
global $wpdb;
|
13 |
$table_name = maxUtils::get_table_name();
|
21 |
$response = '';
|
22 |
}
|
23 |
|
24 |
+
if (isset($_POST["reset_cache"]))
|
25 |
{
|
26 |
$button = new maxButton();
|
27 |
$button->reset_cache();
|
30 |
|
31 |
if (isset($_POST["remigrate"]))
|
32 |
{
|
33 |
+
$install = MB()->getClass("install");
|
34 |
$install::create_database_table();
|
35 |
$install::migrate();
|
36 |
}
|
37 |
+
|
38 |
+
if (isset($_POST["replace"]) && check_admin_referer('mb_bulk_edit', 'bulk_edit'))
|
39 |
{
|
40 |
+
$search = sanitize_text_field($_POST["search"]);
|
41 |
+
$replace = sanitize_text_field($_POST["replace"]);
|
42 |
+
$field = sanitize_text_field($_POST["replace_field"]);
|
43 |
|
44 |
$button = new maxButton();
|
45 |
+
|
46 |
+
if ($field == '')
|
47 |
+
exit("FATAL");
|
48 |
+
|
49 |
+
$admin = MB()->getClass('admin');
|
50 |
+
$buttonsIDS = $admin->getButtons(array('limit' => -1));
|
51 |
+
|
52 |
+
$data_found = false;
|
53 |
+
|
54 |
foreach($buttonsIDS as $row)
|
55 |
{
|
56 |
+
$button_id = $row["id"];
|
57 |
+
$button->set($button_id);
|
58 |
+
$data = $button->get();
|
59 |
+
foreach($data as $block => $fields)
|
60 |
{
|
61 |
+
if (isset($fields[$field]))
|
62 |
{
|
63 |
+
$value = $fields[$field];
|
64 |
$data[$block][$field] = str_replace($search, $replace, $value);
|
65 |
+
$button->update($data);
|
66 |
+
|
67 |
+
$data_found = true;
|
68 |
continue;
|
69 |
}
|
70 |
+
|
71 |
if ($data_found)
|
72 |
{
|
73 |
+
$data_found = false;
|
74 |
continue;
|
75 |
}
|
76 |
}
|
77 |
+
|
78 |
+
|
79 |
}
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
?>
|
84 |
<?php
|
85 |
+
$admin = MB()->getClass('admin');
|
86 |
+
$page_title = __("Settings","maxbuttons");
|
87 |
$admin->get_header(array("tabs_active" => true, "title" => $page_title) );
|
88 |
?>
|
89 |
+
|
90 |
+
<div class="mb_tab"> <!-- first tab --->
|
91 |
<div class="title">
|
92 |
+
<span class="dashicons dashicons-list-view"></span>
|
93 |
<span class='title'><?php _e('Settings', 'maxbuttons') ?></span>
|
94 |
</div>
|
95 |
+
<div class="option-container">
|
96 |
<div class="title"><?php _e('Settings','maxbuttons'); ?></div>
|
97 |
<div class="inside">
|
98 |
+
|
99 |
<form method="post" action="options.php">
|
100 |
<div class="option-design">
|
101 |
|
111 |
</select>
|
112 |
<br />
|
113 |
<?php printf( __('For more details on user roles and permissions, click %s here%s.','maxbuttons'),
|
114 |
+
'<a target="_blank" href="https://codex.wordpress.org/Roles_and_Capabilities">',
|
115 |
+
"</a>");
|
116 |
?>
|
117 |
+
|
118 |
</div>
|
119 |
+
|
120 |
<div class="clear"></div>
|
121 |
+
</div><!-- option-design -->
|
122 |
+
|
123 |
<div class="option-design">
|
124 |
+
<?php
|
125 |
$option_noshow = get_option('maxbuttons_noshowtinymce');
|
126 |
+
|
127 |
+
$nomce = new maxField('switch');
|
128 |
$nomce->label = __('Hide "add button" in post editor toolbar', 'maxbuttons');
|
129 |
$nomce->name = 'maxbuttons_noshowtinymce';
|
130 |
$nomce->id = $nomce->name;
|
131 |
+
$nomce->value = '1';
|
132 |
+
$nomce->checked = checked($option_noshow, 1, false);
|
133 |
+
$nomce->output ('start','end');
|
134 |
+
?>
|
135 |
+
|
136 |
</div>
|
137 |
+
|
138 |
+
<?php
|
139 |
+
$option_minify = get_option("maxbuttons_minify", 1);
|
140 |
+
$option_description_hide = get_option('maxbuttons_hidedescription',0);
|
141 |
$option_borderbox = get_option('maxbuttons_borderbox', 0);
|
142 |
+
|
143 |
?>
|
144 |
+
<div class="option-design">
|
145 |
+
<?php
|
146 |
+
$minify = new maxField('switch');
|
147 |
$minify->note = __('Recommended, only turn off in case of issues. You will have to clear your cache after changing this setting', 'maxbuttons') ;
|
148 |
$minify->label = __('Minify Button CSS', 'maxbuttons');
|
149 |
$minify->name = 'maxbuttons_minify';
|
150 |
$minify->id = $minify->name;
|
151 |
+
$minify->value = '1';
|
152 |
+
$minify->checked = checked($option_minify, 1, false);
|
153 |
$minify->output ('start','end');
|
154 |
+
?>
|
155 |
</div>
|
156 |
+
|
157 |
<div class="option-design">
|
158 |
+
<?php
|
159 |
+
$desc = new maxField('switch');
|
160 |
$desc->label = __('Hide description field', 'maxbuttons');
|
161 |
$desc->name = 'maxbuttons_hidedescription';
|
162 |
$desc->id = $desc->name;
|
163 |
+
$desc->value = '1';
|
164 |
+
$desc->checked = checked($option_description_hide, 1, false);
|
165 |
$desc->output ('start','end');
|
166 |
+
?>
|
167 |
</div>
|
168 |
+
|
169 |
<div class='option-design'>
|
170 |
+
<?php
|
171 |
+
$bbox = new maxField('switch');
|
172 |
+
$bbox->label = __('Preview in Border Box mode','maxbuttons');
|
173 |
$bbox->note = __('A lot of modern themes render their templates as "border box". If you notice that padding
|
174 |
+
and borders looks differently on the site compared to preview, try to turn this option on', 'maxbuttons');
|
175 |
+
$bbox->name = 'maxbuttons_borderbox';
|
176 |
$bbox->id = $bbox->name;
|
177 |
$bbox->value = '1';
|
178 |
+
$bbox->checked = checked($option_borderbox, 1, false);
|
179 |
+
$bbox->output('start','end');
|
180 |
?>
|
181 |
</div>
|
182 |
+
|
183 |
<div class='option-design'>
|
184 |
+
<?php
|
185 |
+
$option_forcefa = get_option('maxbuttons_forcefa');
|
186 |
+
|
187 |
+
$fa = new maxField('switch');
|
188 |
+
$fa->label = __('FontAwesome conflict mode', 'maxbuttons');
|
189 |
+
$fa->note = __('If other plugins are conflicting with FontAwesome, tries to force plugin version.');
|
190 |
+
$fa->name = 'maxbuttons_forcefa';
|
191 |
+
$fa->id = $fa->name;
|
192 |
+
$fa->value = '1';
|
193 |
+
$fa->checked = checked($option_forcefa, 1, false);
|
194 |
+
$fa->output('start','end');
|
195 |
+
|
196 |
+
$prot = new maxField('text');
|
197 |
+
$prot->id = 'maxbuttons_protocol';
|
198 |
+
$prot->name = $prot->id;
|
199 |
+
$prot->value = get_option('maxbuttons_protocol');
|
200 |
+
$prot->label = __('Additional allowed link protocols', 'maxbuttons');
|
201 |
+
$prot->note = __('Separate multiple protocols with comma', 'maxbuttons');
|
202 |
+
|
203 |
+
$prot->output('start', 'end');
|
204 |
?>
|
205 |
</div>
|
206 |
+
|
207 |
+
|
208 |
<?php do_action("maxbuttons_settings_end"); ?>
|
209 |
<?php submit_button(); ?>
|
210 |
+
</form>
|
211 |
</div>
|
212 |
</div>
|
213 |
|
214 |
+
|
215 |
+
<form method="POST">
|
216 |
<input type="hidden" name="reset_cache" value="true" />
|
217 |
+
<div class="option-container">
|
218 |
<div class="title"><?php _e("Clear button cache","maxbuttons"); ?></div>
|
219 |
<div class="inside">
|
220 |
+
<p><?php _e("Maxbuttons caches the style output allowing for lightning fast display of your buttons. In the event
|
221 |
this cache needs to be flushed and rebuilt you can reset the cache here.","maxbuttons"); ?></p>
|
222 |
<?php submit_button(__("Reset Cache", "maxbuttons") ); ?>
|
223 |
</div>
|
224 |
</div>
|
225 |
</form>
|
226 |
+
|
227 |
+
</div> <!-- /first tab --->
|
228 |
+
<div class="mb_tab"><!-- advanced tab -->
|
229 |
<div class="title">
|
230 |
+
<span class="dashicons dashicons-list-view"></span>
|
231 |
<span class='title'><?php _e('Advanced', 'maxbuttons') ?></span>
|
232 |
+
</div>
|
233 |
+
|
234 |
+
<form method="POST">
|
235 |
<div class="option-container">
|
236 |
+
|
237 |
<input type="hidden" name="remigrate" value="true" />
|
238 |
<div class="title"><?php _e("Retry Database migration","maxbuttons"); ?></div>
|
239 |
+
<div class="inside"><p><?php _e("In case the upgrade functionality failed to move your old buttons from MaxButtons before version 3, you can do so here manually. <strong>Attention</strong> The new database table (maxbuttonsv3) *must* be empty, and the old database table *must* contain buttons otherwise this will not run. Run this <strong>at your own risk</strong> - it is strongly advised to make a backup before doing so.", "maxbuttons"); ?></p>
|
240 |
<?php submit_button(__("Remigrate", "maxbuttons") ); ?>
|
241 |
</div>
|
242 |
+
|
243 |
+
|
244 |
</div>
|
245 |
</form>
|
246 |
+
|
247 |
<div class="option-container">
|
248 |
<div class="title"><?php _e('UTF8 Table Fix', 'maxbuttons') ?></div>
|
249 |
<div class="inside">
|
251 |
<h3 class="alert"><?php _e('WARNING: We strongly recommend backing up your database before altering the charset of the MaxButtons table in your WordPress database.', 'maxbuttons') ?></h3>
|
252 |
|
253 |
<h3><?php _e('The button below should help fix the "foreign character issue" some people experience when using MaxButtons. If you use foreign characters in your buttons and after saving see ????, use this button.', 'maxbuttons') ?></h3>
|
254 |
+
|
255 |
<form action="" method="POST">
|
256 |
<input type="submit" name="alter_charset" class="button-primary" value="<?php _e('Change MaxButtons Table To UTF8', 'maxbuttons') ?>" /> <?php echo $response; ?>
|
257 |
</form>
|
258 |
+
|
259 |
+
|
260 |
<div class="clear"></div>
|
261 |
</div>
|
262 |
</div>
|
263 |
+
</div>
|
264 |
+
|
265 |
+
<?php if (isset($_GET["show_replace"])): ?>
|
266 |
+
<form method="POST">
|
267 |
<div class="option-container">
|
268 |
+
<?php
|
269 |
+
$button = MB()->getClass('button');
|
270 |
+
$button->set(0);
|
271 |
+
$data = $button->get();
|
272 |
+
|
273 |
+
$allfields = array();
|
274 |
+
|
275 |
+
foreach($data as $block => $fields)
|
276 |
{
|
277 |
+
if ( is_array($fields) )
|
278 |
+
$allfields = array_merge($allfields, array_keys($fields));
|
279 |
+
|
280 |
}
|
281 |
$allfields = array_combine($allfields, $allfields);
|
282 |
+
|
283 |
wp_nonce_field( 'mb_bulk_edit','bulk_edit' );
|
284 |
?>
|
285 |
+
|
286 |
<input type="hidden" name="replace" value="true" />
|
287 |
<div class="title"> <?php _e("Bulk edit","maxbuttons"); ?></div>
|
288 |
+
|
289 |
<div class="inside" >
|
290 |
+
<p><strong><?php _e("Using Bulk editor MAY and probably WILL destroy your buttons. In case you wish to prevent this - please BACKUP all your buttons before proceeding!","maxbuttons"); ?></strong></p>
|
291 |
+
|
292 |
+
<div class="option"><label><?php _e("Field", "maxbuttons"); ?> </label> <?php echo maxUtils::selectify("replace_field", $allfields, 'url'); ?></div>
|
293 |
+
|
294 |
<div class="option"><label><?php _e("Search","maxbuttons"); ?> </label> <input type="text" name="search" value=""></div>
|
295 |
<div class="option"><label><?php _e("Replace","maxbuttons"); ?> </label> <input type="text" name="replace" value=""></div>
|
296 |
+
|
297 |
+
|
298 |
<p style="color: #ff0000"> <?php _e("I understand that this may destroy all my buttons", "maxbuttons"); ?></p>
|
299 |
+
|
300 |
+
<p><?php _e("", "maxbuttons"); ?></p>
|
301 |
<?php submit_button(__("Replace", "maxbuttons") ); ?>
|
302 |
</div>
|
303 |
</div>
|
304 |
</form>
|
305 |
+
|
306 |
+
<?php else: ?>
|
307 |
<a href="<?php echo add_query_arg('show_replace',true); ?>"><?php _e("I need to bulk edit something","maxbuttons"); ?></a>
|
308 |
+
<?php endif; ?>
|
309 |
+
|
310 |
</div>
|
311 |
+
</div> <!-- advanced tab -->
|
312 |
<div class="ad-wrap">
|
313 |
+
<?php do_action("mb-display-ads"); ?>
|
314 |
</div>
|
315 |
|
316 |
+
<?php $admin->get_footer(); ?>
|
maxbuttons.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: MaxButtons
|
4 |
Plugin URI: http://maxbuttons.com
|
5 |
Description: The best WordPress button generator. This is the free version; the Pro version <a href="http://maxbuttons.com/?ref=mbfree">can be found here</a>.
|
6 |
-
Version: 6.
|
7 |
Author: Max Foundry
|
8 |
Author URI: http://maxfoundry.com
|
9 |
Text Domain: maxbuttons
|
@@ -16,9 +16,9 @@ namespace MaxButtons;
|
|
16 |
if (! defined('MAXBUTTONS_ROOT_FILE'))
|
17 |
define("MAXBUTTONS_ROOT_FILE", __FILE__);
|
18 |
if (! defined('MAXBUTTONS_VERSION_NUM'))
|
19 |
-
define('MAXBUTTONS_VERSION_NUM', '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.25
|
7 |
Author: Max Foundry
|
8 |
Author URI: http://maxfoundry.com
|
9 |
Text Domain: maxbuttons
|
16 |
if (! defined('MAXBUTTONS_ROOT_FILE'))
|
17 |
define("MAXBUTTONS_ROOT_FILE", __FILE__);
|
18 |
if (! defined('MAXBUTTONS_VERSION_NUM'))
|
19 |
+
define('MAXBUTTONS_VERSION_NUM', '6.25');
|
20 |
|
21 |
+
define('MAXBUTTONS_RELEASE',"16 Dec 2017");
|
22 |
|
23 |
|
24 |
if (! function_exists('MaxButtons\maxbutton_double_load'))
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: wordpress button plugin, share button, wordpress buttons, css3 button gene
|
|
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,10 +245,17 @@ This depends on the slider plugin you are using. Most of the well-known ones are
|
|
245 |
|
246 |
== Changelog ==
|
247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
= 6.24 =
|
249 |
|
250 |
* Social Share deprecated. For Social Sharing please check the new MaxButton Social Share addon
|
251 |
-
* New allowed link URL
|
252 |
* Fixed Copy Color interface
|
253 |
* Improvements how Modals handle scrolling
|
254 |
* Change / Issue in MaxCSSParser which didn't allow to properly parse Pseudo CSS element which are a parent of the main anchor class.
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 6.25
|
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.25 =
|
249 |
+
|
250 |
+
* New setting for extra URL Schemes
|
251 |
+
* Small layout color picker fix
|
252 |
+
* Renamed button title to tooltip for clarity
|
253 |
+
* Rename empty font setting to 'site default' for clarity
|
254 |
+
|
255 |
= 6.24 =
|
256 |
|
257 |
* Social Share deprecated. For Social Sharing please check the new MaxButton Social Share addon
|
258 |
+
* New allowed link URL schemes - ms-windows-store and steam.
|
259 |
* Fixed Copy Color interface
|
260 |
* Improvements how Modals handle scrolling
|
261 |
* Change / Issue in MaxCSSParser which didn't allow to properly parse Pseudo CSS element which are a parent of the main anchor class.
|