WordPress Button Plugin MaxButtons - Version 8.0

Version Description

  • Major rework of responsive options :
    • Better UI / Layout with Screens
    • Almost all styles can be altered in responsive
    • Smart system keeps extra output to a minimum
    • New LivePreview system let's you preview responsive options
    • Rulers and sizes in preview pane
  • Width / Height can now be put as percentages.
  • Several CSS properties will now combine to shorthand CSS, resulting in small CSS
  • Textareas now trigger save status
  • Updated SCSSPHP library to 1.1.1.

  • Translations: Dutch translation ( Thanks Peter Smits! )

Download this release

Release Info

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

Code changes from version 7.13.4 to 8.0

Files changed (77) hide show
  1. assets/css/style.css +1 -1
  2. assets/libraries/alpha-color/alpha-color-picker.js +4 -1
  3. assets/libraries/scssphp/composer.json +51 -0
  4. assets/libraries/scssphp/src/Cache.php +4 -4
  5. assets/libraries/scssphp/src/Colors.php +6 -11
  6. assets/libraries/scssphp/src/Compiler.php +544 -349
  7. assets/libraries/scssphp/src/Formatter.php +19 -4
  8. assets/libraries/scssphp/src/Formatter/Nested.php +4 -3
  9. assets/libraries/scssphp/src/Node/Number.php +84 -24
  10. assets/libraries/scssphp/src/Parser.php +410 -143
  11. assets/libraries/scssphp/src/SourceMap/Base64VLQ.php +6 -2
  12. assets/libraries/scssphp/src/SourceMap/SourceMapGenerator.php +6 -5
  13. assets/libraries/scssphp/src/Type.php +1 -0
  14. assets/libraries/scssphp/src/Version.php +1 -1
  15. assets/scss/_editor.scss +191 -80
  16. assets/scss/_elements.scss +21 -10
  17. assets/scss/_mixins.scss +9 -2
  18. assets/scss/_overview.scss +19 -2
  19. assets/scss/_subtabs.scss +15 -31
  20. blocks/advanced.php +22 -38
  21. blocks/basic.php +187 -118
  22. blocks/border.php +88 -78
  23. blocks/color.php +76 -20
  24. blocks/container.php +80 -41
  25. blocks/dimension.php +23 -21
  26. blocks/gradient.php +55 -56
  27. blocks/meta.php +4 -13
  28. blocks/responsive.php +280 -543
  29. blocks/text.php +62 -39
  30. blocks/tpl/color.tpl +1 -1
  31. blocks/tpl/radio.tpl +2 -0
  32. blocks/tpl/radius.tpl +6 -6
  33. changelog.txt +157 -0
  34. classes/admin-class.php +28 -124
  35. classes/block.php +234 -50
  36. classes/blocks.php +25 -40
  37. classes/button.php +69 -53
  38. classes/buttons.php +1 -1
  39. classes/controller.php +65 -0
  40. classes/controllers/editorController.php +101 -10
  41. classes/controllers/settingsController.php +7 -0
  42. classes/field.php +3 -4
  43. classes/installation.php +181 -5
  44. classes/max-utils.php +5 -4
  45. classes/maxCSSParser.php +214 -117
  46. classes/maxbuttons-admin-helper.php +1 -1
  47. classes/maxbuttons-class.php +93 -87
  48. classes/screen.php +371 -0
  49. includes/maxbuttons-button.php +153 -101
  50. includes/maxbuttons-controller.php +0 -29
  51. includes/maxbuttons-list.php +11 -4
  52. includes/maxbuttons-pro.php +1 -1
  53. includes/maxbuttons-settings.php +22 -9
  54. includes/maxbuttons-welcome.php +6 -5
  55. js/init.js +13 -0
  56. js/live-preview.js +621 -0
  57. js/maxbuttons-admin.js +114 -404
  58. js/media_button.js +20 -1
  59. js/min/init.js +1 -1
  60. js/min/live-preview.js +1 -0
  61. js/min/maxajax.js +1 -0
  62. js/min/maxbuttons-admin.js +1 -1
  63. js/min/media_button.js +1 -1
  64. js/responsive.js +0 -177
  65. languages/maxbuttons-de_DE.mo +0 -0
  66. languages/maxbuttons-de_DE.po +0 -1393
  67. languages/maxbuttons-nl_NL.mo +0 -0
  68. languages/maxbuttons-nl_NL.po +1830 -0
  69. languages/maxbuttons.mo +0 -0
  70. languages/maxbuttons.po +0 -1265
  71. languages/maxbuttons.pot +1560 -0
  72. maxbuttons.php +4 -4
  73. pie/PIE.htc +0 -96
  74. readme.txt +32 -150
  75. views/modals/copy-modal.php +40 -0
  76. views/modals/delete-modal.php +12 -0
  77. views/modals/trash-modal.php +12 -0
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:18px;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;position:relative}#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 .preview-buttons .col_shortcode .last-update{font-size:11px;display:block;position:absolute;bottom:4px;color:#aaa}#maxbuttons p.status a{text-decoration:none}#maxbuttons p.status span.count{color:#999999}#maxbuttons .button-list{margin-top:10px;width:100%}#maxbuttons .button-list p{font-size:13px}#maxbuttons .button-list a{text-decoration:none}#maxbuttons .button-list a.button-name{font-weight:bold}#maxbuttons .button-list .shortcode-container{margin:10px 0px 10px 2px}#maxbuttons .button-list .collection_notice{text-align:right;margin:10px 5px 0 0;padding-top:10px;float:right}#maxbuttons .shortcode-container .mb-container{margin:0 !important;float:none !important;max-width:100% !important}#maxbuttons .shortcode-container .mb-center{text-align:left !important}#maxbuttons .pagination-links a.disabled{color:#aaa;cursor:default}#maxbuttons .pagination-links a.disabled:hover{background:#e4e4e4 none repeat scroll 0 0;cursor:default;border:1px solid #d2d2d2}#maxbuttons .pagination{width:100%;display:inline-block;margin:15px 0 5px}#maxbuttons .pagination li{float:left;margin-right:5px}#maxbuttons .pagination li a,#maxbuttons .pagination li span{background:#ccc;vertical-align:middle;padding:4px 10px 8px;height:15px;display:inline-block;border:1px solid #eee;text-decoration:none;font-size:14px;font-weight:bold}#maxbuttons .maxbutton-welcome-container{margin:25px 0;padding:15px;border:1px solid #ccc;background:#fff}#maxbuttons .maxbutton-welcome-container h3{font-size:26px}#maxbuttons .maxbutton-welcome-container p.started{font-size:18px}#maxbuttons .maxbutton-welcome-container p{font-size:14px;line-height:18px}#maxbuttons .maxbutton-welcome-container h3{font-size:20px}#maxbuttons .maxbutton-welcome-container ul{list-style-type:disc;margin-left:25px}#maxbuttons.maxbuttons-controller-edit .main,#maxbuttons.maxbuttons-controller-button .main{width:auto;max-width:1200px}#maxbuttons .option-container{margin-bottom:20px;border:solid 1px #cccccc;border-radius:3px 3px 3px 3px;-webkit-border-radius:3px 3px 3px 3px;background-color:#fff;position:relative;z-index:1}#maxbuttons .option-container .title{font-size:18px;padding:9px 8px 9px 10px;text-align:left;text-shadow:0px 1px 0px #ffffff;position:relative;z-index:1}#maxbuttons .option-container .section-title{padding:15px;margin-top:10px;font-weight:700;font-size:16px}#maxbuttons .option-container .section-title{background-color:#fff}#maxbuttons .option-container .option-list{display:inline-block}#maxbuttons .option-container .option-list:after{clear:both}#maxbuttons .option-container .option-list .help{float:right;margin-top:5px}#maxbuttons .option-container .help{position:relative;font-size:24px;color:#666;margin-left:10px}#maxbuttons .option-container .help span{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;font-size:13px;background-color:#fff;color:#444;position:absolute;display:none;padding:12px 10px;top:0;left:30px;min-width:250px;border-radius:5px;text-align:left;z-index:1000;border:1px solid #ccc;line-height:18px;box-shadow:2px 2px 3px #ccc}#maxbuttons .option-container .help span .nowrap{white-space:nowrap}#maxbuttons .option-container .help span .shortcode,#maxbuttons .option-container .help span .mb-message.mb-notice{color:555;white-space:nowrap}#maxbuttons .option-container .help:hover span{display:block}#maxbuttons .option-container .block_sidebar{position:absolute;right:0;top:0;left:calc(100% - 50px);height:100%;transition:all 400ms linear;z-index:1;background-color:#fff;overflow:hidden;width:50px}#maxbuttons .option-container .block_sidebar.active{left:0;bottom:0;right:0;top:0;width:100%}#maxbuttons .option-container .block_sidebar.active .open_control{left:0}#maxbuttons .option-container .block_sidebar.active .inside{opacity:1;padding-left:80px}#maxbuttons .option-container .block_sidebar.active .title{padding-left:80px;background:#fff;z-index:3}#maxbuttons .option-container .block_sidebar .open_control{background:#eee;background:linear-gradient(90deg, #ccc, #fff);z-index:4;width:50px;height:100%;position:absolute;top:0;left:0;cursor:pointer;border-top-left-radius:6px;border-bottom-left-radius:6px;border-left:3px solid rgba(204,204,204,0.7)}#maxbuttons .option-container .block_sidebar .open_control span{font-size:16px;text-transform:uppercase;font-weight:700;color:rgba(0,0,0,0.3);position:absolute;top:40%;white-space:nowrap;left:0;right:0;transform:rotate(90deg);letter-spacing:1.05px;word-spacing:1.1em}#maxbuttons .option-container .block_sidebar .inside{opacity:0}#maxbuttons .option-container>.inside,#maxbuttons .block_sidebar>.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,#maxbuttons .block_sidebar>.inside .option,#maxbuttons .block_sidebar>.inside .option-design{margin-bottom:10px;display:block;position:relative}#maxbuttons .option-container>.inside .option.hidden,#maxbuttons .option-container>.inside .option-design.hidden,#maxbuttons .block_sidebar>.inside .option.hidden,#maxbuttons .block_sidebar>.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,#maxbuttons .block_sidebar>.inside .option .label,#maxbuttons .block_sidebar>.inside .option>label,#maxbuttons .block_sidebar>.inside .option-design .label,#maxbuttons .block_sidebar>.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],#maxbuttons .block_sidebar>.inside .option .label[for],#maxbuttons .block_sidebar>.inside .option>label[for],#maxbuttons .block_sidebar>.inside .option-design .label[for],#maxbuttons .block_sidebar>.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,#maxbuttons .block_sidebar>.inside .option .label,#maxbuttons .block_sidebar>.inside .option>label,#maxbuttons .block_sidebar>.inside .option-design .label,#maxbuttons .block_sidebar>.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,#maxbuttons .block_sidebar>.inside .option:after,#maxbuttons .block_sidebar>.inside .option:before,#maxbuttons .block_sidebar>.inside .option-design:after,#maxbuttons .block_sidebar>.inside .option-design:before{clear:both}#maxbuttons .option-container>.inside .option label,#maxbuttons .block_sidebar>.inside .option label{margin-top:2px}#maxbuttons .option-container>.inside .option label.mbcolor,#maxbuttons .block_sidebar>.inside .option label.mbcolor{margin-top:5px}#maxbuttons .option-container>.inside .option label:nth-of-type(2),#maxbuttons .block_sidebar>.inside .option label:nth-of-type(2){margin-left:30px;width:115px}#maxbuttons .option-container>.inside .option .control-group,#maxbuttons .block_sidebar>.inside .option .control-group{display:inline-block}#maxbuttons .option-container>.inside .option .rotate-left,#maxbuttons .block_sidebar>.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,#maxbuttons .block_sidebar>.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 .option p.warning,#maxbuttons .option p.error{border-left:5px solid #d98500;font-size:13px;padding-left:18px;line-height:20px;max-width:450px}#maxbuttons .option p.error{border-color:#ff0000;font-weight:600}#maxbuttons .mb-message.shortcode h4,#maxbuttons .mb-message.mb-notice h4{font-size:16px}#maxbuttons .mb-message.shortcode strong,#maxbuttons .mb-message.mb-notice strong{font-weight:600}#maxbuttons .mb-message.shortcode .expanded,#maxbuttons .mb-message.mb-notice .expanded{display:none}#maxbuttons .mb-message.shortcode .expanded p,#maxbuttons .mb-message.mb-notice .expanded p{font-size:14px;line-height:22px}#maxbuttons .mb-message.shortcode .expanded .example strong,#maxbuttons .mb-message.mb-notice .expanded .example strong{width:300px;display:inline-block}#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{clear:both;font-weight:700;display:block;margin:5px 0;cursor:pointer}@media (max-width: 1024px){#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{float:none;text-align:left;margin:10px 0;display:block}}#maxbuttons .manual-box{float:right;margin:3px 15px;top:0;right:0}#maxbuttons .manual-box a{text-align:center;width:100%;background:#e0e0e0 none repeat scroll 0 0;font-size:13px;font-weight:600;margin-left:4px;margin-top:5px;padding:4px 8px;position:relative;text-decoration:none;text-shadow:none}#maxbuttons .manual-entry{display:none;position:absolute;border:1px solid #000;background:#fff;width:45%;right:25px;z-index:199;box-sizing:border-box;padding-bottom:20px}#maxbuttons .manual-entry h3{font-size:18px;width:calc(100%);box-sizing:border-box;padding:10px 0;border-bottom:1px solid #ccc;text-align:center;margin:0;padding-right:35px;position:relative}#maxbuttons .manual-entry h3 span{box-sizing:border-box;cursor:pointer;width:35px;height:100%;font-size:25px;display:inline-block;position:absolute;right:5px;top:0;padding-top:8px}#maxbuttons .manual-entry h4,#maxbuttons .manual-entry p,#maxbuttons .manual-entry ol,#maxbuttons .manual-entry ul{padding:0 15px}#maxbuttons .manual-entry h4{font-size:16px}#maxbuttons .manual-entry p{font-size:13px}#maxbuttons .output{position:fixed;top:45px;right:20px;background-color:#ffffff;border:solid 1px #414141;box-shadow:0px 0px 6px #808080;z-index:99;width:auto;min-width:300px}@media (max-width: 780px){#maxbuttons .output{-webkit-box-shadow:0 0 0 0;-moz-box-shadow:0 0 0 0;box-shadow:0 0 0 0;top:0;left:0;right:0;position:relative;margin-bottom:15px;border-color:#ccc}}#maxbuttons .output .header{color:#222222;background-color:#ffffff;border-bottom:solid 1px #cccccc;font-family:"Open Sans", sans-serif;font-size:16px;font-weight:bold;padding:8px 0px 8px 10px;cursor:move;position:relative}#maxbuttons .output .header .preview-toggle{float:right;font-size:30px;width:30px;position:absolute;top:3px;right:0}#maxbuttons .output .inner{padding:5px}#maxbuttons .output .inner p{padding:5px 0 5px 5px}#maxbuttons .output .input.mbcolor{float:left;position:relative;margin-top:5px}#maxbuttons .output .input.mbcolor .wp-picker-container.wp-picker-active{padding:15px;border:1px solid #ccc;background-color:#fff;position:absolute;bottom:-15px;left:-270px;z-index:102;-webkit-box-shadow:4px 1px 5px #ccc;-moz-box-shadow:4px 1px 5px #ccc;box-shadow:4px 1px 5px #ccc}#maxbuttons .output .note{float:left;margin:8px 0px 0px 10px}#maxbuttons .output .result{padding:20px 5px}#maxbuttons .output .result p{padding:5px 0px 5px 0px;margin:0}#maxbuttons .output .result.preview-border-box>*{box-sizing:border-box}#maxbuttons .conditional-option{display:none}#maxbuttons select[name='new_query']{width:auto}#maxbuttons .media_query{width:640px;margin:0 20px 15px 0;border:1px solid #ccc;padding:10px 15px;display:inline-block;clear:both;position:relative}#maxbuttons .media_query .removebutton{position:absolute;right:10px;top:10px;cursor:pointer;z-index:100;padding:10px 5px}#maxbuttons .media_query input:after{clear:both}#maxbuttons .media_query .label{clear:both;margin-bottom:15px}#maxbuttons .media_query label.title{padding:0;font-size:20px}#maxbuttons .media_query .custom.hidden{display:none}#maxbuttons .media_query .option.custom label:nth-of-type(2){margin-left:95px}#maxbuttons .media_query .description{padding:15px 0px;text-align:left}#maxbuttons .media_query select{width:60px}#maxbuttons .media_query .input input{margin-top:0px;padding-top:2px}#maxbuttons .media_queries_options .new-query{margin-top:25px}#maxbuttons .media_queries_options .new-query select{width:auto}#maxbuttons .media_option_prot,#maxbuttons #media_desc{display:none}#maxbuttons .copy-warning{width:400px;margin:0 auto;position:relative;line-height:1.1}#maxbuttons .copy-warning:before{content:"\f534";font-size:40px;color:#ff0000;width:35px;height:35px;font-family:"Dashicons";position:absolute;left:20px;top:40%;margin-top:-14px}#maxbuttons .copy-warning .example{margin-bottom:5px}#maxbuttons .form-actions a{margin-right:10px}#maxbuttons select{width:150px}#maxbuttons select.small{width:auto}#maxbuttons .input{display:inline-block;margin-right:15px;min-height:35px;vertical-align:top}#maxbuttons .input img{vertical-align:middle}#maxbuttons .input.mbcolor{min-width:50px}#maxbuttons .input.checkbox input{margin-top:0}#maxbuttons .input.checkbox label{line-height:16px;margin-top:0 !important}#maxbuttons .maxajax-load-spinner{width:16px;height:16px;background:url("/wp-admin/images/wpspin_light.gif") no-repeat;opacity:0.9s;display:inline-block;margin:0 10px;z-index:10;vertical-align:middle}#maxbuttons input[type='text']{width:450px}@media (max-width: 780px){#maxbuttons input[type='text']{width:350px}}#maxbuttons input[type='text'].tiny{width:35px;vertical-align:middle}#maxbuttons input[type='text'].small{width:50px}#maxbuttons input[type='text'].medium{width:150px}#maxbuttons input[type='text'].tiny-nopad{width:35px}#maxbuttons input[type='number']{vertical-align:middle}#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:55px}@media (max-width: 780px){#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:60px}}#maxbuttons input[type='number'].small{width:70px}@media (max-width: 780px){#maxbuttons input[type='number'].small{width:75px}}#maxbuttons textarea{width:450px;height:80px}#maxbuttons .option-container .inside .option label.mbcolor:nth-of-type(2){margin-left:37px}#maxbuttons .option-container .inside .option.url{margin-bottom:0}#maxbuttons .option-container .inside .option.url_options{margin:5px 0 10px}#maxbuttons .option-container .inside .option.url_options .nofollow{margin-left:35px}#maxbuttons .option-container .inside .option.url_options label,#maxbuttons .option-container .inside .option.rel_options label{font-weight:400}#maxbuttons .option-container .inside .option.font .checkbox{margin-right:2px}#maxbuttons .option-container .inside .option.font .radio{margin-right:0}#maxbuttons .option-container .inside .option.font .input.font{margin-right:2px}#maxbuttons .option-container .inside .option.font .input.font_size{margin-right:0}#maxbuttons .option-container .inside .option.font .input.font_size:after{display:block}@media (max-width: 780px){#maxbuttons .option-container .inside .option.font{display:inline-block}#maxbuttons .option-container .inside .option.font:after{clear:both}#maxbuttons .option-container .inside .option.font>*{float:left}}#maxbuttons .option-container .inside .option.font .control-group.font_weight{margin-left:12px}@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:18px}@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:68px}#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:8px 0 0 15px;float:right}#maxbuttons .option .range_value output{clear:both;font-size:15px;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;width:30px;border:0;position:relative}#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 .mb_transparent_wrap{background-image:url("../../images/transparent.png");width:30px;height:30px;border-radius:3px;display:inline-block;margin-right:8px}#maxbuttons .input.mbcolor .wp-picker-input-wrap{padding:0}#maxbuttons .input.mbcolor .wp-picker-input-wrap label{display:inline-block;vertical-align:top}#maxbuttons .input.mbcolor .wp-picker-active .wp-picker-input-wrap{display:inline-block;vertical-align:top}#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;margin-top:8px}#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:5px;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:20px;width:20px;-webkit-appearance:none;margin-top:-8.5px}#maxbuttons [type='range']::-moz-range-track{cursor:pointer;height:5px;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:20px;width:20px}#maxbuttons [type='range']::-ms-track{cursor:pointer;height:5px;transition:all .2s ease;width:250px;background:transparent;border-color:transparent;border-width:10px 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:20px;width:20px;margin-top:0}#maxbuttons .support.tiles{display:flex}#maxbuttons .support.tiles>div{background-color:#0073aa;margin:0 25px 0 0;padding:16px}#maxbuttons .support.tiles>div a{color:#fff;text-align:center;font-size:20px;text-decoration:none}#maxbuttons .system_info{width:90%;background-color:#fff;border:1px solid #000;padding:15px}#maxbuttons .system_info .info{margin:5px 0}#maxbuttons .system_info .info label{width:250px;display:inline-block;clear:both}#maxbuttons.maxbuttons-settings .option-container .inside .option-design{margin:20px 0}#maxbuttons.maxbuttons-settings .option-container .inside .option-design label{line-height:14px;height:40px;vertical-align:top;width:200px;margin-right:20px}#maxbuttons h2.tabs{margin:1em 0;min-height:35px}#maxbuttons h2.sub-tabs,#maxbuttons h2.submit-tab{list-style:none;clear:both;margin-bottom:0}#maxbuttons h2.sub-tabs a,#maxbuttons h2.submit-tab a{font-weight:400;font-size:14px;cursor:pointer}#maxbuttons h2.sub-tabs a .dashicons,#maxbuttons h2.submit-tab a .dashicons{margin-right:10px;line-height:24px}#maxbuttons h2.sub-tabs .save-indicator,#maxbuttons h2.submit-tab .save-indicator{float:right;font-size:25px;display:none;margin-right:10px}#maxbuttons h2.sub-tabs .save-indicator.dashicons-warning,#maxbuttons h2.submit-tab .save-indicator.dashicons-warning{color:#ff0000}#maxbuttons h2.sub-tabs .save-indicator.dashicons-yes,#maxbuttons h2.submit-tab .save-indicator.dashicons-yes{color:#00ff00}#maxbuttons.mb_tabs_active .mb_tab{border:0px;background:none;border-radius:0 0 0 0;-webkit-border-radius:0 0 0 0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) button{top:0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) .right{float:right}#maxbuttons.mb_tabs_active .mb_tab>.inside{border:1px solid #e5e5e5}#maxbuttons.maxbuttons-collections-edit .main{width:100%;max-width:none}#maxbuttons .collection-addnew{display:inline-block}@media (max-width: 780px){#maxbuttons .collection-addnew{margin-left:5px}}#maxbuttons .collection_list .collection{position:relative;background-color:#fff;padding:15px;border-radius:15px;margin:15px 0}#maxbuttons .collection_list .collection h3{display:inline-block;width:90%;margin-top:0;font-size:18px;line-height:20px}#maxbuttons .collection_list .collection h3 a{color:#000;font-size:25px;text-decoration:none}#maxbuttons .collection_list .collection h3 a:hover{text-decoration:underline}#maxbuttons .collection_list .collection h3 .dashicons{color:#ccc;margin-left:15px}#maxbuttons .collection_list .collection h3 .button-count{font-weight:400;font-size:15px;margin-left:15px;vertical-align:top}#maxbuttons .collection_list .collection .collection_remove{top:10px;right:15px;font-size:25px;font-weight:400;position:absolute;cursor:pointer}#maxbuttons .collection_list .collection.welcome p{font-size:14px;line-height:22px}#maxbuttons .collection_list .collection-container{position:relative;width:100%;display:inline-block;clear:both}#maxbuttons .collection_list .collection-container .maxcollection{position:static !important}#maxbuttons .inside .preview_collection.option label{display:inline-block;float:none;font-size:25px;width:100%}#maxbuttons .mb_collection_selection{display:inline-block;min-height:300px;margin:25px 0}#maxbuttons .mb_collection_selection .sortable .item{margin-bottom:25px;position:relative;padding-left:30px;min-height:45px;clear:both}#maxbuttons .mb_collection_selection .sortable .item .button-remove{margin-top:5px;position:absolute;left:20px;top:-15px;border:1px solid #000;border-radius:11px;width:20px;height:20px;background-color:rgba(0,0,0,0.5)}#maxbuttons .mb_collection_selection .sortable .item .button-remove:hover{cursor:pointer}#maxbuttons .mb_collection_selection .sortable .item .button-remove span{color:#fff;font-size:16px;padding-top:2px;overflow:hidden}#maxbuttons .mb_collection_selection .sortable-placeholder{border:3px dashed #aaa;height:45px;width:344px;background:#ccc}#maxbuttons .mb_collection_selection .button_data{display:none}#maxbuttons .mb-social-options{float:right;width:45%;border:1px solid #000;height:100%}#maxbuttons .mb-buttons-selection{float:left;width:45%;overflow:hidden;border:1px solid #000}#maxbuttons .mb-preview-window{position:fixed;top:40%;right:20px;width:30%;max-width:45%;max-height:90vh;background-color:rgba(255,255,255,0.7);border:1px solid #000;z-index:500 !important;overflow:hidden;display:none}@media (max-width: 780px){#maxbuttons .mb-preview-window{position:relative;left:0;top:0;bottom:0;right:0;width:100%;height:auto;display:inline-block;border-color:#ccc}}#maxbuttons .mb-preview-window .mb-preview-wrapper{position:relative;display:inline-block;width:100%}#maxbuttons .sub-tabs .preview-on{background-color:#00b9eb;color:#fff}#maxbuttons .sub-tabs .preview-on::before{line-height:24px}#maxbuttons #picker-back{top:0;left:0;right:0;bottom:0;background-color:#000;z-index:110000;position:fixed;opacity:0.7;display:none}#maxbuttons #picker-modal,#maxbuttons .max-modal.picker-modal{display:none;width:calc(100% - 60px);min-height:300px;top:30px;bottom:30px;left:30px;right:30px;z-index:160000}#maxbuttons #picker-modal .modal_header,#maxbuttons .max-modal.picker-modal .modal_header{height:15px;display:block;overflow:hidden;top:0;left:0;bottom:0;right:0;border:0}#maxbuttons #picker-modal .picker-packages,#maxbuttons .max-modal.picker-modal .picker-packages{top:31px;left:0;width:205px;bottom:0;background-color:#f3f3f3;position:absolute;border-right:1px solid #ccc;overflow-x:hidden;overflow-y:auto}#maxbuttons #picker-modal .picker-packages ul,#maxbuttons .max-modal.picker-modal .picker-packages ul{margin-top:4px}#maxbuttons #picker-modal .picker-packages li a,#maxbuttons .max-modal.picker-modal .picker-packages li a{padding:6px 20px;display:block;color:#0073aa;text-decoration:none;font-size:13px;line-height:16px}#maxbuttons #picker-modal .picker-packages li a:hover,#maxbuttons .max-modal.picker-modal .picker-packages li a:hover{background:rgba(0,0,0,0.04) none repeat scroll 0 0;color:#21759b}#maxbuttons #picker-modal .picker-packages li a.pack-active,#maxbuttons .max-modal.picker-modal .picker-packages li a.pack-active{font-weight:700;color:#000}#maxbuttons #picker-modal .picker-main,#maxbuttons .max-modal.picker-modal .picker-main{left:206px;top:31px;right:0;bottom:60px;position:absolute;border-bottom:1px solid #dddddd;overflow-y:scroll;background-color:#fff}#maxbuttons #picker-modal .picker-main .screen,#maxbuttons .max-modal.picker-modal .picker-main .screen{margin:5px 5px}#maxbuttons #picker-modal .picker-main .screen .tablenav-pages,#maxbuttons .max-modal.picker-modal .picker-main .screen .tablenav-pages{float:none;margin-left:1%}#maxbuttons #picker-modal .picker-main .item,#maxbuttons .max-modal.picker-modal .picker-main .item{padding:5px;margin:5px 0 5px 1%;border:1px solid #000;width:16%;height:auto;float:left;text-align:center;position:relative;background-color:#eee;border:1px solid #b4b9be;display:inline-block}#maxbuttons #picker-modal .picker-main .item .button_data,#maxbuttons .max-modal.picker-modal .picker-main .item .button_data{display:none}#maxbuttons #picker-modal .picker-main .item .button_name,#maxbuttons .max-modal.picker-modal .picker-main .item .button_name{clear:left;display:block;margin-top:15px;font-size:9px}#maxbuttons #picker-modal .picker-main .item .button-selected,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected{position:absolute;font-size:20px;top:-10px;right:-10px;width:24px;height:24px;color:#fff;background-color:#1e8cbe;z-index:100;border-radius:12px}#maxbuttons #picker-modal .picker-main .item .button-selected span,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected span{padding-top:2px}#maxbuttons #picker-modal .picker-inselection,#maxbuttons .max-modal.picker-modal .picker-inselection{height:60px;display:block;position:absolute;bottom:0;right:0;left:206px;overflow:hidden}#maxbuttons #picker-modal .picker-inselection .info,#maxbuttons .max-modal.picker-modal .picker-inselection .info{height:60px;float:left;display:inline-block;padding:10px 15px;display:none}#maxbuttons #picker-modal .picker-inselection .info .clear-selection,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection{color:#ff0000;display:block;padding:0}#maxbuttons #picker-modal .picker-inselection .info .clear-selection:hover,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection:hover{background-color:#ff0000;color:#fff}#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:inline-block;position:absolute;overflow:hidden;padding-top:5px;height:100%;left:130px;right:180px}@media (max-width: 780px){#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:none}}#maxbuttons #picker-modal .picker-inselection .items .item,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item{height:40px;width:40px;overflow:hidden;float:left;margin:3px;position:relative}#maxbuttons #picker-modal .picker-inselection .items .item .button_name,#maxbuttons #picker-modal .picker-inselection .items .item .button_data,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_name,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_data{display:none}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove{display:none;position:absolute;width:30px;height:30px;left:2px;border-radius:15px;top:2px;background-color:rgba(0,0,0,0.5)}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove span,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove span{font-size:20px;color:#fff;padding-left:5px;padding-top:5px}#maxbuttons #picker-modal .picker-inselection .items .item:hover .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item:hover .button-remove{display:block}#maxbuttons #picker-modal .picker-inselection .add,#maxbuttons .max-modal.picker-modal .picker-inselection .add{float:right;margin-top:15px;margin-right:15px;height:100%}#maxbuttons .social_block .social-option{clear:both;margin-top:25px}#maxbuttons .social_block .social-option .shortcode-container{display:inline-block}#maxbuttons .social_block .social-option .button_name{display:inline-block;margin-left:10px;vertical-align:middle;font-weight:700}#maxbuttons #mbfeedback .link{height:25px;width:100px;position:fixed;top:40%;right:0;z-index:1000;transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}#maxbuttons #mbfeedback .link a{background:#ccc;height:25px;width:70px;padding:8px 16px;color:#fff;font-family:Arial, sans-serif;font-size:15px;font-weight:bold;text-decoration:none;line-height:15px;border-bottom:solid 1px #333;border-left:solid 1px #333;border-right:solid 1px #fff}#maxbuttons #mbfeedback .link a::hover{background:#06c}#maxbuttons .ad-wrap{width:27%;float:left;max-width:300px;margin-left:1%;min-width:200px;margin-top:41px}#maxbuttons .ad-wrap .ads{background:#fff;margin-bottom:20px;text-align:center}#maxbuttons .ad-wrap .ads.image-ad{background:none;margin-top:20px}#maxbuttons .ad-wrap .ads.image-ad img{max-width:100%}#maxbuttons .ad-wrap .ads>a{text-decoration:none}#maxbuttons .ad-wrap .ads .header{background-color:#88c5c2;color:#fff;font-size:18px;text-transform:uppercase;padding:12px}#maxbuttons .ad-wrap .ads h3{text-align:center;padding-bottom:14px}#maxbuttons .ad-wrap .ads ul{list-style:none}#maxbuttons .ad-wrap .ads ul li{font-weight:bold;text-decoration:none;color:#000000}#maxbuttons .ad-wrap .ads ul li.plus{font-size:38px;font-weight:700;color:#88c5c2}#maxbuttons .ad-wrap .ads span.img{text-align:center;display:block}#maxbuttons .ad-wrap .ads .ads_button_wrap{margin:20px 0 30px;display:inline-block}#maxbuttons .ad-wrap .ads .ads_button_wrap .button{color:#fff;background-color:#88c5c2;font-size:16px;font-weight:bold;border:0;padding:0 40px}@media screen and (max-width: 960px){#maxbuttons .ad-wrap{display:none}}#maxbuttons.maxbuttons-pro-gopro .main{width:95%;max-width:860px}#maxbuttons.maxbuttons-pro-gopro h1.title{margin:0;font-size:24px;display:inline-block}#maxbuttons.maxbuttons-pro-gopro h1.title .big-maxg-btn{display:inline-block;background-color:#86c5c2;border-color:#73a3a8;margin:0 10px;vertical-align:super;line-height:23px;border-top:0;border-left:0;border-right:0;top:5px}#maxbuttons.maxbuttons-pro-gopro h1.title img{vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .logo{margin:0;display:inline-block;margin-top:14px}#maxbuttons.maxbuttons-pro-gopro .logo .simple-btn{color:#62c0e6;text-decoration:underline}#maxbuttons.maxbuttons-pro-gopro .default-section{text-align:center;padding:0px 10px}#maxbuttons.maxbuttons-pro-gopro .default-section p{position:relative;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:16px;margin:17px 0;color:#5b5b5b}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(even){background-color:#fff}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(odd){background-color:#faf5f1}#maxbuttons.maxbuttons-pro-gopro .default-section .big-maxg-btn{background-color:#fd8d61;border-color:#f0702b;font-size:32px;margin:10px}#maxbuttons.maxbuttons-pro-gopro .default-section h2{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;border:4px solid #bbb;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-size:20px;color:#fff;font-weight:bold;padding:18px 15px 10px;transition:all linear .2s;display:block;text-align:center;border-bottom:4px solid;text-transform:uppercase;border-radius:10px;text-decoration:none;line-height:42px}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover,#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:focus{color:#fff;text-decoration:none;outline:none}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover{box-shadow:0 8px 6px -6px rgba(0,0,0,0.5)}#maxbuttons.maxbuttons-pro-gopro .price{position:relative;display:inline-block}#maxbuttons.maxbuttons-pro-gopro .price span{position:absolute;color:#fff;display:block;font-size:46px;font-weight:700;top:55px;left:26px}#maxbuttons.maxbuttons-collections-gosocial .social-share-move{background-color:#fff}#maxbuttons.maxbuttons-collections-gosocial .social-share-move .container{padding:15px}#maxbuttons.maxbuttons-collections-gosocial .topbox h1{display:inline-block;font-size:36px;font-weight:700}#maxbuttons.maxbuttons-collections-gosocial .topbox .icon-left{float:left;margin:0 15px 15px 0;display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .topbox h3{display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .topbox:after{clear:both}#maxbuttons.maxbuttons-collections-gosocial .imagebox{clear:both}#maxbuttons.maxbuttons-collections-gosocial .featurebox{margin:20px 0;display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .featurebox h3{display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .featurebox .block{width:45%;float:left;margin-right:3px}#maxbuttons.maxbuttons-collections-gosocial .linkbox{clear:both;margin:30px auto;text-align:center;display:inline-block;width:100%}#maxbuttons.maxbuttons-collections-gosocial .linkbox .install-now{font-size:30px;height:50px;padding-top:10px}
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:18px;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;position:relative}#maxbuttons .preview-buttons .button-row>span{display:inline-block;font-size:13px;float:left;overflow:hidden}#maxbuttons .preview-buttons .button-row .actions{margin:5px 0;padding:10px 0px 10px 8px;display:inline-block;z-index:11;width:50%;background-color:#fff;position:relative}#maxbuttons .preview-buttons .button-row:hover .actions{opacity:1}#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_button .actions{opacity:0;transition:all 400ms linear}#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 .preview-buttons .col_shortcode .last-update{font-size:11px;display:block;position:absolute;bottom:4px;color:#aaa}#maxbuttons p.status a{text-decoration:none}#maxbuttons p.status span.count{color:#999999}#maxbuttons .button-list{margin-top:10px;width:100%}#maxbuttons .button-list p{font-size:13px}#maxbuttons .button-list a{text-decoration:none}#maxbuttons .button-list a.button-name{font-weight:bold}#maxbuttons .button-list .shortcode-container{margin:10px 0px 10px 2px}#maxbuttons .button-list .collection_notice{text-align:right;margin:10px 5px 0 0;padding-top:10px;float:right}#maxbuttons .shortcode-container .mb-container{margin:0 !important;float:none !important;max-width:100% !important}#maxbuttons .shortcode-container .mb-center{text-align:left !important}#maxbuttons .pagination-links a.disabled{color:#aaa;cursor:default}#maxbuttons .pagination-links a.disabled:hover{background:#e4e4e4 none repeat scroll 0 0;cursor:default;border:1px solid #d2d2d2}#maxbuttons .pagination{width:100%;display:inline-block;margin:15px 0 5px}#maxbuttons .pagination li{float:left;margin-right:5px}#maxbuttons .pagination li a,#maxbuttons .pagination li span{background:#ccc;vertical-align:middle;padding:4px 10px 8px;height:15px;display:inline-block;border:1px solid #eee;text-decoration:none;font-size:14px;font-weight:bold}#maxbuttons .maxbutton-welcome-container{margin:25px 0;padding:15px;border:1px solid #ccc;background:#fff}#maxbuttons .maxbutton-welcome-container h3{font-size:26px}#maxbuttons .maxbutton-welcome-container p.started{font-size:18px}#maxbuttons .maxbutton-welcome-container p{font-size:14px;line-height:18px}#maxbuttons .maxbutton-welcome-container h3{font-size:20px}#maxbuttons .maxbutton-welcome-container ul{list-style-type:disc;margin-left:25px}#maxbuttons .maxbutton-welcome-container .organize{padding:16px;max-width:450px;border:1px solid #ccc}#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;position:relative;z-index:1}#maxbuttons .option-container .title{font-size:18px;padding:9px 8px 9px 10px;text-align:left;text-shadow:0px 1px 0px #ffffff;position:relative;z-index:1}#maxbuttons .option-container .section-title{padding:15px;margin-top:10px;font-weight:700;font-size:16px}#maxbuttons .option-container .section-title{background-color:#fff}#maxbuttons .option-container .option-list{display:inline-block}#maxbuttons .option-container .option-list:after{clear:both}#maxbuttons .option-container .option-list .help{float:right;margin-top:5px}#maxbuttons .option-container .help{position:relative;font-size:24px;color:#666;margin-left:10px}#maxbuttons .option-container .help span{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;font-size:13px;background-color:#fff;color:#444;position:absolute;display:none;padding:12px 10px;top:0;left:30px;min-width:250px;border-radius:5px;text-align:left;z-index:1000;border:1px solid #ccc;line-height:18px;box-shadow:2px 2px 3px #ccc}#maxbuttons .option-container .help span .nowrap{white-space:nowrap}#maxbuttons .option-container .help span .shortcode,#maxbuttons .option-container .help span .mb-message.mb-notice{color:555;white-space:nowrap}#maxbuttons .option-container .help:hover span{display:block}#maxbuttons .option-container .block_sidebar{position:absolute;right:0;top:0;left:calc(100% - 50px);height:100%;transition:all 400ms linear;z-index:1;background-color:#fff;overflow:hidden;width:50px}#maxbuttons .option-container .block_sidebar.active{left:0;bottom:0;right:0;top:0;width:100%}#maxbuttons .option-container .block_sidebar.active .open_control{left:0}#maxbuttons .option-container .block_sidebar.active .inside{opacity:1;padding-left:80px}#maxbuttons .option-container .block_sidebar.active .title{padding-left:80px;background:#fff;z-index:3}#maxbuttons .option-container .block_sidebar .open_control{background:#eee;background:linear-gradient(90deg, #ccc, #fff);z-index:4;width:50px;height:100%;position:absolute;top:0;left:0;cursor:pointer;border-top-left-radius:6px;border-bottom-left-radius:6px;border-left:3px solid rgba(204,204,204,0.7)}#maxbuttons .option-container .block_sidebar .open_control span{font-size:16px;text-transform:uppercase;font-weight:700;color:rgba(0,0,0,0.3);position:absolute;top:40%;white-space:nowrap;left:0;right:0;transform:rotate(90deg);letter-spacing:1.05px;word-spacing:1.1em}#maxbuttons .option-container .block_sidebar .inside{opacity:0}#maxbuttons .option-container>.inside,#maxbuttons .block_sidebar>.inside{padding:10px 55px 10px 15px;border-top:solid 1px #cccccc;background-color:#ffffff}#maxbuttons .option-container>.inside .option,#maxbuttons .option-container>.inside .option-design,#maxbuttons .block_sidebar>.inside .option,#maxbuttons .block_sidebar>.inside .option-design{margin-bottom:10px;display:block;position:relative}#maxbuttons .option-container>.inside .option.hidden,#maxbuttons .option-container>.inside .option-design.hidden,#maxbuttons .block_sidebar>.inside .option.hidden,#maxbuttons .block_sidebar>.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,#maxbuttons .block_sidebar>.inside .option .label,#maxbuttons .block_sidebar>.inside .option>label,#maxbuttons .block_sidebar>.inside .option-design .label,#maxbuttons .block_sidebar>.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],#maxbuttons .block_sidebar>.inside .option .label[for],#maxbuttons .block_sidebar>.inside .option>label[for],#maxbuttons .block_sidebar>.inside .option-design .label[for],#maxbuttons .block_sidebar>.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,#maxbuttons .block_sidebar>.inside .option .label,#maxbuttons .block_sidebar>.inside .option>label,#maxbuttons .block_sidebar>.inside .option-design .label,#maxbuttons .block_sidebar>.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,#maxbuttons .block_sidebar>.inside .option:after,#maxbuttons .block_sidebar>.inside .option:before,#maxbuttons .block_sidebar>.inside .option-design:after,#maxbuttons .block_sidebar>.inside .option-design:before{clear:both}#maxbuttons .option-container>.inside .option label,#maxbuttons .block_sidebar>.inside .option label{margin-top:2px}#maxbuttons .option-container>.inside .option label.mbcolor,#maxbuttons .block_sidebar>.inside .option label.mbcolor{margin-top:5px}#maxbuttons .option-container>.inside .option label:nth-of-type(2),#maxbuttons .block_sidebar>.inside .option label:nth-of-type(2){margin-left:30px;width:115px}#maxbuttons .option-container>.inside .option .control-group,#maxbuttons .block_sidebar>.inside .option .control-group{display:inline-block}#maxbuttons .option-container>.inside .option .rotate-left,#maxbuttons .block_sidebar>.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,#maxbuttons .block_sidebar>.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 .option p.warning,#maxbuttons .option p.error{border-left:5px solid #d98500;font-size:13px;padding-left:18px;line-height:20px;max-width:450px}#maxbuttons .option p.error{border-color:#ff0000;font-weight:600}#maxbuttons .mb-message.shortcode h4,#maxbuttons .mb-message.mb-notice h4{font-size:16px}#maxbuttons .mb-message.shortcode strong,#maxbuttons .mb-message.mb-notice strong{font-weight:600}#maxbuttons .mb-message.shortcode .expanded,#maxbuttons .mb-message.mb-notice .expanded{display:none}#maxbuttons .mb-message.shortcode .expanded p,#maxbuttons .mb-message.mb-notice .expanded p{font-size:14px;line-height:22px}#maxbuttons .mb-message.shortcode .expanded .example strong,#maxbuttons .mb-message.mb-notice .expanded .example strong{width:300px;display:inline-block}#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{clear:both;font-weight:700;display:block;margin:5px 0;cursor:pointer}@media (max-width: 1024px){#maxbuttons .mb-message.shortcode .shortcode-expand,#maxbuttons .mb-message.mb-notice .shortcode-expand{float:none;text-align:left;margin:10px 0;display:block}}#maxbuttons .manual-box{float:right;margin:3px 15px;top:0;right:0}#maxbuttons .manual-box a{text-align:center;width:100%;background:#e0e0e0 none repeat scroll 0 0;font-size:13px;font-weight:600;margin-left:4px;margin-top:5px;padding:4px 8px;position:relative;text-decoration:none;text-shadow:none}#maxbuttons .manual-entry{display:none;position:absolute;border:1px solid #000;background:#fff;width:45%;right:25px;z-index:199;box-sizing:border-box;padding-bottom:20px}#maxbuttons .manual-entry h3{font-size:18px;width:calc(100%);box-sizing:border-box;padding:10px 0;border-bottom:1px solid #ccc;text-align:center;margin:0;padding-right:35px;position:relative}#maxbuttons .manual-entry h3 span{box-sizing:border-box;cursor:pointer;width:35px;height:100%;font-size:25px;display:inline-block;position:absolute;right:5px;top:0;padding-top:8px}#maxbuttons .manual-entry h4,#maxbuttons .manual-entry p,#maxbuttons .manual-entry ol,#maxbuttons .manual-entry ul{padding:0 15px}#maxbuttons .manual-entry h4{font-size:16px}#maxbuttons .manual-entry p{font-size:13px}#maxbuttons .output{position:fixed;top:45px;right:20px;background-color:#ffffff;border:solid 1px #414141;box-shadow:0px 0px 6px #808080;z-index:99;width:auto;min-width:300px}@media (max-width: 780px){#maxbuttons .output{-webkit-box-shadow:0 0 0 0;-moz-box-shadow:0 0 0 0;box-shadow:0 0 0 0;top:0;left:0;right:0;position:relative;margin-bottom:15px;border-color:#ccc}}#maxbuttons .output .header{color:#222222;background-color:#ffffff;border-bottom:solid 1px #cccccc;font-family:"Open Sans", sans-serif;font-size:16px;font-weight:bold;padding:8px 0px 8px 10px;cursor:move;position:relative}#maxbuttons .output .header .preview-toggle{float:right;font-size:30px;width:30px;position:absolute;top:3px;right:0}#maxbuttons .output .inner{padding:5px}#maxbuttons .output .inner p{padding:5px 0 5px 5px}#maxbuttons .output .input.mbcolor{float:left;position:relative;margin-top:5px}#maxbuttons .output .input.mbcolor .wp-picker-container.wp-picker-active{padding:15px;border:1px solid #ccc;background-color:#fff;position:absolute;bottom:-15px;left:-270px;z-index:102;-webkit-box-shadow:4px 1px 5px #ccc;-moz-box-shadow:4px 1px 5px #ccc;box-shadow:4px 1px 5px #ccc}#maxbuttons .output .note{float:left;margin:8px 0px 0px 10px}#maxbuttons .output .result{padding:20px 5px}#maxbuttons .output .result p{padding:5px 0px 5px 0px;margin:0}#maxbuttons .output .result.preview-border-box>*{box-sizing:border-box}#maxbuttons .output .result .border_wrapper{position:relative;display:inline-block;margin:15px}#maxbuttons .output .result .border_wrapper .preview_border_height{position:absolute;height:100%;width:3px;border-left:1px dashed #000;border-top:1px dashed #000}#maxbuttons .output .result .border_wrapper .preview_border_height span{right:30px;transform:rotate(-90deg);transform-origin:100% 0;position:absolute;line-height:30px;display:block;text-align:center}#maxbuttons .output .result .border_wrapper .preview_border_width{margin-top:5px;border-bottom:1px dashed #000;border-left:1px dashed #000;border-right:1px dashed #000;position:absolute;height:3px;width:100%;text-align:center}#maxbuttons .output .result .border_wrapper .preview_border_width span{background:#fff}#maxbuttons .output .result .border_wrapper .maxbutton-preview{margin-left:25px}#maxbuttons .conditional-option{display:none}#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 .button-save{transition:all 400ms linear}#maxbuttons .editor{min-width:850px}#maxbuttons .editor .screen-option-wrapper{display:flex}#maxbuttons .editor .screen-option-wrapper .screen-option{margin:4px 0;display:flex;align-items:center;padding:8px 12px;margin-right:4px;line-height:20px;border:1px solid #ccc;cursor:pointer;text-shadow:-1px 0 1px #ccc;box-shadow:0 1px 0 #aaa;min-height:75px;vertical-align:bottom;box-sizing:border-box}#maxbuttons .editor .screen-option-wrapper .screen-option .screen_name{font-size:14px}#maxbuttons .editor .screen-option-wrapper .screen-option .screen_size{font-size:10px;display:block;text-align:center}#maxbuttons .editor .screen-option-wrapper .screen-option.option-active{background:#fff;box-shadow:1px 1px 1px #2A0043}#maxbuttons .editor .screen-option-wrapper .screen-option.option-active .screen_name{font-weight:bold}#maxbuttons .editor .screen-option-wrapper .screen-option.button-save{text-decoration:none;float:right;border-radius:4px;padding:8px 26px;text-transform:uppercase}#maxbuttons .editor .screen-option-wrapper .screen-option.button-save a{margin:0;border:0;letter-spacing:1.1px;font-size:14px}#maxbuttons .editor .screen-option-wrapper a.screen-option{margin-left:auto;margin-right:0}#maxbuttons .editor .mbscreen-editor{display:none}#maxbuttons .editor .mbscreen-editor.current-screen{display:block}#maxbuttons .editor .mbscreen-editor .fieldmap{display:none}#maxbuttons .mb_tab.option-container.upgrade .removed-note{color:#ff0000;font-weight:600;text-align:center;font-size:14px;display:none}#maxbuttons .mb_tab.option-container.upgrade ul{list-style-type:disc;margin:25px 15px}#maxbuttons .mb_tab.option-container.upgrade ul li{font-size:14px}#maxbuttons .mb_tab.option-container.upgrade .button-row{margin-bottom:8px}#maxbuttons .mb_tab.option-container.upgrade .button-row .button{padding:8px;width:180px;text-align:center}#maxbuttons .mb_tab.option-container.upgrade .button-row .button.buynow{font-size:20px}#maxbuttons .mb_tab.option-container.upgrade .button-row .button.features{padding:6px 8px}#maxbuttons select{min-width:150px}#maxbuttons select.small{width:auto}#maxbuttons .input{display:inline-block;margin-right:15px;min-height:35px;vertical-align:top}#maxbuttons .input img{vertical-align:middle}#maxbuttons .input.mbcolor{min-width:50px}#maxbuttons .input.checkbox input{margin-top:0}#maxbuttons .input.checkbox label{line-height:16px;margin-top:0 !important}#maxbuttons .maxajax-load-spinner{width:16px;height:16px;background:url("/wp-admin/images/wpspin_light.gif") no-repeat;opacity:0.9s;display:inline-block;margin:0 10px;z-index:10;vertical-align:middle}#maxbuttons input[type='text']{width:450px}@media (max-width: 780px){#maxbuttons input[type='text']{width:350px}}#maxbuttons input[type='text'].tiny{width:35px;vertical-align:middle}#maxbuttons input[type='text'].small{width:50px}#maxbuttons input[type='text'].medium{width:150px}#maxbuttons input[type='text'].tiny-nopad{width:35px}#maxbuttons input[type='number']{vertical-align:middle}#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:55px}@media (max-width: 780px){#maxbuttons input[type='number'].tiny,#maxbuttons input[type='number'].tiny-nopad{width:60px}}#maxbuttons input[type='number'].small{width:70px}@media (max-width: 780px){#maxbuttons input[type='number'].small{width:75px}}#maxbuttons textarea{width:450px;height:80px}#maxbuttons .option-container .inside .option label.mbcolor:nth-of-type(2){margin-left:37px}#maxbuttons .option-container .inside .option.url{margin-bottom:0}#maxbuttons .option-container .inside .option.url_options{margin:5px 0 10px}#maxbuttons .option-container .inside .option.url_options .nofollow{margin-left:35px}#maxbuttons .option-container .inside .option.url_options label,#maxbuttons .option-container .inside .option.rel_options label{font-weight:400}#maxbuttons .option-container .inside .option[class$="font"] .checkbox{margin-right:2px}#maxbuttons .option-container .inside .option[class$="font"] .radio{margin-right:0}#maxbuttons .option-container .inside .option[class$="font"] [class$="font"].input{margin-right:2px}#maxbuttons .option-container .inside .option[class$="font"] [class$="font_size"].input{margin-right:0}#maxbuttons .option-container .inside .option[class$="font"] [class$="font_size"].input:after{display:block}#maxbuttons .option-container .inside .option.size_unit_spacer .control-group{margin-right:30px}#maxbuttons .option-container .inside .option.size_unit_spacer .unit-spacer{width:115px}@media (max-width: 780px){#maxbuttons .option-container .inside .option[class$="font"]{display:inline-block}#maxbuttons .option-container .inside .option[class$="font"]:after{clear:both}#maxbuttons .option-container .inside .option[class$="font"]>*{float:left}}#maxbuttons .option-container .inside .option[class$="font"] span[class$="font_weight"].control-group{margin-left:12px}@media (max-width: 780px){#maxbuttons .option-container .inside .option[class$="font"] span[class$="font_weight"].control-group{clear:left;margin-left:148px;margin-top:10px}}#maxbuttons .option-container .inside .option[class$="font"] [class$="text_align"].control-group{margin-left:18px}@media (max-width: 780px){#maxbuttons .option-container .inside .option[class$="font"] [class$="text_align"].control-group{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:68px}#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 [id$="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 .option-container .inside .option .input[class$="remove_screen"],#maxbuttons .option-container .inside .option .input[class$="new_add_screen"]{margin-left:150px}#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:8px 0 0 15px;float:right}#maxbuttons .option .range_value output{clear:both;font-size:15px;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;width:30px;border:0;position:relative;background:unset}#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 .mb_transparent_wrap{background-image:url("../../images/transparent.png");width:30px;height:30px;border-radius:3px;display:inline-block;margin-right:8px}#maxbuttons .input.mbcolor .wp-picker-input-wrap{padding:0}#maxbuttons .input.mbcolor .wp-picker-input-wrap label{display:inline-block;vertical-align:top}#maxbuttons .input.mbcolor .wp-picker-active .wp-picker-input-wrap{display:inline-block;vertical-align:top}#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;margin-top:8px}#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:5px;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:20px;width:20px;-webkit-appearance:none;margin-top:-8.5px}#maxbuttons [type='range']::-moz-range-track{cursor:pointer;height:5px;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:20px;width:20px}#maxbuttons [type='range']::-ms-track{cursor:pointer;height:5px;transition:all .2s ease;width:250px;background:transparent;border-color:transparent;border-width:10px 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:20px;width:20px;margin-top:0}#maxbuttons .support.tiles{display:flex}#maxbuttons .support.tiles>div{background-color:#0073aa;margin:0 25px 0 0;padding:16px}#maxbuttons .support.tiles>div a{color:#fff;text-align:center;font-size:20px;text-decoration:none}#maxbuttons .system_info{width:90%;background-color:#fff;border:1px solid #000;padding:15px}#maxbuttons .system_info .info{margin:5px 0}#maxbuttons .system_info .info label{width:250px;display:inline-block;clear:both}#maxbuttons.maxbuttons-settings .option-container .inside .option-design{margin:20px 0}#maxbuttons.maxbuttons-settings .option-container .inside .option-design label{line-height:14px;height:40px;vertical-align:top;width:200px;margin-right:20px}#maxbuttons h2.tabs{margin:1em 0;min-height:35px}#maxbuttons h2.sub-tabs,#maxbuttons h2.submit-tab{list-style:none;clear:both;margin-bottom:0}#maxbuttons h2.sub-tabs a,#maxbuttons h2.submit-tab a{font-weight:400;font-size:14px;cursor:pointer}#maxbuttons h2.sub-tabs a .dashicons,#maxbuttons h2.submit-tab a .dashicons{margin-right:10px;line-height:24px}#maxbuttons h2.sub-tabs .save-indicator,#maxbuttons h2.submit-tab .save-indicator{float:right;font-size:25px;display:none;margin-right:10px}#maxbuttons h2.sub-tabs .save-indicator.dashicons-warning,#maxbuttons h2.submit-tab .save-indicator.dashicons-warning{color:#ff0000}#maxbuttons h2.sub-tabs .save-indicator.dashicons-yes,#maxbuttons h2.submit-tab .save-indicator.dashicons-yes{color:#00ff00}#maxbuttons.mb_tabs_active .mb_tab{border:0px;background:none;border-radius:0 0 0 0;-webkit-border-radius:0 0 0 0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) button{top:0}#maxbuttons.mb_tabs_active .mb_tab>.title:nth-of-type(1) .right{float:right}#maxbuttons.mb_tabs_active .mb_tab>.inside{border:1px solid #e5e5e5}#maxbuttons.maxbuttons-collections-edit .main{width:100%;max-width:none}#maxbuttons .collection-addnew{display:inline-block}@media (max-width: 780px){#maxbuttons .collection-addnew{margin-left:5px}}#maxbuttons .collection_list .collection{position:relative;background-color:#fff;padding:15px;border-radius:15px;margin:15px 0}#maxbuttons .collection_list .collection h3{display:inline-block;width:90%;margin-top:0;font-size:18px;line-height:20px}#maxbuttons .collection_list .collection h3 a{color:#000;font-size:25px;text-decoration:none}#maxbuttons .collection_list .collection h3 a:hover{text-decoration:underline}#maxbuttons .collection_list .collection h3 .dashicons{color:#ccc;margin-left:15px}#maxbuttons .collection_list .collection h3 .button-count{font-weight:400;font-size:15px;margin-left:15px;vertical-align:top}#maxbuttons .collection_list .collection .collection_remove{top:10px;right:15px;font-size:25px;font-weight:400;position:absolute;cursor:pointer}#maxbuttons .collection_list .collection.welcome p{font-size:14px;line-height:22px}#maxbuttons .collection_list .collection-container{position:relative;width:100%;display:inline-block;clear:both}#maxbuttons .collection_list .collection-container .maxcollection{position:static !important}#maxbuttons .inside .preview_collection.option label{display:inline-block;float:none;font-size:25px;width:100%}#maxbuttons .mb_collection_selection{display:inline-block;min-height:300px;margin:25px 0}#maxbuttons .mb_collection_selection .sortable .item{margin-bottom:25px;position:relative;padding-left:30px;min-height:45px;clear:both}#maxbuttons .mb_collection_selection .sortable .item .button-remove{margin-top:5px;position:absolute;left:20px;top:-15px;border:1px solid #000;border-radius:11px;width:20px;height:20px;background-color:rgba(0,0,0,0.5)}#maxbuttons .mb_collection_selection .sortable .item .button-remove:hover{cursor:pointer}#maxbuttons .mb_collection_selection .sortable .item .button-remove span{color:#fff;font-size:16px;padding-top:2px;overflow:hidden}#maxbuttons .mb_collection_selection .sortable-placeholder{border:3px dashed #aaa;height:45px;width:344px;background:#ccc}#maxbuttons .mb_collection_selection .button_data{display:none}#maxbuttons .mb-social-options{float:right;width:45%;border:1px solid #000;height:100%}#maxbuttons .mb-buttons-selection{float:left;width:45%;overflow:hidden;border:1px solid #000}#maxbuttons .mb-preview-window{position:fixed;top:40%;right:20px;width:30%;max-width:45%;max-height:90vh;background-color:rgba(255,255,255,0.7);border:1px solid #000;z-index:500 !important;overflow:hidden;display:none}@media (max-width: 780px){#maxbuttons .mb-preview-window{position:relative;left:0;top:0;bottom:0;right:0;width:100%;height:auto;display:inline-block;border-color:#ccc}}#maxbuttons .mb-preview-window .mb-preview-wrapper{position:relative;display:inline-block;width:100%}#maxbuttons .sub-tabs .preview-on{background-color:#00b9eb;color:#fff}#maxbuttons .sub-tabs .preview-on::before{line-height:24px}#maxbuttons #picker-back{top:0;left:0;right:0;bottom:0;background-color:#000;z-index:110000;position:fixed;opacity:0.7;display:none}#maxbuttons #picker-modal,#maxbuttons .max-modal.picker-modal{display:none;width:calc(100% - 60px);min-height:300px;top:30px;bottom:30px;left:30px;right:30px;z-index:160000}#maxbuttons #picker-modal .modal_header,#maxbuttons .max-modal.picker-modal .modal_header{height:15px;display:block;overflow:hidden;top:0;left:0;bottom:0;right:0;border:0}#maxbuttons #picker-modal .picker-packages,#maxbuttons .max-modal.picker-modal .picker-packages{top:31px;left:0;width:205px;bottom:0;background-color:#f3f3f3;position:absolute;border-right:1px solid #ccc;overflow-x:hidden;overflow-y:auto}#maxbuttons #picker-modal .picker-packages ul,#maxbuttons .max-modal.picker-modal .picker-packages ul{margin-top:4px}#maxbuttons #picker-modal .picker-packages li a,#maxbuttons .max-modal.picker-modal .picker-packages li a{padding:6px 20px;display:block;color:#0073aa;text-decoration:none;font-size:13px;line-height:16px}#maxbuttons #picker-modal .picker-packages li a:hover,#maxbuttons .max-modal.picker-modal .picker-packages li a:hover{background:rgba(0,0,0,0.04) none repeat scroll 0 0;color:#21759b}#maxbuttons #picker-modal .picker-packages li a.pack-active,#maxbuttons .max-modal.picker-modal .picker-packages li a.pack-active{font-weight:700;color:#000}#maxbuttons #picker-modal .picker-main,#maxbuttons .max-modal.picker-modal .picker-main{left:206px;top:31px;right:0;bottom:60px;position:absolute;border-bottom:1px solid #dddddd;overflow-y:scroll;background-color:#fff}#maxbuttons #picker-modal .picker-main .screen,#maxbuttons .max-modal.picker-modal .picker-main .screen{margin:5px 5px}#maxbuttons #picker-modal .picker-main .screen .tablenav-pages,#maxbuttons .max-modal.picker-modal .picker-main .screen .tablenav-pages{float:none;margin-left:1%}#maxbuttons #picker-modal .picker-main .item,#maxbuttons .max-modal.picker-modal .picker-main .item{padding:5px;margin:5px 0 5px 1%;border:1px solid #000;width:16%;height:auto;float:left;text-align:center;position:relative;background-color:#eee;border:1px solid #b4b9be;display:inline-block}#maxbuttons #picker-modal .picker-main .item .button_data,#maxbuttons .max-modal.picker-modal .picker-main .item .button_data{display:none}#maxbuttons #picker-modal .picker-main .item .button_name,#maxbuttons .max-modal.picker-modal .picker-main .item .button_name{clear:left;display:block;margin-top:15px;font-size:9px}#maxbuttons #picker-modal .picker-main .item .button-selected,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected{position:absolute;font-size:20px;top:-10px;right:-10px;width:24px;height:24px;color:#fff;background-color:#1e8cbe;z-index:100;border-radius:12px}#maxbuttons #picker-modal .picker-main .item .button-selected span,#maxbuttons .max-modal.picker-modal .picker-main .item .button-selected span{padding-top:2px}#maxbuttons #picker-modal .picker-inselection,#maxbuttons .max-modal.picker-modal .picker-inselection{height:60px;display:block;position:absolute;bottom:0;right:0;left:206px;overflow:hidden}#maxbuttons #picker-modal .picker-inselection .info,#maxbuttons .max-modal.picker-modal .picker-inselection .info{height:60px;float:left;display:inline-block;padding:10px 15px;display:none}#maxbuttons #picker-modal .picker-inselection .info .clear-selection,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection{color:#ff0000;display:block;padding:0}#maxbuttons #picker-modal .picker-inselection .info .clear-selection:hover,#maxbuttons .max-modal.picker-modal .picker-inselection .info .clear-selection:hover{background-color:#ff0000;color:#fff}#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:inline-block;position:absolute;overflow:hidden;padding-top:5px;height:100%;left:130px;right:180px}@media (max-width: 780px){#maxbuttons #picker-modal .picker-inselection .items,#maxbuttons .max-modal.picker-modal .picker-inselection .items{display:none}}#maxbuttons #picker-modal .picker-inselection .items .item,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item{height:40px;width:40px;overflow:hidden;float:left;margin:3px;position:relative}#maxbuttons #picker-modal .picker-inselection .items .item .button_name,#maxbuttons #picker-modal .picker-inselection .items .item .button_data,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_name,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button_data{display:none}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove{display:none;position:absolute;width:30px;height:30px;left:2px;border-radius:15px;top:2px;background-color:rgba(0,0,0,0.5)}#maxbuttons #picker-modal .picker-inselection .items .item .button-remove span,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item .button-remove span{font-size:20px;color:#fff;padding-left:5px;padding-top:5px}#maxbuttons #picker-modal .picker-inselection .items .item:hover .button-remove,#maxbuttons .max-modal.picker-modal .picker-inselection .items .item:hover .button-remove{display:block}#maxbuttons #picker-modal .picker-inselection .add,#maxbuttons .max-modal.picker-modal .picker-inselection .add{float:right;margin-top:15px;margin-right:15px;height:100%}#maxbuttons .social_block .social-option{clear:both;margin-top:25px}#maxbuttons .social_block .social-option .shortcode-container{display:inline-block}#maxbuttons .social_block .social-option .button_name{display:inline-block;margin-left:10px;vertical-align:middle;font-weight:700}#maxbuttons #mbfeedback .link{height:25px;width:100px;position:fixed;top:40%;right:0;z-index:1000;transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}#maxbuttons #mbfeedback .link a{background:#ccc;height:25px;width:70px;padding:8px 16px;color:#fff;font-family:Arial, sans-serif;font-size:15px;font-weight:bold;text-decoration:none;line-height:15px;border-bottom:solid 1px #333;border-left:solid 1px #333;border-right:solid 1px #fff}#maxbuttons #mbfeedback .link a::hover{background:#06c}#maxbuttons .ad-wrap{width:27%;float:left;max-width:300px;margin-left:1%;min-width:200px;margin-top:41px}#maxbuttons .ad-wrap .ads{background:#fff;margin-bottom:20px;text-align:center}#maxbuttons .ad-wrap .ads.image-ad{background:none;margin-top:20px}#maxbuttons .ad-wrap .ads.image-ad img{max-width:100%}#maxbuttons .ad-wrap .ads>a{text-decoration:none}#maxbuttons .ad-wrap .ads .header{background-color:#88c5c2;color:#fff;font-size:18px;text-transform:uppercase;padding:12px}#maxbuttons .ad-wrap .ads h3{text-align:center;padding-bottom:14px}#maxbuttons .ad-wrap .ads ul{list-style:none}#maxbuttons .ad-wrap .ads ul li{font-weight:bold;text-decoration:none;color:#000000}#maxbuttons .ad-wrap .ads ul li.plus{font-size:38px;font-weight:700;color:#88c5c2}#maxbuttons .ad-wrap .ads span.img{text-align:center;display:block}#maxbuttons .ad-wrap .ads .ads_button_wrap{margin:20px 0 30px;display:inline-block}#maxbuttons .ad-wrap .ads .ads_button_wrap .button{color:#fff;background-color:#88c5c2;font-size:16px;font-weight:bold;border:0;padding:0 40px}@media screen and (max-width: 960px){#maxbuttons .ad-wrap{display:none}}#maxbuttons.maxbuttons-pro-gopro .main{width:95%;max-width:860px}#maxbuttons.maxbuttons-pro-gopro h1.title{margin:0;font-size:24px;display:inline-block}#maxbuttons.maxbuttons-pro-gopro h1.title .big-maxg-btn{display:inline-block;background-color:#86c5c2;border-color:#73a3a8;margin:0 10px;vertical-align:super;line-height:23px;border-top:0;border-left:0;border-right:0;top:5px}#maxbuttons.maxbuttons-pro-gopro h1.title img{vertical-align:middle}#maxbuttons.maxbuttons-pro-gopro .logo{margin:0;display:inline-block;margin-top:14px}#maxbuttons.maxbuttons-pro-gopro .logo .simple-btn{color:#62c0e6;text-decoration:underline}#maxbuttons.maxbuttons-pro-gopro .default-section{text-align:center;padding:0px 10px}#maxbuttons.maxbuttons-pro-gopro .default-section p{position:relative;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:16px;margin:17px 0;color:#5b5b5b}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(even){background-color:#fff}#maxbuttons.maxbuttons-pro-gopro .default-section:nth-child(odd){background-color:#faf5f1}#maxbuttons.maxbuttons-pro-gopro .default-section .big-maxg-btn{background-color:#fd8d61;border-color:#f0702b;font-size:32px;margin:10px}#maxbuttons.maxbuttons-pro-gopro .default-section h2{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;border:4px solid #bbb;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-size:20px;color:#fff;font-weight:bold;padding:18px 15px 10px;transition:all linear .2s;display:block;text-align:center;border-bottom:4px solid;text-transform:uppercase;border-radius:10px;text-decoration:none;line-height:42px}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover,#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:focus{color:#fff;text-decoration:none;outline:none}#maxbuttons.maxbuttons-pro-gopro .big-maxg-btn:hover{box-shadow:0 8px 6px -6px rgba(0,0,0,0.5)}#maxbuttons.maxbuttons-pro-gopro .price{position:relative;display:inline-block}#maxbuttons.maxbuttons-pro-gopro .price span{position:absolute;color:#fff;display:block;font-size:46px;font-weight:700;top:55px;left:26px}#maxbuttons.maxbuttons-collections-gosocial .social-share-move{background-color:#fff}#maxbuttons.maxbuttons-collections-gosocial .social-share-move .container{padding:15px}#maxbuttons.maxbuttons-collections-gosocial .topbox h1{display:inline-block;font-size:36px;font-weight:700}#maxbuttons.maxbuttons-collections-gosocial .topbox .icon-left{float:left;margin:0 15px 15px 0;display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .topbox h3{display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .topbox:after{clear:both}#maxbuttons.maxbuttons-collections-gosocial .imagebox{clear:both}#maxbuttons.maxbuttons-collections-gosocial .featurebox{margin:20px 0;display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .featurebox h3{display:inline-block}#maxbuttons.maxbuttons-collections-gosocial .featurebox .block{width:45%;float:left;margin-right:3px}#maxbuttons.maxbuttons-collections-gosocial .linkbox{clear:both;margin:30px auto;text-align:center;display:inline-block;width:100%}#maxbuttons.maxbuttons-collections-gosocial .linkbox .install-now{font-size:30px;height:50px;padding-top:10px}
assets/libraries/alpha-color/alpha-color-picker.js CHANGED
@@ -1,5 +1,6 @@
1
  /**
2
  * Alpha Color Picker JS
 
3
  */
4
 
5
  ( function( $ ) {
@@ -109,7 +110,9 @@
109
 
110
  // We must wrap the input now in order to get our a top level class
111
  // around the HTML added by wpColorPicker().
112
- $input.wrap( '<div class="alpha-color-picker-wrap"></div>' );
 
 
113
 
114
  // Get some data off the input.
115
  paletteInput = $input.attr( 'data-palette' ) || 'true';
1
  /**
2
  * Alpha Color Picker JS
3
+ * https://github.com/kallookoo/wp-color-picker-alpha
4
  */
5
 
6
  ( function( $ ) {
110
 
111
  // We must wrap the input now in order to get our a top level class
112
  // around the HTML added by wpColorPicker().
113
+ // MB, put wrap off, maybe not needed.
114
+ // $input.wrap( '<div class="alpha-color-picker-wrap"></div>' );
115
+
116
 
117
  // Get some data off the input.
118
  paletteInput = $input.attr( 'data-palette' ) || 'true';
assets/libraries/scssphp/composer.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "scssphp/scssphp",
3
+ "type": "library",
4
+ "description": "scssphp is a compiler for SCSS written in PHP.",
5
+ "keywords": ["css", "stylesheet", "scss", "sass", "less"],
6
+ "homepage": "http://scssphp.github.io/scssphp/",
7
+ "license": [
8
+ "MIT"
9
+ ],
10
+ "authors": [
11
+ {
12
+ "name": "Anthon Pang",
13
+ "email": "apang@softwaredevelopment.ca",
14
+ "homepage": "https://github.com/robocoder"
15
+ },
16
+ {
17
+ "name": "Cédric Morin",
18
+ "email": "cedric@yterium.com",
19
+ "homepage": "https://github.com/Cerdic"
20
+ }
21
+ ],
22
+ "autoload": {
23
+ "psr-4": { "ScssPhp\\ScssPhp\\": "src/" }
24
+ },
25
+ "autoload-dev": {
26
+ "psr-4": { "ScssPhp\\ScssPhp\\Tests\\": "tests/" }
27
+ },
28
+ "require": {
29
+ "php": ">=5.6.0",
30
+ "ext-json": "*",
31
+ "ext-ctype": "*"
32
+ },
33
+ "require-dev": {
34
+ "squizlabs/php_codesniffer": "~3.5",
35
+ "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3",
36
+ "twbs/bootstrap": "~4.3",
37
+ "zurb/foundation": "~6.5"
38
+ },
39
+ "minimum-stability": "dev",
40
+ "bin": ["bin/pscss"],
41
+ "archive": {
42
+ "exclude": [
43
+ "/Makefile",
44
+ "/.gitattributes",
45
+ "/.gitignore",
46
+ "/.travis.yml",
47
+ "/phpunit.xml.dist",
48
+ "/tests"
49
+ ]
50
+ }
51
+ }
assets/libraries/scssphp/src/Cache.php CHANGED
@@ -22,13 +22,12 @@ use Exception;
22
  * taking in account options that affects the result
23
  *
24
  * The cache manager is agnostic about data format and only the operation is expected to be described by string
25
- *
26
  */
27
 
28
  /**
29
  * SCSS cache
30
  *
31
- * @author Cedric Morin
32
  */
33
  class Cache
34
  {
@@ -102,13 +101,13 @@ class Cache
102
  ) {
103
  $cacheTime = filemtime($fileCache);
104
 
105
- if ((is_null($lastModified) || $cacheTime > $lastModified) &&
106
  $cacheTime + self::$gcLifetime > time()
107
  ) {
108
  $c = file_get_contents($fileCache);
109
  $c = unserialize($c);
110
 
111
- if (is_array($c) && isset($c['value'])) {
112
  return $c['value'];
113
  }
114
  }
@@ -132,6 +131,7 @@ class Cache
132
 
133
  $c = ['value' => $value];
134
  $c = serialize($c);
 
135
  file_put_contents($fileCache, $c);
136
 
137
  if (self::$forceRefresh === 'once') {
22
  * taking in account options that affects the result
23
  *
24
  * The cache manager is agnostic about data format and only the operation is expected to be described by string
 
25
  */
26
 
27
  /**
28
  * SCSS cache
29
  *
30
+ * @author Cedric Morin <cedric@yterium.com>
31
  */
32
  class Cache
33
  {
101
  ) {
102
  $cacheTime = filemtime($fileCache);
103
 
104
+ if ((\is_null($lastModified) || $cacheTime > $lastModified) &&
105
  $cacheTime + self::$gcLifetime > time()
106
  ) {
107
  $c = file_get_contents($fileCache);
108
  $c = unserialize($c);
109
 
110
+ if (\is_array($c) && isset($c['value'])) {
111
  return $c['value'];
112
  }
113
  }
131
 
132
  $c = ['value' => $value];
133
  $c = serialize($c);
134
+
135
  file_put_contents($fileCache, $c);
136
 
137
  if (self::$forceRefresh === 'once') {
assets/libraries/scssphp/src/Colors.php CHANGED
@@ -186,7 +186,7 @@ class Colors
186
  */
187
  public static function colorNameToRGBa($colorName)
188
  {
189
- if (is_string($colorName) && isset(static::$cssColors[$colorName])) {
190
  $rgba = explode(',', static::$cssColors[$colorName]);
191
 
192
  // only case with opacity is transparent, with opacity=0, so we can intval on opacity also
@@ -217,28 +217,23 @@ class Colors
217
  }
218
 
219
  if ($a < 1) {
220
- # specific case we dont' revert according to spec
221
- #if (! $a && ! $r && ! $g && ! $b) {
222
- # return 'transparent';
223
- #}
224
-
225
  return null;
226
  }
227
 
228
- if (is_null($reverseColorTable)) {
229
  $reverseColorTable = [];
230
 
231
  foreach (static::$cssColors as $name => $rgb_str) {
232
  $rgb_str = explode(',', $rgb_str);
233
 
234
- if (count($rgb_str) == 3) {
235
- $reverseColorTable[intval($rgb_str[0])][intval($rgb_str[1])][intval($rgb_str[2])] = $name;
236
  }
237
  }
238
  }
239
 
240
- if (isset($reverseColorTable[intval($r)][intval($g)][intval($b)])) {
241
- return $reverseColorTable[intval($r)][intval($g)][intval($b)];
242
  }
243
 
244
  return null;
186
  */
187
  public static function colorNameToRGBa($colorName)
188
  {
189
+ if (\is_string($colorName) && isset(static::$cssColors[$colorName])) {
190
  $rgba = explode(',', static::$cssColors[$colorName]);
191
 
192
  // only case with opacity is transparent, with opacity=0, so we can intval on opacity also
217
  }
218
 
219
  if ($a < 1) {
 
 
 
 
 
220
  return null;
221
  }
222
 
223
+ if (\is_null($reverseColorTable)) {
224
  $reverseColorTable = [];
225
 
226
  foreach (static::$cssColors as $name => $rgb_str) {
227
  $rgb_str = explode(',', $rgb_str);
228
 
229
+ if (\count($rgb_str) == 3) {
230
+ $reverseColorTable[\intval($rgb_str[0])][\intval($rgb_str[1])][\intval($rgb_str[2])] = $name;
231
  }
232
  }
233
  }
234
 
235
+ if (isset($reverseColorTable[\intval($r)][\intval($g)][\intval($b)])) {
236
+ return $reverseColorTable[\intval($r)][\intval($g)][\intval($b)];
237
  }
238
 
239
  return null;
assets/libraries/scssphp/src/Compiler.php CHANGED
@@ -73,7 +73,7 @@ class Compiler
73
  /**
74
  * @var array
75
  */
76
- static protected $operatorNames = [
77
  '+' => 'add',
78
  '-' => 'sub',
79
  '*' => 'mul',
@@ -93,23 +93,25 @@ class Compiler
93
  /**
94
  * @var array
95
  */
96
- static protected $namespaces = [
97
  'special' => '%',
98
  'mixin' => '@',
99
  'function' => '^',
100
  ];
101
 
102
- static public $true = [Type::T_KEYWORD, 'true'];
103
- static public $false = [Type::T_KEYWORD, 'false'];
104
- static public $null = [Type::T_NULL];
105
- static public $nullString = [Type::T_STRING, '', []];
106
- static public $defaultValue = [Type::T_KEYWORD, ''];
107
- static public $selfSelector = [Type::T_SELF];
108
- static public $emptyList = [Type::T_LIST, '', []];
109
- static public $emptyMap = [Type::T_MAP, [], []];
110
- static public $emptyString = [Type::T_STRING, '"', []];
111
- static public $with = [Type::T_KEYWORD, 'with'];
112
- static public $without = [Type::T_KEYWORD, 'without'];
 
 
113
 
114
  protected $importPaths = [''];
115
  protected $importCache = [];
@@ -159,6 +161,7 @@ class Compiler
159
  protected $stderr;
160
  protected $shouldEvaluate;
161
  protected $ignoreErrors;
 
162
 
163
  protected $callStack = [];
164
 
@@ -226,7 +229,7 @@ class Compiler
226
  $compileOptions = $this->getCompileOptions();
227
  $cache = $this->cache->getCache("compile", $cacheKey, $compileOptions);
228
 
229
- if (is_array($cache) && isset($cache['dependencies']) && isset($cache['out'])) {
230
  // check if any dependency file changed before accepting the cache
231
  foreach ($cache['dependencies'] as $file => $mtime) {
232
  if (! is_file($file) || filemtime($file) !== $mtime) {
@@ -253,6 +256,7 @@ class Compiler
253
  $this->storeEnv = null;
254
  $this->charsetSeen = null;
255
  $this->shouldEvaluate = null;
 
256
 
257
  $this->parser = $this->parserFactory($path);
258
  $tree = $this->parser->parse($code);
@@ -269,7 +273,7 @@ class Compiler
269
  $sourceMapGenerator = null;
270
 
271
  if ($this->sourceMap) {
272
- if (is_object($this->sourceMap) && $this->sourceMap instanceof SourceMapGenerator) {
273
  $sourceMapGenerator = $this->sourceMap;
274
  $this->sourceMap = self::SOURCE_MAP_FILE;
275
  } elseif ($this->sourceMap !== self::SOURCE_MAP_NONE) {
@@ -317,7 +321,18 @@ class Compiler
317
  */
318
  protected function parserFactory($path)
319
  {
320
- $parser = new Parser($path, count($this->sourceNames), $this->encoding, $this->cache);
 
 
 
 
 
 
 
 
 
 
 
321
 
322
  $this->sourceNames[] = $path;
323
  $this->addParsedFile($path);
@@ -336,7 +351,7 @@ class Compiler
336
  protected function isSelfExtend($target, $origin)
337
  {
338
  foreach ($origin as $sel) {
339
- if (in_array($target, $sel)) {
340
  return true;
341
  }
342
  }
@@ -353,11 +368,7 @@ class Compiler
353
  */
354
  protected function pushExtends($target, $origin, $block)
355
  {
356
- if ($this->isSelfExtend($target, $origin)) {
357
- return;
358
- }
359
-
360
- $i = count($this->extends);
361
  $this->extends[] = [$target, $origin, $block];
362
 
363
  foreach ($target as $part) {
@@ -453,7 +464,7 @@ class Compiler
453
  foreach ($block->selectors as $s) {
454
  $selectors[] = $s;
455
 
456
- if (! is_array($s)) {
457
  continue;
458
  }
459
 
@@ -486,7 +497,7 @@ class Compiler
486
  $block->selectors[] = $this->compileSelector($selector);
487
  }
488
 
489
- if ($placeholderSelector && 0 === count($block->selectors) && null !== $parentKey) {
490
  unset($block->parent->children[$parentKey]);
491
 
492
  return;
@@ -510,19 +521,19 @@ class Compiler
510
  $new = [];
511
 
512
  foreach ($parts as $part) {
513
- if (is_array($part)) {
514
  $part = $this->glueFunctionSelectors($part);
515
  $new[] = $part;
516
  } else {
517
  // a selector part finishing with a ) is the last part of a :not( or :nth-child(
518
  // and need to be joined to this
519
- if (count($new) && is_string($new[count($new) - 1]) &&
520
- strlen($part) && substr($part, -1) === ')' && strpos($part, '(') === false
521
  ) {
522
- while (count($new)>1 && substr($new[count($new) - 1], -1) !== '(') {
523
  $part = array_pop($new) . $part;
524
  }
525
- $new[count($new) - 1] .= $part;
526
  } else {
527
  $new[] = $part;
528
  }
@@ -545,11 +556,12 @@ class Compiler
545
  static $partsPile = [];
546
  $selector = $this->glueFunctionSelectors($selector);
547
 
548
- if (count($selector) == 1 && in_array(reset($selector), $partsPile)) {
549
  return;
550
  }
551
 
552
  $outRecurs = [];
 
553
  foreach ($selector as $i => $part) {
554
  if ($i < $from) {
555
  continue;
@@ -557,41 +569,43 @@ class Compiler
557
 
558
  // check that we are not building an infinite loop of extensions
559
  // if the new part is just including a previous part don't try to extend anymore
560
- if (count($part) > 1) {
561
  foreach ($partsPile as $previousPart) {
562
- if (! count(array_diff($previousPart, $part))) {
563
  continue 2;
564
  }
565
  }
566
  }
567
 
568
  $partsPile[] = $part;
 
569
  if ($this->matchExtendsSingle($part, $origin, $initial)) {
570
- $after = array_slice($selector, $i + 1);
571
- $before = array_slice($selector, 0, $i);
572
  list($before, $nonBreakableBefore) = $this->extractRelationshipFromFragment($before);
573
 
574
  foreach ($origin as $new) {
575
  $k = 0;
576
 
577
  // remove shared parts
578
- if (count($new) > 1) {
579
  while ($k < $i && isset($new[$k]) && $selector[$k] === $new[$k]) {
580
  $k++;
581
  }
582
  }
583
- if (count($nonBreakableBefore) and $k == count($new)) {
 
584
  $k--;
585
  }
586
 
587
  $replacement = [];
588
- $tempReplacement = $k > 0 ? array_slice($new, $k) : $new;
589
 
590
- for ($l = count($tempReplacement) - 1; $l >= 0; $l--) {
591
  $slice = [];
592
 
593
  foreach ($tempReplacement[$l] as $chunk) {
594
- if (! in_array($chunk, $slice)) {
595
  $slice[] = $chunk;
596
  }
597
  }
@@ -603,7 +617,7 @@ class Compiler
603
  }
604
  }
605
 
606
- $afterBefore = $l != 0 ? array_slice($tempReplacement, 0, $l) : [];
607
 
608
  // Merge shared direct relationships.
609
  $mergedBefore = $this->mergeDirectRelationships($afterBefore, $nonBreakableBefore);
@@ -622,17 +636,18 @@ class Compiler
622
  $this->pushOrMergeExtentedSelector($out, $result);
623
 
624
  // recursively check for more matches
625
- $startRecurseFrom = count($before) + min(count($nonBreakableBefore), count($mergedBefore));
626
- if (count($origin) > 1) {
 
627
  $this->matchExtends($result, $out, $startRecurseFrom, false);
628
  } else {
629
  $this->matchExtends($result, $outRecurs, $startRecurseFrom, false);
630
  }
631
 
632
  // selector sequence merging
633
- if (! empty($before) && count($new) > 1) {
634
- $preSharedParts = $k > 0 ? array_slice($before, 0, $k) : [];
635
- $postSharedParts = $k > 0 ? array_slice($before, $k) : $before;
636
 
637
  list($betweenSharedParts, $nonBreakabl2) = $this->extractRelationshipFromFragment($afterBefore);
638
 
@@ -652,7 +667,8 @@ class Compiler
652
  }
653
  array_pop($partsPile);
654
  }
655
- while (count($outRecurs)) {
 
656
  $result = array_shift($outRecurs);
657
  $this->pushOrMergeExtentedSelector($out, $result);
658
  }
@@ -660,16 +676,20 @@ class Compiler
660
 
661
  /**
662
  * Test a part for being a pseudo selector
 
663
  * @param string $part
664
- * @param array $matches
665
- * @return bool
 
666
  */
667
  protected function isPseudoSelector($part, &$matches)
668
  {
669
  if (strpos($part, ":") === 0
670
- && preg_match(",^::?([\w-]+)\((.+)\)$,", $part, $matches)) {
 
671
  return true;
672
  }
 
673
  return false;
674
  }
675
 
@@ -679,23 +699,29 @@ class Compiler
679
  * - same as previous
680
  * - in a white list
681
  * in this case we merge the pseudo selector content
 
682
  * @param array $out
683
  * @param array $extended
684
  */
685
  protected function pushOrMergeExtentedSelector(&$out, $extended)
686
  {
687
- if (count($out) && count($extended) === 1 && count(reset($extended)) === 1) {
688
  $single = reset($extended);
689
  $part = reset($single);
690
- if ($this->isPseudoSelector($part, $matchesExtended)
691
- && in_array($matchesExtended[1], [ 'slotted' ])) {
 
 
692
  $prev = end($out);
693
  $prev = $this->glueFunctionSelectors($prev);
694
- if (count($prev) === 1 && count(reset($prev)) === 1) {
 
695
  $single = reset($prev);
696
  $part = reset($single);
697
- if ($this->isPseudoSelector($part, $matchesPrev)
698
- && $matchesPrev[1] === $matchesExtended[1]) {
 
 
699
  $extended = explode($matchesExtended[1] . '(', $matchesExtended[0], 2);
700
  $extended[1] = $matchesPrev[2] . ", " . $extended[1];
701
  $extended = implode($matchesExtended[1] . '(', $extended);
@@ -711,9 +737,9 @@ class Compiler
711
  /**
712
  * Match extends single
713
  *
714
- * @param array $rawSingle
715
- * @param array $outOrigin
716
- * @param bool $initial
717
  *
718
  * @return boolean
719
  */
@@ -723,18 +749,18 @@ class Compiler
723
  $single = [];
724
 
725
  // simple usual cases, no need to do the whole trick
726
- if (in_array($rawSingle, [['>'],['+'],['~']])) {
727
  return false;
728
  }
729
 
730
  foreach ($rawSingle as $part) {
731
  // matches Number
732
- if (! is_string($part)) {
733
  return false;
734
  }
735
 
736
- if (! preg_match('/^[\[.:#%]/', $part) && count($single)) {
737
- $single[count($single) - 1] .= $part;
738
  } else {
739
  $single[] = $part;
740
  }
@@ -742,7 +768,7 @@ class Compiler
742
 
743
  $extendingDecoratedTag = false;
744
 
745
- if (count($single) > 1) {
746
  $matches = null;
747
  $extendingDecoratedTag = preg_match('/^[a-z0-9]+$/i', $single[0], $matches) ? $matches[0] : false;
748
  }
@@ -756,21 +782,27 @@ class Compiler
756
  $counts[$idx] = isset($counts[$idx]) ? $counts[$idx] + 1 : 1;
757
  }
758
  }
759
- if ($initial
760
- && $this->isPseudoSelector($part, $matches)
761
- && ! in_array($matches[1], [ 'not' ])) {
 
 
762
  $buffer = $matches[2];
763
  $parser = $this->parserFactory(__METHOD__);
 
764
  if ($parser->parseSelector($buffer, $subSelectors)) {
765
  foreach ($subSelectors as $ksub => $subSelector) {
766
  $subExtended = [];
767
  $this->matchExtends($subSelector, $subExtended, 0, false);
 
768
  if ($subExtended) {
769
  $subSelectorsExtended = $subSelectors;
770
  $subSelectorsExtended[$ksub] = $subExtended;
 
771
  foreach ($subSelectorsExtended as $ksse => $sse) {
772
  $subSelectorsExtended[$ksse] = $this->collapseSelectors($sse);
773
  }
 
774
  $subSelectorsExtended = implode(', ', $subSelectorsExtended);
775
  $singleExtended = $single;
776
  $singleExtended[$k] = str_replace("(".$buffer.")", "($subSelectorsExtended)", $part);
@@ -788,7 +820,7 @@ class Compiler
788
  $origin = $this->glueFunctionSelectors($origin);
789
 
790
  // check count
791
- if ($count !== count($target)) {
792
  continue;
793
  }
794
 
@@ -798,7 +830,7 @@ class Compiler
798
 
799
  foreach ($origin as $j => $new) {
800
  // prevent infinite loop when target extends itself
801
- if ($this->isSelfExtend($single, $origin)) {
802
  return false;
803
  }
804
 
@@ -814,8 +846,8 @@ class Compiler
814
 
815
  $combined = $this->combineSelectorSingle($replacement, $rem);
816
 
817
- if (count(array_diff($combined, $origin[$j][count($origin[$j]) - 1]))) {
818
- $origin[$j][count($origin[$j]) - 1] = $combined;
819
  }
820
  }
821
 
@@ -844,11 +876,11 @@ class Compiler
844
  $parents = [];
845
  $children = [];
846
 
847
- $j = $i = count($fragment);
848
 
849
  for (;;) {
850
- $children = $j != $i ? array_slice($fragment, $j, $i - $j) : [];
851
- $parents = array_slice($fragment, 0, $j);
852
  $slice = end($parents);
853
 
854
  if (empty($slice) || ! $this->isImmediateRelationshipCombinator($slice[0])) {
@@ -876,11 +908,12 @@ class Compiler
876
  $wasTag = false;
877
  $pseudo = [];
878
 
879
- while (count($other) && strpos(end($other), ':')===0) {
880
  array_unshift($pseudo, array_pop($other));
881
  }
882
 
883
  foreach ([array_reverse($base), array_reverse($other)] as $single) {
 
884
  foreach ($single as $part) {
885
  if (preg_match('/^[\[:]/', $part)) {
886
  $out[] = $part;
@@ -888,21 +921,23 @@ class Compiler
888
  } elseif (preg_match('/^[\.#]/', $part)) {
889
  array_unshift($out, $part);
890
  $wasTag = false;
891
- } elseif (preg_match('/^[^_-]/', $part)) {
892
  $tag[] = $part;
893
  $wasTag = true;
894
  } elseif ($wasTag) {
895
- $tag[count($tag) - 1] .= $part;
896
  } else {
897
- $out[] = $part;
898
  }
 
899
  }
900
  }
901
 
902
- if (count($tag)) {
903
  array_unshift($out, $tag[0]);
904
  }
905
- while (count($pseudo)) {
 
906
  $out[] = array_shift($pseudo);
907
  }
908
 
@@ -1021,11 +1056,13 @@ class Compiler
1021
  */
1022
  protected function compileDirective($directive, OutputBlock $out)
1023
  {
1024
- if (is_array($directive)) {
1025
  $s = '@' . $directive[0];
 
1026
  if (! empty($directive[1])) {
1027
  $s .= ' ' . $this->compileValue($directive[1]);
1028
  }
 
1029
  $this->appendRootDirective($s . ';', $out);
1030
  } else {
1031
  $s = '@' . $directive->name;
@@ -1135,7 +1172,7 @@ class Compiler
1135
  $filteredScopes[] = $s;
1136
  }
1137
 
1138
- if (count($childStash)) {
1139
  $scope = array_shift($childStash);
1140
  } elseif ($scope->children) {
1141
  $scope = end($scope->children);
@@ -1144,7 +1181,7 @@ class Compiler
1144
  }
1145
  }
1146
 
1147
- if (! count($filteredScopes)) {
1148
  return $this->rootBlock;
1149
  }
1150
 
@@ -1155,7 +1192,7 @@ class Compiler
1155
 
1156
  $p = &$newScope;
1157
 
1158
- while (count($filteredScopes)) {
1159
  $s = array_shift($filteredScopes);
1160
  $s->parent = $p;
1161
  $p->children[] = $s;
@@ -1177,7 +1214,7 @@ class Compiler
1177
  */
1178
  protected function completeScope($scope, $previousScope)
1179
  {
1180
- if (! $scope->type && (! $scope->selectors || ! count($scope->selectors)) && count($scope->lines)) {
1181
  $scope->selectors = $this->findScopeSelectors($previousScope, $scope->depth);
1182
  }
1183
 
@@ -1258,7 +1295,7 @@ class Compiler
1258
  /**
1259
  * Filter env stack
1260
  *
1261
- * @param array $envs
1262
  * @param array $with
1263
  * @param array $without
1264
  *
@@ -1310,14 +1347,14 @@ class Compiler
1310
  }
1311
  } elseif (isset($block->selectors)) {
1312
  // a selector starting with number is a keyframe rule
1313
- if (count($block->selectors)) {
1314
  $s = reset($block->selectors);
1315
 
1316
- while (is_array($s)) {
1317
  $s = reset($s);
1318
  }
1319
 
1320
- if (is_object($s) && $s instanceof Node\Number) {
1321
  return $this->testWithWithout('keyframes', $with, $without);
1322
  }
1323
  }
@@ -1342,7 +1379,7 @@ class Compiler
1342
  {
1343
 
1344
  // if without, reject only if in the list (or 'all' is in the list)
1345
- if (count($without)) {
1346
  return (isset($without[$what]) || isset($without['all'])) ? false : true;
1347
  }
1348
 
@@ -1382,8 +1419,8 @@ class Compiler
1382
  /**
1383
  * Compile nested properties lines
1384
  *
1385
- * @param \ScssPhp\ScssPhp\Block $block
1386
- * @param OutputBlock $out
1387
  */
1388
  protected function compileNestedPropertiesBlock(Block $block, OutputBlock $out)
1389
  {
@@ -1487,7 +1524,7 @@ class Compiler
1487
 
1488
  $out = $this->makeOutputBlock(null);
1489
 
1490
- if (isset($this->lineNumberStyle) && count($env->selectors) && count($block->children)) {
1491
  $annotation = $this->makeOutputBlock(Type::T_COMMENT);
1492
  $annotation->depth = 0;
1493
 
@@ -1513,7 +1550,7 @@ class Compiler
1513
 
1514
  $this->scope->children[] = $out;
1515
 
1516
- if (count($block->children)) {
1517
  $out->selectors = $this->multiplySelectors($env, $block->selfParent);
1518
 
1519
  // propagate selfParent to the children where they still can be useful
@@ -1551,18 +1588,20 @@ class Compiler
1551
  if (isset($value[2])) {
1552
  if ($pushEnv) {
1553
  $this->pushEnv();
1554
- $storeEnv = $this->storeEnv;
1555
- $this->storeEnv = $this->env;
1556
  }
1557
 
 
 
 
1558
  try {
1559
  $c = $this->compileValue($value[2]);
1560
  } catch (\Exception $e) {
1561
  // ignore error in comment compilation which are only interpolation
1562
  }
1563
 
 
 
1564
  if ($pushEnv) {
1565
- $this->storeEnv = $storeEnv;
1566
  $this->popEnv();
1567
  }
1568
  }
@@ -1632,14 +1671,14 @@ class Compiler
1632
  protected function evalSelectorPart($part)
1633
  {
1634
  foreach ($part as &$p) {
1635
- if (is_array($p) && ($p[0] === Type::T_INTERPOLATE || $p[0] === Type::T_STRING)) {
1636
  $p = $this->compileValue($p);
1637
 
1638
  // force re-evaluation
1639
  if (strpos($p, '&') !== false || strpos($p, ',') !== false) {
1640
  $this->shouldEvaluate = true;
1641
  }
1642
- } elseif (is_string($p) && strlen($p) >= 2 &&
1643
  ($first = $p[0]) && ($first === '"' || $first === "'") &&
1644
  substr($p, -1) === $first
1645
  ) {
@@ -1679,15 +1718,15 @@ class Compiler
1679
  );
1680
 
1681
  if ($selectorFormat && $this->isImmediateRelationshipCombinator($compound)) {
1682
- if (count($output)) {
1683
- $output[count($output) - 1] .= ' ' . $compound;
1684
  } else {
1685
  $output[] = $compound;
1686
  }
1687
 
1688
  $glueNext = true;
1689
  } elseif ($glueNext) {
1690
- $output[count($output) - 1] .= ' ' . $compound;
1691
  $glueNext = false;
1692
  } else {
1693
  $output[] = $compound;
@@ -1726,7 +1765,7 @@ class Compiler
1726
  protected function revertSelfSelector($selectors)
1727
  {
1728
  foreach ($selectors as &$part) {
1729
- if (is_array($part)) {
1730
  if ($part === [Type::T_SELF]) {
1731
  $part = '&';
1732
  } else {
@@ -1751,17 +1790,17 @@ class Compiler
1751
 
1752
  foreach ($single as $part) {
1753
  if (empty($joined) ||
1754
- ! is_string($part) ||
1755
  preg_match('/[\[.:#%]/', $part)
1756
  ) {
1757
  $joined[] = $part;
1758
  continue;
1759
  }
1760
 
1761
- if (is_array(end($joined))) {
1762
  $joined[] = $part;
1763
  } else {
1764
- $joined[count($joined) - 1] .= $part;
1765
  }
1766
  }
1767
 
@@ -1777,7 +1816,7 @@ class Compiler
1777
  */
1778
  protected function compileSelector($selector)
1779
  {
1780
- if (! is_array($selector)) {
1781
  return $selector; // media and the like
1782
  }
1783
 
@@ -1800,7 +1839,7 @@ class Compiler
1800
  protected function compileSelectorPart($piece)
1801
  {
1802
  foreach ($piece as &$p) {
1803
- if (! is_array($p)) {
1804
  continue;
1805
  }
1806
 
@@ -1827,13 +1866,13 @@ class Compiler
1827
  */
1828
  protected function hasSelectorPlaceholder($selector)
1829
  {
1830
- if (! is_array($selector)) {
1831
  return false;
1832
  }
1833
 
1834
  foreach ($selector as $parts) {
1835
  foreach ($parts as $part) {
1836
- if (strlen($part) && '%' === $part[0]) {
1837
  return true;
1838
  }
1839
  }
@@ -1852,7 +1891,7 @@ class Compiler
1852
  ];
1853
 
1854
  // infinite calling loop
1855
- if (count($this->callStack) > 25000) {
1856
  // not displayed but you can var_dump it to deep debug
1857
  $msg = $this->callStackMessage(true, 100);
1858
  $msg = "Infinite calling loop";
@@ -1883,6 +1922,8 @@ class Compiler
1883
  $ret = $this->compileChild($stm, $out);
1884
 
1885
  if (isset($ret)) {
 
 
1886
  return $ret;
1887
  }
1888
  }
@@ -1907,11 +1948,11 @@ class Compiler
1907
  $this->pushCallStack($traceName);
1908
 
1909
  foreach ($stms as $stm) {
1910
- if ($selfParent && isset($stm[1]) && is_object($stm[1]) && $stm[1] instanceof Block) {
1911
  $stm[1]->selfParent = $selfParent;
1912
  $ret = $this->compileChild($stm, $out);
1913
  $stm[1]->selfParent = null;
1914
- } elseif ($selfParent && in_array($stm[0], [TYPE::T_INCLUDE, TYPE::T_EXTEND])) {
1915
  $stm['selfParent'] = $selfParent;
1916
  $ret = $this->compileChild($stm, $out);
1917
  unset($stm['selfParent']);
@@ -1921,6 +1962,7 @@ class Compiler
1921
 
1922
  if (isset($ret)) {
1923
  $this->throwError('@return may only be used within a function');
 
1924
 
1925
  return;
1926
  }
@@ -1947,7 +1989,7 @@ class Compiler
1947
  $shouldReparse = false;
1948
 
1949
  foreach ($query as $kq => $q) {
1950
- for ($i = 1; $i < count($q); $i++) {
1951
  $value = $this->compileValue($q[$i]);
1952
 
1953
  // the parser had no mean to know if media type or expression if it was an interpolation
@@ -1966,7 +2008,7 @@ class Compiler
1966
  }
1967
 
1968
  if ($shouldReparse) {
1969
- if (is_null($parser)) {
1970
  $parser = $this->parserFactory(__METHOD__);
1971
  }
1972
 
@@ -1980,7 +2022,7 @@ class Compiler
1980
  if ($parser->parseMediaQueryList($queryString, $queries)) {
1981
  $queries = $this->evaluateMediaQuery($queries[2]);
1982
 
1983
- while (count($queries)) {
1984
  $outQueryList[] = array_shift($queries);
1985
  }
1986
 
@@ -2025,17 +2067,17 @@ class Compiler
2025
  foreach ($query as $q) {
2026
  switch ($q[0]) {
2027
  case Type::T_MEDIA_TYPE:
2028
- $newType = array_map([$this, 'compileValue'], array_slice($q, 1));
2029
 
2030
  // combining not and anything else than media type is too risky and should be avoided
2031
  if (! $mediaTypeOnly) {
2032
- if (in_array(Type::T_NOT, $newType) || ($type && in_array(Type::T_NOT, $type) )) {
2033
  if ($type) {
2034
  array_unshift($parts, implode(' ', array_filter($type)));
2035
  }
2036
 
2037
  if (! empty($parts)) {
2038
- if (strlen($current)) {
2039
  $current .= $this->formatter->tagSeparator;
2040
  }
2041
 
@@ -2098,7 +2140,7 @@ class Compiler
2098
  }
2099
 
2100
  if (! empty($parts)) {
2101
- if (strlen($current)) {
2102
  $current .= $this->formatter->tagSeparator;
2103
  }
2104
 
@@ -2180,7 +2222,7 @@ class Compiler
2180
  return $type1;
2181
  }
2182
 
2183
- if (count($type1) > 1) {
2184
  $m1 = strtolower($type1[0]);
2185
  $t1 = strtolower($type1[1]);
2186
  } else {
@@ -2188,7 +2230,7 @@ class Compiler
2188
  $t1 = strtolower($type1[0]);
2189
  }
2190
 
2191
- if (count($type2) > 1) {
2192
  $m2 = strtolower($type2[0]);
2193
  $t2 = strtolower($type2[1]);
2194
  } else {
@@ -2239,7 +2281,7 @@ class Compiler
2239
  $path = $this->compileStringContent($rawPath);
2240
 
2241
  if ($path = $this->findImport($path)) {
2242
- if (! $once || ! in_array($path, $this->importedFiles)) {
2243
  $this->importFile($path, $out);
2244
  $this->importedFiles[] = $path;
2245
  }
@@ -2254,7 +2296,7 @@ class Compiler
2254
 
2255
  if ($rawPath[0] === Type::T_LIST) {
2256
  // handle a list of strings
2257
- if (count($rawPath[2]) === 0) {
2258
  return false;
2259
  }
2260
 
@@ -2297,8 +2339,8 @@ class Compiler
2297
 
2298
  $i = 0;
2299
 
2300
- while ($i < count($root->children)) {
2301
- if (! isset($root->children[$i]->type) || ! in_array($root->children[$i]->type, $allowed)) {
2302
  break;
2303
  }
2304
 
@@ -2308,7 +2350,7 @@ class Compiler
2308
  // remove incompatible children from the bottom of the list
2309
  $saveChildren = [];
2310
 
2311
- while ($i < count($root->children)) {
2312
  $saveChildren[] = array_pop($root->children);
2313
  }
2314
 
@@ -2322,7 +2364,7 @@ class Compiler
2322
  $root->children[] = $child;
2323
 
2324
  // repush children
2325
- while (count($saveChildren)) {
2326
  $root->children[] = array_pop($saveChildren);
2327
  }
2328
  }
@@ -2343,15 +2385,18 @@ class Compiler
2343
  $parent = $out->parent;
2344
 
2345
  if (end($parent->children) !== $out) {
2346
- $outWrite = &$parent->children[count($parent->children) - 1];
2347
  }
2348
  }
2349
 
2350
  // check if it's a flat output or not
2351
- if (count($out->children)) {
2352
- $lastChild = &$out->children[count($out->children) - 1];
2353
 
2354
- if ($lastChild->depth === $out->depth && is_null($lastChild->selectors) && ! count($lastChild->children)) {
 
 
 
2355
  $outWrite = $lastChild;
2356
  } else {
2357
  $nextLines = $this->makeOutputBlock($type);
@@ -2380,7 +2425,7 @@ class Compiler
2380
  $this->sourceIndex = isset($child[Parser::SOURCE_INDEX]) ? $child[Parser::SOURCE_INDEX] : null;
2381
  $this->sourceLine = isset($child[Parser::SOURCE_LINE]) ? $child[Parser::SOURCE_LINE] : -1;
2382
  $this->sourceColumn = isset($child[Parser::SOURCE_COLUMN]) ? $child[Parser::SOURCE_COLUMN] : -1;
2383
- } elseif (is_array($child) && isset($child[1]->sourceLine)) {
2384
  $this->sourceIndex = $child[1]->sourceIndex;
2385
  $this->sourceLine = $child[1]->sourceLine;
2386
  $this->sourceColumn = $child[1]->sourceColumn;
@@ -2430,13 +2475,37 @@ class Compiler
2430
  }
2431
  break;
2432
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2433
  case Type::T_ASSIGN:
2434
  list(, $name, $value) = $child;
2435
 
2436
  if ($name[0] === Type::T_VARIABLE) {
2437
  $flags = isset($child[3]) ? $child[3] : [];
2438
- $isDefault = in_array('!default', $flags);
2439
- $isGlobal = in_array('!global', $flags);
2440
 
2441
  if ($isGlobal) {
2442
  $this->set($name[1], $this->reduce($value), false, $this->rootEnv, $value);
@@ -2444,7 +2513,7 @@ class Compiler
2444
  }
2445
 
2446
  $shouldSet = $isDefault &&
2447
- (is_null($result = $this->get($name[1], false)) ||
2448
  $result === static::$null);
2449
 
2450
  if (! $isDefault || $shouldSet) {
@@ -2456,7 +2525,7 @@ class Compiler
2456
  $compiledName = $this->compileValue($name);
2457
 
2458
  // handle shorthand syntaxes : size / line-height...
2459
- if (in_array($compiledName, ['font', 'grid-row', 'grid-column', 'border-radius'])) {
2460
  if ($value[0] === Type::T_VARIABLE) {
2461
  // if the font value comes from variable, the content is already reduced
2462
  // (i.e., formulas were already calculated), so we need the original unreduced value
@@ -2488,11 +2557,11 @@ class Compiler
2488
  if ($shorthandDividerNeedsUnit) {
2489
  $divider = $shorthandValue[3];
2490
 
2491
- if (is_array($divider)) {
2492
  $divider = $this->reduce($divider, true);
2493
  }
2494
 
2495
- if (intval($divider->dimension) and !count($divider->units)) {
2496
  $revert = false;
2497
  }
2498
  }
@@ -2507,15 +2576,15 @@ class Compiler
2507
  $revert = true;
2508
  // if the list of values is too long, this has to be a shorthand,
2509
  // otherwise it could be a real division
2510
- if (is_null($maxListElements) or count($shorthandValue[2]) <= $maxListElements) {
2511
  if ($shorthandDividerNeedsUnit) {
2512
  $divider = $item[3];
2513
 
2514
- if (is_array($divider)) {
2515
  $divider = $this->reduce($divider, true);
2516
  }
2517
 
2518
- if (intval($divider->dimension) and !count($divider->units)) {
2519
  $revert = false;
2520
  }
2521
  }
@@ -2543,11 +2612,14 @@ class Compiler
2543
 
2544
  $compiledValue = $this->compileValue($value);
2545
 
2546
- $line = $this->formatter->property(
2547
- $compiledName,
2548
- $compiledValue
2549
- );
2550
- $this->appendOutputLine($out, Type::T_ASSIGN, $line);
 
 
 
2551
  break;
2552
 
2553
  case Type::T_COMMENT:
@@ -2605,14 +2677,12 @@ class Compiler
2605
  case Type::T_EACH:
2606
  list(, $each) = $child;
2607
 
2608
- $list = $this->coerceList($this->reduce($each->list));
2609
 
2610
  $this->pushEnv();
2611
- $storeEnv = $this->storeEnv;
2612
- $this->storeEnv = $this->env;
2613
 
2614
  foreach ($list[2] as $item) {
2615
- if (count($each->vars) === 1) {
2616
  $this->set($each->vars[0], $item, true);
2617
  } else {
2618
  list(,, $values) = $this->coerceList($item);
@@ -2627,13 +2697,8 @@ class Compiler
2627
  if ($ret) {
2628
  if ($ret[0] !== Type::T_CONTROL) {
2629
  $store = $this->env->store;
2630
- $this->storeEnv = $storeEnv;
2631
  $this->popEnv();
2632
- foreach ($store as $key => $value) {
2633
- if (!in_array($key, $each->vars)) {
2634
- $this->set($key, $value, true);
2635
- }
2636
- }
2637
 
2638
  return $ret;
2639
  }
@@ -2644,13 +2709,8 @@ class Compiler
2644
  }
2645
  }
2646
  $store = $this->env->store;
2647
- $this->storeEnv = $storeEnv;
2648
  $this->popEnv();
2649
- foreach ($store as $key => $value) {
2650
- if (!in_array($key, $each->vars)) {
2651
- $this->set($key, $value, true);
2652
- }
2653
- }
2654
 
2655
  break;
2656
 
@@ -2690,6 +2750,8 @@ class Compiler
2690
 
2691
  $d = $start < $end ? 1 : -1;
2692
 
 
 
2693
  for (;;) {
2694
  if ((! $for->until && $start - $d == $end) ||
2695
  ($for->until && $start == $end)
@@ -2704,6 +2766,9 @@ class Compiler
2704
 
2705
  if ($ret) {
2706
  if ($ret[0] !== Type::T_CONTROL) {
 
 
 
2707
  return $ret;
2708
  }
2709
 
@@ -2712,6 +2777,11 @@ class Compiler
2712
  }
2713
  }
2714
  }
 
 
 
 
 
2715
  break;
2716
 
2717
  case Type::T_BREAK:
@@ -2744,9 +2814,6 @@ class Compiler
2744
  $this->pushEnv();
2745
  $this->env->depth--;
2746
 
2747
- $storeEnv = $this->storeEnv;
2748
- $this->storeEnv = $this->env;
2749
-
2750
  // Find the parent selectors in the env to be able to know what '&' refers to in the mixin
2751
  // and assign this fake parent to childs
2752
  $selfParent = null;
@@ -2761,7 +2828,7 @@ class Compiler
2761
  $parent->selectors = $parentSelectors;
2762
 
2763
  foreach ($mixin->children as $k => $child) {
2764
- if (isset($child[1]) && is_object($child[1]) && $child[1] instanceof Block) {
2765
  $mixin->children[$k][1]->parent = $parent;
2766
  }
2767
  }
@@ -2800,8 +2867,6 @@ class Compiler
2800
 
2801
  $this->compileChildrenNoReturn($mixin->children, $out, $selfParent, $this->env->marker . " " . $name);
2802
 
2803
- $this->storeEnv = $storeEnv;
2804
-
2805
  $this->popEnv();
2806
  break;
2807
 
@@ -2812,9 +2877,6 @@ class Compiler
2812
  $argContent = $child[1];
2813
 
2814
  if (! $content) {
2815
- $content = new \stdClass();
2816
- $content->scope = new \stdClass();
2817
- $content->children = $env->parent->block->children;
2818
  break;
2819
  }
2820
 
@@ -2823,7 +2885,7 @@ class Compiler
2823
 
2824
  if (isset($argUsing) && isset($argContent)) {
2825
  // Get the arguments provided for the content with the names provided in the "using" argument list
2826
- $this->storeEnv = $this->env;
2827
  $varsUsing = $this->applyArguments($argUsing, $argContent, false);
2828
  }
2829
 
@@ -2965,7 +3027,7 @@ class Compiler
2965
  */
2966
  protected function reduce($value, $inExp = false)
2967
  {
2968
- if (is_null($value)) {
2969
  return null;
2970
  }
2971
 
@@ -3005,12 +3067,12 @@ class Compiler
3005
  // 3. op[op name]
3006
  $fn = "op${ucOpName}${ucLType}${ucRType}";
3007
 
3008
- if (is_callable([$this, $fn]) ||
3009
  (($fn = "op${ucLType}${ucRType}") &&
3010
- is_callable([$this, $fn]) &&
3011
  $passOp = true) ||
3012
  (($fn = "op${ucOpName}") &&
3013
- is_callable([$this, $fn]) &&
3014
  $genOp = true)
3015
  ) {
3016
  $coerceUnit = false;
@@ -3045,10 +3107,18 @@ class Compiler
3045
  $targetUnit = $left->unitless() ? $right[2] : $left[2];
3046
  }
3047
 
3048
- if (! $left->unitless() && ! $right->unitless()) {
 
 
 
3049
  $left = $left->normalize();
3050
  $right = $right->normalize();
3051
  }
 
 
 
 
 
3052
  }
3053
 
3054
  $shouldEval = $inParens || $inExp;
@@ -3123,7 +3193,7 @@ class Compiler
3123
 
3124
  case Type::T_STRING:
3125
  foreach ($value[2] as &$item) {
3126
- if (is_array($item) || $item instanceof \ArrayAccess) {
3127
  $item = $this->reduce($item);
3128
  }
3129
  }
@@ -3143,7 +3213,7 @@ class Compiler
3143
  return $this->fncall($value[1], $value[2]);
3144
 
3145
  case Type::T_SELF:
3146
- $selfSelector = $this->multiplySelectors($this->env);
3147
  $selfSelector = $this->collapseSelectors($selfSelector, true);
3148
 
3149
  return $selfSelector;
@@ -3290,7 +3360,7 @@ class Compiler
3290
  protected function opDivNumberNumber($left, $right)
3291
  {
3292
  if ($right[1] == 0) {
3293
- return [Type::T_STRING, '', [$left[1] . $left[2] . '/' . $right[1] . $right[2]]];
3294
  }
3295
 
3296
  return new Node\Number($left[1] / $right[1], $left[2]);
@@ -3306,6 +3376,10 @@ class Compiler
3306
  */
3307
  protected function opModNumberNumber($left, $right)
3308
  {
 
 
 
 
3309
  return new Node\Number($left[1] % $right[1], $left[2]);
3310
  }
3311
 
@@ -3661,13 +3735,13 @@ class Compiler
3661
  $g = $this->compileRGBAValue($g);
3662
  $b = $this->compileRGBAValue($b);
3663
 
3664
- if (count($value) === 5) {
3665
  $alpha = $this->compileRGBAValue($value[4], true);
3666
 
3667
  if (! is_numeric($alpha) || $alpha < 1) {
3668
  $colorName = Colors::RGBaToColorName($r, $g, $b, $alpha);
3669
 
3670
- if (! is_null($colorName)) {
3671
  return $colorName;
3672
  }
3673
 
@@ -3687,7 +3761,7 @@ class Compiler
3687
 
3688
  $colorName = Colors::RGBaToColorName($r, $g, $b);
3689
 
3690
- if (! is_null($colorName)) {
3691
  return $colorName;
3692
  }
3693
 
@@ -3720,6 +3794,7 @@ class Compiler
3720
 
3721
  list(, $delim, $items) = $value;
3722
  $pre = $post = "";
 
3723
  if (! empty($value['enclosing'])) {
3724
  switch ($value['enclosing']) {
3725
  case 'parent':
@@ -3751,20 +3826,20 @@ class Compiler
3751
  }
3752
 
3753
  $compiled = $this->compileValue($item);
3754
- if ($prefix_value && strlen($compiled)) {
3755
  $compiled = $prefix_value . $compiled;
3756
  }
3757
  $filtered[] = $compiled;
3758
  }
3759
 
3760
- return $pre . substr(implode("$delim", $filtered), strlen($prefix_value)) . $post;
3761
 
3762
  case Type::T_MAP:
3763
  $keys = $value[1];
3764
  $values = $value[2];
3765
  $filtered = [];
3766
 
3767
- for ($i = 0, $s = count($keys); $i < $s; $i++) {
3768
  $filtered[$this->compileValue($keys[$i])] = $this->compileValue($values[$i]);
3769
  }
3770
 
@@ -3785,7 +3860,7 @@ class Compiler
3785
  $delim .= ' ';
3786
  }
3787
 
3788
- $left = count($left[2]) > 0 ?
3789
  $this->compileValue($left) . $delim . $whiteLeft: '';
3790
 
3791
  $delim = $right[1];
@@ -3794,7 +3869,7 @@ class Compiler
3794
  $delim .= ' ';
3795
  }
3796
 
3797
- $right = count($right[2]) > 0 ?
3798
  $whiteRight . $delim . $this->compileValue($right) : '';
3799
 
3800
  return $left . $this->compileValue($interpolate) . $right;
@@ -3883,7 +3958,7 @@ class Compiler
3883
  $parts = [];
3884
 
3885
  foreach ($string[2] as $part) {
3886
- if (is_array($part) || $part instanceof \ArrayAccess) {
3887
  $parts[] = $this->compileValue($part);
3888
  } else {
3889
  $parts[] = $part;
@@ -3906,8 +3981,8 @@ class Compiler
3906
 
3907
  foreach ($items as $i => $item) {
3908
  if ($item[0] === Type::T_INTERPOLATE) {
3909
- $before = [Type::T_LIST, $list[1], array_slice($items, 0, $i)];
3910
- $after = [Type::T_LIST, $list[1], array_slice($items, $i + 1)];
3911
 
3912
  return [Type::T_INTERPOLATED, $item, $before, $after];
3913
  }
@@ -3932,7 +4007,7 @@ class Compiler
3932
 
3933
  $selfParentSelectors = null;
3934
 
3935
- if (! is_null($selfParent) && $selfParent->selectors) {
3936
  $selfParentSelectors = $this->evalSelectors($selfParent->selectors);
3937
  }
3938
 
@@ -3969,6 +4044,11 @@ class Compiler
3969
 
3970
  $selectors = array_values($selectors);
3971
 
 
 
 
 
 
3972
  return $selectors;
3973
  }
3974
 
@@ -3977,7 +4057,7 @@ class Compiler
3977
  *
3978
  * @param array $parent
3979
  * @param array $child
3980
- * @param boolean &$stillHasSelf
3981
  * @param array $selfParentSelectors
3982
 
3983
  * @return array
@@ -3999,7 +4079,7 @@ class Compiler
3999
  if ($p === static::$selfSelector && ! $setSelf) {
4000
  $setSelf = true;
4001
 
4002
- if (is_null($selfParentSelectors)) {
4003
  $selfParentSelectors = $parent;
4004
  }
4005
 
@@ -4010,7 +4090,7 @@ class Compiler
4010
  }
4011
 
4012
  foreach ($parentPart as $pp) {
4013
- if (is_array($pp)) {
4014
  $flatten = [];
4015
 
4016
  array_walk_recursive($pp, function ($a) use (&$flatten) {
@@ -4067,7 +4147,7 @@ class Compiler
4067
 
4068
  list($this->env, $this->storeEnv) = $store;
4069
 
4070
- if (is_null($childQueries)) {
4071
  $childQueries = $parentQueries;
4072
  } else {
4073
  $originalQueries = $childQueries;
@@ -4131,11 +4211,13 @@ class Compiler
4131
  {
4132
  $env = new Environment;
4133
  $env->parent = $this->env;
 
4134
  $env->store = [];
4135
  $env->block = $block;
4136
  $env->depth = isset($this->env->depth) ? $this->env->depth + 1 : 0;
4137
 
4138
  $this->env = $env;
 
4139
 
4140
  return $env;
4141
  }
@@ -4145,9 +4227,25 @@ class Compiler
4145
  */
4146
  protected function popEnv()
4147
  {
 
4148
  $this->env = $this->env->parent;
4149
  }
4150
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4151
  /**
4152
  * Get store environment
4153
  *
@@ -4197,8 +4295,14 @@ class Compiler
4197
 
4198
  $hasNamespace = $name[0] === '^' || $name[0] === '@' || $name[0] === '%';
4199
 
 
 
4200
  for (;;) {
4201
- if (array_key_exists($name, $env->store)) {
 
 
 
 
4202
  break;
4203
  }
4204
 
@@ -4217,12 +4321,14 @@ class Compiler
4217
  }
4218
  }
4219
 
4220
- if (! isset($env->parent)) {
 
 
 
 
4221
  $env = $storeEnv;
4222
  break;
4223
  }
4224
-
4225
- $env = $env->parent;
4226
  }
4227
 
4228
  $env->store[$name] = $value;
@@ -4279,7 +4385,7 @@ class Compiler
4279
  break;
4280
  }
4281
 
4282
- if (array_key_exists($normalizedName, $env->store)) {
4283
  if ($unreduced && isset($env->storeUnreduced[$normalizedName])) {
4284
  return $env->storeUnreduced[$normalizedName];
4285
  }
@@ -4301,11 +4407,13 @@ class Compiler
4301
  continue;
4302
  }
4303
 
4304
- if (! isset($env->parent)) {
 
 
 
 
4305
  break;
4306
  }
4307
-
4308
- $env = $env->parent;
4309
  }
4310
 
4311
  if ($shouldThrow) {
@@ -4326,7 +4434,7 @@ class Compiler
4326
  */
4327
  protected function has($name, Environment $env = null)
4328
  {
4329
- return ! is_null($this->get($name, false, $env));
4330
  }
4331
 
4332
  /**
@@ -4426,7 +4534,7 @@ class Compiler
4426
  */
4427
  public function addImportPath($path)
4428
  {
4429
- if (! in_array($path, $this->importPaths)) {
4430
  $this->importPaths[] = $path;
4431
  }
4432
  }
@@ -4549,6 +4657,7 @@ class Compiler
4549
  */
4550
  protected function importFile($path, OutputBlock $out)
4551
  {
 
4552
  // see if tree is cached
4553
  $realPath = realpath($path);
4554
 
@@ -4569,6 +4678,7 @@ class Compiler
4569
  array_unshift($this->importPaths, $pi['dirname']);
4570
  $this->compileChildrenNoReturn($tree->children, $out);
4571
  array_shift($this->importPaths);
 
4572
  }
4573
 
4574
  /**
@@ -4584,16 +4694,29 @@ class Compiler
4584
  {
4585
  $urls = [];
4586
 
 
 
4587
  // for "normal" scss imports (ignore vanilla css and external requests)
4588
- if (! preg_match('~\.css$|^https?://~', $url)) {
 
 
4589
  // try both normal and the _partial filename
4590
- $urls = [$url, preg_replace('~[^/]+$~', '_\0', $url)];
4591
- }
4592
 
4593
- $hasExtension = preg_match('/[.]s?css$/', $url);
 
 
 
 
 
 
 
 
 
 
4594
 
4595
  foreach ($this->importPaths as $dir) {
4596
- if (is_string($dir)) {
4597
  // check urls for normal import paths
4598
  foreach ($urls as $full) {
4599
  $separator = (
@@ -4603,22 +4726,26 @@ class Compiler
4603
  ) ? '/' : '';
4604
  $full = $dir . $separator . $full;
4605
 
4606
- if (is_file($file = $full . '.scss') ||
4607
- ($hasExtension && is_file($file = $full))
4608
- ) {
4609
  return $file;
4610
  }
4611
  }
4612
- } elseif (is_callable($dir)) {
4613
  // check custom callback for import path
4614
- $file = call_user_func($dir, $url);
4615
 
4616
- if (! is_null($file)) {
4617
  return $file;
4618
  }
4619
  }
4620
  }
4621
 
 
 
 
 
 
 
4622
  return null;
4623
  }
4624
 
@@ -4665,23 +4792,25 @@ class Compiler
4665
  return;
4666
  }
4667
 
4668
- $line = $this->sourceLine;
4669
- $column = $this->sourceColumn;
 
4670
 
4671
- $loc = isset($this->sourceNames[$this->sourceIndex])
4672
- ? $this->sourceNames[$this->sourceIndex] . " on line $line, at column $column"
4673
- : "line: $line, column: $column";
4674
 
4675
- if (func_num_args() > 1) {
4676
- $msg = call_user_func_array('sprintf', func_get_args());
4677
- }
4678
 
4679
- $msg = "$msg: $loc";
4680
 
4681
- $callStackMsg = $this->callStackMessage();
4682
 
4683
- if ($callStackMsg) {
4684
- $msg .= "\nCall Stack:\n" . $callStackMsg;
 
4685
  }
4686
 
4687
  throw new CompilerException($msg);
@@ -4711,7 +4840,7 @@ class Compiler
4711
 
4712
  $callStackMsg[] = $msg;
4713
 
4714
- if (! is_null($limit) && $ncall > $limit) {
4715
  break;
4716
  }
4717
  }
@@ -4763,9 +4892,6 @@ class Compiler
4763
 
4764
  $this->pushEnv();
4765
 
4766
- $storeEnv = $this->storeEnv;
4767
- $this->storeEnv = $this->env;
4768
-
4769
  // set the args
4770
  if (isset($func->args)) {
4771
  $this->applyArguments($func->args, $argValues);
@@ -4777,6 +4903,7 @@ class Compiler
4777
  $tmp->children = [];
4778
 
4779
  $this->env->marker = 'function';
 
4780
  if (! empty($func->parentEnv)) {
4781
  $this->env->declarationScopeParent = $func->parentEnv;
4782
  } else {
@@ -4785,8 +4912,6 @@ class Compiler
4785
 
4786
  $ret = $this->compileChildren($func->children, $tmp, $this->env->marker . " " . $name);
4787
 
4788
- $this->storeEnv = $storeEnv;
4789
-
4790
  $this->popEnv();
4791
 
4792
  $returnValue = ! isset($ret) ? static::$defaultValue : $ret;
@@ -4807,11 +4932,12 @@ class Compiler
4807
  {
4808
  // try a lib function
4809
  $name = $this->normalizeName($name);
 
4810
 
4811
  if (isset($this->userFunctions[$name])) {
4812
  // see if we can find a user function
4813
  list($f, $prototype) = $this->userFunctions[$name];
4814
- } elseif (($f = $this->getBuiltinFunction($name)) && is_callable($f)) {
4815
  $libName = $f[1];
4816
  $prototype = isset(static::$$libName) ? static::$$libName : null;
4817
  } else {
@@ -4832,7 +4958,7 @@ class Compiler
4832
  }
4833
  }
4834
 
4835
- $returnValue = call_user_func($f, $sorted, $kwargs);
4836
 
4837
  if (! isset($returnValue)) {
4838
  return false;
@@ -4897,10 +5023,10 @@ class Compiler
4897
  }
4898
 
4899
  // specific cases ?
4900
- if (in_array($functionName, ['libRgb', 'libRgba', 'libHsl', 'libHsla'])) {
4901
  // notation 100 127 255 / 0 is in fact a simple list of 4 values
4902
  foreach ($args as $k => $arg) {
4903
- if ($arg[1][0] === Type::T_LIST && count($arg[1][2]) === 3) {
4904
  $last = end($arg[1][2]);
4905
 
4906
  if ($last[0] === Type::T_EXPRESSION && $last[1] === '/') {
@@ -4915,7 +5041,7 @@ class Compiler
4915
 
4916
  $finalArgs = [];
4917
 
4918
- if (! is_array(reset($prototypes))) {
4919
  $prototypes = [$prototypes];
4920
  }
4921
 
@@ -4933,14 +5059,14 @@ class Compiler
4933
  $p = explode(':', $p, 2);
4934
  $name = array_shift($p);
4935
 
4936
- if (count($p)) {
4937
  $p = trim(reset($p));
4938
 
4939
  if ($p === 'null') {
4940
  // differentiate this null from the static::$null
4941
  $default = [Type::T_KEYWORD, 'null'];
4942
  } else {
4943
- if (is_null($parser)) {
4944
  $parser = $this->parserFactory(__METHOD__);
4945
  }
4946
 
@@ -4958,6 +5084,9 @@ class Compiler
4958
  $argDef[] = [$name, $default, $isVariable];
4959
  }
4960
 
 
 
 
4961
  try {
4962
  $vars = $this->applyArguments($argDef, $args, false, false);
4963
 
@@ -4995,6 +5124,7 @@ class Compiler
4995
  } catch (CompilerException $e) {
4996
  $exceptionMessage = $e->getMessage();
4997
  }
 
4998
  }
4999
 
5000
  if ($exceptionMessage && ! $prototypeHasMatch) {
@@ -5020,7 +5150,8 @@ class Compiler
5020
  protected function applyArguments($argDef, $argValues, $storeInEnv = true, $reduce = true)
5021
  {
5022
  $output = [];
5023
- if (is_array($argValues) && count($argValues) && end($argValues) === static::$null) {
 
5024
  array_pop($argValues);
5025
  }
5026
 
@@ -5061,6 +5192,7 @@ class Compiler
5061
  }
5062
  }
5063
  }
 
5064
  if (! isset($args[$name]) || $args[$name][3]) {
5065
  if ($hasVariable) {
5066
  $deferredKeywordArgs[$name] = $arg[1];
@@ -5068,7 +5200,7 @@ class Compiler
5068
  $this->throwError("Mixin or function doesn't have an argument named $%s.", $arg[0][1]);
5069
  break;
5070
  }
5071
- } elseif ($args[$name][0] < count($remaining)) {
5072
  $this->throwError("The argument $%s was passed both by position and by name.", $arg[0][1]);
5073
  break;
5074
  } else {
@@ -5095,7 +5227,7 @@ class Compiler
5095
  $keywordArgs[$name] = $item;
5096
  }
5097
  } else {
5098
- if (is_null($splatSeparator)) {
5099
  $splatSeparator = $val[1];
5100
  }
5101
 
@@ -5123,7 +5255,7 @@ class Compiler
5123
  $keywordArgs[$name] = $item;
5124
  }
5125
  } else {
5126
- if (is_null($splatSeparator)) {
5127
  $splatSeparator = $val[1];
5128
  }
5129
 
@@ -5145,9 +5277,9 @@ class Compiler
5145
  list($i, $name, $default, $isVariable) = $arg;
5146
 
5147
  if ($isVariable) {
5148
- $val = [Type::T_LIST, is_null($splatSeparator) ? ',' : $splatSeparator , [], $isVariable];
5149
 
5150
- for ($count = count($remaining); $i < $count; $i++) {
5151
  $val[2][] = $remaining[$i];
5152
  }
5153
 
@@ -5202,15 +5334,15 @@ class Compiler
5202
  */
5203
  protected function coerceValue($value)
5204
  {
5205
- if (is_array($value) || $value instanceof \ArrayAccess) {
5206
  return $value;
5207
  }
5208
 
5209
- if (is_bool($value)) {
5210
  return $this->toBool($value);
5211
  }
5212
 
5213
- if (is_null($value)) {
5214
  return static::$null;
5215
  }
5216
 
@@ -5245,9 +5377,10 @@ class Compiler
5245
  return $item;
5246
  }
5247
 
5248
- if ($item[0] === static::$emptyList[0]
5249
- && $item[1] === static::$emptyList[1]
5250
- && $item[2] === static::$emptyList[2]) {
 
5251
  return static::$emptyMap;
5252
  }
5253
 
@@ -5257,14 +5390,20 @@ class Compiler
5257
  /**
5258
  * Coerce something to list
5259
  *
5260
- * @param array $item
5261
- * @param string $delim
 
5262
  *
5263
  * @return array
5264
  */
5265
- protected function coerceList($item, $delim = ',')
5266
  {
5267
  if (isset($item) && $item[0] === Type::T_LIST) {
 
 
 
 
 
5268
  return $item;
5269
  }
5270
 
@@ -5273,7 +5412,7 @@ class Compiler
5273
  $values = $item[2];
5274
  $list = [];
5275
 
5276
- for ($i = 0, $s = count($keys); $i < $s; $i++) {
5277
  $key = $keys[$i];
5278
  $value = $values[$i];
5279
 
@@ -5281,6 +5420,7 @@ class Compiler
5281
  case Type::T_LIST:
5282
  case Type::T_MAP:
5283
  case Type::T_STRING:
 
5284
  break;
5285
 
5286
  default:
@@ -5356,7 +5496,7 @@ class Compiler
5356
 
5357
  case Type::T_LIST:
5358
  if ($inRGBFunction) {
5359
- if (count($value[2]) == 3 || count($value[2]) == 4) {
5360
  $color = $value[2];
5361
  array_unshift($color, Type::T_COLOR);
5362
 
@@ -5367,16 +5507,17 @@ class Compiler
5367
  return null;
5368
 
5369
  case Type::T_KEYWORD:
5370
- if (! is_string($value[1])) {
5371
  return null;
5372
  }
5373
 
5374
  $name = strtolower($value[1]);
 
5375
  // hexa color?
5376
  if (preg_match('/^#([0-9a-f]+)$/i', $name, $m)) {
5377
- $nofValues = strlen($m[1]);
5378
 
5379
- if (in_array($nofValues, [3, 4, 6, 8])) {
5380
  $nbChannels = 3;
5381
  $color = [];
5382
  $num = hexdec($m[1]);
@@ -5460,18 +5601,18 @@ class Compiler
5460
  protected function compileColorPartValue($value, $min, $max, $isInt = true, $clamp = true, $modulo = false)
5461
  {
5462
  if (! is_numeric($value)) {
5463
- if (is_array($value)) {
5464
  $reduced = $this->reduce($value);
5465
 
5466
- if (is_object($reduced) && $value->type === Type::T_NUMBER) {
5467
  $value = $reduced;
5468
  }
5469
  }
5470
 
5471
- if (is_object($value) && $value->type === Type::T_NUMBER) {
5472
  $num = $value->dimension;
5473
 
5474
- if (count($value->units)) {
5475
  $unit = array_keys($value->units);
5476
  $unit = reset($unit);
5477
 
@@ -5485,7 +5626,7 @@ class Compiler
5485
  }
5486
 
5487
  $value = $num;
5488
- } elseif (is_array($value)) {
5489
  $value = $this->compileValue($value);
5490
  }
5491
  }
@@ -5798,10 +5939,6 @@ class Compiler
5798
  {
5799
  list($list, $value) = $args;
5800
 
5801
- if ($value[0] === Type::T_MAP) {
5802
- return static::$null;
5803
- }
5804
-
5805
  if ($list[0] === Type::T_MAP ||
5806
  $list[0] === Type::T_STRING ||
5807
  $list[0] === Type::T_KEYWORD ||
@@ -5833,7 +5970,7 @@ class Compiler
5833
  ['red', 'green', 'blue', 'alpha'] ];
5834
  protected function libRgb($args, $kwargs, $funcName = 'rgb')
5835
  {
5836
- switch (count($args)) {
5837
  case 1:
5838
  if (! $color = $this->coerceColor($args[0], true)) {
5839
  $color = [Type::T_STRING, '', [$funcName . '(', $args[0], ')']];
@@ -5902,7 +6039,7 @@ class Compiler
5902
  $color[$irgba] = (($irgba < 4) ? 0 : 1);
5903
  }
5904
 
5905
- $color[$irgba] = call_user_func($fn, $color[$irgba], $val, $iarg);
5906
  }
5907
  }
5908
 
@@ -5912,7 +6049,7 @@ class Compiler
5912
  foreach ([4 => 1, 5 => 2, 6 => 3] as $iarg => $ihsl) {
5913
  if (! empty($args[$iarg])) {
5914
  $val = $this->assertNumber($args[$iarg]);
5915
- $hsl[$ihsl] = call_user_func($fn, $hsl[$ihsl], $val, $iarg);
5916
  }
5917
  }
5918
 
@@ -6088,8 +6225,8 @@ class Compiler
6088
  ['hue', 'saturation', 'lightness', 'alpha'] ];
6089
  protected function libHsl($args, $kwargs, $funcName = 'hsl')
6090
  {
6091
- if (count($args) == 1) {
6092
- if ($args[0][0] !== Type::T_LIST || count($args[0][2]) < 3 || count($args[0][2]) > 4) {
6093
  return [Type::T_STRING, '', [$funcName . '(', $args[0], ')']];
6094
  }
6095
 
@@ -6102,7 +6239,7 @@ class Compiler
6102
 
6103
  $alpha = null;
6104
 
6105
- if (count($args) === 4) {
6106
  $alpha = $this->compileColorPartValue($args[3], 0, 100, false);
6107
 
6108
  if (! is_numeric($hue) || ! is_numeric($saturation) || ! is_numeric($lightness) || ! is_numeric($alpha)) {
@@ -6117,7 +6254,7 @@ class Compiler
6117
 
6118
  $color = $this->toRGB($hue, $saturation, $lightness);
6119
 
6120
- if (! is_null($alpha)) {
6121
  $color[4] = $alpha;
6122
  }
6123
 
@@ -6331,13 +6468,13 @@ class Compiler
6331
  return [Type::T_STRING, '"', [$value]];
6332
  }
6333
 
6334
- protected static $libPercentage = ['value'];
6335
  protected function libPercentage($args)
6336
  {
6337
  return new Node\Number($this->coercePercent($args[0]) * 100, '%');
6338
  }
6339
 
6340
- protected static $libRound = ['value'];
6341
  protected function libRound($args)
6342
  {
6343
  $num = $args[0];
@@ -6345,7 +6482,7 @@ class Compiler
6345
  return new Node\Number(round($num[1]), $num[2]);
6346
  }
6347
 
6348
- protected static $libFloor = ['value'];
6349
  protected function libFloor($args)
6350
  {
6351
  $num = $args[0];
@@ -6353,7 +6490,7 @@ class Compiler
6353
  return new Node\Number(floor($num[1]), $num[2]);
6354
  }
6355
 
6356
- protected static $libCeil = ['value'];
6357
  protected function libCeil($args)
6358
  {
6359
  $num = $args[0];
@@ -6361,7 +6498,7 @@ class Compiler
6361
  return new Node\Number(ceil($num[1]), $num[2]);
6362
  }
6363
 
6364
- protected static $libAbs = ['value'];
6365
  protected function libAbs($args)
6366
  {
6367
  $num = $args[0];
@@ -6372,29 +6509,47 @@ class Compiler
6372
  protected function libMin($args)
6373
  {
6374
  $numbers = $this->getNormalizedNumbers($args);
6375
- $min = null;
 
6376
 
6377
- foreach ($numbers as $key => $number) {
6378
- if (is_null($min) || $number[1] <= $min[1]) {
6379
- $min = [$key, $number[1]];
 
 
 
 
 
 
 
 
6380
  }
6381
  }
6382
 
6383
- return $args[$min[0]];
6384
  }
6385
 
6386
  protected function libMax($args)
6387
  {
6388
  $numbers = $this->getNormalizedNumbers($args);
6389
- $max = null;
 
 
 
 
6390
 
6391
- foreach ($numbers as $key => $number) {
6392
- if (is_null($max) || $number[1] >= $max[1]) {
6393
- $max = [$key, $number[1]];
 
 
 
 
 
6394
  }
6395
  }
6396
 
6397
- return $args[$max[0]];
6398
  }
6399
 
6400
  /**
@@ -6418,15 +6573,15 @@ class Compiler
6418
 
6419
  $number = $item->normalize();
6420
 
6421
- if (is_null($unit)) {
6422
  $unit = $number[2];
6423
  $originalUnit = $item->unitStr();
6424
- } elseif ($number[1] && $unit !== $number[2]) {
6425
  $this->throwError('Incompatible units: "%s" and "%s".', $originalUnit, $item->unitStr());
6426
  break;
6427
  }
6428
 
6429
- $numbers[$key] = $number;
6430
  }
6431
 
6432
  return $numbers;
@@ -6435,21 +6590,21 @@ class Compiler
6435
  protected static $libLength = ['list'];
6436
  protected function libLength($args)
6437
  {
6438
- $list = $this->coerceList($args[0]);
6439
 
6440
- return count($list[2]);
6441
  }
6442
 
6443
  //protected static $libListSeparator = ['list...'];
6444
  protected function libListSeparator($args)
6445
  {
6446
- if (count($args) > 1) {
6447
  return 'comma';
6448
  }
6449
 
6450
  $list = $this->coerceList($args[0]);
6451
 
6452
- if (count($list[2]) <= 1) {
6453
  return 'space';
6454
  }
6455
 
@@ -6463,13 +6618,13 @@ class Compiler
6463
  protected static $libNth = ['list', 'n'];
6464
  protected function libNth($args)
6465
  {
6466
- $list = $this->coerceList($args[0]);
6467
  $n = $this->assertNumber($args[1]);
6468
 
6469
  if ($n > 0) {
6470
  $n--;
6471
  } elseif ($n < 0) {
6472
- $n += count($list[2]);
6473
  }
6474
 
6475
  return isset($list[2][$n]) ? $list[2][$n] : static::$defaultValue;
@@ -6484,7 +6639,7 @@ class Compiler
6484
  if ($n > 0) {
6485
  $n--;
6486
  } elseif ($n < 0) {
6487
- $n += count($list[2]);
6488
  }
6489
 
6490
  if (! isset($list[2][$n])) {
@@ -6504,10 +6659,10 @@ class Compiler
6504
  $map = $this->assertMap($args[0]);
6505
  $key = $args[1];
6506
 
6507
- if (! is_null($key)) {
6508
  $key = $this->compileStringContent($this->coerceString($key));
6509
 
6510
- for ($i = count($map[1]) - 1; $i >= 0; $i--) {
6511
  if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) {
6512
  return $map[2][$i];
6513
  }
@@ -6541,7 +6696,7 @@ class Compiler
6541
  $map = $this->assertMap($args[0]);
6542
  $key = $this->compileStringContent($this->coerceString($args[1]));
6543
 
6544
- for ($i = count($map[1]) - 1; $i >= 0; $i--) {
6545
  if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) {
6546
  array_splice($map[1], $i, 1);
6547
  array_splice($map[2], $i, 1);
@@ -6557,7 +6712,7 @@ class Compiler
6557
  $map = $this->assertMap($args[0]);
6558
  $key = $this->compileStringContent($this->coerceString($args[1]));
6559
 
6560
- for ($i = count($map[1]) - 1; $i >= 0; $i--) {
6561
  if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) {
6562
  return true;
6563
  }
@@ -6610,13 +6765,14 @@ class Compiler
6610
  {
6611
  $list = $args[0];
6612
  $this->coerceList($list, ' ');
 
6613
  if (! empty($list['enclosing']) && $list['enclosing'] === 'bracket') {
6614
  return true;
6615
  }
 
6616
  return false;
6617
  }
6618
 
6619
-
6620
  protected function listSeparatorForJoin($list1, $sep)
6621
  {
6622
  if (! isset($sep)) {
@@ -6640,8 +6796,8 @@ class Compiler
6640
  {
6641
  list($list1, $list2, $sep, $bracketed) = $args;
6642
 
6643
- $list1 = $this->coerceList($list1, ' ');
6644
- $list2 = $this->coerceList($list2, ' ');
6645
  $sep = $this->listSeparatorForJoin($list1, $sep);
6646
 
6647
  if ($bracketed === static::$true) {
@@ -6655,6 +6811,7 @@ class Compiler
6655
  } else {
6656
  $bracketed = $this->compileValue($bracketed);
6657
  $bracketed = ! ! $bracketed;
 
6658
  if ($bracketed === true) {
6659
  $bracketed = true;
6660
  }
@@ -6662,18 +6819,22 @@ class Compiler
6662
 
6663
  if ($bracketed === 'auto') {
6664
  $bracketed = false;
 
6665
  if (! empty($list1['enclosing']) && $list1['enclosing'] === 'bracket') {
6666
  $bracketed = true;
6667
  }
6668
  }
6669
 
6670
  $res = [Type::T_LIST, $sep, array_merge($list1[2], $list2[2])];
 
6671
  if (isset($list1['enclosing'])) {
6672
  $res['enlcosing'] = $list1['enclosing'];
6673
  }
 
6674
  if ($bracketed) {
6675
  $res['enclosing'] = 'bracket';
6676
  }
 
6677
  return $res;
6678
  }
6679
 
@@ -6682,13 +6843,14 @@ class Compiler
6682
  {
6683
  list($list1, $value, $sep) = $args;
6684
 
6685
- $list1 = $this->coerceList($list1, ' ');
6686
- $sep = $this->listSeparatorForJoin($list1, $sep);
 
6687
 
6688
- $res = [Type::T_LIST, $sep, array_merge($list1[2], [$value])];
6689
  if (isset($list1['enclosing'])) {
6690
  $res['enclosing'] = $list1['enclosing'];
6691
  }
 
6692
  return $res;
6693
  }
6694
 
@@ -6823,7 +6985,7 @@ class Compiler
6823
  $string = $this->coerceString($args[0]);
6824
  $stringContent = $this->compileStringContent($string);
6825
 
6826
- return new Node\Number(strlen($stringContent), '');
6827
  }
6828
 
6829
  protected static $libStrSlice = ['string', 'start-at', 'end-at:-1'];
@@ -6858,7 +7020,7 @@ class Compiler
6858
  $string = $this->coerceString($args[0]);
6859
  $stringContent = $this->compileStringContent($string);
6860
 
6861
- $string[2] = [function_exists('mb_strtolower') ? mb_strtolower($stringContent) : strtolower($stringContent)];
6862
 
6863
  return $string;
6864
  }
@@ -6869,7 +7031,7 @@ class Compiler
6869
  $string = $this->coerceString($args[0]);
6870
  $stringContent = $this->compileStringContent($string);
6871
 
6872
- $string[2] = [function_exists('mb_strtoupper') ? mb_strtoupper($stringContent) : strtoupper($stringContent)];
6873
 
6874
  return $string;
6875
  }
@@ -6881,7 +7043,7 @@ class Compiler
6881
  $name = $this->compileStringContent($string);
6882
 
6883
  return $this->toBool(
6884
- array_key_exists($name, $this->registeredFeatures) ? $this->registeredFeatures[$name] : false
6885
  );
6886
  }
6887
 
@@ -6905,7 +7067,7 @@ class Compiler
6905
  // built-in functions
6906
  $f = $this->getBuiltinFunction($name);
6907
 
6908
- return $this->toBool(is_callable($f));
6909
  }
6910
 
6911
  protected static $libGlobalVariableExists = ['name'];
@@ -6949,19 +7111,25 @@ class Compiler
6949
  return [Type::T_STRING, '', ['counter(' . implode(',', $list) . ')']];
6950
  }
6951
 
6952
- protected static $libRandom = ['limit'];
6953
  protected function libRandom($args)
6954
  {
6955
  if (isset($args[0])) {
6956
  $n = $this->assertNumber($args[0]);
6957
 
6958
  if ($n < 1) {
6959
- $this->throwError("limit must be greater than or equal to 1");
6960
 
6961
  return null;
6962
  }
6963
 
6964
- return new Node\Number(mt_rand(1, $n), '');
 
 
 
 
 
 
6965
  }
6966
 
6967
  return new Node\Number(mt_rand(1, mt_getrandmax()), '');
@@ -6972,7 +7140,9 @@ class Compiler
6972
  static $id;
6973
 
6974
  if (! isset($id)) {
6975
- $id = mt_rand(0, pow(36, 8));
 
 
6976
  }
6977
 
6978
  $id += mt_rand(0, 10) + 1;
@@ -6985,24 +7155,29 @@ class Compiler
6985
  if ($value === static::$null) {
6986
  $value = [Type::T_KEYWORD, 'null'];
6987
  }
 
6988
  $stringValue = [$value];
 
6989
  if ($value[0] === Type::T_LIST) {
6990
  if (end($value[2]) === static::$null) {
6991
  array_pop($value[2]);
6992
  $value[2][] = [Type::T_STRING, '', ['']];
6993
  $force_enclosing_display = true;
6994
  }
6995
- if (! empty($value['enclosing'])) {
6996
- if ($force_enclosing_display
6997
- || ($value['enclosing'] === 'bracket' )
6998
- || !count($value[2])) {
6999
- $value['enclosing'] = 'forced_'.$value['enclosing'];
7000
- $force_enclosing_display = true;
7001
- }
 
7002
  }
 
7003
  foreach ($value[2] as $k => $listelement) {
7004
  $value[2][$k] = $this->inspectFormatValue($listelement, $force_enclosing_display);
7005
  }
 
7006
  $stringValue = [$value];
7007
  }
7008
 
@@ -7013,6 +7188,7 @@ class Compiler
7013
  protected function libInspect($args)
7014
  {
7015
  $value = $args[0];
 
7016
  return $this->inspectFormatValue($value);
7017
  }
7018
 
@@ -7027,7 +7203,7 @@ class Compiler
7027
  {
7028
  static $parser = null;
7029
 
7030
- if (is_null($parser)) {
7031
  $parser = $this->parserFactory(__METHOD__);
7032
  }
7033
 
@@ -7082,11 +7258,11 @@ class Compiler
7082
  protected function isSuperSelector($super, $sub)
7083
  {
7084
  // one and only one selector for each arg
7085
- if (! $super || count($super) !== 1) {
7086
  $this->throwError("Invalid super selector for isSuperSelector()");
7087
  }
7088
 
7089
- if (! $sub || count($sub) !== 1) {
7090
  $this->throwError("Invalid sub selector for isSuperSelector()");
7091
  }
7092
 
@@ -7114,7 +7290,7 @@ class Compiler
7114
  $nextMustMatch = true;
7115
  $i++;
7116
  } else {
7117
- while ($i < count($sub) && ! $this->isSuperPart($node, $sub[$i])) {
7118
  if ($nextMustMatch) {
7119
  return false;
7120
  }
@@ -7122,7 +7298,7 @@ class Compiler
7122
  $i++;
7123
  }
7124
 
7125
- if ($i >= count($sub)) {
7126
  return false;
7127
  }
7128
 
@@ -7147,11 +7323,11 @@ class Compiler
7147
  $i = 0;
7148
 
7149
  foreach ($superParts as $superPart) {
7150
- while ($i < count($subParts) && $subParts[$i] !== $superPart) {
7151
  $i++;
7152
  }
7153
 
7154
- if ($i >= count($subParts)) {
7155
  return false;
7156
  }
7157
 
@@ -7168,7 +7344,7 @@ class Compiler
7168
  $args = reset($args);
7169
  $args = $args[2];
7170
 
7171
- if (count($args) < 1) {
7172
  $this->throwError("selector-append() needs at least 1 argument");
7173
  }
7174
 
@@ -7194,7 +7370,7 @@ class Compiler
7194
  $this->throwError("Invalid selector list in selector-append()");
7195
  }
7196
 
7197
- while (count($selectors)) {
7198
  $previousSelectors = array_pop($selectors);
7199
 
7200
  if (! $previousSelectors) {
@@ -7295,12 +7471,12 @@ class Compiler
7295
  $extended[] = $selector;
7296
  }
7297
 
7298
- $n = count($extended);
7299
 
7300
  $this->matchExtends($selector, $extended);
7301
 
7302
  // if didnt match, keep the original selector if we are in a replace operation
7303
- if ($replace and count($extended) === $n) {
7304
  $extended[] = $selector;
7305
  }
7306
  }
@@ -7318,7 +7494,7 @@ class Compiler
7318
  $args = reset($args);
7319
  $args = $args[2];
7320
 
7321
- if (count($args) < 1) {
7322
  $this->throwError("selector-nest() needs at least 1 argument");
7323
  }
7324
 
@@ -7381,11 +7557,11 @@ class Compiler
7381
  */
7382
  protected function unifyCompoundSelectors($compound1, $compound2)
7383
  {
7384
- if (! count($compound1)) {
7385
  return $compound2;
7386
  }
7387
 
7388
- if (! count($compound2)) {
7389
  return $compound1;
7390
  }
7391
 
@@ -7402,7 +7578,7 @@ class Compiler
7402
  $unifiedSelectors = [$unifiedCompound];
7403
 
7404
  // do the rest
7405
- while (count($compound1) || count($compound2)) {
7406
  $part1 = end($compound1);
7407
  $part2 = end($compound2);
7408
 
@@ -7502,7 +7678,7 @@ class Compiler
7502
  $after = [];
7503
 
7504
  // try to find a match by tag name first
7505
- while (count($before)) {
7506
  $p = array_pop($before);
7507
 
7508
  if ($partTag && $partTag !== '*' && $partTag == $this->findTagName($p)) {
@@ -7516,11 +7692,11 @@ class Compiler
7516
  $before = $compound;
7517
  $after = [];
7518
 
7519
- while (count($before)) {
7520
  $p = array_pop($before);
7521
 
7522
  if ($this->checkCompatibleTags($partTag, $this->findTagName($p))) {
7523
- if (count(array_intersect($part, $p))) {
7524
  return [$before, $p, $after];
7525
  }
7526
  }
@@ -7596,12 +7772,12 @@ class Compiler
7596
  $tags = array_unique($tags);
7597
  $tags = array_filter($tags);
7598
 
7599
- if (count($tags) > 1) {
7600
  $tags = array_diff($tags, ['*']);
7601
  }
7602
 
7603
  // not compatible nodes
7604
- if (count($tags) > 1) {
7605
  return false;
7606
  }
7607
 
@@ -7646,4 +7822,23 @@ class Compiler
7646
 
7647
  return [Type::T_LIST, ',', $listParts];
7648
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7649
  }
73
  /**
74
  * @var array
75
  */
76
+ protected static $operatorNames = [
77
  '+' => 'add',
78
  '-' => 'sub',
79
  '*' => 'mul',
93
  /**
94
  * @var array
95
  */
96
+ protected static $namespaces = [
97
  'special' => '%',
98
  'mixin' => '@',
99
  'function' => '^',
100
  ];
101
 
102
+ public static $true = [Type::T_KEYWORD, 'true'];
103
+ public static $false = [Type::T_KEYWORD, 'false'];
104
+ public static $NaN = [Type::T_KEYWORD, 'NaN'];
105
+ public static $Infinity = [Type::T_KEYWORD, 'Infinity'];
106
+ public static $null = [Type::T_NULL];
107
+ public static $nullString = [Type::T_STRING, '', []];
108
+ public static $defaultValue = [Type::T_KEYWORD, ''];
109
+ public static $selfSelector = [Type::T_SELF];
110
+ public static $emptyList = [Type::T_LIST, '', []];
111
+ public static $emptyMap = [Type::T_MAP, [], []];
112
+ public static $emptyString = [Type::T_STRING, '"', []];
113
+ public static $with = [Type::T_KEYWORD, 'with'];
114
+ public static $without = [Type::T_KEYWORD, 'without'];
115
 
116
  protected $importPaths = [''];
117
  protected $importCache = [];
161
  protected $stderr;
162
  protected $shouldEvaluate;
163
  protected $ignoreErrors;
164
+ protected $ignoreCallStackMessage = false;
165
 
166
  protected $callStack = [];
167
 
229
  $compileOptions = $this->getCompileOptions();
230
  $cache = $this->cache->getCache("compile", $cacheKey, $compileOptions);
231
 
232
+ if (\is_array($cache) && isset($cache['dependencies']) && isset($cache['out'])) {
233
  // check if any dependency file changed before accepting the cache
234
  foreach ($cache['dependencies'] as $file => $mtime) {
235
  if (! is_file($file) || filemtime($file) !== $mtime) {
256
  $this->storeEnv = null;
257
  $this->charsetSeen = null;
258
  $this->shouldEvaluate = null;
259
+ $this->ignoreCallStackMessage = false;
260
 
261
  $this->parser = $this->parserFactory($path);
262
  $tree = $this->parser->parse($code);
273
  $sourceMapGenerator = null;
274
 
275
  if ($this->sourceMap) {
276
+ if (\is_object($this->sourceMap) && $this->sourceMap instanceof SourceMapGenerator) {
277
  $sourceMapGenerator = $this->sourceMap;
278
  $this->sourceMap = self::SOURCE_MAP_FILE;
279
  } elseif ($this->sourceMap !== self::SOURCE_MAP_NONE) {
321
  */
322
  protected function parserFactory($path)
323
  {
324
+ // https://sass-lang.com/documentation/at-rules/import
325
+ // CSS files imported by Sass don’t allow any special Sass features.
326
+ // In order to make sure authors don’t accidentally write Sass in their CSS,
327
+ // all Sass features that aren’t also valid CSS will produce errors.
328
+ // Otherwise, the CSS will be rendered as-is. It can even be extended!
329
+ $cssOnly = false;
330
+
331
+ if (substr($path, '-4') === '.css') {
332
+ $cssOnly = true;
333
+ }
334
+
335
+ $parser = new Parser($path, \count($this->sourceNames), $this->encoding, $this->cache, $cssOnly);
336
 
337
  $this->sourceNames[] = $path;
338
  $this->addParsedFile($path);
351
  protected function isSelfExtend($target, $origin)
352
  {
353
  foreach ($origin as $sel) {
354
+ if (\in_array($target, $sel)) {
355
  return true;
356
  }
357
  }
368
  */
369
  protected function pushExtends($target, $origin, $block)
370
  {
371
+ $i = \count($this->extends);
 
 
 
 
372
  $this->extends[] = [$target, $origin, $block];
373
 
374
  foreach ($target as $part) {
464
  foreach ($block->selectors as $s) {
465
  $selectors[] = $s;
466
 
467
+ if (! \is_array($s)) {
468
  continue;
469
  }
470
 
497
  $block->selectors[] = $this->compileSelector($selector);
498
  }
499
 
500
+ if ($placeholderSelector && 0 === \count($block->selectors) && null !== $parentKey) {
501
  unset($block->parent->children[$parentKey]);
502
 
503
  return;
521
  $new = [];
522
 
523
  foreach ($parts as $part) {
524
+ if (\is_array($part)) {
525
  $part = $this->glueFunctionSelectors($part);
526
  $new[] = $part;
527
  } else {
528
  // a selector part finishing with a ) is the last part of a :not( or :nth-child(
529
  // and need to be joined to this
530
+ if (\count($new) && \is_string($new[\count($new) - 1]) &&
531
+ \strlen($part) && substr($part, -1) === ')' && strpos($part, '(') === false
532
  ) {
533
+ while (\count($new)>1 && substr($new[\count($new) - 1], -1) !== '(') {
534
  $part = array_pop($new) . $part;
535
  }
536
+ $new[\count($new) - 1] .= $part;
537
  } else {
538
  $new[] = $part;
539
  }
556
  static $partsPile = [];
557
  $selector = $this->glueFunctionSelectors($selector);
558
 
559
+ if (\count($selector) == 1 && \in_array(reset($selector), $partsPile)) {
560
  return;
561
  }
562
 
563
  $outRecurs = [];
564
+
565
  foreach ($selector as $i => $part) {
566
  if ($i < $from) {
567
  continue;
569
 
570
  // check that we are not building an infinite loop of extensions
571
  // if the new part is just including a previous part don't try to extend anymore
572
+ if (\count($part) > 1) {
573
  foreach ($partsPile as $previousPart) {
574
+ if (! \count(array_diff($previousPart, $part))) {
575
  continue 2;
576
  }
577
  }
578
  }
579
 
580
  $partsPile[] = $part;
581
+
582
  if ($this->matchExtendsSingle($part, $origin, $initial)) {
583
+ $after = \array_slice($selector, $i + 1);
584
+ $before = \array_slice($selector, 0, $i);
585
  list($before, $nonBreakableBefore) = $this->extractRelationshipFromFragment($before);
586
 
587
  foreach ($origin as $new) {
588
  $k = 0;
589
 
590
  // remove shared parts
591
+ if (\count($new) > 1) {
592
  while ($k < $i && isset($new[$k]) && $selector[$k] === $new[$k]) {
593
  $k++;
594
  }
595
  }
596
+
597
+ if (\count($nonBreakableBefore) and $k == \count($new)) {
598
  $k--;
599
  }
600
 
601
  $replacement = [];
602
+ $tempReplacement = $k > 0 ? \array_slice($new, $k) : $new;
603
 
604
+ for ($l = \count($tempReplacement) - 1; $l >= 0; $l--) {
605
  $slice = [];
606
 
607
  foreach ($tempReplacement[$l] as $chunk) {
608
+ if (! \in_array($chunk, $slice)) {
609
  $slice[] = $chunk;
610
  }
611
  }
617
  }
618
  }
619
 
620
+ $afterBefore = $l != 0 ? \array_slice($tempReplacement, 0, $l) : [];
621
 
622
  // Merge shared direct relationships.
623
  $mergedBefore = $this->mergeDirectRelationships($afterBefore, $nonBreakableBefore);
636
  $this->pushOrMergeExtentedSelector($out, $result);
637
 
638
  // recursively check for more matches
639
+ $startRecurseFrom = \count($before) + min(\count($nonBreakableBefore), \count($mergedBefore));
640
+
641
+ if (\count($origin) > 1) {
642
  $this->matchExtends($result, $out, $startRecurseFrom, false);
643
  } else {
644
  $this->matchExtends($result, $outRecurs, $startRecurseFrom, false);
645
  }
646
 
647
  // selector sequence merging
648
+ if (! empty($before) && \count($new) > 1) {
649
+ $preSharedParts = $k > 0 ? \array_slice($before, 0, $k) : [];
650
+ $postSharedParts = $k > 0 ? \array_slice($before, $k) : $before;
651
 
652
  list($betweenSharedParts, $nonBreakabl2) = $this->extractRelationshipFromFragment($afterBefore);
653
 
667
  }
668
  array_pop($partsPile);
669
  }
670
+
671
+ while (\count($outRecurs)) {
672
  $result = array_shift($outRecurs);
673
  $this->pushOrMergeExtentedSelector($out, $result);
674
  }
676
 
677
  /**
678
  * Test a part for being a pseudo selector
679
+ *
680
  * @param string $part
681
+ * @param array $matches
682
+ *
683
+ * @return boolean
684
  */
685
  protected function isPseudoSelector($part, &$matches)
686
  {
687
  if (strpos($part, ":") === 0
688
+ && preg_match(",^::?([\w-]+)\((.+)\)$,", $part, $matches)
689
+ ) {
690
  return true;
691
  }
692
+
693
  return false;
694
  }
695
 
699
  * - same as previous
700
  * - in a white list
701
  * in this case we merge the pseudo selector content
702
+ *
703
  * @param array $out
704
  * @param array $extended
705
  */
706
  protected function pushOrMergeExtentedSelector(&$out, $extended)
707
  {
708
+ if (\count($out) && \count($extended) === 1 && \count(reset($extended)) === 1) {
709
  $single = reset($extended);
710
  $part = reset($single);
711
+
712
+ if ($this->isPseudoSelector($part, $matchesExtended) &&
713
+ \in_array($matchesExtended[1], [ 'slotted' ])
714
+ ) {
715
  $prev = end($out);
716
  $prev = $this->glueFunctionSelectors($prev);
717
+
718
+ if (\count($prev) === 1 && \count(reset($prev)) === 1) {
719
  $single = reset($prev);
720
  $part = reset($single);
721
+
722
+ if ($this->isPseudoSelector($part, $matchesPrev) &&
723
+ $matchesPrev[1] === $matchesExtended[1]
724
+ ) {
725
  $extended = explode($matchesExtended[1] . '(', $matchesExtended[0], 2);
726
  $extended[1] = $matchesPrev[2] . ", " . $extended[1];
727
  $extended = implode($matchesExtended[1] . '(', $extended);
737
  /**
738
  * Match extends single
739
  *
740
+ * @param array $rawSingle
741
+ * @param array $outOrigin
742
+ * @param boolean $initial
743
  *
744
  * @return boolean
745
  */
749
  $single = [];
750
 
751
  // simple usual cases, no need to do the whole trick
752
+ if (\in_array($rawSingle, [['>'],['+'],['~']])) {
753
  return false;
754
  }
755
 
756
  foreach ($rawSingle as $part) {
757
  // matches Number
758
+ if (! \is_string($part)) {
759
  return false;
760
  }
761
 
762
+ if (! preg_match('/^[\[.:#%]/', $part) && \count($single)) {
763
+ $single[\count($single) - 1] .= $part;
764
  } else {
765
  $single[] = $part;
766
  }
768
 
769
  $extendingDecoratedTag = false;
770
 
771
+ if (\count($single) > 1) {
772
  $matches = null;
773
  $extendingDecoratedTag = preg_match('/^[a-z0-9]+$/i', $single[0], $matches) ? $matches[0] : false;
774
  }
782
  $counts[$idx] = isset($counts[$idx]) ? $counts[$idx] + 1 : 1;
783
  }
784
  }
785
+
786
+ if ($initial &&
787
+ $this->isPseudoSelector($part, $matches) &&
788
+ ! \in_array($matches[1], [ 'not' ])
789
+ ) {
790
  $buffer = $matches[2];
791
  $parser = $this->parserFactory(__METHOD__);
792
+
793
  if ($parser->parseSelector($buffer, $subSelectors)) {
794
  foreach ($subSelectors as $ksub => $subSelector) {
795
  $subExtended = [];
796
  $this->matchExtends($subSelector, $subExtended, 0, false);
797
+
798
  if ($subExtended) {
799
  $subSelectorsExtended = $subSelectors;
800
  $subSelectorsExtended[$ksub] = $subExtended;
801
+
802
  foreach ($subSelectorsExtended as $ksse => $sse) {
803
  $subSelectorsExtended[$ksse] = $this->collapseSelectors($sse);
804
  }
805
+
806
  $subSelectorsExtended = implode(', ', $subSelectorsExtended);
807
  $singleExtended = $single;
808
  $singleExtended[$k] = str_replace("(".$buffer.")", "($subSelectorsExtended)", $part);
820
  $origin = $this->glueFunctionSelectors($origin);
821
 
822
  // check count
823
+ if ($count !== \count($target)) {
824
  continue;
825
  }
826
 
830
 
831
  foreach ($origin as $j => $new) {
832
  // prevent infinite loop when target extends itself
833
+ if ($this->isSelfExtend($single, $origin) and !$initial) {
834
  return false;
835
  }
836
 
846
 
847
  $combined = $this->combineSelectorSingle($replacement, $rem);
848
 
849
+ if (\count(array_diff($combined, $origin[$j][\count($origin[$j]) - 1]))) {
850
+ $origin[$j][\count($origin[$j]) - 1] = $combined;
851
  }
852
  }
853
 
876
  $parents = [];
877
  $children = [];
878
 
879
+ $j = $i = \count($fragment);
880
 
881
  for (;;) {
882
+ $children = $j != $i ? \array_slice($fragment, $j, $i - $j) : [];
883
+ $parents = \array_slice($fragment, 0, $j);
884
  $slice = end($parents);
885
 
886
  if (empty($slice) || ! $this->isImmediateRelationshipCombinator($slice[0])) {
908
  $wasTag = false;
909
  $pseudo = [];
910
 
911
+ while (\count($other) && strpos(end($other), ':')===0) {
912
  array_unshift($pseudo, array_pop($other));
913
  }
914
 
915
  foreach ([array_reverse($base), array_reverse($other)] as $single) {
916
+ $rang = count($single);
917
  foreach ($single as $part) {
918
  if (preg_match('/^[\[:]/', $part)) {
919
  $out[] = $part;
921
  } elseif (preg_match('/^[\.#]/', $part)) {
922
  array_unshift($out, $part);
923
  $wasTag = false;
924
+ } elseif (preg_match('/^[^_-]/', $part) and $rang==1) {
925
  $tag[] = $part;
926
  $wasTag = true;
927
  } elseif ($wasTag) {
928
+ $tag[\count($tag) - 1] .= $part;
929
  } else {
930
+ array_unshift($out, $part);
931
  }
932
+ $rang--;
933
  }
934
  }
935
 
936
+ if (\count($tag)) {
937
  array_unshift($out, $tag[0]);
938
  }
939
+
940
+ while (\count($pseudo)) {
941
  $out[] = array_shift($pseudo);
942
  }
943
 
1056
  */
1057
  protected function compileDirective($directive, OutputBlock $out)
1058
  {
1059
+ if (\is_array($directive)) {
1060
  $s = '@' . $directive[0];
1061
+
1062
  if (! empty($directive[1])) {
1063
  $s .= ' ' . $this->compileValue($directive[1]);
1064
  }
1065
+
1066
  $this->appendRootDirective($s . ';', $out);
1067
  } else {
1068
  $s = '@' . $directive->name;
1172
  $filteredScopes[] = $s;
1173
  }
1174
 
1175
+ if (\count($childStash)) {
1176
  $scope = array_shift($childStash);
1177
  } elseif ($scope->children) {
1178
  $scope = end($scope->children);
1181
  }
1182
  }
1183
 
1184
+ if (! \count($filteredScopes)) {
1185
  return $this->rootBlock;
1186
  }
1187
 
1192
 
1193
  $p = &$newScope;
1194
 
1195
+ while (\count($filteredScopes)) {
1196
  $s = array_shift($filteredScopes);
1197
  $s->parent = $p;
1198
  $p->children[] = $s;
1214
  */
1215
  protected function completeScope($scope, $previousScope)
1216
  {
1217
+ if (! $scope->type && (! $scope->selectors || ! \count($scope->selectors)) && \count($scope->lines)) {
1218
  $scope->selectors = $this->findScopeSelectors($previousScope, $scope->depth);
1219
  }
1220
 
1295
  /**
1296
  * Filter env stack
1297
  *
1298
+ * @param array $envs
1299
  * @param array $with
1300
  * @param array $without
1301
  *
1347
  }
1348
  } elseif (isset($block->selectors)) {
1349
  // a selector starting with number is a keyframe rule
1350
+ if (\count($block->selectors)) {
1351
  $s = reset($block->selectors);
1352
 
1353
+ while (\is_array($s)) {
1354
  $s = reset($s);
1355
  }
1356
 
1357
+ if (\is_object($s) && $s instanceof Node\Number) {
1358
  return $this->testWithWithout('keyframes', $with, $without);
1359
  }
1360
  }
1379
  {
1380
 
1381
  // if without, reject only if in the list (or 'all' is in the list)
1382
+ if (\count($without)) {
1383
  return (isset($without[$what]) || isset($without['all'])) ? false : true;
1384
  }
1385
 
1419
  /**
1420
  * Compile nested properties lines
1421
  *
1422
+ * @param \ScssPhp\ScssPhp\Block $block
1423
+ * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out
1424
  */
1425
  protected function compileNestedPropertiesBlock(Block $block, OutputBlock $out)
1426
  {
1524
 
1525
  $out = $this->makeOutputBlock(null);
1526
 
1527
+ if (isset($this->lineNumberStyle) && \count($env->selectors) && \count($block->children)) {
1528
  $annotation = $this->makeOutputBlock(Type::T_COMMENT);
1529
  $annotation->depth = 0;
1530
 
1550
 
1551
  $this->scope->children[] = $out;
1552
 
1553
+ if (\count($block->children)) {
1554
  $out->selectors = $this->multiplySelectors($env, $block->selfParent);
1555
 
1556
  // propagate selfParent to the children where they still can be useful
1588
  if (isset($value[2])) {
1589
  if ($pushEnv) {
1590
  $this->pushEnv();
 
 
1591
  }
1592
 
1593
+ $ignoreCallStackMessage = $this->ignoreCallStackMessage;
1594
+ $this->ignoreCallStackMessage = true;
1595
+
1596
  try {
1597
  $c = $this->compileValue($value[2]);
1598
  } catch (\Exception $e) {
1599
  // ignore error in comment compilation which are only interpolation
1600
  }
1601
 
1602
+ $this->ignoreCallStackMessage = $ignoreCallStackMessage;
1603
+
1604
  if ($pushEnv) {
 
1605
  $this->popEnv();
1606
  }
1607
  }
1671
  protected function evalSelectorPart($part)
1672
  {
1673
  foreach ($part as &$p) {
1674
+ if (\is_array($p) && ($p[0] === Type::T_INTERPOLATE || $p[0] === Type::T_STRING)) {
1675
  $p = $this->compileValue($p);
1676
 
1677
  // force re-evaluation
1678
  if (strpos($p, '&') !== false || strpos($p, ',') !== false) {
1679
  $this->shouldEvaluate = true;
1680
  }
1681
+ } elseif (\is_string($p) && \strlen($p) >= 2 &&
1682
  ($first = $p[0]) && ($first === '"' || $first === "'") &&
1683
  substr($p, -1) === $first
1684
  ) {
1718
  );
1719
 
1720
  if ($selectorFormat && $this->isImmediateRelationshipCombinator($compound)) {
1721
+ if (\count($output)) {
1722
+ $output[\count($output) - 1] .= ' ' . $compound;
1723
  } else {
1724
  $output[] = $compound;
1725
  }
1726
 
1727
  $glueNext = true;
1728
  } elseif ($glueNext) {
1729
+ $output[\count($output) - 1] .= ' ' . $compound;
1730
  $glueNext = false;
1731
  } else {
1732
  $output[] = $compound;
1765
  protected function revertSelfSelector($selectors)
1766
  {
1767
  foreach ($selectors as &$part) {
1768
+ if (\is_array($part)) {
1769
  if ($part === [Type::T_SELF]) {
1770
  $part = '&';
1771
  } else {
1790
 
1791
  foreach ($single as $part) {
1792
  if (empty($joined) ||
1793
+ ! \is_string($part) ||
1794
  preg_match('/[\[.:#%]/', $part)
1795
  ) {
1796
  $joined[] = $part;
1797
  continue;
1798
  }
1799
 
1800
+ if (\is_array(end($joined))) {
1801
  $joined[] = $part;
1802
  } else {
1803
+ $joined[\count($joined) - 1] .= $part;
1804
  }
1805
  }
1806
 
1816
  */
1817
  protected function compileSelector($selector)
1818
  {
1819
+ if (! \is_array($selector)) {
1820
  return $selector; // media and the like
1821
  }
1822
 
1839
  protected function compileSelectorPart($piece)
1840
  {
1841
  foreach ($piece as &$p) {
1842
+ if (! \is_array($p)) {
1843
  continue;
1844
  }
1845
 
1866
  */
1867
  protected function hasSelectorPlaceholder($selector)
1868
  {
1869
+ if (! \is_array($selector)) {
1870
  return false;
1871
  }
1872
 
1873
  foreach ($selector as $parts) {
1874
  foreach ($parts as $part) {
1875
+ if (\strlen($part) && '%' === $part[0]) {
1876
  return true;
1877
  }
1878
  }
1891
  ];
1892
 
1893
  // infinite calling loop
1894
+ if (\count($this->callStack) > 25000) {
1895
  // not displayed but you can var_dump it to deep debug
1896
  $msg = $this->callStackMessage(true, 100);
1897
  $msg = "Infinite calling loop";
1922
  $ret = $this->compileChild($stm, $out);
1923
 
1924
  if (isset($ret)) {
1925
+ $this->popCallStack();
1926
+
1927
  return $ret;
1928
  }
1929
  }
1948
  $this->pushCallStack($traceName);
1949
 
1950
  foreach ($stms as $stm) {
1951
+ if ($selfParent && isset($stm[1]) && \is_object($stm[1]) && $stm[1] instanceof Block) {
1952
  $stm[1]->selfParent = $selfParent;
1953
  $ret = $this->compileChild($stm, $out);
1954
  $stm[1]->selfParent = null;
1955
+ } elseif ($selfParent && \in_array($stm[0], [TYPE::T_INCLUDE, TYPE::T_EXTEND])) {
1956
  $stm['selfParent'] = $selfParent;
1957
  $ret = $this->compileChild($stm, $out);
1958
  unset($stm['selfParent']);
1962
 
1963
  if (isset($ret)) {
1964
  $this->throwError('@return may only be used within a function');
1965
+ $this->popCallStack();
1966
 
1967
  return;
1968
  }
1989
  $shouldReparse = false;
1990
 
1991
  foreach ($query as $kq => $q) {
1992
+ for ($i = 1; $i < \count($q); $i++) {
1993
  $value = $this->compileValue($q[$i]);
1994
 
1995
  // the parser had no mean to know if media type or expression if it was an interpolation
2008
  }
2009
 
2010
  if ($shouldReparse) {
2011
+ if (\is_null($parser)) {
2012
  $parser = $this->parserFactory(__METHOD__);
2013
  }
2014
 
2022
  if ($parser->parseMediaQueryList($queryString, $queries)) {
2023
  $queries = $this->evaluateMediaQuery($queries[2]);
2024
 
2025
+ while (\count($queries)) {
2026
  $outQueryList[] = array_shift($queries);
2027
  }
2028
 
2067
  foreach ($query as $q) {
2068
  switch ($q[0]) {
2069
  case Type::T_MEDIA_TYPE:
2070
+ $newType = array_map([$this, 'compileValue'], \array_slice($q, 1));
2071
 
2072
  // combining not and anything else than media type is too risky and should be avoided
2073
  if (! $mediaTypeOnly) {
2074
+ if (\in_array(Type::T_NOT, $newType) || ($type && \in_array(Type::T_NOT, $type) )) {
2075
  if ($type) {
2076
  array_unshift($parts, implode(' ', array_filter($type)));
2077
  }
2078
 
2079
  if (! empty($parts)) {
2080
+ if (\strlen($current)) {
2081
  $current .= $this->formatter->tagSeparator;
2082
  }
2083
 
2140
  }
2141
 
2142
  if (! empty($parts)) {
2143
+ if (\strlen($current)) {
2144
  $current .= $this->formatter->tagSeparator;
2145
  }
2146
 
2222
  return $type1;
2223
  }
2224
 
2225
+ if (\count($type1) > 1) {
2226
  $m1 = strtolower($type1[0]);
2227
  $t1 = strtolower($type1[1]);
2228
  } else {
2230
  $t1 = strtolower($type1[0]);
2231
  }
2232
 
2233
+ if (\count($type2) > 1) {
2234
  $m2 = strtolower($type2[0]);
2235
  $t2 = strtolower($type2[1]);
2236
  } else {
2281
  $path = $this->compileStringContent($rawPath);
2282
 
2283
  if ($path = $this->findImport($path)) {
2284
+ if (! $once || ! \in_array($path, $this->importedFiles)) {
2285
  $this->importFile($path, $out);
2286
  $this->importedFiles[] = $path;
2287
  }
2296
 
2297
  if ($rawPath[0] === Type::T_LIST) {
2298
  // handle a list of strings
2299
+ if (\count($rawPath[2]) === 0) {
2300
  return false;
2301
  }
2302
 
2339
 
2340
  $i = 0;
2341
 
2342
+ while ($i < \count($root->children)) {
2343
+ if (! isset($root->children[$i]->type) || ! \in_array($root->children[$i]->type, $allowed)) {
2344
  break;
2345
  }
2346
 
2350
  // remove incompatible children from the bottom of the list
2351
  $saveChildren = [];
2352
 
2353
+ while ($i < \count($root->children)) {
2354
  $saveChildren[] = array_pop($root->children);
2355
  }
2356
 
2364
  $root->children[] = $child;
2365
 
2366
  // repush children
2367
+ while (\count($saveChildren)) {
2368
  $root->children[] = array_pop($saveChildren);
2369
  }
2370
  }
2385
  $parent = $out->parent;
2386
 
2387
  if (end($parent->children) !== $out) {
2388
+ $outWrite = &$parent->children[\count($parent->children) - 1];
2389
  }
2390
  }
2391
 
2392
  // check if it's a flat output or not
2393
+ if (\count($out->children)) {
2394
+ $lastChild = &$out->children[\count($out->children) - 1];
2395
 
2396
+ if ($lastChild->depth === $out->depth &&
2397
+ \is_null($lastChild->selectors) &&
2398
+ ! \count($lastChild->children)
2399
+ ) {
2400
  $outWrite = $lastChild;
2401
  } else {
2402
  $nextLines = $this->makeOutputBlock($type);
2425
  $this->sourceIndex = isset($child[Parser::SOURCE_INDEX]) ? $child[Parser::SOURCE_INDEX] : null;
2426
  $this->sourceLine = isset($child[Parser::SOURCE_LINE]) ? $child[Parser::SOURCE_LINE] : -1;
2427
  $this->sourceColumn = isset($child[Parser::SOURCE_COLUMN]) ? $child[Parser::SOURCE_COLUMN] : -1;
2428
+ } elseif (\is_array($child) && isset($child[1]->sourceLine)) {
2429
  $this->sourceIndex = $child[1]->sourceIndex;
2430
  $this->sourceLine = $child[1]->sourceLine;
2431
  $this->sourceColumn = $child[1]->sourceColumn;
2475
  }
2476
  break;
2477
 
2478
+ case Type::T_CUSTOM_PROPERTY:
2479
+ list(, $name, $value) = $child;
2480
+ $compiledName = $this->compileValue($name);
2481
+
2482
+ // if the value reduces to null from something else then
2483
+ // the property should be discarded
2484
+ if ($value[0] !== Type::T_NULL) {
2485
+ $value = $this->reduce($value);
2486
+
2487
+ if ($value[0] === Type::T_NULL || $value === static::$nullString) {
2488
+ break;
2489
+ }
2490
+ }
2491
+
2492
+ $compiledValue = $this->compileValue($value);
2493
+
2494
+ $line = $this->formatter->customProperty(
2495
+ $compiledName,
2496
+ $compiledValue
2497
+ );
2498
+
2499
+ $this->appendOutputLine($out, Type::T_ASSIGN, $line);
2500
+ break;
2501
+
2502
  case Type::T_ASSIGN:
2503
  list(, $name, $value) = $child;
2504
 
2505
  if ($name[0] === Type::T_VARIABLE) {
2506
  $flags = isset($child[3]) ? $child[3] : [];
2507
+ $isDefault = \in_array('!default', $flags);
2508
+ $isGlobal = \in_array('!global', $flags);
2509
 
2510
  if ($isGlobal) {
2511
  $this->set($name[1], $this->reduce($value), false, $this->rootEnv, $value);
2513
  }
2514
 
2515
  $shouldSet = $isDefault &&
2516
+ (\is_null($result = $this->get($name[1], false)) ||
2517
  $result === static::$null);
2518
 
2519
  if (! $isDefault || $shouldSet) {
2525
  $compiledName = $this->compileValue($name);
2526
 
2527
  // handle shorthand syntaxes : size / line-height...
2528
+ if (\in_array($compiledName, ['font', 'grid-row', 'grid-column', 'border-radius'])) {
2529
  if ($value[0] === Type::T_VARIABLE) {
2530
  // if the font value comes from variable, the content is already reduced
2531
  // (i.e., formulas were already calculated), so we need the original unreduced value
2557
  if ($shorthandDividerNeedsUnit) {
2558
  $divider = $shorthandValue[3];
2559
 
2560
+ if (\is_array($divider)) {
2561
  $divider = $this->reduce($divider, true);
2562
  }
2563
 
2564
+ if (\intval($divider->dimension) and ! \count($divider->units)) {
2565
  $revert = false;
2566
  }
2567
  }
2576
  $revert = true;
2577
  // if the list of values is too long, this has to be a shorthand,
2578
  // otherwise it could be a real division
2579
+ if (\is_null($maxListElements) or \count($shorthandValue[2]) <= $maxListElements) {
2580
  if ($shorthandDividerNeedsUnit) {
2581
  $divider = $item[3];
2582
 
2583
+ if (\is_array($divider)) {
2584
  $divider = $this->reduce($divider, true);
2585
  }
2586
 
2587
+ if (\intval($divider->dimension) and ! \count($divider->units)) {
2588
  $revert = false;
2589
  }
2590
  }
2612
 
2613
  $compiledValue = $this->compileValue($value);
2614
 
2615
+ // ignore empty value
2616
+ if (\strlen($compiledValue)) {
2617
+ $line = $this->formatter->property(
2618
+ $compiledName,
2619
+ $compiledValue
2620
+ );
2621
+ $this->appendOutputLine($out, Type::T_ASSIGN, $line);
2622
+ }
2623
  break;
2624
 
2625
  case Type::T_COMMENT:
2677
  case Type::T_EACH:
2678
  list(, $each) = $child;
2679
 
2680
+ $list = $this->coerceList($this->reduce($each->list), ',', true);
2681
 
2682
  $this->pushEnv();
 
 
2683
 
2684
  foreach ($list[2] as $item) {
2685
+ if (\count($each->vars) === 1) {
2686
  $this->set($each->vars[0], $item, true);
2687
  } else {
2688
  list(,, $values) = $this->coerceList($item);
2697
  if ($ret) {
2698
  if ($ret[0] !== Type::T_CONTROL) {
2699
  $store = $this->env->store;
 
2700
  $this->popEnv();
2701
+ $this->backPropagateEnv($store, $each->vars);
 
 
 
 
2702
 
2703
  return $ret;
2704
  }
2709
  }
2710
  }
2711
  $store = $this->env->store;
 
2712
  $this->popEnv();
2713
+ $this->backPropagateEnv($store, $each->vars);
 
 
 
 
2714
 
2715
  break;
2716
 
2750
 
2751
  $d = $start < $end ? 1 : -1;
2752
 
2753
+ $this->pushEnv();
2754
+
2755
  for (;;) {
2756
  if ((! $for->until && $start - $d == $end) ||
2757
  ($for->until && $start == $end)
2766
 
2767
  if ($ret) {
2768
  if ($ret[0] !== Type::T_CONTROL) {
2769
+ $store = $this->env->store;
2770
+ $this->popEnv();
2771
+ $this->backPropagateEnv($store, [$for->var]);
2772
  return $ret;
2773
  }
2774
 
2777
  }
2778
  }
2779
  }
2780
+
2781
+ $store = $this->env->store;
2782
+ $this->popEnv();
2783
+ $this->backPropagateEnv($store, [$for->var]);
2784
+
2785
  break;
2786
 
2787
  case Type::T_BREAK:
2814
  $this->pushEnv();
2815
  $this->env->depth--;
2816
 
 
 
 
2817
  // Find the parent selectors in the env to be able to know what '&' refers to in the mixin
2818
  // and assign this fake parent to childs
2819
  $selfParent = null;
2828
  $parent->selectors = $parentSelectors;
2829
 
2830
  foreach ($mixin->children as $k => $child) {
2831
+ if (isset($child[1]) && \is_object($child[1]) && $child[1] instanceof Block) {
2832
  $mixin->children[$k][1]->parent = $parent;
2833
  }
2834
  }
2867
 
2868
  $this->compileChildrenNoReturn($mixin->children, $out, $selfParent, $this->env->marker . " " . $name);
2869
 
 
 
2870
  $this->popEnv();
2871
  break;
2872
 
2877
  $argContent = $child[1];
2878
 
2879
  if (! $content) {
 
 
 
2880
  break;
2881
  }
2882
 
2885
 
2886
  if (isset($argUsing) && isset($argContent)) {
2887
  // Get the arguments provided for the content with the names provided in the "using" argument list
2888
+ $this->storeEnv = null;
2889
  $varsUsing = $this->applyArguments($argUsing, $argContent, false);
2890
  }
2891
 
3027
  */
3028
  protected function reduce($value, $inExp = false)
3029
  {
3030
+ if (\is_null($value)) {
3031
  return null;
3032
  }
3033
 
3067
  // 3. op[op name]
3068
  $fn = "op${ucOpName}${ucLType}${ucRType}";
3069
 
3070
+ if (\is_callable([$this, $fn]) ||
3071
  (($fn = "op${ucLType}${ucRType}") &&
3072
+ \is_callable([$this, $fn]) &&
3073
  $passOp = true) ||
3074
  (($fn = "op${ucOpName}") &&
3075
+ \is_callable([$this, $fn]) &&
3076
  $genOp = true)
3077
  ) {
3078
  $coerceUnit = false;
3107
  $targetUnit = $left->unitless() ? $right[2] : $left[2];
3108
  }
3109
 
3110
+ $baseUnitLeft = $left->isNormalizable();
3111
+ $baseUnitRight = $right->isNormalizable();
3112
+
3113
+ if ($baseUnitLeft && $baseUnitRight && $baseUnitLeft === $baseUnitRight) {
3114
  $left = $left->normalize();
3115
  $right = $right->normalize();
3116
  }
3117
+ else {
3118
+ if ($coerceUnit) {
3119
+ $left = new Node\Number($left[1], []);
3120
+ }
3121
+ }
3122
  }
3123
 
3124
  $shouldEval = $inParens || $inExp;
3193
 
3194
  case Type::T_STRING:
3195
  foreach ($value[2] as &$item) {
3196
+ if (\is_array($item) || $item instanceof \ArrayAccess) {
3197
  $item = $this->reduce($item);
3198
  }
3199
  }
3213
  return $this->fncall($value[1], $value[2]);
3214
 
3215
  case Type::T_SELF:
3216
+ $selfSelector = $this->multiplySelectors($this->env,!empty($this->env->block->selfParent) ? $this->env->block->selfParent : null);
3217
  $selfSelector = $this->collapseSelectors($selfSelector, true);
3218
 
3219
  return $selfSelector;
3360
  protected function opDivNumberNumber($left, $right)
3361
  {
3362
  if ($right[1] == 0) {
3363
+ return ($left[1] == 0) ? static::$NaN : static::$Infinity;
3364
  }
3365
 
3366
  return new Node\Number($left[1] / $right[1], $left[2]);
3376
  */
3377
  protected function opModNumberNumber($left, $right)
3378
  {
3379
+ if ($right[1] == 0) {
3380
+ return static::$NaN;
3381
+ }
3382
+
3383
  return new Node\Number($left[1] % $right[1], $left[2]);
3384
  }
3385
 
3735
  $g = $this->compileRGBAValue($g);
3736
  $b = $this->compileRGBAValue($b);
3737
 
3738
+ if (\count($value) === 5) {
3739
  $alpha = $this->compileRGBAValue($value[4], true);
3740
 
3741
  if (! is_numeric($alpha) || $alpha < 1) {
3742
  $colorName = Colors::RGBaToColorName($r, $g, $b, $alpha);
3743
 
3744
+ if (! \is_null($colorName)) {
3745
  return $colorName;
3746
  }
3747
 
3761
 
3762
  $colorName = Colors::RGBaToColorName($r, $g, $b);
3763
 
3764
+ if (! \is_null($colorName)) {
3765
  return $colorName;
3766
  }
3767
 
3794
 
3795
  list(, $delim, $items) = $value;
3796
  $pre = $post = "";
3797
+
3798
  if (! empty($value['enclosing'])) {
3799
  switch ($value['enclosing']) {
3800
  case 'parent':
3826
  }
3827
 
3828
  $compiled = $this->compileValue($item);
3829
+ if ($prefix_value && \strlen($compiled)) {
3830
  $compiled = $prefix_value . $compiled;
3831
  }
3832
  $filtered[] = $compiled;
3833
  }
3834
 
3835
+ return $pre . substr(implode("$delim", $filtered), \strlen($prefix_value)) . $post;
3836
 
3837
  case Type::T_MAP:
3838
  $keys = $value[1];
3839
  $values = $value[2];
3840
  $filtered = [];
3841
 
3842
+ for ($i = 0, $s = \count($keys); $i < $s; $i++) {
3843
  $filtered[$this->compileValue($keys[$i])] = $this->compileValue($values[$i]);
3844
  }
3845
 
3860
  $delim .= ' ';
3861
  }
3862
 
3863
+ $left = \count($left[2]) > 0 ?
3864
  $this->compileValue($left) . $delim . $whiteLeft: '';
3865
 
3866
  $delim = $right[1];
3869
  $delim .= ' ';
3870
  }
3871
 
3872
+ $right = \count($right[2]) > 0 ?
3873
  $whiteRight . $delim . $this->compileValue($right) : '';
3874
 
3875
  return $left . $this->compileValue($interpolate) . $right;
3958
  $parts = [];
3959
 
3960
  foreach ($string[2] as $part) {
3961
+ if (\is_array($part) || $part instanceof \ArrayAccess) {
3962
  $parts[] = $this->compileValue($part);
3963
  } else {
3964
  $parts[] = $part;
3981
 
3982
  foreach ($items as $i => $item) {
3983
  if ($item[0] === Type::T_INTERPOLATE) {
3984
+ $before = [Type::T_LIST, $list[1], \array_slice($items, 0, $i)];
3985
+ $after = [Type::T_LIST, $list[1], \array_slice($items, $i + 1)];
3986
 
3987
  return [Type::T_INTERPOLATED, $item, $before, $after];
3988
  }
4007
 
4008
  $selfParentSelectors = null;
4009
 
4010
+ if (! \is_null($selfParent) && $selfParent->selectors) {
4011
  $selfParentSelectors = $this->evalSelectors($selfParent->selectors);
4012
  }
4013
 
4044
 
4045
  $selectors = array_values($selectors);
4046
 
4047
+ // case we are just starting a at-root : nothing to multiply but parentSelectors
4048
+ if (!$selectors and $selfParentSelectors) {
4049
+ $selectors = $selfParentSelectors;
4050
+ }
4051
+
4052
  return $selectors;
4053
  }
4054
 
4057
  *
4058
  * @param array $parent
4059
  * @param array $child
4060
+ * @param boolean $stillHasSelf
4061
  * @param array $selfParentSelectors
4062
 
4063
  * @return array
4079
  if ($p === static::$selfSelector && ! $setSelf) {
4080
  $setSelf = true;
4081
 
4082
+ if (\is_null($selfParentSelectors)) {
4083
  $selfParentSelectors = $parent;
4084
  }
4085
 
4090
  }
4091
 
4092
  foreach ($parentPart as $pp) {
4093
+ if (\is_array($pp)) {
4094
  $flatten = [];
4095
 
4096
  array_walk_recursive($pp, function ($a) use (&$flatten) {
4147
 
4148
  list($this->env, $this->storeEnv) = $store;
4149
 
4150
+ if (\is_null($childQueries)) {
4151
  $childQueries = $parentQueries;
4152
  } else {
4153
  $originalQueries = $childQueries;
4211
  {
4212
  $env = new Environment;
4213
  $env->parent = $this->env;
4214
+ $env->parentStore = $this->storeEnv;
4215
  $env->store = [];
4216
  $env->block = $block;
4217
  $env->depth = isset($this->env->depth) ? $this->env->depth + 1 : 0;
4218
 
4219
  $this->env = $env;
4220
+ $this->storeEnv = null;
4221
 
4222
  return $env;
4223
  }
4227
  */
4228
  protected function popEnv()
4229
  {
4230
+ $this->storeEnv = $this->env->parentStore;
4231
  $this->env = $this->env->parent;
4232
  }
4233
 
4234
+ /**
4235
+ * Propagate vars from a just poped Env (used in @each and @for)
4236
+ *
4237
+ * @param array $store
4238
+ * @param null|array $excludedVars
4239
+ */
4240
+ protected function backPropagateEnv($store, $excludedVars = null)
4241
+ {
4242
+ foreach ($store as $key => $value) {
4243
+ if (empty($excludedVars) || ! \in_array($key, $excludedVars)) {
4244
+ $this->set($key, $value, true);
4245
+ }
4246
+ }
4247
+ }
4248
+
4249
  /**
4250
  * Get store environment
4251
  *
4295
 
4296
  $hasNamespace = $name[0] === '^' || $name[0] === '@' || $name[0] === '%';
4297
 
4298
+ $maxDepth = 10000;
4299
+
4300
  for (;;) {
4301
+ if ($maxDepth-- <= 0) {
4302
+ break;
4303
+ }
4304
+
4305
+ if (\array_key_exists($name, $env->store)) {
4306
  break;
4307
  }
4308
 
4321
  }
4322
  }
4323
 
4324
+ if (isset($env->parentStore)) {
4325
+ $env = $env->parentStore;
4326
+ } elseif (isset($env->parent)) {
4327
+ $env = $env->parent;
4328
+ } else {
4329
  $env = $storeEnv;
4330
  break;
4331
  }
 
 
4332
  }
4333
 
4334
  $env->store[$name] = $value;
4385
  break;
4386
  }
4387
 
4388
+ if (\array_key_exists($normalizedName, $env->store)) {
4389
  if ($unreduced && isset($env->storeUnreduced[$normalizedName])) {
4390
  return $env->storeUnreduced[$normalizedName];
4391
  }
4407
  continue;
4408
  }
4409
 
4410
+ if (isset($env->parentStore)) {
4411
+ $env = $env->parentStore;
4412
+ } elseif (isset($env->parent)) {
4413
+ $env = $env->parent;
4414
+ } else {
4415
  break;
4416
  }
 
 
4417
  }
4418
 
4419
  if ($shouldThrow) {
4434
  */
4435
  protected function has($name, Environment $env = null)
4436
  {
4437
+ return ! \is_null($this->get($name, false, $env));
4438
  }
4439
 
4440
  /**
4534
  */
4535
  public function addImportPath($path)
4536
  {
4537
+ if (! \in_array($path, $this->importPaths)) {
4538
  $this->importPaths[] = $path;
4539
  }
4540
  }
4657
  */
4658
  protected function importFile($path, OutputBlock $out)
4659
  {
4660
+ $this->pushCallStack('import '.$path);
4661
  // see if tree is cached
4662
  $realPath = realpath($path);
4663
 
4678
  array_unshift($this->importPaths, $pi['dirname']);
4679
  $this->compileChildrenNoReturn($tree->children, $out);
4680
  array_shift($this->importPaths);
4681
+ $this->popCallStack();
4682
  }
4683
 
4684
  /**
4694
  {
4695
  $urls = [];
4696
 
4697
+ $hasExtension = preg_match('/[.]s?css$/', $url);
4698
+
4699
  // for "normal" scss imports (ignore vanilla css and external requests)
4700
+ if (! preg_match('~\.css$|^https?://|^//~', $url)) {
4701
+ $isPartial = (strpos(basename($url), '_') === 0);
4702
+
4703
  // try both normal and the _partial filename
4704
+ $urls = [$url . ($hasExtension ? '' : '.scss')];
 
4705
 
4706
+ if (! $isPartial) {
4707
+ $urls[] = preg_replace('~[^/]+$~', '_\0', $url) . ($hasExtension ? '' : '.scss');
4708
+ }
4709
+
4710
+ if (! $hasExtension) {
4711
+ $urls[] = "$url/index.scss";
4712
+ $urls[] = "$url/_index.scss";
4713
+ // allow to find a plain css file, *if* no scss or partial scss is found
4714
+ $urls[] .= $url . ".css";
4715
+ }
4716
+ }
4717
 
4718
  foreach ($this->importPaths as $dir) {
4719
+ if (\is_string($dir)) {
4720
  // check urls for normal import paths
4721
  foreach ($urls as $full) {
4722
  $separator = (
4726
  ) ? '/' : '';
4727
  $full = $dir . $separator . $full;
4728
 
4729
+ if (is_file($file = $full)) {
 
 
4730
  return $file;
4731
  }
4732
  }
4733
+ } elseif (\is_callable($dir)) {
4734
  // check custom callback for import path
4735
+ $file = \call_user_func($dir, $url);
4736
 
4737
+ if (! \is_null($file)) {
4738
  return $file;
4739
  }
4740
  }
4741
  }
4742
 
4743
+ if ($urls) {
4744
+ if (! $hasExtension or preg_match('/[.]scss$/', $url)) {
4745
+ $this->throwError("`$url` file not found for @import");
4746
+ }
4747
+ }
4748
+
4749
  return null;
4750
  }
4751
 
4792
  return;
4793
  }
4794
 
4795
+ if (\func_num_args() > 1) {
4796
+ $msg = \call_user_func_array('sprintf', \func_get_args());
4797
+ }
4798
 
4799
+ if (! $this->ignoreCallStackMessage) {
4800
+ $line = $this->sourceLine;
4801
+ $column = $this->sourceColumn;
4802
 
4803
+ $loc = isset($this->sourceNames[$this->sourceIndex])
4804
+ ? $this->sourceNames[$this->sourceIndex] . " on line $line, at column $column"
4805
+ : "line: $line, column: $column";
4806
 
4807
+ $msg = "$msg: $loc";
4808
 
4809
+ $callStackMsg = $this->callStackMessage();
4810
 
4811
+ if ($callStackMsg) {
4812
+ $msg .= "\nCall Stack:\n" . $callStackMsg;
4813
+ }
4814
  }
4815
 
4816
  throw new CompilerException($msg);
4840
 
4841
  $callStackMsg[] = $msg;
4842
 
4843
+ if (! \is_null($limit) && $ncall > $limit) {
4844
  break;
4845
  }
4846
  }
4892
 
4893
  $this->pushEnv();
4894
 
 
 
 
4895
  // set the args
4896
  if (isset($func->args)) {
4897
  $this->applyArguments($func->args, $argValues);
4903
  $tmp->children = [];
4904
 
4905
  $this->env->marker = 'function';
4906
+
4907
  if (! empty($func->parentEnv)) {
4908
  $this->env->declarationScopeParent = $func->parentEnv;
4909
  } else {
4912
 
4913
  $ret = $this->compileChildren($func->children, $tmp, $this->env->marker . " " . $name);
4914
 
 
 
4915
  $this->popEnv();
4916
 
4917
  $returnValue = ! isset($ret) ? static::$defaultValue : $ret;
4932
  {
4933
  // try a lib function
4934
  $name = $this->normalizeName($name);
4935
+ $libName = null;
4936
 
4937
  if (isset($this->userFunctions[$name])) {
4938
  // see if we can find a user function
4939
  list($f, $prototype) = $this->userFunctions[$name];
4940
+ } elseif (($f = $this->getBuiltinFunction($name)) && \is_callable($f)) {
4941
  $libName = $f[1];
4942
  $prototype = isset(static::$$libName) ? static::$$libName : null;
4943
  } else {
4958
  }
4959
  }
4960
 
4961
+ $returnValue = \call_user_func($f, $sorted, $kwargs);
4962
 
4963
  if (! isset($returnValue)) {
4964
  return false;
5023
  }
5024
 
5025
  // specific cases ?
5026
+ if (\in_array($functionName, ['libRgb', 'libRgba', 'libHsl', 'libHsla'])) {
5027
  // notation 100 127 255 / 0 is in fact a simple list of 4 values
5028
  foreach ($args as $k => $arg) {
5029
+ if ($arg[1][0] === Type::T_LIST && \count($arg[1][2]) === 3) {
5030
  $last = end($arg[1][2]);
5031
 
5032
  if ($last[0] === Type::T_EXPRESSION && $last[1] === '/') {
5041
 
5042
  $finalArgs = [];
5043
 
5044
+ if (! \is_array(reset($prototypes))) {
5045
  $prototypes = [$prototypes];
5046
  }
5047
 
5059
  $p = explode(':', $p, 2);
5060
  $name = array_shift($p);
5061
 
5062
+ if (\count($p)) {
5063
  $p = trim(reset($p));
5064
 
5065
  if ($p === 'null') {
5066
  // differentiate this null from the static::$null
5067
  $default = [Type::T_KEYWORD, 'null'];
5068
  } else {
5069
+ if (\is_null($parser)) {
5070
  $parser = $this->parserFactory(__METHOD__);
5071
  }
5072
 
5084
  $argDef[] = [$name, $default, $isVariable];
5085
  }
5086
 
5087
+ $ignoreCallStackMessage = $this->ignoreCallStackMessage;
5088
+ $this->ignoreCallStackMessage = true;
5089
+
5090
  try {
5091
  $vars = $this->applyArguments($argDef, $args, false, false);
5092
 
5124
  } catch (CompilerException $e) {
5125
  $exceptionMessage = $e->getMessage();
5126
  }
5127
+ $this->ignoreCallStackMessage = $ignoreCallStackMessage;
5128
  }
5129
 
5130
  if ($exceptionMessage && ! $prototypeHasMatch) {
5150
  protected function applyArguments($argDef, $argValues, $storeInEnv = true, $reduce = true)
5151
  {
5152
  $output = [];
5153
+
5154
+ if (\is_array($argValues) && \count($argValues) && end($argValues) === static::$null) {
5155
  array_pop($argValues);
5156
  }
5157
 
5192
  }
5193
  }
5194
  }
5195
+
5196
  if (! isset($args[$name]) || $args[$name][3]) {
5197
  if ($hasVariable) {
5198
  $deferredKeywordArgs[$name] = $arg[1];
5200
  $this->throwError("Mixin or function doesn't have an argument named $%s.", $arg[0][1]);
5201
  break;
5202
  }
5203
+ } elseif ($args[$name][0] < \count($remaining)) {
5204
  $this->throwError("The argument $%s was passed both by position and by name.", $arg[0][1]);
5205
  break;
5206
  } else {
5227
  $keywordArgs[$name] = $item;
5228
  }
5229
  } else {
5230
+ if (\is_null($splatSeparator)) {
5231
  $splatSeparator = $val[1];
5232
  }
5233
 
5255
  $keywordArgs[$name] = $item;
5256
  }
5257
  } else {
5258
+ if (\is_null($splatSeparator)) {
5259
  $splatSeparator = $val[1];
5260
  }
5261
 
5277
  list($i, $name, $default, $isVariable) = $arg;
5278
 
5279
  if ($isVariable) {
5280
+ $val = [Type::T_LIST, \is_null($splatSeparator) ? ',' : $splatSeparator , [], $isVariable];
5281
 
5282
+ for ($count = \count($remaining); $i < $count; $i++) {
5283
  $val[2][] = $remaining[$i];
5284
  }
5285
 
5334
  */
5335
  protected function coerceValue($value)
5336
  {
5337
+ if (\is_array($value) || $value instanceof \ArrayAccess) {
5338
  return $value;
5339
  }
5340
 
5341
+ if (\is_bool($value)) {
5342
  return $this->toBool($value);
5343
  }
5344
 
5345
+ if (\is_null($value)) {
5346
  return static::$null;
5347
  }
5348
 
5377
  return $item;
5378
  }
5379
 
5380
+ if ($item[0] === static::$emptyList[0] &&
5381
+ $item[1] === static::$emptyList[1] &&
5382
+ $item[2] === static::$emptyList[2]
5383
+ ) {
5384
  return static::$emptyMap;
5385
  }
5386
 
5390
  /**
5391
  * Coerce something to list
5392
  *
5393
+ * @param array $item
5394
+ * @param string $delim
5395
+ * @param boolean $removeTrailingNull
5396
  *
5397
  * @return array
5398
  */
5399
+ protected function coerceList($item, $delim = ',', $removeTrailingNull = false)
5400
  {
5401
  if (isset($item) && $item[0] === Type::T_LIST) {
5402
+ // remove trailing null from the list
5403
+ if ($removeTrailingNull && end($item[2]) === static::$null) {
5404
+ array_pop($item[2]);
5405
+ }
5406
+
5407
  return $item;
5408
  }
5409
 
5412
  $values = $item[2];
5413
  $list = [];
5414
 
5415
+ for ($i = 0, $s = \count($keys); $i < $s; $i++) {
5416
  $key = $keys[$i];
5417
  $value = $values[$i];
5418
 
5420
  case Type::T_LIST:
5421
  case Type::T_MAP:
5422
  case Type::T_STRING:
5423
+ case Type::T_NULL:
5424
  break;
5425
 
5426
  default:
5496
 
5497
  case Type::T_LIST:
5498
  if ($inRGBFunction) {
5499
+ if (\count($value[2]) == 3 || \count($value[2]) == 4) {
5500
  $color = $value[2];
5501
  array_unshift($color, Type::T_COLOR);
5502
 
5507
  return null;
5508
 
5509
  case Type::T_KEYWORD:
5510
+ if (! \is_string($value[1])) {
5511
  return null;
5512
  }
5513
 
5514
  $name = strtolower($value[1]);
5515
+
5516
  // hexa color?
5517
  if (preg_match('/^#([0-9a-f]+)$/i', $name, $m)) {
5518
+ $nofValues = \strlen($m[1]);
5519
 
5520
+ if (\in_array($nofValues, [3, 4, 6, 8])) {
5521
  $nbChannels = 3;
5522
  $color = [];
5523
  $num = hexdec($m[1]);
5601
  protected function compileColorPartValue($value, $min, $max, $isInt = true, $clamp = true, $modulo = false)
5602
  {
5603
  if (! is_numeric($value)) {
5604
+ if (\is_array($value)) {
5605
  $reduced = $this->reduce($value);
5606
 
5607
+ if (\is_object($reduced) && $value->type === Type::T_NUMBER) {
5608
  $value = $reduced;
5609
  }
5610
  }
5611
 
5612
+ if (\is_object($value) && $value->type === Type::T_NUMBER) {
5613
  $num = $value->dimension;
5614
 
5615
+ if (\count($value->units)) {
5616
  $unit = array_keys($value->units);
5617
  $unit = reset($unit);
5618
 
5626
  }
5627
 
5628
  $value = $num;
5629
+ } elseif (\is_array($value)) {
5630
  $value = $this->compileValue($value);
5631
  }
5632
  }
5939
  {
5940
  list($list, $value) = $args;
5941
 
 
 
 
 
5942
  if ($list[0] === Type::T_MAP ||
5943
  $list[0] === Type::T_STRING ||
5944
  $list[0] === Type::T_KEYWORD ||
5970
  ['red', 'green', 'blue', 'alpha'] ];
5971
  protected function libRgb($args, $kwargs, $funcName = 'rgb')
5972
  {
5973
+ switch (\count($args)) {
5974
  case 1:
5975
  if (! $color = $this->coerceColor($args[0], true)) {
5976
  $color = [Type::T_STRING, '', [$funcName . '(', $args[0], ')']];
6039
  $color[$irgba] = (($irgba < 4) ? 0 : 1);
6040
  }
6041
 
6042
+ $color[$irgba] = \call_user_func($fn, $color[$irgba], $val, $iarg);
6043
  }
6044
  }
6045
 
6049
  foreach ([4 => 1, 5 => 2, 6 => 3] as $iarg => $ihsl) {
6050
  if (! empty($args[$iarg])) {
6051
  $val = $this->assertNumber($args[$iarg]);
6052
+ $hsl[$ihsl] = \call_user_func($fn, $hsl[$ihsl], $val, $iarg);
6053
  }
6054
  }
6055
 
6225
  ['hue', 'saturation', 'lightness', 'alpha'] ];
6226
  protected function libHsl($args, $kwargs, $funcName = 'hsl')
6227
  {
6228
+ if (\count($args) == 1) {
6229
+ if ($args[0][0] !== Type::T_LIST || \count($args[0][2]) < 3 || \count($args[0][2]) > 4) {
6230
  return [Type::T_STRING, '', [$funcName . '(', $args[0], ')']];
6231
  }
6232
 
6239
 
6240
  $alpha = null;
6241
 
6242
+ if (\count($args) === 4) {
6243
  $alpha = $this->compileColorPartValue($args[3], 0, 100, false);
6244
 
6245
  if (! is_numeric($hue) || ! is_numeric($saturation) || ! is_numeric($lightness) || ! is_numeric($alpha)) {
6254
 
6255
  $color = $this->toRGB($hue, $saturation, $lightness);
6256
 
6257
+ if (! \is_null($alpha)) {
6258
  $color[4] = $alpha;
6259
  }
6260
 
6468
  return [Type::T_STRING, '"', [$value]];
6469
  }
6470
 
6471
+ protected static $libPercentage = ['number'];
6472
  protected function libPercentage($args)
6473
  {
6474
  return new Node\Number($this->coercePercent($args[0]) * 100, '%');
6475
  }
6476
 
6477
+ protected static $libRound = ['number'];
6478
  protected function libRound($args)
6479
  {
6480
  $num = $args[0];
6482
  return new Node\Number(round($num[1]), $num[2]);
6483
  }
6484
 
6485
+ protected static $libFloor = ['number'];
6486
  protected function libFloor($args)
6487
  {
6488
  $num = $args[0];
6490
  return new Node\Number(floor($num[1]), $num[2]);
6491
  }
6492
 
6493
+ protected static $libCeil = ['number'];
6494
  protected function libCeil($args)
6495
  {
6496
  $num = $args[0];
6498
  return new Node\Number(ceil($num[1]), $num[2]);
6499
  }
6500
 
6501
+ protected static $libAbs = ['number'];
6502
  protected function libAbs($args)
6503
  {
6504
  $num = $args[0];
6509
  protected function libMin($args)
6510
  {
6511
  $numbers = $this->getNormalizedNumbers($args);
6512
+ $minOriginal = null;
6513
+ $minNormalized = null;
6514
 
6515
+ foreach ($numbers as $key => $pair) {
6516
+ list($original, $normalized) = $pair;
6517
+
6518
+ if (\is_null($normalized) or \is_null($minNormalized)) {
6519
+ if (\is_null($minOriginal) || $original[1] <= $minOriginal[1]) {
6520
+ $minOriginal = $original;
6521
+ $minNormalized = $normalized;
6522
+ }
6523
+ } elseif ($normalized[1] <= $minNormalized[1]) {
6524
+ $minOriginal = $original;
6525
+ $minNormalized = $normalized;
6526
  }
6527
  }
6528
 
6529
+ return $minOriginal;
6530
  }
6531
 
6532
  protected function libMax($args)
6533
  {
6534
  $numbers = $this->getNormalizedNumbers($args);
6535
+ $maxOriginal = null;
6536
+ $maxNormalized = null;
6537
+
6538
+ foreach ($numbers as $key => $pair) {
6539
+ list($original, $normalized) = $pair;
6540
 
6541
+ if (\is_null($normalized) or \is_null($maxNormalized)) {
6542
+ if (\is_null($maxOriginal) || $original[1] >= $maxOriginal[1]) {
6543
+ $maxOriginal = $original;
6544
+ $maxNormalized = $normalized;
6545
+ }
6546
+ } elseif ($normalized[1] >= $maxNormalized[1]) {
6547
+ $maxOriginal = $original;
6548
+ $maxNormalized = $normalized;
6549
  }
6550
  }
6551
 
6552
+ return $maxOriginal;
6553
  }
6554
 
6555
  /**
6573
 
6574
  $number = $item->normalize();
6575
 
6576
+ if (empty($unit)) {
6577
  $unit = $number[2];
6578
  $originalUnit = $item->unitStr();
6579
+ } elseif ($number[1] && $unit !== $number[2] && ! empty($number[2])) {
6580
  $this->throwError('Incompatible units: "%s" and "%s".', $originalUnit, $item->unitStr());
6581
  break;
6582
  }
6583
 
6584
+ $numbers[$key] = [$args[$key], empty($number[2]) ? null : $number];
6585
  }
6586
 
6587
  return $numbers;
6590
  protected static $libLength = ['list'];
6591
  protected function libLength($args)
6592
  {
6593
+ $list = $this->coerceList($args[0], ',', true);
6594
 
6595
+ return \count($list[2]);
6596
  }
6597
 
6598
  //protected static $libListSeparator = ['list...'];
6599
  protected function libListSeparator($args)
6600
  {
6601
+ if (\count($args) > 1) {
6602
  return 'comma';
6603
  }
6604
 
6605
  $list = $this->coerceList($args[0]);
6606
 
6607
+ if (\count($list[2]) <= 1) {
6608
  return 'space';
6609
  }
6610
 
6618
  protected static $libNth = ['list', 'n'];
6619
  protected function libNth($args)
6620
  {
6621
+ $list = $this->coerceList($args[0], ',', false);
6622
  $n = $this->assertNumber($args[1]);
6623
 
6624
  if ($n > 0) {
6625
  $n--;
6626
  } elseif ($n < 0) {
6627
+ $n += \count($list[2]);
6628
  }
6629
 
6630
  return isset($list[2][$n]) ? $list[2][$n] : static::$defaultValue;
6639
  if ($n > 0) {
6640
  $n--;
6641
  } elseif ($n < 0) {
6642
+ $n += \count($list[2]);
6643
  }
6644
 
6645
  if (! isset($list[2][$n])) {
6659
  $map = $this->assertMap($args[0]);
6660
  $key = $args[1];
6661
 
6662
+ if (! \is_null($key)) {
6663
  $key = $this->compileStringContent($this->coerceString($key));
6664
 
6665
+ for ($i = \count($map[1]) - 1; $i >= 0; $i--) {
6666
  if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) {
6667
  return $map[2][$i];
6668
  }
6696
  $map = $this->assertMap($args[0]);
6697
  $key = $this->compileStringContent($this->coerceString($args[1]));
6698
 
6699
+ for ($i = \count($map[1]) - 1; $i >= 0; $i--) {
6700
  if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) {
6701
  array_splice($map[1], $i, 1);
6702
  array_splice($map[2], $i, 1);
6712
  $map = $this->assertMap($args[0]);
6713
  $key = $this->compileStringContent($this->coerceString($args[1]));
6714
 
6715
+ for ($i = \count($map[1]) - 1; $i >= 0; $i--) {
6716
  if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) {
6717
  return true;
6718
  }
6765
  {
6766
  $list = $args[0];
6767
  $this->coerceList($list, ' ');
6768
+
6769
  if (! empty($list['enclosing']) && $list['enclosing'] === 'bracket') {
6770
  return true;
6771
  }
6772
+
6773
  return false;
6774
  }
6775
 
 
6776
  protected function listSeparatorForJoin($list1, $sep)
6777
  {
6778
  if (! isset($sep)) {
6796
  {
6797
  list($list1, $list2, $sep, $bracketed) = $args;
6798
 
6799
+ $list1 = $this->coerceList($list1, ' ', true);
6800
+ $list2 = $this->coerceList($list2, ' ', true);
6801
  $sep = $this->listSeparatorForJoin($list1, $sep);
6802
 
6803
  if ($bracketed === static::$true) {
6811
  } else {
6812
  $bracketed = $this->compileValue($bracketed);
6813
  $bracketed = ! ! $bracketed;
6814
+
6815
  if ($bracketed === true) {
6816
  $bracketed = true;
6817
  }
6819
 
6820
  if ($bracketed === 'auto') {
6821
  $bracketed = false;
6822
+
6823
  if (! empty($list1['enclosing']) && $list1['enclosing'] === 'bracket') {
6824
  $bracketed = true;
6825
  }
6826
  }
6827
 
6828
  $res = [Type::T_LIST, $sep, array_merge($list1[2], $list2[2])];
6829
+
6830
  if (isset($list1['enclosing'])) {
6831
  $res['enlcosing'] = $list1['enclosing'];
6832
  }
6833
+
6834
  if ($bracketed) {
6835
  $res['enclosing'] = 'bracket';
6836
  }
6837
+
6838
  return $res;
6839
  }
6840
 
6843
  {
6844
  list($list1, $value, $sep) = $args;
6845
 
6846
+ $list1 = $this->coerceList($list1, ' ', true);
6847
+ $sep = $this->listSeparatorForJoin($list1, $sep);
6848
+ $res = [Type::T_LIST, $sep, array_merge($list1[2], [$value])];
6849
 
 
6850
  if (isset($list1['enclosing'])) {
6851
  $res['enclosing'] = $list1['enclosing'];
6852
  }
6853
+
6854
  return $res;
6855
  }
6856
 
6985
  $string = $this->coerceString($args[0]);
6986
  $stringContent = $this->compileStringContent($string);
6987
 
6988
+ return new Node\Number(\strlen($stringContent), '');
6989
  }
6990
 
6991
  protected static $libStrSlice = ['string', 'start-at', 'end-at:-1'];
7020
  $string = $this->coerceString($args[0]);
7021
  $stringContent = $this->compileStringContent($string);
7022
 
7023
+ $string[2] = [\function_exists('mb_strtolower') ? mb_strtolower($stringContent) : strtolower($stringContent)];
7024
 
7025
  return $string;
7026
  }
7031
  $string = $this->coerceString($args[0]);
7032
  $stringContent = $this->compileStringContent($string);
7033
 
7034
+ $string[2] = [\function_exists('mb_strtoupper') ? mb_strtoupper($stringContent) : strtoupper($stringContent)];
7035
 
7036
  return $string;
7037
  }
7043
  $name = $this->compileStringContent($string);
7044
 
7045
  return $this->toBool(
7046
+ \array_key_exists($name, $this->registeredFeatures) ? $this->registeredFeatures[$name] : false
7047
  );
7048
  }
7049
 
7067
  // built-in functions
7068
  $f = $this->getBuiltinFunction($name);
7069
 
7070
+ return $this->toBool(\is_callable($f));
7071
  }
7072
 
7073
  protected static $libGlobalVariableExists = ['name'];
7111
  return [Type::T_STRING, '', ['counter(' . implode(',', $list) . ')']];
7112
  }
7113
 
7114
+ protected static $libRandom = ['limit:1'];
7115
  protected function libRandom($args)
7116
  {
7117
  if (isset($args[0])) {
7118
  $n = $this->assertNumber($args[0]);
7119
 
7120
  if ($n < 1) {
7121
+ $this->throwError("\$limit must be greater than or equal to 1");
7122
 
7123
  return null;
7124
  }
7125
 
7126
+ if ($n - \intval($n) > 0) {
7127
+ $this->throwError("Expected \$limit to be an integer but got $n for `random`");
7128
+
7129
+ return null;
7130
+ }
7131
+
7132
+ return new Node\Number(mt_rand(1, \intval($n)), '');
7133
  }
7134
 
7135
  return new Node\Number(mt_rand(1, mt_getrandmax()), '');
7140
  static $id;
7141
 
7142
  if (! isset($id)) {
7143
+ $id = PHP_INT_SIZE === 4
7144
+ ? mt_rand(0, pow(36, 5)) . str_pad(mt_rand(0, pow(36, 5)) % 10000000, 7, '0', STR_PAD_LEFT)
7145
+ : mt_rand(0, pow(36, 8));
7146
  }
7147
 
7148
  $id += mt_rand(0, 10) + 1;
7155
  if ($value === static::$null) {
7156
  $value = [Type::T_KEYWORD, 'null'];
7157
  }
7158
+
7159
  $stringValue = [$value];
7160
+
7161
  if ($value[0] === Type::T_LIST) {
7162
  if (end($value[2]) === static::$null) {
7163
  array_pop($value[2]);
7164
  $value[2][] = [Type::T_STRING, '', ['']];
7165
  $force_enclosing_display = true;
7166
  }
7167
+
7168
+ if (! empty($value['enclosing']) &&
7169
+ ($force_enclosing_display ||
7170
+ ($value['enclosing'] === 'bracket') ||
7171
+ ! \count($value[2]))
7172
+ ) {
7173
+ $value['enclosing'] = 'forced_'.$value['enclosing'];
7174
+ $force_enclosing_display = true;
7175
  }
7176
+
7177
  foreach ($value[2] as $k => $listelement) {
7178
  $value[2][$k] = $this->inspectFormatValue($listelement, $force_enclosing_display);
7179
  }
7180
+
7181
  $stringValue = [$value];
7182
  }
7183
 
7188
  protected function libInspect($args)
7189
  {
7190
  $value = $args[0];
7191
+
7192
  return $this->inspectFormatValue($value);
7193
  }
7194
 
7203
  {
7204
  static $parser = null;
7205
 
7206
+ if (\is_null($parser)) {
7207
  $parser = $this->parserFactory(__METHOD__);
7208
  }
7209
 
7258
  protected function isSuperSelector($super, $sub)
7259
  {
7260
  // one and only one selector for each arg
7261
+ if (! $super || \count($super) !== 1) {
7262
  $this->throwError("Invalid super selector for isSuperSelector()");
7263
  }
7264
 
7265
+ if (! $sub || \count($sub) !== 1) {
7266
  $this->throwError("Invalid sub selector for isSuperSelector()");
7267
  }
7268
 
7290
  $nextMustMatch = true;
7291
  $i++;
7292
  } else {
7293
+ while ($i < \count($sub) && ! $this->isSuperPart($node, $sub[$i])) {
7294
  if ($nextMustMatch) {
7295
  return false;
7296
  }
7298
  $i++;
7299
  }
7300
 
7301
+ if ($i >= \count($sub)) {
7302
  return false;
7303
  }
7304
 
7323
  $i = 0;
7324
 
7325
  foreach ($superParts as $superPart) {
7326
+ while ($i < \count($subParts) && $subParts[$i] !== $superPart) {
7327
  $i++;
7328
  }
7329
 
7330
+ if ($i >= \count($subParts)) {
7331
  return false;
7332
  }
7333
 
7344
  $args = reset($args);
7345
  $args = $args[2];
7346
 
7347
+ if (\count($args) < 1) {
7348
  $this->throwError("selector-append() needs at least 1 argument");
7349
  }
7350
 
7370
  $this->throwError("Invalid selector list in selector-append()");
7371
  }
7372
 
7373
+ while (\count($selectors)) {
7374
  $previousSelectors = array_pop($selectors);
7375
 
7376
  if (! $previousSelectors) {
7471
  $extended[] = $selector;
7472
  }
7473
 
7474
+ $n = \count($extended);
7475
 
7476
  $this->matchExtends($selector, $extended);
7477
 
7478
  // if didnt match, keep the original selector if we are in a replace operation
7479
+ if ($replace and \count($extended) === $n) {
7480
  $extended[] = $selector;
7481
  }
7482
  }
7494
  $args = reset($args);
7495
  $args = $args[2];
7496
 
7497
+ if (\count($args) < 1) {
7498
  $this->throwError("selector-nest() needs at least 1 argument");
7499
  }
7500
 
7557
  */
7558
  protected function unifyCompoundSelectors($compound1, $compound2)
7559
  {
7560
+ if (! \count($compound1)) {
7561
  return $compound2;
7562
  }
7563
 
7564
+ if (! \count($compound2)) {
7565
  return $compound1;
7566
  }
7567
 
7578
  $unifiedSelectors = [$unifiedCompound];
7579
 
7580
  // do the rest
7581
+ while (\count($compound1) || \count($compound2)) {
7582
  $part1 = end($compound1);
7583
  $part2 = end($compound2);
7584
 
7678
  $after = [];
7679
 
7680
  // try to find a match by tag name first
7681
+ while (\count($before)) {
7682
  $p = array_pop($before);
7683
 
7684
  if ($partTag && $partTag !== '*' && $partTag == $this->findTagName($p)) {
7692
  $before = $compound;
7693
  $after = [];
7694
 
7695
+ while (\count($before)) {
7696
  $p = array_pop($before);
7697
 
7698
  if ($this->checkCompatibleTags($partTag, $this->findTagName($p))) {
7699
+ if (\count(array_intersect($part, $p))) {
7700
  return [$before, $p, $after];
7701
  }
7702
  }
7772
  $tags = array_unique($tags);
7773
  $tags = array_filter($tags);
7774
 
7775
+ if (\count($tags) > 1) {
7776
  $tags = array_diff($tags, ['*']);
7777
  }
7778
 
7779
  // not compatible nodes
7780
+ if (\count($tags) > 1) {
7781
  return false;
7782
  }
7783
 
7822
 
7823
  return [Type::T_LIST, ',', $listParts];
7824
  }
7825
+
7826
+ protected static $libScssphpGlob = ['pattern'];
7827
+ protected function libScssphpGlob($args)
7828
+ {
7829
+ $string = $this->coerceString($args[0]);
7830
+ $pattern = $this->compileStringContent($string);
7831
+ $matches = glob($pattern);
7832
+ $listParts = [];
7833
+
7834
+ foreach ($matches as $match) {
7835
+ if (! is_file($match)) {
7836
+ continue;
7837
+ }
7838
+
7839
+ $listParts[] = [Type::T_STRING, '"', [$match]];
7840
+ }
7841
+
7842
+ return [Type::T_LIST, ',', $listParts];
7843
+ }
7844
  }
assets/libraries/scssphp/src/Formatter.php CHANGED
@@ -118,6 +118,22 @@ abstract class Formatter
118
  return rtrim($name) . $this->assignSeparator . $value . ';';
119
  }
120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  /**
122
  * Output lines inside a block
123
  *
@@ -126,8 +142,7 @@ abstract class Formatter
126
  protected function blockLines(OutputBlock $block)
127
  {
128
  $inner = $this->indentStr();
129
-
130
- $glue = $this->break . $inner;
131
 
132
  $this->write($inner . implode($glue, $block->lines));
133
 
@@ -303,12 +318,12 @@ abstract class Formatter
303
  );
304
 
305
  $lines = explode("\n", $str);
306
- $lineCount = count($lines);
307
  $this->currentLine += $lineCount-1;
308
 
309
  $lastLine = array_pop($lines);
310
 
311
- $this->currentColumn = ($lineCount === 1 ? $this->currentColumn : 0) + strlen($lastLine);
312
  }
313
 
314
  echo $str;
118
  return rtrim($name) . $this->assignSeparator . $value . ';';
119
  }
120
 
121
+ /**
122
+ * Return custom property assignment
123
+ * differs in that you have to keep spaces in the value as is
124
+ *
125
+ * @api
126
+ *
127
+ * @param string $name
128
+ * @param mixed $value
129
+ *
130
+ * @return string
131
+ */
132
+ public function customProperty($name, $value)
133
+ {
134
+ return rtrim($name) . trim($this->assignSeparator) . $value . ';';
135
+ }
136
+
137
  /**
138
  * Output lines inside a block
139
  *
142
  protected function blockLines(OutputBlock $block)
143
  {
144
  $inner = $this->indentStr();
145
+ $glue = $this->break . $inner;
 
146
 
147
  $this->write($inner . implode($glue, $block->lines));
148
 
318
  );
319
 
320
  $lines = explode("\n", $str);
321
+ $lineCount = \count($lines);
322
  $this->currentLine += $lineCount-1;
323
 
324
  $lastLine = array_pop($lines);
325
 
326
+ $this->currentColumn = ($lineCount === 1 ? $this->currentColumn : 0) + \strlen($lastLine);
327
  }
328
 
329
  echo $str;
assets/libraries/scssphp/src/Formatter/Nested.php CHANGED
@@ -58,8 +58,7 @@ class Nested extends Formatter
58
  protected function blockLines(OutputBlock $block)
59
  {
60
  $inner = $this->indentStr();
61
-
62
- $glue = $this->break . $inner;
63
 
64
  foreach ($block->lines as $index => $line) {
65
  if (substr($line, 0, 2) === '/*') {
@@ -90,7 +89,7 @@ class Nested extends Formatter
90
  $previousHasSelector = false;
91
  }
92
 
93
- $isMediaOrDirective = in_array($block->type, [Type::T_DIRECTIVE, Type::T_MEDIA]);
94
  $isSupport = ($block->type === Type::T_DIRECTIVE
95
  && $block->selectors && strpos(implode('', $block->selectors), '@supports') !== false);
96
 
@@ -119,10 +118,12 @@ class Nested extends Formatter
119
  if ($block->depth > end($depths)) {
120
  if (! $previousEmpty || $this->depth < 1) {
121
  $this->depth++;
 
122
  $depths[] = $block->depth;
123
  } else {
124
  // keep the current depth unchanged but take the block depth as a new reference for following blocks
125
  array_pop($depths);
 
126
  $depths[] = $block->depth;
127
  }
128
  }
58
  protected function blockLines(OutputBlock $block)
59
  {
60
  $inner = $this->indentStr();
61
+ $glue = $this->break . $inner;
 
62
 
63
  foreach ($block->lines as $index => $line) {
64
  if (substr($line, 0, 2) === '/*') {
89
  $previousHasSelector = false;
90
  }
91
 
92
+ $isMediaOrDirective = \in_array($block->type, [Type::T_DIRECTIVE, Type::T_MEDIA]);
93
  $isSupport = ($block->type === Type::T_DIRECTIVE
94
  && $block->selectors && strpos(implode('', $block->selectors), '@supports') !== false);
95
 
118
  if ($block->depth > end($depths)) {
119
  if (! $previousEmpty || $this->depth < 1) {
120
  $this->depth++;
121
+
122
  $depths[] = $block->depth;
123
  } else {
124
  // keep the current depth unchanged but take the block depth as a new reference for following blocks
125
  array_pop($depths);
126
+
127
  $depths[] = $block->depth;
128
  }
129
  }
assets/libraries/scssphp/src/Node/Number.php CHANGED
@@ -31,14 +31,14 @@ class Number extends Node implements \ArrayAccess
31
  /**
32
  * @var integer
33
  */
34
- static public $precision = 10;
35
 
36
  /**
37
  * @see http://www.w3.org/TR/2012/WD-css3-values-20120308/
38
  *
39
  * @var array
40
  */
41
- static protected $unitTable = [
42
  'in' => [
43
  'in' => 1,
44
  'pc' => 6,
@@ -64,8 +64,8 @@ class Number extends Node implements \ArrayAccess
64
  ],
65
  'dpi' => [
66
  'dpi' => 1,
67
- 'dpcm' => 2.54,
68
- 'dppx' => 96,
69
  ],
70
  ];
71
 
@@ -89,7 +89,7 @@ class Number extends Node implements \ArrayAccess
89
  {
90
  $this->type = Type::T_NUMBER;
91
  $this->dimension = $dimension;
92
- $this->units = is_array($initialUnit)
93
  ? $initialUnit
94
  : ($initialUnit ? [$initialUnit => 1]
95
  : []);
@@ -110,11 +110,18 @@ class Number extends Node implements \ArrayAccess
110
 
111
  $dimension = $this->dimension;
112
 
113
- foreach (static::$unitTable['in'] as $unit => $conv) {
114
- $from = isset($this->units[$unit]) ? $this->units[$unit] : 0;
115
- $to = isset($units[$unit]) ? $units[$unit] : 0;
116
- $factor = pow($conv, $from - $to);
117
- $dimension /= $factor;
 
 
 
 
 
 
 
118
  }
119
 
120
  return new Number($dimension, $units);
@@ -130,7 +137,7 @@ class Number extends Node implements \ArrayAccess
130
  $dimension = $this->dimension;
131
  $units = [];
132
 
133
- $this->normalizeUnits($dimension, $units, 'in');
134
 
135
  return new Number($dimension, $units);
136
  }
@@ -141,11 +148,11 @@ class Number extends Node implements \ArrayAccess
141
  public function offsetExists($offset)
142
  {
143
  if ($offset === -3) {
144
- return ! is_null($this->sourceColumn);
145
  }
146
 
147
  if ($offset === -2) {
148
- return ! is_null($this->sourceLine);
149
  }
150
 
151
  if ($offset === -1 ||
@@ -231,6 +238,35 @@ class Number extends Node implements \ArrayAccess
231
  return ! array_sum($this->units);
232
  }
233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  /**
235
  * Returns unit(s) as the product of numerator units divided by the product of denominator units
236
  *
@@ -243,17 +279,17 @@ class Number extends Node implements \ArrayAccess
243
 
244
  foreach ($this->units as $unit => $unitSize) {
245
  if ($unitSize > 0) {
246
- $numerators = array_pad($numerators, count($numerators) + $unitSize, $unit);
247
  continue;
248
  }
249
 
250
  if ($unitSize < 0) {
251
- $denominators = array_pad($denominators, count($denominators) + $unitSize, $unit);
252
  continue;
253
  }
254
  }
255
 
256
- return implode('*', $numerators) . (count($denominators) ? '/' . implode('*', $denominators) : '');
257
  }
258
 
259
  /**
@@ -271,11 +307,11 @@ class Number extends Node implements \ArrayAccess
271
  return $unitSize;
272
  });
273
 
274
- if (count($units) > 1 && array_sum($units) === 0) {
275
  $dimension = $this->dimension;
276
  $units = [];
277
 
278
- $this->normalizeUnits($dimension, $units, 'in');
279
 
280
  $dimension = round($dimension, static::$precision);
281
  $units = array_filter($units, function ($unitSize) {
@@ -285,12 +321,14 @@ class Number extends Node implements \ArrayAccess
285
 
286
  $unitSize = array_sum($units);
287
 
288
- if ($compiler && ($unitSize > 1 || $unitSize < 0 || count($units) > 1)) {
289
- $compiler->throwError((string) $dimension . $this->unitStr() . " isn't a valid CSS value.");
 
 
 
 
290
  }
291
 
292
- reset($units);
293
- $unit = key($units);
294
  $dimension = number_format($dimension, static::$precision, '.', '');
295
 
296
  return (static::$precision ? rtrim(rtrim($dimension, '0'), '.') : $dimension) . $unit;
@@ -311,13 +349,17 @@ class Number extends Node implements \ArrayAccess
311
  * @param array $units
312
  * @param string $baseUnit
313
  */
314
- private function normalizeUnits(&$dimension, &$units, $baseUnit = 'in')
315
  {
316
  $dimension = $this->dimension;
317
  $units = [];
318
 
319
  foreach ($this->units as $unit => $exp) {
320
- if (isset(static::$unitTable[$baseUnit][$unit])) {
 
 
 
 
321
  $factor = pow(static::$unitTable[$baseUnit][$unit], $exp);
322
 
323
  $unit = $baseUnit;
@@ -327,4 +369,22 @@ class Number extends Node implements \ArrayAccess
327
  $units[$unit] = $exp + (isset($units[$unit]) ? $units[$unit] : 0);
328
  }
329
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
  }
31
  /**
32
  * @var integer
33
  */
34
+ public static $precision = 10;
35
 
36
  /**
37
  * @see http://www.w3.org/TR/2012/WD-css3-values-20120308/
38
  *
39
  * @var array
40
  */
41
+ protected static $unitTable = [
42
  'in' => [
43
  'in' => 1,
44
  'pc' => 6,
64
  ],
65
  'dpi' => [
66
  'dpi' => 1,
67
+ 'dpcm' => 1/2.54,
68
+ 'dppx' => 1/96,
69
  ],
70
  ];
71
 
89
  {
90
  $this->type = Type::T_NUMBER;
91
  $this->dimension = $dimension;
92
+ $this->units = \is_array($initialUnit)
93
  ? $initialUnit
94
  : ($initialUnit ? [$initialUnit => 1]
95
  : []);
110
 
111
  $dimension = $this->dimension;
112
 
113
+ if (\count($units)) {
114
+ $baseUnit = array_keys($units);
115
+ $baseUnit = reset($baseUnit);
116
+ $baseUnit = $this->findBaseUnit($baseUnit);
117
+ if ($baseUnit && isset(static::$unitTable[$baseUnit])) {
118
+ foreach (static::$unitTable[$baseUnit] as $unit => $conv) {
119
+ $from = isset($this->units[$unit]) ? $this->units[$unit] : 0;
120
+ $to = isset($units[$unit]) ? $units[$unit] : 0;
121
+ $factor = pow($conv, $from - $to);
122
+ $dimension /= $factor;
123
+ }
124
+ }
125
  }
126
 
127
  return new Number($dimension, $units);
137
  $dimension = $this->dimension;
138
  $units = [];
139
 
140
+ $this->normalizeUnits($dimension, $units);
141
 
142
  return new Number($dimension, $units);
143
  }
148
  public function offsetExists($offset)
149
  {
150
  if ($offset === -3) {
151
+ return ! \is_null($this->sourceColumn);
152
  }
153
 
154
  if ($offset === -2) {
155
+ return ! \is_null($this->sourceLine);
156
  }
157
 
158
  if ($offset === -1 ||
238
  return ! array_sum($this->units);
239
  }
240
 
241
+ /**
242
+ * Test if a number can be normalized in a base unit
243
+ * ie if its units are homogeneous
244
+ *
245
+ * @return boolean
246
+ */
247
+ public function isNormalizable()
248
+ {
249
+ if ($this->unitless()) {
250
+ return false;
251
+ }
252
+
253
+ $baseUnit = null;
254
+
255
+ foreach ($this->units as $unit => $exp) {
256
+ $b = $this->findBaseUnit($unit);
257
+
258
+ if (\is_null($baseUnit)) {
259
+ $baseUnit = $b;
260
+ }
261
+
262
+ if (\is_null($b) or $b !== $baseUnit) {
263
+ return false;
264
+ }
265
+ }
266
+
267
+ return $baseUnit;
268
+ }
269
+
270
  /**
271
  * Returns unit(s) as the product of numerator units divided by the product of denominator units
272
  *
279
 
280
  foreach ($this->units as $unit => $unitSize) {
281
  if ($unitSize > 0) {
282
+ $numerators = array_pad($numerators, \count($numerators) + $unitSize, $unit);
283
  continue;
284
  }
285
 
286
  if ($unitSize < 0) {
287
+ $denominators = array_pad($denominators, \count($denominators) - $unitSize, $unit);
288
  continue;
289
  }
290
  }
291
 
292
+ return implode('*', $numerators) . (\count($denominators) ? '/' . implode('*', $denominators) : '');
293
  }
294
 
295
  /**
307
  return $unitSize;
308
  });
309
 
310
+ if (\count($units) > 1 && array_sum($units) === 0) {
311
  $dimension = $this->dimension;
312
  $units = [];
313
 
314
+ $this->normalizeUnits($dimension, $units);
315
 
316
  $dimension = round($dimension, static::$precision);
317
  $units = array_filter($units, function ($unitSize) {
321
 
322
  $unitSize = array_sum($units);
323
 
324
+ if ($compiler && ($unitSize > 1 || $unitSize < 0 || \count($units) > 1)) {
325
+ $this->units = $units;
326
+ $unit = $this->unitStr();
327
+ } else {
328
+ reset($units);
329
+ $unit = key($units);
330
  }
331
 
 
 
332
  $dimension = number_format($dimension, static::$precision, '.', '');
333
 
334
  return (static::$precision ? rtrim(rtrim($dimension, '0'), '.') : $dimension) . $unit;
349
  * @param array $units
350
  * @param string $baseUnit
351
  */
352
+ private function normalizeUnits(&$dimension, &$units, $baseUnit = null)
353
  {
354
  $dimension = $this->dimension;
355
  $units = [];
356
 
357
  foreach ($this->units as $unit => $exp) {
358
+ if (! $baseUnit) {
359
+ $baseUnit = $this->findBaseUnit($unit);
360
+ }
361
+
362
+ if ($baseUnit && isset(static::$unitTable[$baseUnit][$unit])) {
363
  $factor = pow(static::$unitTable[$baseUnit][$unit], $exp);
364
 
365
  $unit = $baseUnit;
369
  $units[$unit] = $exp + (isset($units[$unit]) ? $units[$unit] : 0);
370
  }
371
  }
372
+
373
+ /**
374
+ * Find the base unit family for a given unit
375
+ *
376
+ * @param string $unit
377
+ *
378
+ * @return string|null
379
+ */
380
+ private function findBaseUnit($unit)
381
+ {
382
+ foreach (static::$unitTable as $baseUnit => $unitVariants) {
383
+ if (isset($unitVariants[$unit])) {
384
+ return $baseUnit;
385
+ }
386
+ }
387
+
388
+ return null;
389
+ }
390
  }
assets/libraries/scssphp/src/Parser.php CHANGED
@@ -65,12 +65,15 @@ class Parser
65
  private $inParens;
66
  private $eatWhiteDefault;
67
  private $discardComments;
 
68
  private $buffer;
69
  private $utf8;
70
  private $encoding;
71
  private $patternModifiers;
72
  private $commentsSeen;
73
 
 
 
74
  /**
75
  * Constructor
76
  *
@@ -81,7 +84,7 @@ class Parser
81
  * @param string $encoding
82
  * @param \ScssPhp\ScssPhp\Cache $cache
83
  */
84
- public function __construct($sourceName, $sourceIndex = 0, $encoding = 'utf-8', $cache = null)
85
  {
86
  $this->sourceName = $sourceName ?: '(stdin)';
87
  $this->sourceIndex = $sourceIndex;
@@ -89,7 +92,9 @@ class Parser
89
  $this->utf8 = ! $encoding || strtolower($encoding) === 'utf-8';
90
  $this->patternModifiers = $this->utf8 ? 'Aisu' : 'Ais';
91
  $this->commentsSeen = [];
92
- $this->discardComments = false;
 
 
93
 
94
  if (empty(static::$operatorPattern)) {
95
  static::$operatorPattern = '([*\/%+-]|[!=]\=|\>\=?|\<\=\>|\<\=?|and|or)';
@@ -139,9 +144,13 @@ class Parser
139
  : "$this->sourceName on line $line, at column $column";
140
 
141
  if ($this->peek("(.*?)(\n|$)", $m, $this->count)) {
 
 
142
  throw new ParserException("$msg: failed at `$m[1]` $loc");
143
  }
144
 
 
 
145
  throw new ParserException("$msg: $loc");
146
  }
147
 
@@ -164,7 +173,7 @@ class Parser
164
  ];
165
  $v = $this->cache->getCache("parse", $cacheKey, $parseOptions);
166
 
167
- if (! is_null($v)) {
168
  return $v;
169
  }
170
  }
@@ -192,7 +201,7 @@ class Parser
192
  ;
193
  }
194
 
195
- if ($this->count !== strlen($this->buffer)) {
196
  $this->throwParseError();
197
  }
198
 
@@ -347,6 +356,10 @@ class Parser
347
  && $this->matchChar(')')) || true) &&
348
  $this->matchChar('{', false)
349
  ) {
 
 
 
 
350
  $atRoot = $this->pushSpecialBlock(Type::T_AT_ROOT, $s);
351
  $atRoot->selector = $selector;
352
  $atRoot->with = $with;
@@ -370,6 +383,10 @@ class Parser
370
  ($this->argumentDef($args) || true) &&
371
  $this->matchChar('{', false)
372
  ) {
 
 
 
 
373
  $mixin = $this->pushSpecialBlock(Type::T_MIXIN, $s);
374
  $mixin->name = $mixinName;
375
  $mixin->args = $args;
@@ -390,6 +407,10 @@ class Parser
390
  ($this->end() || $this->matchChar('{') && $hasBlock = true)) ||
391
  $this->matchChar('{') && $hasBlock = true)
392
  ) {
 
 
 
 
393
  $child = [
394
  Type::T_INCLUDE,
395
  $mixinName,
@@ -414,6 +435,10 @@ class Parser
414
  $this->valueList($importPath) &&
415
  $this->end()
416
  ) {
 
 
 
 
417
  $this->append([Type::T_SCSSPHP_IMPORT_ONCE, $importPath], $s);
418
 
419
  return true;
@@ -436,6 +461,10 @@ class Parser
436
  $this->url($importPath) &&
437
  $this->end()
438
  ) {
 
 
 
 
439
  $this->append([Type::T_IMPORT, $importPath], $s);
440
 
441
  return true;
@@ -447,6 +476,10 @@ class Parser
447
  $this->selectors($selectors) &&
448
  $this->end()
449
  ) {
 
 
 
 
450
  // check for '!flag'
451
  $optional = $this->stripOptionalFlag($selectors);
452
  $this->append([Type::T_EXTEND, $selectors, $optional], $s);
@@ -461,6 +494,10 @@ class Parser
461
  $this->argumentDef($args) &&
462
  $this->matchChar('{', false)
463
  ) {
 
 
 
 
464
  $func = $this->pushSpecialBlock(Type::T_FUNCTION, $s);
465
  $func->name = $fnName;
466
  $func->args = $args;
@@ -471,6 +508,10 @@ class Parser
471
  $this->seek($s);
472
 
473
  if ($this->literal('@break', 6) && $this->end()) {
 
 
 
 
474
  $this->append([Type::T_BREAK], $s);
475
 
476
  return true;
@@ -479,6 +520,10 @@ class Parser
479
  $this->seek($s);
480
 
481
  if ($this->literal('@continue', 9) && $this->end()) {
 
 
 
 
482
  $this->append([Type::T_CONTINUE], $s);
483
 
484
  return true;
@@ -487,6 +532,10 @@ class Parser
487
  $this->seek($s);
488
 
489
  if ($this->literal('@return', 7) && ($this->valueList($retVal) || true) && $this->end()) {
 
 
 
 
490
  $this->append([Type::T_RETURN, isset($retVal) ? $retVal : [Type::T_NULL]], $s);
491
 
492
  return true;
@@ -500,6 +549,10 @@ class Parser
500
  $this->valueList($list) &&
501
  $this->matchChar('{', false)
502
  ) {
 
 
 
 
503
  $each = $this->pushSpecialBlock(Type::T_EACH, $s);
504
 
505
  foreach ($varNames[2] as $varName) {
@@ -517,6 +570,10 @@ class Parser
517
  $this->expression($cond) &&
518
  $this->matchChar('{', false)
519
  ) {
 
 
 
 
520
  $while = $this->pushSpecialBlock(Type::T_WHILE, $s);
521
  $while->cond = $cond;
522
 
@@ -534,6 +591,10 @@ class Parser
534
  $this->expression($end) &&
535
  $this->matchChar('{', false)
536
  ) {
 
 
 
 
537
  $for = $this->pushSpecialBlock(Type::T_FOR, $s);
538
  $for->var = $varName[1];
539
  $for->start = $start;
@@ -546,13 +607,19 @@ class Parser
546
  $this->seek($s);
547
 
548
  if ($this->literal('@if', 3) && $this->valueList($cond) && $this->matchChar('{', false)) {
 
 
 
 
549
  $if = $this->pushSpecialBlock(Type::T_IF, $s);
 
550
  while ($cond[0] === Type::T_LIST
551
- && !empty($cond['enclosing'])
552
  && $cond['enclosing'] === 'parent'
553
- && count($cond[2]) == 1) {
554
  $cond = reset($cond[2]);
555
  }
 
556
  $if->cond = $cond;
557
  $if->cases = [];
558
 
@@ -565,6 +632,10 @@ class Parser
565
  $this->valueList($value) &&
566
  $this->end()
567
  ) {
 
 
 
 
568
  $this->append([Type::T_DEBUG, $value], $s);
569
 
570
  return true;
@@ -576,6 +647,10 @@ class Parser
576
  $this->valueList($value) &&
577
  $this->end()
578
  ) {
 
 
 
 
579
  $this->append([Type::T_WARN, $value], $s);
580
 
581
  return true;
@@ -587,6 +662,10 @@ class Parser
587
  $this->valueList($value) &&
588
  $this->end()
589
  ) {
 
 
 
 
590
  $this->append([Type::T_ERROR, $value], $s);
591
 
592
  return true;
@@ -594,14 +673,17 @@ class Parser
594
 
595
  $this->seek($s);
596
 
597
- #if ($this->literal('@content', 8))
598
-
599
  if ($this->literal('@content', 8) &&
600
  ($this->end() ||
601
  $this->matchChar('(') &&
602
- $this->argValues($argContent) &&
603
- $this->matchChar(')') &&
604
- $this->end())) {
 
 
 
 
 
605
  $this->append([Type::T_MIXIN_CONTENT, isset($argContent) ? $argContent : null], $s);
606
 
607
  return true;
@@ -671,8 +753,7 @@ class Parser
671
  // doesn't match built in directive, do generic one
672
  if ($this->matchChar('@', false) &&
673
  $this->keyword($dirName) &&
674
- ($this->variable($dirValue) || $this->openString('{', $dirValue) || true) &&
675
- $this->matchChar('{', false)
676
  ) {
677
  if ($dirName === 'media') {
678
  $directive = $this->pushSpecialBlock(Type::T_MEDIA, $s);
@@ -693,7 +774,7 @@ class Parser
693
  // maybe it's a generic blockless directive
694
  if ($this->matchChar('@', false) &&
695
  $this->keyword($dirName) &&
696
- $this->valueList($dirValue) &&
697
  $this->end()
698
  ) {
699
  $this->append([Type::T_DIRECTIVE, [$dirName, $dirValue]], $s);
@@ -706,6 +787,51 @@ class Parser
706
  return false;
707
  }
708
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
709
  // property shortcut
710
  // captures most properties before having to parse a selector
711
  if ($this->keyword($name, false) &&
@@ -727,6 +853,10 @@ class Parser
727
  $this->valueList($value) &&
728
  $this->end()
729
  ) {
 
 
 
 
730
  // check for '!flag'
731
  $assignmentFlags = $this->stripAssignmentFlags($value);
732
  $this->append([Type::T_ASSIGN, $name, $value, $assignmentFlags], $s);
@@ -743,6 +873,12 @@ class Parser
743
 
744
  // opening css block
745
  if ($this->selectors($selectors) && $this->matchChar('{', false)) {
 
 
 
 
 
 
746
  $this->pushBlock($selectors, $s);
747
 
748
  if ($this->eatWhiteDefault) {
@@ -769,6 +905,10 @@ class Parser
769
  }
770
 
771
  if ($this->matchChar('{', false)) {
 
 
 
 
772
  $propBlock = $this->pushSpecialBlock(Type::T_NESTED_PROPERTY, $s);
773
  $propBlock->prefix = $name;
774
  $propBlock->hasValue = $foundSomething;
@@ -968,7 +1108,7 @@ class Parser
968
  {
969
  $token = null;
970
 
971
- $end = strlen($this->buffer);
972
 
973
  // look for either ending delim, escape, or string interpolation
974
  foreach (['#{', '\\', $delim] as $lookahead) {
@@ -990,7 +1130,7 @@ class Parser
990
  $match,
991
  $token
992
  ];
993
- $this->count = $end + strlen($token);
994
 
995
  return true;
996
  }
@@ -1012,7 +1152,7 @@ class Parser
1012
  return false;
1013
  }
1014
 
1015
- $this->count += strlen($out[0]);
1016
 
1017
  if (! isset($eatWhitespace)) {
1018
  $eatWhitespace = $this->eatWhiteDefault;
@@ -1094,7 +1234,7 @@ class Parser
1094
  // comment that are kept in the output CSS
1095
  $comment = [];
1096
  $startCommentCount = $this->count;
1097
- $endCommentCount = $this->count + strlen($m[1]);
1098
 
1099
  // find interpolations in comment
1100
  $p = strpos($this->buffer, '#{', $this->count);
@@ -1141,7 +1281,7 @@ class Parser
1141
  $this->count = $endCommentCount;
1142
  } else {
1143
  // comment that are ignored and not kept in the output css
1144
- $this->count += strlen($m[0]);
1145
  }
1146
 
1147
  $gotWhite = true;
@@ -1159,13 +1299,15 @@ class Parser
1159
  {
1160
  if (! $this->discardComments) {
1161
  if ($comment[0] === Type::T_COMMENT) {
1162
- if (is_string($comment[1])) {
1163
  $comment[1] = substr(preg_replace(['/^\s+/m', '/^(.)/m'], ['', ' \1'], $comment[1]), 1);
1164
  }
1165
- if (isset($comment[2]) and is_array($comment[2]) and $comment[2][0] === Type::T_STRING) {
 
1166
  foreach ($comment[2][2] as $k => $v) {
1167
- if (is_string($v)) {
1168
  $p = strpos($v, "\n");
 
1169
  if ($p !== false) {
1170
  $comment[2][2][$k] = substr($v, 0, $p + 1)
1171
  . preg_replace(['/^\s+/m', '/^(.)/m'], ['', ' \1'], substr($v, $p+1));
@@ -1187,8 +1329,8 @@ class Parser
1187
  */
1188
  protected function append($statement, $pos = null)
1189
  {
1190
- if (! is_null($statement)) {
1191
- if (! is_null($pos)) {
1192
  list($line, $column) = $this->getSourcePosition($pos);
1193
 
1194
  $statement[static::SOURCE_LINE] = $line;
@@ -1214,7 +1356,7 @@ class Parser
1214
  */
1215
  protected function last()
1216
  {
1217
- $i = count($this->env->children) - 1;
1218
 
1219
  if (isset($this->env->children[$i])) {
1220
  return $this->env->children[$i];
@@ -1261,7 +1403,7 @@ class Parser
1261
  $media = [Type::T_LIST, '', []];
1262
 
1263
  foreach ((array) $mediaType as $type) {
1264
- if (is_array($type)) {
1265
  $media[2][] = $type;
1266
  } else {
1267
  $media[2][] = [Type::T_KEYWORD, $type];
@@ -1275,7 +1417,7 @@ class Parser
1275
  if (empty($parts) || $this->literal('and', 3)) {
1276
  $this->genericList($expressions, 'mediaExpression', 'and', false);
1277
 
1278
- if (is_array($expressions)) {
1279
  $parts = array_merge($parts, $expressions[2]);
1280
  }
1281
  }
@@ -1307,7 +1449,7 @@ class Parser
1307
  $this->literal(': ', 2) &&
1308
  $this->valueList($value) &&
1309
  $this->matchChar(')')
1310
- ) {
1311
  $support = [Type::T_STRING, '', [[Type::T_KEYWORD, ($not ? 'not ' : '') . '(']]];
1312
  $support[2][] = $property;
1313
  $support[2][] = [Type::T_KEYWORD, ': '];
@@ -1351,7 +1493,7 @@ class Parser
1351
  $compound = [Type::T_STRING, '', []];
1352
 
1353
  foreach ($sc as $scp) {
1354
- if (is_array($scp)) {
1355
  $compound[2][] = $scp;
1356
  } else {
1357
  $compound[2][] = [Type::T_KEYWORD, $scp];
@@ -1360,6 +1502,7 @@ class Parser
1360
 
1361
  $selectorList[2][] = $compound;
1362
  }
 
1363
  $support[2][] = $selectorList;
1364
  $support[2][] = [Type::T_KEYWORD, ')'];
1365
  $parts[] = $support;
@@ -1395,7 +1538,7 @@ class Parser
1395
  $this->seek($s);
1396
  }
1397
 
1398
- if (count($parts)) {
1399
  if ($this->eatWhiteDefault) {
1400
  $this->whitespace();
1401
  }
@@ -1493,6 +1636,63 @@ class Parser
1493
  return false;
1494
  }
1495
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1496
  /**
1497
  * Parse comma separated value list
1498
  *
@@ -1543,9 +1743,10 @@ class Parser
1543
  $items[] = $value;
1544
 
1545
  if ($delim) {
1546
- if (! $this->literal($delim, strlen($delim))) {
1547
  break;
1548
  }
 
1549
  $trailing_delim = true;
1550
  }
1551
  }
@@ -1559,7 +1760,8 @@ class Parser
1559
  if ($trailing_delim) {
1560
  $items[] = [Type::T_NULL];
1561
  }
1562
- if ($flatten && count($items) === 1) {
 
1563
  $out = $items[0];
1564
  } else {
1565
  $out = [Type::T_LIST, $delim, $items];
@@ -1571,9 +1773,9 @@ class Parser
1571
  /**
1572
  * Parse expression
1573
  *
1574
- * @param array $out
1575
- * @param bool $listOnly
1576
- * @param bool $lookForExp
1577
  *
1578
  * @return boolean
1579
  */
@@ -1600,13 +1802,14 @@ class Parser
1600
  $this->seek($s);
1601
  }
1602
 
1603
- if (in_array(Type::T_LIST, $allowedTypes) && $this->matchChar('[')) {
1604
  if ($this->enclosedExpression($lhs, $s, "]", [Type::T_LIST])) {
1605
  if ($lookForExp) {
1606
  $out = $this->expHelper($lhs, 0);
1607
  } else {
1608
  $out = $lhs;
1609
  }
 
1610
  $this->discardComments = $discard;
1611
 
1612
  return true;
@@ -1615,7 +1818,7 @@ class Parser
1615
  $this->seek($s);
1616
  }
1617
 
1618
- if (!$listOnly && $this->value($lhs)) {
1619
  if ($lookForExp) {
1620
  $out = $this->expHelper($lhs, 0);
1621
  } else {
@@ -1628,6 +1831,7 @@ class Parser
1628
  }
1629
 
1630
  $this->discardComments = $discard;
 
1631
  return false;
1632
  }
1633
 
@@ -1643,39 +1847,46 @@ class Parser
1643
  */
1644
  protected function enclosedExpression(&$out, $s, $closingParen = ")", $allowedTypes = [Type::T_LIST, Type::T_MAP])
1645
  {
1646
- if ($this->matchChar($closingParen) && in_array(Type::T_LIST, $allowedTypes)) {
1647
  $out = [Type::T_LIST, '', []];
 
1648
  switch ($closingParen) {
1649
  case ")":
1650
  $out['enclosing'] = 'parent'; // parenthesis list
1651
  break;
 
1652
  case "]":
1653
  $out['enclosing'] = 'bracket'; // bracketed list
1654
  break;
1655
  }
 
1656
  return true;
1657
  }
1658
 
1659
- if ($this->valueList($out) && $this->matchChar($closingParen)
1660
- && in_array($out[0], [Type::T_LIST, Type::T_KEYWORD])
1661
- && in_array(Type::T_LIST, $allowedTypes)) {
 
1662
  if ($out[0] !== Type::T_LIST || ! empty($out['enclosing'])) {
1663
  $out = [Type::T_LIST, '', [$out]];
1664
  }
 
1665
  switch ($closingParen) {
1666
  case ")":
1667
  $out['enclosing'] = 'parent'; // parenthesis list
1668
  break;
 
1669
  case "]":
1670
  $out['enclosing'] = 'bracket'; // bracketed list
1671
  break;
1672
  }
 
1673
  return true;
1674
  }
1675
 
1676
  $this->seek($s);
1677
 
1678
- if (in_array(Type::T_MAP, $allowedTypes) && $this->map($out)) {
1679
  return true;
1680
  }
1681
 
@@ -1804,28 +2015,53 @@ class Parser
1804
  if ($char === '+') {
1805
  $this->count++;
1806
 
 
 
1807
  if ($this->value($inner)) {
1808
  $out = [Type::T_UNARY, '+', $inner, $this->inParens];
1809
 
1810
  return true;
1811
  }
1812
 
1813
- $this->count--;
 
 
 
 
 
1814
 
1815
  return false;
1816
  }
1817
 
1818
  // negation
1819
  if ($char === '-') {
 
 
 
 
1820
  $this->count++;
1821
 
 
 
1822
  if ($this->variable($inner) || $this->unit($inner) || $this->parenValue($inner)) {
1823
  $out = [Type::T_UNARY, '-', $inner, $this->inParens];
1824
 
1825
  return true;
1826
  }
1827
 
1828
- $this->count--;
 
 
 
 
 
 
 
 
 
 
 
 
1829
  }
1830
 
1831
  // paren
@@ -1837,6 +2073,16 @@ class Parser
1837
  if ($this->interpolation($out) || $this->color($out)) {
1838
  return true;
1839
  }
 
 
 
 
 
 
 
 
 
 
1840
  }
1841
 
1842
  if ($this->matchChar('&', true)) {
@@ -2082,6 +2328,7 @@ class Parser
2082
  }
2083
 
2084
  $arg[2] = true;
 
2085
  $this->seek($sss);
2086
  } else {
2087
  $this->seek($ss);
@@ -2157,12 +2404,14 @@ class Parser
2157
  $s = $this->count;
2158
 
2159
  if ($this->match('(#([0-9a-f]+))', $m)) {
2160
- if (in_array(strlen($m[2]), [3,4,6,8])) {
2161
  $out = [Type::T_KEYWORD, $m[0]];
 
2162
  return true;
2163
  }
2164
 
2165
  $this->seek($s);
 
2166
  return false;
2167
  }
2168
 
@@ -2181,7 +2430,7 @@ class Parser
2181
  $s = $this->count;
2182
 
2183
  if ($this->match('([0-9]*(\.)?[0-9]+)([%a-zA-Z]+)?', $m, false)) {
2184
- if (strlen($this->buffer) === $this->count || ! ctype_digit($this->buffer[$this->count])) {
2185
  $this->whitespace();
2186
 
2187
  $unit = new Node\Number($m[1], empty($m[3]) ? '' : $m[3]);
@@ -2225,13 +2474,13 @@ class Parser
2225
  }
2226
 
2227
  if ($m[2] === '#{') {
2228
- $this->count -= strlen($m[2]);
2229
 
2230
  if ($this->interpolation($inter, false)) {
2231
  $content[] = $inter;
2232
  $hasInterpolation = true;
2233
  } else {
2234
- $this->count += strlen($m[2]);
2235
  $content[] = '#{'; // ignore it
2236
  }
2237
  } elseif ($m[2] === '\\') {
@@ -2242,23 +2491,23 @@ class Parser
2242
  } elseif ($this->literal("\\", 1, false)) {
2243
  $content[] = $m[2] . "\\";
2244
  } elseif ($this->literal("\r\n", 2, false) ||
2245
- $this->matchChar("\r", false) ||
2246
- $this->matchChar("\n", false) ||
2247
- $this->matchChar("\f", false)
2248
  ) {
2249
  // this is a continuation escaping, to be ignored
2250
  } else {
2251
  $content[] = $m[2];
2252
  }
2253
  } else {
2254
- $this->count -= strlen($delim);
2255
  break; // delim
2256
  }
2257
  }
2258
 
2259
  $this->eatWhiteDefault = $oldWhite;
2260
 
2261
- if ($this->literal($delim, strlen($delim))) {
2262
  if ($hasInterpolation) {
2263
  $delim = '"';
2264
 
@@ -2330,18 +2579,27 @@ class Parser
2330
  /**
2331
  * Parse an unbounded string stopped by $end
2332
  *
2333
- * @param string $end
2334
- * @param array $out
2335
- * @param string $nestingOpen
 
 
2336
  *
2337
  * @return boolean
2338
  */
2339
- protected function openString($end, &$out, $nestingOpen = null)
2340
  {
2341
  $oldWhite = $this->eatWhiteDefault;
2342
  $this->eatWhiteDefault = false;
2343
 
2344
- $patt = '(.*?)([\'"]|#\{|' . $this->pregQuote($end) . '|' . static::$commentPattern . ')';
 
 
 
 
 
 
 
2345
 
2346
  $nestingLevel = 0;
2347
 
@@ -2358,12 +2616,16 @@ class Parser
2358
 
2359
  $tok = $m[2];
2360
 
2361
- $this->count-= strlen($tok);
2362
 
2363
- if ($tok === $end && ! $nestingLevel--) {
2364
  break;
2365
  }
2366
 
 
 
 
 
2367
  if (($tok === "'" || $tok === '"') && $this->string($str)) {
2368
  $content[] = $str;
2369
  continue;
@@ -2375,18 +2637,18 @@ class Parser
2375
  }
2376
 
2377
  $content[] = $tok;
2378
- $this->count+= strlen($tok);
2379
  }
2380
 
2381
  $this->eatWhiteDefault = $oldWhite;
2382
 
2383
- if (! $content) {
2384
  return false;
2385
  }
2386
 
2387
  // trim the end
2388
- if (is_string(end($content))) {
2389
- $content[count($content) - 1] = rtrim(end($content));
2390
  }
2391
 
2392
  $out = [Type::T_STRING, '', $content];
@@ -2405,6 +2667,8 @@ class Parser
2405
  protected function interpolation(&$out, $lookWhite = true)
2406
  {
2407
  $oldWhite = $this->eatWhiteDefault;
 
 
2408
  $this->eatWhiteDefault = true;
2409
 
2410
  $s = $this->count;
@@ -2424,6 +2688,7 @@ class Parser
2424
  }
2425
 
2426
  $this->eatWhiteDefault = $oldWhite;
 
2427
 
2428
  if ($this->eatWhiteDefault) {
2429
  $this->whitespace();
@@ -2435,6 +2700,7 @@ class Parser
2435
  $this->seek($s);
2436
 
2437
  $this->eatWhiteDefault = $oldWhite;
 
2438
 
2439
  return false;
2440
  }
@@ -2480,16 +2746,10 @@ class Parser
2480
  }
2481
 
2482
  // match comment hack
2483
- if (preg_match(
2484
- static::$whitePattern,
2485
- $this->buffer,
2486
- $m,
2487
- null,
2488
- $this->count
2489
- )) {
2490
  if (! empty($m[0])) {
2491
  $parts[] = $m[0];
2492
- $this->count += strlen($m[0]);
2493
  }
2494
  }
2495
 
@@ -2500,6 +2760,60 @@ class Parser
2500
  return true;
2501
  }
2502
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2503
  /**
2504
  * Parse comma separated selector list
2505
  *
@@ -2552,7 +2866,7 @@ class Parser
2552
  $s = $this->count;
2553
 
2554
  if ($this->match('[>+~]+', $m, true)) {
2555
- if ($subSelector && is_string($subSelector) && strpos($subSelector, 'nth-') === 0 &&
2556
  $m[0] === '+' && $this->match("(\d+|n\b)", $counter)
2557
  ) {
2558
  $this->seek($s);
@@ -2698,8 +3012,8 @@ class Parser
2698
  $nameParts === ['nth-of-type'] || $nameParts == ['nth-last-of-type']
2699
  ) {
2700
  if ($this->matchChar('(', true) &&
2701
- ($this->selectors($subs, reset($nameParts)) || true) &&
2702
- $this->matchChar(')')
2703
  ) {
2704
  $parts[] = '(';
2705
 
@@ -2709,12 +3023,12 @@ class Parser
2709
  $parts[] = $p;
2710
  }
2711
 
2712
- if (count($sub) && reset($sub)) {
2713
  $parts[] = ' ';
2714
  }
2715
  }
2716
 
2717
- if (count($subs) && reset($subs)) {
2718
  $parts[] = ', ';
2719
  }
2720
  }
@@ -2725,8 +3039,8 @@ class Parser
2725
  }
2726
  } else {
2727
  if ($this->matchChar('(') &&
2728
- ($this->openString(')', $str, '(') || true) &&
2729
- $this->matchChar(')')
2730
  ) {
2731
  $parts[] = '(';
2732
 
@@ -2747,7 +3061,7 @@ class Parser
2747
  $this->seek($s);
2748
 
2749
  // 2n+1
2750
- if ($subSelector && is_string($subSelector) && strpos($subSelector, 'nth-') === 0) {
2751
  if ($this->match("(\s*(\+\s*|\-\s*)?(\d+|n|\d+n))+", $counter)) {
2752
  $parts[] = $counter[0];
2753
  //$parts[] = str_replace(' ', '', $counter[0]);
@@ -2812,7 +3126,11 @@ class Parser
2812
  $s = $this->count;
2813
 
2814
  if ($this->matchChar('$', false) && $this->keyword($name)) {
2815
- $out = [Type::T_VARIABLE, $name];
 
 
 
 
2816
 
2817
  return true;
2818
  }
@@ -2859,7 +3177,7 @@ class Parser
2859
  {
2860
  $s = $this->count;
2861
 
2862
- if ($this->keyword($word, $eatWhitespace) && (ord($word[0]) > 57 || ord($word[0]) < 48)) {
2863
  return true;
2864
  }
2865
 
@@ -2924,7 +3242,7 @@ class Parser
2924
  return true;
2925
  }
2926
 
2927
- if ($this->count === strlen($this->buffer) || $this->buffer[$this->count] === '}') {
2928
  // if there is end of file or a closing block next then we don't need a ;
2929
  return true;
2930
  }
@@ -2943,10 +3261,10 @@ class Parser
2943
  {
2944
  $flags = [];
2945
 
2946
- for ($token = &$value; $token[0] === Type::T_LIST && ($s = count($token[2])); $token = &$lastNode) {
2947
  $lastNode = &$token[2][$s - 1];
2948
 
2949
- while ($lastNode[0] === Type::T_KEYWORD && in_array($lastNode[1], ['!default', '!global'])) {
2950
  array_pop($token[2]);
2951
 
2952
  $node = end($token[2]);
@@ -2973,7 +3291,7 @@ class Parser
2973
  $part = end($selector);
2974
 
2975
  if ($part === ['!optional']) {
2976
- array_pop($selectors[count($selectors) - 1]);
2977
 
2978
  $optional = true;
2979
  }
@@ -2990,57 +3308,13 @@ class Parser
2990
  */
2991
  protected function flattenList($value)
2992
  {
2993
- if ($value[0] === Type::T_LIST && count($value[2]) === 1) {
2994
  return $this->flattenList($value[2][0]);
2995
  }
2996
 
2997
  return $value;
2998
  }
2999
 
3000
- /**
3001
- * @deprecated
3002
- *
3003
- * {@internal
3004
- * advance counter to next occurrence of $what
3005
- * $until - don't include $what in advance
3006
- * $allowNewline, if string, will be used as valid char set
3007
- * }}
3008
- */
3009
- protected function to($what, &$out, $until = false, $allowNewline = false)
3010
- {
3011
- if (is_string($allowNewline)) {
3012
- $validChars = $allowNewline;
3013
- } else {
3014
- $validChars = $allowNewline ? '.' : "[^\n]";
3015
- }
3016
-
3017
- $m = null;
3018
-
3019
- if (! $this->match('(' . $validChars . '*?)' . $this->pregQuote($what), $m, ! $until)) {
3020
- return false;
3021
- }
3022
-
3023
- if ($until) {
3024
- $this->count -= strlen($what); // give back $what
3025
- }
3026
-
3027
- $out = $m[1];
3028
-
3029
- return true;
3030
- }
3031
-
3032
- /**
3033
- * @deprecated
3034
- */
3035
- protected function show()
3036
- {
3037
- if ($this->peek("(.*?)(\n|$)", $m, $this->count)) {
3038
- return $m[1];
3039
- }
3040
-
3041
- return '';
3042
- }
3043
-
3044
  /**
3045
  * Quote regular expression
3046
  *
@@ -3068,10 +3342,10 @@ class Parser
3068
  $prev = $pos + 1;
3069
  }
3070
 
3071
- $this->sourcePositions[] = strlen($buffer);
3072
 
3073
  if (substr($buffer, -1) !== "\n") {
3074
- $this->sourcePositions[] = strlen($buffer) + 1;
3075
  }
3076
  }
3077
 
@@ -3085,7 +3359,7 @@ class Parser
3085
  private function getSourcePosition($pos)
3086
  {
3087
  $low = 0;
3088
- $high = count($this->sourcePositions);
3089
 
3090
  while ($low < $high) {
3091
  $mid = (int) (($high + $low) / 2);
@@ -3111,14 +3385,7 @@ class Parser
3111
  */
3112
  private function saveEncoding()
3113
  {
3114
- if (version_compare(PHP_VERSION, '7.2.0') >= 0) {
3115
- return;
3116
- }
3117
-
3118
- // deprecated in PHP 7.2
3119
- $iniDirective = 'mbstring.func_overload';
3120
-
3121
- if (extension_loaded('mbstring') && ini_get($iniDirective) & 2) {
3122
  $this->encoding = mb_internal_encoding();
3123
 
3124
  mb_internal_encoding('iso-8859-1');
@@ -3130,7 +3397,7 @@ class Parser
3130
  */
3131
  private function restoreEncoding()
3132
  {
3133
- if (extension_loaded('mbstring') && $this->encoding) {
3134
  mb_internal_encoding($this->encoding);
3135
  }
3136
  }
65
  private $inParens;
66
  private $eatWhiteDefault;
67
  private $discardComments;
68
+ private $allowVars;
69
  private $buffer;
70
  private $utf8;
71
  private $encoding;
72
  private $patternModifiers;
73
  private $commentsSeen;
74
 
75
+ private $cssOnly;
76
+
77
  /**
78
  * Constructor
79
  *
84
  * @param string $encoding
85
  * @param \ScssPhp\ScssPhp\Cache $cache
86
  */
87
+ public function __construct($sourceName, $sourceIndex = 0, $encoding = 'utf-8', $cache = null, $cssOnly = false)
88
  {
89
  $this->sourceName = $sourceName ?: '(stdin)';
90
  $this->sourceIndex = $sourceIndex;
92
  $this->utf8 = ! $encoding || strtolower($encoding) === 'utf-8';
93
  $this->patternModifiers = $this->utf8 ? 'Aisu' : 'Ais';
94
  $this->commentsSeen = [];
95
+ $this->commentsSeen = [];
96
+ $this->allowVars = true;
97
+ $this->cssOnly = $cssOnly;
98
 
99
  if (empty(static::$operatorPattern)) {
100
  static::$operatorPattern = '([*\/%+-]|[!=]\=|\>\=?|\<\=\>|\<\=?|and|or)';
144
  : "$this->sourceName on line $line, at column $column";
145
 
146
  if ($this->peek("(.*?)(\n|$)", $m, $this->count)) {
147
+ $this->restoreEncoding();
148
+
149
  throw new ParserException("$msg: failed at `$m[1]` $loc");
150
  }
151
 
152
+ $this->restoreEncoding();
153
+
154
  throw new ParserException("$msg: $loc");
155
  }
156
 
173
  ];
174
  $v = $this->cache->getCache("parse", $cacheKey, $parseOptions);
175
 
176
+ if (! \is_null($v)) {
177
  return $v;
178
  }
179
  }
201
  ;
202
  }
203
 
204
+ if ($this->count !== \strlen($this->buffer)) {
205
  $this->throwParseError();
206
  }
207
 
356
  && $this->matchChar(')')) || true) &&
357
  $this->matchChar('{', false)
358
  ) {
359
+ if ($this->cssOnly) {
360
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
361
+ }
362
+
363
  $atRoot = $this->pushSpecialBlock(Type::T_AT_ROOT, $s);
364
  $atRoot->selector = $selector;
365
  $atRoot->with = $with;
383
  ($this->argumentDef($args) || true) &&
384
  $this->matchChar('{', false)
385
  ) {
386
+ if ($this->cssOnly) {
387
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
388
+ }
389
+
390
  $mixin = $this->pushSpecialBlock(Type::T_MIXIN, $s);
391
  $mixin->name = $mixinName;
392
  $mixin->args = $args;
407
  ($this->end() || $this->matchChar('{') && $hasBlock = true)) ||
408
  $this->matchChar('{') && $hasBlock = true)
409
  ) {
410
+ if ($this->cssOnly) {
411
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
412
+ }
413
+
414
  $child = [
415
  Type::T_INCLUDE,
416
  $mixinName,
435
  $this->valueList($importPath) &&
436
  $this->end()
437
  ) {
438
+ if ($this->cssOnly) {
439
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
440
+ }
441
+
442
  $this->append([Type::T_SCSSPHP_IMPORT_ONCE, $importPath], $s);
443
 
444
  return true;
461
  $this->url($importPath) &&
462
  $this->end()
463
  ) {
464
+ if ($this->cssOnly) {
465
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
466
+ }
467
+
468
  $this->append([Type::T_IMPORT, $importPath], $s);
469
 
470
  return true;
476
  $this->selectors($selectors) &&
477
  $this->end()
478
  ) {
479
+ if ($this->cssOnly) {
480
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
481
+ }
482
+
483
  // check for '!flag'
484
  $optional = $this->stripOptionalFlag($selectors);
485
  $this->append([Type::T_EXTEND, $selectors, $optional], $s);
494
  $this->argumentDef($args) &&
495
  $this->matchChar('{', false)
496
  ) {
497
+ if ($this->cssOnly) {
498
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
499
+ }
500
+
501
  $func = $this->pushSpecialBlock(Type::T_FUNCTION, $s);
502
  $func->name = $fnName;
503
  $func->args = $args;
508
  $this->seek($s);
509
 
510
  if ($this->literal('@break', 6) && $this->end()) {
511
+ if ($this->cssOnly) {
512
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
513
+ }
514
+
515
  $this->append([Type::T_BREAK], $s);
516
 
517
  return true;
520
  $this->seek($s);
521
 
522
  if ($this->literal('@continue', 9) && $this->end()) {
523
+ if ($this->cssOnly) {
524
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
525
+ }
526
+
527
  $this->append([Type::T_CONTINUE], $s);
528
 
529
  return true;
532
  $this->seek($s);
533
 
534
  if ($this->literal('@return', 7) && ($this->valueList($retVal) || true) && $this->end()) {
535
+ if ($this->cssOnly) {
536
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
537
+ }
538
+
539
  $this->append([Type::T_RETURN, isset($retVal) ? $retVal : [Type::T_NULL]], $s);
540
 
541
  return true;
549
  $this->valueList($list) &&
550
  $this->matchChar('{', false)
551
  ) {
552
+ if ($this->cssOnly) {
553
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
554
+ }
555
+
556
  $each = $this->pushSpecialBlock(Type::T_EACH, $s);
557
 
558
  foreach ($varNames[2] as $varName) {
570
  $this->expression($cond) &&
571
  $this->matchChar('{', false)
572
  ) {
573
+ if ($this->cssOnly) {
574
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
575
+ }
576
+
577
  $while = $this->pushSpecialBlock(Type::T_WHILE, $s);
578
  $while->cond = $cond;
579
 
591
  $this->expression($end) &&
592
  $this->matchChar('{', false)
593
  ) {
594
+ if ($this->cssOnly) {
595
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
596
+ }
597
+
598
  $for = $this->pushSpecialBlock(Type::T_FOR, $s);
599
  $for->var = $varName[1];
600
  $for->start = $start;
607
  $this->seek($s);
608
 
609
  if ($this->literal('@if', 3) && $this->valueList($cond) && $this->matchChar('{', false)) {
610
+ if ($this->cssOnly) {
611
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
612
+ }
613
+
614
  $if = $this->pushSpecialBlock(Type::T_IF, $s);
615
+
616
  while ($cond[0] === Type::T_LIST
617
+ && ! empty($cond['enclosing'])
618
  && $cond['enclosing'] === 'parent'
619
+ && \count($cond[2]) == 1) {
620
  $cond = reset($cond[2]);
621
  }
622
+
623
  $if->cond = $cond;
624
  $if->cases = [];
625
 
632
  $this->valueList($value) &&
633
  $this->end()
634
  ) {
635
+ if ($this->cssOnly) {
636
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
637
+ }
638
+
639
  $this->append([Type::T_DEBUG, $value], $s);
640
 
641
  return true;
647
  $this->valueList($value) &&
648
  $this->end()
649
  ) {
650
+ if ($this->cssOnly) {
651
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
652
+ }
653
+
654
  $this->append([Type::T_WARN, $value], $s);
655
 
656
  return true;
662
  $this->valueList($value) &&
663
  $this->end()
664
  ) {
665
+ if ($this->cssOnly) {
666
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
667
+ }
668
+
669
  $this->append([Type::T_ERROR, $value], $s);
670
 
671
  return true;
673
 
674
  $this->seek($s);
675
 
 
 
676
  if ($this->literal('@content', 8) &&
677
  ($this->end() ||
678
  $this->matchChar('(') &&
679
+ $this->argValues($argContent) &&
680
+ $this->matchChar(')') &&
681
+ $this->end())
682
+ ) {
683
+ if ($this->cssOnly) {
684
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
685
+ }
686
+
687
  $this->append([Type::T_MIXIN_CONTENT, isset($argContent) ? $argContent : null], $s);
688
 
689
  return true;
753
  // doesn't match built in directive, do generic one
754
  if ($this->matchChar('@', false) &&
755
  $this->keyword($dirName) &&
756
+ $this->directiveValue($dirValue, '{')
 
757
  ) {
758
  if ($dirName === 'media') {
759
  $directive = $this->pushSpecialBlock(Type::T_MEDIA, $s);
774
  // maybe it's a generic blockless directive
775
  if ($this->matchChar('@', false) &&
776
  $this->keyword($dirName) &&
777
+ $this->directiveValue($dirValue) &&
778
  $this->end()
779
  ) {
780
  $this->append([Type::T_DIRECTIVE, [$dirName, $dirValue]], $s);
787
  return false;
788
  }
789
 
790
+ // custom properties : right part is static
791
+ if (($this->customProperty($name) || ($this->cssOnly && $this->propertyName($name))) &&
792
+ $this->matchChar(':', false)
793
+ ) {
794
+ $start = $this->count;
795
+
796
+ // but can be complex and finish with ; or }
797
+ foreach ([';','}'] as $ending) {
798
+ if ($this->openString($ending, $stringValue, '(', ')', false) &&
799
+ $this->end()
800
+ ) {
801
+ $end = $this->count;
802
+ $value = $stringValue;
803
+
804
+ // check if we have only a partial value due to nested [] or { } to take in account
805
+ $nestingPairs = [['[', ']'], ['{', '}']];
806
+
807
+ foreach ($nestingPairs as $nestingPair) {
808
+ $p = strpos($this->buffer, $nestingPair[0], $start);
809
+
810
+ if ($p && $p < $end) {
811
+ $this->seek($start);
812
+
813
+ if ($this->openString($ending, $stringValue, $nestingPair[0], $nestingPair[1], false) &&
814
+ $this->end() &&
815
+ $this->count > $end
816
+ ) {
817
+ $end = $this->count;
818
+ $value = $stringValue;
819
+ }
820
+ }
821
+ }
822
+
823
+ $this->seek($end);
824
+ $this->append([Type::T_CUSTOM_PROPERTY, $name, $value], $s);
825
+
826
+ return true;
827
+ }
828
+ }
829
+
830
+ // TODO: output an error here if nothing found according to sass spec
831
+ }
832
+
833
+ $this->seek($s);
834
+
835
  // property shortcut
836
  // captures most properties before having to parse a selector
837
  if ($this->keyword($name, false) &&
853
  $this->valueList($value) &&
854
  $this->end()
855
  ) {
856
+ if ($this->cssOnly) {
857
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
858
+ }
859
+
860
  // check for '!flag'
861
  $assignmentFlags = $this->stripAssignmentFlags($value);
862
  $this->append([Type::T_ASSIGN, $name, $value, $assignmentFlags], $s);
873
 
874
  // opening css block
875
  if ($this->selectors($selectors) && $this->matchChar('{', false)) {
876
+ if ($this->cssOnly) {
877
+ if (! empty($this->env->parent)) {
878
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
879
+ }
880
+ }
881
+
882
  $this->pushBlock($selectors, $s);
883
 
884
  if ($this->eatWhiteDefault) {
905
  }
906
 
907
  if ($this->matchChar('{', false)) {
908
+ if ($this->cssOnly) {
909
+ $this->throwParseError("SCSS syntax not allowed in CSS file");
910
+ }
911
+
912
  $propBlock = $this->pushSpecialBlock(Type::T_NESTED_PROPERTY, $s);
913
  $propBlock->prefix = $name;
914
  $propBlock->hasValue = $foundSomething;
1108
  {
1109
  $token = null;
1110
 
1111
+ $end = \strlen($this->buffer);
1112
 
1113
  // look for either ending delim, escape, or string interpolation
1114
  foreach (['#{', '\\', $delim] as $lookahead) {
1130
  $match,
1131
  $token
1132
  ];
1133
+ $this->count = $end + \strlen($token);
1134
 
1135
  return true;
1136
  }
1152
  return false;
1153
  }
1154
 
1155
+ $this->count += \strlen($out[0]);
1156
 
1157
  if (! isset($eatWhitespace)) {
1158
  $eatWhitespace = $this->eatWhiteDefault;
1234
  // comment that are kept in the output CSS
1235
  $comment = [];
1236
  $startCommentCount = $this->count;
1237
+ $endCommentCount = $this->count + \strlen($m[1]);
1238
 
1239
  // find interpolations in comment
1240
  $p = strpos($this->buffer, '#{', $this->count);
1281
  $this->count = $endCommentCount;
1282
  } else {
1283
  // comment that are ignored and not kept in the output css
1284
+ $this->count += \strlen($m[0]);
1285
  }
1286
 
1287
  $gotWhite = true;
1299
  {
1300
  if (! $this->discardComments) {
1301
  if ($comment[0] === Type::T_COMMENT) {
1302
+ if (\is_string($comment[1])) {
1303
  $comment[1] = substr(preg_replace(['/^\s+/m', '/^(.)/m'], ['', ' \1'], $comment[1]), 1);
1304
  }
1305
+
1306
+ if (isset($comment[2]) and \is_array($comment[2]) and $comment[2][0] === Type::T_STRING) {
1307
  foreach ($comment[2][2] as $k => $v) {
1308
+ if (\is_string($v)) {
1309
  $p = strpos($v, "\n");
1310
+
1311
  if ($p !== false) {
1312
  $comment[2][2][$k] = substr($v, 0, $p + 1)
1313
  . preg_replace(['/^\s+/m', '/^(.)/m'], ['', ' \1'], substr($v, $p+1));
1329
  */
1330
  protected function append($statement, $pos = null)
1331
  {
1332
+ if (! \is_null($statement)) {
1333
+ if (! \is_null($pos)) {
1334
  list($line, $column) = $this->getSourcePosition($pos);
1335
 
1336
  $statement[static::SOURCE_LINE] = $line;
1356
  */
1357
  protected function last()
1358
  {
1359
+ $i = \count($this->env->children) - 1;
1360
 
1361
  if (isset($this->env->children[$i])) {
1362
  return $this->env->children[$i];
1403
  $media = [Type::T_LIST, '', []];
1404
 
1405
  foreach ((array) $mediaType as $type) {
1406
+ if (\is_array($type)) {
1407
  $media[2][] = $type;
1408
  } else {
1409
  $media[2][] = [Type::T_KEYWORD, $type];
1417
  if (empty($parts) || $this->literal('and', 3)) {
1418
  $this->genericList($expressions, 'mediaExpression', 'and', false);
1419
 
1420
+ if (\is_array($expressions)) {
1421
  $parts = array_merge($parts, $expressions[2]);
1422
  }
1423
  }
1449
  $this->literal(': ', 2) &&
1450
  $this->valueList($value) &&
1451
  $this->matchChar(')')
1452
+ ) {
1453
  $support = [Type::T_STRING, '', [[Type::T_KEYWORD, ($not ? 'not ' : '') . '(']]];
1454
  $support[2][] = $property;
1455
  $support[2][] = [Type::T_KEYWORD, ': '];
1493
  $compound = [Type::T_STRING, '', []];
1494
 
1495
  foreach ($sc as $scp) {
1496
+ if (\is_array($scp)) {
1497
  $compound[2][] = $scp;
1498
  } else {
1499
  $compound[2][] = [Type::T_KEYWORD, $scp];
1502
 
1503
  $selectorList[2][] = $compound;
1504
  }
1505
+
1506
  $support[2][] = $selectorList;
1507
  $support[2][] = [Type::T_KEYWORD, ')'];
1508
  $parts[] = $support;
1538
  $this->seek($s);
1539
  }
1540
 
1541
+ if (\count($parts)) {
1542
  if ($this->eatWhiteDefault) {
1543
  $this->whitespace();
1544
  }
1636
  return false;
1637
  }
1638
 
1639
+ /**
1640
+ * Parse directive value list that considers $vars as keyword
1641
+ *
1642
+ * @param array $out
1643
+ * @param boolean|string $endChar
1644
+ *
1645
+ * @return boolean
1646
+ */
1647
+ protected function directiveValue(&$out, $endChar = false)
1648
+ {
1649
+ $s = $this->count;
1650
+
1651
+ if ($this->variable($out)) {
1652
+ if ($endChar && $this->matchChar($endChar, false)) {
1653
+ return true;
1654
+ }
1655
+
1656
+ if (! $endChar && $this->end()) {
1657
+ return true;
1658
+ }
1659
+ }
1660
+
1661
+ $this->seek($s);
1662
+
1663
+ if ($endChar and $this->openString($endChar, $out)) {
1664
+ if ($this->matchChar($endChar, false)) {
1665
+ return true;
1666
+ }
1667
+ }
1668
+
1669
+ $this->seek($s);
1670
+
1671
+ $allowVars = $this->allowVars;
1672
+ $this->allowVars = false;
1673
+
1674
+ $res = $this->genericList($out, 'spaceList', ',');
1675
+ $this->allowVars = $allowVars;
1676
+
1677
+ if ($res) {
1678
+ if ($endChar && $this->matchChar($endChar, false)) {
1679
+ return true;
1680
+ }
1681
+
1682
+ if (! $endChar && $this->end()) {
1683
+ return true;
1684
+ }
1685
+ }
1686
+
1687
+ $this->seek($s);
1688
+
1689
+ if ($endChar && $this->matchChar($endChar, false)) {
1690
+ return true;
1691
+ }
1692
+
1693
+ return false;
1694
+ }
1695
+
1696
  /**
1697
  * Parse comma separated value list
1698
  *
1743
  $items[] = $value;
1744
 
1745
  if ($delim) {
1746
+ if (! $this->literal($delim, \strlen($delim))) {
1747
  break;
1748
  }
1749
+
1750
  $trailing_delim = true;
1751
  }
1752
  }
1760
  if ($trailing_delim) {
1761
  $items[] = [Type::T_NULL];
1762
  }
1763
+
1764
+ if ($flatten && \count($items) === 1) {
1765
  $out = $items[0];
1766
  } else {
1767
  $out = [Type::T_LIST, $delim, $items];
1773
  /**
1774
  * Parse expression
1775
  *
1776
+ * @param array $out
1777
+ * @param boolean $listOnly
1778
+ * @param boolean $lookForExp
1779
  *
1780
  * @return boolean
1781
  */
1802
  $this->seek($s);
1803
  }
1804
 
1805
+ if (\in_array(Type::T_LIST, $allowedTypes) && $this->matchChar('[')) {
1806
  if ($this->enclosedExpression($lhs, $s, "]", [Type::T_LIST])) {
1807
  if ($lookForExp) {
1808
  $out = $this->expHelper($lhs, 0);
1809
  } else {
1810
  $out = $lhs;
1811
  }
1812
+
1813
  $this->discardComments = $discard;
1814
 
1815
  return true;
1818
  $this->seek($s);
1819
  }
1820
 
1821
+ if (! $listOnly && $this->value($lhs)) {
1822
  if ($lookForExp) {
1823
  $out = $this->expHelper($lhs, 0);
1824
  } else {
1831
  }
1832
 
1833
  $this->discardComments = $discard;
1834
+
1835
  return false;
1836
  }
1837
 
1847
  */
1848
  protected function enclosedExpression(&$out, $s, $closingParen = ")", $allowedTypes = [Type::T_LIST, Type::T_MAP])
1849
  {
1850
+ if ($this->matchChar($closingParen) && \in_array(Type::T_LIST, $allowedTypes)) {
1851
  $out = [Type::T_LIST, '', []];
1852
+
1853
  switch ($closingParen) {
1854
  case ")":
1855
  $out['enclosing'] = 'parent'; // parenthesis list
1856
  break;
1857
+
1858
  case "]":
1859
  $out['enclosing'] = 'bracket'; // bracketed list
1860
  break;
1861
  }
1862
+
1863
  return true;
1864
  }
1865
 
1866
+ if ($this->valueList($out) && $this->matchChar($closingParen) &&
1867
+ \in_array($out[0], [Type::T_LIST, Type::T_KEYWORD]) &&
1868
+ \in_array(Type::T_LIST, $allowedTypes)
1869
+ ) {
1870
  if ($out[0] !== Type::T_LIST || ! empty($out['enclosing'])) {
1871
  $out = [Type::T_LIST, '', [$out]];
1872
  }
1873
+
1874
  switch ($closingParen) {
1875
  case ")":
1876
  $out['enclosing'] = 'parent'; // parenthesis list
1877
  break;
1878
+
1879
  case "]":
1880
  $out['enclosing'] = 'bracket'; // bracketed list
1881
  break;
1882
  }
1883
+
1884
  return true;
1885
  }
1886
 
1887
  $this->seek($s);
1888
 
1889
+ if (\in_array(Type::T_MAP, $allowedTypes) && $this->map($out)) {
1890
  return true;
1891
  }
1892
 
2015
  if ($char === '+') {
2016
  $this->count++;
2017
 
2018
+ $follow_white = $this->whitespace();
2019
+
2020
  if ($this->value($inner)) {
2021
  $out = [Type::T_UNARY, '+', $inner, $this->inParens];
2022
 
2023
  return true;
2024
  }
2025
 
2026
+ if ($follow_white) {
2027
+ $out = [Type::T_KEYWORD, $char];
2028
+ return true;
2029
+ }
2030
+
2031
+ $this->seek($s);
2032
 
2033
  return false;
2034
  }
2035
 
2036
  // negation
2037
  if ($char === '-') {
2038
+ if ($this->customProperty($out)) {
2039
+ return true;
2040
+ }
2041
+
2042
  $this->count++;
2043
 
2044
+ $follow_white = $this->whitespace();
2045
+
2046
  if ($this->variable($inner) || $this->unit($inner) || $this->parenValue($inner)) {
2047
  $out = [Type::T_UNARY, '-', $inner, $this->inParens];
2048
 
2049
  return true;
2050
  }
2051
 
2052
+ if ($this->keyword($inner) && ! $this->func($inner, $out)) {
2053
+ $out = [Type::T_UNARY, '-', $inner, $this->inParens];
2054
+
2055
+ return true;
2056
+ }
2057
+
2058
+ if ($follow_white) {
2059
+ $out = [Type::T_KEYWORD, $char];
2060
+
2061
+ return true;
2062
+ }
2063
+
2064
+ $this->seek($s);
2065
  }
2066
 
2067
  // paren
2073
  if ($this->interpolation($out) || $this->color($out)) {
2074
  return true;
2075
  }
2076
+
2077
+ $this->count++;
2078
+
2079
+ if ($this->keyword($keyword)) {
2080
+ $out = [Type::T_KEYWORD, "#" . $keyword];
2081
+
2082
+ return true;
2083
+ }
2084
+
2085
+ $this->count--;
2086
  }
2087
 
2088
  if ($this->matchChar('&', true)) {
2328
  }
2329
 
2330
  $arg[2] = true;
2331
+
2332
  $this->seek($sss);
2333
  } else {
2334
  $this->seek($ss);
2404
  $s = $this->count;
2405
 
2406
  if ($this->match('(#([0-9a-f]+))', $m)) {
2407
+ if (\in_array(\strlen($m[2]), [3,4,6,8])) {
2408
  $out = [Type::T_KEYWORD, $m[0]];
2409
+
2410
  return true;
2411
  }
2412
 
2413
  $this->seek($s);
2414
+
2415
  return false;
2416
  }
2417
 
2430
  $s = $this->count;
2431
 
2432
  if ($this->match('([0-9]*(\.)?[0-9]+)([%a-zA-Z]+)?', $m, false)) {
2433
+ if (\strlen($this->buffer) === $this->count || ! ctype_digit($this->buffer[$this->count])) {
2434
  $this->whitespace();
2435
 
2436
  $unit = new Node\Number($m[1], empty($m[3]) ? '' : $m[3]);
2474
  }
2475
 
2476
  if ($m[2] === '#{') {
2477
+ $this->count -= \strlen($m[2]);
2478
 
2479
  if ($this->interpolation($inter, false)) {
2480
  $content[] = $inter;
2481
  $hasInterpolation = true;
2482
  } else {
2483
+ $this->count += \strlen($m[2]);
2484
  $content[] = '#{'; // ignore it
2485
  }
2486
  } elseif ($m[2] === '\\') {
2491
  } elseif ($this->literal("\\", 1, false)) {
2492
  $content[] = $m[2] . "\\";
2493
  } elseif ($this->literal("\r\n", 2, false) ||
2494
+ $this->matchChar("\r", false) ||
2495
+ $this->matchChar("\n", false) ||
2496
+ $this->matchChar("\f", false)
2497
  ) {
2498
  // this is a continuation escaping, to be ignored
2499
  } else {
2500
  $content[] = $m[2];
2501
  }
2502
  } else {
2503
+ $this->count -= \strlen($delim);
2504
  break; // delim
2505
  }
2506
  }
2507
 
2508
  $this->eatWhiteDefault = $oldWhite;
2509
 
2510
+ if ($this->literal($delim, \strlen($delim))) {
2511
  if ($hasInterpolation) {
2512
  $delim = '"';
2513
 
2579
  /**
2580
  * Parse an unbounded string stopped by $end
2581
  *
2582
+ * @param string $end
2583
+ * @param array $out
2584
+ * @param string $nestingOpen
2585
+ * @param string $nestingClose
2586
+ * @param boolean $trimEnd
2587
  *
2588
  * @return boolean
2589
  */
2590
+ protected function openString($end, &$out, $nestingOpen = null, $nestingClose = null, $trimEnd = true)
2591
  {
2592
  $oldWhite = $this->eatWhiteDefault;
2593
  $this->eatWhiteDefault = false;
2594
 
2595
+ if ($nestingOpen && ! $nestingClose) {
2596
+ $nestingClose = $end;
2597
+ }
2598
+
2599
+ $patt = '(.*?)([\'"]|#\{|'
2600
+ . $this->pregQuote($end) . '|'
2601
+ . (($nestingClose && $nestingClose !== $end) ? $this->pregQuote($nestingClose) . '|' : '')
2602
+ . static::$commentPattern . ')';
2603
 
2604
  $nestingLevel = 0;
2605
 
2616
 
2617
  $tok = $m[2];
2618
 
2619
+ $this->count-= \strlen($tok);
2620
 
2621
+ if ($tok === $end && ! $nestingLevel) {
2622
  break;
2623
  }
2624
 
2625
+ if ($tok === $nestingClose) {
2626
+ $nestingLevel--;
2627
+ }
2628
+
2629
  if (($tok === "'" || $tok === '"') && $this->string($str)) {
2630
  $content[] = $str;
2631
  continue;
2637
  }
2638
 
2639
  $content[] = $tok;
2640
+ $this->count+= \strlen($tok);
2641
  }
2642
 
2643
  $this->eatWhiteDefault = $oldWhite;
2644
 
2645
+ if (! $content || $tok !== $end) {
2646
  return false;
2647
  }
2648
 
2649
  // trim the end
2650
+ if ($trimEnd && \is_string(end($content))) {
2651
+ $content[\count($content) - 1] = rtrim(end($content));
2652
  }
2653
 
2654
  $out = [Type::T_STRING, '', $content];
2667
  protected function interpolation(&$out, $lookWhite = true)
2668
  {
2669
  $oldWhite = $this->eatWhiteDefault;
2670
+ $allowVars = $this->allowVars;
2671
+ $this->allowVars = true;
2672
  $this->eatWhiteDefault = true;
2673
 
2674
  $s = $this->count;
2688
  }
2689
 
2690
  $this->eatWhiteDefault = $oldWhite;
2691
+ $this->allowVars = $allowVars;
2692
 
2693
  if ($this->eatWhiteDefault) {
2694
  $this->whitespace();
2700
  $this->seek($s);
2701
 
2702
  $this->eatWhiteDefault = $oldWhite;
2703
+ $this->allowVars = $allowVars;
2704
 
2705
  return false;
2706
  }
2746
  }
2747
 
2748
  // match comment hack
2749
+ if (preg_match(static::$whitePattern, $this->buffer, $m, null, $this->count)) {
 
 
 
 
 
 
2750
  if (! empty($m[0])) {
2751
  $parts[] = $m[0];
2752
+ $this->count += \strlen($m[0]);
2753
  }
2754
  }
2755
 
2760
  return true;
2761
  }
2762
 
2763
+ /**
2764
+ * Parse custom property name (as an array of parts or a string)
2765
+ *
2766
+ * @param array $out
2767
+ *
2768
+ * @return boolean
2769
+ */
2770
+ protected function customProperty(&$out)
2771
+ {
2772
+ $s = $this->count;
2773
+
2774
+ if (! $this->literal('--', 2, false)) {
2775
+ return false;
2776
+ }
2777
+
2778
+ $parts = ['--'];
2779
+
2780
+ $oldWhite = $this->eatWhiteDefault;
2781
+ $this->eatWhiteDefault = false;
2782
+
2783
+ for (;;) {
2784
+ if ($this->interpolation($inter)) {
2785
+ $parts[] = $inter;
2786
+ continue;
2787
+ }
2788
+
2789
+ if ($this->variable($var)) {
2790
+ $parts[] = $var;
2791
+ continue;
2792
+ }
2793
+
2794
+ if ($this->keyword($text)) {
2795
+ $parts[] = $text;
2796
+ continue;
2797
+ }
2798
+
2799
+ break;
2800
+ }
2801
+
2802
+ $this->eatWhiteDefault = $oldWhite;
2803
+
2804
+ if (\count($parts) == 1) {
2805
+ $this->seek($s);
2806
+
2807
+ return false;
2808
+ }
2809
+
2810
+ $this->whitespace(); // get any extra whitespace
2811
+
2812
+ $out = [Type::T_STRING, '', $parts];
2813
+
2814
+ return true;
2815
+ }
2816
+
2817
  /**
2818
  * Parse comma separated selector list
2819
  *
2866
  $s = $this->count;
2867
 
2868
  if ($this->match('[>+~]+', $m, true)) {
2869
+ if ($subSelector && \is_string($subSelector) && strpos($subSelector, 'nth-') === 0 &&
2870
  $m[0] === '+' && $this->match("(\d+|n\b)", $counter)
2871
  ) {
2872
  $this->seek($s);
3012
  $nameParts === ['nth-of-type'] || $nameParts == ['nth-last-of-type']
3013
  ) {
3014
  if ($this->matchChar('(', true) &&
3015
+ ($this->selectors($subs, reset($nameParts)) || true) &&
3016
+ $this->matchChar(')')
3017
  ) {
3018
  $parts[] = '(';
3019
 
3023
  $parts[] = $p;
3024
  }
3025
 
3026
+ if (\count($sub) && reset($sub)) {
3027
  $parts[] = ' ';
3028
  }
3029
  }
3030
 
3031
+ if (\count($subs) && reset($subs)) {
3032
  $parts[] = ', ';
3033
  }
3034
  }
3039
  }
3040
  } else {
3041
  if ($this->matchChar('(') &&
3042
+ ($this->openString(')', $str, '(') || true) &&
3043
+ $this->matchChar(')')
3044
  ) {
3045
  $parts[] = '(';
3046
 
3061
  $this->seek($s);
3062
 
3063
  // 2n+1
3064
+ if ($subSelector && \is_string($subSelector) && strpos($subSelector, 'nth-') === 0) {
3065
  if ($this->match("(\s*(\+\s*|\-\s*)?(\d+|n|\d+n))+", $counter)) {
3066
  $parts[] = $counter[0];
3067
  //$parts[] = str_replace(' ', '', $counter[0]);
3126
  $s = $this->count;
3127
 
3128
  if ($this->matchChar('$', false) && $this->keyword($name)) {
3129
+ if ($this->allowVars) {
3130
+ $out = [Type::T_VARIABLE, $name];
3131
+ } else {
3132
+ $out = [Type::T_KEYWORD, '$' . $name];
3133
+ }
3134
 
3135
  return true;
3136
  }
3177
  {
3178
  $s = $this->count;
3179
 
3180
+ if ($this->keyword($word, $eatWhitespace) && (\ord($word[0]) > 57 || \ord($word[0]) < 48)) {
3181
  return true;
3182
  }
3183
 
3242
  return true;
3243
  }
3244
 
3245
+ if ($this->count === \strlen($this->buffer) || $this->buffer[$this->count] === '}') {
3246
  // if there is end of file or a closing block next then we don't need a ;
3247
  return true;
3248
  }
3261
  {
3262
  $flags = [];
3263
 
3264
+ for ($token = &$value; $token[0] === Type::T_LIST && ($s = \count($token[2])); $token = &$lastNode) {
3265
  $lastNode = &$token[2][$s - 1];
3266
 
3267
+ while ($lastNode[0] === Type::T_KEYWORD && \in_array($lastNode[1], ['!default', '!global'])) {
3268
  array_pop($token[2]);
3269
 
3270
  $node = end($token[2]);
3291
  $part = end($selector);
3292
 
3293
  if ($part === ['!optional']) {
3294
+ array_pop($selectors[\count($selectors) - 1]);
3295
 
3296
  $optional = true;
3297
  }
3308
  */
3309
  protected function flattenList($value)
3310
  {
3311
+ if ($value[0] === Type::T_LIST && \count($value[2]) === 1) {
3312
  return $this->flattenList($value[2][0]);
3313
  }
3314
 
3315
  return $value;
3316
  }
3317
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3318
  /**
3319
  * Quote regular expression
3320
  *
3342
  $prev = $pos + 1;
3343
  }
3344
 
3345
+ $this->sourcePositions[] = \strlen($buffer);
3346
 
3347
  if (substr($buffer, -1) !== "\n") {
3348
+ $this->sourcePositions[] = \strlen($buffer) + 1;
3349
  }
3350
  }
3351
 
3359
  private function getSourcePosition($pos)
3360
  {
3361
  $low = 0;
3362
+ $high = \count($this->sourcePositions);
3363
 
3364
  while ($low < $high) {
3365
  $mid = (int) (($high + $low) / 2);
3385
  */
3386
  private function saveEncoding()
3387
  {
3388
+ if (\extension_loaded('mbstring')) {
 
 
 
 
 
 
 
3389
  $this->encoding = mb_internal_encoding();
3390
 
3391
  mb_internal_encoding('iso-8859-1');
3397
  */
3398
  private function restoreEncoding()
3399
  {
3400
+ if (\extension_loaded('mbstring') && $this->encoding) {
3401
  mb_internal_encoding($this->encoding);
3402
  }
3403
  }
assets/libraries/scssphp/src/SourceMap/Base64VLQ.php CHANGED
@@ -61,7 +61,9 @@ class Base64VLQ
61
 
62
  do {
63
  $digit = $vlq & self::VLQ_BASE_MASK;
64
- $vlq >>= self::VLQ_BASE_SHIFT;
 
 
65
 
66
  if ($vlq > 0) {
67
  $digit |= self::VLQ_CONTINUATION_BIT;
@@ -130,7 +132,9 @@ class Base64VLQ
130
  private static function fromVLQSigned($value)
131
  {
132
  $negate = ($value & 1) === 1;
133
- $value = ($value >> 1) & ~(1<<(8 * PHP_INT_SIZE - 1)); // unsigned right shift
 
 
134
 
135
  if (! $negate) {
136
  return $value;
61
 
62
  do {
63
  $digit = $vlq & self::VLQ_BASE_MASK;
64
+
65
+ //$vlq >>>= self::VLQ_BASE_SHIFT; // unsigned right shift
66
+ $vlq = (($vlq >> 1) & PHP_INT_MAX) >> (self::VLQ_BASE_SHIFT - 1);
67
 
68
  if ($vlq > 0) {
69
  $digit |= self::VLQ_CONTINUATION_BIT;
132
  private static function fromVLQSigned($value)
133
  {
134
  $negate = ($value & 1) === 1;
135
+
136
+ //$value >>>= 1; // unsigned right shift
137
+ $value = ($value >> 1) & PHP_INT_MAX;
138
 
139
  if (! $negate) {
140
  return $value;
assets/libraries/scssphp/src/SourceMap/SourceMapGenerator.php CHANGED
@@ -132,7 +132,7 @@ class SourceMapGenerator
132
  public function saveMap($content)
133
  {
134
  $file = $this->options['sourceMapWriteTo'];
135
- $dir = dirname($file);
136
 
137
  // directory does not exist
138
  if (! is_dir($dir)) {
@@ -201,7 +201,7 @@ class SourceMapGenerator
201
  }
202
 
203
  // less.js compat fixes
204
- if (count($sourceMap['sources']) && empty($sourceMap['sourceRoot'])) {
205
  unset($sourceMap['sourceRoot']);
206
  }
207
 
@@ -235,7 +235,7 @@ class SourceMapGenerator
235
  */
236
  public function generateMappings()
237
  {
238
- if (! count($this->mappings)) {
239
  return '';
240
  }
241
 
@@ -249,6 +249,7 @@ class SourceMapGenerator
249
  }
250
 
251
  ksort($groupedMap);
 
252
  $lastGeneratedLine = $lastOriginalIndex = $lastOriginalLine = $lastOriginalColumn = 0;
253
 
254
  foreach ($groupedMap as $lineNumber => $lineMap) {
@@ -313,8 +314,8 @@ class SourceMapGenerator
313
  $basePath = $this->options['sourceMapBasepath'];
314
 
315
  // "Trim" the 'sourceMapBasepath' from the output filename.
316
- if (strlen($basePath) && strpos($filename, $basePath) === 0) {
317
- $filename = substr($filename, strlen($basePath));
318
  }
319
 
320
  // Remove extra leading path separators.
132
  public function saveMap($content)
133
  {
134
  $file = $this->options['sourceMapWriteTo'];
135
+ $dir = \dirname($file);
136
 
137
  // directory does not exist
138
  if (! is_dir($dir)) {
201
  }
202
 
203
  // less.js compat fixes
204
+ if (\count($sourceMap['sources']) && empty($sourceMap['sourceRoot'])) {
205
  unset($sourceMap['sourceRoot']);
206
  }
207
 
235
  */
236
  public function generateMappings()
237
  {
238
+ if (! \count($this->mappings)) {
239
  return '';
240
  }
241
 
249
  }
250
 
251
  ksort($groupedMap);
252
+
253
  $lastGeneratedLine = $lastOriginalIndex = $lastOriginalLine = $lastOriginalColumn = 0;
254
 
255
  foreach ($groupedMap as $lineNumber => $lineMap) {
314
  $basePath = $this->options['sourceMapBasepath'];
315
 
316
  // "Trim" the 'sourceMapBasepath' from the output filename.
317
+ if (\strlen($basePath) && strpos($filename, $basePath) === 0) {
318
+ $filename = substr($filename, \strlen($basePath));
319
  }
320
 
321
  // Remove extra leading path separators.
assets/libraries/scssphp/src/Type.php CHANGED
@@ -27,6 +27,7 @@ class Type
27
  const T_COMMENT = 'comment';
28
  const T_CONTINUE = 'continue';
29
  const T_CONTROL = 'control';
 
30
  const T_DEBUG = 'debug';
31
  const T_DIRECTIVE = 'directive';
32
  const T_EACH = 'each';
27
  const T_COMMENT = 'comment';
28
  const T_CONTINUE = 'continue';
29
  const T_CONTROL = 'control';
30
+ const T_CUSTOM_PROPERTY = 'custom';
31
  const T_DEBUG = 'debug';
32
  const T_DIRECTIVE = 'directive';
33
  const T_EACH = 'each';
assets/libraries/scssphp/src/Version.php CHANGED
@@ -18,5 +18,5 @@ namespace ScssPhp\ScssPhp;
18
  */
19
  class Version
20
  {
21
- const VERSION = 'v1.0.7';
22
  }
18
  */
19
  class Version
20
  {
21
+ const VERSION = '1.1.1';
22
  }
assets/scss/_editor.scss CHANGED
@@ -172,7 +172,7 @@
172
 
173
 
174
  .option-container > .inside, .block_sidebar > .inside {
175
- padding: 10px 15px 10px 15px;
176
  border-top: solid 1px #cccccc;
177
  background-color: #ffffff;
178
 
@@ -283,8 +283,6 @@
283
 
284
  }
285
 
286
-
287
-
288
  .mb-message.shortcode {
289
  h4 {
290
  font-size: 16px;
@@ -469,90 +467,67 @@
469
  &.preview-border-box > * {
470
  box-sizing: border-box;
471
  }
472
- }
473
- } // output
474
-
475
-
476
-
477
-
478
- /* Conditionals */
479
- .conditional-option { display: none; }
480
-
481
- /* Media queries interface */
482
-
483
- select[name='new_query']
484
- {
485
- width: auto;
486
- }
487
-
488
- .media_query {
489
-
490
- width: 640px;
491
- margin: 0 20px 15px 0;
492
- border: 1px solid #ccc;
493
- padding: 10px 15px;
494
- display: inline-block;
495
- clear: both;
 
 
 
 
 
496
 
497
- position: relative;
498
 
499
- .removebutton {
500
- position: absolute;
501
- right: 10px;
502
- top: 10px;
503
- cursor: pointer;
504
- z-index: 100; // prevent label overlap;
505
- padding: 10px 5px; // easier click
 
 
 
 
 
 
 
 
 
 
 
 
 
506
 
507
- }
508
- input:after {
509
- clear: both;
510
- }
511
- .label {
512
- clear: both;
513
- margin-bottom: 15px;
514
- }
515
- label.title {
516
- padding: 0;
517
- font-size: 20px;
518
- }
519
- .custom .label, .custom .input {
520
- //float: left;
521
- }
522
- .custom.hidden { display: none; }
523
- .option.custom label:nth-of-type(2)
524
- {
525
- margin-left: 95px;
526
- }
527
- .description {
528
- padding: 15px 0px;
529
- text-align: left;
530
- //min-height: 45px;
531
- }
532
- select { width: 60px; }
533
- .input input {
534
- //min-height: 22px;
535
- //min-width:40px;
536
- margin-top: 0px;
537
- //height: 28px;
538
- padding-top: 2px;
539
  }
540
 
541
- } // media_query
542
 
543
- .option-container .media_query label {
544
- //display: block;
545
- //font-size:16px;
546
- //text-align: center;
547
- // cursor: default;
548
- }
549
 
550
- .media_queries_options .new-query {
551
- margin-top: 25px;
552
- select {
553
- width: auto;
554
- }
555
- }
556
 
557
 
558
  .media_option_prot, #media_desc {
@@ -597,3 +572,139 @@ select[name='new_query']
597
  margin-right: 10px;
598
  }
599
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
 
173
 
174
  .option-container > .inside, .block_sidebar > .inside {
175
+ padding: 10px 55px 10px 15px; // 55px is to make space for sidebars in PRO
176
  border-top: solid 1px #cccccc;
177
  background-color: #ffffff;
178
 
283
 
284
  }
285
 
 
 
286
  .mb-message.shortcode {
287
  h4 {
288
  font-size: 16px;
467
  &.preview-border-box > * {
468
  box-sizing: border-box;
469
  }
470
+ .border_wrapper
471
+ {
472
+ position: relative;
473
+ display: inline-block;
474
+ margin: 15px;
475
+ .preview_border_height
476
+ {
477
+ // margin-right: 8px;
478
+ position:absolute;
479
+ height: 100%;
480
+ width: 3px;
481
+ border-left: 1px dashed #000;
482
+ border-top: 1px dashed #000;
483
+ // border-bottom: 1px dashed #000;
484
+ ///transform: rotate(90deg);
485
+ span
486
+ {
487
+ //transform: rotate(90deg);
488
+ right: 30px;
489
+ transform: rotate(-90deg);
490
+ transform-origin: 100% 0;
491
+ position: absolute;
492
+ line-height: 30px;
493
+ display: block;
494
+ text-align: center;
495
+ // position: absolute;
496
+ // margin-right: 8px;
497
+ // top: 20px;
498
+ //left: -4px;
499
 
500
+ }
501
 
502
+ }
503
+ .preview_border_width
504
+ {
505
+ margin-top: 5px;
506
+ border-bottom: 1px dashed #000;
507
+ border-left: 1px dashed #000;
508
+ border-right: 1px dashed #000;
509
+ position: absolute;
510
+ height: 3px;
511
+ width: 100%;
512
+ text-align: center;
513
+ span
514
+ {
515
+ background: #fff;
516
+ }
517
+ }
518
+ .maxbutton-preview
519
+ {
520
+ margin-left: 25px;
521
+ }
522
 
523
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  }
525
 
526
+ } // output - preview window
527
 
 
 
 
 
 
 
528
 
529
+ /* Conditionals */
530
+ .conditional-option { display: none; }
 
 
 
 
531
 
532
 
533
  .media_option_prot, #media_desc {
572
  margin-right: 10px;
573
  }
574
  }
575
+
576
+ // general button save
577
+ .button-save
578
+ {
579
+ transition: all 400ms linear;
580
+ }
581
+
582
+ // button editor.
583
+ .editor
584
+ {
585
+ min-width: 850px;
586
+
587
+ .screen-option-wrapper
588
+ {
589
+ display: flex;
590
+
591
+ .screen-option
592
+ {
593
+ margin: 4px 0;
594
+ display: flex;
595
+ align-items: center;
596
+ padding: 8px 12px;
597
+ margin-right: 4px;
598
+ //font-size: 14px;
599
+ line-height: 20px;
600
+ // height: 26px;
601
+ // width: 100px;
602
+ border: 1px solid #ccc;
603
+ // background: #e5e5e5;
604
+ cursor: pointer;
605
+ text-shadow: -1px 0 1px #ccc;
606
+ box-shadow: 0 1px 0 #aaa;
607
+ min-height: 75px;
608
+ vertical-align: bottom;
609
+ box-sizing: border-box;
610
+
611
+ .screen_name
612
+ {
613
+ font-size: 14px;
614
+ }
615
+ .screen_size
616
+ {
617
+ font-size: 10px;
618
+ display: block;
619
+ text-align: center;
620
+ }
621
+ /* span
622
+ {
623
+ margin-right: 8px;
624
+ } */
625
+ &.option-active
626
+ {
627
+ background: #fff;
628
+ // border-color: #fff;
629
+
630
+ box-shadow: 1px 1px 1px #2A0043;
631
+ .screen_name
632
+ {
633
+ font-weight: bold;
634
+ }
635
+
636
+ }
637
+ &.button-save
638
+ {
639
+ text-decoration: none;
640
+ float: right;
641
+ border-radius: 4px;
642
+ padding: 8px 26px;
643
+ text-transform: uppercase;
644
+
645
+ a
646
+ {
647
+ margin: 0;
648
+ border: 0;
649
+ letter-spacing: 1.1px;
650
+ font-size: 14px;
651
+
652
+ }
653
+ }
654
+ } // screen option
655
+ a.screen-option
656
+ {
657
+ margin-left: auto;
658
+ margin-right: 0;
659
+ }
660
+ } // screen option wrapper
661
+ .mbscreen-editor
662
+ {
663
+ display: none;
664
+ &.current-screen
665
+ {
666
+ display: block;
667
+ }
668
+ .fieldmap { display: none; }
669
+ }
670
+ } // editor
671
+
672
+ /** Upgrade window for responsive */
673
+ .mb_tab.option-container.upgrade
674
+ {
675
+ .removed-note
676
+ {
677
+ color: #ff0000;
678
+ font-weight: 600;
679
+ text-align:center;
680
+ font-size: 14px;
681
+ display:none;
682
+ }
683
+ ul {
684
+ list-style-type: disc;
685
+ margin: 25px 15px;
686
+
687
+ li { font-size: 14px; }
688
+ }
689
+
690
+ .button-row
691
+ {
692
+ margin-bottom: 8px;
693
+ .button
694
+ {
695
+ padding: 8px;
696
+ width: 180px;
697
+ text-align: center;
698
+
699
+ &.buynow {
700
+ font-size: 20px;
701
+ }
702
+ &.features
703
+ {
704
+ padding: 6px 8px;
705
+ }
706
+ }
707
+ }
708
+
709
+
710
+ }
assets/scss/_elements.scss CHANGED
@@ -1,7 +1,7 @@
1
 
2
  /* Here be elements for the editors.Standardized somehow */
3
  select {
4
- width: 150px;
5
  &.small { width: auto; } // small as can be.
6
  }
7
 
@@ -107,23 +107,28 @@ textarea {
107
  }
108
  // .input { float: left; }
109
  }
110
- &.font .checkbox {
111
  margin-right: 2px;
112
  }
113
 
114
- &.font .radio { margin-right: 0; }
115
- &.font .input.font { margin-right: 2px; }
116
 
117
- &.font .input.font_size {
118
  margin-right: 0;
119
  &:after {
120
  display: block;
121
  }
122
  }
 
 
 
 
 
123
 
124
  @include bp(780)
125
  {
126
- &.font {
127
  display: inline-block;
128
  &:after {
129
  clear: both;
@@ -133,7 +138,7 @@ textarea {
133
  }
134
  }
135
 
136
- &.font .control-group.font_weight {
137
  margin-left: 12px;
138
  @include bp(780)
139
  {
@@ -143,7 +148,7 @@ textarea {
143
  margin-top: 10px;
144
  }
145
  }
146
- &.font .control-group.text_align {
147
  margin-left: 18px;
148
  @include bp(780)
149
  {
@@ -188,7 +193,7 @@ textarea {
188
  .dashicons { font-size: 35px; height: 35px; width: 35px; color:#ccc; }
189
  .top .dashicons { margin-top: -5px; }
190
  .bottom .dashicons { margin-top: 5px; }
191
- #radius_toggle {
192
  position: absolute;
193
  left:46%;
194
  top:25px;
@@ -202,7 +207,11 @@ textarea {
202
  margin-left: 58px;
203
  }
204
 
205
-
 
 
 
 
206
  } // end
207
 
208
  .default {
@@ -311,6 +320,7 @@ textarea {
311
  */
312
  }
313
 
 
314
  .switch_button
315
  {
316
  margin-left: -5px;
@@ -382,6 +392,7 @@ textarea {
382
  width: 30px;
383
  border: 0;
384
  position: relative;
 
385
  //
386
  &:before
387
  {
1
 
2
  /* Here be elements for the editors.Standardized somehow */
3
  select {
4
+ min-width: 150px;
5
  &.small { width: auto; } // small as can be.
6
  }
7
 
107
  }
108
  // .input { float: left; }
109
  }
110
+ &[class$="font"] .checkbox {
111
  margin-right: 2px;
112
  }
113
 
114
+ &[class$="font"] .radio { margin-right: 0; }
115
+ &[class$="font"] [class$="font"].input { margin-right: 2px; }
116
 
117
+ &[class$="font"] [class$="font_size"].input {
118
  margin-right: 0;
119
  &:after {
120
  display: block;
121
  }
122
  }
123
+ &.size_unit_spacer
124
+ {
125
+ .control-group { margin-right: 30px; }
126
+ .unit-spacer { width: 115px; }
127
+ }
128
 
129
  @include bp(780)
130
  {
131
+ &[class$="font"] {
132
  display: inline-block;
133
  &:after {
134
  clear: both;
138
  }
139
  }
140
 
141
+ &[class$="font"] span[class$="font_weight"].control-group {
142
  margin-left: 12px;
143
  @include bp(780)
144
  {
148
  margin-top: 10px;
149
  }
150
  }
151
+ &[class$="font"] [class$="text_align"].control-group {
152
  margin-left: 18px;
153
  @include bp(780)
154
  {
193
  .dashicons { font-size: 35px; height: 35px; width: 35px; color:#ccc; }
194
  .top .dashicons { margin-top: -5px; }
195
  .bottom .dashicons { margin-top: 5px; }
196
+ [id$="radius_toggle"] {
197
  position: absolute;
198
  left:46%;
199
  top:25px;
207
  margin-left: 58px;
208
  }
209
 
210
+ // responsive buttons
211
+ .input[class$="remove_screen"], .input[class$="new_add_screen"]
212
+ {
213
+ margin-left: 150px;
214
+ }
215
  } // end
216
 
217
  .default {
320
  */
321
  }
322
 
323
+
324
  .switch_button
325
  {
326
  margin-left: -5px;
392
  width: 30px;
393
  border: 0;
394
  position: relative;
395
+ background: unset;
396
  //
397
  &:before
398
  {
assets/scss/_mixins.scss CHANGED
@@ -1,13 +1,20 @@
1
- @mixin linear-gradient($start:#000,$end:#000,$stop:45%,$important:null)
2
  {
 
 
3
  background: $start $important;
4
  -pie-background: linear-gradient($start $stop, $end) $important;
5
  background: -webkit-gradient(linear, left top, left bottom, color-stop($stop, $start),
6
  color-stop(1, $end)) $important;
7
  background: -moz-linear-gradient($start $stop, $end) $important;
8
  background: -o-linear-gradient($start $stop, $end) $important;
9
- background: linear-gradient( $start $stop, $end) $important;
10
 
 
 
 
 
 
 
11
  //filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#{$start}', endColorStr='#{$end}');
12
  }
13
 
1
+ @mixin linear-gradient($start:#000,$end:#000,$stop:45%,$important: null, $background:false)
2
  {
3
+
4
+
5
  background: $start $important;
6
  -pie-background: linear-gradient($start $stop, $end) $important;
7
  background: -webkit-gradient(linear, left top, left bottom, color-stop($stop, $start),
8
  color-stop(1, $end)) $important;
9
  background: -moz-linear-gradient($start $stop, $end) $important;
10
  background: -o-linear-gradient($start $stop, $end) $important;
 
11
 
12
+
13
+ @if $background {
14
+ background: $background, linear-gradient( $start $stop, $end) $important;
15
+ } @else {
16
+ background: linear-gradient( $start $stop, $end) $important;
17
+ }
18
  //filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#{$start}', endColorStr='#{$end}');
19
  }
20
 
assets/scss/_overview.scss CHANGED
@@ -43,8 +43,8 @@
43
  overflow: hidden;
44
  }
45
  .actions {
46
- //margin: 10px 15px 10px 0;
47
- margin: 10px 0;
48
  padding: 10px 0px 10px 8px;
49
  display: inline-block;
50
  z-index: 11;
@@ -53,6 +53,10 @@
53
  background-color: #fff;
54
  position: relative;
55
  }
 
 
 
 
56
  }
57
 
58
 
@@ -72,7 +76,13 @@
72
  width:70%;
73
  margin-right:5%;
74
  }
 
 
 
 
 
75
  }
 
76
  .col_name {
77
  width: 15%;
78
  @include bp(780)
@@ -201,4 +211,11 @@ p.status
201
  margin-left: 25px;
202
  }
203
 
 
 
 
 
 
 
 
204
  }
43
  overflow: hidden;
44
  }
45
  .actions {
46
+
47
+ margin: 5px 0;
48
  padding: 10px 0px 10px 8px;
49
  display: inline-block;
50
  z-index: 11;
53
  background-color: #fff;
54
  position: relative;
55
  }
56
+ &:hover .actions
57
+ {
58
+ opacity: 1;
59
+ }
60
  }
61
 
62
 
76
  width:70%;
77
  margin-right:5%;
78
  }
79
+ .actions {
80
+ opacity: 0;
81
+ transition: all 400ms linear;
82
+ }
83
+
84
  }
85
+
86
  .col_name {
87
  width: 15%;
88
  @include bp(780)
211
  margin-left: 25px;
212
  }
213
 
214
+ .organize
215
+ {
216
+ padding: 16px;
217
+ max-width: 450px;
218
+ border: 1px solid #ccc;
219
+ }
220
+
221
  }
assets/scss/_subtabs.scss CHANGED
@@ -8,66 +8,50 @@ h2.tabs {
8
  h2.sub-tabs, h2.submit-tab {
9
  list-style: none;
10
  //display: inline-block;
11
- clear: both;
12
  margin-bottom: 0;
13
-
14
  a {
15
- // float: left;
16
- //margin: 0 5px 0 0;
17
- //padding: 10px 20px 10px 10px;
18
- //background-color: #fff;
19
- //min-width: 70px;
20
- // cursor: pointer;
21
- // border: 1px solid #ccc;
22
- // text-align: center;
23
  font-weight: 400;
24
  font-size: 14px;
25
  cursor: pointer;
26
- // height: 20px;
27
- // border-bottom: 0;
28
  &.active {
29
- //background-color: #e5e5e5;
30
- //color: #fff;
31
  }
32
  .dashicons { margin-right: 10px; line-height: 24px; }
33
  }
34
- .save-indicator {
35
 
36
- float:right;
37
  font-size: 25px;
38
  display: none;
39
  margin-right: 10px;
40
  &.dashicons-warning
41
  {
42
- color: #ff0000;
43
  }
44
  &.dashicons-yes
45
  {
46
- color: #00ff00;
47
  }
48
  }
49
 
50
 
51
  }
52
-
53
 
54
- &.mb_tabs_active .mb_tab {
55
- //border-top: 1px solid #000;
56
- //margin-top: -4px;
57
  border: 0px;
58
- background: none;
59
-
60
  @include border-radius(0,0,0,0);
61
-
62
- > .title:nth-of-type(1) {
63
  @extend .button-bar;
64
- button { top: 0; }
65
  .right { float: right; }
66
- }
67
  > .inside {
68
  border: 1px solid #e5e5e5;
69
  }
70
  }
71
-
72
-
73
-
8
  h2.sub-tabs, h2.submit-tab {
9
  list-style: none;
10
  //display: inline-block;
11
+ clear: both;
12
  margin-bottom: 0;
13
+
14
  a {
 
 
 
 
 
 
 
 
15
  font-weight: 400;
16
  font-size: 14px;
17
  cursor: pointer;
18
+
 
19
  &.active {
20
+
 
21
  }
22
  .dashicons { margin-right: 10px; line-height: 24px; }
23
  }
24
+ .save-indicator {
25
 
26
+ float:right;
27
  font-size: 25px;
28
  display: none;
29
  margin-right: 10px;
30
  &.dashicons-warning
31
  {
32
+ color: #ff0000;
33
  }
34
  &.dashicons-yes
35
  {
36
+ color: #00ff00;
37
  }
38
  }
39
 
40
 
41
  }
 
42
 
43
+ &.mb_tabs_active .mb_tab {
 
 
44
  border: 0px;
45
+ background: none;
46
+
47
  @include border-radius(0,0,0,0);
48
+
49
+ > .title:nth-of-type(1) {
50
  @extend .button-bar;
51
+ button { top: 0; }
52
  .right { float: right; }
53
+ }
54
  > .inside {
55
  border: 1px solid #e5e5e5;
56
  }
57
  }
 
 
 
blocks/advanced.php CHANGED
@@ -8,6 +8,7 @@ $blockOrder[80][] = "advanced";
8
  class advancedBlock extends maxBlock
9
  {
10
  protected $blockname = "advanced";
 
11
  protected $fields = array("important_css" => array("default" => "0"),
12
  "custom_rel" => array('default' => ''),
13
  "extra_classes" => array('default' => ''),
@@ -24,10 +25,10 @@ class advancedBlock extends maxBlock
24
  //add_filter('mb-css-blocks', array($this, 'preview_external_css'), 100 )
25
  }
26
 
27
- public function parse_css($css, $mode = 'normal')
28
  {
29
- $css = parent::parse_css($css);
30
- $data = $this->data[$this->blockname];
31
 
32
  if (isset($data["important_css"]) && $data["important_css"] == 1)
33
  {
@@ -39,7 +40,7 @@ class advancedBlock extends maxBlock
39
 
40
  public function parse_css_advanced($css, $mode)
41
  {
42
- $data = $this->data[$this->blockname];
43
 
44
  if (isset($data["external_css"]) && $data["external_css"] == 1 && $mode == 'normal')
45
  {
@@ -55,10 +56,9 @@ class advancedBlock extends maxBlock
55
  public function parse_button($domObj, $mode = 'normal')
56
  {
57
 
58
- $data = $this->data[$this->blockname];
59
 
60
  $button_id = $this->data["id"];
61
-
62
  $anchor = $domObj->find("a",0);
63
 
64
  if (isset($data["custom_rel"]) && trim($data["custom_rel"]) != '')
@@ -84,7 +84,7 @@ class advancedBlock extends maxBlock
84
 
85
  public function post_parse_button($domObj, $mode = 'normal')
86
  {
87
- $data = $this->data[$this->blockname];
88
  $button_id = $this->data["id"];
89
  $anchor = $domObj->find("a",0);
90
 
@@ -98,15 +98,14 @@ class advancedBlock extends maxBlock
98
  }
99
 
100
 
101
- public function admin_fields()
102
  {
103
- $data = $this->data[$this->blockname];
104
- $admin = MB()->getClass('admin');
105
 
106
  $start_block = new maxField('block_start');
107
  $start_block->name = __('advanced', 'maxbuttons');
108
  $start_block->label = __('Advanced', 'maxbuttons');
109
- $admin->addField($start_block);
110
 
111
  $imp = new maxField('switch');
112
  $imp->note = __('Adding !important to the button styles can help avoid potential conflicts with your theme styles.', 'maxbuttons') ;
@@ -114,32 +113,25 @@ class advancedBlock extends maxBlock
114
  $imp->name = $imp->id;
115
  $imp->value = 1;
116
  $imp->label = __('Use !Important', 'maxbuttons');
117
- $imp->checked = checked(maxBlocks::getValue('important_css'), 1, false);
118
- //$imp->value = maxBlocks::getValue('important_css');
119
- //$imp->output('start','end');
120
-
121
- $admin->addField($imp, 'start', 'end');
122
 
123
  $class = new maxField();
124
  $class->id = 'extra_classes';
125
  $class->name = $class->id;
126
  $class->label = __("Extra classes","maxbuttons");
127
- $class->value = maxBlocks::getValue($class->id);
128
  $class->note = __("Useful for custom code or other plugins who target classes", "maxbuttons");
129
  $class->help = "<p class='shortcode'>Shortcode attribute : extraclass </p> <p>Using attribute will add classes, not replace them </p> ";
130
- //$class->output('start','end');
131
-
132
- $admin->addField($class, 'start', 'end');
133
 
134
  $rel = new maxField();
135
  $rel->id = 'custom_rel';
136
  $rel->name = $rel->id;
137
  $rel->label = __("Custom Rel Tag","maxbuttons");
138
- $rel->value = maxBlocks::getValue($rel->id);
139
  $rel->note = __("Useful when button is targeting lightbox and/or popup plugins that use this method", "maxbuttons");
140
- //$rel->output('start','end');
141
-
142
- $admin->addField($rel, 'start', 'end');
143
 
144
  // do_action('mb-after-advanced');
145
 
@@ -149,14 +141,13 @@ class advancedBlock extends maxBlock
149
  $nocss->id = 'external_css';
150
  $nocss->value = 1;
151
  $nocss->name = $nocss->id;
152
- $nocss->checked = checked(maxBlocks::getValue($nocss->id), 1, false);
153
- //$nocss->output('start','');
154
- $admin->addField($nocss, 'start');
155
 
156
  $nospace = new maxField('spacer');
157
  $nospace->content = __("Warning: This will remove all styling of the buttons!","maxbuttons");
158
  // $nospace->output('','end');
159
- $admin->addField($nospace, '', 'end');
160
 
161
  $viewcss = new maxField('button');
162
  $viewcss->id = 'view_css_modal';
@@ -165,16 +156,11 @@ class advancedBlock extends maxBlock
165
  $viewcss->button_label = __('View CSS', 'maxbuttons');
166
  $viewcss->inputclass = 'maxmodal';
167
  $viewcss->modal = 'view-css';
 
168
 
169
- $admin->addField($viewcss, 'start', 'end');
170
- ?>
171
-
172
-
173
- <?php
174
-
175
- $this->sidebar();
176
  $endblock = new maxField('block_end');
177
- $admin->addField($endblock);
178
 
179
  ?>
180
 
@@ -212,5 +198,3 @@ class advancedBlock extends maxBlock
212
  } // admin_fields
213
 
214
  } // class
215
-
216
- ?>
8
  class advancedBlock extends maxBlock
9
  {
10
  protected $blockname = "advanced";
11
+ protected $is_responsive = false;
12
  protected $fields = array("important_css" => array("default" => "0"),
13
  "custom_rel" => array('default' => ''),
14
  "extra_classes" => array('default' => ''),
25
  //add_filter('mb-css-blocks', array($this, 'preview_external_css'), 100 )
26
  }
27
 
28
+ public function parse_css($css, $mode = 'normal', $screens)
29
  {
30
+ $css = parent::parse_css($css, $mode, $screens);
31
+ $data = $this->getBlockData();
32
 
33
  if (isset($data["important_css"]) && $data["important_css"] == 1)
34
  {
40
 
41
  public function parse_css_advanced($css, $mode)
42
  {
43
+ $data = $this->getBlockData();
44
 
45
  if (isset($data["external_css"]) && $data["external_css"] == 1 && $mode == 'normal')
46
  {
56
  public function parse_button($domObj, $mode = 'normal')
57
  {
58
 
59
+ $data = $this->getBlockData();
60
 
61
  $button_id = $this->data["id"];
 
62
  $anchor = $domObj->find("a",0);
63
 
64
  if (isset($data["custom_rel"]) && trim($data["custom_rel"]) != '')
84
 
85
  public function post_parse_button($domObj, $mode = 'normal')
86
  {
87
+ $data = $this->getBlockData();
88
  $button_id = $this->data["id"];
89
  $anchor = $domObj->find("a",0);
90
 
98
  }
99
 
100
 
101
+ public function admin_fields($screen)
102
  {
103
+ $data = $this->getBlockData();
 
104
 
105
  $start_block = new maxField('block_start');
106
  $start_block->name = __('advanced', 'maxbuttons');
107
  $start_block->label = __('Advanced', 'maxbuttons');
108
+ $screen->addField($start_block);
109
 
110
  $imp = new maxField('switch');
111
  $imp->note = __('Adding !important to the button styles can help avoid potential conflicts with your theme styles.', 'maxbuttons') ;
113
  $imp->name = $imp->id;
114
  $imp->value = 1;
115
  $imp->label = __('Use !Important', 'maxbuttons');
116
+ $imp->checked = checked($screen->getValue('important_css'), 1, false);
117
+ $screen->addField($imp, 'start', 'end');
 
 
 
118
 
119
  $class = new maxField();
120
  $class->id = 'extra_classes';
121
  $class->name = $class->id;
122
  $class->label = __("Extra classes","maxbuttons");
123
+ $class->value = $screen->getValue($class->id);
124
  $class->note = __("Useful for custom code or other plugins who target classes", "maxbuttons");
125
  $class->help = "<p class='shortcode'>Shortcode attribute : extraclass </p> <p>Using attribute will add classes, not replace them </p> ";
126
+ $screen->addField($class, 'start', 'end');
 
 
127
 
128
  $rel = new maxField();
129
  $rel->id = 'custom_rel';
130
  $rel->name = $rel->id;
131
  $rel->label = __("Custom Rel Tag","maxbuttons");
132
+ $rel->value = $screen->getValue($rel->id);
133
  $rel->note = __("Useful when button is targeting lightbox and/or popup plugins that use this method", "maxbuttons");
134
+ $screen->addField($rel, 'start', 'end');
 
 
135
 
136
  // do_action('mb-after-advanced');
137
 
141
  $nocss->id = 'external_css';
142
  $nocss->value = 1;
143
  $nocss->name = $nocss->id;
144
+ $nocss->checked = checked($screen->getValue($nocss->id), 1, false);
145
+ $screen->addField($nocss, 'start');
 
146
 
147
  $nospace = new maxField('spacer');
148
  $nospace->content = __("Warning: This will remove all styling of the buttons!","maxbuttons");
149
  // $nospace->output('','end');
150
+ $screen->addField($nospace, '', 'end');
151
 
152
  $viewcss = new maxField('button');
153
  $viewcss->id = 'view_css_modal';
156
  $viewcss->button_label = __('View CSS', 'maxbuttons');
157
  $viewcss->inputclass = 'maxmodal';
158
  $viewcss->modal = 'view-css';
159
+ $screen->addField($viewcss, 'start', 'end');
160
 
161
+ $this->sidebar($screen);
 
 
 
 
 
 
162
  $endblock = new maxField('block_end');
163
+ $screen->addField($endblock);
164
 
165
  ?>
166
 
198
  } // admin_fields
199
 
200
  } // class
 
 
blocks/basic.php CHANGED
@@ -3,8 +3,7 @@ namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  $blockClass["basic"] = "basicBlock";
6
- $blockOrder[0][] = "basic";
7
-
8
 
9
  class basicBlock extends maxBlock
10
  {
@@ -33,19 +32,21 @@ class basicBlock extends maxBlock
33
  }
34
  }
35
 
36
- public function parse_css($css, $mode = 'normal')
37
  {
38
  // emtpy string init is not like by PHP 7.1
39
  if (! is_array($css))
40
  $css = array();
41
 
42
- $data = $this->data[$this->blockname];
43
 
44
  $css["maxbutton"]["normal"]["position"] = "relative";
45
  $css["maxbutton"]["normal"]["text-decoration"] = "none";
46
  // $css["maxbutton"]["normal"]["white-space"] = "nowrap"; // hinders correct rendering of oneline-multilines
47
  $css["maxbutton"]["normal"]["display"] = "inline-block";
48
  $css["maxbutton"]["normal"]["vertical-align"] = 'middle';
 
 
49
 
50
  // option to show border boxed buttons in preview area.
51
  $border_box = get_option('maxbuttons_borderbox');
@@ -55,19 +56,14 @@ class basicBlock extends maxBlock
55
  $css['maxbutton']['normal']['box-sizing'] = 'border-box';
56
  }
57
 
58
- $css = parent::parse_css($css, $mode);
59
 
60
- /*if (isset($data["url"]) && $data["url"] == '') // don't show clickable anchor if there is no URL.
61
- {
62
- $css["maxbutton"]["normal"]["cursor"] = 'default';
63
- // $css[":hover"]["cursor"] = 'default';
64
- } */
65
 
66
  return $css;
67
 
68
  }
69
 
70
- public function save_fields($data, $post)
71
  {
72
  // Possible solution:
73
  // $post["url"] = isset($post["url"]) ? urldecode(urldecode($post["url"])) : '';
@@ -81,7 +77,7 @@ class basicBlock extends maxBlock
81
  $description = str_replace('-nwline-', "\n", $description);
82
  }
83
 
84
- $data = parent::save_fields($data, $post);
85
 
86
  // bypass sanitize for description - causing the end of line-breaks
87
  if ($description)
@@ -159,7 +155,7 @@ class basicBlock extends maxBlock
159
  public function parse_button($domObj, $mode = 'normal')
160
  {
161
 
162
- $data = $this->data[$this->blockname];
163
  $button_id = $this->data["id"];
164
  $rels = array();
165
 
@@ -257,29 +253,28 @@ class basicBlock extends maxBlock
257
  }
258
  }
259
 
260
- public function admin_fields()
261
  {
262
 
263
  $icon_url = MB()->get_plugin_url() . 'images/icons/';
264
- $admin = MB()->getClass('admin');
265
-
266
 
267
  $start_block = new maxField('block_start');
268
  $start_block->name = __('basic', 'maxbuttons');
269
  $start_block->label = __('Basics', 'maxbuttons');
270
- $admin->addField($start_block);
271
 
272
  $color_copy_self = __("Replace color from other field", "maxbuttons");
273
  $color_copy_move = __("Copy Color to other field", "maxbuttons");
274
 
275
- $check_name = $this->check_unique_name(maxBlocks::getValue('name'));
276
 
277
  // Name
278
  $field_name = new maxField() ;
279
  $field_name->label = __('Button Name', 'maxbuttons');
280
- $field_name->value = maxBlocks::getValue('name');
281
- $field_name->id = 'name';
282
  $field_name->name = $field_name->id;
 
283
  $field_name->placeholder = __("Button Name","maxbuttons");
284
 
285
  if ($check_name)
@@ -287,214 +282,230 @@ class basicBlock extends maxBlock
287
  $field_name->warning = $check_name;
288
  //$field_name->error = $check_name;
289
  }
290
- $admin->addField($field_name, 'start', 'end');
291
 
292
  // URL
293
  $field_url = new maxField();
294
  $field_url->label = __('URL', 'maxbuttons');
295
  // $field_url->note = __('The link when the button is clicked.', 'maxbuttons');
296
- $field_url->value = rawurldecode(maxBlocks::getValue('url') );
297
- $field_url->id = 'url';
298
  $field_url->placeholder = __("http://","maxbuttons");
299
  $field_url->name = $field_url->id;
300
- $field_url->help = "<p>Enter any URL you wish to link to. </p>
 
301
  <p>Examples: <br><ul class='nowrap'><li> https://example.com/ </li>
302
  <li> /local-page/ </li>
303
  <li> javascript:window.history.back(); </li></ul></p>
304
- <p class='shortcode'> Shortcode attribute : url </p> ";
305
- $admin->addField($field_url,'start');
306
 
307
  $url_button = new maxField('button');
308
- $url_button->id = 'url_button';
309
  $url_button->name = $url_button->id;
310
  $url_button->button_label = __('Select Site Content', 'maxbuttons');
311
- $admin->addField($url_button, '', 'end');
 
 
 
 
 
 
 
 
 
 
312
 
313
  $url_nonce = new maxField('hidden');
314
- $url_nonce->id = '_ajax_linking_nonce';
315
  $url_nonce->name = $url_nonce->id;
316
  $url_nonce->value = wp_create_nonce('internal-linking');
 
317
 
318
- $admin->addField($url_nonce);
319
 
320
  // Spacer
321
  $fspacer = new maxField('spacer');
322
  $fspacer->name = 'url_options';
323
  $fspacer->label = '&nbsp;';
324
- $admin->addField($fspacer, 'start');
 
325
 
326
  // New Window
327
  $fwindow = new maxField('checkbox');
328
  $fwindow->label = __('Open in New Window', 'maxbuttons');
329
- $fwindow->name = 'new_window';
330
- $fwindow->id = $fwindow->name;
331
  $fwindow->value = 1;
332
- $fwindow->checked = checked( maxBlocks::getValue('new_window'), 1, false);
333
- $admin->addField($fwindow);
 
334
 
335
  // NoRel
336
  $ffollow = new maxField('checkbox');
337
  $ffollow->label = __('Use rel="nofollow"', 'maxbuttons');
338
  $ffollow->value = 1;
339
- $ffollow->name = 'nofollow';
340
- $ffollow->id = $ffollow->name;
341
- $ffollow->checked = checked( maxBlocks::getValue('nofollow'), 1, false);
342
- $admin->addField($ffollow, '','end');
 
343
  // TITLE
344
 
345
  $field_title = new maxField();
346
  $field_title->label = __('Button Tooltip', 'maxbuttons');
347
- $field_title->name = 'link_title'; // title is too generic
348
- $field_title->id = $field_title->name;
349
- $field_title->value = maxBlocks::getValue('link_title');
 
350
  $field_title->help = __('<p>This text will appear when hovering over the button</p>
351
  <p class="shortcode">Shortcode attribute : linktitle</p>', 'maxbuttons');
352
- $admin->addField($field_title, 'start', 'end');
353
 
354
  // TEXT
355
  $field_text = new maxField();
356
  $field_text->label = __('Text','maxbuttons');
357
- $field_text->name = 'text';
358
- $field_text->id = 'text';
359
- $field_text->value = maxBlocks::getValue('text') ;
360
- $admin->addField($field_text, 'start', 'end');
 
 
361
 
362
  // FONTS
363
  $fonts = MB()->getClass('admin')->loadFonts();
364
 
365
  $field_font = new maxField('option_select');
366
  $field_font->label = __('Font','maxbuttons');
367
- $field_font->name = 'font';
368
- $field_font->id = $field_font->name;
369
- $field_font->selected = maxBlocks::getValue('font');
 
370
  $field_font->options = $fonts;
371
 
372
- $admin->addField($field_font,'start');
373
- ?>
374
 
375
- <?php
376
  // FONT SIZE
377
  //global $maxbuttons_font_sizes;
378
- $sizes = apply_filters('mb/editor/fontsizes', maxUtils::generate_font_sizes(10,50) );
379
-
380
 
381
  $field_size = new maxField('number');
382
- $field_size->name = 'font_size';
383
- $field_size->id= $field_size->name;
384
  $field_size->inputclass = 'tiny';
385
  $field_size->min = 8;
386
  $field_size->after_input = __('px', 'maxbuttons');
387
- $field_size->value = maxUtils::strip_px(maxBlocks::getValue('font_size'));
388
- $admin->addField($field_size);
389
 
390
  // Font style checkboxes
391
  $fweight = new maxField('checkbox');
392
  $fweight->icon = 'dashicons-editor-bold';
393
  $fweight->title = __("Bold",'maxbuttons');
394
- $fweight->id = 'check_fweight';
395
- $fweight->name = 'font_weight';
396
  $fweight->value = 'bold';
397
  $fweight->inputclass = 'check_button icon';
398
- $fweight->checked = checked( maxBlocks::getValue('font_weight'), 'bold', false);
399
- $admin->addField($fweight, 'group_start');
 
400
 
401
  $fstyle = new maxField('checkbox');
402
  $fstyle->icon = 'dashicons-editor-italic';
403
  $fstyle->title = __("Italic",'maxbuttons');
404
- $fstyle->id = 'check_fstyle';
405
- $fstyle->name = 'font_style';
406
  $fstyle->value = 'italic';
407
  $fstyle->inputclass = 'check_button icon';
408
- $fstyle->checked = checked( maxBlocks::getValue('font_style'), 'italic', false);
409
- $admin->addField($fstyle, '', 'group_end');
410
 
411
  $falign_left = new maxField('radio');
412
  $falign_left->icon = 'dashicons-editor-alignleft';
413
  $falign_left->title = __('Align left','maxbuttons');
414
- $falign_left->id = 'radio_talign_left';
415
- $falign_left->name = 'text_align';
416
  $falign_left->value = 'left';
417
  $falign_left->inputclass = 'check_button icon';
418
- $falign_left->checked = checked ( maxblocks::getValue('text_align'), 'left', false);
419
- $admin->addField($falign_left, 'group_start');
420
 
421
  $falign_center = new maxField('radio');
422
  $falign_center->icon = 'dashicons-editor-aligncenter';
423
  $falign_center->title = __('Align center','maxbuttons');
424
- $falign_center->id = 'radio_talign_center';
425
- $falign_center->name = 'text_align';
426
  $falign_center->value = 'center';
427
  $falign_center->inputclass = 'check_button icon';
428
- $falign_center->checked = checked( maxblocks::getValue('text_align'), 'center', false);
429
- $admin->addField($falign_center);
430
 
431
  $falign_right = new maxField('radio');
432
  $falign_right->icon = 'dashicons-editor-alignright';
433
  $falign_right->title = __('Align right','maxbuttons');
434
- $falign_right->id = 'radio_talign_right';
435
- $falign_right->name = 'text_align';
436
  $falign_right->value = 'right';
437
  $falign_right->inputclass = 'check_button icon';
438
- $falign_right->checked = checked( maxblocks::getValue('text_align'), 'right', false);
439
- $admin->addField($falign_right, '', array('group_end','end') );
440
 
441
  // Padding - trouble
442
  $ptop = new maxField('number');
443
  $ptop->label = __('Padding', 'maxbuttons');
444
- $ptop->id = 'padding_top';
445
  $ptop->name = $ptop->id;
446
  $ptop->min = 0;
447
  $ptop->inputclass = 'tiny';
448
  $ptop->before_input = '<img src="' . $icon_url . 'p_top.png" title="' . __("Padding Top","maxbuttons") . '" >';
449
- $ptop->value = maxUtils::strip_px(maxBlocks::getValue('padding_top'));
450
- $admin->addField($ptop,'start');
451
 
452
  $pright = new maxField('number');
453
- $pright->id = 'padding_right';
454
  $pright->name = $pright->id;
455
  $pright->min = 0;
456
  $pright->inputclass = 'tiny';
457
  $pright->before_input = '<img src="' . $icon_url . 'p_right.png" class="icon padding" title="' . __("Padding Right","maxbuttons") . '" >';
458
- $pright->value = maxUtils::strip_px(maxBlocks::getValue('padding_right'));
459
- $admin->addField($pright);
460
 
461
  $pbottom = new maxField('number');
462
- $pbottom->id = 'padding_bottom';
463
  $pbottom->name = $pbottom->id;
464
  $pbottom->min = 0;
465
  $pbottom->inputclass = 'tiny';
466
  $pbottom->before_input = '<img src="' . $icon_url . 'p_bottom.png" class="icon padding" title="' . __("Padding Bottom","maxbuttons") . '" >';
467
- $pbottom->value = maxUtils::strip_px(maxBlocks::getValue('padding_bottom'));
468
- $admin->addField($pbottom);
469
 
470
  $pleft = new maxField('number');
471
- $pleft->id = 'padding_left';
472
  $pleft->name = $pleft->id;
473
  $pleft->min = 0;
474
  $pleft->inputclass = 'tiny';
475
  $pleft->before_input = '<img src="' . $icon_url . 'p_left.png" class="icon padding" title="' . __("Padding Left","maxbuttons") . '" >';
476
- $pleft->value = maxUtils::strip_px(maxBlocks::getValue('padding_left'));
477
- $admin->addField($pleft,'', 'end');
478
-
479
 
480
  // Text Color
481
  $fcolor = new maxField('color');
482
- $fcolor->id = 'text_color';
483
  $fcolor->name = $fcolor->id;
484
- $fcolor->value = maxBlocks::getColorValue('text_color');
485
  $fcolor->label = __('Text Color','maxbuttons');
486
  $fcolor->copycolor = true;
487
- $fcolor->bindto = 'text_color_hover';
488
  $fcolor->copypos = 'right';
489
  $fcolor->right_title = $color_copy_move;
490
  $fcolor->left_title = $color_copy_self;
491
- $admin->addField($fcolor, 'start');
492
 
493
  // Text Color Hover
494
  $fcolor_hover = new maxField('color');
495
- $fcolor_hover->id = 'text_color_hover';
496
  $fcolor_hover->name = $fcolor_hover->id;
497
- $fcolor_hover->value = maxBlocks::getColorValue('text_color_hover');
498
  $fcolor_hover->label = __('Text Color Hover','maxbuttons');
499
  $fcolor_hover->copycolor = true;
500
  $fcolor_hover->bindto = $fcolor->id;
@@ -502,32 +513,91 @@ class basicBlock extends maxBlock
502
  $fcolor_hover->right_title = $color_copy_self;
503
  $fcolor_hover->left_title = $color_copy_move;
504
 
505
- $admin->addField($fcolor_hover, '','end');
 
 
 
 
506
 
507
  // Dimension : width
 
508
  $field_width = new maxField('number');
509
  $field_width->label = __('Button Width','maxbuttons');
510
- $field_width->name = 'button_width';
511
- $field_width->id = $field_width->name;
512
- $field_width->inputclass = 'small';
513
  $field_width->min = 0;
514
- $field_width->after_input = __('px', 'maxbuttons');
515
- $field_width->value= maxUtils::strip_px(maxBlocks::getValue('button_width')); // strippx?
 
516
 
517
- $admin->addField($field_width, 'start');
 
 
518
 
519
  // Dimension : height
520
  $field_height = new maxField('number');
521
  $field_height->label = __('Button Height','maxbuttons');
522
- $field_height->name = 'button_height';
523
  $field_height->id = $field_height->name;
524
  $field_height->inputclass = 'small';
525
  $field_height->min = 0;
526
- $field_height->after_input = __('px', 'maxbuttons');
527
- $field_height->help = __('Width and Height are optional. When set to 0,button size will be determined by text size plus padding', 'maxbuttons');
528
- $field_height->value= maxUtils::strip_px(maxBlocks::getValue('button_height')); // strippx?
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
529
 
530
- $admin->addField($field_height, '', 'end');
531
 
532
  // Description
533
  $description_hide = get_option('maxbuttons_hidedescription');
@@ -537,20 +607,19 @@ class basicBlock extends maxBlock
537
  $field_desc = new maxField('textarea');
538
 
539
  $field_desc->label = __('Description', 'maxbuttons');
540
- $field_desc->name = 'description';
541
- $field_desc->id = $field_desc->name;
542
  $field_desc->esc_function = 'esc_textarea';
543
- $field_desc->value = maxBlocks::getValue('description') ;
 
544
  $field_desc->placeholder = __('Brief explanation about how and where the button is used.','maxbuttons');
545
 
546
- $admin->addField($field_desc, 'start', 'end');
547
 
548
- $this->sidebar();
549
  $endblock = new maxField('block_end');
550
- $admin->addField($endblock);
551
 
552
  } // admin_display
553
 
554
  } // class
555
-
556
- ?>
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
  $blockClass["basic"] = "basicBlock";
6
+ $blockOrder[10][] = "basic";
 
7
 
8
  class basicBlock extends maxBlock
9
  {
32
  }
33
  }
34
 
35
+ public function parse_css($css, $mode = 'normal', $screens)
36
  {
37
  // emtpy string init is not like by PHP 7.1
38
  if (! is_array($css))
39
  $css = array();
40
 
41
+ $data = $this->getBlockData();
42
 
43
  $css["maxbutton"]["normal"]["position"] = "relative";
44
  $css["maxbutton"]["normal"]["text-decoration"] = "none";
45
  // $css["maxbutton"]["normal"]["white-space"] = "nowrap"; // hinders correct rendering of oneline-multilines
46
  $css["maxbutton"]["normal"]["display"] = "inline-block";
47
  $css["maxbutton"]["normal"]["vertical-align"] = 'middle';
48
+ //$css["maxbutton"]["normal"]["overflow"] = "hidden"; // hinder tooltip
49
+
50
 
51
  // option to show border boxed buttons in preview area.
52
  $border_box = get_option('maxbuttons_borderbox');
56
  $css['maxbutton']['normal']['box-sizing'] = 'border-box';
57
  }
58
 
59
+ $css = parent::parse_css($css, $mode, $screens);
60
 
 
 
 
 
 
61
 
62
  return $css;
63
 
64
  }
65
 
66
+ public function save_fields($data, $post, $screens)
67
  {
68
  // Possible solution:
69
  // $post["url"] = isset($post["url"]) ? urldecode(urldecode($post["url"])) : '';
77
  $description = str_replace('-nwline-', "\n", $description);
78
  }
79
 
80
+ $data = parent::save_fields($data, $post, $screens);
81
 
82
  // bypass sanitize for description - causing the end of line-breaks
83
  if ($description)
155
  public function parse_button($domObj, $mode = 'normal')
156
  {
157
 
158
+ $data = $this->getBlockData();
159
  $button_id = $this->data["id"];
160
  $rels = array();
161
 
253
  }
254
  }
255
 
256
+ public function admin_fields($screen)
257
  {
258
 
259
  $icon_url = MB()->get_plugin_url() . 'images/icons/';
 
 
260
 
261
  $start_block = new maxField('block_start');
262
  $start_block->name = __('basic', 'maxbuttons');
263
  $start_block->label = __('Basics', 'maxbuttons');
264
+ $screen->addField($start_block);
265
 
266
  $color_copy_self = __("Replace color from other field", "maxbuttons");
267
  $color_copy_move = __("Copy Color to other field", "maxbuttons");
268
 
269
+ $check_name = $this->check_unique_name($screen->getValue('name'));
270
 
271
  // Name
272
  $field_name = new maxField() ;
273
  $field_name->label = __('Button Name', 'maxbuttons');
274
+ $field_name->id = $screen->getFieldID('name');
275
+ $field_name->value = $screen->getValue($field_name->id);
276
  $field_name->name = $field_name->id;
277
+ $field_name->is_responsive = false;
278
  $field_name->placeholder = __("Button Name","maxbuttons");
279
 
280
  if ($check_name)
282
  $field_name->warning = $check_name;
283
  //$field_name->error = $check_name;
284
  }
285
+ $screen->addField($field_name, 'start', 'end');
286
 
287
  // URL
288
  $field_url = new maxField();
289
  $field_url->label = __('URL', 'maxbuttons');
290
  // $field_url->note = __('The link when the button is clicked.', 'maxbuttons');
291
+ $field_url->id = $screen->getFieldID('url');
292
+ $field_url->value = rawurldecode($screen->getValue($field_url->id) );
293
  $field_url->placeholder = __("http://","maxbuttons");
294
  $field_url->name = $field_url->id;
295
+ $field_url->is_responsive = false;
296
+ $field_url->help = __("<p>Enter any URL you wish to link to. </p>
297
  <p>Examples: <br><ul class='nowrap'><li> https://example.com/ </li>
298
  <li> /local-page/ </li>
299
  <li> javascript:window.history.back(); </li></ul></p>
300
+ <p class='shortcode'> Shortcode attribute : url </p>", 'maxbuttons');
301
+ $screen->addField($field_url,'start');
302
 
303
  $url_button = new maxField('button');
304
+ $url_button->id = $screen->getFieldID('url_button');
305
  $url_button->name = $url_button->id;
306
  $url_button->button_label = __('Select Site Content', 'maxbuttons');
307
+ $url_button->is_responsive = false;
308
+ $screen->addField($url_button, '', 'end');
309
+
310
+ if (isset($_GET['copied']))
311
+ {
312
+ $copyno = new maxField('generic');
313
+ $copyno->label = '&nbsp;';
314
+ $copyno->name = 'prevent-copy-message';
315
+ $copyno->content = "<p>" . __('<strong>Tip: </strong> You don\'t need to copy buttons to change URL or Text. See the examples on top of page') . '</p>';
316
+ $screen->addField($copyno, 'start','end');
317
+ }
318
 
319
  $url_nonce = new maxField('hidden');
320
+ $url_nonce->id = $screen->getFieldID('_ajax_linking_nonce');
321
  $url_nonce->name = $url_nonce->id;
322
  $url_nonce->value = wp_create_nonce('internal-linking');
323
+ $url_nonce->is_responsive = false;
324
 
325
+ $screen->addField($url_nonce);
326
 
327
  // Spacer
328
  $fspacer = new maxField('spacer');
329
  $fspacer->name = 'url_options';
330
  $fspacer->label = '&nbsp;';
331
+ $fspacer->is_responsive = false;
332
+ $screen->addField($fspacer, 'start');
333
 
334
  // New Window
335
  $fwindow = new maxField('checkbox');
336
  $fwindow->label = __('Open in New Window', 'maxbuttons');
337
+ $fwindow->id = $screen->getFieldID('new_window');
338
+ $fwindow->name = $fwindow->id;
339
  $fwindow->value = 1;
340
+ $fwindow->is_responsive = false;
341
+ $fwindow->checked = checked( $screen->getValue($fwindow->id), 1, false);
342
+ $screen->addField($fwindow);
343
 
344
  // NoRel
345
  $ffollow = new maxField('checkbox');
346
  $ffollow->label = __('Use rel="nofollow"', 'maxbuttons');
347
  $ffollow->value = 1;
348
+ $ffollow->id = $screen->getFieldID('nofollow');
349
+ $ffollow->name = $ffollow->id;
350
+ $ffollow->is_responsive = false;
351
+ $ffollow->checked = checked( $screen->getValue($ffollow->id), 1, false);
352
+ $screen->addField($ffollow, '','end');
353
  // TITLE
354
 
355
  $field_title = new maxField();
356
  $field_title->label = __('Button Tooltip', 'maxbuttons');
357
+ $field_title->id = $screen->getFieldID('link_title');
358
+ $field_title->name = $field_title->id; // title is too generic
359
+ $field_title->value = $screen->getValue($field_title->id);
360
+ $field_title->is_responsive = false;
361
  $field_title->help = __('<p>This text will appear when hovering over the button</p>
362
  <p class="shortcode">Shortcode attribute : linktitle</p>', 'maxbuttons');
363
+ $screen->addField($field_title, 'start', 'end');
364
 
365
  // TEXT
366
  $field_text = new maxField();
367
  $field_text->label = __('Text','maxbuttons');
368
+ $field_text->id = $screen->getFieldID('text');
369
+ $field_text->name = $field_text->id;
370
+ $field_text->is_responsive = false;
371
+ $field_text->value = $screen->getValue($field_text->id);
372
+ $field_text->help = __('Shortcode attribute: text');
373
+ $screen->addField($field_text, 'start', 'end');
374
 
375
  // FONTS
376
  $fonts = MB()->getClass('admin')->loadFonts();
377
 
378
  $field_font = new maxField('option_select');
379
  $field_font->label = __('Font','maxbuttons');
380
+
381
+ $field_font->id = $screen->getFieldID('font');
382
+ $field_font->name = $field_font->id;
383
+ $field_font->selected = $screen->getValue($field_font->id);
384
  $field_font->options = $fonts;
385
 
386
+ $screen->addField($field_font,'start');
 
387
 
 
388
  // FONT SIZE
389
  //global $maxbuttons_font_sizes;
390
+ // $sizes = apply_filters('mb/editor/fontsizes', maxUtils::generate_font_sizes(10,50) );
 
391
 
392
  $field_size = new maxField('number');
393
+ $field_size->id= $screen->getFieldID('font_size');
394
+ $field_size->name = $field_size->id;
395
  $field_size->inputclass = 'tiny';
396
  $field_size->min = 8;
397
  $field_size->after_input = __('px', 'maxbuttons');
398
+ $field_size->value = maxUtils::strip_px($screen->getValue($field_size->id));
399
+ $screen->addField($field_size);
400
 
401
  // Font style checkboxes
402
  $fweight = new maxField('checkbox');
403
  $fweight->icon = 'dashicons-editor-bold';
404
  $fweight->title = __("Bold",'maxbuttons');
405
+ $fweight->id = $screen->getFieldID('check_fweight');
406
+ $fweight->name = $screen->getFieldID('font_weight');
407
  $fweight->value = 'bold';
408
  $fweight->inputclass = 'check_button icon';
409
+ $fweight->checked = checked( $screen->getValue($fweight->name), 'bold', false);
410
+
411
+ $screen->addField($fweight, 'group_start');
412
 
413
  $fstyle = new maxField('checkbox');
414
  $fstyle->icon = 'dashicons-editor-italic';
415
  $fstyle->title = __("Italic",'maxbuttons');
416
+ $fstyle->id = $screen->getFieldID('check_fstyle');
417
+ $fstyle->name = $screen->getFieldID('font_style');
418
  $fstyle->value = 'italic';
419
  $fstyle->inputclass = 'check_button icon';
420
+ $fstyle->checked = checked( $screen->getValue($fstyle->name), 'italic', false);
421
+ $screen->addField($fstyle, '', 'group_end');
422
 
423
  $falign_left = new maxField('radio');
424
  $falign_left->icon = 'dashicons-editor-alignleft';
425
  $falign_left->title = __('Align left','maxbuttons');
426
+ $falign_left->id = $screen->getFieldID('radio_talign_left');
427
+ $falign_left->name = $screen->getFieldID('text_align');
428
  $falign_left->value = 'left';
429
  $falign_left->inputclass = 'check_button icon';
430
+ $falign_left->checked = checked ( $screen->getValue($falign_left->name), 'left', false);
431
+ $screen->addField($falign_left, 'group_start');
432
 
433
  $falign_center = new maxField('radio');
434
  $falign_center->icon = 'dashicons-editor-aligncenter';
435
  $falign_center->title = __('Align center','maxbuttons');
436
+ $falign_center->id = $screen->getFieldID('radio_talign_center');
437
+ $falign_center->name = $screen->getFieldID('text_align');
438
  $falign_center->value = 'center';
439
  $falign_center->inputclass = 'check_button icon';
440
+ $falign_center->checked = checked( $screen->getValue($falign_center->name), 'center', false);
441
+ $screen->addField($falign_center);
442
 
443
  $falign_right = new maxField('radio');
444
  $falign_right->icon = 'dashicons-editor-alignright';
445
  $falign_right->title = __('Align right','maxbuttons');
446
+ $falign_right->id = $screen->getFieldID('radio_talign_right');
447
+ $falign_right->name = $screen->getFieldID('text_align');
448
  $falign_right->value = 'right';
449
  $falign_right->inputclass = 'check_button icon';
450
+ $falign_right->checked = checked( $screen->getValue($falign_right->name), 'right', false);
451
+ $screen->addField($falign_right, '', array('group_end','end') );
452
 
453
  // Padding - trouble
454
  $ptop = new maxField('number');
455
  $ptop->label = __('Padding', 'maxbuttons');
456
+ $ptop->id = $screen->getFieldID('padding_top');
457
  $ptop->name = $ptop->id;
458
  $ptop->min = 0;
459
  $ptop->inputclass = 'tiny';
460
  $ptop->before_input = '<img src="' . $icon_url . 'p_top.png" title="' . __("Padding Top","maxbuttons") . '" >';
461
+ $ptop->value = maxUtils::strip_px( $screen->getValue($ptop->id));
462
+ $screen->addField($ptop,'start');
463
 
464
  $pright = new maxField('number');
465
+ $pright->id = $screen->getFieldID('padding_right');
466
  $pright->name = $pright->id;
467
  $pright->min = 0;
468
  $pright->inputclass = 'tiny';
469
  $pright->before_input = '<img src="' . $icon_url . 'p_right.png" class="icon padding" title="' . __("Padding Right","maxbuttons") . '" >';
470
+ $pright->value = maxUtils::strip_px($screen->getValue($pright->id));
471
+ $screen->addField($pright);
472
 
473
  $pbottom = new maxField('number');
474
+ $pbottom->id = $screen->getFieldID('padding_bottom');
475
  $pbottom->name = $pbottom->id;
476
  $pbottom->min = 0;
477
  $pbottom->inputclass = 'tiny';
478
  $pbottom->before_input = '<img src="' . $icon_url . 'p_bottom.png" class="icon padding" title="' . __("Padding Bottom","maxbuttons") . '" >';
479
+ $pbottom->value = maxUtils::strip_px($screen->getValue($pbottom->id));
480
+ $screen->addField($pbottom);
481
 
482
  $pleft = new maxField('number');
483
+ $pleft->id = $screen->getFieldID('padding_left');
484
  $pleft->name = $pleft->id;
485
  $pleft->min = 0;
486
  $pleft->inputclass = 'tiny';
487
  $pleft->before_input = '<img src="' . $icon_url . 'p_left.png" class="icon padding" title="' . __("Padding Left","maxbuttons") . '" >';
488
+ $pleft->value = maxUtils::strip_px($screen->getValue($pleft->id));
489
+ $screen->addField($pleft,'', 'end');
 
490
 
491
  // Text Color
492
  $fcolor = new maxField('color');
493
+ $fcolor->id = $screen->getFieldID('text_color');
494
  $fcolor->name = $fcolor->id;
495
+ $fcolor->value = $screen->getColorValue($fcolor->id);
496
  $fcolor->label = __('Text Color','maxbuttons');
497
  $fcolor->copycolor = true;
498
+ $fcolor->bindto = $screen->getFieldID('text_color_hover');
499
  $fcolor->copypos = 'right';
500
  $fcolor->right_title = $color_copy_move;
501
  $fcolor->left_title = $color_copy_self;
502
+ $screen->addField($fcolor, 'start');
503
 
504
  // Text Color Hover
505
  $fcolor_hover = new maxField('color');
506
+ $fcolor_hover->id = $screen->getFieldID('text_color_hover');
507
  $fcolor_hover->name = $fcolor_hover->id;
508
+ $fcolor_hover->value = $screen->getColorValue($fcolor_hover->id);
509
  $fcolor_hover->label = __('Text Color Hover','maxbuttons');
510
  $fcolor_hover->copycolor = true;
511
  $fcolor_hover->bindto = $fcolor->id;
513
  $fcolor_hover->right_title = $color_copy_self;
514
  $fcolor_hover->left_title = $color_copy_move;
515
 
516
+ $screen->addField($fcolor_hover, '','end');
517
+
518
+ // Fix label for px or %
519
+ $after_input = ($screen->getValue($screen->getFieldID('button_size_unit_width')) == 'pixel') ? __('px', 'maxbuttons') : __('%','maxbuttons');
520
+ $after_input = '<span class="unit">' . $after_input . '</span>';
521
 
522
  // Dimension : width
523
+
524
  $field_width = new maxField('number');
525
  $field_width->label = __('Button Width','maxbuttons');
526
+ $field_width->id = $screen->getFieldID('button_width');
527
+ $field_width->name = $field_width->id;
528
+ $field_width->inputclass = 'small';
529
  $field_width->min = 0;
530
+ $field_width->after_input = $after_input;
531
+ $field_width->value = maxUtils::strip_px($screen->getValue($field_width->id)); // strippx?
532
+ $screen->addField($field_width, 'start');
533
 
534
+ // Fix label for px or %
535
+ $after_input = ($screen->getValue($screen->getFieldID('button_size_unit_height')) == 'pixel') ? __('px', 'maxbuttons') : __('%','maxbuttons');
536
+ $after_input = '<span class="unit">' . $after_input . '</span>';
537
 
538
  // Dimension : height
539
  $field_height = new maxField('number');
540
  $field_height->label = __('Button Height','maxbuttons');
541
+ $field_height->name = $screen->getFieldID('button_height');
542
  $field_height->id = $field_height->name;
543
  $field_height->inputclass = 'small';
544
  $field_height->min = 0;
545
+ $field_height->after_input = $after_input;
546
+ $field_height->help = __('Width and Height are optional. When set to 0, button size will be determined by text size plus padding', 'maxbuttons');
547
+ $field_height->value= maxUtils::strip_px($screen->getValue($field_height->id)); // strippx?
548
+ $screen->addField($field_height, '', 'end');
549
+
550
+ $size_spacer = new maxField('spacer');
551
+ $size_spacer->label = __('Width Unit', 'maxbuttons');
552
+ $size_spacer->name = 'size_unit_spacer';
553
+
554
+ $screen->addField($size_spacer, 'start', '');
555
+
556
+ // Units for width
557
+ $wsize_unit_px = new maxField('radio');
558
+ $wsize_unit_px->label = __('px', 'maxbuttons');
559
+ $wsize_unit_px->name = $screen->getFieldID('button_size_unit_width');
560
+ $wsize_unit_px->id = $screen->getFieldID('wbutton_size_unit_px');
561
+ $wsize_unit_px->value = 'pixel';
562
+ //$wsize_unit_px->before_input = '<label>width</label>';
563
+
564
+ $wsize_unit_px->checked = checked( $screen->getValue($wsize_unit_px->name), 'pixel', false);
565
+
566
+ $screen->addField($wsize_unit_px, 'group_start', '');
567
+
568
+ $wsize_unit_perc = new maxField('radio');
569
+ $wsize_unit_perc->label = __('%', 'maxbuttons');
570
+ $wsize_unit_perc->name = $screen->getFieldID('button_size_unit_width');
571
+ $wsize_unit_perc->id = $screen->getFieldID('wbutton_size_unit_perc');
572
+ $wsize_unit_perc->value = 'percent';
573
+ $wsize_unit_perc->checked = checked( $screen->getValue($wsize_unit_perc->name), 'percent', false);
574
+
575
+ $screen->addField($wsize_unit_perc, '', 'group_end');
576
+
577
+ $sp = new maxField('spacer');
578
+ $sp->name = 'unit-spacer ';
579
+ $sp->label = __("Height Unit", 'maxbuttons');
580
+
581
+ $screen->addField($sp);
582
+
583
+ // Units for height.
584
+ $hsize_unit_px = new maxField('radio');
585
+ $hsize_unit_px->label = __('px', 'maxbuttons');
586
+ $hsize_unit_px->name = $screen->getFieldID('button_size_unit_height');
587
+ $hsize_unit_px->id = $screen->getFieldID('hbutton_size_unit_px');
588
+ $hsize_unit_px->value = 'pixel';
589
+ $hsize_unit_px->checked = checked( $screen->getValue($hsize_unit_px->name), 'pixel', false);
590
+ $screen->addField($hsize_unit_px, 'group_start', '');
591
+
592
+ $hsize_unit_perc = new maxField('radio');
593
+ $hsize_unit_perc->label = __('%', 'maxbuttons');
594
+ $hsize_unit_perc->name = $screen->getFieldID('button_size_unit_height');
595
+ $hsize_unit_perc->id = $screen->getFieldID('hbutton_size_unit_perc');
596
+ $hsize_unit_perc->value = 'percent';
597
+ $hsize_unit_perc->checked = checked( $screen->getValue($hsize_unit_perc->name), 'percent', false);
598
+ $hsize_unit_perc->help = __('Using percentages makes the button size to the page element. The live preview can be unreliable', 'maxbuttons');
599
+ $screen->addField($hsize_unit_perc, '', array('group_end', 'end'));
600
 
 
601
 
602
  // Description
603
  $description_hide = get_option('maxbuttons_hidedescription');
607
  $field_desc = new maxField('textarea');
608
 
609
  $field_desc->label = __('Description', 'maxbuttons');
610
+ $field_desc->id = $screen->getFieldID('description');
611
+ $field_desc->name = $field_desc->id;
612
  $field_desc->esc_function = 'esc_textarea';
613
+ $field_desc->value = $screen->getValue($field_desc->id);
614
+ $field_desc->is_responsive = false;
615
  $field_desc->placeholder = __('Brief explanation about how and where the button is used.','maxbuttons');
616
 
617
+ $screen->addField($field_desc, 'start', 'end');
618
 
619
+ $this->sidebar($screen);
620
  $endblock = new maxField('block_end');
621
+ $screen->addField($endblock);
622
 
623
  } // admin_display
624
 
625
  } // class
 
 
blocks/border.php CHANGED
@@ -7,38 +7,51 @@ $blockOrder[30][] = "border";
7
  class borderBlock extends maxBlock
8
  {
9
  protected $blockname = "border";
10
- protected $fields = array("radius_top_left" =>
11
- array("default" => "4px",
12
- "css" => "border-top-left-radius"
 
13
  ),
14
  "radius_top_right" => array("default" => "4px",
15
- "css" => "border-top-right-radius"
 
16
  ),
17
  "radius_bottom_left" => array("default" => "4px",
18
- "css" => "border-bottom-left-radius"
 
19
  ),
20
  "radius_bottom_right" => array("default" => "4px",
21
- "css" => "border-bottom-right-radius"
 
22
  ),
23
  "border_style" => array("default" => "solid",
24
- "css" => "border-style"
 
25
  ),
26
  "border_width" => array("default" => "2px",
27
  "css" => "border-width"
28
  ),
29
  "box_shadow_offset_left" => array("default" => "0px",
30
  "css" => "box-shadow-offset-left",
31
- "csspseudo" => "normal,hover"
 
32
  ),
33
  "box_shadow_offset_top" => array("default" => "0px",
34
  "css" => "box-shadow-offset-top",
35
- "csspseudo" => "normal,hover"),
 
 
 
36
  "box_shadow_width" => array("default" => "2px",
37
  "css" => "box-shadow-width",
38
- "csspseudo" => "normal,hover"),
 
 
39
  'box_shadow_spread' => array('default' => '0px',
40
  'css' => 'box-shadow-spread',
41
- 'csspseudo' => 'normal,hover'),
 
 
42
 
43
  );
44
 
@@ -60,24 +73,22 @@ class borderBlock extends maxBlock
60
  }
61
 
62
 
63
- public function parse_css($css, $mode = 'normal')
64
  {
65
- $css = parent::parse_css($css);
66
- $data = $this->data[$this->blockname];
67
 
68
- $border_width = maxBlocks::getValue('border_width');
69
- if ( intval($border_width) == 0) // if no border, then don't output other border properties.
70
  {
71
- unset($css['maxbutton']['normal']['border-style']);
72
  }
73
 
74
- return $css;
75
  }
76
 
77
- public function admin_fields()
78
  {
79
 
80
- $data = $this->data[$this->blockname];
81
  foreach($this->fields as $field => $options)
82
  {
83
  $default = (isset($options["default"])) ? $options["default"] : '';
@@ -100,63 +111,63 @@ class borderBlock extends maxBlock
100
  $color_copy_self = __("Replace color from other field", "maxbuttons");
101
  $color_copy_move = __("Copy Color to other field", "maxbuttons");
102
 
103
- $admin = MB()->getClass('admin');
104
 
105
  $start_block = new maxField('block_start');
106
  $start_block->name = __('border', 'maxbuttons');
107
  $start_block->label = __('Border', 'maxbuttons');
108
- $admin->addField($start_block);
109
 
110
 
111
  // Spacer
112
- $fspacer = new maxField('spacer');
113
- $fspacer->label = __('Radius','maxbuttons');
114
- $fspacer->name = 'radius';
115
- // $fspacer->output('start');
116
-
117
- $admin->addField($fspacer, 'start');
118
 
119
  // Radius left top
120
  $radius_tleft = new maxField('number');
121
- $radius_tleft->value = maxUtils::strip_px(maxBlocks::getValue('radius_top_left'));
122
- $radius_tleft->id = 'radius_top_left';
123
  $radius_tleft->name = $radius_tleft->id;
 
124
  $radius_tleft->min = 0;
125
  $radius_tleft->inputclass = 'tiny';
126
  $radius_tleft->publish = false;
127
  $rtl = $radius_tleft->output('');
 
128
 
129
  // Radius right top
130
  $radius_tright = new maxField('number');
131
- $radius_tright->value = maxUtils::strip_px(maxBlocks::getValue('radius_top_right'));
132
- $radius_tright->id = 'radius_top_right';
133
  $radius_tright->name = $radius_tright->id;
134
  $radius_tright->min = 0;
135
  $radius_tright->inputclass = 'tiny';
136
  $radius_tright->publish = false;
137
  $rtr = $radius_tright->output('', '');
138
-
139
 
140
  // Radius bottom left
141
  $radius_bleft = new maxField('number');
142
- $radius_bleft->value = maxUtils::strip_px(maxBlocks::getValue('radius_bottom_left'));
143
- $radius_bleft->id = 'radius_bottom_left';
144
  $radius_bleft->name = $radius_bleft->id;
145
  $radius_bleft->min = 0;
146
  $radius_bleft->inputclass = 'tiny';
147
  $radius_bleft->publish = false;
148
  $rbl = $radius_bleft->output('');
 
149
 
150
  // Radius bottom right
151
  $radius_bright = new maxField('number');
152
-
153
- $radius_bright->value = maxUtils::strip_px(maxBlocks::getValue('radius_bottom_right'));
154
- $radius_bright->id = 'radius_bottom_right';
155
  $radius_bright->name = $radius_bright->id;
156
  $radius_bright->min = 0;
157
  $radius_bright->inputclass = 'tiny';
158
  $radius_bright->publish = false;
159
  $rbr = $radius_bright->output('', '');
 
160
 
161
  // If all same, lock the corners for simultanious change.
162
  if ($radius_tleft->value == $radius_tright->value &&
@@ -169,6 +180,7 @@ class borderBlock extends maxBlock
169
  $lock = 'unlock';
170
 
171
  $radius = new maxField('radius');
 
172
  $radius->radius_tl = $rtl;
173
  $radius->label_tl = __('Top Left','maxbuttons');
174
  $radius->radius_tr = $rtr;
@@ -178,123 +190,121 @@ class borderBlock extends maxBlock
178
  $radius->radius_br = $rbr;
179
  $radius->label_br = __('Bottom Right','maxbuttons');
180
  $radius->lock = $lock;
181
- $admin->addField($radius, '', 'end');
182
 
183
  // Border style
184
  $bstyle = new maxField('generic');
185
  $bstyle->label = __('Style','maxbuttons');
186
- $bstyle->name = 'border_style';
187
  $bstyle->id = $bstyle->name;
188
- $bstyle->value= maxBlocks::getValue('border_style');
189
- $bstyle->setDefault(maxBlocks::getDefault('border_style'));
190
  $bstyle->content = maxUtils::selectify($bstyle->name, $maxbuttons_border_styles, $bstyle->value);
191
- $admin->addField($bstyle, 'start', 'end');
192
 
193
  // Border width
194
  $bwidth = new maxField('number');
195
  $bwidth->label = __('Width', 'maxbuttons');
196
- $bwidth->name = 'border_width';
197
  $bwidth->id = $bwidth->name;
198
- $bwidth->value = maxUtils::strip_px( maxBlocks::getValue('border_width') );
199
  $bwidth->min = 0;
200
  $bwidth->after_input = __('px', 'maxbuttons');
201
  $bwidth->inputclass = 'tiny';
202
- $admin->addField($bwidth, 'start', 'end');
203
 
204
  // Border Color
205
  $bcolor = new maxField('color');
206
- $bcolor->id = 'border_color';
207
  $bcolor->name = $bcolor->id;
208
- $bcolor->value = maxBlocks::getColorValue('border_color');
209
  $bcolor->label = __('Border Color','maxbuttons');
210
  $bcolor->copycolor = true;
211
- $bcolor->bindto = 'border_color_hover';
212
  $bcolor->copypos = 'right';
213
  $bcolor->left_title = $color_copy_self;
214
  $bcolor->right_title = $color_copy_move;
215
- $admin->addField($bcolor ,'start');
216
 
217
  // Border Color Hover
218
  $bcolor_hover = new maxField('color');
219
- $bcolor_hover->id = 'border_color_hover';
220
  $bcolor_hover->name = $bcolor_hover->id;
221
- $bcolor_hover->value = maxBlocks::getColorValue('border_color_hover');
222
  $bcolor_hover->label = __('Hover','maxbuttons');
223
  $bcolor_hover->copycolor = true;
224
- $bcolor_hover->bindto = 'border_color';
225
  $bcolor_hover->copypos = 'left';
226
  $bcolor_hover->left_title = $color_copy_move;
227
  $bcolor_hover->right_title = $color_copy_self;
228
- $admin->addField($bcolor_hover, '', 'end');
229
 
230
  // Shadow offset left
231
  $bshadow = new maxField('number');
232
  $bshadow->label = __('Shadow Offset Left','maxbuttons');
233
- $bshadow->name = 'box_shadow_offset_left';
234
  $bshadow->id = $bshadow->name;
235
- $bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_offset_left') );
236
  $bshadow->inputclass = 'tiny';
237
- $admin->addField($bshadow, 'start');
238
 
239
  // Shadow offset top
240
  $bshadow = new maxField('number');
241
  $bshadow->label = __('Shadow Offset Top','maxbuttons');
242
- $bshadow->name = 'box_shadow_offset_top';
243
  $bshadow->id = $bshadow->name;
244
- $bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_offset_top') );
245
  $bshadow->inputclass = 'tiny';
246
- $admin->addField($bshadow, '', 'end');
247
 
248
  // Shadow width
249
  $bshadow = new maxField('number');
250
  $bshadow->label = __('Shadow Blur','maxbuttons');
251
- $bshadow->name = 'box_shadow_width';
252
  $bshadow->id = $bshadow->name;
253
- $bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_width') );
254
  $bshadow->inputclass = 'tiny';
255
  $bshadow->min = 0;
256
- $admin->addField($bshadow, 'start', '');
257
 
258
  $bspread = new maxField('number');
259
  $bspread->label = __('Shadow Spread', 'maxbuttons');
260
- $bspread->value = maxUtils::strip_px(maxBlocks::getValue('box_shadow_spread'));
261
- $bspread->id = 'box_shadow_spread';
262
  $bspread->name = $bspread->id;
263
  $bspread->inputclass = 'tiny';
264
- $admin->addField($bspread, '', 'end');
265
 
266
  // Border Shadow Color
267
  $scolor = new maxField('color');
268
- $scolor->id = 'box_shadow_color';
269
  $scolor->name = $scolor->id;
270
- $scolor->value = maxBlocks::getColorValue('box_shadow_color');
271
  $scolor->label = __('Border Shadow Color','maxbuttons');
272
  $scolor->copycolor = true;
273
- $scolor->bindto = 'box_shadow_color_hover';
274
  $scolor->copypos = 'right';
275
  $scolor->left_title = $color_copy_self;
276
  $scolor->right_title = $color_copy_move;
277
- $admin->addField($scolor, 'start');
278
 
279
  // Border Shadow Color Hover
280
  $scolor_hover = new maxField('color');
281
- $scolor_hover->id = 'box_shadow_color_hover';
282
  $scolor_hover->name = $scolor_hover->id;
283
- $scolor_hover->value = maxBlocks::getColorValue('box_shadow_color_hover');
284
  $scolor_hover->label = __('Hover','maxbuttons');
285
  $scolor_hover->copycolor = true;
286
- $scolor_hover->bindto = 'box_shadow_color';
287
  $scolor_hover->copypos = 'left';
288
  $scolor_hover->left_title = $color_copy_self;
289
  $scolor_hover->right_title = $color_copy_move;
290
- $admin->addField($scolor_hover, '','end');
291
 
292
- $this->sidebar();
293
  $endblock = new maxField('block_end');
294
- $admin->addField($endblock);
295
 
296
  } // admin fields
297
 
298
  } // class
299
-
300
- ?>
7
  class borderBlock extends maxBlock
8
  {
9
  protected $blockname = "border";
10
+ protected $fields = array(
11
+ "radius_top_left" => array("default" => "4px",
12
+ "css" => "border-top-left-radius",
13
+ 'mixin' => 'radius',
14
  ),
15
  "radius_top_right" => array("default" => "4px",
16
+ "css" => "border-top-right-radius",
17
+ 'mixin' => 'radius',
18
  ),
19
  "radius_bottom_left" => array("default" => "4px",
20
+ "css" => "border-bottom-left-radius",
21
+ 'mixin' => 'radius',
22
  ),
23
  "radius_bottom_right" => array("default" => "4px",
24
+ "css" => "border-bottom-right-radius",
25
+ 'mixin' => 'radius',
26
  ),
27
  "border_style" => array("default" => "solid",
28
+ "css" => "border-style",
29
+ 'cssvalidate' => 'checkBorder',
30
  ),
31
  "border_width" => array("default" => "2px",
32
  "css" => "border-width"
33
  ),
34
  "box_shadow_offset_left" => array("default" => "0px",
35
  "css" => "box-shadow-offset-left",
36
+ "csspseudo" => "normal,hover",
37
+ 'mixin' => 'boxshadow',
38
  ),
39
  "box_shadow_offset_top" => array("default" => "0px",
40
  "css" => "box-shadow-offset-top",
41
+ "csspseudo" => "normal,hover",
42
+ 'mixin' => 'boxshadow',
43
+
44
+ ),
45
  "box_shadow_width" => array("default" => "2px",
46
  "css" => "box-shadow-width",
47
+ "csspseudo" => "normal,hover",
48
+ 'mixin' => 'boxshadow',
49
+ ),
50
  'box_shadow_spread' => array('default' => '0px',
51
  'css' => 'box-shadow-spread',
52
+ 'csspseudo' => 'normal,hover',
53
+ 'mixin' => 'boxshadow',
54
+ ),
55
 
56
  );
57
 
73
  }
74
 
75
 
76
+ protected function checkBorder($value, $field_id, $field_data, $screenObj)
77
  {
78
+ $border_width = $screenObj->getValue($screenObj->getFieldID('border_width'));
 
79
 
80
+ if ($border_width == 0)
 
81
  {
82
+ return false;
83
  }
84
 
85
+ return $value;
86
  }
87
 
88
+ public function admin_fields($screen)
89
  {
90
 
91
+ $data = $this->getBlockData();
92
  foreach($this->fields as $field => $options)
93
  {
94
  $default = (isset($options["default"])) ? $options["default"] : '';
111
  $color_copy_self = __("Replace color from other field", "maxbuttons");
112
  $color_copy_move = __("Copy Color to other field", "maxbuttons");
113
 
114
+ // $admin = MB()->getClass('admin');
115
 
116
  $start_block = new maxField('block_start');
117
  $start_block->name = __('border', 'maxbuttons');
118
  $start_block->label = __('Border', 'maxbuttons');
119
+ $screen->addField($start_block);
120
 
121
 
122
  // Spacer
123
+ $fspacer = new maxField('spacer');
124
+ $fspacer->label = __('Radius','maxbuttons');
125
+ $fspacer->name = 'radius';
126
+ $screen->addField($fspacer, 'start');
 
 
127
 
128
  // Radius left top
129
  $radius_tleft = new maxField('number');
130
+ $radius_tleft->id = $screen->getFieldID('radius_top_left');
 
131
  $radius_tleft->name = $radius_tleft->id;
132
+ $radius_tleft->value = maxUtils::strip_px($screen->getValue($radius_tleft->id));
133
  $radius_tleft->min = 0;
134
  $radius_tleft->inputclass = 'tiny';
135
  $radius_tleft->publish = false;
136
  $rtl = $radius_tleft->output('');
137
+ $screen->addField($radius_tleft, '', '');
138
 
139
  // Radius right top
140
  $radius_tright = new maxField('number');
141
+ $radius_tright->id = $screen->getFieldID('radius_top_right');
142
+ $radius_tright->value = maxUtils::strip_px($screen->getValue($radius_tright->id));
143
  $radius_tright->name = $radius_tright->id;
144
  $radius_tright->min = 0;
145
  $radius_tright->inputclass = 'tiny';
146
  $radius_tright->publish = false;
147
  $rtr = $radius_tright->output('', '');
148
+ $screen->addField($radius_tright, '', '');
149
 
150
  // Radius bottom left
151
  $radius_bleft = new maxField('number');
152
+ $radius_bleft->id = $screen->getFieldID('radius_bottom_left');
153
+ $radius_bleft->value = maxUtils::strip_px($screen->getValue($radius_bleft->id));
154
  $radius_bleft->name = $radius_bleft->id;
155
  $radius_bleft->min = 0;
156
  $radius_bleft->inputclass = 'tiny';
157
  $radius_bleft->publish = false;
158
  $rbl = $radius_bleft->output('');
159
+ $screen->addField($radius_bleft, '', '');
160
 
161
  // Radius bottom right
162
  $radius_bright = new maxField('number');
163
+ $radius_bright->id = $screen->getFieldID('radius_bottom_right');
164
+ $radius_bright->value = maxUtils::strip_px($screen->getValue($radius_bright->id));
 
165
  $radius_bright->name = $radius_bright->id;
166
  $radius_bright->min = 0;
167
  $radius_bright->inputclass = 'tiny';
168
  $radius_bright->publish = false;
169
  $rbr = $radius_bright->output('', '');
170
+ $screen->addField($radius_bright, '', '');
171
 
172
  // If all same, lock the corners for simultanious change.
173
  if ($radius_tleft->value == $radius_tright->value &&
180
  $lock = 'unlock';
181
 
182
  $radius = new maxField('radius');
183
+ $radius->id = $screen->getFieldID('radius_toggle');
184
  $radius->radius_tl = $rtl;
185
  $radius->label_tl = __('Top Left','maxbuttons');
186
  $radius->radius_tr = $rtr;
190
  $radius->radius_br = $rbr;
191
  $radius->label_br = __('Bottom Right','maxbuttons');
192
  $radius->lock = $lock;
193
+ $screen->addField($radius, '', 'end');
194
 
195
  // Border style
196
  $bstyle = new maxField('generic');
197
  $bstyle->label = __('Style','maxbuttons');
198
+ $bstyle->name = $screen->getFieldID('border_style');
199
  $bstyle->id = $bstyle->name;
200
+ $bstyle->value= $screen->getValue($bstyle->id);
201
+ $bstyle->setDefault($screen->getDefault('border_style'));
202
  $bstyle->content = maxUtils::selectify($bstyle->name, $maxbuttons_border_styles, $bstyle->value);
203
+ $screen->addField($bstyle, 'start', 'end');
204
 
205
  // Border width
206
  $bwidth = new maxField('number');
207
  $bwidth->label = __('Width', 'maxbuttons');
208
+ $bwidth->name = $screen->getFieldID('border_width');
209
  $bwidth->id = $bwidth->name;
210
+ $bwidth->value = maxUtils::strip_px( $screen->getValue($bwidth->id) );
211
  $bwidth->min = 0;
212
  $bwidth->after_input = __('px', 'maxbuttons');
213
  $bwidth->inputclass = 'tiny';
214
+ $screen->addField($bwidth, 'start', 'end');
215
 
216
  // Border Color
217
  $bcolor = new maxField('color');
218
+ $bcolor->id = $screen->getFieldID('border_color');
219
  $bcolor->name = $bcolor->id;
220
+ $bcolor->value = $screen->getColorValue($bcolor->id);
221
  $bcolor->label = __('Border Color','maxbuttons');
222
  $bcolor->copycolor = true;
223
+ $bcolor->bindto = $screen->getFieldID('border_color_hover');
224
  $bcolor->copypos = 'right';
225
  $bcolor->left_title = $color_copy_self;
226
  $bcolor->right_title = $color_copy_move;
227
+ $screen->addField($bcolor ,'start');
228
 
229
  // Border Color Hover
230
  $bcolor_hover = new maxField('color');
231
+ $bcolor_hover->id = $screen->getFieldID('border_color_hover');
232
  $bcolor_hover->name = $bcolor_hover->id;
233
+ $bcolor_hover->value = $screen->getColorValue($bcolor_hover->id);
234
  $bcolor_hover->label = __('Hover','maxbuttons');
235
  $bcolor_hover->copycolor = true;
236
+ $bcolor_hover->bindto = $screen->getFieldID('border_color');
237
  $bcolor_hover->copypos = 'left';
238
  $bcolor_hover->left_title = $color_copy_move;
239
  $bcolor_hover->right_title = $color_copy_self;
240
+ $screen->addField($bcolor_hover, '', 'end');
241
 
242
  // Shadow offset left
243
  $bshadow = new maxField('number');
244
  $bshadow->label = __('Shadow Offset Left','maxbuttons');
245
+ $bshadow->name = $screen->getFieldID('box_shadow_offset_left');
246
  $bshadow->id = $bshadow->name;
247
+ $bshadow->value = maxUtils::strip_px( $screen->getValue($bshadow->id) );
248
  $bshadow->inputclass = 'tiny';
249
+ $screen->addField($bshadow, 'start');
250
 
251
  // Shadow offset top
252
  $bshadow = new maxField('number');
253
  $bshadow->label = __('Shadow Offset Top','maxbuttons');
254
+ $bshadow->name = $screen->getFieldID('box_shadow_offset_top');
255
  $bshadow->id = $bshadow->name;
256
+ $bshadow->value = maxUtils::strip_px( $screen->getValue($bshadow->id) );
257
  $bshadow->inputclass = 'tiny';
258
+ $screen->addField($bshadow, '', 'end');
259
 
260
  // Shadow width
261
  $bshadow = new maxField('number');
262
  $bshadow->label = __('Shadow Blur','maxbuttons');
263
+ $bshadow->name = $screen->getFieldID('box_shadow_width');
264
  $bshadow->id = $bshadow->name;
265
+ $bshadow->value = maxUtils::strip_px( $screen->getValue($bshadow->id) );
266
  $bshadow->inputclass = 'tiny';
267
  $bshadow->min = 0;
268
+ $screen->addField($bshadow, 'start', '');
269
 
270
  $bspread = new maxField('number');
271
  $bspread->label = __('Shadow Spread', 'maxbuttons');
272
+ $bspread->id = $screen->getFieldID('box_shadow_spread');
273
+ $bspread->value = maxUtils::strip_px($screen->getValue($bspread->id));
274
  $bspread->name = $bspread->id;
275
  $bspread->inputclass = 'tiny';
276
+ $screen->addField($bspread, '', 'end');
277
 
278
  // Border Shadow Color
279
  $scolor = new maxField('color');
280
+ $scolor->id = $screen->getFieldID('box_shadow_color');
281
  $scolor->name = $scolor->id;
282
+ $scolor->value = $screen->getColorValue($scolor->id);
283
  $scolor->label = __('Border Shadow Color','maxbuttons');
284
  $scolor->copycolor = true;
285
+ $scolor->bindto = $screen->getFieldID('box_shadow_color_hover');
286
  $scolor->copypos = 'right';
287
  $scolor->left_title = $color_copy_self;
288
  $scolor->right_title = $color_copy_move;
289
+ $screen->addField($scolor, 'start');
290
 
291
  // Border Shadow Color Hover
292
  $scolor_hover = new maxField('color');
293
+ $scolor_hover->id = $screen->getFieldID('box_shadow_color_hover');
294
  $scolor_hover->name = $scolor_hover->id;
295
+ $scolor_hover->value = $screen->getColorValue($scolor_hover->id);
296
  $scolor_hover->label = __('Hover','maxbuttons');
297
  $scolor_hover->copycolor = true;
298
+ $scolor_hover->bindto = $screen->getFieldID('box_shadow_color');
299
  $scolor_hover->copypos = 'left';
300
  $scolor_hover->left_title = $color_copy_self;
301
  $scolor_hover->right_title = $color_copy_move;
302
+ $screen->addField($scolor_hover, '','end');
303
 
304
+ $this->sidebar($screen);
305
  $endblock = new maxField('block_end');
306
+ $screen->addField($endblock);
307
 
308
  } // admin fields
309
 
310
  } // class
 
 
blocks/color.php CHANGED
@@ -11,66 +11,98 @@ class colorBlock extends maxBlock
11
  protected $blockname = "color";
12
  protected $fields = array("text_color" => array("default" => "#ffffff",
13
  "css" => "color",
14
- "csspart" => "mb-text"
 
15
  ),
16
  "text_shadow_color" => array("default" => "#505ac7",
17
  "css" => "text-shadow-color",
18
- "csspart" => "mb-text"
 
 
19
  ),
20
  "gradient_start_color" => array("default" => "#505ac7",
21
- "css" => "gradient-start-color"
 
 
22
  ),
23
  "gradient_end_color" => array("default" => "#505ac7",
24
- "css" => "gradient-end-color"
 
 
25
  ),
26
  "border_color" => array("default" => "#505ac7",
27
- "css" => "border-color"
 
28
  ),
29
  "box_shadow_color" => array("default" => "#333333",
30
- "css" => "box-shadow-color"
 
 
31
  ),
32
  "text_color_hover" => array("default" => "#505ac7",
33
  "css" => "color",
34
  "csspart" => "mb-text",
35
  "csspseudo" => "hover",
 
36
  ),
37
  "text_shadow_color_hover" => array("default" => "#333333",
38
  "css" => "text-shadow-color",
39
  "csspart" => "mb-text",
40
- "csspseudo" => "hover"),
 
 
 
41
 
42
  "gradient_start_color_hover" => array("default" => "#ffffff",
43
  "css" => "gradient-start-color",
44
- "csspseudo" => "hover"),
 
 
 
45
 
46
  "gradient_end_color_hover" => array("default" => "#ffffff",
47
  "css" => "gradient-end-color",
48
- "csspseudo" => "hover"
 
 
49
  ),
50
 
51
  "border_color_hover" => array("default" => "#505ac7",
52
  "css" => "border-color",
53
- "csspseudo" => "hover"),
 
 
54
 
55
  "box_shadow_color_hover" => array("default" => "#333333",
56
  "css" => "box-shadow-color",
57
- "csspseudo" => "hover"),
 
 
 
58
 
59
  "icon_color" => array( "default" => '#ffffff',
60
  "css" => "color",
61
- "csspart" => "mb-icon"),
 
 
62
 
63
  "icon_color_hover" => array( "default" => '#2b469e',
64
  "css" => "color",
65
  "csspart" => "mb-icon-hover",
66
  "csspseudo" => "hover",
 
67
  ),
68
  );
69
 
70
- public function parse_css($css, $mode = 'normal') {
 
 
 
 
 
71
 
72
- $data = $this->data[$this->blockname];
73
- foreach($this->fields as $field => $field_data) // ensure colors have the correct format
74
  {
75
  $value = isset($data[$field]) ? $data[$field] : false;
76
  if (! $value)
@@ -80,17 +112,18 @@ class colorBlock extends maxBlock
80
  //continue; // no color, no check.
81
  }
82
 
83
-
84
  if (! maxUtils::isrgba($value) && substr($value,0,1) !== '#')
85
  {
86
  $value = '#' . $value;
87
  }
 
88
  $this->data[$this->blockname][$field] = $value;
89
- }
 
 
90
 
91
- $css = parent::parse_css($css, $mode);
92
 
93
- $border_width = maxBlocks::getValue('border_width');
94
  if ( intval($border_width) == 0) // if no border, then don't output other border properties.
95
  {
96
  unset($css['maxbutton']['normal']['border-color']);
@@ -100,6 +133,29 @@ class colorBlock extends maxBlock
100
  return $css;
101
  }
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
 
104
- public function admin_fields() {}
105
  } // class
11
  protected $blockname = "color";
12
  protected $fields = array("text_color" => array("default" => "#ffffff",
13
  "css" => "color",
14
+ "csspart" => "mb-text",
15
+ 'cssvalidate' => 'checkColor',
16
  ),
17
  "text_shadow_color" => array("default" => "#505ac7",
18
  "css" => "text-shadow-color",
19
+ "csspart" => "mb-text",
20
+ 'mixin' => 'textshadow',
21
+ 'cssvalidate' => 'checkColor',
22
  ),
23
  "gradient_start_color" => array("default" => "#505ac7",
24
+ "css" => "gradient-start-color",
25
+ "mixin" => 'gradient',
26
+ 'cssvalidate' => 'checkColor',
27
  ),
28
  "gradient_end_color" => array("default" => "#505ac7",
29
+ "css" => "gradient-end-color",
30
+ "mixin" => 'gradient',
31
+ 'cssvalidate' => 'checkColor',
32
  ),
33
  "border_color" => array("default" => "#505ac7",
34
+ "css" => "border-color",
35
+ 'cssvalidate' => 'checkBorderColor',
36
  ),
37
  "box_shadow_color" => array("default" => "#333333",
38
+ "css" => "box-shadow-color",
39
+ 'mixin' => 'boxshadow',
40
+ 'cssvalidate' => 'checkColor',
41
  ),
42
  "text_color_hover" => array("default" => "#505ac7",
43
  "css" => "color",
44
  "csspart" => "mb-text",
45
  "csspseudo" => "hover",
46
+ 'cssvalidate' => 'checkColor',
47
  ),
48
  "text_shadow_color_hover" => array("default" => "#333333",
49
  "css" => "text-shadow-color",
50
  "csspart" => "mb-text",
51
+ "csspseudo" => "hover",
52
+ 'mixin' => 'textshadow',
53
+ 'cssvalidate' => 'checkColor',
54
+ ),
55
 
56
  "gradient_start_color_hover" => array("default" => "#ffffff",
57
  "css" => "gradient-start-color",
58
+ "csspseudo" => "hover",
59
+ "mixin" => 'gradient',
60
+ 'cssvalidate' => 'checkColor',
61
+ ),
62
 
63
  "gradient_end_color_hover" => array("default" => "#ffffff",
64
  "css" => "gradient-end-color",
65
+ "csspseudo" => "hover",
66
+ 'mixin' => 'gradient',
67
+ 'cssvalidate' => 'checkColor',
68
  ),
69
 
70
  "border_color_hover" => array("default" => "#505ac7",
71
  "css" => "border-color",
72
+ "csspseudo" => "hover",
73
+ 'cssvalidate' => 'checkBorderColor',
74
+ ),
75
 
76
  "box_shadow_color_hover" => array("default" => "#333333",
77
  "css" => "box-shadow-color",
78
+ "csspseudo" => "hover",
79
+ 'mixin' => 'boxshadow',
80
+ 'cssvalidate' => 'checkColor',
81
+ ),
82
 
83
  "icon_color" => array( "default" => '#ffffff',
84
  "css" => "color",
85
+ "csspart" => "mb-icon",
86
+ 'cssvalidate' => 'checkColor',
87
+ ),
88
 
89
  "icon_color_hover" => array( "default" => '#2b469e',
90
  "css" => "color",
91
  "csspart" => "mb-icon-hover",
92
  "csspseudo" => "hover",
93
+ 'cssvalidate' => 'checkColor',
94
  ),
95
  );
96
 
97
+ public function map_fields($map)
98
+ {
99
+ $map = parent::map_fields($map);
100
+ return $map;
101
+ }
102
+ public function parse_css($css, $mode = 'normal', $screens) {
103
 
104
+ $data = $this->getBlockData();
105
+ /* foreach($this->fields as $field => $field_data) // ensure colors have the correct format
106
  {
107
  $value = isset($data[$field]) ? $data[$field] : false;
108
  if (! $value)
112
  //continue; // no color, no check.
113
  }
114
 
 
115
  if (! maxUtils::isrgba($value) && substr($value,0,1) !== '#')
116
  {
117
  $value = '#' . $value;
118
  }
119
+
120
  $this->data[$this->blockname][$field] = $value;
121
+ } */
122
+
123
+ $css = parent::parse_css($css, $mode, $screens);
124
 
 
125
 
126
+ $border_width = isset($this->data['border']['border_width']) ? $this->data['border']['border_width'] : 0;
127
  if ( intval($border_width) == 0) // if no border, then don't output other border properties.
128
  {
129
  unset($css['maxbutton']['normal']['border-color']);
133
  return $css;
134
  }
135
 
136
+ protected function checkColor($value)
137
+ {
138
+ if (! $value) // if no color value, then transparent.
139
+ $value = 'rgba(0,0,0,0)';
140
+ elseif (! maxUtils::isrgba($value) && substr($value,0,1) !== '#')
141
+ {
142
+ $value = '#' . $value;
143
+ }
144
+
145
+ return $value;
146
+ }
147
+
148
+ protected function checkBorderColor($value, $field_id, $field_data, $screenObj)
149
+ {
150
+ $border_width = $screenObj->getValue($screenObj->getFieldID('border_width'));
151
+
152
+ if ($border_width == 0)
153
+ {
154
+ return false;
155
+ }
156
+ else
157
+ return $this->checkColor($value);
158
+ }
159
 
160
+ public function admin_fields($screen) {}
161
  } // class
blocks/container.php CHANGED
@@ -9,12 +9,16 @@ use \simple_html_dom as simple_html_dom;
9
  class containerBlock extends maxBlock
10
  {
11
  protected $blockname = "container";
 
12
  protected $fields = array("container_enabled" => array("default" => "0"),
13
  "container_center_div_wrap" => array("default" => "0"),
14
 
15
  "container_width" => array("default" => "0px",
16
  "css" => "width",
17
- "csspart" => "mb-container"),
 
 
 
18
  "container_margin_top" => array("default" => "0px",
19
  "css" => "margin-top",
20
  "csspart" => "mb-container"),
@@ -35,13 +39,12 @@ class containerBlock extends maxBlock
35
 
36
  public function parse_button($domObj, $mode = 'normal')
37
  {
38
- $data = $this->data[$this->blockname];
39
  $id = $this->data["id"];
40
 
41
  if ($mode == 'editor')
42
  return $domObj; // in previews no container object
43
 
44
-
45
  if ($data["container_enabled"] == 1)
46
  {
47
  $anchor = $domObj->find("a",0);
@@ -59,15 +62,13 @@ class containerBlock extends maxBlock
59
  $domObj->load($newhtml);
60
  }
61
 
62
-
63
-
64
  return $domObj;
65
  }
66
 
67
- public function parse_css($css, $mode = 'normal')
68
  {
69
- $css = parent::parse_css($css);
70
- $data = $this->data[$this->blockname];
71
 
72
  $csspart = 'mb-container';
73
  $csspseudo = 'normal';
@@ -95,12 +96,15 @@ class containerBlock extends maxBlock
95
 
96
  }
97
 
 
 
 
 
 
98
 
99
-
100
- public function admin_fields()
101
  {
102
- $data = $this->data[$this->blockname];
103
- $admin = MB()->getClass('admin');
104
 
105
  /*foreach($this->fields as $field => $options)
106
  {
@@ -117,97 +121,132 @@ class containerBlock extends maxBlock
117
  'float: left' => 'float: left',
118
  'float: right' => 'float: right'
119
  );
 
 
 
 
120
 
121
  $icon_url = MB()->get_plugin_url() . 'images/icons/' ;
122
 
123
  $start_block = new maxField('block_start');
124
  $start_block->name = __('container', 'maxbuttons');
125
  $start_block->label = __('Container', 'maxbuttons');
126
- $admin->addField($start_block);
127
 
128
 
129
  $u_container = new maxField('switch');
130
  $u_container->label = __('Use Container', 'maxbuttons');
131
- $u_container->name = 'container_enabled';
132
  $u_container->id = $u_container->name;
133
  $u_container->help = __('Creates a container around the button which pushes other content', 'maxbuttons');
 
134
  $u_container->value = 1;
135
 
136
- $u_container->checked = checked( maxBlocks::getValue('container_enabled'), 1, false);
137
- $admin->addField($u_container, 'start', 'end');
138
 
139
  $fspacer = new maxField('spacer');
140
  $fspacer->name = '';
141
- $admin->addField($fspacer, 'start');
 
142
 
143
  $wrap_cont = new maxField('switch');
144
- $wrap_cont->name = 'container_center_div_wrap';
145
  $wrap_cont->id = $wrap_cont->name;
146
  $wrap_cont->value = 1;
147
- $wrap_cont->checked = checked( maxBlocks::getValue('container_center_div_wrap'), 1, false);
148
  $wrap_cont->label = __('Center the container', 'maxbuttons');
149
- $admin->addField($wrap_cont, '', 'end');
 
 
 
 
 
150
 
151
  $container_width = new maxField('number');
152
- $container_width->name = 'container_width';
153
  $container_width->id = $container_width->name;
154
  $container_width->min = 0;
155
- $container_width->value = maxUtils::strip_px( maxBlocks::getValue('container_width') );
156
  $container_width->label = __('Width', 'maxbuttons');
157
  $container_width->inputclass = 'small';
158
- $container_width->after_input = __('px', 'maxbuttons');
159
- $admin->addField($container_width, 'start', 'end');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
 
161
  // Margin - trouble
162
  $ptop = new maxField('number');
163
  $ptop->label = __('Margin', 'maxbuttons');
164
- $ptop->id = 'container_margin_top';
165
  $ptop->name = $ptop->id;
166
  $ptop->min = 0;
167
  $ptop->inputclass = 'tiny';
168
  $ptop->before_input = '<img src="' . $icon_url . 'p_top.png" title="' . __("Margin Top","maxbuttons") . '" >';
169
- $ptop->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_top'));
170
- $admin->addField($ptop, 'start');
171
 
172
  $pright = new maxField('number');
173
- $pright->id = 'container_margin_right';
174
  $pright->name = $pright->id;
175
  $pright->min = 0;
176
  $pright->inputclass = 'tiny';
177
  $pright->before_input = '<img src="' . $icon_url . 'p_right.png" class="icon padding" title="' . __("Margin Right","maxbuttons") . '" >';
178
- $pright->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_right'));
179
- $admin->addField($pright);
180
 
181
  $pbottom = new maxField('number');
182
- $pbottom->id = 'container_margin_bottom';
183
  $pbottom->name = $pbottom->id;
184
  $pbottom->min = 0;
185
  $pbottom->inputclass = 'tiny';
186
  $pbottom->before_input = '<img src="' . $icon_url . 'p_bottom.png" class="icon padding" title="' . __("Margin Bottom","maxbuttons") . '" >';
187
- $pbottom->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_bottom'));
188
- $admin->addField($pbottom);
189
 
190
  $pleft = new maxField('number');
191
- $pleft->id = 'container_margin_left';
192
  $pleft->name = $pleft->id;
193
  $pleft->min = 0;
194
  $pleft->inputclass = 'tiny';
195
  $pleft->before_input = '<img src="' . $icon_url . 'p_left.png" class="icon padding" title="' . __("Margin Left","maxbuttons") . '" >';
196
- $pleft->value = maxUtils::strip_px(maxBlocks::getValue('container_margin_left'));
197
- $admin->addField($pleft, '', 'end');
198
 
199
  $align = new maxField('option_select');
200
  $align->label = __('Alignment','maxbuttons');
201
- $align->name = 'container_alignment';
202
  $align->id = $align->name;
203
- $align->selected = maxBlocks::getValue('container_alignment');
204
  $align->options = $maxbuttons_container_alignments; // maxUtils::selectify($align->name, $maxbuttons_container_alignments, $align->value);
205
  $align->help = __('Float can help to align the button and other content on the same line', 'maxbuttons');
206
- $admin->addField($align, 'start', 'end');
207
 
208
- $this->sidebar();
209
  $endblock = new maxField('block_end');
210
- $admin->addField($endblock);
211
 
212
  } // admin_fields
213
 
9
  class containerBlock extends maxBlock
10
  {
11
  protected $blockname = "container";
12
+
13
  protected $fields = array("container_enabled" => array("default" => "0"),
14
  "container_center_div_wrap" => array("default" => "0"),
15
 
16
  "container_width" => array("default" => "0px",
17
  "css" => "width",
18
+ "csspart" => "mb-container",
19
+ 'unitfield' => 'container_width_unit',
20
+ ),
21
+ 'container_width_unit' => array('default' => 'pixel'),
22
  "container_margin_top" => array("default" => "0px",
23
  "css" => "margin-top",
24
  "csspart" => "mb-container"),
39
 
40
  public function parse_button($domObj, $mode = 'normal')
41
  {
42
+ $data = $this->getBlockData();
43
  $id = $this->data["id"];
44
 
45
  if ($mode == 'editor')
46
  return $domObj; // in previews no container object
47
 
 
48
  if ($data["container_enabled"] == 1)
49
  {
50
  $anchor = $domObj->find("a",0);
62
  $domObj->load($newhtml);
63
  }
64
 
 
 
65
  return $domObj;
66
  }
67
 
68
+ public function parse_css($css, $mode = 'normal', $screens)
69
  {
70
+ $css = parent::parse_css($css, $mode, $screens);
71
+ $data = $this->getBlockData();
72
 
73
  $csspart = 'mb-container';
74
  $csspseudo = 'normal';
96
 
97
  }
98
 
99
+ public function map_fields($map)
100
+ {
101
+ $map["container_width_unit"]["func"] = "updateContainerUnit";
102
+ return $map;
103
+ }
104
 
105
+ public function admin_fields($screen)
 
106
  {
107
+ $data = $this->getBlockData();
 
108
 
109
  /*foreach($this->fields as $field => $options)
110
  {
121
  'float: left' => 'float: left',
122
  'float: right' => 'float: right'
123
  );
124
+ if ($screen->is_responsive())
125
+ {
126
+ $maxbuttons_container_alignments['float: none'] = 'float: none';
127
+ }
128
 
129
  $icon_url = MB()->get_plugin_url() . 'images/icons/' ;
130
 
131
  $start_block = new maxField('block_start');
132
  $start_block->name = __('container', 'maxbuttons');
133
  $start_block->label = __('Container', 'maxbuttons');
134
+ $screen->addField($start_block);
135
 
136
 
137
  $u_container = new maxField('switch');
138
  $u_container->label = __('Use Container', 'maxbuttons');
139
+ $u_container->name = $screen->getFieldID('container_enabled');
140
  $u_container->id = $u_container->name;
141
  $u_container->help = __('Creates a container around the button which pushes other content', 'maxbuttons');
142
+ $u_container->is_responsive = false;
143
  $u_container->value = 1;
144
 
145
+ $u_container->checked = checked( $screen->getValue($u_container->id), 1, false);
146
+ $screen->addField($u_container, 'start', 'end');
147
 
148
  $fspacer = new maxField('spacer');
149
  $fspacer->name = '';
150
+ $fspacer->is_responsive = false;
151
+ $screen->addField($fspacer, 'start');
152
 
153
  $wrap_cont = new maxField('switch');
154
+ $wrap_cont->name = $screen->getFieldID('container_center_div_wrap');
155
  $wrap_cont->id = $wrap_cont->name;
156
  $wrap_cont->value = 1;
157
+ $wrap_cont->checked = checked( $screen->getValue($wrap_cont->name), 1, false);
158
  $wrap_cont->label = __('Center the container', 'maxbuttons');
159
+ $wrap_cont->is_responsive = false;
160
+ $screen->addField($wrap_cont, '', 'end');
161
+
162
+ $unit = $screen->getValue($screen->getFieldID('container_width_unit'));
163
+ $unit = ($unit == 'percent') ? '%' : 'px';
164
+
165
 
166
  $container_width = new maxField('number');
167
+ $container_width->name = $screen->getFieldID('container_width');
168
  $container_width->id = $container_width->name;
169
  $container_width->min = 0;
170
+ $container_width->value = maxUtils::strip_px( $screen->getValue($container_width->id) );
171
  $container_width->label = __('Width', 'maxbuttons');
172
  $container_width->inputclass = 'small';
173
+ $container_width->after_input = '<span class="unit">' . $unit . '</span>';
174
+ $screen->addField($container_width, 'start', 'end');
175
+
176
+ $size_spacer = new maxField('spacer');
177
+ $size_spacer->label = __('Width Unit', 'maxbuttons');
178
+ $size_spacer->name = 'size_unit_spacer';
179
+
180
+ $screen->addField($size_spacer, 'start', '');
181
+
182
+ // Units for width
183
+ $cwidth_unit_px = new maxField('radio');
184
+ $cwidth_unit_px->label = __('px', 'maxbuttons');
185
+ $cwidth_unit_px->name = $screen->getFieldID('container_width_unit');
186
+ $cwidth_unit_px->id = $screen->getFieldID('cwidth_unit_px');
187
+ $cwidth_unit_px->value = 'pixel';
188
+ //$wsize_unit_px->before_input = '<label>width</label>';
189
+ $cwidth_unit_px->checked = checked( $screen->getValue($cwidth_unit_px->name), 'pixel', false);
190
+ $screen->addField($cwidth_unit_px, 'group_start', '');
191
+
192
+ $cwidth_unit_perc = new maxField('radio');
193
+ $cwidth_unit_perc->label = __('%', 'maxbuttons');
194
+ $cwidth_unit_perc->name = $screen->getFieldID('container_width_unit');
195
+ $cwidth_unit_perc->id = $screen->getFieldID('cwidth_unit_perc');
196
+ $cwidth_unit_perc->value = 'percent';
197
+ $cwidth_unit_perc->checked = checked( $screen->getValue($cwidth_unit_perc->name), 'percent', false);
198
+ $screen->addField($cwidth_unit_perc, '', array('group_end', 'end'));
199
 
200
  // Margin - trouble
201
  $ptop = new maxField('number');
202
  $ptop->label = __('Margin', 'maxbuttons');
203
+ $ptop->id = $screen->getFieldID('container_margin_top');
204
  $ptop->name = $ptop->id;
205
  $ptop->min = 0;
206
  $ptop->inputclass = 'tiny';
207
  $ptop->before_input = '<img src="' . $icon_url . 'p_top.png" title="' . __("Margin Top","maxbuttons") . '" >';
208
+ $ptop->value = maxUtils::strip_px($screen->getValue($ptop->id));
209
+ $screen->addField($ptop, 'start');
210
 
211
  $pright = new maxField('number');
212
+ $pright->id = $screen->getFieldID('container_margin_right');
213
  $pright->name = $pright->id;
214
  $pright->min = 0;
215
  $pright->inputclass = 'tiny';
216
  $pright->before_input = '<img src="' . $icon_url . 'p_right.png" class="icon padding" title="' . __("Margin Right","maxbuttons") . '" >';
217
+ $pright->value = maxUtils::strip_px($screen->getValue($pright->id));
218
+ $screen->addField($pright);
219
 
220
  $pbottom = new maxField('number');
221
+ $pbottom->id = $screen->getFieldID('container_margin_bottom');
222
  $pbottom->name = $pbottom->id;
223
  $pbottom->min = 0;
224
  $pbottom->inputclass = 'tiny';
225
  $pbottom->before_input = '<img src="' . $icon_url . 'p_bottom.png" class="icon padding" title="' . __("Margin Bottom","maxbuttons") . '" >';
226
+ $pbottom->value = maxUtils::strip_px($screen->getValue($pbottom->id));
227
+ $screen->addField($pbottom);
228
 
229
  $pleft = new maxField('number');
230
+ $pleft->id = $screen->getFieldID('container_margin_left');
231
  $pleft->name = $pleft->id;
232
  $pleft->min = 0;
233
  $pleft->inputclass = 'tiny';
234
  $pleft->before_input = '<img src="' . $icon_url . 'p_left.png" class="icon padding" title="' . __("Margin Left","maxbuttons") . '" >';
235
+ $pleft->value = maxUtils::strip_px($screen->getValue($pleft->id));
236
+ $screen->addField($pleft, '', 'end');
237
 
238
  $align = new maxField('option_select');
239
  $align->label = __('Alignment','maxbuttons');
240
+ $align->name = $screen->getFieldID('container_alignment');
241
  $align->id = $align->name;
242
+ $align->selected = $screen->getValue($align->id);
243
  $align->options = $maxbuttons_container_alignments; // maxUtils::selectify($align->name, $maxbuttons_container_alignments, $align->value);
244
  $align->help = __('Float can help to align the button and other content on the same line', 'maxbuttons');
245
+ $screen->addField($align, 'start', 'end');
246
 
247
+ $this->sidebar($screen);
248
  $endblock = new maxField('block_end');
249
+ $screen->addField($endblock);
250
 
251
  } // admin_fields
252
 
blocks/dimension.php CHANGED
@@ -9,32 +9,37 @@ class dimensionBlock extends maxBlock
9
  protected $blockname = "dimension";
10
  protected $fields = array("button_width" => array("default" => '160px',
11
  "css" => "width",
 
 
 
12
  ),
13
  "button_height" => array("default" => '50px',
14
- "css" => "height")
 
 
 
 
 
15
  );
16
 
17
- public function parse_css($css, $mode = 'normal')
18
- {
19
- $css = parent::parse_css($css, $mode);
20
-
21
- if (! isset($css["maxbutton"]["normal"]["width"])) return $css;
22
 
23
- // do not allow zero's.
24
- if (isset($css["maxbutton"]["normal"]["width"]) && ($css["maxbutton"]["normal"]["width"] == 0 || $css["maxbutton"]["normal"]["width"] == '') )
25
- unset($css["maxbutton"]["normal"]["width"]);
26
 
27
- if (isset($css["maxbutton"]["normal"]["height"]) && ($css["maxbutton"]["normal"]["height"] == 0 || $css["maxbutton"]["normal"]["height"] == '') )
28
- unset($css["maxbutton"]["normal"]["height"]);
29
 
 
 
30
 
31
- /* if ($css["normal"]["width"] > maxbuttons_strip_px(0) || $css["normal"]["height"] > maxbuttons_strip_px(0))
 
 
32
  {
33
- $css["normal"]["display"] = "inline-block";
34
  }
35
- */
36
 
37
- return $css;
38
  }
39
 
40
  public function map_fields($map)
@@ -43,20 +48,17 @@ class dimensionBlock extends maxBlock
43
 
44
  $map["button_width"]["func"] = "updateDimension";
45
  $map["button_height"]["func"] = "updateDimension";
46
-
 
47
  return $map;
48
 
49
  }
50
 
51
 
52
- public function admin_fields()
53
  {
54
- return;
55
-
56
  } // admin_fields
57
 
58
 
59
 
60
  } // class
61
-
62
- ?>
9
  protected $blockname = "dimension";
10
  protected $fields = array("button_width" => array("default" => '160px',
11
  "css" => "width",
12
+ 'cssvalidate' => 'checkDimension', // function reference to validator.
13
+ 'unitfield' => 'button_size_unit_width',
14
+
15
  ),
16
  "button_height" => array("default" => '50px',
17
+ "css" => "height",
18
+ 'cssvalidate' => 'checkDimension',
19
+ 'unitfield' => 'button_size_unit_height',
20
+ ),
21
+ "button_size_unit_width" => array('default' => 'pixel'),
22
+ "button_size_unit_height" => array('default' => 'pixel'),
23
  );
24
 
 
 
 
 
 
25
 
26
+ /* public function parse_css($css, $mode = 'normal', $screens)
27
+ {
 
28
 
29
+ $data = $this->data[$this->blockname];
30
+ $css = parent::parse_css($css, $mode, $screens);
31
 
32
+ return $css;
33
+ } */
34
 
35
+ protected function checkDimension($value, $field_id)
36
+ {
37
+ if (intval($value) == 0) // if zero, put auto to accomodate every screen.
38
  {
39
+ return 'auto';
40
  }
 
41
 
42
+ return $value;
43
  }
44
 
45
  public function map_fields($map)
48
 
49
  $map["button_width"]["func"] = "updateDimension";
50
  $map["button_height"]["func"] = "updateDimension";
51
+ $map["button_size_unit_width"]["func"] = "updateDimension";
52
+ $map["button_size_unit_height"]["func"] = "updateDimension";
53
  return $map;
54
 
55
  }
56
 
57
 
58
+ public function admin_fields($screen)
59
  {
 
 
60
  } // admin_fields
61
 
62
 
63
 
64
  } // class
 
 
blocks/gradient.php CHANGED
@@ -13,18 +13,24 @@ class gradientBlock extends maxBlock
13
  ),
14
 
15
  "gradient_start_opacity" => array("default" => "100",
16
- "css" => "gradient-start-opacity"),
 
17
  "gradient_end_opacity" => array("default" => "100",
18
- "css" => "gradient-end-opacity"),
 
19
  "gradient_start_opacity_hover" => array("default" => "100",
20
  "css" => "gradient-start-opacity",
21
- "csspseudo" => "hover"),
 
22
  "gradient_end_opacity_hover" => array("default" => "100",
23
  "css" => "gradient-end-opacity",
24
- "csspseudo" => "hover"),
 
25
  'use_gradient' => array('default' => '0',
26
  'css' => 'gradient-use-gradient',
27
  'csspseudo' => 'normal,hover',
 
 
28
  ),
29
 
30
  );
@@ -42,24 +48,22 @@ class gradientBlock extends maxBlock
42
  return $map;
43
  }
44
 
45
-
46
- public function admin_fields()
47
  {
48
- $data = $this->data[$this->blockname];
49
- $admin = MB()->getClass('admin');
50
 
51
  $start_block = new maxField('block_start');
52
  $start_block->name = __('gradient-options', 'maxbuttons');
53
  $start_block->label = __('Background', 'maxbuttons');
54
- $admin->addField($start_block);
55
 
56
 
57
- $g_start = maxBlocks::getColorValue('gradient_start_color');
58
- $g_end = maxBlocks::getColorValue('gradient_end_color');
59
- $gh_start = maxBlocks::getColorValue('gradient_start_color_hover');
60
- $gh_end = maxBlocks::getColorValue('gradient_end_color_hover');
61
 
62
- $use_gradient = maxBlocks::getValue('use_gradient');
63
 
64
  if (! isset($data['use_gradient'] ))
65
  {
@@ -70,8 +74,7 @@ class gradientBlock extends maxBlock
70
 
71
  }
72
 
73
-
74
- $condition = array('target' => 'use_gradient', 'values' => 'checked');
75
  $gradient_conditional = htmlentities(json_encode($condition));
76
 
77
  $color_copy_self = __("Replace color from other field", "maxbuttons");
@@ -79,18 +82,18 @@ class gradientBlock extends maxBlock
79
 
80
  $useg = new maxField('switch');
81
  $useg->label = __('Use Gradients', 'maxbuttons');
82
- $useg->name = 'use_gradient';
83
  $useg->id = $useg->name;
84
  $useg->value = '1';
85
- $useg->checked = checked($use_gradient, 1, false);
86
- $admin->addField($useg, 'start', 'end');
87
 
88
  // Spacer
89
  $fspacer = new maxField('spacer');
90
  $fspacer->label = '&nbsp;';
91
  $fspacer->name = 'gradient_head';
92
  $fspacer->id = $fspacer->name;
93
- $admin->addField($fspacer, 'start');
94
 
95
 
96
  // Spacer
@@ -98,7 +101,7 @@ class gradientBlock extends maxBlock
98
  $fspacer->label = __('Start','maxbuttons');
99
  $fspacer->name = 'gradient_start';
100
  $fspacer->id = $fspacer->name;
101
- $admin->addField($fspacer, '','');
102
 
103
  // Spacer
104
  $fspacer = clone $fspacer;
@@ -106,27 +109,27 @@ class gradientBlock extends maxBlock
106
  $fspacer->name = 'gradient_end';
107
  $fspacer->id = $fspacer->name;
108
  $fspacer->conditional = $gradient_conditional;
109
- $admin->addField($fspacer, '','end');
110
 
111
 
112
  // Background Color
113
  $color = new maxField('color');
114
- $color->id = 'gradient_start_color';
115
  $color->name = $color->id;
116
  $color->value = $g_start;
117
  $color->label = __('Background color','maxbuttons');
118
  $color->inputclass = 'square';
119
  $color->copycolor = true;
120
- $color->bindto = 'gradient_end_color';
121
  $color->left_title = $color_copy_self;
122
  $color->right_title = $color_copy_move;
123
  $color->copypos = 'right';
124
 
125
- $admin->addField($color, 'start');
126
 
127
  // Background Color (End Gradient)
128
  $ecolor = new maxField('color');
129
- $ecolor->id = 'gradient_end_color';
130
  $ecolor->name = $ecolor->id;
131
  $ecolor->value = $g_end;
132
  $ecolor->inputclass = 'square';
@@ -137,26 +140,26 @@ class gradientBlock extends maxBlock
137
  $ecolor->right_title = $color_copy_self;
138
  $ecolor->conditional = $gradient_conditional;
139
 
140
- $admin->addField($ecolor, '', 'end');
141
 
142
  // Background Color Hover
143
  $color_hover = new maxField('color');
144
- $color_hover->id = 'gradient_start_color_hover';
145
  $color_hover->name = $color_hover->id;
146
  $color_hover->value = $gh_start;
147
  $color_hover->label = __('Background hover','maxbuttons');
148
  $color_hover->inputclass = 'square';
149
  $color_hover->copycolor = true;
150
- $color_hover->bindto = 'gradient_end_color_hover';
151
  $color_hover->left_title = $color_copy_self;
152
  $color_hover->right_title = $color_copy_move;
153
  $color_hover->copypos = 'right';
154
 
155
- $admin->addField($color_hover, 'start', '');
156
 
157
  // Background Color Hover
158
  $ecolor_hover = new maxField('color');
159
- $ecolor_hover->id = 'gradient_end_color_hover';
160
  $ecolor_hover->name = $ecolor_hover->id;
161
  $ecolor_hover->value = $gh_end;
162
  $ecolor_hover->inputclass = 'square';
@@ -168,77 +171,73 @@ class gradientBlock extends maxBlock
168
  $ecolor_hover->right_title = $color_copy_self;
169
  $ecolor_hover->conditional = $gradient_conditional;
170
 
171
- $admin->addField($ecolor_hover, '', 'end');
172
 
173
 
174
  $startop = new maxField('number');
175
  $startop->label = __('Normal Opacity','maxbuttons');
176
- $startop->name = 'gradient_start_opacity';
177
  $startop->id = $startop->name;
178
- $startop->value = maxUtils::strip_px( maxBlocks::getValue('gradient_start_opacity') );
179
  $startop->min = 1;
180
  $startop->max = 100;
181
  $startop->inputclass = 'small';
182
 
183
- $admin->addField($startop, 'start');
184
 
185
  $endop = new maxField('number');
186
- $endop->name = 'gradient_end_opacity';
187
  $endop->id = $endop->name;
188
- $endop->value = maxUtils::strip_px( maxBlocks::getValue('gradient_end_opacity') );
189
- $endop->setDefault(maxBlocks::getDefault('gradient_end_opacity'));
190
  $endop->min = 1;
191
  $endop->max = 100;
192
  $endop->inputclass = 'small';
193
  $endop->conditional = $gradient_conditional;
194
 
195
- $admin->addField($endop, '', 'end');
196
 
197
  $startop = new maxField('number');
198
  $startop->label = __('Hover opacity','maxbuttons');
199
- $startop->name = 'gradient_start_opacity_hover';
200
  $startop->id = $startop->name;
201
- $startop->value = maxUtils::strip_px( maxBlocks::getValue('gradient_start_opacity_hover') );
202
  //$startop->setDefault(maxBlocks::getDefault('gradient_start_opacity_hover'));
203
  $startop->min = 1;
204
  $startop->max = 100;
205
  $startop->inputclass = 'small';
206
- $admin->addField($startop, 'start');
207
 
208
  $endop = new maxField('number');
209
  // $endop->label = __('Hover Opacity','maxbuttons');
210
- $endop->name = 'gradient_end_opacity_hover';
211
  $endop->id = $endop->name;
212
- $endop->value = maxUtils::strip_px( maxBlocks::getValue('gradient_end_opacity_hover') );
213
- $endop->setDefault(maxBlocks::getDefault('gradient_end_opacity_hover'));
214
  $endop->min = 1;
215
  $endop->max = 100;
216
  $endop->inputclass = 'small';
217
  $endop->conditional = $gradient_conditional;
218
- $admin->addField($endop, '', 'end');
219
 
220
  $stop = new maxField('number');
221
  $stop->label = __('Gradient stop','maxbuttons');
222
- $stop->name = 'gradient_stop';
223
  $stop->id = $stop->name;
224
- $stop->value = maxUtils::strip_px( maxBlocks::getValue('gradient_stop') );
225
- $stop->setDefault(maxBlocks::getDefault('gradient_stop'));
226
  $stop->min = 1;
227
  $stop->max = 99;
228
  $stop->inputclass = 'small';
229
  $stop->start_conditional = $gradient_conditional;
230
 
231
- $admin->addField($stop, 'start', 'end');
232
-
233
 
234
- $this->sidebar();
235
  $endblock = new maxField('block_end');
236
- $admin->addField($endblock);
237
 
238
  } // admin_fields
239
 
240
 
241
  } // class
242
-
243
-
244
- ?>
13
  ),
14
 
15
  "gradient_start_opacity" => array("default" => "100",
16
+ "css" => "gradient-start-opacity",
17
+ 'mixin' => 'gradient'),
18
  "gradient_end_opacity" => array("default" => "100",
19
+ "css" => "gradient-end-opacity",
20
+ 'mixin' => 'gradient'),
21
  "gradient_start_opacity_hover" => array("default" => "100",
22
  "css" => "gradient-start-opacity",
23
+ "csspseudo" => "hover",
24
+ 'mixin' => 'gradient'),
25
  "gradient_end_opacity_hover" => array("default" => "100",
26
  "css" => "gradient-end-opacity",
27
+ "csspseudo" => "hover",
28
+ 'mixin' => 'gradient'),
29
  'use_gradient' => array('default' => '0',
30
  'css' => 'gradient-use-gradient',
31
  'csspseudo' => 'normal,hover',
32
+ 'mixin' => 'gradient',
33
+ 'unset_value' => 0,
34
  ),
35
 
36
  );
48
  return $map;
49
  }
50
 
51
+ public function admin_fields($screen)
 
52
  {
53
+ $data = $this->getBlockData();
 
54
 
55
  $start_block = new maxField('block_start');
56
  $start_block->name = __('gradient-options', 'maxbuttons');
57
  $start_block->label = __('Background', 'maxbuttons');
58
+ $screen->addField($start_block);
59
 
60
 
61
+ $g_start = $screen->getColorValue($screen->getFieldID('gradient_start_color'));
62
+ $g_end = $screen->getColorValue($screen->getFieldID('gradient_end_color'));
63
+ $gh_start = $screen->getColorValue($screen->getFieldID('gradient_start_color_hover'));
64
+ $gh_end = $screen->getColorValue($screen->getFieldID('gradient_end_color_hover'));
65
 
66
+ $use_gradient = $screen->getValue($screen->getFieldID('use_gradient'));
67
 
68
  if (! isset($data['use_gradient'] ))
69
  {
74
 
75
  }
76
 
77
+ $condition = array('target' => $screen->getFieldID('use_gradient'), 'values' => 'checked');
 
78
  $gradient_conditional = htmlentities(json_encode($condition));
79
 
80
  $color_copy_self = __("Replace color from other field", "maxbuttons");
82
 
83
  $useg = new maxField('switch');
84
  $useg->label = __('Use Gradients', 'maxbuttons');
85
+ $useg->name = $screen->getFieldID('use_gradient');
86
  $useg->id = $useg->name;
87
  $useg->value = '1';
88
+ $useg->checked = checked($screen->getValue($useg->name), 1, false);
89
+ $screen->addField($useg, 'start', 'end');
90
 
91
  // Spacer
92
  $fspacer = new maxField('spacer');
93
  $fspacer->label = '&nbsp;';
94
  $fspacer->name = 'gradient_head';
95
  $fspacer->id = $fspacer->name;
96
+ $screen->addField($fspacer, 'start');
97
 
98
 
99
  // Spacer
101
  $fspacer->label = __('Start','maxbuttons');
102
  $fspacer->name = 'gradient_start';
103
  $fspacer->id = $fspacer->name;
104
+ $screen->addField($fspacer, '','');
105
 
106
  // Spacer
107
  $fspacer = clone $fspacer;
109
  $fspacer->name = 'gradient_end';
110
  $fspacer->id = $fspacer->name;
111
  $fspacer->conditional = $gradient_conditional;
112
+ $screen->addField($fspacer, '','end');
113
 
114
 
115
  // Background Color
116
  $color = new maxField('color');
117
+ $color->id = $screen->getFieldID('gradient_start_color');
118
  $color->name = $color->id;
119
  $color->value = $g_start;
120
  $color->label = __('Background color','maxbuttons');
121
  $color->inputclass = 'square';
122
  $color->copycolor = true;
123
+ $color->bindto = $screen->getFieldID('gradient_end_color');
124
  $color->left_title = $color_copy_self;
125
  $color->right_title = $color_copy_move;
126
  $color->copypos = 'right';
127
 
128
+ $screen->addField($color, 'start');
129
 
130
  // Background Color (End Gradient)
131
  $ecolor = new maxField('color');
132
+ $ecolor->id = $screen->getFieldID('gradient_end_color');
133
  $ecolor->name = $ecolor->id;
134
  $ecolor->value = $g_end;
135
  $ecolor->inputclass = 'square';
140
  $ecolor->right_title = $color_copy_self;
141
  $ecolor->conditional = $gradient_conditional;
142
 
143
+ $screen->addField($ecolor, '', 'end');
144
 
145
  // Background Color Hover
146
  $color_hover = new maxField('color');
147
+ $color_hover->id = $screen->getFieldID('gradient_start_color_hover');
148
  $color_hover->name = $color_hover->id;
149
  $color_hover->value = $gh_start;
150
  $color_hover->label = __('Background hover','maxbuttons');
151
  $color_hover->inputclass = 'square';
152
  $color_hover->copycolor = true;
153
+ $color_hover->bindto = $screen->getFieldID('gradient_end_color_hover');
154
  $color_hover->left_title = $color_copy_self;
155
  $color_hover->right_title = $color_copy_move;
156
  $color_hover->copypos = 'right';
157
 
158
+ $screen->addField($color_hover, 'start', '');
159
 
160
  // Background Color Hover
161
  $ecolor_hover = new maxField('color');
162
+ $ecolor_hover->id = $screen->getFieldID('gradient_end_color_hover');
163
  $ecolor_hover->name = $ecolor_hover->id;
164
  $ecolor_hover->value = $gh_end;
165
  $ecolor_hover->inputclass = 'square';
171
  $ecolor_hover->right_title = $color_copy_self;
172
  $ecolor_hover->conditional = $gradient_conditional;
173
 
174
+ $screen->addField($ecolor_hover, '', 'end');
175
 
176
 
177
  $startop = new maxField('number');
178
  $startop->label = __('Normal Opacity','maxbuttons');
179
+ $startop->name = $screen->getFieldID('gradient_start_opacity');
180
  $startop->id = $startop->name;
181
+ $startop->value = maxUtils::strip_px( $screen->getValue($startop->id) );
182
  $startop->min = 1;
183
  $startop->max = 100;
184
  $startop->inputclass = 'small';
185
 
186
+ $screen->addField($startop, 'start');
187
 
188
  $endop = new maxField('number');
189
+ $endop->name = $screen->getFieldID('gradient_end_opacity');
190
  $endop->id = $endop->name;
191
+ $endop->value = maxUtils::strip_px( $screen->getValue($endop->id) );
192
+ $endop->setDefault($screen->getDefault('gradient_end_opacity'));
193
  $endop->min = 1;
194
  $endop->max = 100;
195
  $endop->inputclass = 'small';
196
  $endop->conditional = $gradient_conditional;
197
 
198
+ $screen->addField($endop, '', 'end');
199
 
200
  $startop = new maxField('number');
201
  $startop->label = __('Hover opacity','maxbuttons');
202
+ $startop->name = $screen->getFieldID('gradient_start_opacity_hover');
203
  $startop->id = $startop->name;
204
+ $startop->value = maxUtils::strip_px( $screen->getValue($startop->id) );
205
  //$startop->setDefault(maxBlocks::getDefault('gradient_start_opacity_hover'));
206
  $startop->min = 1;
207
  $startop->max = 100;
208
  $startop->inputclass = 'small';
209
+ $screen->addField($startop, 'start');
210
 
211
  $endop = new maxField('number');
212
  // $endop->label = __('Hover Opacity','maxbuttons');
213
+ $endop->name = $screen->getFieldID('gradient_end_opacity_hover');
214
  $endop->id = $endop->name;
215
+ $endop->value = maxUtils::strip_px( $screen->getValue($endop->id) );
216
+ $endop->setDefault($screen->getDefault('gradient_end_opacity_hover'));
217
  $endop->min = 1;
218
  $endop->max = 100;
219
  $endop->inputclass = 'small';
220
  $endop->conditional = $gradient_conditional;
221
+ $screen->addField($endop, '', 'end');
222
 
223
  $stop = new maxField('number');
224
  $stop->label = __('Gradient stop','maxbuttons');
225
+ $stop->name = $screen->getFieldID('gradient_stop');
226
  $stop->id = $stop->name;
227
+ $stop->value = maxUtils::strip_px( $screen->getValue($stop->id) );
228
+ $stop->setDefault($screen->getDefault('gradient_stop'));
229
  $stop->min = 1;
230
  $stop->max = 99;
231
  $stop->inputclass = 'small';
232
  $stop->start_conditional = $gradient_conditional;
233
 
234
+ $screen->addField($stop, 'start', 'end');
 
235
 
236
+ $this->sidebar($screen);
237
  $endblock = new maxField('block_end');
238
+ $screen->addField($endblock);
239
 
240
  } // admin_fields
241
 
242
 
243
  } // class
 
 
 
blocks/meta.php CHANGED
@@ -8,6 +8,7 @@ $blockOrder[100][] = "meta";
8
  class metaBlock extends maxBlock
9
  {
10
  protected $blockname = "meta";
 
11
  protected $fields = array("created" => array("default" => 0),
12
  "modified" => array("default" => 0),
13
  "user_created" => array("default" => ''), // user logged in on creation
@@ -18,17 +19,9 @@ class metaBlock extends maxBlock
18
  "is_virtual" => array("default" => false), // this button is not really in the database
19
  );
20
 
21
-
22
-
23
- /*function __construct()
24
- {
25
- parent::__construct();
26
-
27
- } */
28
-
29
- public function save_fields($data, $post)
30
  {
31
- $data = parent::save_fields($data,$post);
32
 
33
  $blockdata = $data[$this->blockname];
34
  $button_id = isset($data["id"]) ? $data["id"] : 0;
@@ -51,7 +44,7 @@ class metaBlock extends maxBlock
51
  }
52
 
53
 
54
- public function admin_fields()
55
  {
56
  //return false;
57
  $data = (isset($this->data[$this->blockname]) && is_array($this->data[$this->blockname])) ? $this->data[$this->blockname] : array();
@@ -112,5 +105,3 @@ class metaBlock extends maxBlock
112
  } // admin_display
113
 
114
  } // class
115
-
116
- ?>
8
  class metaBlock extends maxBlock
9
  {
10
  protected $blockname = "meta";
11
+ protected $is_responsive = false;
12
  protected $fields = array("created" => array("default" => 0),
13
  "modified" => array("default" => 0),
14
  "user_created" => array("default" => ''), // user logged in on creation
19
  "is_virtual" => array("default" => false), // this button is not really in the database
20
  );
21
 
22
+ public function save_fields($data, $post, $screens)
 
 
 
 
 
 
 
 
23
  {
24
+ $data = parent::save_fields($data,$post, $screens);
25
 
26
  $blockdata = $data[$this->blockname];
27
  $button_id = isset($data["id"]) ? $data["id"] : 0;
44
  }
45
 
46
 
47
+ public function admin_fields($screen)
48
  {
49
  //return false;
50
  $data = (isset($this->data[$this->blockname]) && is_array($this->data[$this->blockname])) ? $this->data[$this->blockname] : array();
105
  } // admin_display
106
 
107
  } // class
 
 
blocks/responsive.php CHANGED
@@ -1,570 +1,307 @@
1
  <?php
2
  namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
- $blockClass["responsive"] = "responsiveBlock";
5
- $blockOrder[90][] = "responsive";
6
 
7
- class responsiveBlock extends maxBlock
8
  {
9
- protected $blockname = 'responsive';
10
- protected $fields = array("options" => '',
11
- "auto_responsive" => array("default" => 0),
12
- "media_query" => array("default" => array()
13
- ),
14
-
15
- );
16
- // multifields for manual conversion // define +/- the same as normal fields.
17
- // to find solution in parsing stuff back to button.
18
- protected $multi_fields = array("mq_button_width" => array("default" => '0',
19
- "css" => "width",
20
- "csspseudo" => "responsive",
21
-
22
- ),
23
- "mq_button_width_unit" => array("default" => 'px',
24
- "css" => "width_unit",
25
- "csspseudo" => "responsive",
26
- ),
27
- "mq_button_height" => array("default" => '0',
28
- "css" => "height",
29
- "csspseudo" => "responsive",
30
-
31
- ),
32
- "mq_button_height_unit" => array("default" => 'px',
33
- "css" => "height_unit",
34
- "csspseudo" => "responsive",
35
- ),
36
- "mq_container_width" => array("default" => 0,
37
- "css" => "width",
38
- "csspart" => "mb-container",
39
- "csspseudo" => "responsive",
40
- ),
41
- "mq_container_float" => array("default" => "",
42
- "css" => "float",
43
- "csspart" => "mb-container",
44
- "csspseudo" => "responsive",
45
- ),
46
- "mq_container_width_unit" => array("default" => "px",
47
- "css" => "width_unit",
48
- "csspart" => "mb-container",
49
- ),
50
- "mq_font_size" => array("default" => 90,
51
- "css" => "font-size",
52
- "csspart" => "mb-text",
53
- ),
54
- "mq_font_size_unit" => array("default" => "%",
55
- "css" => "font-size_unit",
56
- "csspart" => "mb-text"),
57
-
58
- "mq_custom_minwidth" => array("default" => "0",
59
- "css" => "custom_minwidth"),
60
- "mq_custom_maxwidth" => array("default" => "0",
61
- "css" => "custom_maxwidth"),
62
- "mq_hide" => array("default" => '',
63
- "css" => "display",
64
- "csspart" => "mb-container, maxbutton, mb-center",
65
-
66
- ),
67
- );
68
-
69
-
70
- public function parse_css($css, $mode = 'normal')
71
  {
72
- if ($mode != 'normal')
73
- return $css;
74
-
75
- if (! isset($this->data[$this->blockname]))
76
- return $css;
77
-
78
- $data = $this->data[$this->blockname];
79
-
80
- if (isset($data["auto_responsive"]) && $data["auto_responsive"] == 1)
81
- { // generate auto_rules for responsive.
82
- $css["maxbutton"]["responsive"]["phone"][0]["width"] = "90%";
83
- $css["mb-container"]["responsive"]["phone"][0]["width"] = "90%";
84
- $css["mb-container"]["responsive"]["phone"][0]["float"] = "none";
85
- $css["mb-text"]["responsive"]["phone"][0]["font-size"] = "90%";
86
-
87
-
88
- if ( isset($this->data["text"]["font_size"]) )
89
- {
90
- $css["mb-text"]["responsive"]["phone"][0]["font-size"] = floor(intval($this->data["text"]["font_size"]) * 0.8) . 'px';
91
- }
92
-
93
- }
94
-
95
- if (! isset($data["media_query"]))
96
- return $css;
97
-
98
- foreach($data["media_query"] as $query => $data ):
99
- $i = 0;
100
-
101
- foreach($data as $index => $fields):
102
-
103
-
104
- foreach($fields as $field => $value)
105
- {
106
- $csspart = (isset($this->multi_fields[$field]["csspart"])) ? explode(",",$this->multi_fields[$field]["csspart"]) : array('maxbutton') ;
107
- $css_stat = $this->multi_fields[$field]["css"];
108
-
109
-
110
- if ($value == '' || $value == '0')
111
- { }
112
- elseif ($query != 'custom' && ($field == 'mq_custom_maxwidth' || $field == "mq_custom_minwidth"))
113
- { } // skip custom fields on noncustom query
114
- else
115
- {
116
- foreach($csspart as $j => $part)
117
- {
118
- $part = trim($part); // spaces in array
119
- $css[$part]["responsive"][$query][$i][$css_stat] = $value;
120
- }
121
-
122
- /* }
123
- else
124
- {
125
-
126
- $css[$csspart]["responsive"][$query][$i][$css_stat] = $value;
127
- } */
128
- }
129
-
130
- }
131
- $i++;
132
- endforeach;
133
 
134
- endforeach;
135
- return $css;
 
 
 
 
 
 
 
 
 
 
136
  }
137
-
138
 
139
- public function save_fields($data, $post)
 
140
  {
141
-
142
- $queries = (isset($post["media_query"])) ? $post["media_query"] : null;
143
- $media_queries = array();
144
-
145
- if (is_null($queries))
146
- return $data;
147
-
148
- foreach($queries as $i => $query)
149
  {
150
-
151
- if ($query != '')
 
 
 
 
 
152
  {
153
- //$media_queries[$query] = array();
154
-
155
- // collect the other fields.
156
- $c = isset($media_queries[$query]) ? count($media_queries[$query]) : 0;
157
-
158
- foreach($this->multi_fields as $field => $values)
159
- {
160
- $default = isset($values["default"]) ? $values["default"] : '';
161
-
162
- if (isset($post[$field][$i]))
163
- {
164
- $postval = $post[$field][$i];
165
- if (is_numeric($default)) // sanitize.
 
 
 
 
 
166
  {
167
- $postval = intval($postval);
 
 
168
  }
169
- else
170
- $value = sanitize_text_field($postval);
171
-
172
- $media_queries[$query][$c][$field] = $postval;
173
- }
174
- }
175
 
176
  }
 
 
 
 
 
 
177
  }
178
-
179
- $data[$this->blockname]["media_query"] = $media_queries;
180
-
181
- $data[$this->blockname]["auto_responsive"] = (isset($post["auto_responsive"])) ? $post["auto_responsive"] : 0;
182
-
 
 
 
 
 
 
183
  return $data;
184
-
185
  }
186
 
187
-
188
- public function admin_fields()
189
  {
190
- $data = isset($this->data[$this->blockname]) ? $this->data[$this->blockname] : array();
191
-
192
- $media_names = maxUtils::get_media_query(1); // nicenames
193
- $media_desc = maxUtils::get_media_query(3);
194
- $units = array("px" => __("px","maxbuttons"),
195
- "%" => __("%","maxbuttons")
196
- );
197
- $container_floats = array(
198
- "" => "",
199
- "none" => __("None","maxbuttons"),
200
- "left" => __("Left","maxbuttons"),
201
- "right" => __("Right","maxbuttons"),
202
- );
203
-
204
- foreach($this->fields as $field => $options)
205
- {
206
- $default = (isset($options["default"])) ? $options["default"] : '';
207
- $$field = (isset($data[$field])) ? $data[$field] : $default;
208
- ${$field . "_default"} = $default;
209
- }
210
-
211
- // sorting routine via array merge.
212
- $fk = array_flip(array_keys($media_query));
213
- $names_used = array_intersect_key($media_names,$fk);
214
- $media_query = array_merge($names_used,$media_query);
215
-
216
- ?>
217
- <script type='text/javascript'>
218
- var responsiveMap = '<?php echo json_encode($this->multi_fields); ?>';
219
- </script>
220
-
221
- <div class="mb_tab option-container">
222
- <div class="title"><?php _e('Responsive Settings', 'maxbuttons') ?></div>
223
- <div class="inside responsive">
224
-
225
- <div class="option-design">
226
- <p class="note"><?php _e("Responsive settings let you decide the behavior of the button on different devices and screen sizes. For instance large buttons on small screens.","maxbuttons") ?></p>
227
- <?php
228
- $auto = new maxField('switch');
229
- $auto->label = __('Auto Responsive (experimental)', 'maxinbound');
230
- $auto->name = 'auto_responsive';
231
- $auto->id = $auto->name;
232
- $auto->value = '1';
233
- $auto->checked = checked($auto_responsive, 1, false);
234
- $auto->output ('start','end');
235
- ?>
236
-
237
- <div class="clear"></div>
238
- <p class="note"><strong><?php _e("Note:","maxbuttons"); ?> </strong><?php _e(" Auto responsive settings will take a guess only on small screens. To control your responsive settings uncheck this button. This will show more options.","maxbuttons"); ?></p>
239
- </div>
240
-
241
-
242
- <div class="option-design new-query">
243
- <label for='new_query'><?php _e('New Query', 'maxbuttons') ?></label>
244
-
245
- <div class="input">
246
- <select name="new_query" id="new_query">
247
- <?php
248
-
249
- foreach ($media_names as $key => $val):
250
- $disabled = isset($media_query[$key]) && $key !== 'custom' ? ' DISABLED ' : '';
251
- ?>
252
- <option value="<?php echo $key ?>" <?php echo $disabled ?> ><?php echo $val ?></option>
253
-
254
-
255
- <?php endforeach; ?>
256
- </select>
257
- <?php //echo maxUtils::selectify("new_query",$media_names,'' ); ?>
258
- <a href='javascript:void(0)' class="button add_media_query"><?php _e("Add","maxbuttons") ?></a>
259
- </div>
260
-
261
-
262
- <div class="clear"></div>
263
- </div> <!-- option design -->
264
-
265
- <div class='option-design media_queries_options'>
266
- <?php
267
- $i = 0 ;
268
- foreach($media_query as $item => $data):
269
- foreach ($data as $index => $fields):
270
-
271
- if (! isset($fields['mq_hide']))
272
- $fields['mq_hide'] = 0;
273
-
274
- $condition = array('target' => 'mq_hide[' . $i . ']', 'values' => 'unchecked');
275
- $show_conditional = htmlentities(json_encode($condition));
276
-
277
- ?>
278
- <div class='media_query' data-query="<?php echo $item ?>" data-id="<?php echo $i ?>">
279
- <span class='removebutton dashicons dashicons-no'></span>
280
-
281
- <input type="hidden" name="media_query[<?php echo $i ?>]" value="<?php echo $item ?>">
282
- <label class='title'><?php echo $media_names[$item] ?></label>
283
- <p class='description'><?php echo $media_desc[$item] ?></p>
284
- <?php
285
- if ($item == "custom") { $custom_class = 'option custom'; } else { $custom_class = 'option custom hidden '; }
286
-
287
- $min_width = new maxField('number');
288
- $min_width->id = 'mq_custom_minwidth[' . $i . ']';
289
- $min_width->name= $min_width->id;
290
- $min_width->label = __('Min Width', 'maxbuttons');
291
- $min_width->value = $fields['mq_custom_minwidth'];
292
- $min_width->inputclass = 'small';
293
- $min_width->main_class = $custom_class; // hide label
294
- $min_width->output('start', '');
295
-
296
-
297
- $max_width = new maxField('number');
298
- $max_width->id = 'mq_custom_maxwidth[' . $i . ']';
299
- $max_width->name = $max_width->id;
300
- $max_width->label = __('Max Width','maxbuttons');
301
- $max_width->value = $fields['mq_custom_maxwidth'];
302
- $max_width->inputclass = 'small';
303
- $max_width->mainclass = $custom_class;
304
- $max_width->output('','end');
305
-
306
-
307
- $font_size = new maxField('number');
308
- $font_size->id = 'mq_font_size[' . $i . ']';
309
- $font_size->name = $font_size->id;
310
- $font_size->value = $fields['mq_font_size'];
311
- $font_size->label = __('Font Size', 'maxbuttons');
312
- $font_size->min = 0;
313
- $font_size->inputclass = 'tiny';
314
- $font_size->start_conditional = $show_conditional;
315
- $font_size->output('start', '');
316
-
317
- $fsize_unit = new maxField('generic');
318
- $fsize_unit->id = 'mq_font_size_unit[' . $i . ']';
319
- $fsize_unit->name = $fsize_unit->id;
320
- $fsize_unit->value = $fields['mq_font_size_unit'];
321
- $fsize_unit->content = maxUtils::selectify($fsize_unit->id, $units, $fsize_unit->value);
322
- // $fsize_unit->conditional = $show_conditional;
323
- $fsize_unit->output('','end');
324
-
325
- // width
326
- $width = new maxField('number');
327
- $width->id = 'mq_button_width[' . $i . ']';
328
- $width->name = $width->id;
329
- $width->value = $fields['mq_button_width'];
330
- $width->label = __('Button Width', 'maxbuttons');
331
- $width->min = 0;
332
- $width->inputclass = 'tiny';
333
- $width->start_conditional = $show_conditional;
334
- $width->output('start','');
335
-
336
- $width_unit = new maxField('generic');
337
- $width_unit->id = 'mq_button_width_unit[' . $i . ']';
338
- $width_unit->name = $width_unit->id;
339
- $width_unit->value = $fields['mq_button_width_unit'];
340
- $width_unit->content = maxUtils::selectify($width_unit->id, $units, $width_unit->value);
341
- // $width_unit->conditional = $show_conditional;
342
- $width_unit->output('','');
343
-
344
- // height
345
- $height = new maxField('number');
346
- $height->id = 'mq_button_height[' . $i . ']';
347
- $height->name = $height->id;
348
- $height->value = $fields['mq_button_height'];
349
- $height->label = __("Button Height", "maxbuttons");
350
- $height->min = 0;
351
- $height->inputclass = 'tiny';
352
- // $height->conditional = $show_conditional;
353
- $height->output('','');
354
-
355
- $height_unit = new maxField('generic');
356
- $height_unit->id = 'mq_button_height_unit[' . $i . ']';
357
- $height_unit->name = $height_unit->id;
358
- $height_unit->value = $fields['mq_button_height_unit'];
359
- $height_unit->content = maxUtils::selectify($height_unit->id, $units, $height_unit->value);
360
- // $height_unit->conditional = $show_conditional;
361
- $height_unit->output('','end');
362
-
363
- $cwidth = new maxField('number');
364
- $cwidth->id = 'mq_container_width[' . $i . ']';
365
- $cwidth->name = $cwidth->id;
366
- $cwidth->label = __('Container Width', 'maxbuttons');
367
- $cwidth->value = $fields['mq_container_width'];
368
- $cwidth->min = '0';
369
- $cwidth->inputclass = 'tiny';
370
- $cwidth->start_conditional = $show_conditional;
371
- $cwidth->output('start', '');
372
-
373
- $cwidth_unit = new maxField('generic');
374
- $cwidth_unit->id = 'mq_container_width_unit[' . $i . ']';
375
- $cwidth_unit->name = $cwidth_unit->id;
376
- $cwidth_unit->value = $fields['mq_container_width_unit'];
377
- $cwidth_unit->content = maxUtils::selectify($cwidth_unit->id, $units, $cwidth_unit->value);
378
- // $cwidth_unit->conditional = $show_conditional;
379
- $cwidth_unit->output('','end');
380
-
381
- $cfloat = new maxField('generic');
382
- $cfloat->id = 'mq_container_float[' . $i . ']';
383
- $cfloat->name = $cfloat->id;
384
- $cfloat->label = __('Container Float','maxbuttons');
385
- $cfloat->value = $fields['mq_container_float'];
386
- $cfloat->content = maxUtils::selectify($cfloat->id, $container_floats, $cfloat->value);
387
- $cfloat->start_conditional = $show_conditional;
388
- $cfloat->output('start','end');
389
-
390
- $hide = new maxField('switch');
391
- $hide->id = 'mq_hide[' . $i . ']';
392
- $hide->name = $hide->id;
393
- $hide->value = 'none';
394
- $hide->checked = checked($fields['mq_hide'], $hide->value, false);
395
- $hide->label = __('Hide button in this view','maxbuttons');
396
- $hide->output('start','end');
397
-
398
- /*
399
- $preview = new maxField('button');
400
- $preview->id = 'mq_preview[' . $i . ']';
401
- $preview->inputclass = 'responsive_preview';
402
- $preview->button_label = __('Show in preview','maxbuttons');
403
- $preview->output('', 'end');
404
- */
405
-
406
- $i++;
407
- //if ($item != 'custom')
408
- // unset($media_names[$item]); // remove existing queries from new query selection
409
- ?>
410
- </div> <!-- media query -->
411
- <?php
412
- endforeach;
413
- endforeach;
414
-
415
-
416
- ?>
417
- </div> <!-- option -design -->
418
- <div class="new_query_space"></div>
419
- </div> <!-- inside -->
420
-
421
- <input type="hidden" name="next_media_index" value="<?php echo $i ?>" >
422
-
423
- <div class='media_option_prot'>
424
-
425
- <div class='media_query' data-query=''>
426
- <span class='removebutton dashicons dashicons-no'></span>
427
-
428
- <input type="hidden" name="media_query[]" value="">
429
- <label class='title'></label>
430
- <p class='description'>&nbsp;</p>
431
- <?php
432
- $custom_class = 'option hidden custom';
433
- $condition = array('target' => 'mq_hide[]', 'values' => 'unchecked');
434
- $show_conditional = htmlentities(json_encode($condition));
435
-
436
- $min_width = new maxField('number');
437
- $min_width->id = 'mq_custom_minwidth[]';
438
- $min_width->name= $min_width->id;
439
- $min_width->label = __('Min Width', 'maxbuttons');
440
- // $min_width->value = $fields['mq_custom_minwidth'];
441
- $min_width->inputclass = 'small';
442
- $min_width->main_class = $custom_class; // hide label
443
- $min_width->output('start', '');
444
-
445
- $max_width = new maxField('number');
446
- $max_width->id = 'mq_custom_maxwidth[]';
447
- $max_width->name = $max_width->id;
448
- $max_width->label = __('Max Width','maxbuttons');
449
- // $max_width->value = $fields['mq_custom_maxwidth'];
450
- $max_width->inputclass = 'small';
451
- $max_width->mainclass = $custom_class;
452
- $max_width->output('','end');
453
-
454
-
455
- $font_size = new maxField('number');
456
- $font_size->id = 'mq_font_size[]';
457
- $font_size->name = $font_size->id;
458
- //$font_size->value = $fields['mq_font_size'];
459
- $font_size->label = __('Font Size', 'maxbuttons');
460
- $font_size->min = 0;
461
- $font_size->inputclass = 'tiny';
462
- $font_size->start_conditional = $show_conditional;
463
- $font_size->output('start', '');
464
-
465
- $fsize_unit = new maxField('generic');
466
- $fsize_unit->id = 'mq_font_size_unit[]';
467
- $fsize_unit->name = $fsize_unit->id;
468
- //$fsize_unit->value = $fields['mq_font_size_unit'];
469
- $fsize_unit->content = maxUtils::selectify($fsize_unit->id, $units, $fsize_unit->value) ;
470
- $fsize_unit->output('','end');
471
-
472
- // width
473
- $width = new maxField('number');
474
- $width->id = 'mq_button_width[]';
475
- $width->name = $width->id;
476
- //$width->value = $fields['mq_button_width'];
477
- $width->label = __('Button Width', 'maxbuttons');
478
- $width->min = 0;
479
- $width->inputclass = 'tiny';
480
- $width->start_conditional = $show_conditional;
481
- $width->output('start','');
482
-
483
- $width_unit = new maxField('generic');
484
- $width_unit->id = 'mq_button_width_unit[]';
485
- $width_unit->name = $width_unit->id;
486
- //$width_unit->value = $fields['mq_button_width_unit'];
487
- $width_unit->content = maxUtils::selectify($width_unit->id, $units, $width_unit->value);
488
- $width_unit->output('','');
489
-
490
- // height
491
- $height = new maxField('number');
492
- $height->id = 'mq_button_height[]';
493
- $height->name = $height->id;
494
- //$height->value = $fields['mq_button_height'];
495
- $height->label = __("Button Height", "maxbuttons");
496
- $height->min = 0;
497
- $height->inputclass = 'tiny';
498
- $height->output('','');
499
-
500
- $height_unit = new maxField('generic');
501
- $height_unit->id = 'mq_button_height_unit[]';
502
- $height_unit->name = $height_unit->id;
503
- // $height_unit->value = $fields['mq_button_height_unit'];
504
- $height_unit->content = maxUtils::selectify($height_unit->id, $units, $height_unit->value) ;
505
- $height_unit->output('','end');
506
-
507
- $cwidth = new maxField('number');
508
- $cwidth->id = 'mq_container_width[]';
509
- $cwidth->name = $cwidth->id;
510
- $cwidth->label = __('Container Width', 'maxbuttons');
511
- //$cwidth->value = $fields['mq_container_width'];
512
- $cwidth->min = '1';
513
- $cwidth->inputclass = 'tiny';
514
- $cwidth->start_conditional = $show_conditional;
515
- $cwidth->output('start', '');
516
-
517
- $cwidth_unit = new maxField('generic');
518
- $cwidth_unit->id = 'mq_container_width_unit[]';
519
- $cwidth_unit->name = $cwidth_unit->id;
520
- //$cwidth_unit->value = $fields['mq_container_width_unit'];
521
- $cwidth_unit->content = maxUtils::selectify($cwidth_unit->id, $units, $cwidth_unit->value);
522
- $cwidth_unit->output('','end');
523
-
524
- $cfloat = new maxField('generic');
525
- $cfloat->id = 'mq_container_float[]';
526
- $cfloat->name = $cfloat->id;
527
- $cfloat->label = __('Container Float','maxbuttons');
528
- // $cfloat->value = $fields['mq_container_float'];
529
- $cfloat->content = maxUtils::selectify($cfloat->id, $container_floats, $cfloat->value);
530
- $cfloat->start_conditional = $show_conditional;
531
- $cfloat->output('start','end');
532
-
533
- if (! isset($fields['mq_hide']))
534
- $fields['mq_hide'] = 0;
535
-
536
- $hide = new maxField('switch');
537
- $hide->id = 'mq_hide[]';
538
- $hide->name = $hide->id;
539
- $hide->value = 'none';
540
- //$hide->checked = checked($fields['mq_hide'], $hide->value, false);
541
- $hide->label = __('Hide button in this view','maxbuttons');
542
- $hide->output('start','end');
543
-
544
- /*$preview = new maxField('button');
545
- $preview->id = 'mq_preview[]';
546
- $preview->button_label = __('Show in preview','maxbuttons');
547
- $preview->output('', 'end');
548
- */
549
- ?>
550
- </div> <!-- /media-query -->
551
-
552
- </div> <!-- /media-query-prot -->
553
- <div id="media_desc">
554
- <?php foreach($media_desc as $key => $desc)
555
  {
556
- echo "<span id='$key'>$desc</span>";
557
-
558
  }
559
- ?>
560
- </div>
561
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
562
 
563
- </div> <!-- container -->
564
-
565
- <?php
566
  }
567
 
568
- } // class
 
 
 
 
 
 
569
 
570
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
+ $blockClass["responsive"] = "responsiveBlock";
5
+ $blockOrder[5][] = "responsive";
6
 
7
+ class responsiveBlock extends maxBlock
8
  {
9
+ protected $blockname = 'responsive';
10
+
11
+ protected $is_new = true;
12
+ protected $is_default = false;
13
+
14
+ protected $fields = array(
15
+ // 'dimension' => array(''),
16
+ 'min_width' => array('default' => 0),
17
+ 'max_width' => array('default' => 0),
18
+ 'hide_screen' => array('default' => 0),
19
+ 'screen_name' => array('default' => ''),
20
+ );
21
+
22
+
23
+ public function parse_css($css, $mode = 'normal', $screens)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  {
25
+ if ($mode != 'normal')
26
+ return $css;
27
+
28
+ $data = $this->data[$this->blockname];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
+ foreach($screens as $screenObj)
31
+ {
32
+ $screen_id = $screenObj->id;
33
+ foreach($this->fields as $field_id => $notused)
34
+ {
35
+ $r_field_id = $screenObj->getFieldID($field_id);
36
+ if (isset($data[$r_field_id]))
37
+ $css['maxbutton']['responsive'][$screen_id]['definition'][$field_id] = $data[$r_field_id];
38
+ }
39
+ }
40
+
41
+ return $css;
42
  }
 
43
 
44
+
45
+ public function save_fields($data, $post, $screens)
46
  {
47
+
48
+ if (isset($post['screens']))
 
 
 
 
 
 
49
  {
50
+ $block = isset($data[$this->blockname]) ? $data[$this->blockname] : array();
51
+
52
+ $standards = array('default', 'new'); // non-flexible screens (need a better var name!)
53
+ $screens_ar = $post['screens'];
54
+ $screens_ar = array_diff($screens_ar, $standards);
55
+
56
+ if (isset($post['add_new_screen']) && $post['add_new_screen'] == 'yes')
57
  {
58
+ $id = $nid = 0;
59
+ foreach($screens_ar as $screen_id)
60
+ {
61
+ $nid = filter_var($screen_id, FILTER_SANITIZE_NUMBER_INT);
62
+ if ($nid > $id)
63
+ $id = $nid; // find highest screen number
64
+ }
65
+
66
+ $id++;
67
+ $screen_id = 'rs' . $id;
68
+ $screens_ar[] = $screen_id;
69
+
70
+ $screens[] = new Screen($screen_id); // add screen so parent::save can extract values from responsive block.
71
+
72
+ // update new to id of new screen
73
+ foreach($post as $pkey => $pval)
74
+ {
75
+ if (strpos($pkey, 'new_') == 0)
76
  {
77
+ unset($post[$pkey]); // unset new_
78
+ $pkey = str_replace('new_', $screen_id . '_', $pkey); // rename to new screen name.
79
+ $post[$pkey] = $pval; // add that.
80
  }
81
+ }
82
+
 
 
 
 
83
 
84
  }
85
+
86
+ // if (count($screens_ar) > 0)
87
+ // {
88
+ $block['screens'] = $screens_ar;
89
+ $data[$this->blockname] = $block;
90
+ // }
91
  }
92
+
93
+ $data = parent::save_fields($data, $post, $screens);
94
+
95
+ // the unprefixed field (for default screen) will return default values since it doesn't exist. Don't save those.
96
+ // off for now, somehow this impedes saving properly.
97
+ /* foreach($this->fields as $fieldname => $data)
98
+ {
99
+ if (isset($data[$this->blockname][$fieldname]))
100
+ unset($data[$this->blockname][$fieldname]);
101
+ } */
102
+
103
  return $data;
104
+
105
  }
106
 
107
+ protected function getPresets($screen)
 
108
  {
109
+ $presets = array(
110
+ '1080px' => array('name' => __('Modern Smartphone (1080px)', 'maxbuttons'), 'minwidth' => 0, 'maxwidth' => 1080),
111
+ '768px' => array('name' => __('Medium Smartphone (768px)', 'maxbuttons'), 'minwidth' => 768, 'maxwidth' => 1080),
112
+ '640px' => array('name' => __('Small screen (640px)', 'maxbuttons'), 'minwidth' => 640, 'maxwidth' => 768),
113
+ '480px' => array('name' => __('Old Phone (480px)', 'maxbuttons'), 'minwidth' => 480, 'maxwidth' => 640),
114
+ );
115
+
116
+ if ($screen->is_new())
117
+ {
118
+ $presets = array_merge(array('none' => array('name' => __('No Preset', 'maxbuttons') ) ), $presets);
119
+ }
120
+
121
+ return $presets;
122
+ }
123
+
124
+
125
+ public function admin_fields($screen)
126
+ {
127
+ $admin = MB()->getClass('admin');
128
+ if ($screen->is_new())
129
+ {
130
+ $screens = Screen::getScreens();
131
+ $count = 0;
132
+ foreach($screens as $id => $sobj)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  {
134
+ if ($sobj->is_responsive())
135
+ $count++;
136
  }
137
+ if ($count >= 2 && $admin->screenLimit($count) === true)
138
+ {
139
+ $this->admin_limited($screen);
140
+ return;
141
+ }
142
+ }
143
+
144
+
145
+ // return;
146
+ $data = isset($this->data[$this->blockname]) ? $this->data[$this->blockname] : array();
147
+
148
+ $start_block = new maxField('block_start');
149
+ $start_block->name = __('responsive', 'maxbuttons');
150
+ $start_block->label = __('Screen Settings', 'maxbuttons');
151
+ $start_block->is_new = true;
152
+ $screen->addField($start_block);
153
+
154
+ $name = new maxField('text');
155
+ $name->id = $screen->getFieldID('screen_name');
156
+ $name->name = $name->id;
157
+ $name->label = __('Screen Name', 'maxbuttons');
158
+ $name->is_new = true;
159
+ $name->value = $screen->getValue($name->id);
160
+ $name->note = __('The internal name for this screen. [optional]');
161
+ $screen->addField($name, 'start', 'end');
162
+
163
+ $presets = $this->getPresets($screen);
164
+
165
+ $preset_options = array();
166
+ foreach($presets as $id => $data)
167
+ {
168
+ $preset_options[$id] = $data['name'];
169
+ }
170
+
171
+ $preset = new maxField('option_select');
172
+ $preset->id = $screen->getFieldID('preset');
173
+ $preset->name = $preset->id;
174
+ $preset->label = __('Select a Preset');
175
+ $preset->is_new = true;
176
+ $preset->options = $preset_options;
177
+ $screen->addField($preset, 'start', '');
178
+
179
+ $preset_hidden = new maxField('hidden');
180
+ $preset_hidden->id = $screen->getFieldID('preset-hidden');
181
+ $preset_hidden->name = $preset_hidden->id;
182
+ $preset_hidden->value = htmlentities(json_encode($presets));
183
+ $preset_hidden->is_new = true;
184
+ $screen->addfield($preset_hidden);
185
+
186
+ $presetgo = new maxField('button');
187
+ $presetgo->id = $screen->getFieldId('presetgo');
188
+ $presetgo->name = $presetgo->id;
189
+ $presetgo->button_label = __('Apply preset', 'maxbuttons');
190
+ $presetgo->is_new = true;
191
+ $presetgo->dataaction = 'set-preset';
192
+ $screen->addField($presetgo, '', 'end');
193
+
194
+ $spacer = new maxField('spacer');
195
+ $spacer->content = __('Selecting a preset will overwrite screen settings below', 'maxbuttons');
196
+ $spacer->label = '&nbsp';
197
+ $spacer->is_new = true;
198
+ $spacer->name = '';
199
+ $screen->addField($spacer, 'start', 'end');
200
+
201
+ $minwidth = new maxField('number');
202
+ $minwidth->id = $screen->getFieldID('min_width');
203
+ $minwidth->name = $minwidth->id;
204
+ $minwidth->label = __('Minimum Width', 'maxbuttons');
205
+ $minwidth->after_input = __('px', 'maxbuttons');
206
+ $minwidth->inputclass = 'small';
207
+ $minwidth->min = 0;
208
+ $minwidth->value = $screen->getValue($minwidth->id);
209
+ $minwidth->help = __('Smallest screen size this screen will show. 0 for all', 'maxbuttons');
210
+ $minwidth->is_new = true;
211
+ $screen->addField($minwidth, 'start', '');
212
+
213
+ $maxwidth = new maxField('number');
214
+ $maxwidth->id = $screen->getFieldID('max_width');
215
+ $maxwidth->name = $maxwidth->id;
216
+ $maxwidth->label = __('Maximum Width', 'maxbuttons');
217
+ $maxwidth->inputclass = 'small';
218
+ $maxwidth->min = -1;
219
+ $maxwidth->value = $screen->getValue($maxwidth->id);
220
+ $maxwidth->help = __('Biggest screen size this screen will show. 0 for no maximum', 'maxbuttons');
221
+ $maxwidth->is_new = true;
222
+ $maxwidth->after_input = __('px', 'maxbuttons');
223
+ $screen->addField($maxwidth, '', 'end');
224
+
225
+ // checkbox - hide mb on this view
226
+ $hide = new maxField('switch');
227
+ $hide->id = $screen->getFieldID('hide_screen');
228
+ $hide->name = $hide->id;
229
+ $hide->label = __('Hide button in this screen', 'maxbuttons');
230
+ $hide->value = 1;
231
+ $hide->checked = checked($screen->getValue($hide->id), 1, false);
232
+ $hide->help = __('When set, the button will not display at all in this screen', 'maxbuttons');
233
+ $hide->is_new = true;
234
+ $screen->addField($hide, 'start', 'end');
235
+
236
+ // only responsive screens.
237
+ $remove = new maxField('button');
238
+ $remove->id = $screen->getFieldID('remove_screen');
239
+ $remove->name = $remove->id;
240
+ $remove->inputclass = 'block-button remove-screen';
241
+ $remove->button_label = __('Remove this screen', 'maxbuttons');
242
+ $remove->value = 'BAH';
243
+ $screen->addField($remove, 'start', 'end');
244
+
245
+ // when this hidden thing is filled with yes ( via js and the button ) a new screen should be added.
246
+ $add = new maxField('hidden');
247
+ $add->id = 'add_new_screen';
248
+ $add->value = 'no';
249
+ $add->name = $add->id;
250
+ $add->is_new = true;
251
+ $add->is_responsive = false;
252
+ $screen->addField($add, '','');
253
+
254
+ $save = new maxField('button');
255
+ $save->id = $screen->getFieldID('add_screen');
256
+ $save->name = $save->id;
257
+ $save->button_label = __('Save changes and add new Screen', 'maxbuttons');
258
+ $save->inputclass = 'button-save block-button';
259
+ $save->is_responsive = false;
260
+ $save->is_new = true;
261
+ $screen->addField($save, 'start', 'end');
262
+
263
+
264
+ // remove this screen
265
+ $endblock = new maxField('block_end');
266
+ $endblock->is_new = true;
267
+ $screen->addField($endblock);
268
 
 
 
 
269
  }
270
 
271
+ private function admin_limited($screen)
272
+ {
273
+ $start_block = new maxField('block_start');
274
+ $start_block->name = __('upgrade', 'maxbuttons');
275
+ $start_block->label = __('Upgrade Today', 'maxbuttons');
276
+ $start_block->is_new = true;
277
+ $screen->addField($start_block);
278
 
279
+ $output = "<div class='upgrade-responsive'>";
280
+ $output .= "<div class='removed-note'>" . __("Save your settings first to remove the screen", 'maxbuttons') . '</div>';
281
+ $output .= '<p><h4>' . sprintf(__('You already have %s screens. To add more responsive screens to your buttons, upgrade to MaxButtons PRO.', 'maxbuttons'), $screen::countScreens() ) . '</b></h4>';
282
+ $output .= '<h4>' . __('The best button editor for WordPress includes: ') . '</h4>';
283
+ $output .= '<ul>';
284
+ $output .= '<li>' . __('Infinite amount of screens', 'maxbuttons') . '</li>';
285
+ $output .= '<li>' . __('Icons and Images', 'maxbuttons') . '</li>';
286
+ $output .= '<li>' . __('Effects', 'maxbuttons') . '</li>';
287
+ $output .= '<li>' . __('Google Fonts and Font-Awesome', 'maxbuttons') . '</li></ul>';
288
+
289
+ $output .= '<div class="button-row"><a class="button button-primary buynow" href="https://maxbuttons.com" target="_blank">' . __('Buy Now', 'maxbuttons') . '</a></div>';
290
+ $output .= '<div class="button-row"><a class="button features" href="' . admin_url('/admin.php?page=maxbuttons-pro') . '">' . __('See all features', 'maxbuttons') . '</a></div>';
291
+
292
+ $output .= '</div>';
293
+
294
+ $lim = new MaxField('generic');
295
+ $lim->content = $output;
296
+ $lim->is_new = true;
297
+ $lim->is_responsive = false;
298
+ $lim->id = 'upgrade';
299
+ $screen->addField($lim,'start','end');
300
+
301
+ $endblock = new maxField('block_end');
302
+ $endblock->is_new = true;
303
+ $screen->addField($endblock);
304
+
305
+ }
306
+
307
+ } // class
blocks/text.php CHANGED
@@ -10,7 +10,7 @@ class textBlock extends maxBlock
10
  protected $blockname = "text";
11
  protected $fields = array(
12
 
13
- "text" => array("default" => '' ),
14
  "font" => array("default" => "Tahoma",
15
  "css" => "font-family",
16
  "csspart" => 'mb-text'
@@ -18,7 +18,9 @@ class textBlock extends maxBlock
18
 
19
  "font_size" => array("default" => "15px",
20
  "css" => "font-size",
21
- "csspart" => 'mb-text' ),
 
 
22
 
23
  "text_align" => array(
24
  "default" => "center",
@@ -29,25 +31,32 @@ class textBlock extends maxBlock
29
 
30
  "font_style" => array("default" => "normal",
31
  "css" => "font-style",
32
- "csspart" => 'mb-text'),
33
-
 
34
  "font_weight" => array("default" => "normal",
35
  "css" => "font-weight",
36
- "csspart" => 'mb-text'),
 
 
37
  "text_shadow_offset_left" => array("default" => "0px",
38
  "css" => "text-shadow-left",
39
  "csspart" => 'mb-text',
40
- "csspseudo" => "normal,hover"
 
41
  ),
42
-
43
  "text_shadow_offset_top" => array("default" => "0px",
44
  "css" => "text-shadow-top",
45
  "csspart" => 'mb-text',
46
- "csspseudo" => "normal,hover"),
 
 
47
  "text_shadow_width" => array("default" => "0px",
48
  "css" => "text-shadow-width",
49
  "csspart" => 'mb-text',
50
- "csspseudo" => "normal,hover"),
 
 
51
 
52
  "padding_top" => array("default" => "18px",
53
  "css" => "padding-top",
@@ -80,14 +89,17 @@ class textBlock extends maxBlock
80
 
81
  return $map;
82
  }
83
- public function parse_css($css, $mode = 'normal')
 
 
 
84
  {
85
- $css = parent::parse_css($css);
86
 
87
- // allow for font not to be set, but default to theme
88
- $font_size = isset($css["mb-text"]["normal"]["font-size"]) ? $css["mb-text"]["normal"]["font-size"] : $this->fields['font_size']['default'];
89
  if ($font_size == 0 || $font_size == '0px')
90
- unset($css["mb-text"]["normal"]["font-size"]);
91
 
92
  $css["mb-text"]["normal"]["line-height"] = "1em";
93
  $css["mb-text"]["normal"]["box-sizing"] = "border-box"; // default.
@@ -96,9 +108,18 @@ class textBlock extends maxBlock
96
 
97
  return $css;
98
  }
 
 
 
 
 
 
 
 
 
99
  public function parse_button($domObj, $mode = 'normal')
100
  {
101
- $data = $this->data[$this->blockname];
102
  $anchor = $domObj->find("a",0);
103
 
104
  if (isset($data["text"]) && $data["text"] != '' || $mode == 'preview')
@@ -107,10 +128,10 @@ class textBlock extends maxBlock
107
 
108
  }
109
 
110
- public function admin_fields()
111
  {
112
- $data = $this->data[$this->blockname];
113
- $admin = MB()->getClass('admin');
114
 
115
  /* foreach($this->fields as $field => $options)
116
  {
@@ -126,66 +147,68 @@ class textBlock extends maxBlock
126
  $start_block = new maxField('block_start');
127
  $start_block->name = __('shadow', 'maxbuttons');
128
  $start_block->label = __('Text Shadow', 'maxbuttons');
129
- $admin->addField($start_block);
130
 
131
 
132
  // Shadow offset left
133
  $field_shadow = new maxField('number') ;
134
  $field_shadow->label = __('Shadow Offset Left', 'maxbuttons');
135
- $field_shadow->value = maxUtils::strip_px(maxBlocks::getValue('text_shadow_offset_left'));
136
- $field_shadow->id = 'text_shadow_offset_left';
 
137
  $field_shadow->name = $field_shadow->id;
138
  $field_shadow->inputclass = 'tiny';
139
- $admin->addField($field_shadow, 'start');
140
 
141
  // Shadow offset top
142
  $field_shadow = new maxField('number') ;
143
  $field_shadow->label = __('Shadow Offset Top', 'maxbuttons');
144
- $field_shadow->value = maxUtils::strip_px(maxBlocks::getValue('text_shadow_offset_top'));
145
- $field_shadow->id = 'text_shadow_offset_top';
 
146
  $field_shadow->name = $field_shadow->id;
147
  $field_shadow->inputclass = 'tiny';
148
- $admin->addField($field_shadow, '', 'end');
149
 
150
  // Shadow width
151
  $field_shadow = new maxField('number') ;
152
  $field_shadow->label = __('Shadow Blur', 'maxbuttons');
153
- $field_shadow->value = maxUtils::strip_px(maxBlocks::getValue('text_shadow_width'));
154
- $field_shadow->id = 'text_shadow_width';
155
- $field_shadow->min = 0;
156
  $field_shadow->name = $field_shadow->id;
 
 
157
  $field_shadow->inputclass = 'tiny';
158
- $admin->addField($field_shadow, 'start', 'end');
159
 
160
  // Text Color
161
  $fshadow = new maxField('color');
162
- $fshadow->id = 'text_shadow_color';
163
  $fshadow->name = $fshadow->id;
164
- $fshadow->value = maxBlocks::getColorValue('text_shadow_color');
165
  $fshadow->label = __('Shadow Color','maxbuttons');
166
  $fshadow->copycolor = true;
167
- $fshadow->bindto = 'text_shadow_color_hover';
168
  $fshadow->copypos = 'right';
169
  $fshadow->left_title = $color_copy_self;
170
  $fshadow->right_title = $color_copy_move;
171
- $admin->addField($fshadow, 'start');
172
 
173
  // Text Color Hover
174
  $fshadow_hover = new maxField('color');
175
- $fshadow_hover->id = 'text_shadow_color_hover';
176
  $fshadow_hover->name = $fshadow_hover->id;
177
- $fshadow_hover->value = maxBlocks::getColorValue('text_shadow_color_hover');
178
  $fshadow_hover->label = __('Hover','maxbuttons');
179
  $fshadow_hover->copycolor = true;
180
- $fshadow_hover->bindto = 'text_shadow_color';
181
  $fshadow_hover->copypos = 'left';
182
  $fshadow_hover->left_title = $color_copy_move;
183
  $fshadow_hover->right_title = $color_copy_self;
184
- $admin->addField($fshadow_hover, '', 'end');
185
 
186
- $this->sidebar();
187
  $endblock = new maxField('block_end');
188
- $admin->addField($endblock);
189
 
190
  } // admin fields
191
  } // class
10
  protected $blockname = "text";
11
  protected $fields = array(
12
 
13
+ "text" => array("default" => '' ),
14
  "font" => array("default" => "Tahoma",
15
  "css" => "font-family",
16
  "csspart" => 'mb-text'
18
 
19
  "font_size" => array("default" => "15px",
20
  "css" => "font-size",
21
+ "csspart" => 'mb-text',
22
+ 'cssvalidate' => 'checkFontSize',
23
+ ),
24
 
25
  "text_align" => array(
26
  "default" => "center",
31
 
32
  "font_style" => array("default" => "normal",
33
  "css" => "font-style",
34
+ "csspart" => 'mb-text',
35
+ 'unset_value' => 'normal',
36
+ ),
37
  "font_weight" => array("default" => "normal",
38
  "css" => "font-weight",
39
+ "csspart" => 'mb-text',
40
+ 'unset_value' => 'normal',
41
+ ),
42
  "text_shadow_offset_left" => array("default" => "0px",
43
  "css" => "text-shadow-left",
44
  "csspart" => 'mb-text',
45
+ "csspseudo" => "normal,hover",
46
+ 'mixin' => 'textshadow',
47
  ),
 
48
  "text_shadow_offset_top" => array("default" => "0px",
49
  "css" => "text-shadow-top",
50
  "csspart" => 'mb-text',
51
+ "csspseudo" => "normal,hover",
52
+ 'mixin' => 'textshadow',
53
+ ),
54
  "text_shadow_width" => array("default" => "0px",
55
  "css" => "text-shadow-width",
56
  "csspart" => 'mb-text',
57
+ "csspseudo" => "normal,hover",
58
+ 'mixin' => 'textshadow',
59
+ ),
60
 
61
  "padding_top" => array("default" => "18px",
62
  "css" => "padding-top",
89
 
90
  return $map;
91
  }
92
+
93
+
94
+
95
+ public function parse_css($css, $mode = 'normal', $screens)
96
  {
97
+ $css = parent::parse_css($css, $mode, $screens);
98
 
99
+ // allow for font size not to be set, but default to theme
100
+ /* $font_size = isset($css["mb-text"]["normal"]["font-size"]) ? $css["mb-text"]["normal"]["font-size"] : $this->fields['font_size']['default'];
101
  if ($font_size == 0 || $font_size == '0px')
102
+ unset($css["mb-text"]["normal"]["font-size"]); */
103
 
104
  $css["mb-text"]["normal"]["line-height"] = "1em";
105
  $css["mb-text"]["normal"]["box-sizing"] = "border-box"; // default.
108
 
109
  return $css;
110
  }
111
+
112
+ protected function checkFontSize($value)
113
+ {
114
+ if ($value == '' || intval($value) == 0)
115
+ return false;
116
+
117
+ return $value;
118
+ }
119
+
120
  public function parse_button($domObj, $mode = 'normal')
121
  {
122
+ $data = $this->getBlockData();
123
  $anchor = $domObj->find("a",0);
124
 
125
  if (isset($data["text"]) && $data["text"] != '' || $mode == 'preview')
128
 
129
  }
130
 
131
+ public function admin_fields($screen)
132
  {
133
+ $data = $this->getBlockData();
134
+ // $admin = MB()->getClass('admin');
135
 
136
  /* foreach($this->fields as $field => $options)
137
  {
147
  $start_block = new maxField('block_start');
148
  $start_block->name = __('shadow', 'maxbuttons');
149
  $start_block->label = __('Text Shadow', 'maxbuttons');
150
+ $screen->addField($start_block);
151
 
152
 
153
  // Shadow offset left
154
  $field_shadow = new maxField('number') ;
155
  $field_shadow->label = __('Shadow Offset Left', 'maxbuttons');
156
+ $field_shadow->id = $screen->getFieldID('text_shadow_offset_left');
157
+ $field_shadow->value = maxUtils::strip_px($screen->getValue($field_shadow->id));
158
+
159
  $field_shadow->name = $field_shadow->id;
160
  $field_shadow->inputclass = 'tiny';
161
+ $screen->addField($field_shadow, 'start');
162
 
163
  // Shadow offset top
164
  $field_shadow = new maxField('number') ;
165
  $field_shadow->label = __('Shadow Offset Top', 'maxbuttons');
166
+ $field_shadow->id = $screen->getFieldID('text_shadow_offset_top');
167
+ $field_shadow->value = maxUtils::strip_px($screen->getValue($field_shadow->id));
168
+
169
  $field_shadow->name = $field_shadow->id;
170
  $field_shadow->inputclass = 'tiny';
171
+ $screen->addField($field_shadow, '', 'end');
172
 
173
  // Shadow width
174
  $field_shadow = new maxField('number') ;
175
  $field_shadow->label = __('Shadow Blur', 'maxbuttons');
176
+ $field_shadow->id = $screen->getFieldID('text_shadow_width');
 
 
177
  $field_shadow->name = $field_shadow->id;
178
+ $field_shadow->value = maxUtils::strip_px($screen->getValue($field_shadow->id));
179
+ $field_shadow->min = 0;
180
  $field_shadow->inputclass = 'tiny';
181
+ $screen->addField($field_shadow, 'start', 'end');
182
 
183
  // Text Color
184
  $fshadow = new maxField('color');
185
+ $fshadow->id = $screen->getFieldID('text_shadow_color');
186
  $fshadow->name = $fshadow->id;
187
+ $fshadow->value = $screen->getColorValue($fshadow->id);
188
  $fshadow->label = __('Shadow Color','maxbuttons');
189
  $fshadow->copycolor = true;
190
+ $fshadow->bindto = $screen->getFieldID('text_shadow_color_hover');
191
  $fshadow->copypos = 'right';
192
  $fshadow->left_title = $color_copy_self;
193
  $fshadow->right_title = $color_copy_move;
194
+ $screen->addField($fshadow, 'start');
195
 
196
  // Text Color Hover
197
  $fshadow_hover = new maxField('color');
198
+ $fshadow_hover->id = $screen->getFieldID('text_shadow_color_hover');
199
  $fshadow_hover->name = $fshadow_hover->id;
200
+ $fshadow_hover->value = $screen->getColorValue($fshadow_hover->id);
201
  $fshadow_hover->label = __('Hover','maxbuttons');
202
  $fshadow_hover->copycolor = true;
203
+ $fshadow_hover->bindto = $screen->getFieldID('text_shadow_color');
204
  $fshadow_hover->copypos = 'left';
205
  $fshadow_hover->left_title = $color_copy_move;
206
  $fshadow_hover->right_title = $color_copy_self;
207
+ $screen->addField($fshadow_hover, '', 'end');
208
 
209
+ $this->sidebar($screen);
210
  $endblock = new maxField('block_end');
211
+ $screen->addField($endblock);
212
 
213
  } // admin fields
214
  } // class
blocks/tpl/color.tpl CHANGED
@@ -2,6 +2,6 @@
2
 
3
  <div class="input mbcolor alpha-color-picker %%name%%" {if:conditional}data-show="%%conditional%%"{/if:conditional}>
4
 
5
- <input type="text" name="%%name%%" id="%%id%%" class="color-field" value="%%value%%">
6
  {if:copycolor} <div class="arrows %%copypos%%" data-id="%%id%%" data-bind="%%bindto%%"><div class='right'><span class='arrow-right' title='%%right_title%%'></span></div><div class='left'><span class='arrow-left' title='%%left_title%%'></span></div></div> {/if:copycolor}
7
  </div>
2
 
3
  <div class="input mbcolor alpha-color-picker %%name%%" {if:conditional}data-show="%%conditional%%"{/if:conditional}>
4
 
5
+ <input type="text" name="%%name%%" id="%%id%%" class="mb-color-field" value="%%value%%">
6
  {if:copycolor} <div class="arrows %%copypos%%" data-id="%%id%%" data-bind="%%bindto%%"><div class='right'><span class='arrow-right' title='%%right_title%%'></span></div><div class='left'><span class='arrow-left' title='%%left_title%%'></span></div></div> {/if:copycolor}
7
  </div>
blocks/tpl/radio.tpl CHANGED
@@ -15,4 +15,6 @@
15
  {if:image} <img src='%%image%%' /> {/if:image}
16
  {if:label} %%label%% {/if:label}
17
  </label>
 
 
18
  </div>
15
  {if:image} <img src='%%image%%' /> {/if:image}
16
  {if:label} %%label%% {/if:label}
17
  </label>
18
+ {if:help}<div class="help dashicons dashicons-info "><span>%%help%%</span></div>{/if:help}
19
+
20
  </div>
blocks/tpl/radius.tpl CHANGED
@@ -1,17 +1,17 @@
1
  <div class='radius-wrap'>
2
 
3
  <div class='top'>
4
- <label>%%label_tl%%</label> %%radius_tl%% <span class="dashicons dashicons-arrow-left-alt2 rotate-right"></span>
5
 
6
  <span class="dashicons dashicons-arrow-right-alt2 rotate-left"></span> %%radius_tr%% <label>%%label_tr%%</label>
7
  </div>
8
 
9
- <div class="dashicons dashicons-%%lock%%" id='radius_toggle' data-lock='%%lock%%' tabindex='0'>&nbsp;</div>
10
-
11
- <div class='bottom'>
12
- <label>%%label_bl%%</label> %%radius_bl%% <span class="dashicons dashicons-arrow-left-alt2 rotate-left"></span>
13
 
14
  <span class="dashicons dashicons-arrow-right-alt2 rotate-right"></span> %%radius_br%% <label>%%label_br%%</label>
15
  </div>
16
-
17
  </div>
1
  <div class='radius-wrap'>
2
 
3
  <div class='top'>
4
+ <label>%%label_tl%%</label> %%radius_tl%% <span class="dashicons dashicons-arrow-left-alt2 rotate-right"></span>
5
 
6
  <span class="dashicons dashicons-arrow-right-alt2 rotate-left"></span> %%radius_tr%% <label>%%label_tr%%</label>
7
  </div>
8
 
9
+ <div class="dashicons dashicons-%%lock%%" id='%%id%%' data-lock='%%lock%%' tabindex='0'>&nbsp;</div>
10
+
11
+ <div class='bottom'>
12
+ <label>%%label_bl%%</label> %%radius_bl%% <span class="dashicons dashicons-arrow-left-alt2 rotate-left"></span>
13
 
14
  <span class="dashicons dashicons-arrow-right-alt2 rotate-right"></span> %%radius_br%% <label>%%label_br%%</label>
15
  </div>
16
+
17
  </div>
changelog.txt CHANGED
@@ -1,3 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  = 6.11.1 =
2
 
3
  * Removed holiday sale
1
+ = 6.28 =
2
+
3
+ * Tested for 4.9.4
4
+ * Improved performance of editor javascript
5
+ * Fixed issue with showing certain conditional fields
6
+ * Fixed issue in maxmodal with double init
7
+
8
+ = 6.27 =
9
+
10
+ * Tested for 4.9.2
11
+ * Security - Added rel='noopener' for links opening in new window
12
+ * Fixed missing values on a template
13
+
14
+ = 6.26.1 =
15
+
16
+ * Fixed - Advanced options
17
+
18
+ = 6.26 =
19
+
20
+ * Technical maintenance
21
+ * Tested up to 4.9.1.
22
+ * Fixed interface issue with conditional Javascript for sharing plugin
23
+
24
+ = 6.25 =
25
+
26
+ * New setting for extra URL Schemes
27
+ * Small layout color picker fix
28
+ * Renamed button title to tooltip for clarity
29
+ * Rename empty font setting to 'site default' for clarity
30
+
31
+ = 6.24 =
32
+
33
+ * Social Share deprecated. For Social Sharing please check the new MaxButton Social Share addon
34
+ * New allowed link URL schemes - ms-windows-store and steam.
35
+ * Fixed Copy Color interface
36
+ * Improvements how Modals handle scrolling
37
+ * Change / Issue in MaxCSSParser which didn't allow to properly parse Pseudo CSS element which are a parent of the main anchor class.
38
+ * Improvements in editor
39
+
40
+ = 6.23 =
41
+
42
+ * Fixed font-size in color picker styling
43
+ * Adapted to changes on color picker layout ( WP 4.9 Alpha )
44
+
45
+ = 6.22 =
46
+
47
+ * Fixed bug in External CSS function and is now working again
48
+ * Enhanced visibility of 'show shortcode examples' option
49
+
50
+ = 6.21 =
51
+
52
+ * Feature - Add simple link title to buttons plus shortcode attribute linktitle
53
+ * Updated Font Awesome override to work only where needed
54
+ * Removed PHP 5.2 check for being not functional
55
+
56
+ = 6.20.2 =
57
+
58
+ * Fixed issue with window resizes in post / page editor
59
+ * Fixed issue with Shortcake integration
60
+
61
+ = 6.20.1 =
62
+
63
+ * Fix - warnings when using Origins Sitebuilder
64
+
65
+ = 6.20 =
66
+
67
+ * Big technical update and clean up of code
68
+ * Moved plugin to proper use of namespaces
69
+ * File:// now allowed for URL's
70
+ * Moved color class to mbcolor due to frequent issues with offending plugins.
71
+ * Tested for WP 4.8
72
+
73
+
74
+ = 6.19.1 =
75
+
76
+ * Button overview loading in editor screen (fixed)
77
+
78
+ = 6.19 =
79
+
80
+ * Fixed minor security issue regarding cross-site scripting (JVN#70411623). Thanks to JPCert for responsible disclosure.
81
+ * Fixed fatal error in settings function 'reset cache'
82
+
83
+ = 6.18 =
84
+
85
+ * Fixed bug where scrollbar didn't show in Add Button dialog
86
+ * Extra check for multi-byte string support
87
+
88
+ = 6.17 =
89
+
90
+ * Button load data hook added
91
+ * Fixed - Add button dialog showing scrollbars without need in certain cases
92
+ * Fixed - Minor notice in Social share when buttons are not in database
93
+
94
+ = 6.16 =
95
+
96
+ * New option for better accuracy of preview if site theme runs 'border-box'
97
+ * Fixed Install class to check and create Social share transient table
98
+ * Added check for SimpleXML module
99
+
100
+ = 6.15 =
101
+
102
+ * New setting to solve FontAwesome conflict
103
+ * Updated settings page
104
+
105
+ = 6.14 =
106
+
107
+ * Fixed small layout issue in responsive section
108
+ * Updated copy warning to be even more clear
109
+ * Added shortcode options to FAQ
110
+
111
+ = 6.13.1 =
112
+
113
+ * Fixed error message on action buttons.
114
+
115
+ = 6.13 =
116
+
117
+ * Enter on text fields now moves to the next field
118
+ * Fixed bug that could trigger action buttons in editor when using enter button
119
+
120
+ = 6.12 =
121
+
122
+ * Updated Copy / Trash / Delete interfaces
123
+ * Fixed issue with refresh page warning when removing buttons
124
+ * Fixed Social Share Facebook count
125
+ * Fixed lower save button not working in social share
126
+ * Fixed layout issue in Social Share
127
+
128
+
129
+ == Upgrade Notice ==
130
+
131
+ = 8.0 =
132
+
133
+ *** Warning *** . This is a big upgrade. This update has major changes to responsive options. Before updating:
134
+ - Make sure you have a backup of database and/or Maxbuttons database table
135
+ - Check your buttons after updating
136
+ - Especially check your responsive buttons
137
+
138
+ = 7. 0 =
139
+
140
+ Social Share has been split of into it's own plugin. Check your site if you are using this feature.
141
+
142
+ = 4.0 =
143
+
144
+ This major update includes new Social sharing features. If you run into issues please let us know via support. Experiences are also welcome!
145
+
146
+ = 3.19 =
147
+
148
+ URL handling has been changed. If you use non-usual URL's in your buttons please let us know directly if you encounter any problems.
149
+
150
+ = 3.0 =
151
+ Attention! This is a big upgrade from 2.x. Before installation it's advised take a backup. In case your buttons don't appear after upgrading,
152
+ please try to deactivate and activate the plugin again
153
+
154
+ = 1.24.2 =
155
+ Please deactivate and then reactivate before using. If the save button does not work, be sure to clear your browser cache. Also, if the "copy and invert" button does not work, try a hard refresh of your browser or clear your cache.
156
+
157
+
158
  = 6.11.1 =
159
 
160
  * Removed holiday sale
classes/admin-class.php CHANGED
@@ -10,7 +10,6 @@ class maxButtonsAdmin
10
 
11
  protected $fields = array();
12
  protected $defined_fields = array();
13
- protected $defined_updatable = array();
14
 
15
  function __construct()
16
  {
@@ -43,110 +42,6 @@ class maxButtonsAdmin
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, $field);
60
- }
61
-
62
- /** Insert a field before or after a existing field
63
- *
64
- * @param String $insert_field Existing field to perform operation on
65
- * @param Object $field The new field to insert
66
- * @param String $start Start Template
67
- * @param String $end End template
68
- * @param String $op Insert before of after specified insert field
69
- */
70
- public function insertField($insert_field, $field, $start = 'start', $end = 'end', $op = 'before')
71
- {
72
- $insert_pos = 0;
73
-
74
- $this->addField($field, $start, $end); // add the field to the array
75
-
76
- foreach($this->fields as $field_id => $array)
77
- {
78
- if ($field_id == $insert_field)
79
- {
80
-
81
- break;
82
- }
83
- $insert_pos++;
84
- }
85
-
86
- // Find inserted field and remove it from array.
87
- $new_field_id = $field->id;
88
- $new_field_ar = $this->fields[$new_field_id];
89
- unset($this->fields[$new_field_id]);
90
-
91
- // Find position to insert new field
92
- // Yes this could be more efficient.
93
- $new_fields = array();
94
- $i = 0;
95
- foreach($this->fields as $field_id => $array)
96
- {
97
- if ($i == $insert_pos && $op == 'before')
98
- {
99
- $new_fields[$new_field_id] = $new_field_ar;
100
- }
101
- $new_fields[$field_id] = $array;
102
- if ($i == $insert_pos && $op == 'after')
103
- {
104
- $new_fields[$new_field_id] = $new_field_ar;
105
- }
106
- $i++;
107
- }
108
- $this->fields = $new_fields;
109
- }
110
-
111
- public function getFields()
112
- {
113
- return $this->fields;
114
- }
115
-
116
- public function display_fields($clean = true, $return = false)
117
- {
118
- $fields = apply_filters('mb/display_fields', $this->fields);
119
- $output = '';
120
-
121
-
122
- foreach($fields as $id => $item)
123
- {
124
- $field = $item['field'];
125
- $output .= $field->output($item['start'], $item['end']);
126
- }
127
-
128
- // auto-update system
129
- $updatable = $this->defined_updatable;
130
- foreach($updatable as $index => $field)
131
- {
132
- $updatable[$index] = '#' . $field;
133
- }
134
-
135
- $output .= ' <span class="updatables hidden">' . implode(',', $updatable) . '</span>';
136
-
137
- if ($clean)
138
- {
139
- $this->fields = array();
140
- $this->defined_updatable = array();
141
- }
142
-
143
- if (! $return)
144
- echo $output;
145
- else
146
- return $output;
147
-
148
- }
149
-
150
  /* Get multiple buttons
151
 
152
  Used for overview pages, retrieve buttons on basis of passed arguments.
@@ -154,7 +49,7 @@ class maxButtonsAdmin
154
  @return array Array of found buttons with argument
155
  */
156
 
157
- function getButtons($args = array())
158
  {
159
  $defaults = array(
160
  "status" => "publish",
@@ -222,7 +117,7 @@ class maxButtonsAdmin
222
 
223
  }
224
 
225
- function getButtonCount($args = array())
226
  {
227
  $defaults = array(
228
  "status" => "publish",
@@ -285,14 +180,21 @@ class maxButtonsAdmin
285
  "next_page" => $next_page,
286
  "total" => $total,
287
  "current" => $page,
 
288
 
 
 
289
 
290
 
291
- );
 
 
 
292
 
293
- return $return;
294
  }
295
 
 
296
  static public function getAjaxButtons($post)
297
  {
298
 
@@ -375,14 +277,16 @@ class maxButtonsAdmin
375
  $button = MB()->getClass("button");
376
  $button->set($button_id);
377
 
 
 
378
  //$data = $button->getd
379
 
380
  $data = array(
381
- 'url' => maxBlocks::getValue('url'),
382
- 'text' => maxBlocks::getValue('text'),
383
- 'new_window' => maxBlocks::getValue('new_window'),
384
- 'nofollow' => maxBlocks::getValue('nofollow'),
385
- 'link_title' => maxBlocks::getValue('link_title'),
386
  );
387
 
388
  // hook spec. qtrans.
@@ -401,7 +305,7 @@ class maxButtonsAdmin
401
  <p>' . $button->display($display_args) . '</p>
402
  <p>' . __('Change the options to add shortcode attributes. ', 'maxbuttons') . '</p>';
403
 
404
- $admin->addField($preview, 'start','end');
405
 
406
  $url = new maxField('text');
407
  $url->id = 'shortcode_url';
@@ -415,7 +319,7 @@ class maxButtonsAdmin
415
  'shortcode' => 'url',
416
  );
417
 
418
- $admin->addField($url, 'start','end');
419
 
420
  $text = new maxField('text');
421
  $text->id = 'shortcode_text';
@@ -428,13 +332,13 @@ class maxButtonsAdmin
428
  'shortcode' => 'text',
429
  );
430
 
431
- $admin->addField($text, 'start', 'end');
432
 
433
  $more = new maxField('generic');
434
  $more->name = 'more';
435
  $more->content = '<div class="more-options"><a href="#">' . __('More Options', 'maxbuttons') . '</a></div>';
436
 
437
- $admin->addField($more, 'start', 'end');
438
 
439
  $new_window = new maxField('checkbox');
440
  $new_window->id = 'shortcode_window';
@@ -451,7 +355,7 @@ class maxButtonsAdmin
451
  'unchecked' => 'same',
452
  );
453
 
454
- $admin->addField($new_window, 'start', 'end');
455
 
456
  $ffollow = new maxField('checkbox');
457
  $ffollow->label = __('Use rel="nofollow"', 'maxbuttons');
@@ -469,7 +373,7 @@ class maxButtonsAdmin
469
  );
470
 
471
 
472
- $admin->addField($ffollow, 'start','end');
473
 
474
  $field_title = new maxField('text');
475
  $field_title->label = __('Button Tooltip', 'maxbuttons');
@@ -484,7 +388,7 @@ class maxButtonsAdmin
484
  'shortcode' => 'linktitle',
485
  );
486
 
487
- $admin->addField($field_title, 'start','end');
488
 
489
  $class = new maxField();
490
  $class->id = 'shortcode_extra_classes';
@@ -499,11 +403,11 @@ class maxButtonsAdmin
499
  'shortcode' => 'extraclass',
500
  );
501
 
502
- $admin->addField($class, 'start', 'end');
503
 
504
- $shortcode_data = apply_filters('mb/media/shortcode_data', $shortcode_data);
505
 
506
- $result['output'] = '<div class="ajax-content shortcode-options">' . $admin->display_fields(true,true) . '</div>';
507
  $result['shortcodeData'] = $shortcode_data;
508
  $result['button_id'] = $button_id;
509
 
10
 
11
  protected $fields = array();
12
  protected $defined_fields = array();
 
13
 
14
  function __construct()
15
  {
42
  }
43
 
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  /* Get multiple buttons
46
 
47
  Used for overview pages, retrieve buttons on basis of passed arguments.
49
  @return array Array of found buttons with argument
50
  */
51
 
52
+ public function getButtons($args = array())
53
  {
54
  $defaults = array(
55
  "status" => "publish",
117
 
118
  }
119
 
120
+ public function getButtonCount($args = array())
121
  {
122
  $defaults = array(
123
  "status" => "publish",
180
  "next_page" => $next_page,
181
  "total" => $total,
182
  "current" => $page,
183
+ );
184
 
185
+ return $return;
186
+ }
187
 
188
 
189
+ public function screenLimit($count)
190
+ {
191
+ if ($count >= 2)
192
+ return true;
193
 
194
+ return false;
195
  }
196
 
197
+
198
  static public function getAjaxButtons($post)
199
  {
200
 
277
  $button = MB()->getClass("button");
278
  $button->set($button_id);
279
 
280
+ $screen = new Screen('default');
281
+
282
  //$data = $button->getd
283
 
284
  $data = array(
285
+ 'url' => $screen->getValue('url'),
286
+ 'text' => $screen->getValue('text'),
287
+ 'new_window' => $screen->getValue('new_window'),
288
+ 'nofollow' => $screen->getValue('nofollow'),
289
+ 'link_title' => $screen->getValue('link_title'),
290
  );
291
 
292
  // hook spec. qtrans.
305
  <p>' . $button->display($display_args) . '</p>
306
  <p>' . __('Change the options to add shortcode attributes. ', 'maxbuttons') . '</p>';
307
 
308
+ $screen->addField($preview, 'start','end');
309
 
310
  $url = new maxField('text');
311
  $url->id = 'shortcode_url';
319
  'shortcode' => 'url',
320
  );
321
 
322
+ $screen->addField($url, 'start','end');
323
 
324
  $text = new maxField('text');
325
  $text->id = 'shortcode_text';
332
  'shortcode' => 'text',
333
  );
334
 
335
+ $screen->addField($text, 'start', 'end');
336
 
337
  $more = new maxField('generic');
338
  $more->name = 'more';
339
  $more->content = '<div class="more-options"><a href="#">' . __('More Options', 'maxbuttons') . '</a></div>';
340
 
341
+ $screen->addField($more, 'start', 'end');
342
 
343
  $new_window = new maxField('checkbox');
344
  $new_window->id = 'shortcode_window';
355
  'unchecked' => 'same',
356
  );
357
 
358
+ $screen->addField($new_window, 'start', 'end');
359
 
360
  $ffollow = new maxField('checkbox');
361
  $ffollow->label = __('Use rel="nofollow"', 'maxbuttons');
373
  );
374
 
375
 
376
+ $screen->addField($ffollow, 'start','end');
377
 
378
  $field_title = new maxField('text');
379
  $field_title->label = __('Button Tooltip', 'maxbuttons');
388
  'shortcode' => 'linktitle',
389
  );
390
 
391
+ $screen->addField($field_title, 'start','end');
392
 
393
  $class = new maxField();
394
  $class->id = 'shortcode_extra_classes';
403
  'shortcode' => 'extraclass',
404
  );
405
 
406
+ $screen->addField($class, 'start', 'end');
407
 
408
+ $shortcode_data = apply_filters('mb/media/shortcode_data', $shortcode_data, $screen);
409
 
410
+ $result['output'] = '<div class="ajax-content shortcode-options">' . $screen->display_fields(true,true) . '</div>';
411
  $result['shortcodeData'] = $shortcode_data;
412
  $result['button_id'] = $button_id;
413
 
classes/block.php CHANGED
@@ -13,6 +13,11 @@ defined('ABSPATH') or die('No direct access permitted');
13
  abstract class maxBlock
14
  {
15
  protected $data = array();
 
 
 
 
 
16
 
17
  /** Block constructor
18
  *
@@ -35,21 +40,36 @@ abstract class maxBlock
35
  *
36
  * @return $data Array
37
  */
38
- public function save_fields($data, $post)
39
  {
40
- $block = isset($this->data[$this->blockname]) ? $this->data[$this->blockname] : array();
41
 
42
  foreach($this->fields as $field => $options)
43
  {
44
- $default = (isset($options["default"])) ? $options["default"] : '';
45
- if (is_string($default) && strpos($default,"px") !== false)
46
- $block[$field] = (isset($post[$field]) ) ? intval($post[$field]) : $default;
47
- elseif( isset($post[$field]) && is_array($post[$field]))
48
  {
49
- $block[$field] = $post[$field];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
- else
52
- $block[$field] = (isset($post[$field])) ? sanitize_text_field($post[$field]) : $default;
53
  }
54
 
55
  $data[$this->blockname] = $block;
@@ -57,6 +77,39 @@ abstract class maxBlock
57
 
58
  }
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  /** Return fields of current block
61
  *
62
  * Will return fields of current block only
@@ -80,26 +133,35 @@ abstract class maxBlock
80
  return false;
81
  }
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
  /* Build the Block admin interface
85
  *
86
  * Builds admin interface via Admin class ( addfield ). After building, display fields should be called.
87
  * @abstract
88
  */
89
- abstract public function admin_fields();
90
- public function display_fields()
91
- {
92
- $admin = MB()->getClass('admin');
93
- $admin->display_fields();
94
 
95
- }
96
 
97
  /** Adding a sidebar **
98
  *
99
  * This function can be used to add a sidebar to the block. The sidebar should be called before display_fields is put out but after the last field
100
  *
101
  * */
102
- public function sidebar()
103
  {
104
  return;
105
  }
@@ -128,51 +190,163 @@ abstract class maxBlock
128
  *
129
  * @return $css Array
130
  */
131
- public function parse_css($css, $mode = 'normal') {
132
 
133
- $data = $this->data[$this->blockname];
134
 
135
  // get all fields from this block
136
- foreach($this->fields as $field => $field_data)
 
137
  {
138
- // get cssparts, can be comma-seperated value
139
- $csspart = (isset($field_data["csspart"])) ? explode(",",$field_data["csspart"]) : array('maxbutton');
140
- $csspseudo = (isset($field_data["csspseudo"])) ? explode(",", $field_data["csspseudo"]) : 'normal';
141
 
142
- // if this field has a css property
143
- if (isset($field_data["css"]))
144
  {
145
- // get the property value from the data
146
- $value = isset($data[$field]) ? $data[$field] : '';
147
- $value = str_replace(array(";"), '', $value); //sanitize
 
148
 
149
- if (isset($field_data["default"]) && strpos($field_data["default"],"px") && ! strpos($value,"px"))
150
- {
151
- if ($value == '') $value = 0; // pixel values, no empty but 0
152
- $value .= "px";
153
- }
154
- elseif (isset($field_data["default"]) && strpos($field_data["default"],"%") && ! strpos($value,"%"))
155
- {
156
- if ($value == '') $value = 0; // pixel values, no empty but 0
157
- $value .= "%";
158
- }
159
- if (isset($data[$field]))
160
- {
161
- foreach($csspart as $part)
162
- {
163
- if (is_array($csspseudo))
164
- {
165
- foreach($csspseudo as $pseudo)
166
- $css[$part][$pseudo][$field_data["css"]] = $value ;
167
- }
168
- else
169
- $css[$part][$csspseudo][$field_data["css"]] = $value ;
170
- }
171
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  }
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  }
175
 
 
176
  return $css;
177
  }
178
 
@@ -218,6 +392,10 @@ abstract class maxBlock
218
  else if ( isset($field_data["default"]) && strpos($field_data["default"],"%") != false )
219
  $map[$field]["css_unit"] = '%';
220
 
 
 
 
 
221
  }
222
  if (isset($field_data["csspart"]))
223
  $map[$field]["csspart"] = $field_data["csspart"];
@@ -240,4 +418,10 @@ abstract class maxBlock
240
  $this->data = $dataArray;
241
  }
242
 
 
 
 
 
 
 
243
  }
13
  abstract class maxBlock
14
  {
15
  protected $data = array();
16
+ protected $is_default = true; // exclude / include a whole block in default screen
17
+ protected $is_responsive = true; // exclude / include a whole block in responsive screens.
18
+ protected $is_new = false; // only display when adding a screen.
19
+
20
+
21
 
22
  /** Block constructor
23
  *
40
  *
41
  * @return $data Array
42
  */
43
+ public function save_fields($data, $post, $screens)
44
  {
45
+ $block = isset($data[$this->blockname]) ? $data[$this->blockname] : array();
46
 
47
  foreach($this->fields as $field => $options)
48
  {
49
+ $block[$field]= $this->getFieldSaveValue($field, $options, $post, false);
50
+
51
+ if (is_array($screens))
 
52
  {
53
+ foreach($screens as $screenObj)
54
+ {
55
+ if ($screenObj->is_responsive())
56
+ {
57
+ $r_field_id = $screenObj->getFieldID($field);
58
+ $r_field_val = $this->getFieldSaveValue($r_field_id, $options, $post, true);
59
+
60
+ // if responsive value is different than the main field -> changes has been made, only save changes.
61
+ if ($r_field_val !== false && $r_field_val != $block[$field])
62
+ {
63
+ $block[$r_field_id] = $r_field_val;
64
+ }
65
+ elseif (isset($block[$r_field_id])) // if field is same as main, but exists (changing values), remove it.
66
+ {
67
+ unset($block[$r_field_id]);
68
+ }
69
+ }
70
+ }
71
  }
72
+
 
73
  }
74
 
75
  $data[$this->blockname] = $block;
77
 
78
  }
79
 
80
+ /**
81
+ * @param $field ID of the field ( with screen prefix )
82
+ * @param $options Options contained in the field.
83
+ * @param $post Array of what was in the post
84
+ * @param $is_responsive This field is part of a responsive screen
85
+ */
86
+ private function getFieldSaveValue($field, $options, $post, $is_responsive = false)
87
+ {
88
+
89
+ $default = (isset($options["default"])) ? $options["default"] : '';
90
+ if ($is_responsive)
91
+ $default = false; // don't write defaults for responsive screens, omit.
92
+
93
+ $value = $default;
94
+
95
+ if (is_string($default) && strpos($default,"px") !== false)
96
+ $value = (isset($post[$field]) ) ? intval($post[$field]) : $default;
97
+ elseif( isset($post[$field]) && is_array($post[$field]))
98
+ {
99
+ $value = $post[$field];
100
+ }
101
+ elseif (isset($post[$field]))
102
+ {
103
+ $value = sanitize_text_field($post[$field]);
104
+ }
105
+ elseif (isset($options['unset_value'])) // option when field is unset in post, give it a value still ( checkboxes etc ) . Overrides default.
106
+ {
107
+ $value = $options['unset_value'];
108
+ }
109
+
110
+ return $value;
111
+ }
112
+
113
  /** Return fields of current block
114
  *
115
  * Will return fields of current block only
133
  return false;
134
  }
135
 
136
+ public function is_responsive()
137
+ {
138
+ return $this->is_responsive;
139
+ }
140
+
141
+ public function is_default()
142
+ {
143
+ return $this->is_default;
144
+ }
145
+
146
+ public function is_new()
147
+ {
148
+ return $this->is_new;
149
+ }
150
 
151
  /* Build the Block admin interface
152
  *
153
  * Builds admin interface via Admin class ( addfield ). After building, display fields should be called.
154
  * @abstract
155
  */
156
+ abstract public function admin_fields($screen);
 
 
 
 
157
 
 
158
 
159
  /** Adding a sidebar **
160
  *
161
  * This function can be used to add a sidebar to the block. The sidebar should be called before display_fields is put out but after the last field
162
  *
163
  * */
164
+ public function sidebar($screen)
165
  {
166
  return;
167
  }
190
  *
191
  * @return $css Array
192
  */
193
+ public function parse_css($css, $mode = 'normal', $screens) {
194
 
195
+ $data = $this->getBlockData();
196
 
197
  // get all fields from this block
198
+
199
+ foreach($screens as $screenObj) // these are our screens.
200
  {
201
+ $mixins = array();
 
 
202
 
203
+ foreach($this->fields as $field => $field_data)
 
204
  {
205
+ $field_id = $screenObj->getFieldID($field);
206
+ //$css = $this->parseField($css, $field, $field, $field_data);
207
+ if (isset($data[$field_id]) )
208
+ {
209
 
210
+ $css = $this->parseField($css, $field_id, $data[$field_id], $field_data, $screenObj);
211
+ if (isset($field_data['mixin']) && $screenObj->is_responsive()) // garantuee the whole mixin is present.
212
+ {
213
+
214
+ $mixin = $field_data['mixin'];
215
+ maxBlocks::addMixin($mixin, $field, $screenObj->id);
216
+ }
217
+ }
218
+ } // fields
219
+
220
+ // check the mixins. This checks the field, not field_id since for responsive it'll need to add from the default screen when completing the data.
221
+ } // screens
222
+
223
+ /* foreach($responsive_mixins as $screen_id => $mixin_data)
224
+ {
225
+ foreach($mixin_data as $mixName => $field)
226
+ {
227
+
228
+ }
229
+ } */
230
+
231
+ return $css;
232
+ }
233
+
234
+ public function parsefix_mixins($css, $screens)
235
+ {
236
+ // $mixins = MaxBLocks::getMixins();
237
+ $data = $this->getBlockData();
238
+
239
+ foreach($screens as $screenObj) // these are our screens.
240
+ {
241
+ if (! $screenObj->is_responsive())
242
+ continue;
243
+
244
+ foreach($this->fields as $field => $field_data)
245
+ {
246
+ $field_id = $screenObj->getFieldID($field);
247
+ if (isset($field_data['mixin']))
248
+ {
249
+ $mixarray = maxBlocks::getMixins($field_data['mixin'], $screenObj->id); //$mixins[$field_data['mixin']];
250
+
251
+ if (count($mixarray) == 0) // mixin not in use.
252
+ continue;
253
+
254
+ if (! in_array($field, $mixarray))
255
+ {
256
+ $mixvalue = isset($data[$field]) ? $data[$field] : ''; // get extra data from the default screen
257
+ // echo " adding $field as $mixvalue ( on $screenObj->id) <BR> ";
258
+ $css = $this->parseField($css, $field, $mixvalue, $field_data, $screenObj);
259
+ }
260
+ }
261
+ }
262
+ // }
263
+ }
264
+ return $css;
265
+
266
+ }
267
+
268
+ /** Parses a field.
269
+ *
270
+ * @param $css The CSS collection Being parsed
271
+ * @param $field_id The name of the field, this can be with screen_id prefixed
272
+ * @param $value The value of the field.
273
+ * @param $field_data Data of the field
274
+ * @param $screenObj Object of the current screen.
275
+ * @return Array CSS after parsed field.
276
+ */
277
+ protected function parseField($css, $field_id, $value, $field_data, $screenObj)
278
+ {
279
+ // $data = $this->data[$this->blockname];
280
+ // get cssparts, can be comma-seperated value
281
+ $csspart = (isset($field_data["csspart"])) ? explode(",",$field_data["csspart"]) : array('maxbutton');
282
+ $csspseudo = (isset($field_data["csspseudo"])) ? explode(",", $field_data["csspseudo"]) : 'normal';
283
+
284
+ $is_responsive = ($screenObj->is_responsive() ) ? true : false;
285
+ $screen_id = $screenObj->id;
286
+
287
+ // if this field has a css property
288
+ if (isset($field_data["css"]))
289
+ {
290
+ // get the property value from the data
291
+ // $value = isset($data[$field_id]) ? $data[$field_id] : '';
292
+ $value = str_replace(array(";"), '', $value); //sanitize
293
+
294
+ if (isset($field_data['unitfield']) && ! strpos($value,"px"))
295
+ {
296
+ if ($value == '') $value = 0; // pixel values, no empty but 0
297
+ $unitfield = $screenObj->getFieldID($field_data['unitfield']);
298
+
299
+ $unit = isset($this->data[$this->blockname][$unitfield]) ? $this->data[$this->blockname][$unitfield] : false;
300
+
301
+ $value .= ($unit == 'percent') ? '%' : 'px';
302
+ }
303
+ elseif (isset($field_data["default"]) && strpos($field_data["default"],"px") && ! strpos($value,"px"))
304
+ {
305
+ if ($value == '') $value = 0; // pixel values, no empty but 0
306
+ $value .= "px";
307
+ }
308
+ elseif (isset($field_data["default"]) && strpos($field_data["default"],"%") && ! strpos($value,"%"))
309
+ {
310
+ if ($value == '') $value = 0; // pixel values, no empty but 0
311
+ $value .= "%";
312
+ }
313
+
314
+ /** CSSvalidate is a function reference for further shaping the value based on specific wishes.
315
+ * Can return a new value, or false which indicates removal. This aims to replace block specific parse_css functions.
316
+ */
317
+ if (isset($field_data['cssvalidate']))
318
+ {
319
+ $value = $this->{$field_data['cssvalidate']}($value, $field_id, $field_data, $screenObj);
320
+ if ($value == false) // don't add this field anywhere.
321
+ return $css;
322
  }
323
 
324
+ foreach($csspart as $part)
325
+ {
326
+ if (is_array($csspseudo))
327
+ {
328
+ foreach($csspseudo as $pseudo)
329
+ {
330
+ if ($is_responsive)
331
+ $css[$part]['responsive'][$screen_id][$pseudo][$field_data["css"]] = $value ;
332
+ else
333
+ $css[$part][$pseudo][$field_data["css"]] = $value ;
334
+ }
335
+ }
336
+ else
337
+ {
338
+ if ($is_responsive)
339
+ $css[$part]['responsive'][$screen_id][$csspseudo][$field_data["css"]] = $value ;
340
+ else
341
+ $css[$part][$csspseudo][$field_data["css"]] = $value ;
342
+ }
343
+ }
344
+
345
+
346
+
347
  }
348
 
349
+
350
  return $css;
351
  }
352
 
392
  else if ( isset($field_data["default"]) && strpos($field_data["default"],"%") != false )
393
  $map[$field]["css_unit"] = '%';
394
 
395
+ if (isset($field_data['unitfield']))
396
+ {
397
+ $map[$field]['unitfield'] = $field_data['unitfield'];
398
+ }
399
  }
400
  if (isset($field_data["csspart"]))
401
  $map[$field]["csspart"] = $field_data["csspart"];
418
  $this->data = $dataArray;
419
  }
420
 
421
+ // simple util function to get blockdata.
422
+ protected function getBlockData()
423
+ {
424
+ return (isset($this->data[$this->blockname])) ? $this->data[$this->blockname] : array();
425
+ }
426
+
427
  }
classes/blocks.php CHANGED
@@ -18,6 +18,8 @@ class maxBlocks
18
  protected static $data; // full data array
19
  protected static $fields = array(); // all fields
20
 
 
 
21
  public static function init()
22
  {
23
 
@@ -102,22 +104,6 @@ class maxBlocks
102
  }
103
 
104
 
105
- public static function setData($data)
106
- {
107
- $new_data = array(); //egalite
108
- if (! is_array($data) || count($data) == 0) // no data
109
- return false;
110
-
111
- foreach($data as $block => $fields)
112
- {
113
- if (is_array($fields))
114
- $new_data = array_merge($new_data, $fields);
115
- }
116
-
117
-
118
- self::$data = $new_data;
119
- }
120
-
121
  public static function add($block)
122
  {
123
  $name = $block->get_name();
@@ -126,40 +112,39 @@ class maxBlocks
126
  static::$fields = array_merge(self::$fields, $block->get_fields());
127
  }
128
 
129
- public static function getValue($fieldname)
130
  {
131
-
132
- if (isset(self::$data[$fieldname]))
133
- return self::$data[$fieldname];
134
- if (isset(self::$fields[$fieldname]))
135
- return self::$fields[$fieldname]['default'];
136
-
137
- return false; // dunno.
138
  }
139
 
140
- public static function getColorValue($fieldname)
 
 
 
 
141
  {
142
- $value = self::getValue($fieldname);
143
- if (maxUtils::isrgba($value))
144
- return $value;
145
-
146
- if (! $value )
147
- return false;
148
- if (substr($value,0,1) !== '#')
149
  {
150
- $value = '#' . $value;
151
  }
152
- return $value;
 
 
 
 
153
  }
154
 
155
- public static function getDefault($fieldname)
156
  {
157
- if (isset(self::$fields[$fieldname]['default']))
158
- return self::$fields[$fieldname]['default'];
159
-
160
- return false; // dunno
161
 
162
  }
163
 
164
-
165
  }
18
  protected static $data; // full data array
19
  protected static $fields = array(); // all fields
20
 
21
+ protected static $mixins;
22
+
23
  public static function init()
24
  {
25
 
104
  }
105
 
106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  public static function add($block)
108
  {
109
  $name = $block->get_name();
112
  static::$fields = array_merge(self::$fields, $block->get_fields());
113
  }
114
 
115
+ public static function getFieldDefinition($field_name)
116
  {
117
+ if (isset(self::$fields[$field_name]))
118
+ {
119
+ return self::$fields[$field_name];
120
+ }
121
+ return false;
 
 
122
  }
123
 
124
+ /** Temporary store a mixin to be used later for compat across screens
125
+ * @param $name String Name of the mixin, from fields array
126
+ * @param $field String Name of field.
127
+ */
128
+ public static function addMixin($name, $field, $screen_id)
129
  {
130
+ if (! isset(self::$mixins[$screen_id]))
 
 
 
 
 
 
131
  {
132
+ self::$mixins[$screen_id] = array();
133
  }
134
+ if (! isset(self::$mixins[$screen_id][$name]))
135
+ {
136
+ self::$mixins[$screen_id][$name] = array();
137
+ }
138
+ self::$mixins[$screen_id][$name][] = $field;
139
  }
140
 
141
+ public static function getMixins($name, $screen_id)
142
  {
143
+ if (isset(self::$mixins[$screen_id][$name]))
144
+ return self::$mixins[$screen_id][$name];
145
+ else
146
+ return array();
147
 
148
  }
149
 
 
150
  }
classes/button.php CHANGED
@@ -79,7 +79,7 @@ class maxButton
79
  $this->clear(); // init
80
  }
81
 
82
- /** Simple function to retrieve loaded blocks - * Used by install class */
83
  public function getBlocks()
84
  {
85
  return $this->blocks;
@@ -138,7 +138,7 @@ class maxButton
138
  $this->button_css = array();
139
  $this->button_js = array();
140
  $this->data = array('id' => 0);
141
- $this->data = $this->save(array(),false);
142
  $this->updated = 0;
143
 
144
  $this->cache = '';
@@ -148,7 +148,7 @@ class maxButton
148
  {
149
  $block->set($this->data); // reset blocks
150
  }
151
- maxBlocks::setData($this->data);
152
  }
153
 
154
  function setupData($data)
@@ -166,7 +166,6 @@ class maxButton
166
  {
167
  $this->data[$block_name] = json_decode($data[$block_name], true);
168
  }
169
-
170
  }
171
  }
172
 
@@ -188,18 +187,23 @@ class maxButton
188
  $block->set($this->data);
189
  }
190
 
191
-
192
- maxBlocks::setData($this->data);
193
-
194
-
195
  return true;
 
 
 
 
 
 
 
 
196
 
 
197
  }
198
 
199
  function get( )
200
  {
201
  return $this->data;
202
-
203
  }
204
 
205
  public function getID()
@@ -252,6 +256,15 @@ class maxButton
252
 
253
  return $this->cssParser;
254
  }
 
 
 
 
 
 
 
 
 
255
  // get the cache
256
  function getCache()
257
  {
@@ -264,15 +277,7 @@ class maxButton
264
  $this->cache = $cache;
265
  }
266
 
267
- /* Used by collections and import. Use sparingly. Button data is reput to blocks on display */
268
- function setData($blockname, $data )
269
- {
270
- foreach($data as $key => $value)
271
- {
272
- $this->data[$blockname][$key] = $value;
273
 
274
- }
275
- }
276
 
277
  /* Parse CSS from the elements
278
 
@@ -299,12 +304,34 @@ class maxButton
299
  }
300
  else
301
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  /* Internal filter, please don't use */
303
  foreach($this->blocks as $block)
304
  {
305
- $css = $block->parse_css($css, $mode);
 
 
 
 
 
 
306
  }
307
 
 
308
  /* Filter the raw CSS array before compile
309
 
310
  This filters passes an array with all CSS elements before compile time. This should be CSS elements that can be understood by the CSS parser.
@@ -314,10 +341,11 @@ class maxButton
314
 
315
  $css = apply_filters('mb/button/rawcss', $css, $mode);
316
 
317
- //echo "<PRE>"; print_r($css); echo "</PRE>";
318
- $this->button_css = $css;
319
 
 
 
320
  $css = $this->getCSSParser()->parse($this->button_css);
 
321
  $css = apply_filters('mb/button/compiledcss', $css, $mode); // the final result.
322
 
323
  if ($mode == 'normal') // only in general mode, otherwise things go amiss.
@@ -327,7 +355,6 @@ class maxButton
327
 
328
  $this->parsed_css = $css;
329
 
330
-
331
  return $css;
332
  }
333
 
@@ -374,6 +401,8 @@ class maxButton
374
 
375
  $classes = implode(' ', $classes);
376
 
 
 
377
  $domObj = new simple_html_dom();
378
  $domObj->load('<a class="' . $classes . '"></a>');
379
 
@@ -391,17 +420,6 @@ class maxButton
391
  return $domObj;
392
  }
393
 
394
- /* Display all data and html to allow users to edit button settings */
395
- public function admin_fields()
396
- {
397
- foreach($this->blocks as $block)
398
- {
399
- $block->admin_fields();
400
- $block->display_fields();
401
- }
402
-
403
- }
404
-
405
  protected function post_parse_button($domObj, $mode)
406
  {
407
  foreach($this->blocks as $block)
@@ -538,7 +556,10 @@ class maxButton
538
  elseif ($this->load_css == 'element') // not possible to load both normal and hover to an element.
539
  {
540
  $domObj->find('a',0)->class .= ' normal';
541
- $domObj = $this->cssParser->outputInline($domObj);
 
 
 
542
  }
543
 
544
 
@@ -555,24 +576,7 @@ class maxButton
555
  return $output;
556
 
557
  }
558
- /* Function used to map field id's to display for Frontend Javascript
559
 
560
- This function bundles all defined fields into a json encoded variable. This is used for the frontend javascript functions in the
561
- administrator area like colorpickers and real-time updating of the button preview
562
- */
563
- public function display_field_map()
564
- {
565
- $map = array();
566
- foreach($this->blocks as $block)
567
- {
568
- $map = $block->map_fields($map);
569
- }
570
-
571
- echo "<script language='javascript'>";
572
- echo "var buttonFieldMap = '" . json_encode($map) . "';" ;
573
- echo "</script>";
574
-
575
- }
576
 
577
  /* Write parsed CSS to output.
578
  @param echo Default true. When true, outputs directly, otherwise returns output string
@@ -667,16 +671,28 @@ class maxButton
667
  Updates or saves the button. Existing buttons must load their data and be set -first- or lose all not-passed data.
668
 
669
  @param post Post data in field - value format (flat $_POST array)
 
670
  @param boolean savedb if false do not save to database
671
  */
672
- public function save($post, $savedb = true)
673
  {
674
  $post = stripslashes_deep($post); // don't multiply slashes please.
675
  $data = $this->data;
676
 
 
 
 
 
 
 
 
 
 
 
 
677
  foreach($this->blocks as $block)
678
  {
679
- $data = $block->save_fields($data, $post);
680
  }
681
 
682
  if (! $savedb ) return $data;
@@ -698,6 +714,7 @@ class maxButton
698
  if (isset($data[$block_name]))
699
  {
700
  $blockData = $data[$block_name];
 
701
  $fields[$block_name] = json_encode($blockData);
702
  }
703
  }
@@ -708,7 +725,6 @@ class maxButton
708
  $fields["status"] = $data["status"];
709
  }
710
 
711
-
712
  $where = array('id' => $this->id );
713
  if ($this->id > 0)
714
  {
79
  $this->clear(); // init
80
  }
81
 
82
+ /** Simple function to retrieve loaded blocks - * Used by install class and controllers */
83
  public function getBlocks()
84
  {
85
  return $this->blocks;
138
  $this->button_css = array();
139
  $this->button_js = array();
140
  $this->data = array('id' => 0);
141
+ $this->data = $this->save(array(),array(), false);
142
  $this->updated = 0;
143
 
144
  $this->cache = '';
148
  {
149
  $block->set($this->data); // reset blocks
150
  }
151
+ Screen::setData($this->data);
152
  }
153
 
154
  function setupData($data)
166
  {
167
  $this->data[$block_name] = json_decode($data[$block_name], true);
168
  }
 
169
  }
170
  }
171
 
187
  $block->set($this->data);
188
  }
189
 
190
+ Screen::setData($this->data);
 
 
 
191
  return true;
192
+ }
193
+
194
+ /* Used by collections and import. Use sparingly. Button data is reput to blocks on display */
195
+ function setData($blockname, $data )
196
+ {
197
+ foreach($data as $key => $value)
198
+ {
199
+ $this->data[$blockname][$key] = $value;
200
 
201
+ }
202
  }
203
 
204
  function get( )
205
  {
206
  return $this->data;
 
207
  }
208
 
209
  public function getID()
256
 
257
  return $this->cssParser;
258
  }
259
+
260
+ /** Get responsive declarations via screens
261
+ * Migration of old formats should be via installation class
262
+ */
263
+ function getResponsiveScreens()
264
+ {
265
+ return Screen::setupScreens($this->data);
266
+ }
267
+
268
  // get the cache
269
  function getCache()
270
  {
277
  $this->cache = $cache;
278
  }
279
 
 
 
 
 
 
 
280
 
 
 
281
 
282
  /* Parse CSS from the elements
283
 
304
  }
305
  else
306
  {
307
+
308
+ // Load responsive screens to pass. Only for normal mode. Withold in preview / editor.
309
+ $screens = array();
310
+
311
+ $screens = $this->getResponsiveScreens();
312
+
313
+
314
+ foreach($screens as $screen_name => $screenObj)
315
+ {
316
+ if ($mode !== 'normal' && $screenObj->is_responsive()) // skip when not normal, but responisve screen.
317
+ unset($screens[$screen_name]);
318
+ elseif ($screenObj->is_new() ) // don't parse the new screen.
319
+ unset($screens[$screen_name]);
320
+ }
321
+
322
  /* Internal filter, please don't use */
323
  foreach($this->blocks as $block)
324
  {
325
+ $css = $block->parse_css($css, $mode, $screens);
326
+ }
327
+
328
+ // Nasty fix for mixins needed in responsive screens
329
+ foreach($this->blocks as $block)
330
+ {
331
+ $css = $block->parsefix_mixins($css, $screens);
332
  }
333
 
334
+
335
  /* Filter the raw CSS array before compile
336
 
337
  This filters passes an array with all CSS elements before compile time. This should be CSS elements that can be understood by the CSS parser.
341
 
342
  $css = apply_filters('mb/button/rawcss', $css, $mode);
343
 
 
 
344
 
345
+ $this->button_css = $css;
346
+ $css = $this->getCSSParser()->setScreens($screens);
347
  $css = $this->getCSSParser()->parse($this->button_css);
348
+
349
  $css = apply_filters('mb/button/compiledcss', $css, $mode); // the final result.
350
 
351
  if ($mode == 'normal') // only in general mode, otherwise things go amiss.
355
 
356
  $this->parsed_css = $css;
357
 
 
358
  return $css;
359
  }
360
 
401
 
402
  $classes = implode(' ', $classes);
403
 
404
+
405
+
406
  $domObj = new simple_html_dom();
407
  $domObj->load('<a class="' . $classes . '"></a>');
408
 
420
  return $domObj;
421
  }
422
 
 
 
 
 
 
 
 
 
 
 
 
423
  protected function post_parse_button($domObj, $mode)
424
  {
425
  foreach($this->blocks as $block)
556
  elseif ($this->load_css == 'element') // not possible to load both normal and hover to an element.
557
  {
558
  $domObj->find('a',0)->class .= ' normal';
559
+ $domObj = $this->getCSSParser()->outputInline($domObj);
560
+
561
+ $compile = $this->getCSSParser()->get_compile_errors();
562
+
563
  }
564
 
565
 
576
  return $output;
577
 
578
  }
 
579
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
580
 
581
  /* Write parsed CSS to output.
582
  @param echo Default true. When true, outputs directly, otherwise returns output string
671
  Updates or saves the button. Existing buttons must load their data and be set -first- or lose all not-passed data.
672
 
673
  @param post Post data in field - value format (flat $_POST array)
674
+ @param Array $screens This will give the Responsive screens.
675
  @param boolean savedb if false do not save to database
676
  */
677
+ public function save($post, $screens, $savedb = true)
678
  {
679
  $post = stripslashes_deep($post); // don't multiply slashes please.
680
  $data = $this->data;
681
 
682
+ $post_screens = isset($post['screens']) ? $post['screens'] : array();
683
+ // if screen is not passed in post, this means it's removed. Removed it from data ( not from post, since post should not deliver anything on that either )
684
+
685
+ foreach($screens as $screen) // screen, the object.
686
+ {
687
+ if (! in_array($screen->id, $post_screens))
688
+ {
689
+ $data = $screen->removeScreen($data);
690
+ }
691
+ }
692
+
693
  foreach($this->blocks as $block)
694
  {
695
+ $data = $block->save_fields($data, $post, $screens);
696
  }
697
 
698
  if (! $savedb ) return $data;
714
  if (isset($data[$block_name]))
715
  {
716
  $blockData = $data[$block_name];
717
+
718
  $fields[$block_name] = json_encode($blockData);
719
  }
720
  }
725
  $fields["status"] = $data["status"];
726
  }
727
 
 
728
  $where = array('id' => $this->id );
729
  if ($this->id > 0)
730
  {
classes/buttons.php CHANGED
@@ -151,7 +151,7 @@ class maxButtons
151
  case "copy":
152
  $button->set($button_id);
153
  $new_id = $button->copy();
154
- $redirect = add_query_arg(array('action' => 'button', 'id' => $new_id), $redirect);
155
  //$redirect_url = admin_url() . 'admin.php?page=maxbuttons-controller&action=button&id=' . $new_id;
156
  break;
157
  case 'empty-trash':
151
  case "copy":
152
  $button->set($button_id);
153
  $new_id = $button->copy();
154
+ $redirect = add_query_arg(array('action' => 'edit', 'id' => $new_id, 'copied' => 1), $redirect);
155
  //$redirect_url = admin_url() . 'admin.php?page=maxbuttons-controller&action=button&id=' . $new_id;
156
  break;
157
  case 'empty-trash':
classes/controller.php CHANGED
@@ -10,6 +10,10 @@ abstract class MaxController
10
  protected $messages = array(); // messages to display to user.
11
  protected $view_template;
12
 
 
 
 
 
13
  public function __construct()
14
  {
15
  $this->view = new \stdClass;
@@ -58,4 +62,65 @@ abstract class MaxController
58
  $this->page = $page;
59
  }
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  }
10
  protected $messages = array(); // messages to display to user.
11
  protected $view_template;
12
 
13
+ protected $actions = false;
14
+
15
+ protected $modals_loaded = array();
16
+
17
  public function __construct()
18
  {
19
  $this->view = new \stdClass;
62
  $this->page = $page;
63
  }
64
 
65
+ protected function loadFormActions()
66
+ {
67
+ $actions = array();
68
+
69
+ $actions['add-new'] = array('href' => $this->getButtonLink(), 'text' => __('Add New', 'maxbuttons'), 'class' => '');
70
+ $actions['save'] = array('href' => 'javascript:void(0)', 'text' => __('Save', 'maxbuttons'), 'class' => 'button button-save disabled');
71
+ $actions['copy'] = array('href' => 'javascript:void(0)', 'text' => __('Copy', 'maxbuttons'), 'class' => 'maxmodal button', 'id' => 'button-copy',
72
+ 'modal' => 'copy-modal');
73
+ $actions['trash'] = array('href' => 'javascript:void(0)', 'text' => __('Move to Trash', 'maxbuttons'), 'class' => 'maxmodal button', 'id' => 'button-trash', 'modal' => 'trash-modal');
74
+ $actions['delete'] = array('href' => 'javascript:void(0)', 'text' => __("Delete","maxbuttons"), 'class' => 'maxmodal button', 'id' => 'button-delete', 'modal' => 'delete-modal');
75
+
76
+ return apply_filters('maxbuttons/editor/actions',$actions);
77
+ }
78
+
79
+ protected function getButton($name, $args = array() )
80
+ {
81
+ if (! $this->actions)
82
+ $this->actions = $this->loadFormActions();
83
+
84
+
85
+ if (isset($this->actions[$name]) && $this->actions[$name] !== false)
86
+ {
87
+ $action = $this->actions[$name];
88
+
89
+ $args = wp_parse_args($args, $action);
90
+
91
+ $class = $args['class'];
92
+ if (isset($args['add_class']))
93
+ $class .= ' ' . $args['add_class'];
94
+
95
+ $output = '<a href="' . $args['href'] . '" class="' . $class . '"';
96
+
97
+ if (isset($args['id']))
98
+ $output .= ' id="' . $action['id'] . '"';
99
+ if (isset($args['modal']))
100
+ {
101
+ $output .= ' data-modal="' . $args['modal'] . '"';
102
+ $this->loadModal($args['modal']);
103
+ }
104
+ $output .= '>' . $args['text'] . '</a>';
105
+
106
+ return $output;
107
+ }
108
+ else
109
+ return '';
110
+ }
111
+
112
+ protected function loadModal($name)
113
+ {
114
+ if (isset($this->modals_loaded[$name]))
115
+ return;
116
+
117
+ MB()->load_modal_script();
118
+ $path = MB()->get_plugin_path();
119
+
120
+ include($path . 'views/modals/' . $name . '.php');
121
+
122
+ $this->modals_loaded[] = $name;
123
+ }
124
+
125
+
126
  }
classes/controllers/editorController.php CHANGED
@@ -4,7 +4,7 @@ namespace MaxButtons;
4
  // main thing for the button editor
5
  class editorController extends MaxController
6
  {
7
- protected $view_template = 'maxbuttons-button';
8
 
9
  public function __construct()
10
  {
@@ -15,40 +15,98 @@ class editorController extends MaxController
15
 
16
  public function view()
17
  {
 
 
 
18
  if ($_POST) {
19
  $this->handlePost();
20
  }
21
- $this->loadView();
22
 
23
  parent::view();
24
  }
25
 
26
  protected function loadView()
27
  {
28
- $this->view->button = MB()->getClass('button'); // reset
29
- $this->view->button_id = 0; // always load.
30
 
31
  if (isset($_GET['id']) && $_GET['id'] != '') {
32
- //$button =
33
  $button_id = intval($_GET["id"]);
34
- $this->view->button_id = $button_id;
35
 
36
  if ($button_id == 0)
37
-
38
  {
39
  $error = __("Maxbuttons button id is zero. Your data is not saved correctly! Please check your database.","maxbuttons");
40
  MB()->add_notice('error', $error);
41
  }
42
  // returns bool
43
- $return = $this->view->button->set($button_id);
 
44
  if ($return === false)
45
  {
46
  $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");
47
  MB()->add_notice('error', $error);
48
  }
 
 
 
 
 
49
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  protected function handlePost()
53
  {
54
  if (! check_admin_referer("button-edit","maxbuttons_button"))
@@ -56,12 +114,28 @@ class editorController extends MaxController
56
  exit("Request not valid");
57
  }
58
 
59
- $button = MB()->getClass('button'); ;
 
 
 
 
 
 
60
  $button_id = intval($_POST["button_id"]);
61
 
 
 
 
 
 
 
 
 
62
  if ($button_id > 0)
63
  $button->set($button_id);
64
- $return = $button->save($_POST);
 
 
65
  if (is_int($return) && $button_id <= 0)
66
  $button_id = $return;
67
 
@@ -72,8 +146,25 @@ class editorController extends MaxController
72
 
73
  $button->set($button_id);
74
  $url = $this->getButtonLink($button_id);
 
 
 
 
 
 
75
  wp_redirect($url);
76
  exit();
77
  } // handlePost.
78
 
 
 
 
 
 
 
 
 
 
 
 
79
  } // Class editorController
4
  // main thing for the button editor
5
  class editorController extends MaxController
6
  {
7
+ protected $view_template = 'maxbuttons-button';
8
 
9
  public function __construct()
10
  {
15
 
16
  public function view()
17
  {
18
+
19
+ $this->loadView();
20
+
21
  if ($_POST) {
22
  $this->handlePost();
23
  }
 
24
 
25
  parent::view();
26
  }
27
 
28
  protected function loadView()
29
  {
30
+ $button = MB()->getClass('button');
31
+ $button_id = 0;
32
 
33
  if (isset($_GET['id']) && $_GET['id'] != '') {
 
34
  $button_id = intval($_GET["id"]);
 
35
 
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
+
44
  if ($return === false)
45
  {
46
  $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");
47
  MB()->add_notice('error', $error);
48
  }
49
+ $this->view->button_is_new = false;
50
+ }
51
+ else
52
+ {
53
+ $this->view->button_is_new = true;
54
  }
55
+
56
+ $screens = $button->getResponsiveScreens();
57
+ $this->view->button = $button;
58
+ $this->view->button_id = $button_id;
59
+ $this->view->screens = $screens;
60
+ // This is a flaw because PHP can't gather the fragment #hash of the URL, this on load will always be this.
61
+ $this->view->currentScreen = 'default';
62
+ }
63
+
64
+ protected function getCurrentScreen()
65
+ {
66
+ if ( isset($this->view->screens[$this->view->currentScreen]))
67
+ return $this->view->screens[$this->view->currentScreen];
68
+
69
+ return null; // this should never happen.
70
+
71
  }
72
 
73
+ // Load the editor for screen.
74
+ protected function showScreenEditor($screen)
75
+ {
76
+ $blocks = $this->view->button->getBlocks();
77
+
78
+ // $screen = new Screen($show_screen);
79
+ $is_responsive = $screen->is_responsive();
80
+ $is_new = $screen->is_new();
81
+ $is_default = $screen->is_default();
82
+
83
+ $map = array();
84
+ $the_map = array();
85
+
86
+ foreach($blocks as $block)
87
+ {
88
+
89
+ if ($is_default && ! $block->is_default() )
90
+ continue;
91
+ if ($is_responsive && ! $block->is_responsive())
92
+ continue;
93
+ if ($is_new && ! $block->is_new())
94
+ continue;
95
+
96
+ $map = $block->map_fields($map);
97
+
98
+ $block->admin_fields($screen);
99
+
100
+ $screen->display_fields();
101
+ }
102
+
103
+ // Map Fields *after* doing all, otherwise not all fields might be defined.
104
+ $the_map = $screen->mapFields($map);
105
+ $screen->displayFieldMap($the_map);
106
+
107
+ }
108
+
109
+
110
  protected function handlePost()
111
  {
112
  if (! check_admin_referer("button-edit","maxbuttons_button"))
114
  exit("Request not valid");
115
  }
116
 
117
+
118
+ $this->updateButton();
119
+ }
120
+
121
+ protected function updateButton()
122
+ {
123
+ $button = MB()->getClass('button');
124
  $button_id = intval($_POST["button_id"]);
125
 
126
+
127
+ $current_screen = 'default';
128
+ if (isset($_POST['current_screen']))
129
+ {
130
+ $current_screen = $_POST['current_screen'];
131
+ unset($_POST['current_screen']);
132
+ }
133
+
134
  if ($button_id > 0)
135
  $button->set($button_id);
136
+
137
+ $return = $button->save($_POST, $this->view->screens);
138
+
139
  if (is_int($return) && $button_id <= 0)
140
  $button_id = $return;
141
 
146
 
147
  $button->set($button_id);
148
  $url = $this->getButtonLink($button_id);
149
+
150
+ if ($current_screen != 'default')
151
+ {
152
+ $url .= '#' . $current_screen;
153
+ }
154
+
155
  wp_redirect($url);
156
  exit();
157
  } // handlePost.
158
 
159
+ protected function addScreen()
160
+ {
161
+ $button = MB()->getClass('button');
162
+ $button_id = intval($_POST["button_id"]);
163
+
164
+ if ($button_id > 0)
165
+ $button->set($button_id);
166
+ // update here on the button class?
167
+ }
168
+
169
+
170
  } // Class editorController
classes/controllers/settingsController.php CHANGED
@@ -53,6 +53,13 @@ class settingsController extends MaxController
53
  $install::migrate();
54
  }
55
 
 
 
 
 
 
 
 
56
  if (isset($_POST["replace"]) && check_admin_referer('mb_bulk_edit', 'bulk_edit'))
57
  {
58
  $search = sanitize_text_field($_POST["search"]);
53
  $install::migrate();
54
  }
55
 
56
+ if (isset($_POST['remigrateresponsive']))
57
+ {
58
+ $install = MB()->getClass("install");
59
+ $install::migrateResponsive();
60
+ exit('check');
61
+ }
62
+
63
  if (isset($_POST["replace"]) && check_admin_referer('mb_bulk_edit', 'bulk_edit'))
64
  {
65
  $search = sanitize_text_field($_POST["search"]);
classes/field.php CHANGED
@@ -4,7 +4,6 @@ defined('ABSPATH') or die('No direct access permitted');
4
 
5
  class maxField
6
  {
7
-
8
  /* Static class variables */
9
  static $templates = '';
10
  static $position = 0;
@@ -31,6 +30,9 @@ class maxField
31
  public $before_input; // text
32
  public $content = ''; // generic / spacer
33
  public $min; // number
 
 
 
34
 
35
  /* Border radius */
36
  public $radius_tl;
@@ -44,7 +46,6 @@ class maxField
44
 
45
  //public
46
 
47
-
48
  /* Template */
49
  public $template;
50
  public $main_class = 'option'; // row class - start template
@@ -117,8 +118,6 @@ class maxField
117
  }
118
  }
119
 
120
- if ($this->publish)
121
- echo $output;
122
  //do_action('mb/editor/after-field-'. $this->id); // hook for extra fields.
123
 
124
  $this->output = $output;
4
 
5
  class maxField
6
  {
 
7
  /* Static class variables */
8
  static $templates = '';
9
  static $position = 0;
30
  public $before_input; // text
31
  public $content = ''; // generic / spacer
32
  public $min; // number
33
+ public $is_responsive = true; // available in responsive screens
34
+ public $is_default = true; // for default fields.
35
+ public $is_new = false; // for new . ( setting both the true will make it for BOTH responsive and new)
36
 
37
  /* Border radius */
38
  public $radius_tl;
46
 
47
  //public
48
 
 
49
  /* Template */
50
  public $template;
51
  public $main_class = 'option'; // row class - start template
118
  }
119
  }
120
 
 
 
121
  //do_action('mb/editor/after-field-'. $this->id); // hook for extra fields.
122
 
123
  $this->output = $output;
classes/installation.php CHANGED
@@ -61,6 +61,9 @@ class maxInstall
61
  static::migrate();
62
  static::upgradeUTF();
63
  static::updateFA();
 
 
 
64
 
65
  $button = MB()->getClass('button');
66
  $button->reset_cache(); //refresh cache
@@ -89,7 +92,7 @@ class maxInstall
89
  $sql = ' SHOW COLUMNS FROM ' . $table_name . ' LIKE "icon"';
90
  $result = $wpdb->get_results($sql, ARRAY_A);
91
 
92
- // when the icon field does not exist. Otherwise this causes an activate notice.
93
  if (count($result) == 0)
94
  return;
95
 
@@ -310,6 +313,176 @@ class maxInstall
310
  return $data;
311
  }
312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  static function deactivate_plugin()
314
  {
315
  delete_option(MAXBUTTONS_VERSION_KEY);
@@ -366,18 +539,19 @@ class maxInstall
366
  collection_key varchar(255),
367
  collection_value text,
368
  PRIMARY KEY (meta_id) )
369
-
370
  ";
371
 
372
  dbDelta($sql);
373
 
374
  $collection_trans_table = maxUtils::get_coltrans_table_name();
375
- $sql = "CREATE TABLE $collection_trans_table (
 
376
  name varchar(1000),
377
  value varchar(255),
378
- expire int(11)
379
  );
380
- ";
 
381
  $res = dbDelta($sql);
382
  }
383
 
@@ -414,4 +588,6 @@ class maxInstall
414
  // Now switch back to the root blog
415
  switch_to_blog($root_blog);
416
  }
 
 
417
  } // class
61
  static::migrate();
62
  static::upgradeUTF();
63
  static::updateFA();
64
+ static::migrateResponsive();
65
+ // @todo Migrate to new format.
66
+ //static::migrateResponsive();
67
 
68
  $button = MB()->getClass('button');
69
  $button->reset_cache(); //refresh cache
92
  $sql = ' SHOW COLUMNS FROM ' . $table_name . ' LIKE "icon"';
93
  $result = $wpdb->get_results($sql, ARRAY_A);
94
 
95
+ // when the icon field does not exist. Otherwise this causes an activate notice.
96
  if (count($result) == 0)
97
  return;
98
 
313
  return $data;
314
  }
315
 
316
+ // Movements version < 8.0 to 8.0 >
317
+ static function migrateResponsive()
318
+ {
319
+ global $wpdb;
320
+
321
+ $table = maxUtils::get_table_name();
322
+
323
+ $sql = "SELECT id, responsive from $table";
324
+ $results = $wpdb->get_results($sql, ARRAY_A);
325
+
326
+ $fieldMap = array(
327
+ 'button_width' => array('dimension', 'button_width'), // check to add px to this val or not.
328
+ 'button_width_unit' => array('dimension', 'button_size_unit_width'), // px must be converted to pixel, % prob. to percent!
329
+ 'button_height' => array('dimension', 'button_height'),
330
+ 'button_height_unit' => array('dimension', 'button_size_unit_height'), // see above
331
+ 'container_width' => array('container','container_width'),
332
+ 'container_float' => array('container','container_alignment' ),
333
+ 'container_width_unit' => array('container', 'container_width_unit'),
334
+ 'font_size' => array('text', 'font_size'),
335
+ );
336
+
337
+ // The name of the sizes and it's min-width, max-width.
338
+ $sizeNames = array(
339
+ 'phone' => array(0, 480),
340
+ 'phone_land' => array(321, 480),
341
+ 'phone_portrait' => array(0, 320),
342
+ 'ipad' => array(768, 1024),
343
+ 'medium_phone' => array(480, 768),
344
+ 'ipad_land' => array(768, 1024),
345
+ 'ipad_portrait' => array(768, 1024),
346
+ 'desktop' => array(1224,0),
347
+ 'large_desktop' => array(1824,0),
348
+ //custom
349
+ );
350
+
351
+ foreach ($results as $row)
352
+ {
353
+
354
+ $id = $row['id'];
355
+ $respdata = json_decode($row['responsive'], true);
356
+ if (isset($respdata['auto_responsive']))
357
+ unset($respdata['auto_responsive']);
358
+
359
+ // perhaps have some data?
360
+ if (! isset($respdata['media_query']))
361
+ {
362
+ continue; // no responsive data.
363
+ }
364
+ elseif (count($respdata['media_query']) == 0)
365
+ {
366
+ continue; // nope
367
+ }
368
+ else
369
+ {
370
+ $mediaq = $respdata['media_query'];
371
+ if (isset($mediaq['auto_responsive']))
372
+ unset($mediaq['auto_responsive']);
373
+
374
+ $button = new maxButton();
375
+ $button->set($id);
376
+ $button_data = $button->get();
377
+ $screens = $button->getResponsiveScreens();
378
+ if (isset($screens['new']))
379
+ unset($screens['new']);
380
+ if (isset($screens['default']))
381
+ unset($screens['default']);
382
+
383
+ // screens. loop the sizes.
384
+ $responsive = array();
385
+ foreach($mediaq as $qsize => $qdata)
386
+ {
387
+
388
+ $fielddata = $qdata;
389
+ if (count($fielddata) == 1) // seems there is an extra dimension here.
390
+ $fielddata = array_shift($qdata);
391
+
392
+ $next_id = count($screens) + 1;
393
+ $screen = new Screen('rs' . $next_id, array('name' => $qsize) );
394
+
395
+ $responsive['screens'][] = $screen->id;
396
+
397
+ // find qsize, add screen, width, height.
398
+ if (isset($sizeNames[$qsize]))
399
+ {
400
+ list($minwidth, $maxwidth) = $sizeNames[$qsize];
401
+ }
402
+ else // not set, must be custom, use custom_midiwdh
403
+ {
404
+ $minwidth = isset($fielddata['mq_custom_minwidth']) ? $fielddata['mq_custom_minwidth'] : 0;
405
+ $maxwidth = isset($fielddata['mq_custom_maxwidth']) ? $fielddata['mq_custom_maxwidth'] : 0;
406
+ }
407
+
408
+ $responsive[$screen->getFieldID('min_width')] = $minwidth;
409
+ $responsive[$screen->getFieldID('max_width')] = $maxwidth;
410
+ $responsive[$screen->getFieldID('screen_name')] = $qsize;
411
+
412
+ if (isset($fielddata['mq_hide']) && $fielddata['mq_hide'] == 'none')
413
+ {
414
+ $responsive[$screen->getFieldID('hide_screen')] = 1;
415
+ }
416
+
417
+ $button_data['responsive'] = $responsive;
418
+
419
+ // convert fields.
420
+ foreach($fielddata as $fname => $fvalue)
421
+ {
422
+ if ($fvalue === '')
423
+ continue;
424
+
425
+ $fname = str_replace('mq_', '', $fname);
426
+ // echo " <!- DOING $fname -> <BR> ";
427
+ if (isset($fieldMap[$fname]))
428
+ {
429
+
430
+ list($block, $field) = $fieldMap[$fname];
431
+
432
+ if (strpos($fname, '_unit') >= 0)
433
+ {
434
+ if ($fvalue == 'px')
435
+ $fvalue = 'pixel';
436
+ elseif($fvalue == '%')
437
+ $fvalue = 'percent';
438
+ }
439
+
440
+ if ($fname == 'container_float')
441
+ {
442
+ switch($fvalue)
443
+ {
444
+ case 'left':
445
+ $fvalue ='float: left';
446
+ break;
447
+ case 'right':
448
+ $fvalue ='float: right';
449
+ break;
450
+ case 'none':
451
+ $fvalue ='float: none';
452
+ break;
453
+ }
454
+ }
455
+ // echo "$fname set, doing $block and $field for $fvalue <BR>";
456
+ $button_data[$block][$screen->getFieldID($field)] = $fvalue;
457
+ }
458
+
459
+ }
460
+
461
+
462
+
463
+ $screens[] = $screen;
464
+ }
465
+
466
+ // doing responsive
467
+ }
468
+
469
+ // ok ok
470
+ foreach($button_data as $block_name => $block_data)
471
+ {
472
+ if (is_array($block_data)) // id, document_id returned are not data blocks
473
+ $button->setData($block_name, $block_data);
474
+ }
475
+
476
+ $button_data['name'] = $button->getName();
477
+ $button_data['status'] = $button->getStatus();
478
+ $button_data['updated'] = $button->getUpdated(false);
479
+
480
+ $button->update($button_data);
481
+
482
+ } // button
483
+
484
+ }
485
+
486
  static function deactivate_plugin()
487
  {
488
  delete_option(MAXBUTTONS_VERSION_KEY);
539
  collection_key varchar(255),
540
  collection_value text,
541
  PRIMARY KEY (meta_id) )
 
542
  ";
543
 
544
  dbDelta($sql);
545
 
546
  $collection_trans_table = maxUtils::get_coltrans_table_name();
547
+ $sql = "CREATE TABLE " . $collection_trans_table . " (
548
+ id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
549
  name varchar(1000),
550
  value varchar(255),
551
+ expire int(11),
552
  );
553
+ ";
554
+
555
  $res = dbDelta($sql);
556
  }
557
 
588
  // Now switch back to the root blog
589
  switch_to_blog($root_blog);
590
  }
591
+
592
+
593
  } // class
classes/max-utils.php CHANGED
@@ -74,7 +74,6 @@ class maxUtils
74
 
75
  }
76
 
77
-
78
  static function hex2rgba($color, $opacity) {
79
  // Grab the hex color and remove #
80
 
@@ -131,6 +130,7 @@ class maxUtils
131
  return $value;
132
  }
133
 
 
134
  static function generate_font_sizes($start, $end, $step = 1)
135
  {
136
  $sizes = array();
@@ -143,9 +143,10 @@ class maxUtils
143
  return $sizes;
144
 
145
  }
 
146
 
147
-
148
- static function get_media_query($get_option = 1)
149
  {
150
 
151
  $queries = array("phone" => "only screen and (max-width : 480px)",
@@ -311,6 +312,7 @@ class maxUtils
311
  /* 7.0 note - this function is currently not in use due to dynamic font library loading */
312
  static function fixFAConflict()
313
  {
 
314
  $forcefa = get_option('maxbuttons_forcefa');
315
 
316
  if ($forcefa != '1')
@@ -364,7 +366,6 @@ class maxUtils
364
 
365
  }
366
 
367
-
368
  static function timeInit()
369
  {
370
  if ( ! defined('MAXBUTTONS_BENCHMARK') || MAXBUTTONS_BENCHMARK !== true)
74
 
75
  }
76
 
 
77
  static function hex2rgba($color, $opacity) {
78
  // Grab the hex color and remove #
79
 
130
  return $value;
131
  }
132
 
133
+ /* @todo Marked for removal
134
  static function generate_font_sizes($start, $end, $step = 1)
135
  {
136
  $sizes = array();
143
  return $sizes;
144
 
145
  }
146
+ */
147
 
148
+ // This will be needed for converting from old formats to the new screens.
149
+ static function legacy_get_media_query($get_option = 1)
150
  {
151
 
152
  $queries = array("phone" => "only screen and (max-width : 480px)",
312
  /* 7.0 note - this function is currently not in use due to dynamic font library loading */
313
  static function fixFAConflict()
314
  {
315
+
316
  $forcefa = get_option('maxbuttons_forcefa');
317
 
318
  if ($forcefa != '1')
366
 
367
  }
368
 
 
369
  static function timeInit()
370
  {
371
  if ( ! defined('MAXBUTTONS_BENCHMARK') || MAXBUTTONS_BENCHMARK !== true)
classes/maxCSSParser.php CHANGED
@@ -19,10 +19,11 @@ class maxCSSParser
19
  protected $pseudo = array("hover","active","responsive");
20
 
21
  protected $data;
 
22
  protected $output_css;
23
 
24
  protected $has_compile_error = false;
25
- protected $compile_error;
26
 
27
  protected $inline = array();
28
  protected $responsive = array();
@@ -45,13 +46,13 @@ class maxCSSParser
45
  // log possible problems and incidents for debugging;
46
  protected $parse_log = array();
47
 
48
- function __construct()
49
  {
50
  //$root[] = array("a" => array("hover","active","responsive"));
51
  MB()->load_library('scss');
52
  }
53
 
54
- function loadDom($domObj)
55
  {
56
  $this->domObj = $domObj;
57
 
@@ -78,7 +79,8 @@ class maxCSSParser
78
 
79
  }
80
 
81
- function loadRecursive($struct, $children)
 
82
  {
83
  foreach($children as $domChild)
84
  {
@@ -100,8 +102,12 @@ class maxCSSParser
100
  return $struct;
101
  }
102
 
 
 
 
 
103
 
104
- function parse($data)
105
  {
106
  $this->clear();
107
 
@@ -129,8 +135,11 @@ class maxCSSParser
129
  $this->parse_part($el,$el_data);
130
  }
131
 
132
-
133
- $this->parse_responsive();
 
 
 
134
 
135
  maxUtils::startTime('compile CSS');
136
  $css = $this->compile($this->output_css);
@@ -163,23 +172,26 @@ class maxCSSParser
163
  $scss->setFormatter('\ScssPhp\ScssPhp\Formatter\Crunched');
164
  }
165
 
166
- $compile = " @import '_mixins.scss'; " . $css;
167
- //maxUtils::addTime("CSSParser: Compile start ");
168
 
 
169
  try
170
  {
171
  $css = $scss->compile($compile);
172
  } catch (\Exception $e) {
173
  $this->has_compile_error = true;
174
- $this->compile_error = $e;
 
 
 
 
175
  $css = $this->output_css;
176
  }
177
 
178
- //maxUtils::addTime("CSSParser: Compile end ");
179
  return $css;
180
  }
181
 
182
- function get_compile_errors()
183
  {
184
  if ($this->has_compile_error)
185
  {
@@ -188,14 +200,24 @@ class maxCSSParser
188
  return false;
189
  }
190
 
191
- /** Element is the current element that being parsed. El_add is the parent element that should be put before the subpart */
192
- function parse_part($element, $el_data, $el_add = '')
 
 
 
 
 
193
  {
194
  maxUtils::addTime("CSSParser: Parse $element ");
195
 
196
-
197
  $tag = $el_data["tag"];
198
- $element_data = $this->findData($this->data, $element);
 
 
 
 
 
199
 
200
  // not using scss selectors here since there is trouble w/ the :pseudo selector, which should be put on the maxbutton / a tag.
201
  if ($element != '')
@@ -226,50 +248,57 @@ class maxCSSParser
226
  e.g. container level, so no proper will be set. In case 0 count replacement, just put it on current */
227
  $ps_selector = preg_replace('/' . $anchor_class . '$|' . $anchor_class . '([.| ])/i',"$anchor_class:$pseudo\$1",$el_add, -1, $count);
228
 
229
-
230
  if ($count === 0)
231
  {
232
  $ps_selector = $el_add . ":" . $pseudo;
233
  }
234
 
235
 
236
- $this->output_css .= " $ps_selector { ";
237
  }
238
  else {
239
- $this->output_css .= " $el_add { ";
240
  }
241
 
 
242
  $values = $this->doMixins($values);
243
 
 
 
244
  foreach($values as $cssTag => $cssVal)
245
  {
246
 
247
- $statement = $this->parse_cssline($values, $cssTag,$cssVal); ///"$cssTag $css_sep $cssVal$unit$css_end ";
248
 
249
  if ($statement)
250
  {
251
  $this->output_css .= $statement ;
252
 
253
- if (! isset($this->inline[$pseudo][$element])) $this->inline[$pseudo][$element] = '';
254
- $this->inline[$pseudo][$element] .= $statement;
 
 
 
 
 
255
  }
256
  }
257
 
258
- $this->output_css .= " } ";
259
  }
260
  if (isset($el_data["children"]))
261
  {
262
  foreach($el_data["children"] as $child_id => $child_data)
263
  {
264
 
265
- $this->parse_part($child_id, $child_data, $el_add);
266
  }
267
  }
268
 
269
 
270
  }
271
 
272
- function parse_cssline($values, $cssTag, $cssVal, $css_end = ';')
273
  {
274
 
275
  // unit check - two ways; either unitable items is first or unit declaration.
@@ -301,95 +330,83 @@ class maxCSSParser
301
 
302
  }
303
 
304
- function parse_responsive()
305
  {
306
 
307
  $responsive = $this->responsive;
308
  if (! is_array($responsive) || count($responsive) == 0)
309
  return;
310
 
311
- $media_queries = maxUtils::get_media_query(2); // query names
312
-
313
- $output = '';
314
 
315
  $query_array = array();
 
 
316
 
317
-
318
- foreach($responsive as $element => $queries)
319
  {
320
- foreach($queries as $query => $qdata)
321
- foreach($qdata as $index => $data)
322
- {{
323
- $query_array[$query][$index][$element] = $data;
324
-
325
- }}
326
- }
327
-
328
-
329
 
330
- foreach($query_array as $query => $vdata):
331
-
332
- if ($query == 'custom')
333
- {
334
-
335
- // first discover the custom size properties.
336
- foreach($vdata as $index => $data):
337
- foreach($data as $element => $values):
338
-
339
- if (isset($values["custom_maxwidth"]) || isset($values["custom_minwidth"]) )
340
  {
341
 
342
- $minwidth = (isset($values["custom_minwidth"])) ? intval($values["custom_minwidth"]) : -1;
343
- $maxwidth = (isset($values["custom_maxwidth"])) ? intval($values["custom_maxwidth"]) : -1;
344
-
345
-
346
- unset($vdata[$index][$element]["custom_minwidth"]);
347
- unset($vdata[$index][$element]["custom_maxwidth"]);
348
-
349
-
350
- // make it always an integer
351
- if ($minwidth == '') $minwidth = 0;
352
- if ($maxwidth == '') $maxwidth = 0;
353
-
354
- // if minwidth is not set and maxwidth zero or not set - ignore since it would result in an empty media line.
355
- //if ($minwidth <= 0 && $maxwidth <= 0)
356
- //{
357
- //continue;
358
- //}
359
-
360
- if ($minwidth > 0 && $maxwidth > 0)
361
- $qdef = "only screen and (min-width: $minwidth" . "px) and (max-width: $maxwidth" . "px)";
362
- if ($minwidth >= 0 && $maxwidth <= 0)
363
- $qdef = "only screen and (min-width: $minwidth" . "px) ";
364
- if ($minwidth <= 0 && $maxwidth > 0)
365
- $qdef = "only screen and (max-width: $maxwidth" . "px) ";
366
-
367
- //break;
368
 
369
  }
370
- endforeach; //foreach data
 
371
 
372
- // The problem is that every 'custom' query needs to run with a different qdef unlike other queries.
 
 
 
 
373
 
374
- $qdata = array($vdata[$index]);
 
 
 
375
 
376
- $output = $this->parse_responsive_definition($output, $qdef, $qdata);
377
- endforeach; // foreach vdata
378
- }
379
- else
380
  {
381
-
382
- $qdef = $media_queries[$query];
383
- $output = $this->parse_responsive_definition($output, $qdef, $vdata);
 
384
  }
 
385
 
386
- endforeach;
387
-
 
 
 
 
 
388
 
389
- $this->output_css .= $output;
390
  }
391
 
392
- protected function parse_responsive_definition($output, $qdef, $vdata)
 
 
 
 
393
  {
394
 
395
  if (! isset($qdef) || $qdef == '') {
@@ -398,15 +415,22 @@ class maxCSSParser
398
  }
399
 
400
 
401
- $output .= "@media ". $qdef . " { ";
 
402
 
 
 
403
 
404
- foreach($vdata as $index => $data)
405
- {
406
 
407
- foreach($data as $element => $values) {
408
  //foreach($vdat as $index => $values):
409
- $output .= $element . " { ";
 
 
 
 
410
  $css_end = ';';
411
 
412
  // same as parse part, maybe merge in future
@@ -421,15 +445,16 @@ class maxCSSParser
421
 
422
  $output .= " } ";
423
  // endforeach;
424
- }
425
 
426
 
427
- }
428
- $output .= " } ";
 
429
 
430
  //endforeach;
431
 
432
- return $output;
433
  }
434
 
435
  private function is_important()
@@ -441,7 +466,8 @@ class maxCSSParser
441
  return false;
442
  }
443
 
444
- function findData($data, $el)
 
445
  {
446
  $classes = explode(".", $el);
447
 
@@ -455,10 +481,25 @@ class maxCSSParser
455
  return array();
456
  }
457
 
458
- function doMixins($values)
 
459
  {
460
- $mixins = array("gradient", "box-shadow", "text-shadow", "keyframes");
 
 
 
 
 
 
 
 
 
 
461
 
 
 
 
 
462
  foreach($mixins as $mixin)
463
  {
464
 
@@ -496,8 +537,42 @@ class maxCSSParser
496
  return $values;
497
  }
498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
499
  /** Parse the keyframes. Not a real mixin */
500
- function mixin_keyframes($results, $values)
501
  {
502
  $keyframes_name = isset($results['keyframes-name']) ? $results['keyframes-name'] : false;
503
  $keyframes = isset($results['keyframes']) ? $results['keyframes'] : false;
@@ -511,9 +586,11 @@ class maxCSSParser
511
  return $values;
512
  }
513
 
514
- function mixin_gradient($results, $values)
515
  {
516
 
 
 
517
  $start = isset($results["gradient-start-color"]) ? $results["gradient-start-color"] : '';
518
  $end = isset( $results["gradient-end-color"] ) ? $results["gradient-end-color"] : '';
519
  $start_opacity = isset( $results["gradient-start-opacity"] ) ? $results["gradient-start-opacity"] : '';
@@ -525,12 +602,23 @@ class maxCSSParser
525
  $start = maxUtils::hex2rgba($start, $start_opacity);
526
  $end = maxUtils::hex2rgba($end, $end_opacity);
527
 
528
- $important = ($this->is_important()) ? "!important" : "";
529
  //$values = $this->add_include($values, "linear-gradient($start,$end,$stop,$important)");
530
 
531
  if ($use_gradient == 1)
532
  {
533
- $values = $this->add_include($values, "linear-gradient($start,$end,$stop,$important)");
 
 
 
 
 
 
 
 
 
 
 
534
  }
535
  else {
536
  $values['background-color'] = $start;
@@ -541,9 +629,10 @@ class maxCSSParser
541
 
542
  return $values;
543
 
 
544
  }
545
 
546
- function mixin_boxshadow($results, $values)
547
  {
548
  $width = isset($results["box-shadow-width"]) ? $results["box-shadow-width"] : 0;
549
  $left = isset($results["box-shadow-offset-left"]) ? $results["box-shadow-offset-left"] : 0;
@@ -567,7 +656,7 @@ class maxCSSParser
567
  return $values;
568
  }
569
 
570
- function mixin_textshadow($results, $values)
571
  {
572
  $width = isset($results["text-shadow-width"]) ? $results["text-shadow-width"] : 0;
573
  $left = isset($results["text-shadow-left"]) ? $results["text-shadow-left"] : 0;
@@ -601,31 +690,39 @@ class maxCSSParser
601
  $domObj = $domObj->load($domObj->save());
602
 
603
  $inline = $this->inline;
604
-
605
  // ISSUE #43 Sometimes this breaks
606
  if (! isset($inline[$pseudo]))
607
  return $domObj;
608
 
609
  $elements = array_keys($inline[$pseudo]);
 
610
  if ($pseudo != 'normal') // gather all elements
611
  $elements = array_merge($elements, array_keys($inline["normal"]));
612
 
613
  foreach($elements as $element)
614
  {
615
- $styles = isset($inline[$pseudo][$element]) ? $inline[$pseudo][$element] : '';
616
- $normstyle = '';
617
 
618
- if ($pseudo != 'normal') // parse all possible missing styles from pseudo el
619
  {
 
 
 
 
 
 
620
  $tocompile = $this->dummify($inline['normal'][$element]);
621
  $normstyle = $this->compile($tocompile);
622
  $normstyle = $this->undummify($normstyle);
623
- }
624
  maxUtils::addTime("CSSParser: Parse inline done");
625
-
 
 
 
626
  // add dummy {} here because new scssphp parse doesn't like styles without it. Remove it after compile, since this is inline.
627
- $styles = $this->compile($this->dummify($normstyle . $styles));
628
- $styles = $this->undummify($styles);
629
 
630
  //$styles = $normstyle . $styles;
631
 
@@ -633,7 +730,7 @@ class maxCSSParser
633
 
634
  $el = $domObj->find('[class*="' . $element . '"]', 0);
635
 
636
- $el->style = $styles;
637
 
638
  }
639
 
19
  protected $pseudo = array("hover","active","responsive");
20
 
21
  protected $data;
22
+ protected $screens;
23
  protected $output_css;
24
 
25
  protected $has_compile_error = false;
26
+ protected $compile_error = array();
27
 
28
  protected $inline = array();
29
  protected $responsive = array();
46
  // log possible problems and incidents for debugging;
47
  protected $parse_log = array();
48
 
49
+ public function __construct()
50
  {
51
  //$root[] = array("a" => array("hover","active","responsive"));
52
  MB()->load_library('scss');
53
  }
54
 
55
+ public function loadDom($domObj)
56
  {
57
  $this->domObj = $domObj;
58
 
79
 
80
  }
81
 
82
+
83
+ protected function loadRecursive($struct, $children)
84
  {
85
  foreach($children as $domChild)
86
  {
102
  return $struct;
103
  }
104
 
105
+ public function setScreens($screens)
106
+ {
107
+ $this->screens = $screens;
108
+ }
109
 
110
+ public function parse($data)
111
  {
112
  $this->clear();
113
 
135
  $this->parse_part($el,$el_data);
136
  }
137
 
138
+ /* foreach($element as $el => $el_data)
139
+ {
140
+ $this->parse_responsive_new($el, $el_data);
141
+ } */
142
+ $this->parse_responsive($elements);
143
 
144
  maxUtils::startTime('compile CSS');
145
  $css = $this->compile($this->output_css);
172
  $scss->setFormatter('\ScssPhp\ScssPhp\Formatter\Crunched');
173
  }
174
 
175
+ $compile = ' @import "_mixins.scss";' . $css;
 
176
 
177
+ //maxUtils::addTime("CSSParser: Compile start ");
178
  try
179
  {
180
  $css = $scss->compile($compile);
181
  } catch (\Exception $e) {
182
  $this->has_compile_error = true;
183
+ $this->compile_error = array('error' => $e,
184
+ // 'backtrace' => debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 4),
185
+ 'string' => $compile,
186
+ );
187
+ var_dump($this->compile_error);
188
  $css = $this->output_css;
189
  }
190
 
 
191
  return $css;
192
  }
193
 
194
+ public function get_compile_errors()
195
  {
196
  if ($this->has_compile_error)
197
  {
200
  return false;
201
  }
202
 
203
+ /** Element is the current element that being parsed. El_add is the parent element that should be put before the subpart
204
+ * @param $element CSS class Definition
205
+ * @param $el_data DomDoc Element data of this element.
206
+ * @param $el_add Indicated child element .css to add to def. to make proper cascase
207
+ * @param $screenName String Name of the screen when parsing responsive view.
208
+ */
209
+ protected function parse_part($element, $el_data, $el_add = '', $screenName = false)
210
  {
211
  maxUtils::addTime("CSSParser: Parse $element ");
212
 
213
+ $data = $this->data;
214
  $tag = $el_data["tag"];
215
+
216
+ // returns all data from this element.
217
+ $element_data = $this->findData($data, $element);
218
+
219
+ if ($screenName !== false)
220
+ $element_data = $this->findResponsiveData($element_data, $screenName);
221
 
222
  // not using scss selectors here since there is trouble w/ the :pseudo selector, which should be put on the maxbutton / a tag.
223
  if ($element != '')
248
  e.g. container level, so no proper will be set. In case 0 count replacement, just put it on current */
249
  $ps_selector = preg_replace('/' . $anchor_class . '$|' . $anchor_class . '([.| ])/i',"$anchor_class:$pseudo\$1",$el_add, -1, $count);
250
 
 
251
  if ($count === 0)
252
  {
253
  $ps_selector = $el_add . ":" . $pseudo;
254
  }
255
 
256
 
257
+ $this->output_css .= "$ps_selector{ ";
258
  }
259
  else {
260
+ $this->output_css .= "$el_add{ ";
261
  }
262
 
263
+ $values = $this->combineStatements($values);
264
  $values = $this->doMixins($values);
265
 
266
+ $this->inline[$pseudo][$element] = $values;
267
+
268
  foreach($values as $cssTag => $cssVal)
269
  {
270
 
271
+ $statement = $this->parse_cssline($values,$cssTag,$cssVal); ///"$cssTag $css_sep $cssVal$unit$css_end ";
272
 
273
  if ($statement)
274
  {
275
  $this->output_css .= $statement ;
276
 
277
+ /* if (! isset($this->inline[$pseudo][$element]))
278
+ $this->inline[$pseudo][$element] = array();
279
+
280
+ if (! isset($this->inline[$pseudo][$element][$cssTag]))
281
+ $this->inline[$pseudo][$element][$cssTag] = '';
282
+
283
+ $this->inline[$pseudo][$element][$cssTag] = $cssVal; */
284
  }
285
  }
286
 
287
+ $this->output_css .= "} ";
288
  }
289
  if (isset($el_data["children"]))
290
  {
291
  foreach($el_data["children"] as $child_id => $child_data)
292
  {
293
 
294
+ $this->parse_part($child_id, $child_data, $el_add, $screenName);
295
  }
296
  }
297
 
298
 
299
  }
300
 
301
+ protected function parse_cssline($values, $cssTag, $cssVal, $css_end = ';')
302
  {
303
 
304
  // unit check - two ways; either unitable items is first or unit declaration.
330
 
331
  }
332
 
333
+ protected function parse_responsive($elements)
334
  {
335
 
336
  $responsive = $this->responsive;
337
  if (! is_array($responsive) || count($responsive) == 0)
338
  return;
339
 
 
 
 
340
 
341
  $query_array = array();
342
+ $screens = $this->screens;
343
+ $definitions = array();
344
 
345
+ // Find the responsive definitions and remove that part.
346
+ foreach($responsive as $part => $screen_ids)
347
  {
348
+ foreach($screen_ids as $screen_id => $screen_data)
349
+ {
 
 
 
 
 
 
 
350
 
351
+ if (isset($screens[$screen_id]) && $screens[$screen_id]->is_responsive() )
 
 
 
 
 
 
 
 
 
352
  {
353
 
354
+ if (isset($screen_data['definition']))
355
+ {
356
+ $definitions[$screen_id]['def'] = $this->renderResponsiveDefinition($screen_data['definition']);
357
+ // Hide screen on this size.
358
+ if (isset($screen_data['definition']['hide_screen']) && $screen_data['definition']['hide_screen'] == 1)
359
+ {
360
+ $this->doHideScreen($screen_id);
361
+ }
362
+ unset($screen_data['definition']);
363
+ }
364
+ if (count($screen_data) > 0)
365
+ $definitions[$screen_id]['data'][$part] = $screen_data;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
366
 
367
  }
368
+ }
369
+ }
370
 
371
+ foreach($definitions as $screen_id => $def_array)
372
+ {
373
+ if (isset($def_array['def']) && isset($def_array['data']))
374
+ {
375
+ //echo "<PRE> Parse this "; print_r($elements); echo "</PRE>";
376
 
377
+ $this->parse_responsive_definition($elements, $def_array['def'], $screen_id);
378
+ }
379
+ }
380
+ }
381
 
382
+ /* Hide screen by removing all data and putting display none there */
383
+ private function doHideScreen($screen_id)
384
+ {
385
+ foreach($this->data as $element => $eldata)
386
  {
387
+ if (isset($eldata['responsive']) && isset($eldata['responsive'][$screen_id]))
388
+ {
389
+ $this->data[$element]['responsive'][$screen_id] = array('normal' => array('display' => 'none') );
390
+ }
391
  }
392
+ }
393
 
394
+ protected function renderResponsiveDefinition($definition)
395
+ {
396
+ $def = 'only screen ';
397
+ if (isset($definition['min_width']))
398
+ $def .= ' and (min-width: ' . $definition['min_width'] . 'px) ';
399
+ if (isset($definition['max_width']))
400
+ $def .= ' and (max-width: ' . $definition['max_width'] . 'px) ';
401
 
402
+ return $def;
403
  }
404
 
405
+ /**
406
+ * @param $element DOMDoc to feed parse_part with
407
+ * @param $qdef Query Definition
408
+ * @param $vdata Data. -probably not needed */
409
+ protected function parse_responsive_definition($elements, $qdef, $screenName)
410
  {
411
 
412
  if (! isset($qdef) || $qdef == '') {
415
  }
416
 
417
 
418
+ //$output .= "@media ". $qdef . " { ";
419
+ $this->output_css .= "@media ". $qdef . " { ";
420
 
421
+ // foreach($vdata as $element => $data)
422
+ // {
423
 
424
+ foreach($elements as $el => $el_data)
425
+ $this->parse_part($el, $el_data, '', $screenName);
426
 
427
+ /* foreach($data as $pseudo => $values) {
428
  //foreach($vdat as $index => $values):
429
+ if ($pseudo != 'normal')
430
+ $output .= $element . ':' . $pseudo . " { ";
431
+ else
432
+ $output .= $element . " { ";
433
+
434
  $css_end = ';';
435
 
436
  // same as parse part, maybe merge in future
445
 
446
  $output .= " } ";
447
  // endforeach;
448
+ } */
449
 
450
 
451
+ // }
452
+ //$output .= " } ";
453
+ $this->output_css .= "}";
454
 
455
  //endforeach;
456
 
457
+ // return $output;
458
  }
459
 
460
  private function is_important()
466
  return false;
467
  }
468
 
469
+ /* Find Data in the dataset for this specific CSS selector */
470
+ protected function findData($data, $el)
471
  {
472
  $classes = explode(".", $el);
473
 
481
  return array();
482
  }
483
 
484
+ /** Filters a Data definition found with FindData for the correct ScreenName and returns that */
485
+ protected function findResponsiveData($data, $screenName)
486
  {
487
+ if (isset($data["responsive"]) && isset($data['responsive'][$screenName]))
488
+ {
489
+ $resp_data = $data['responsive'][$screenName];
490
+ if (isset($resp_data['definition'])) // don't need the definition, already output that.
491
+ unset($resp_data['definition']);
492
+
493
+ return $resp_data;
494
+ }
495
+
496
+ return array();
497
+ }
498
 
499
+ protected function doMixins($values)
500
+ {
501
+ $mixins = array("gradient", "box-shadow", "text-shadow", "keyframes");
502
+ //echo "<PRE>MIXINS!"; print_R($values); echo "</PRE>";
503
  foreach($mixins as $mixin)
504
  {
505
 
537
  return $values;
538
  }
539
 
540
+ /** Put various statements in their one-line shorthand. */
541
+ protected function combineStatements($values)
542
+ {
543
+ $combiners = array(
544
+ 'border' => array('border-width', 'border-style', 'border-color'),
545
+ 'border-radius' => array('border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius'),
546
+ 'margin' => array('margin-top', 'margin-right', 'margin-bottom', 'margin-left'),
547
+ 'padding' => array('padding-top', 'padding-right', 'padding-bottom', 'padding-left'),
548
+ 'background' => array('background-image','background-position','background-size', 'background-repeat'),
549
+ );
550
+
551
+ foreach($combiners as $shorthand => $reqs)
552
+ {
553
+ // All fields in combiner must be set. Check this against the keys (fields) in values, to ensure all are there ( results in 0 diff )
554
+ if (count(array_diff($reqs, array_keys($values) )) == 0)
555
+ {
556
+ $values[$shorthand] = '';
557
+
558
+ foreach($reqs as $item)
559
+ {
560
+ if ($item == 'background-size') // exceptions there must be
561
+ $values[$shorthand] .= '/ ';
562
+
563
+ $values[$shorthand] .= $values[$item] . ' ';
564
+ unset($values[$item]);
565
+ }
566
+
567
+ }
568
+ }
569
+
570
+ return $values;
571
+ }
572
+
573
+
574
  /** Parse the keyframes. Not a real mixin */
575
+ protected function mixin_keyframes($results, $values)
576
  {
577
  $keyframes_name = isset($results['keyframes-name']) ? $results['keyframes-name'] : false;
578
  $keyframes = isset($results['keyframes']) ? $results['keyframes'] : false;
586
  return $values;
587
  }
588
 
589
+ protected function mixin_gradient($results, $values)
590
  {
591
 
592
+ $background = ( isset($values['background'])) ? $values['background'] : false;
593
+
594
  $start = isset($results["gradient-start-color"]) ? $results["gradient-start-color"] : '';
595
  $end = isset( $results["gradient-end-color"] ) ? $results["gradient-end-color"] : '';
596
  $start_opacity = isset( $results["gradient-start-opacity"] ) ? $results["gradient-start-opacity"] : '';
602
  $start = maxUtils::hex2rgba($start, $start_opacity);
603
  $end = maxUtils::hex2rgba($end, $end_opacity);
604
 
605
+ $important = ($this->is_important()) ? "!important" : false;
606
  //$values = $this->add_include($values, "linear-gradient($start,$end,$stop,$important)");
607
 
608
  if ($use_gradient == 1)
609
  {
610
+ if ($background)
611
+ unset($values['background']);
612
+
613
+ $linear = "linear-gradient($start,$end,$stop";
614
+ if ($important)
615
+ $linear .= ','. $important;
616
+ elseif(! $important && $background)
617
+ $linear .= ',null,' . $background;
618
+ elseif ($important && $background)
619
+ $linear .= ',' . $background;
620
+
621
+ $values = $this->add_include($values, $linear . ')');
622
  }
623
  else {
624
  $values['background-color'] = $start;
629
 
630
  return $values;
631
 
632
+
633
  }
634
 
635
+ protected function mixin_boxshadow($results, $values)
636
  {
637
  $width = isset($results["box-shadow-width"]) ? $results["box-shadow-width"] : 0;
638
  $left = isset($results["box-shadow-offset-left"]) ? $results["box-shadow-offset-left"] : 0;
656
  return $values;
657
  }
658
 
659
+ protected function mixin_textshadow($results, $values)
660
  {
661
  $width = isset($results["text-shadow-width"]) ? $results["text-shadow-width"] : 0;
662
  $left = isset($results["text-shadow-left"]) ? $results["text-shadow-left"] : 0;
690
  $domObj = $domObj->load($domObj->save());
691
 
692
  $inline = $this->inline;
 
693
  // ISSUE #43 Sometimes this breaks
694
  if (! isset($inline[$pseudo]))
695
  return $domObj;
696
 
697
  $elements = array_keys($inline[$pseudo]);
698
+
699
  if ($pseudo != 'normal') // gather all elements
700
  $elements = array_merge($elements, array_keys($inline["normal"]));
701
 
702
  foreach($elements as $element)
703
  {
704
+ $styles = isset($inline[$pseudo][$element]) ? $inline[$pseudo][$element] : array();
 
705
 
706
+ if ($pseudo != 'normal')
707
  {
708
+ $styles = array_merge($inline['normal'][$element],$styles);
709
+ }
710
+ $normstyle = '';
711
+ /* if ($pseudo != 'normal') // parse all possible missing styles from pseudo el
712
+ {
713
+
714
  $tocompile = $this->dummify($inline['normal'][$element]);
715
  $normstyle = $this->compile($tocompile);
716
  $normstyle = $this->undummify($normstyle);
717
+ } */
718
  maxUtils::addTime("CSSParser: Parse inline done");
719
+ foreach($styles as $cssTag => $cssVal)
720
+ {
721
+ $normstyle .= $this->parse_cssline($styles, $cssTag,$cssVal);
722
+ }
723
  // add dummy {} here because new scssphp parse doesn't like styles without it. Remove it after compile, since this is inline.
724
+ $style_output = $this->compile($this->dummify($normstyle));
725
+ $style_output = $this->undummify($style_output);
726
 
727
  //$styles = $normstyle . $styles;
728
 
730
 
731
  $el = $domObj->find('[class*="' . $element . '"]', 0);
732
 
733
+ $el->style = $style_output;
734
 
735
  }
736
 
classes/maxbuttons-admin-helper.php CHANGED
@@ -241,7 +241,7 @@ class maxAdmin
241
  <a href="<?php echo $prev_url ?>" data-page="<?php echo $prev_page ?>" title="<?php _e("Go to the previous page","maxbuttons"); ?>" class="tablenav-pages-navspan button prev-page <?php if (!$prev_url) echo "disabled"; ?>">‹</a>
242
  <?php endif; ?>
243
 
244
- <span class="paging-input"><input data-url="<?php echo $base ?>" class='input-paging' min="1" max="<?php echo $last ?>" type="number" name='paging-number' size="1" value="<?php echo $current ?>"> <?php _e("of","maxbuttons") ?> <span class="total-pages"><?php echo $last ?>
245
  </span></span>
246
 
247
  <?php if (! $next_url): ?>
241
  <a href="<?php echo $prev_url ?>" data-page="<?php echo $prev_page ?>" title="<?php _e("Go to the previous page","maxbuttons"); ?>" class="tablenav-pages-navspan button prev-page <?php if (!$prev_url) echo "disabled"; ?>">‹</a>
242
  <?php endif; ?>
243
 
244
+ <span class="paging-input"><input data-url="<?php echo $base ?>" class='input-paging' data-current="<?php echo $current ?>" min="1" max="<?php echo $last ?>" type="number" name='paging-number' size="1" value="<?php echo $current ?>"> <?php _e("of","maxbuttons") ?> <span class="total-pages"><?php echo $last ?>
245
  </span></span>
246
 
247
  <?php if (! $next_url): ?>
classes/maxbuttons-class.php CHANGED
@@ -10,6 +10,8 @@ class maxButtonsPlugin
10
  protected $plugin_name;
11
  protected $plugin_url;
12
  protected $plugin_path;
 
 
13
  protected $debug_mode = false;
14
  protected $footer = array();
15
 
@@ -20,12 +22,16 @@ class maxButtonsPlugin
20
  protected static $instance;
21
 
22
  private $paths = array('classes', 'classes/controllers');
 
23
 
24
  /* Class constructor
25
  Add hooks and actions used by this plugin. Sets plugin environment information
26
  */
27
  public function __construct()
28
  {
 
 
 
29
  $this->load(); // loads classes
30
 
31
  maxUtils::timeInit(); // benchmark timer init.
@@ -37,8 +43,14 @@ class maxButtonsPlugin
37
 
38
  $this->installed_version = get_option(MAXBUTTONS_VERSION_KEY);
39
 
40
- if ( defined('MAXBUTTONS_DEBUG') && MAXBUTTONS_DEBUG)
41
- $this->debug_mode = true;
 
 
 
 
 
 
42
 
43
  self::$instance = $this;
44
 
@@ -101,7 +113,7 @@ class maxButtonsPlugin
101
 
102
  if( is_admin())
103
  {
104
- add_action('admin_enqueue_scripts', array($this,'add_admin_styles'));
105
  add_action('admin_enqueue_scripts', array($this,'add_admin_scripts'));
106
  add_action('admin_enqueue_scripts', array(maxUtils::namespaceit('maxUtils'), 'fixFAConflict'),999);
107
 
@@ -222,7 +234,6 @@ class maxButtonsPlugin
222
 
223
  load_textdomain($domain, WP_LANG_DIR.'/maxbuttons/'.$domain.'-'.$locale.'.mo');
224
  $res = load_plugin_textdomain('maxbuttons', false, $this->plugin_name . '/languages/');
225
-
226
  }
227
 
228
 
@@ -275,7 +286,6 @@ class maxButtonsPlugin
275
  settings_fields( 'maxbuttons_settings' );
276
  update_option('maxbuttons_user_level', $maxbuttons_capabilities);
277
  }
278
- $admin_pages = array();
279
 
280
  $page_title = __('MaxButtons: Buttons', 'maxbuttons');
281
  $menu_title = __('MaxButtons', 'maxbuttons');
@@ -286,12 +296,12 @@ class maxButtonsPlugin
286
  $icon_url = $this->plugin_url . 'images/mb-peach-icon.png';
287
  $submenu_function = array($this, 'load_admin_page');
288
 
289
- add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, 81);
290
 
291
  // We add this submenu page with the same slug as the parent to ensure we don't get duplicates
292
  $sub_menu_title = __('Buttons', 'maxbuttons');
293
  $menu_slug = 'maxbuttons-controller';
294
- $admin_pages[] = add_submenu_page($menu_slug, $page_title, $sub_menu_title, $capability, $menu_slug, $function);
295
 
296
  // Now add the submenu page for the Add New page
297
  $submenu_page_title = __('MaxButtons: Add/Edit Button', 'maxbuttons');
@@ -299,36 +309,38 @@ class maxButtonsPlugin
299
  $submenu_slug = 'maxbuttons-button';
300
 
301
  //$submenu_function = 'maxbuttons_button';
302
- $admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function);
303
 
304
  // Now add the submenu page for the Go Pro page
305
  $submenu_page_title = __('MaxButtons: Upgrade to Pro', 'maxbuttons');
306
  $submenu_title = __('Upgrade to Pro', 'maxbuttons');
307
  $submenu_slug = 'maxbuttons-pro';
308
  //$submenu_function = 'maxbuttons_pro';
309
- $admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function);
310
 
311
  // Now add the submenu page for the Settings page
312
  $submenu_page_title = __('MaxButtons: Settings', 'maxbuttons');
313
  $submenu_title = __('Settings', 'maxbuttons');
314
  $submenu_slug = 'maxbuttons-settings';
315
  //$submenu_function = 'maxbuttons_settings';
316
- $admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $admin_capability, $submenu_slug, $submenu_function);
317
 
318
  // Now add the submenu page for the Support page
319
  $submenu_page_title = __('MaxButtons: Support', 'maxbuttons');
320
  $submenu_title = __('Support', 'maxbuttons');
321
  $submenu_slug = 'maxbuttons-support';
322
  //$submenu_function = 'maxbuttons_support';
323
- $admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $admin_capability, $submenu_slug, $submenu_function);
324
 
325
  if (! MaxInstall::hasAddon('socialshare'))
326
  {
327
  $submenu_page_title = __('MaxButtons: Share Buttons', 'maxbuttons');
328
  $submenu_title = __('Share Buttons', 'maxbuttons');
329
  $submenu_slug = 'social-share';
330
- $admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function);
331
  }
 
 
332
  }
333
 
334
  function load_admin_page()
@@ -349,7 +361,6 @@ class maxButtonsPlugin
349
 
350
  }
351
  }
352
-
353
  switch($page)
354
  {
355
  case "maxbuttons-button":
@@ -418,71 +429,100 @@ class maxButtonsPlugin
418
 
419
  }
420
 
421
-
422
- function add_admin_styles($hook) {
423
  // only hook in maxbuttons realm.
424
- if ( strpos($hook,'maxbuttons') === false && $hook != 'post.php' && $hook != 'post-new.php' )
425
- {
426
- if (! isset($_GET['fl_builder'])) // exception for beaver builder
427
- return;
428
- }
429
-
430
- $version = MAXBUTTONS_VERSION_NUM;
431
- //$this->load_library('fontawesome');
432
-
433
- wp_enqueue_style('wp-color-picker');
434
 
435
  if (is_rtl())
436
- wp_register_style('maxbuttons-css', $this->plugin_url . 'assets/css/style.rtl.css', array(), $version);
437
  else
438
- wp_register_style('maxbuttons-css', $this->plugin_url . 'assets/css/style.css', array(), $version);
439
 
440
 
441
  wp_enqueue_style('maxbuttons-css');
442
 
443
- wp_register_style('mb-alpha-color', $this->plugin_url . 'assets/libraries/alpha-color/alpha-color-picker.css', array(), $version);
444
 
445
  wp_enqueue_style('mb-alpha-color');
446
 
447
  }
448
 
449
- /** Add Admin scripts
450
- *
451
- * Uses WP hook for Admin scripts to add needed js.
452
- */
453
- function add_admin_scripts($hook) {
454
- // only hook in maxbuttons realm.
455
- if ( strpos($hook,'maxbuttons') === false ) //&& $hook != 'post.php' && $hook != 'post-new.php'
456
- return;
457
 
458
- $version = MAXBUTTONS_VERSION_NUM;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
 
460
- $js_url = trailingslashit($this->plugin_url . 'js');
461
- if (! $this->debug_mode)
462
- $js_url .= 'min/';
463
 
464
  wp_enqueue_script('jquery-ui-draggable');
465
  wp_enqueue_script('wplink');
466
 
467
- wp_register_script('maxbutton-admin', $js_url . 'maxbuttons-admin.js', array('jquery', 'jquery-ui-draggable', 'maxbuttons-tabs','maxbuttons-modal', 'maxbuttons-tabs', 'maxbuttons-responsive', 'maxbuttons-ajax', 'maxbutton-alpha-picker', 'underscore', 'maxbuttons-ajax', 'wplink'),$version, true);
468
 
469
  wp_localize_script('maxbutton-admin', 'maxadmin_settings', array(
470
  'homeurl' => home_url(),
 
471
  ));
472
 
473
- wp_register_script('maxbutton-alpha-picker', $this->plugin_url . 'assets/libraries/alpha-color/alpha-color-picker.js', array('jquery', 'wp-color-picker'), $version, true);
 
 
 
474
 
475
  wp_enqueue_script('maxbutton-alpha-picker');
476
  wp_enqueue_script('maxbutton-admin');
477
- wp_enqueue_script('maxbutton-js-init', $js_url . 'init.js', array('maxbutton-admin'),$version, true);
478
- wp_enqueue_script('maxbuttons-tabs', $js_url . 'maxtabs.js', array('jquery') ,$version, true);
479
- wp_enqueue_script('maxbuttons-responsive', $js_url . 'responsive.js', array('jquery'), $version, true );
480
 
481
  wp_enqueue_style('editor-buttons'); // style for WP-link
482
 
 
 
 
483
 
484
- $this->load_ajax_script();
485
- $this->load_modal_script();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
486
  }
487
 
488
  /** Load the Modal Script
@@ -490,12 +530,7 @@ class maxButtonsPlugin
490
  */
491
  public function load_modal_script()
492
  {
493
- $version = MAXBUTTONS_VERSION_NUM;
494
- $js_url = trailingslashit($this->plugin_url . 'js');
495
- if (! $this->debug_mode)
496
- $js_url .= 'min/';
497
-
498
- wp_register_script('maxbuttons-modal', $js_url . 'maxmodal.js', array('jquery','jquery-ui-draggable'), $version, true);
499
  // translations of controls and other elements that can be used in maxmodal
500
  $translations = array(
501
  'yes' => __("Yes","maxbuttons"),
@@ -506,7 +541,7 @@ class maxButtonsPlugin
506
  wp_localize_script('maxbuttons-modal', 'modaltext', $translations);
507
  wp_enqueue_script('maxbuttons-modal');
508
 
509
- wp_enqueue_style('maxbuttons-maxmodal', $this->plugin_url . 'assets/css/maxmodal.css', array(), $version);
510
 
511
  }
512
 
@@ -516,12 +551,7 @@ class maxButtonsPlugin
516
  */
517
  public function load_ajax_script()
518
  {
519
- $version = MAXBUTTONS_VERSION_NUM;
520
- $js_url = trailingslashit($this->plugin_url . 'js');
521
- if (! $this->debug_mode)
522
- $js_url .= 'min/';
523
-
524
- wp_register_script('maxbuttons-ajax', $js_url . 'maxajax.js', array('jquery'), $version, true);
525
  wp_localize_script('maxbuttons-ajax', 'maxajax',
526
  array(
527
  'ajax_url' => admin_url( 'admin-ajax.php' ),
@@ -540,13 +570,8 @@ class maxButtonsPlugin
540
  */
541
  public function load_media_script()
542
  {
543
- $version = MAXBUTTONS_VERSION_NUM;
544
 
545
- $js_url = trailingslashit($this->plugin_url . 'js');
546
- if (! $this->debug_mode)
547
- $js_url .= 'min/';
548
-
549
- wp_register_script('mb-media-button', $js_url . 'media_button.js', array('jquery', 'maxbuttons-modal', 'maxbuttons-ajax'), $version, true);
550
 
551
  $this->load_modal_script();
552
  $this->load_ajax_script();
@@ -571,7 +596,7 @@ class maxButtonsPlugin
571
  wp_localize_script('mb-media-button','mbtrans', $translations);
572
  wp_enqueue_script('mb-media-button');
573
 
574
- wp_enqueue_style('maxbuttons-media-button', $this->plugin_url . 'assets/css/media_button.css', array(), $version);
575
 
576
 
577
  }
@@ -579,9 +604,6 @@ class maxButtonsPlugin
579
  /** Inits the options for WP editor, like tinymce and other buttons **/
580
  public function init_wp_editor_options()
581
  {
582
- /*if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) {
583
- return;
584
- } */
585
  // option
586
  if (get_option('maxbuttons_noshowtinymce') == 1) return;
587
 
@@ -591,16 +613,6 @@ class maxButtonsPlugin
591
  add_filter('mce_buttons', array($this, 'tinymce_button'));
592
  add_filter('mce_external_plugins', array($this, 'add_tinymce_button'));
593
 
594
- /* add_action('before_wp_tiny_mce', function($settings) {
595
- $icon_url = MB()->get_plugin_url() . 'images/mb-peach-32.png';
596
- echo "<script type='text/javascript'>
597
- var maxButtonsTinyMCE = {
598
- 'icon': '$icon_url'
599
- };
600
- </script>";
601
- });
602
- */
603
-
604
  }
605
 
606
  /** Load Media Button in WP editor
@@ -636,26 +648,20 @@ class maxButtonsPlugin
636
 
637
  public function add_tinymce_button($plugin_array)
638
  {
639
- $js_url = trailingslashit($this->plugin_url . 'js');
640
- if (! $this->debug_mode)
641
- $js_url .= 'min/';
642
 
643
  $this->load_media_script(); // enqueue button handler
644
 
645
-
646
- $plugin_array['maxButtons_tinymce'] = $js_url . 'tinymce.js' ;
647
  return $plugin_array;
648
 
649
  }
650
 
651
 
652
-
653
  /** Scripts run on front-end
654
  * Load font-awesome, and limited javascript for the front-end. This is being kept extremely limited for performance reasons.
655
  */
656
  public function front_scripts()
657
  {
658
- $version = MAXBUTTONS_VERSION_NUM;
659
 
660
  // load backend script on front in Beaver Builder
661
  if (isset($_GET['fl_builder']))
10
  protected $plugin_name;
11
  protected $plugin_url;
12
  protected $plugin_path;
13
+ protected $version;
14
+ protected $js_url;
15
  protected $debug_mode = false;
16
  protected $footer = array();
17
 
22
  protected static $instance;
23
 
24
  private $paths = array('classes', 'classes/controllers');
25
+ protected $admin_pages = array(); // our defined menu pages.
26
 
27
  /* Class constructor
28
  Add hooks and actions used by this plugin. Sets plugin environment information
29
  */
30
  public function __construct()
31
  {
32
+ if ( defined('MAXBUTTONS_DEBUG') && MAXBUTTONS_DEBUG)
33
+ $this->debug_mode = true;
34
+
35
  $this->load(); // loads classes
36
 
37
  maxUtils::timeInit(); // benchmark timer init.
43
 
44
  $this->installed_version = get_option(MAXBUTTONS_VERSION_KEY);
45
 
46
+ $this->version = MAXBUTTONS_VERSION_NUM;
47
+
48
+ $js_url = trailingslashit($this->plugin_url . 'js');
49
+ if (! $this->debug_mode)
50
+ $js_url .= 'min/';
51
+
52
+ $this->js_url = $js_url;
53
+
54
 
55
  self::$instance = $this;
56
 
113
 
114
  if( is_admin())
115
  {
116
+ //add_action('admin_enqueue_scripts', array($this,'add_admin_styles'));
117
  add_action('admin_enqueue_scripts', array($this,'add_admin_scripts'));
118
  add_action('admin_enqueue_scripts', array(maxUtils::namespaceit('maxUtils'), 'fixFAConflict'),999);
119
 
234
 
235
  load_textdomain($domain, WP_LANG_DIR.'/maxbuttons/'.$domain.'-'.$locale.'.mo');
236
  $res = load_plugin_textdomain('maxbuttons', false, $this->plugin_name . '/languages/');
 
237
  }
238
 
239
 
286
  settings_fields( 'maxbuttons_settings' );
287
  update_option('maxbuttons_user_level', $maxbuttons_capabilities);
288
  }
 
289
 
290
  $page_title = __('MaxButtons: Buttons', 'maxbuttons');
291
  $menu_title = __('MaxButtons', 'maxbuttons');
296
  $icon_url = $this->plugin_url . 'images/mb-peach-icon.png';
297
  $submenu_function = array($this, 'load_admin_page');
298
 
299
+ $this->admin_pages[] = add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, 81);
300
 
301
  // We add this submenu page with the same slug as the parent to ensure we don't get duplicates
302
  $sub_menu_title = __('Buttons', 'maxbuttons');
303
  $menu_slug = 'maxbuttons-controller';
304
+ $this->admin_pages[] = add_submenu_page($menu_slug, $page_title, $sub_menu_title, $capability, $menu_slug, $function);
305
 
306
  // Now add the submenu page for the Add New page
307
  $submenu_page_title = __('MaxButtons: Add/Edit Button', 'maxbuttons');
309
  $submenu_slug = 'maxbuttons-button';
310
 
311
  //$submenu_function = 'maxbuttons_button';
312
+ $this->admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function);
313
 
314
  // Now add the submenu page for the Go Pro page
315
  $submenu_page_title = __('MaxButtons: Upgrade to Pro', 'maxbuttons');
316
  $submenu_title = __('Upgrade to Pro', 'maxbuttons');
317
  $submenu_slug = 'maxbuttons-pro';
318
  //$submenu_function = 'maxbuttons_pro';
319
+ $this->admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function);
320
 
321
  // Now add the submenu page for the Settings page
322
  $submenu_page_title = __('MaxButtons: Settings', 'maxbuttons');
323
  $submenu_title = __('Settings', 'maxbuttons');
324
  $submenu_slug = 'maxbuttons-settings';
325
  //$submenu_function = 'maxbuttons_settings';
326
+ $this->admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $admin_capability, $submenu_slug, $submenu_function);
327
 
328
  // Now add the submenu page for the Support page
329
  $submenu_page_title = __('MaxButtons: Support', 'maxbuttons');
330
  $submenu_title = __('Support', 'maxbuttons');
331
  $submenu_slug = 'maxbuttons-support';
332
  //$submenu_function = 'maxbuttons_support';
333
+ $this->admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $admin_capability, $submenu_slug, $submenu_function);
334
 
335
  if (! MaxInstall::hasAddon('socialshare'))
336
  {
337
  $submenu_page_title = __('MaxButtons: Share Buttons', 'maxbuttons');
338
  $submenu_title = __('Share Buttons', 'maxbuttons');
339
  $submenu_slug = 'social-share';
340
+ $this->admin_pages[] = add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function);
341
  }
342
+
343
+ $this->admin_pages = apply_filters('maxbuttons/plugin/admin_pages',$this->admin_pages);
344
  }
345
 
346
  function load_admin_page()
361
 
362
  }
363
  }
 
364
  switch($page)
365
  {
366
  case "maxbuttons-button":
429
 
430
  }
431
 
432
+ /** Load general styles when visiting pages set by the plugin */
433
+ function load_plugin_styles() {
434
  // only hook in maxbuttons realm.
435
+ /*if ( strpos($hook,'maxbuttons') === false && $hook != 'post.php' && $hook != 'post-new.php' )
436
+ { */
437
+ //if (! isset($_GET['fl_builder'])) // exception for beaver builder
438
+ // return;
439
+ //}
 
 
 
 
 
440
 
441
  if (is_rtl())
442
+ wp_register_style('maxbuttons-css', $this->plugin_url . 'assets/css/style.rtl.css', array(), $this->version);
443
  else
444
+ wp_register_style('maxbuttons-css', $this->plugin_url . 'assets/css/style.css', array(), $this->version);
445
 
446
 
447
  wp_enqueue_style('maxbuttons-css');
448
 
449
+ wp_register_style('mb-alpha-color', $this->plugin_url . 'assets/libraries/alpha-color/alpha-color-picker.css', array(), $this->version);
450
 
451
  wp_enqueue_style('mb-alpha-color');
452
 
453
  }
454
 
455
+ public function add_admin_scripts($hook)
456
+ {
457
+ if (! in_array($hook, $this->admin_pages))
458
+ return; // not our circus ...
 
 
 
 
459
 
460
+ $is_editor = false;
461
+ if ($hook == 'toplevel_page_maxbuttons-controller' && isset($_GET['action']) && $_GET['action'] == 'edit')
462
+ $is_editor = true;
463
+ elseif ($hook == 'maxbuttons_page_maxbuttons-button')
464
+ $is_editor = true;
465
+
466
+ $this->load_plugin_scripts();
467
+ $this->load_plugin_styles();
468
+ $this->load_ajax_script();
469
+ $this->load_modal_script();
470
+
471
+ if ($is_editor)
472
+ {
473
+ $this->load_editor_scripts();
474
+ }
475
+
476
+ }
477
+
478
+ /** Load general scripts when visiting pages set by the plugin */
479
+ protected function load_plugin_scripts() {
480
+ // only hook in maxbuttons realm.
481
 
 
 
 
482
 
483
  wp_enqueue_script('jquery-ui-draggable');
484
  wp_enqueue_script('wplink');
485
 
486
+ wp_register_script('maxbutton-admin', $this->js_url . 'maxbuttons-admin.js', array('jquery', 'jquery-ui-draggable', 'maxbuttons-tabs','maxbuttons-modal', 'maxbuttons-tabs', 'maxbuttons-ajax', 'maxbutton-alpha-picker', 'underscore', 'maxbuttons-ajax', 'wplink'),$this->version, true);
487
 
488
  wp_localize_script('maxbutton-admin', 'maxadmin_settings', array(
489
  'homeurl' => home_url(),
490
+ 'remove_confirm' => __('Are you sure you want to remove this screen?', 'maxbuttons'),
491
  ));
492
 
493
+ wp_register_script('maxbutton-alpha-picker', $this->plugin_url . 'assets/libraries/alpha-color/alpha-color-picker.js', array('jquery', 'wp-color-picker'), $this->version, true);
494
+
495
+ wp_register_script('maxbutton-js-init', $this->js_url . 'init.js', array('maxbutton-admin'),$this->version, true);
496
+ wp_register_script('maxbuttons-tabs', $this->js_url . 'maxtabs.js', array('jquery') ,$this->version, true);
497
 
498
  wp_enqueue_script('maxbutton-alpha-picker');
499
  wp_enqueue_script('maxbutton-admin');
500
+ wp_enqueue_script('maxbutton-js-init', $this->js_url . 'init.js', array('maxbutton-admin'),$this->version, true);
501
+ wp_enqueue_script('maxbuttons-tabs', $this->js_url . 'maxtabs.js', array('jquery') ,$this->version, true);
 
502
 
503
  wp_enqueue_style('editor-buttons'); // style for WP-link
504
 
505
+ // $this->load_ajax_script();
506
+ // $this->load_modal_script();
507
+ }
508
 
509
+ /* Load scripts specifically for the editor */
510
+ protected function load_editor_scripts()
511
+ {
512
+ wp_register_script('maxbutton-live-preview', $this->js_url . 'live-preview.js',array('maxbutton-admin'), $this->version, true);
513
+
514
+ wp_enqueue_script('maxbutton-live-preview');
515
+
516
+ $this->load_library('fontawesome');
517
+ wp_enqueue_style('wp-color-picker');
518
+
519
+ // Costly annoying scripts
520
+ remove_action('wp_head', 'print_emoji_detection_script', 7);
521
+ remove_action('wp_print_styles', 'print_emoji_styles');
522
+ remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
523
+ remove_action( 'admin_print_styles', 'print_emoji_styles' );
524
+
525
+ do_action('maxbuttons/init/editor_scripts');
526
  }
527
 
528
  /** Load the Modal Script
530
  */
531
  public function load_modal_script()
532
  {
533
+ wp_register_script('maxbuttons-modal', $this->js_url . 'maxmodal.js', array('jquery','jquery-ui-draggable'), $this->version, true);
 
 
 
 
 
534
  // translations of controls and other elements that can be used in maxmodal
535
  $translations = array(
536
  'yes' => __("Yes","maxbuttons"),
541
  wp_localize_script('maxbuttons-modal', 'modaltext', $translations);
542
  wp_enqueue_script('maxbuttons-modal');
543
 
544
+ wp_enqueue_style('maxbuttons-maxmodal', $this->plugin_url . 'assets/css/maxmodal.css', array(), $this->version);
545
 
546
  }
547
 
551
  */
552
  public function load_ajax_script()
553
  {
554
+ wp_register_script('maxbuttons-ajax', $this->js_url . 'maxajax.js', array('jquery'), $this->version, true);
 
 
 
 
 
555
  wp_localize_script('maxbuttons-ajax', 'maxajax',
556
  array(
557
  'ajax_url' => admin_url( 'admin-ajax.php' ),
570
  */
571
  public function load_media_script()
572
  {
 
573
 
574
+ wp_register_script('mb-media-button', $this->js_url . 'media_button.js', array('jquery', 'maxbuttons-modal', 'maxbuttons-ajax'), $this->version, true);
 
 
 
 
575
 
576
  $this->load_modal_script();
577
  $this->load_ajax_script();
596
  wp_localize_script('mb-media-button','mbtrans', $translations);
597
  wp_enqueue_script('mb-media-button');
598
 
599
+ wp_enqueue_style('maxbuttons-media-button', $this->plugin_url . 'assets/css/media_button.css', array(), $this->version);
600
 
601
 
602
  }
604
  /** Inits the options for WP editor, like tinymce and other buttons **/
605
  public function init_wp_editor_options()
606
  {
 
 
 
607
  // option
608
  if (get_option('maxbuttons_noshowtinymce') == 1) return;
609
 
613
  add_filter('mce_buttons', array($this, 'tinymce_button'));
614
  add_filter('mce_external_plugins', array($this, 'add_tinymce_button'));
615
 
 
 
 
 
 
 
 
 
 
 
616
  }
617
 
618
  /** Load Media Button in WP editor
648
 
649
  public function add_tinymce_button($plugin_array)
650
  {
 
 
 
651
 
652
  $this->load_media_script(); // enqueue button handler
653
 
654
+ $plugin_array['maxButtons_tinymce'] = $this->js_url . 'tinymce.js' ;
 
655
  return $plugin_array;
656
 
657
  }
658
 
659
 
 
660
  /** Scripts run on front-end
661
  * Load font-awesome, and limited javascript for the front-end. This is being kept extremely limited for performance reasons.
662
  */
663
  public function front_scripts()
664
  {
 
665
 
666
  // load backend script on front in Beaver Builder
667
  if (isset($_GET['fl_builder']))
classes/screen.php ADDED
@@ -0,0 +1,371 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace MaxButtons;
3
+ // instance of screen, to keep all data from one screen together.
4
+
5
+ class Screen
6
+ {
7
+ protected $fields;
8
+ protected $defined_fields = array(); // fields defined in admin
9
+ protected $named_fields = array(); // fields that have an unique ID, but data field is based on name ( checkbox, radio etc )
10
+ protected $mapped_fields = array();
11
+ protected $templates_by_name = array('radio', 'checkbox', 'switch');
12
+
13
+ protected static $data;
14
+ protected static $screens;
15
+
16
+ public $id;
17
+ public $name;
18
+
19
+ private $prefix = '';
20
+ private $is_responsive = false;
21
+ private $is_new = false;
22
+ private $is_default = false;
23
+
24
+
25
+ public function __construct($id, $args = array())
26
+ {
27
+ $this->id = $id;
28
+
29
+ if ($id == 'default')
30
+ {
31
+ $this->is_default = true;
32
+ }
33
+ elseif ($id == 'new')
34
+ {
35
+ $this->is_new = true;
36
+ }
37
+ else
38
+ {
39
+ $this->is_responsive = true;
40
+ }
41
+
42
+ if ($id !== 'default')
43
+ {
44
+ $this->prefix = $id . '_';
45
+ }
46
+
47
+ $this->name = isset($args['name']) ? $args['name'] : 'placeholder';
48
+ }
49
+
50
+ public static function setData($data)
51
+ {
52
+ $new_data = array(); //egalite
53
+ if (! is_array($data) || count($data) == 0) // no data
54
+ return false;
55
+
56
+
57
+ foreach($data as $block => $fields)
58
+ {
59
+ if (is_array($fields))
60
+ $new_data = array_merge($new_data, $fields);
61
+ }
62
+
63
+ self::setupScreens($data);
64
+ self::$data = $new_data;
65
+ }
66
+
67
+ public static function setupScreens($data)
68
+ {
69
+ $responsive = isset($data['responsive']) ? $data['responsive'] : array();
70
+ $screens['default'] = array('name' => __('Main', 'maxbuttons'));
71
+
72
+ if (is_array($responsive) && isset($responsive['screens']))
73
+ {
74
+ $responsive_screens = array_filter($responsive['screens']); // remove anything empty.
75
+
76
+ foreach($responsive_screens as $screen_id)
77
+ {
78
+ $name = isset($responsive[$screen_id . '_screen_name']) ? $responsive[$screen_id . '_screen_name'] : false;
79
+ /*if (! $name)
80
+ {
81
+ $name =
82
+ } */
83
+
84
+ $screens[$screen_id] = array('name' => $name);
85
+ }
86
+
87
+ }
88
+
89
+ $screens['new'] = array('name' => __('Add', 'maxbuttons'));
90
+
91
+ $screenObjs = array();
92
+
93
+ foreach($screens as $screen_name => $this_screen_data)
94
+ {
95
+ $screensObjs[$screen_name] = new Screen($screen_name, $this_screen_data);
96
+ }
97
+
98
+ self::$screens = $screensObjs;
99
+ return $screensObjs;
100
+ }
101
+
102
+ public static function getScreens()
103
+ {
104
+ return self::$screens;
105
+ }
106
+
107
+ public static function countScreens()
108
+ {
109
+ return count(self::getScreens()) -1; // don't count new screen
110
+ }
111
+
112
+ // function to get field id, eventually converting it for responsive.
113
+ public function getFieldID($name)
114
+ {
115
+ return $this->prefix . $name;
116
+ }
117
+
118
+ public function is_responsive()
119
+ {
120
+ return $this->is_responsive;
121
+ }
122
+
123
+ public function is_new()
124
+ {
125
+ return $this->is_new;
126
+ }
127
+
128
+ public function is_default()
129
+ {
130
+ return $this->is_default;
131
+ }
132
+
133
+
134
+ // add a maxfield to be displayed on the admin.
135
+ public function addfield($field, $start = '', $end = '')
136
+ {
137
+ $field_id = isset($field->id) ? $field->id : $field->template . \rand(0,1000);
138
+
139
+ // don't add if it's not our screen.
140
+ if (! $this->isFieldThisScreen($field))
141
+ {
142
+ return;
143
+ }
144
+
145
+ $this->fields[$field_id] = array('field' => $field,
146
+ 'start' => $start,
147
+ 'end' => $end);
148
+ $this->fields = apply_filters('mb/editor/addfield', $this->fields, $field, $this);
149
+
150
+ $this->defined_fields[] = $field_id;
151
+ // Radio and checkboxes more define as field_name ( same fieldname for all) as field_id, instead of an unique id. If not added here, the mapfields will skip it, because not in defined fields.
152
+ if (in_array($field->template, $this->templates_by_name) )
153
+ {
154
+ $this->named_fields[$field_id] = $field->name;
155
+ }
156
+ do_action('mb/editor/afterfield/'. $field_id, $field, $this);
157
+ }
158
+
159
+ /** Insert a field before or after a existing field
160
+ *
161
+ * @param String $insert_field Existing field to perform operation on
162
+ * @param Object $field The new field to insert
163
+ * @param String $start Start Template
164
+ * @param String $end End template
165
+ * @param String $op Insert before of after specified insert field
166
+ */
167
+ public function insertField($insert_field, $field, $start = 'start', $end = 'end', $op = 'before')
168
+ {
169
+ $insert_pos = 0;
170
+
171
+ // don't add if it's not our screen.
172
+ if (! $this->isFieldThisScreen($field))
173
+ return;
174
+
175
+ $this->addField($field, $start, $end); // add the field to the array
176
+
177
+ foreach($this->fields as $field_id => $array)
178
+ {
179
+ if ($field_id == $insert_field)
180
+ {
181
+
182
+ break;
183
+ }
184
+ $insert_pos++;
185
+ }
186
+
187
+ // Find inserted field and remove it from array.
188
+ $new_field_id = $field->id;
189
+ $new_field_ar = $this->fields[$new_field_id];
190
+ unset($this->fields[$new_field_id]);
191
+
192
+ // Find position to insert new field
193
+ // Yes this could be more efficient.
194
+ $new_fields = array();
195
+ $i = 0;
196
+ foreach($this->fields as $field_id => $array)
197
+ {
198
+ if ($i == $insert_pos && $op == 'before')
199
+ {
200
+ $new_fields[$new_field_id] = $new_field_ar;
201
+ }
202
+ $new_fields[$field_id] = $array;
203
+ if ($i == $insert_pos && $op == 'after')
204
+ {
205
+ $new_fields[$new_field_id] = $new_field_ar;
206
+ }
207
+ $i++;
208
+ }
209
+ $this->fields = $new_fields;
210
+ }
211
+
212
+ public function isFieldThisScreen($field)
213
+ {
214
+ if ($this->is_responsive && ! $field->is_responsive)
215
+ return false;
216
+ if ($this->is_default && ! $field->is_default)
217
+ return false;
218
+ if ($this->is_new && ! $field->is_new)
219
+ return false;
220
+
221
+ return true;
222
+ }
223
+
224
+ public function getFields()
225
+ {
226
+ return $this->fields;
227
+ }
228
+
229
+ // Maps fields to available fields, this is connecting the JS live Preview.
230
+ public function mapFields($map)
231
+ {
232
+ $newmap = array();
233
+
234
+ foreach($map as $name => $data) // make conversions for the screens.
235
+ {
236
+ $field_id = $this->getFieldID($name);
237
+
238
+ if (in_array($field_id, $this->defined_fields))
239
+ $newmap[$field_id] = $data;
240
+
241
+ if (in_array($field_id, $this->named_fields))
242
+ {
243
+ //$matches = array_keys($this->named_fields, $field_id);
244
+ // $fid == form field id, fname is form field.,
245
+ foreach($this->named_fields as $fid => $fname)
246
+ {
247
+ if ($fname == $field_id)
248
+ {
249
+ $newmap[$fid] = $data;
250
+ }
251
+
252
+ }
253
+
254
+ $newmap[$field_id] = $data;
255
+ }
256
+
257
+
258
+ }
259
+ $this->mapped_fields = $newmap;
260
+ return $newmap;
261
+ }
262
+
263
+ /** This is all a bit hacky, map can be delivered by param, or take the main thing */
264
+ public function displayFieldMap($map = null)
265
+ {
266
+ if (is_null($map))
267
+ $map = $this->mapped_fields;
268
+
269
+ // JS expects a fieldmap always.
270
+ // if (count($map) > 0)
271
+ // {
272
+ echo "<span class='fieldmap'>";
273
+ echo json_encode($map);
274
+ echo "</span>";
275
+ // }
276
+ }
277
+
278
+ public function display_fields($clean = true, $return = false)
279
+ {
280
+ $fields = apply_filters('mb/display_fields', $this->fields);
281
+ $output = '';
282
+
283
+ if (! is_array($fields))
284
+ return;
285
+
286
+ foreach($fields as $id => $item)
287
+ {
288
+ $field = $item['field'];
289
+
290
+ if ($field->publish == false) // don't publish this via screen, this is something manual.
291
+ continue;
292
+
293
+ $output .= $field->output($item['start'], $item['end']);
294
+ }
295
+
296
+ if ($clean)
297
+ {
298
+ $this->fields = array();
299
+ }
300
+
301
+ if (! $return)
302
+ echo $output;
303
+ else
304
+ return $output;
305
+
306
+ }
307
+
308
+ public function getValue($fieldname)
309
+ {
310
+
311
+ if(isset(self::$data[$fieldname]))
312
+ return self::$data[$fieldname];
313
+ elseif($this->is_responsive && strpos($fieldname, $this->prefix) >= 0) // try to retrieve original value of the responsive field.
314
+ {
315
+ $prefixless = str_replace($this->prefix, '', $fieldname);
316
+
317
+ if (isset(self::$data[$prefixless]))
318
+ return self::$data[$prefixless];
319
+ }
320
+ elseif ($this->getDefault($fieldname))
321
+ return $this->getDefault($fieldname);
322
+
323
+ return false; // dunno.
324
+ }
325
+
326
+ public function getColorValue($fieldname)
327
+ {
328
+ $value = self::getValue($fieldname);
329
+ if (maxUtils::isrgba($value))
330
+ return $value;
331
+
332
+ if (! $value )
333
+ return false;
334
+ if (substr($value,0,1) !== '#')
335
+ {
336
+ $value = '#' . $value;
337
+ }
338
+ return $value;
339
+ }
340
+
341
+ public function getDefault($fieldname)
342
+ {
343
+ $fieldDef = maxBlocks::getFieldDefinition($fieldname) ;
344
+
345
+ if ($fieldDef && isset($fieldDef['default']) )
346
+ return $fieldDef['default'];
347
+
348
+ return false; // dunno
349
+
350
+ }
351
+
352
+ public function removeScreen($data)
353
+ {
354
+ foreach($data as $block_name => $blockdata)
355
+ {
356
+ if (is_array($blockdata)) // document_id block has a non-array blockdata
357
+ {
358
+ foreach($blockdata as $field_name => $field_data)
359
+ {
360
+ $has_id = strpos($field_name, $this->id);
361
+ if ($has_id !== false && $has_id === 0) // strict checks to fail-safe deletion.
362
+ {
363
+ unset($data[$block_name][$field_name]);
364
+ }
365
+ }
366
+ }
367
+ }
368
+ return $data;
369
+ }
370
+
371
+ } // class
includes/maxbuttons-button.php CHANGED
@@ -7,90 +7,30 @@ $button = $this->view->button;
7
 
8
  $admin = MB()->getClass('admin');
9
  $page_title = __("Button editor","maxbuttons");
10
- $action = "<a class='page-title-action add-new-h2' href='" . $this->getButtonLink() . "'>" . __('Add New', 'maxbuttons') . "</a>";
11
  $admin->get_header(array("title" => $page_title, "title_action" => $action) );
12
  ?>
13
- <form id="new-button-form" action="<?php echo $this->getButtonLink($button_id, array('noheader' => true)); // echo admin_url('admin.php?page=maxbuttons-controller&action=button&noheader=true'); ?>" method="post">
14
  <input type="hidden" name="button_id" value="<?php echo $button_id ?>">
 
15
  <?php wp_nonce_field("button-edit","maxbuttons_button") ?>
16
  <?php wp_nonce_field("button-copy","copy_nonce"); ?>
17
  <?php wp_nonce_field("button-delete","delete_nonce"); ?>
18
  <?php wp_nonce_field('button-trash', 'trash_nonce'); ?>
19
 
20
  <div class="form-actions">
21
- <a class="button-primary button button-save" href='javascript:void(0);'><?php _e('Save', 'maxbuttons') ?></a>
22
- <?php if ($button_id > 0): ?>
23
- <a id="button-copy" class="maxmodal button" data-modal='copy-button' href="javascript:void(0)"><?php _e('Copy', 'maxbuttons') ?></a>
24
- <a id="button-trash" class="maxmodal button" data-modal = 'trash-button' href="javascript:void(0);"><?php _e('Move to Trash', 'maxbuttons') ?></a>
25
- <a class="button maxmodal" href="javascript:void(0);" data-modal='delete-button'><?php _e("Delete","maxbuttons"); ?> </a>
26
- <?php endif; // button_id > 0 ?>
27
-
28
- <?php do_action('mb/editor/form-actions', $button); ?>
 
29
  </div>
30
 
31
- <!-- delete modal -->
32
- <div class="maxmodal-data" id="delete-button">
33
- <span class='title'><?php _e("Removing button","maxbuttons"); ?></span>
34
- <span class="content"><p><?php _e("You are about to permanently remove this button. Are you sure?", "maxbuttons"); ?></p></span>
35
- <div class='controls'>
36
- <button type="button" class='button-primary' data-buttonaction='delete' data-buttonid='<?php echo $button_id ?>'>
37
- <?php _e('Yes','maxbuttons'); ?></button>
38
 
39
- <a class="modal_close button-primary"><?php _e("No", "maxbuttons"); ?></a>
40
-
41
- </div>
42
- </div>
43
-
44
- <!-- trash modal -->
45
- <div class="maxmodal-data" id="trash-button">
46
- <span class='title'><?php _e("Trash button","maxbuttons"); ?></span>
47
- <span class="content"><p><?php _e("The button will be moved to trash. It can be recovered from the trash bin later. Continue?", "maxbuttons"); ?></p></span>
48
- <div class='controls'>
49
- <button type="button" class='button-primary' data-buttonaction='trash' data-buttonid='<?php echo $button_id ?>'>
50
- <?php _e('Yes','maxbuttons'); ?></button>
51
-
52
- <a class="modal_close button-primary"><?php _e("No", "maxbuttons"); ?></a>
53
-
54
- </div>
55
- </div>
56
-
57
- <!-- copy modal -->
58
- <div class='maxmodal-data' id='copy-button' data-load='window.maxFoundry.maxadmin.checkCopyModal'>
59
- <span class='title'><?php _e("Copy this button","maxbuttons"); ?></span>
60
- <span class="content">
61
-
62
- <div class='copy-warning'>
63
- <h3><?php _e('You probably don\'t want to copy your button!', 'maxbuttons'); ?></h3>
64
- <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>
65
-
66
- <p class="example">
67
-
68
- <strong><?php _e("Add the same button with different link","maxbuttons"); ?></strong><br>
69
- &nbsp; [maxbutton id="<?php echo $button_id ?>" url="http://yoururl"]
70
- </p>
71
-
72
- <p class="example"><strong><?php _e("Use the same button but change the text","maxbuttons"); ?> </strong><br />
73
- &nbsp; [maxbutton id="<?php echo $button_id ?>" text="yourtext"]
74
- </p>
75
-
76
- <p class="example"><strong><?php _e("Both","maxbuttons"); ?> </strong><br />
77
- &nbsp; [maxbutton id="<?php echo $button_id ?>" text="yourtext" url="http://yoururl"]
78
- </p>
79
-
80
- </div>
81
-
82
-
83
- <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>
84
- </div>
85
- <p><?php _e("Do you want to copy this button to a new button?","maxbuttons"); ?></p>
86
- </span>
87
- <span class="controls">
88
- <button type="button" class='button-primary' data-buttonaction='copy' data-buttonid='<?php echo $button_id ?>'>
89
- <?php _e('Copy','maxbuttons'); ?></button>
90
-
91
- <a class='button modal_close'><?php _e("Cancel",'maxbuttons'); ?></a>
92
- </span>
93
- </div>
94
 
95
  <?php
96
  /** Display admin notices [deprecated]
@@ -114,13 +54,14 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
114
 
115
  <p><?php _e("Shortcode options can make using MaxButtons much easier! Check all possible options", 'maxbuttons'); ?> </p>
116
 
117
- <span class='shortcode-expand closed'><h4><?php _e("How to make your life easier","maxbuttons"); ?>
118
- <span class="dashicons-before dashicons-arrow-down"></span>
 
119
  </h4>
120
 
121
  </span>
122
 
123
- <div class="expanded">
124
  <p class="example">
125
  <strong><?php _e("Add a button by using the button name","maxbuttons"); ?></strong>
126
  &nbsp; [maxbutton name="<?php echo $button_name; ?>"]
@@ -149,34 +90,59 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
149
  </div>
150
  <?php endif; ?>
151
 
 
152
  <div class="output">
153
  <div class="header"><?php _e('Preview', 'maxbuttons') ?>
154
  <span class='preview-toggle dashicons dashicons-arrow-up'> </span>
155
  </div>
156
- <?php
157
- // $border_box = get_option('maxbuttons_borderbox');
158
- // $boxclass = '';
159
- // if ($border_box == 1) // box-sizing option.
160
- // $boxclass = 'preview-border-box';
161
- ?>
162
- <div class="inner">
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  <p><?php _e('The top is the normal button, the bottom one is the hover.', 'maxbuttons') ?></p>
165
- <div class="result ">
166
 
167
- <?php $button->display(array("mode" => 'editor', "load_css" => "element")); ?>
168
 
169
- <p>&nbsp;</p>
 
 
 
 
 
170
 
171
- <?php $button->display(array("mode" => 'editor', "preview_part" => ":hover", "load_css" => "element")); ?>
172
 
173
- <?php $button->display_field_map(); ?>
 
 
 
 
174
  </div>
175
 
176
  <input type='hidden' id='colorpicker_current' value=''>
177
 
178
  <div class="input mbcolor preview nodrag">
179
- <input type="text" name="button_preview" id="button_preview" class="color-field" value="#ffffff">
180
  </div>
181
 
182
  <div class="note"><?php _e('Change this color to see your button on a different background.', 'maxbuttons') ?></div>
@@ -188,27 +154,113 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
188
  </div> <!-- output -->
189
 
190
  <div class='editor'>
191
- <div id='normal_screen'>
192
- <!-- <span class='dashicons dashicons-admin-home'>&nbsp;</span> -->
193
-
194
- <?php #### STARTING FIELDS;
195
- $button->admin_fields();
196
- ?>
197
- </div>
198
- <!--
199
- <div id='mobile_screen1'>
200
- <span class='dashicons dashicons-admin-home'>&nbsp;</span>
201
- - Screen 2 (wohoe)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  </div>
203
- -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
204
 
205
  </div>
206
  <div class="form-actions">
207
- <a href="#" class="button-primary button-save"><?php _e('Save', 'maxbuttons') ?></a>
 
208
  </div>
209
 
210
  </form>
211
 
 
212
  <?php // output the link dialog thing
213
 
214
  if ( ! class_exists( '_WP_Editors', false ) )
7
 
8
  $admin = MB()->getClass('admin');
9
  $page_title = __("Button editor","maxbuttons");
10
+ $action = $this->getButton('add-new', array('add_class' => 'page-title-action add-new-h2')); //"<a class='page-title-action add-new-h2' href='" . $this->getButtonLink() . "'>" . __('Add New', 'maxbuttons') . "</a>";
11
  $admin->get_header(array("title" => $page_title, "title_action" => $action) );
12
  ?>
13
+ <form id="new-button-form" action="<?php echo $this->getButtonLink($button_id, array('noheader' => true)); ?>" method="post">
14
  <input type="hidden" name="button_id" value="<?php echo $button_id ?>">
15
+ <input type="hidden" name="button_is_new" value="<?php echo $this->view->button_is_new ?>" />
16
  <?php wp_nonce_field("button-edit","maxbuttons_button") ?>
17
  <?php wp_nonce_field("button-copy","copy_nonce"); ?>
18
  <?php wp_nonce_field("button-delete","delete_nonce"); ?>
19
  <?php wp_nonce_field('button-trash', 'trash_nonce'); ?>
20
 
21
  <div class="form-actions">
22
+ <?php
23
+ echo $this->getButton('save');
24
+ if ($button_id > 0)
25
+ {
26
+ echo $this->getButton('copy');
27
+ echo $this->getButton('trash');
28
+ echo $this->getButton('delete');
29
+ }
30
+ ?>
31
  </div>
32
 
 
 
 
 
 
 
 
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  <?php
36
  /** Display admin notices [deprecated]
54
 
55
  <p><?php _e("Shortcode options can make using MaxButtons much easier! Check all possible options", 'maxbuttons'); ?> </p>
56
 
57
+ <?php $opened = (isset($_GET['copied'])) ? 'open' : 'closed'; ?>
58
+ <span class='shortcode-expand <?php echo $opened ?>'><h4><?php _e("How to make your life easier","maxbuttons"); ?>
59
+ <span class="dashicons-before <?php echo (isset($_GET['copied'])) ? 'dashicons-arrow-up' : 'dashicons-arrow-down' ?>"></span>
60
  </h4>
61
 
62
  </span>
63
 
64
+ <div class="expanded" <?php echo ($opened == 'open') ? 'style="display:inline-block;"' : '' ?>>
65
  <p class="example">
66
  <strong><?php _e("Add a button by using the button name","maxbuttons"); ?></strong>
67
  &nbsp; [maxbutton name="<?php echo $button_name; ?>"]
90
  </div>
91
  <?php endif; ?>
92
 
93
+ <!-- preview -->
94
  <div class="output">
95
  <div class="header"><?php _e('Preview', 'maxbuttons') ?>
96
  <span class='preview-toggle dashicons dashicons-arrow-up'> </span>
97
  </div>
 
 
 
 
 
 
 
98
 
99
+
100
+ <div class="inner">
101
+ <?php
102
+
103
+ $width = $this->getCurrentScreen()->getValue('button_width');
104
+ $w_unit = $this->getCurrentScreen()->getValue('button_size_unit_width');
105
+
106
+ $height = $this->getCurrentScreen()->getValue('button_height');
107
+ $h_unit = $this->getCurrentScreen()->getValue('button_size_unit_height');
108
+
109
+ $w_unit = ($w_unit == 'pixel') ? __('px', 'maxbuttons') : '%';
110
+ $h_unit = ($h_unit == 'pixel') ? __('px', 'maxbuttons') : '%';
111
+
112
+ if ($height == 0)
113
+ {
114
+ $height = __('auto', 'maxbuttons');
115
+ $h_unit = '';
116
+ }
117
+ if ($width == 0)
118
+ {
119
+ $width = __('auto', 'maxbuttons');
120
+ $w_unit = '';
121
+ }
122
+ ?>
123
  <p><?php _e('The top is the normal button, the bottom one is the hover.', 'maxbuttons') ?></p>
 
124
 
 
125
 
126
+ <div class="result ">
127
+ <div class='border_wrapper'>
128
+ <div class='preview_border_height'><span style="width: <?php echo $height . $h_unit ?>"><?php echo $height . $h_unit ?></span> </div>
129
+ <?php $button->display(array("mode" => 'editor', "load_css" => "inline", "preview_part" => "normal")); ?>
130
+ <div class='preview_border_width'><span><?php echo $width . $w_unit ?></span></div>
131
+ </div>
132
 
133
+ <p>&nbsp;</p>
134
 
135
+ <div class='border_wrapper'>
136
+ <div class='preview_border_height'><span style="width: <?php echo $height . $h_unit ?>"><?php echo $height . $h_unit ?></span> </div>
137
+ <?php $button->display(array("mode" => 'editor', "preview_part" => ":hover", "load_css" => "inline")); ?>
138
+ <div class='preview_border_width'><span><?php echo $width . $w_unit ?></span></div>
139
+ </div>
140
  </div>
141
 
142
  <input type='hidden' id='colorpicker_current' value=''>
143
 
144
  <div class="input mbcolor preview nodrag">
145
+ <input type="text" name="button_preview" id="button_preview" class="mb-color-field" value="#ffffff">
146
  </div>
147
 
148
  <div class="note"><?php _e('Change this color to see your button on a different background.', 'maxbuttons') ?></div>
154
  </div> <!-- output -->
155
 
156
  <div class='editor'>
157
+ <input type='hidden' id='current_screen' name='current_screen' value='<?php echo $this->view->currentScreen ?>' />
158
+ <div class="screen-option-wrapper">
159
+ <?php
160
+ $screens = $this->view->screens;
161
+ ?>
162
+ <?php foreach($screens as $screen): // show screen menu icons
163
+ $screen_type = ($screen->is_responsive()) ? 'responsive' : 'default';
164
+ $screen_type = ($screen->is_new()) ? 'new' : $screen_type;
165
+
166
+ // @todo add sensible sizes from screen here. If possible
167
+ $min_width = $max_width = 0;
168
+ if ($screen->is_responsive())
169
+ {
170
+ $min_width = $this->getCurrentScreen()->getValue($screen->getFieldID('min_width'));
171
+ $max_width = $this->getCurrentScreen()->getValue($screen->getFieldID('max_width'));
172
+ }
173
+
174
+ // default.
175
+ //$title = ($screen->is_new()) ? : $title;
176
+
177
+ $current = ($screen->id == $this->view->currentScreen) ? 'option-active' : '';
178
+
179
+ switch ($screen_type)
180
+ {
181
+ case 'new':
182
+ $icon = 'dashicons-plus';
183
+ break;
184
+ case 'default':
185
+ $icon = 'dashicons-desktop';
186
+ break;
187
+ case 'responsive':
188
+ if ($min_width >= 1024)
189
+ $icon = 'dashicons-laptop';
190
+ else
191
+ $icon = 'dashicons-smartphone';
192
+ break;
193
+ }
194
+
195
+ $display = '';
196
+
197
+ if ($screen->is_default())
198
+ {
199
+ $title = __('Your main button for all screens. ', 'maxbuttons');
200
+ }
201
+ elseif ($screen->is_new())
202
+ {
203
+ $title = __('Add a new responsive screen', 'maxbuttons');
204
+ }
205
+ elseif ($min_width && $max_width)
206
+ {
207
+ $display = $min_width . __('px', 'maxbuttons') . ' - ' . $max_width . __('px', 'maxbuttons');
208
+ $title = sprintf(__('Shows at screen size from %s to %s', 'maxbuttons'), $min_width . __('px', 'maxbuttons'), $max_width . __('px', 'maxbuttons'));
209
+ }
210
+ elseif (! $min_width && $max_width)
211
+ {
212
+ $display = '< ' . $max_width . __('px', 'maxbuttons');
213
+ $title = sprintf(__('Shows at screen size smaller than %s', 'maxbuttons'), $max_width . __('px', 'maxbuttons'));
214
+
215
+ }
216
+ elseif (! $max_width && $min_width)
217
+ {
218
+ $display = '> ' . $min_width . __('px', 'maxbuttons');
219
+ $title = sprintf(__('Shows at screen size bigger than %s', 'maxbuttons'), $min_width . __('px', 'maxbuttons'));
220
+ }
221
+ elseif (! $min_width && ! $max_width) // if somebody does something like this :/
222
+ {
223
+ $display = '';
224
+ $title = sprintf(__('Set width and height to use this responsive screen', 'maxbuttons'));
225
+ }
226
+
227
+ ?>
228
+ <input type="hidden" name="screens[]" value="<?php echo $screen->id ?>" />
229
+ <div class='screen-option <?php echo $current ?>' data-screenid="<?php echo $screen->id ?>" data-screentype="<?php echo $screen_type ?>" title="<?php echo $title ?>">
230
+ <div class='wrapper'>
231
+ <span class='dashicons <?php echo $icon ?>'></span>
232
+ <span class='screen_name'><?php echo $screen->name ?></span>
233
+ <?php if ($screen->is_responsive()) {
234
+ echo "<span class='screen_size'>" . $display . "</span>";
235
+ } ?>
236
+ </div>
237
  </div>
238
+ <?php endforeach; ?>
239
+
240
+
241
+
242
+ <?php echo $this->getButton('save', array('add_class' => 'screen-option ')); ?>
243
+
244
+ </div> <!-- screen option wrapper -->
245
+ <?php foreach($screens as $screen): // load screen editors
246
+ $current = ($screen->id == $this->view->currentScreen) ? 'current-screen' : '';
247
+ ?>
248
+ <div id='screen_<?php echo $screen->id ?>' class='mbscreen-editor <?php echo $current ?>' data-screenid="<?php echo $screen->id ?>">
249
+ <?php $this->showScreenEditor($screen);
250
+ ?>
251
+ </div>
252
+ <?php endforeach; ?>
253
+
254
 
255
  </div>
256
  <div class="form-actions">
257
+
258
+ <?php echo $this->getButton('save'); ?>
259
  </div>
260
 
261
  </form>
262
 
263
+
264
  <?php // output the link dialog thing
265
 
266
  if ( ! class_exists( '_WP_Editors', false ) )
includes/maxbuttons-controller.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
- namespace MaxButtons;
3
- exit('XXIT');
4
-
5
- defined('ABSPATH') or die('No direct access permitted');
6
-
7
- if (isset($_GET['action']) && $_GET['action'] != '') {
8
- // extra safety.
9
- $action = sanitize_text_field($_GET['action']);
10
-
11
- switch ($action) {
12
- case 'button':
13
- case 'edit':
14
- //include_once 'maxbuttons-button.php';
15
- $_GET['page'] = 'maxbuttons-button';
16
- MB()->loadAdminPage();
17
- break;
18
- default:
19
- //include_once 'maxbuttons-list.php';
20
- $_GET['page'] = 'maxbuttons-list';
21
- MB()->loadAdminPage();
22
- break;
23
-
24
- }
25
-
26
- } else {
27
- $_GET['page'] = 'maxbuttons-list';
28
- MB()->loadAdminPage();
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/maxbuttons-list.php CHANGED
@@ -2,6 +2,7 @@
2
  namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
 
5
  ?>
6
 
7
  <!-- @todo Remove -->
@@ -23,12 +24,12 @@ defined('ABSPATH') or die('No direct access permitted');
23
 
24
  <?php
25
  $page_title = __("Overview","maxbuttons");
26
- $action = "<a class='page-title-action add-new-h2' href='" . $this->getButtonLink() . "'>" . __('Add New', 'maxbuttons') . "</a>";
27
  $this->mbadmin->get_header(array("title" => $page_title, "title_action" => $action));
28
  ?>
29
 
30
  <div class="form-actions">
31
- <a class="button-primary" href="<?php echo $this->getButtonLink(); ?>"><?php _e('Add New', 'maxbuttons') ?></a>
32
  </div>
33
 
34
  <?php foreach ($this->messages as $message) { ?>
@@ -145,6 +146,8 @@ $this->mbadmin->get_header(array("title" => $page_title, "title_action" => $acti
145
  $this->button->set($id,'','trash');
146
  else
147
  $this->button->set($id);
 
 
148
  ?>
149
  <div class='button-row'>
150
  <span class="col col_check"><input type="checkbox" name="button-id[]" id="button-id-<?php echo $id ?>" value="<?php echo $id ?>" /></span>
@@ -154,12 +157,16 @@ $this->mbadmin->get_header(array("title" => $page_title, "title_action" => $acti
154
  ?>
155
  </div>
156
  <div class="actions">
 
157
  <?php if($view->listView == 'all') : ?>
158
  <a href="<?php echo $this->getButtonLink($id); ?>"><?php _e('Edit', 'maxbuttons') ?></a>
159
  <span class="separator">|</span>
160
- <a href='javascript:void(0);' data-buttonaction='copy' data-buttonid="<?php echo $id ?>"><?php _e('Copy', 'maxbuttons') ?></a>
 
 
161
  <span class="separator">|</span>
162
- <a href="javascript:void(0)" data-buttonaction='trash' data-buttonid="<?php echo $id ?>"><?php _e('Move to Trash', 'maxbuttons') ?></a>
 
163
  <?php endif;
164
  if ($view->listView == 'trash'):
165
  ?>
2
  namespace MaxButtons;
3
  defined('ABSPATH') or die('No direct access permitted');
4
 
5
+
6
  ?>
7
 
8
  <!-- @todo Remove -->
24
 
25
  <?php
26
  $page_title = __("Overview","maxbuttons");
27
+ $action = $this->getButton('add-new', array('class' => 'page-title-action add-new-h2')); // "<a class='page-title-action add-new-h2' href='" . $this->getButtonLink() . "'>" . __('Add New', 'maxbuttons') . "</a>";
28
  $this->mbadmin->get_header(array("title" => $page_title, "title_action" => $action));
29
  ?>
30
 
31
  <div class="form-actions">
32
+ <?php echo $this->getButton('add-new', array('class' => 'button-primary')); ?>
33
  </div>
34
 
35
  <?php foreach ($this->messages as $message) { ?>
146
  $this->button->set($id,'','trash');
147
  else
148
  $this->button->set($id);
149
+
150
+ $this->view->button_id = $id;
151
  ?>
152
  <div class='button-row'>
153
  <span class="col col_check"><input type="checkbox" name="button-id[]" id="button-id-<?php echo $id ?>" value="<?php echo $id ?>" /></span>
157
  ?>
158
  </div>
159
  <div class="actions">
160
+
161
  <?php if($view->listView == 'all') : ?>
162
  <a href="<?php echo $this->getButtonLink($id); ?>"><?php _e('Edit', 'maxbuttons') ?></a>
163
  <span class="separator">|</span>
164
+
165
+ <?php echo $this->getButton('copy', array('class' => 'maxmodal')); ?>
166
+
167
  <span class="separator">|</span>
168
+ <?php echo $this->getButton('trash', array('class' => 'maxmodal')); ?>
169
+
170
  <?php endif;
171
  if ($view->listView == 'trash'):
172
  ?>
includes/maxbuttons-pro.php CHANGED
@@ -36,7 +36,7 @@ $admin->get_header(array("title" => $page_title, "title_action" => $buy_now_top,
36
  <div class="rating bordered">
37
  <img src="<?php echo $img_url ?>/stars.png" alt="stars" />
38
  <p>
39
- 800+ 5 Star Ratings
40
  </p>
41
  </div>
42
  <p>
36
  <div class="rating bordered">
37
  <img src="<?php echo $img_url ?>/stars.png" alt="stars" />
38
  <p>
39
+ 900+ 5 Star Ratings
40
  </p>
41
  </div>
42
  <p>
includes/maxbuttons-settings.php CHANGED
@@ -6,15 +6,13 @@ defined('ABSPATH') or die('No direct access permitted');
6
 
7
  $button = MB()->getClass('button'); // To load maxfield templates
8
 
9
-
10
-
11
- ?>
12
- <?php
13
  $admin = MB()->getClass('admin');
14
  $page_title = __("Settings","maxbuttons");
15
  $admin->get_header(array("tabs_active" => true, "title" => $page_title) );
16
  ?>
17
 
 
 
18
  <div class="mb_tab"> <!-- first tab --->
19
  <div class="title">
20
  <span class="dashicons dashicons-list-view"></span>
@@ -58,7 +56,7 @@ $admin->get_header(array("tabs_active" => true, "title" => $page_title) );
58
  $nomce->id = $nomce->name;
59
  $nomce->value = '1';
60
  $nomce->checked = checked($option_noshow, 1, false);
61
- $nomce->output ('start','end');
62
  ?>
63
 
64
  </div>
@@ -78,7 +76,7 @@ $admin->get_header(array("tabs_active" => true, "title" => $page_title) );
78
  $minify->id = $minify->name;
79
  $minify->value = '1';
80
  $minify->checked = checked($option_minify, 1, false);
81
- $minify->output ('start','end');
82
  ?>
83
  </div>
84
 
@@ -90,7 +88,7 @@ $admin->get_header(array("tabs_active" => true, "title" => $page_title) );
90
  $desc->id = $desc->name;
91
  $desc->value = '1';
92
  $desc->checked = checked($option_description_hide, 1, false);
93
- $desc->output ('start','end');
94
  ?>
95
  </div>
96
 
@@ -104,7 +102,7 @@ $admin->get_header(array("tabs_active" => true, "title" => $page_title) );
104
  $bbox->id = $bbox->name;
105
  $bbox->value = '1';
106
  $bbox->checked = checked($option_borderbox, 1, false);
107
- $bbox->output('start','end');
108
  ?>
109
  </div>
110
 
@@ -129,7 +127,7 @@ $admin->get_header(array("tabs_active" => true, "title" => $page_title) );
129
  $prot->note = __('Separate multiple protocols with comma', 'maxbuttons');
130
  $prot->help = __('You can add link formats not regarded as "safe" by WordPress. Use this if links are removed or lose their protocol ( xx:// ). For instance: "file,sms,skype" .', 'maxbuttons');
131
 
132
- $prot->output('start', 'end');
133
  ?>
134
  </div>
135
 
@@ -173,6 +171,21 @@ $admin->get_header(array("tabs_active" => true, "title" => $page_title) );
173
  </div>
174
  </form>
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  <div class="option-container">
177
  <div class="title"><?php _e('UTF8 Table Fix', 'maxbuttons') ?></div>
178
  <div class="inside">
6
 
7
  $button = MB()->getClass('button'); // To load maxfield templates
8
 
 
 
 
 
9
  $admin = MB()->getClass('admin');
10
  $page_title = __("Settings","maxbuttons");
11
  $admin->get_header(array("tabs_active" => true, "title" => $page_title) );
12
  ?>
13
 
14
+ <?php maxInstall::migrateResponsive(); ?>
15
+
16
  <div class="mb_tab"> <!-- first tab --->
17
  <div class="title">
18
  <span class="dashicons dashicons-list-view"></span>
56
  $nomce->id = $nomce->name;
57
  $nomce->value = '1';
58
  $nomce->checked = checked($option_noshow, 1, false);
59
+ echo $nomce->output ('start','end');
60
  ?>
61
 
62
  </div>
76
  $minify->id = $minify->name;
77
  $minify->value = '1';
78
  $minify->checked = checked($option_minify, 1, false);
79
+ echo $minify->output ('start','end');
80
  ?>
81
  </div>
82
 
88
  $desc->id = $desc->name;
89
  $desc->value = '1';
90
  $desc->checked = checked($option_description_hide, 1, false);
91
+ echo $desc->output ('start','end');
92
  ?>
93
  </div>
94
 
102
  $bbox->id = $bbox->name;
103
  $bbox->value = '1';
104
  $bbox->checked = checked($option_borderbox, 1, false);
105
+ echo $bbox->output('start','end');
106
  ?>
107
  </div>
108
 
127
  $prot->note = __('Separate multiple protocols with comma', 'maxbuttons');
128
  $prot->help = __('You can add link formats not regarded as "safe" by WordPress. Use this if links are removed or lose their protocol ( xx:// ). For instance: "file,sms,skype" .', 'maxbuttons');
129
 
130
+ echo $prot->output('start', 'end');
131
  ?>
132
  </div>
133
 
171
  </div>
172
  </form>
173
 
174
+ <form method="POST">
175
+ <div class="option-container">
176
+
177
+ <input type="hidden" name="remigrateresponsive" value="true" />
178
+ <div class="title"><?php _e("Retry Responsive Migration","maxbuttons"); ?></div>
179
+ <div class="inside"><p><?php _e("In case you still have legacy responsive data ( before version 8 ) and this was not migrated for some reason. <strong>Warning</strong> Create a database backup. Use at your own risk. ", "maxbuttons"); ?></p>
180
+ <?php submit_button(__("Remigrate Responsive", "maxbuttons") ); ?>
181
+ </div>
182
+
183
+ </div>
184
+ </form>
185
+
186
+
187
+
188
+
189
  <div class="option-container">
190
  <div class="title"><?php _e('UTF8 Table Fix', 'maxbuttons') ?></div>
191
  <div class="inside">
includes/maxbuttons-welcome.php CHANGED
@@ -13,16 +13,17 @@
13
  <li><a href="https://wordpress.org/support/plugin/maxbuttons" target="_blank"><?php _e('Support Forums','maxbuttons'); ?></a></li>
14
  </ul>
15
 
16
- <br>
17
- <h3>Organize your Designs</h3>
18
 
19
- <p>MaxButtons uses shortcodes. These are small snippets you can copy into your posts and pages. You will see a button which will make this easier.</p>
 
20
 
21
- <p>Do Not Repeat! If you have a button design you can use this many times. Even with different text and link</p>
22
 
 
23
 
24
- <p>[maxbutton id=1 url="http://example.com" text="Example Text"]</p>
25
 
 
 
26
 
27
 
28
  </div>
13
  <li><a href="https://wordpress.org/support/plugin/maxbuttons" target="_blank"><?php _e('Support Forums','maxbuttons'); ?></a></li>
14
  </ul>
15
 
 
 
16
 
17
+ <section class='organize'>
18
+ <h3><?php _e('Organize your Designs','maxbuttons'); ?></h3>
19
 
20
+ <p><?php _e('MaxButtons uses shortcodes. These are small snippets you can copy into your posts and pages. You will see a button in your post editor which will make this easier.', 'maxbuttons') ?></p>
21
 
22
+ <p><strong><?php _e('Do Not Repeat!','maxbuttons'); ?></strong> <?php _e('You can use your button design many times. Even with a different text and link!', 'maxbuttons'); ?></p>
23
 
 
24
 
25
+ <p>[maxbutton id=1 url="http://example.com" text="Example Text"]</p>
26
+ </section>
27
 
28
 
29
  </div>
js/init.js CHANGED
@@ -9,6 +9,17 @@ jQuery(document).ready(function(jq) {
9
  if (typeof window.maxFoundry === 'undefined')
10
  window.maxFoundry = {};
11
 
 
 
 
 
 
 
 
 
 
 
 
12
  window.maxFoundry.maxadmin = new maxAdmin();
13
  window.maxFoundry.maxadmin.init();
14
 
@@ -21,6 +32,8 @@ jQuery(document).ready(function(jq) {
21
  window.maxFoundry.maxTabs = new maxTabs();
22
  window.maxFoundry.maxTabs.init();
23
 
 
 
24
  }
25
 
26
  runMaxInit();
9
  if (typeof window.maxFoundry === 'undefined')
10
  window.maxFoundry = {};
11
 
12
+ // editor loading when needed.
13
+ if (typeof maxLivePreview === 'function')
14
+ {
15
+ window.maxFoundry.livePreview = maxLivePreview;
16
+ }
17
+ else
18
+ {
19
+ //console.error('Could not Load Live Preview');
20
+ }
21
+
22
+
23
  window.maxFoundry.maxadmin = new maxAdmin();
24
  window.maxFoundry.maxadmin.init();
25
 
32
  window.maxFoundry.maxTabs = new maxTabs();
33
  window.maxFoundry.maxTabs.init();
34
 
35
+ $(window).trigger('maxbuttons-js-init-done');
36
+
37
  }
38
 
39
  runMaxInit();
js/live-preview.js ADDED
@@ -0,0 +1,621 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var $ = jQuery;
2
+
3
+ // Here be gathering everything related to live updating MB.
4
+ function maxLivePreview()
5
+ {
6
+
7
+ }
8
+
9
+ maxLivePreview.prototype = {
10
+ fields: {},
11
+ screens: {},
12
+ currentScreen: '',
13
+ currentFields: {},
14
+ reloadInProgress: false,
15
+ reloaded: {} // for partly reloads when doing a screen update.
16
+ }
17
+
18
+ maxLivePreview.prototype.init = function ()
19
+ {
20
+ this.loadScreens();
21
+ this.bindFields();
22
+
23
+ }
24
+
25
+ maxLivePreview.prototype.bindFields = function()
26
+ {
27
+ // bind to all inputs, except for color-field or items with different handler.
28
+ $('#maxbuttons input,#maxbuttons textarea').not('.mb-color-field').on('keyup change', $.proxy(this.update_preview_event,this));
29
+ $('#maxbuttons select').on('change', $.proxy(this.update_preview_event, this));
30
+
31
+ $('#maxbuttons .mb-color-field').alphaColorPicker(
32
+ {
33
+ width: 300,
34
+ palettes: this.colorPalettes,
35
+ changeFunc: $.proxy( _.throttle(function(event, ui) {
36
+ event.preventDefault();
37
+ var color = ui.color.toString();
38
+ this.update_color_event(event,ui, color);
39
+
40
+ }, 200), this),
41
+
42
+ });
43
+
44
+ // Presets
45
+ $('[data-action="set-preset"]').on('click', $.proxy(this.setPreset, this));
46
+
47
+ $(document).on('changed_screen', $.proxy(this.changed_screen, this));
48
+ }
49
+
50
+ // on screen change, reload preview.
51
+ maxLivePreview.prototype.changed_screen = function(e, screen)
52
+ {
53
+ // this needs a check to not run the default setup twice.
54
+ this.setCurrentScreen('default');
55
+ this.reloadFields(); // 'reload/reset' the preview to the main screen.
56
+ if (screen != 'default') // no need to reload if not default
57
+ {
58
+ this.setCurrentScreen(screen);
59
+ this.reloadFields(); // implement overrides of the screen.
60
+ }
61
+
62
+ }
63
+
64
+ maxLivePreview.prototype.reloadFields = function()
65
+ {
66
+ $(document).trigger('livepreview-reload-start');
67
+ this.reloadInProgress = true;
68
+
69
+ for(var mapfield in this.currentFields)
70
+ {
71
+ var data = this.fields[this.currentScreen][mapfield];
72
+ this.update_preview( $('#' + mapfield), data);
73
+ }
74
+ this.reloadInProgress = false;
75
+ this.reloaded = {};
76
+ $(document).trigger('livepreview-reload-end');
77
+ }
78
+
79
+ maxLivePreview.prototype.loadScreens = function ()
80
+ {
81
+ var self = this;
82
+
83
+ $('.mbscreen-editor .fieldmap').each(function()
84
+ {
85
+ var $screen = $(this).parents('.mbscreen-editor');
86
+ var screen_id = $screen.attr('id').replace('screen_', '');
87
+ var map = $(this).text();
88
+ if (typeof map != 'undefined')
89
+ self.fields[screen_id] = $.parseJSON(map);
90
+
91
+ if ($screen.hasClass('current-screen'))
92
+ {
93
+ self.setCurrentScreen(screen_id);
94
+ }
95
+ });
96
+ }
97
+
98
+ // function to help static function to get the proper ID's for the current field.
99
+ // byName is optional, signaling to search the field by form name instead of #id ( checkbox, radio )
100
+ // byName can result in multiple fields.
101
+ maxLivePreview.prototype.getFieldByID = function(name, byName)
102
+ {
103
+ if (typeof byName == 'undefined')
104
+ {
105
+ byName = false;
106
+ }
107
+
108
+ if (this.currentScreen == 'default')
109
+ var id = name;
110
+ else
111
+ var id = this.currentScreen + '_' + name;
112
+
113
+
114
+ if (byName)
115
+ {
116
+ var $field = $('input[name="' + id + '"]');
117
+ }
118
+ else
119
+ {
120
+ var $field = $('#' + id);
121
+ }
122
+
123
+ return $field;
124
+ }
125
+
126
+ maxLivePreview.prototype.setCurrentScreen = function(id)
127
+ {
128
+ this.currentScreen = id;
129
+ this.currentFields = this.fields[id];
130
+
131
+ $(document).trigger('livepreview-screen-set', [id, this.currentFields] );
132
+ }
133
+
134
+ maxLivePreview.prototype.update_preview_event = function(e)
135
+ {
136
+ e.preventDefault();
137
+ var target = $(e.target);
138
+
139
+ // migration to data field
140
+ var field = $(target).data('field');
141
+ var id = $(target).attr('id'); // this should change to be ready for the option to have two the same fields on multi locations.
142
+
143
+ var data = this.currentFields[id];
144
+
145
+ $(document).trigger('livePreviewUpdate', true);
146
+
147
+ if (data !== null)
148
+ {
149
+ this.update_preview( $('#' + id), data);
150
+ }
151
+
152
+ }
153
+
154
+ /** Updates the preview buttons with new CSS lines. Extracts several fields from the fieldmap.
155
+ * state = csspseudo
156
+ * field_id is ID of form field, data is corresponding field data in fieldmap.
157
+ */
158
+ maxLivePreview.prototype.update_preview = function($field, data)
159
+ {
160
+
161
+ var state = null;
162
+ if (typeof data == 'undefined')
163
+ return; // field doesn't have updates
164
+
165
+ // check all attributes. Fields can use any of those for different processes.
166
+ if (typeof data.css != 'undefined')
167
+ {
168
+ value = $field.val();
169
+
170
+ // a target that is checkbox but not checked should unset (empty) value.
171
+ if ($field.is(':checkbox') && ! $field.is(':checked') )
172
+ value = '';
173
+
174
+ if ($field.is(':radio') && ! $field.is(':checked') )
175
+ return; // not our radio update.
176
+
177
+ if (typeof data.pseudo !== 'undefined')
178
+ {
179
+ state = data.pseudo;
180
+ }
181
+ this.putCSS(data, value, state);
182
+ }
183
+ if (typeof data.attr !== 'undefined')
184
+ {
185
+ $('.output .result').find('a').attr(data.attr, $field.val());
186
+ }
187
+
188
+ if (typeof data.func !== 'undefined')
189
+ {
190
+ var funcName = data.func;
191
+ var self = this;
192
+ if (funcName.indexOf('.') < 0)
193
+ {
194
+ funcName = 'self.' + funcName + '(target)';
195
+ }
196
+ else {
197
+ funcName = funcName + '(target)';
198
+ }
199
+
200
+ try
201
+ {
202
+ var callFunc = new Function ('target', 'self', funcName);
203
+ callFunc($field, this);
204
+ }
205
+ catch(err)
206
+ {
207
+ console.error(err);
208
+ }
209
+
210
+ }
211
+ };
212
+
213
+ maxLivePreview.prototype.putCSS = function(data,value,state)
214
+ {
215
+ state = state || 'both';
216
+
217
+ var element = '.maxbutton';
218
+ if (state == 'hover')
219
+ element = 'a.hover ';
220
+ else if(state == 'normal')
221
+ element = 'a.normal ';
222
+
223
+ if (typeof data.unitfield != 'undefined')
224
+ {
225
+
226
+ var unitfielddata = this.getFieldByID(data.unitfield, true).filter(":checked"); // get by name, radio button
227
+ var unitvalue = unitfielddata.val();
228
+
229
+ if (value == 0)
230
+ value = 'auto';
231
+ else if (unitvalue == 'percent' || unitvalue == '%')
232
+ value += '%';
233
+ else if(unitvalue == 'pixel' || unitvalue == 'px')
234
+ value += 'px';
235
+
236
+ }
237
+ else if (typeof data.css_unit != 'undefined' && value.indexOf(data.css_unit) == -1)
238
+ {
239
+ if (value.indexOf(data.css_unit) == -1)
240
+ value += data.css_unit;
241
+ }
242
+ if (typeof data.csspart != 'undefined')
243
+ {
244
+ var parts = data.csspart.split(",");
245
+ for(i=0; i < parts.length; i++)
246
+ {
247
+ var cpart = parts[i];
248
+ var fullpart = element + " ." + cpart;
249
+ $('.output .result').find(fullpart).css(data.css, value);
250
+ }
251
+ }
252
+ else
253
+ $('.output .result').find(element).css(data.css, value);
254
+
255
+ }
256
+
257
+ maxLivePreview.prototype.update_color_event = function(event, ui, color)
258
+ {
259
+ event.preventDefault();
260
+ var target = $(event.target);
261
+ this.update_color(target, ui, color);
262
+ $(document).trigger('livePreviewUpdate', true);
263
+
264
+ }
265
+
266
+ maxLivePreview.prototype.update_color = function(field, ui, color)
267
+ {
268
+ var self = this;
269
+ var id = field.attr('id');
270
+
271
+
272
+ if (color.indexOf('#') === -1 && color.indexOf('rgba') < 0)
273
+ {
274
+ color = '#' + color; // add # to color
275
+ }
276
+
277
+ $('#' + id).val(color); // otherwise field value is running 1 click behind.
278
+
279
+ // toggle transparency when needed.
280
+ if ( $(field).val() == '')
281
+ {
282
+ $(field).parents('.mbcolor').find('.wp-color-result').children('.the_color').css('background-image', 'url(' + maxadmin_settings.icon_transparent + ')');
283
+ if (typeof event.type !== 'undefined' && event.type == 'change')
284
+ this.update_color(e, null, 'rgba(0,0,0,0)');
285
+ }
286
+ else {
287
+ $(field).parents('.mbcolor').find('.wp-color-result').children('.the_color').css('background-image', 'none');
288
+ }
289
+
290
+ if(id.indexOf('box_shadow') !== -1)
291
+ {
292
+ this.updateBoxShadow(field);
293
+ }
294
+ else if(id.indexOf('text_shadow') !== -1)
295
+ {
296
+ this.updateTextShadow(field);
297
+ }
298
+ else if (id.indexOf('gradient') !== -1)
299
+ {
300
+ if (id.indexOf('hover') == -1)
301
+ this.updateGradient();
302
+ else
303
+ this.updateGradient(true);
304
+ }
305
+ else if (id == 'button_preview')
306
+ {
307
+ if (color.indexOf('rgba') >= 0)
308
+ {
309
+ }
310
+ $(".output .result").css('backgroundColor', color);
311
+ }
312
+ else // simple update
313
+ {
314
+
315
+ var data = this.currentFields[id];
316
+ var state = 'normal';
317
+ if (typeof data.pseudo !== 'undefined')
318
+ {
319
+ state = data.pseudo;
320
+ }
321
+
322
+ this.putCSS(data, color, state);
323
+ }
324
+ };
325
+
326
+ maxLivePreview.prototype.updateBoxShadow = function (target)
327
+ {
328
+ // target = target || null;
329
+ if (this.reloadInProgress && typeof this.reloaded.boxshadow !== 'undefined')
330
+ return;
331
+
332
+ var id = $(target).attr('id');
333
+
334
+ var left = this.getFieldByID('box_shadow_offset_left').val();
335
+ var top = this.getFieldByID("box_shadow_offset_top").val();
336
+ var width = this.getFieldByID("box_shadow_width").val();
337
+ var spread = this.getFieldByID('box_shadow_spread').val();
338
+
339
+ var color = this.getFieldByID("box_shadow_color").val();
340
+ var hovcolor = this.getFieldByID("box_shadow_color_hover").val();
341
+
342
+ if (color == '') color = 'rgba(0,0,0,0)';
343
+ if (hovcolor == '') hovcolor = 'rgba(0,0,0,0)';
344
+
345
+ var id = $(target).attr('id');
346
+ var data = this.currentFields[id];
347
+ data.css = 'boxShadow';
348
+
349
+ value = left + 'px ' + top + 'px ' + width + 'px ' + spread + 'px ' + color;
350
+ value_hover = left + 'px ' + top + 'px ' + width + 'px ' + spread + 'px ' + hovcolor;
351
+
352
+ this.putCSS(data, value, 'normal');
353
+ this.putCSS(data, value_hover, 'hover');
354
+
355
+ this.reloaded.boxshadow = true;
356
+ //$('.output .result').find('a.normal').css("boxShadow",left + 'px ' + top + 'px ' + width + 'px ' + spread + 'px ' + color);
357
+ //$('.output .result').find('a.hover').css("boxShadow",left + 'px ' + top + 'px ' + width + 'px ' + spread + 'px ' + hovcolor);
358
+ }
359
+
360
+ maxLivePreview.prototype.updateTextShadow = function(target)
361
+ {
362
+ // hover = hover || false;
363
+ if (this.reloadInProgress && typeof this.reloaded.textshadow !== 'undefined')
364
+ return;
365
+
366
+ var left = this.getFieldByID("text_shadow_offset_left").val();
367
+ var top = this.getFieldByID("text_shadow_offset_top").val();
368
+ var width = this.getFieldByID("text_shadow_width").val();
369
+
370
+ var color = this.getFieldByID("text_shadow_color").val();
371
+ var hovcolor = this.getFieldByID("text_shadow_color_hover").val();
372
+
373
+ var id = $(target).attr('id');
374
+ var data = this.currentFields[id];
375
+ data.css = 'textShadow';
376
+
377
+ if (color == '') color = 'rgba(0,0,0,0)';
378
+ if (hovcolor == '') hovcolor = 'rgba(0,0,0,0)';
379
+
380
+ var value = left + 'px ' + top + 'px ' + width + 'px ' + color;
381
+ this.putCSS(data, value, 'normal');
382
+
383
+ value = left + 'px ' + top + 'px ' + width + 'px ' + hovcolor;
384
+ this.putCSS(data, value, 'hover');
385
+
386
+ this.reloaded.textshadow = true;
387
+ }
388
+
389
+ maxLivePreview.prototype.updateAnchorText = function (target)
390
+ {
391
+ var preview_text = $('.output .result').find('a .mb-text');
392
+
393
+ // This can happen when the text is removed, button is saved, so the preview doesn't load the text element.
394
+ if (preview_text.length === 0)
395
+ {
396
+ $('.output .result').find('a').append('<span class="mb-text"></span>');
397
+ $('.output .result').find('a .mb-text').css({'display':'block','line-height':'1em','box-sizing':'border-box'});
398
+
399
+ this.reloadFields();
400
+ }
401
+ $('.output .result').find('a .mb-text').text(target.val());
402
+ }
403
+
404
+ maxLivePreview.prototype.updateGradientOpacity = function(target)
405
+ {
406
+ this.updateGradient(true);
407
+ this.updateGradient(false);
408
+ }
409
+
410
+ maxLivePreview.prototype.updateDimension = function ($field)
411
+ {
412
+ if (this.reloadInProgress && typeof this.reloaded.dimension !== 'undefined')
413
+ return;
414
+
415
+ var id = $field.data('field');
416
+ if (typeof id == 'undefined')
417
+ var id = $field.attr('id');
418
+ if (typeof id == 'undefined') // still don't want, then no.
419
+ return;
420
+ var data = {};
421
+
422
+ // get the units.
423
+ if (id.indexOf('width') >= 0)
424
+ {
425
+ var $field = this.getFieldByID('button_width');
426
+ var $unitfield = this.getFieldByID('button_size_unit_width', true);
427
+ data.css = 'width';
428
+ var updatePreview = '.preview_border_width span';
429
+ var unitUpdate = '.input.' + $field.attr('name') + ' .unit';
430
+ }
431
+ else if(id.indexOf('height') >= 0)
432
+ {
433
+ var $field = this.getFieldByID('button_height');
434
+ var $unitfield = this.getFieldByID('button_size_unit_height', true);
435
+ data.css = 'height';
436
+ var updatePreview = '.preview_border_height span';
437
+ var unitUpdate = '.input.' + $field.attr('name') + ' .unit';
438
+ }
439
+
440
+ var dimension = $field.val();
441
+ var unit = $unitfield.filter(':checked').val();
442
+
443
+ if (dimension == 0)
444
+ {
445
+ unit = '';
446
+ dimension = 'auto';
447
+ this.putCSS(data, 'auto');
448
+ }
449
+
450
+ if (unit == 'percent')
451
+ unit = '%';
452
+ if (unit == 'pixel')
453
+ unit = 'px';
454
+
455
+ data.css_unit = unit;
456
+
457
+ $(updatePreview).text(dimension + unit);
458
+ $(updatePreview).css('width', dimension + unit);
459
+ this.putCSS(data, dimension);
460
+ $(unitUpdate).text(unit);
461
+
462
+ this.reloaded.dimension = true;
463
+ }
464
+
465
+ maxLivePreview.prototype.updateRadius = function(target)
466
+ {
467
+ if (this.reloadInProgress && typeof this.reloaded.radius !== 'undefined')
468
+ return;
469
+
470
+ var value = target.val();
471
+ var fields = ['radius_bottom_left', 'radius_bottom_right', 'radius_top_left', 'radius_top_right'];
472
+
473
+ var toggle = this.getFieldByID('radius_toggle');
474
+
475
+ if ( $(toggle).data('lock') == 'lock')
476
+ {
477
+ for(i=0; i < fields.length; i++)
478
+ {
479
+ var $field = this.getFieldByID(fields[i]); // find the real field.
480
+ $field.val(value); // set value via locking
481
+ var id = $field.attr('id'); // get the real id, from element.
482
+ var data = this.currentFields[id];
483
+ this.putCSS(data,value + 'px'); // update
484
+
485
+ }
486
+ }
487
+ else { // update as regular single field
488
+ var value = $(target).val();
489
+ var id = $(target).attr('id');
490
+ var data = this.currentFields[id];
491
+ this.putCSS(data, value);
492
+ }
493
+
494
+ this.reloaded.radius = true;
495
+
496
+ }
497
+
498
+ maxLivePreview.prototype.getGradient = function(hover)
499
+ {
500
+ hover = hover || false;
501
+
502
+
503
+ var hovtarget = '';
504
+ if (hover)
505
+ hovtarget = "_hover";
506
+
507
+ var stop = parseInt(this.getFieldByID('gradient_stop').val());
508
+
509
+ if (isNaN(stop) )
510
+ stop = 45;
511
+
512
+ var gradients_on = this.getFieldByID('use_gradient').prop('checked');
513
+
514
+ var color = this.getFieldByID('gradient_start_color' + hovtarget).val();
515
+ var endcolor = this.getFieldByID('gradient_end_color' + hovtarget).val();
516
+
517
+ if (color == '') color = 'rgba(0,0,0,0)';
518
+ if (endcolor == '') endcolor = 'rgba(0,0,0,0)';
519
+
520
+ var start = this.hexToRgb(color);
521
+ var end = this.hexToRgb(endcolor);
522
+ var startop = parseInt(this.getFieldByID('gradient_start_opacity' + hovtarget).val());
523
+ var endop = parseInt(this.getFieldByID('gradient_end_opacity' + hovtarget).val());
524
+
525
+ if (! gradients_on)
526
+ {
527
+ end = start;
528
+ endop = startop;
529
+ }
530
+
531
+ if(isNaN(startop)) startop = 100;
532
+ if(isNaN(endop)) endop = 100;
533
+
534
+
535
+
536
+ if (start.indexOf('rgba') < 0)
537
+ var startrgba = "rgba(" + start + "," + (startop/100) + ") ";
538
+ else
539
+ var startrgba = start;
540
+
541
+ if (end.indexOf('rgba') < 0)
542
+ var endrgba = "rgba(" + end + "," + (endop/100) + ") ";
543
+ else
544
+ var endrgba = end;
545
+
546
+ var gradient = 'linear-gradient(' + startrgba + stop + "%," + endrgba + ')';
547
+
548
+ return gradient;
549
+
550
+ }
551
+
552
+ maxLivePreview.prototype.updateGradient = function(hover)
553
+ {
554
+ if (this.reloadInProgress && typeof this.reloaded.gradient !== 'undefined')
555
+ return;
556
+
557
+ var gradient = this.getGradient(hover);
558
+
559
+ if (!hover)
560
+ var button = $('.output .result').find('a.normal');
561
+ else
562
+ var button = $('.output .result').find('a.hover');
563
+
564
+ button.css("background", gradient);
565
+
566
+ $(document).trigger('livepreview/gradient/updated', [gradient, hover]);
567
+ this.reloaded.gradient = true;
568
+ }
569
+
570
+ maxLivePreview.prototype.updateContainerUnit = function($field)
571
+ {
572
+ var $field = this.getFieldByID('container_width_unit', true);
573
+ var val = $field.filter(':checked').val();
574
+
575
+ if (val == 'pixel')
576
+ val = 'px';
577
+ else
578
+ val = '%';
579
+
580
+ var cwidth = this.getFieldByID('container_width').attr('name');
581
+
582
+ $('.option.' + cwidth + ' .unit').text(val);
583
+ }
584
+
585
+ maxLivePreview.prototype.setPreset = function(e)
586
+ {
587
+ var options = $('#' + this.currentScreen + '_preset-hidden').val();
588
+ var setPreset = $('#' + this.currentScreen + '_preset option:selected').val();
589
+ options = $.parseJSON(options);
590
+
591
+
592
+ var $minfield = $('#' + this.currentScreen + '_min_width');
593
+ var $maxfield = $('#' + this.currentScreen + '_max_width');
594
+
595
+ if (options[setPreset] && setPreset !== 'none')
596
+ {
597
+ var option = options[setPreset];
598
+ var minwidth = option.minwidth;
599
+ var maxwidth = option.maxwidth;
600
+
601
+ if (minwidth <= 0) minwidth = 0;
602
+ if (maxwidth <= 0) maxwidth = 0;
603
+
604
+ $minfield.val(minwidth);
605
+ $maxfield.val(maxwidth);
606
+ }
607
+
608
+ }
609
+
610
+ maxLivePreview.prototype.hexToRgb = function(hex) {
611
+ if (hex.indexOf('rgba') >= 0)
612
+ return hex;
613
+
614
+ hex = hex.replace('#','');
615
+ var bigint = parseInt(hex, 16);
616
+ var r = (bigint >> 16) & 255;
617
+ var g = (bigint >> 8) & 255;
618
+ var b = bigint & 255;
619
+
620
+ return r + "," + g + "," + b;
621
+ }
js/maxbuttons-admin.js CHANGED
@@ -18,7 +18,6 @@ maxAdmin.prototype.init = function () {
18
  this.button_id = $('input[name="button_id"]').val();
19
  // Prevents the output button from being clickable (also in admin list view )
20
  $(document).on('click', ".maxbutton-preview", function(e) { e.preventDefault(); e.stopPropagation(); });
21
- $(document).on('click', '.output .preview-toggle', $.proxy(this.toggle_preview, this));
22
 
23
  // overview input paging
24
  $('#maxbuttons .input-paging').on('change', $.proxy(this.do_paging, this));
@@ -38,7 +37,7 @@ maxAdmin.prototype.init = function () {
38
  this.initConditionials(); // conditional options
39
 
40
  // range inputs
41
- $(document).on('change, input', 'input[type="range"]', $.proxy(this.updateRange, this ));
42
  this.updateRange(null);
43
 
44
  /*
@@ -55,27 +54,19 @@ maxAdmin.prototype.init = function () {
55
  $("#maxbuttons .mb-message").show();
56
  }
57
 
58
- this.initResponsive(); // responsive edit interface
 
 
 
 
 
 
 
59
 
60
  $("#maxbuttons .output").draggable({
61
  cancel: '.nodrag',
62
  });
63
 
64
- $('#maxbuttons .color-field').alphaColorPicker(
65
- {
66
- width: 300,
67
- palettes: this.colorPalettes,
68
- //changeFunc: $.proxy(this.update_color, this),
69
- changeFunc: $.proxy( _.throttle(function(event, ui) {
70
- event.preventDefault();
71
- var color = ui.color.toString();
72
- this.update_color(event,ui, color);
73
-
74
- }, 200), this),
75
-
76
- }
77
- );
78
-
79
  // clicking on color picker circle scrolls to top and loads # on the page, which is bad.
80
  $('.iris-picker-inner .iris-square-value').removeAttr('href');
81
  $(document).on('click', '.iris-picker-inner .iris-square-value', function (e) {
@@ -84,26 +75,10 @@ maxAdmin.prototype.init = function () {
84
  /* Copy Color Interface */
85
  $('.input.mbcolor .arrows').on('click', $.proxy(this.copyColor, this) );
86
 
87
- $('#radius_toggle').on('click', $.proxy(this.toggleRadiusLock,this));
88
-
89
- if ( typeof buttonFieldMap != 'undefined')
90
- this.fields = $.parseJSON(buttonFieldMap);
91
-
92
- // bind to all inputs, except for color-field or items with different handler.
93
- $('#maxbuttons input').not('.color-field').on('keyup change', $.proxy(this.update_preview,this));
94
- $('#maxbuttons input.color-field').on('focus', $.proxy(this.select_field, this));
95
- // $('#maxbuttons input.color-field').on('change', $.proxy(this.checkTransparent, this));
96
 
97
- // init check on transparency
98
- /*$('#maxbuttons input.color-field').each($.proxy(function(index, el) {
99
- obj = {}
100
- obj.target = el;
101
- obj.event = false;
102
- this.checkTransparent(obj); // fakers be fakers
103
- },this)); */
104
-
105
-
106
- $('#maxbuttons select').on('change', $.proxy(this.update_preview, this));
107
 
108
  $(window).on('beforeunload', $.proxy(function () { if (this.form_updated) return maxajax.leave_page; }, this));
109
  $(document).on('keyup', 'input', function (e) {
@@ -115,8 +90,13 @@ maxAdmin.prototype.init = function () {
115
  }
116
  });
117
 
118
- $(".button-save").click( $.proxy(function() {
119
- this.saveIndicator(false); // prevent alert when saving.
 
 
 
 
 
120
  $("#new-button-form").submit();
121
  return false;
122
  }, this) );
@@ -130,86 +110,103 @@ maxAdmin.prototype.init = function () {
130
  // Sidebar slider
131
  $('.block_sidebar .open_control').on('click', this.toggleSidebar);
132
 
133
- }; // INIT
 
 
 
134
 
 
135
 
136
- maxAdmin.prototype.repaint_preview = function ()
137
  {
138
- $('.mb_tab input[type="text"]').trigger('change');
139
- $('.mb_tab input[type="number"]').trigger('change');
140
- $('.mb_tab select').trigger('change');
141
- $('.mb_tab input[type="hidden"]').trigger('change');
142
- $('.mb_tab input[type="radio"]:checked').trigger('change');
143
- $('.mb_tab input[type="checkbox"]:checked').trigger('change');
 
 
 
 
 
 
 
 
 
 
144
  }
145
 
146
- /** Updates the preview buttons with new CSS lines. Extracts several fields from the fieldmap.
147
- * state = csspseudo */
148
- maxAdmin.prototype.update_preview = function(e)
149
  {
150
- e.preventDefault();
151
- this.saveIndicator(true);
152
- var target = $(e.target);
153
-
154
- // migration to data field
155
- var field = $(target).data('field');
156
- if (typeof field == 'undefined')
157
- var id = $(target).attr('id'); // this should change to be ready for the option to have two the same fields on multi locations.
158
- else
159
- var id = field;
160
 
161
- var data = this.fields[id];
162
- var state = null;
 
 
 
 
163
 
164
- if (typeof data == 'undefined')
165
- return; // field doesn't have updates
166
- // check all attributes. Fields can use any of those for different processes.
167
- if (typeof data.css != 'undefined')
168
- {
169
- value = target.val();
 
 
 
 
170
 
171
- if (typeof data.css_unit != 'undefined' && value.indexOf(data.css_unit) == -1)
172
- value += data.css_unit;
 
173
 
174
- // a target that is checkbox but not checked should unset (empty) value.
175
- if (target.is(':checkbox') && ! target.is(':checked') )
176
- value = '';
177
 
178
- if (typeof data.pseudo !== 'undefined')
179
- {
180
- state = data.pseudo;
181
- }
182
- this.putCSS(data, value, state);
183
  }
184
- if (typeof data.attr !== 'undefined')
185
- {
186
- $('.output .result').find('a').attr(data.attr, target.val());
187
- }
188
 
189
- if (typeof data.func !== 'undefined')
 
 
190
  {
191
- var funcName = data.func;
192
- var self = this;
193
- if (funcName.indexOf('.') < 0)
194
- {
195
- funcName = 'self.' + funcName + '(target)';
196
- }
197
- else {
198
- funcName = funcName + '(target)';
199
- }
200
 
201
- try
202
- {
203
- var callFunc = new Function ('target', 'self', funcName);
204
- callFunc(target, this);
205
- }
206
- catch(err)
207
- {
208
- console.error(err);
209
- }
210
 
 
 
 
211
  }
 
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  };
214
 
215
  maxAdmin.prototype.select_field = function(e)
@@ -234,8 +231,6 @@ maxAdmin.prototype.button_action = function(e)
234
  }
235
 
236
  var button_id = $(e.target).data('buttonid');
237
- console.log(e.target);
238
- console.log(button_id);
239
  var nonce = $('input[name="' + action + '_nonce"]').val();
240
  var paged = $('input[name="paged"]').val();
241
 
@@ -282,124 +277,6 @@ maxAdmin.prototype.checkCopyModal = function(modal)
282
  $(modal.currentModal).find('.mb-message').hide();
283
  }
284
 
285
- maxAdmin.prototype.toggle_preview = function (e)
286
- {
287
- if ( $('.output .inner').is(':hidden') )
288
- {
289
- $('.output .inner').show();
290
- $('.output').css('height', 'auto');
291
- $('.preview .preview-toggle').removeClass('dashicons-arrow-down').addClass('dashicons-arrow-up');
292
- }
293
- else
294
- {
295
- $('.output .inner').hide();
296
- $('.output').css('height', 'auto');
297
- $('.preview .preview-toggle').removeClass('dashicons-arrow-up').addClass('dashicons-arrow-down');
298
- }
299
- };
300
-
301
-
302
- maxAdmin.prototype.putCSS = function(data,value,state)
303
- {
304
- state = state || 'both';
305
-
306
- var element = '.maxbutton';
307
- if (state == 'hover')
308
- element = 'a.hover ';
309
- else if(state == 'normal')
310
- element = 'a.normal ';
311
-
312
- if (typeof data.csspart != 'undefined')
313
- {
314
- var parts = data.csspart.split(",");
315
- for(i=0; i < parts.length; i++)
316
- {
317
- var cpart = parts[i];
318
- var fullpart = element + " ." + cpart;
319
- $('.output .result').find(fullpart).css(data.css, value);
320
- }
321
- }
322
- else
323
- $('.output .result').find(element).css(data.css, value);
324
-
325
- }
326
-
327
- maxAdmin.prototype.update_color = function(event, ui, color)
328
- {
329
- event.preventDefault();
330
- this.saveIndicator(true);
331
-
332
- var target = $(event.target);
333
- console.log('update_color :: ' + color);
334
- if (color.indexOf('#') === -1 && color.indexOf('rgba') < 0)
335
- {
336
- color = '#' + color;
337
- $('#' + id).val(color); // otherwise field value is running 1 click behind.
338
- }
339
- var id = target.attr('id');
340
-
341
- // toggle transparency when needed.
342
- if ( $(target).val() == '')
343
- {
344
- $(target).parents('.mbcolor').find('.wp-color-result').children('.the_color').css('background-image', 'url(' + maxadmin_settings.icon_transparent + ')');
345
- if (typeof event.type !== 'undefined' && event.type == 'change')
346
- this.update_color(e, null, 'rgba(0,0,0,0)');
347
- }
348
- else {
349
- $(target).parents('.mbcolor').find('.wp-color-result').children('.the_color').css('background-image', 'none');
350
- }
351
-
352
-
353
- if(id.indexOf('box_shadow') !== -1)
354
- {
355
- this.updateBoxShadow(target);
356
- }
357
- else if(id.indexOf('text_shadow') !== -1)
358
- {
359
- this.updateTextShadow(target);
360
- }
361
- else if (id.indexOf('gradient') !== -1)
362
- {
363
- if (id.indexOf('hover') == -1)
364
- this.updateGradient();
365
- else
366
- this.updateGradient(true);
367
- }
368
- else if (id == 'button_preview')
369
- {
370
- if (color.indexOf('rgba') >= 0)
371
- {
372
- // color = '#ffffff';
373
- // $('#' + id).val(color);
374
- // this.checkTransparent(event);
375
- }
376
- $(".output .result").css('backgroundColor', color);
377
- }
378
- else // simple update
379
- {
380
-
381
- /* if (id.indexOf('hover') == -1)
382
- {
383
- state = 'normal';
384
- }
385
- else
386
- {
387
- state = 'hover';
388
- } */
389
-
390
- var data = this.fields[id];
391
- var state = 'normal';
392
- if (typeof data.pseudo !== 'undefined')
393
- {
394
- state = data.pseudo;
395
- }
396
-
397
- this.putCSS(data, color, state);
398
- return;
399
- }
400
-
401
-
402
- };
403
 
404
  maxAdmin.prototype.copyColor = function (e)
405
  {
@@ -457,182 +334,6 @@ maxAdmin.prototype.copyColor = function (e)
457
 
458
  }
459
 
460
- maxAdmin.prototype.updateGradient = function(hover)
461
- {
462
- hover = hover || false;
463
-
464
- var hovtarget = '';
465
- if (hover)
466
- hovtarget = "_hover";
467
-
468
- var stop = parseInt($('#gradient_stop').val());
469
-
470
- if (isNaN(stop) )
471
- stop = 45;
472
-
473
- var gradients_on = $('#use_gradient').prop('checked');
474
-
475
- var color = $('#gradient_start_color' + hovtarget).val();
476
- var endcolor = $('#gradient_end_color' + hovtarget).val();
477
-
478
- if (color == '') color = 'rgba(0,0,0,0)';
479
- if (endcolor == '') endcolor = 'rgba(0,0,0,0)';
480
-
481
- var start = this.hexToRgb(color);
482
- var end = this.hexToRgb(endcolor);
483
- var startop = parseInt($('#gradient_start_opacity' + hovtarget).val());
484
- var endop = parseInt($('#gradient_end_opacity' + hovtarget).val());
485
-
486
- if (! gradients_on)
487
- {
488
- end = start;
489
- endop = startop;
490
- }
491
-
492
- if(isNaN(startop)) startop = 100;
493
- if(isNaN(endop)) endop = 100;
494
-
495
- if (!hover)
496
- var button = $('.output .result').find('a.normal');
497
- else
498
- var button = $('.output .result').find('a.hover');
499
-
500
- if (start.indexOf('rgba') < 0)
501
- var startrgba = "rgba(" + start + "," + (startop/100) + ") ";
502
- else
503
- var startrgba = start;
504
-
505
- if (end.indexOf('rgba') < 0)
506
- var endrgba = "rgba(" + end + "," + (endop/100) + ") ";
507
- else
508
- var endrgba = end;
509
-
510
- console.log(start.indexOf('rgba') + ' ' + start + ' ' + startrgba + ' ' + endrgba);
511
-
512
-
513
- button.css("background", "linear-gradient(" + startrgba + stop + "%," + endrgba + ')');
514
- //button.css("background", "linear-gradient( rgba(" + start + "," + (startop/100) + ") " + stop + "%," + " rgba(" + end + "," + (endop/100) + ") )");
515
- //button.css("background", "-moz-linear-gradient(" startrgba + stop + "%," + endrgba ")");
516
- //button.css("background", "-o-linear-gradient( rgba(" + start + "," + (startop/100) + ") " + stop + "%," + " rgba(" + end + "," + (endop/100) + ") )");
517
- //button.css("background", "-webkit-gradient(linear, left top, left bottom, color-stop(" +stop+ "%, rgba(" + start + "," + (startop/100) + ")), color-stop(1, rgba(" + end + "," + (endop/100) + ") ));");
518
-
519
- }
520
-
521
- maxAdmin.prototype.hexToRgb = function(hex) {
522
- if (hex.indexOf('rgba') >= 0)
523
- return hex;
524
-
525
- hex = hex.replace('#','');
526
- var bigint = parseInt(hex, 16);
527
- var r = (bigint >> 16) & 255;
528
- var g = (bigint >> 8) & 255;
529
- var b = bigint & 255;
530
-
531
- return r + "," + g + "," + b;
532
- }
533
-
534
- maxAdmin.prototype.updateBoxShadow = function (target)
535
- {
536
- target = target || null;
537
-
538
- var left = $("#box_shadow_offset_left").val();
539
- var top = $("#box_shadow_offset_top").val();
540
- var width = $("#box_shadow_width").val();
541
- var spread = $('#box_shadow_spread').val();
542
-
543
- var color = $("#box_shadow_color").val();
544
- var hovcolor = $("#box_shadow_color_hover").val();
545
-
546
- if (color == '') color = 'rgba(0,0,0,0)';
547
- if (hovcolor == '') hovcolor = 'rgba(0,0,0,0)';
548
-
549
- $('.output .result').find('a.normal').css("boxShadow",left + 'px ' + top + 'px ' + width + 'px ' + spread + 'px ' + color);
550
- $('.output .result').find('a.hover').css("boxShadow",left + 'px ' + top + 'px ' + width + 'px ' + spread + 'px ' + hovcolor);
551
- }
552
-
553
- maxAdmin.prototype.updateTextShadow = function(target,hover)
554
- {
555
- hover = hover || false;
556
-
557
- var left = $("#text_shadow_offset_left").val();
558
- var top = $("#text_shadow_offset_top").val();
559
- var width = $("#text_shadow_width").val();
560
-
561
- var color = $("#text_shadow_color").val();
562
- var hovcolor = $("#text_shadow_color_hover").val();
563
-
564
- var id = $(target).attr('id');
565
- var data = this.fields[id];
566
-
567
- data.css = 'textShadow';
568
-
569
- if (color == '') color = 'rgba(0,0,0,0)';
570
- if (hovcolor == '') hovcolor = 'rgba(0,0,0,0)';
571
-
572
- var value = left + 'px ' + top + 'px ' + width + 'px ' + color;
573
- this.putCSS(data, value, 'normal');
574
-
575
- value = left + 'px ' + top + 'px ' + width + 'px ' + hovcolor;
576
- this.putCSS(data, value, 'hover');
577
-
578
- }
579
-
580
- maxAdmin.prototype.updateAnchorText = function (target)
581
- {
582
- var preview_text = $('.output .result').find('a .mb-text');
583
-
584
- // This can happen when the text is removed, button is saved, so the preview doesn't load the text element.
585
- if (preview_text.length === 0)
586
- {
587
- $('.output .result').find('a').append('<span class="mb-text"></span>');
588
- $('.output .result').find('a .mb-text').css({'display':'block','line-height':'1em','box-sizing':'border-box'});
589
-
590
- this.repaint_preview();
591
- }
592
- $('.output .result').find('a .mb-text').text(target.val());
593
- }
594
-
595
- maxAdmin.prototype.updateGradientOpacity = function(target)
596
- {
597
- this.updateGradient(true);
598
- this.updateGradient(false);
599
- }
600
-
601
- maxAdmin.prototype.updateDimension = function (target)
602
- {
603
- var dimension = $(target).val();
604
- var id = $(target).attr('id');
605
- var data = this.fields[id];
606
- if (dimension > 0)
607
- this.putCSS(data, dimension);
608
- else
609
- this.putCSS(data, 'auto');
610
- }
611
-
612
- maxAdmin.prototype.updateRadius = function(target)
613
- {
614
- var value = target.val();
615
- var fields = ['radius_bottom_left', 'radius_bottom_right', 'radius_top_left', 'radius_top_right'];
616
-
617
- if ( $('#radius_toggle').data('lock') == 'lock')
618
- {
619
- for(i=0; i < fields.length; i++)
620
- {
621
- var id = fields[i];
622
- $('#' + id).val(value);
623
- var data = this.fields[id];
624
- this.putCSS(data,value + 'px');
625
-
626
- }
627
- }
628
- else { // update as regular single field
629
- var value = $(target).val();
630
- var id = $(target).attr('id');
631
- var data = this.fields[id];
632
- this.putCSS(data, value);
633
- }
634
- }
635
-
636
  maxAdmin.prototype.toggleRadiusLock = function (event)
637
  {
638
  var target = $(event.target);
@@ -650,12 +351,11 @@ maxAdmin.prototype.toggleRadiusLock = function (event)
650
 
651
  }
652
 
653
-
654
  maxAdmin.prototype.initResponsive = function()
655
  {
656
 
657
- window.maxFoundry.maxadmin.responsive = new mbResponsive();
658
- window.maxFoundry.maxadmin.responsive.init(this);
659
 
660
  }
661
 
@@ -742,7 +442,6 @@ maxAdmin.prototype.initConditionials = function ()
742
  var values = condition.values;
743
  var self = this;
744
 
745
-
746
  $(document).on('change','[name="' + target + '"]', {child: this, values: values}, $.proxy(mAP.updateConditional, mAP) );
747
 
748
  if ( $('[name="' + target + '"]').length > 1) // trigger change to test condition
@@ -875,13 +574,18 @@ maxAdmin.prototype.updateRange = function (event)
875
 
876
  }
877
 
878
- maxAdmin.prototype.saveIndicator = function(toggle)
879
  {
880
-
881
  if (toggle)
882
- this.form_updated = true;
 
 
 
883
  else
 
884
  this.form_updated = false;
 
 
885
  }
886
 
887
  // General AJAX form save
@@ -972,6 +676,7 @@ maxAdmin.prototype.openURLDialog = function(e)
972
  maxAdmin.prototype.updateLink = function (e)
973
  {
974
  e.preventDefault();
 
975
  var url = $('#wp-link-url').val();
976
  var host = maxadmin_settings.homeurl;
977
 
@@ -979,6 +684,11 @@ maxAdmin.prototype.updateLink = function (e)
979
 
980
  $('#url').val(url);
981
 
 
 
 
 
 
982
  wpLink.close();
983
  return false;
984
  }
18
  this.button_id = $('input[name="button_id"]').val();
19
  // Prevents the output button from being clickable (also in admin list view )
20
  $(document).on('click', ".maxbutton-preview", function(e) { e.preventDefault(); e.stopPropagation(); });
 
21
 
22
  // overview input paging
23
  $('#maxbuttons .input-paging').on('change', $.proxy(this.do_paging, this));
37
  this.initConditionials(); // conditional options
38
 
39
  // range inputs
40
+ $('#maxbuttons').on('change, input', 'input[type="range"]', $.proxy(this.updateRange, this ));
41
  this.updateRange(null);
42
 
43
  /*
54
  $("#maxbuttons .mb-message").show();
55
  }
56
 
57
+ //this.initResponsive(); // responsive edit interface
58
+
59
+ // this events happens when live preview updates something.
60
+ $(document).on('livePreviewUpdate', $.proxy(this.saveIndicator, this) );
61
+
62
+ // screen changer.
63
+ $('.screen-option').on('click', $.proxy(this.change_screen_event, this));
64
+ $('.remove-screen').on('click', $.proxy(this.remove_screen, this));
65
 
66
  $("#maxbuttons .output").draggable({
67
  cancel: '.nodrag',
68
  });
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  // clicking on color picker circle scrolls to top and loads # on the page, which is bad.
71
  $('.iris-picker-inner .iris-square-value').removeAttr('href');
72
  $(document).on('click', '.iris-picker-inner .iris-square-value', function (e) {
75
  /* Copy Color Interface */
76
  $('.input.mbcolor .arrows').on('click', $.proxy(this.copyColor, this) );
77
 
78
+ $('[id$="radius_toggle"]').on('click', $.proxy(this.toggleRadiusLock,this));
79
+ $('.output .preview-toggle').on('click', $.proxy(this.toggle_preview, this));
 
 
 
 
 
 
 
80
 
81
+ $('#maxbuttons input.mb-color-field').on('focus', $.proxy(this.select_field, this));
 
 
 
 
 
 
 
 
 
82
 
83
  $(window).on('beforeunload', $.proxy(function () { if (this.form_updated) return maxajax.leave_page; }, this));
84
  $(document).on('keyup', 'input', function (e) {
90
  }
91
  });
92
 
93
+ $(".button-save").click($.proxy(function(e) {
94
+ this.saveIndicator(null, false); // prevent alert when saving.
95
+
96
+ if ($(e.target).attr('id') == 'new_add_screen')
97
+ {
98
+ $('#add_new_screen').val('yes');
99
+ }
100
  $("#new-button-form").submit();
101
  return false;
102
  }, this) );
110
  // Sidebar slider
111
  $('.block_sidebar .open_control').on('click', this.toggleSidebar);
112
 
113
+ $(window).on('maxbuttons-js-init-done', $.proxy(this.loadLivePreview, this));
114
+
115
+ if ( $('input[name="button_is_new"]').val() == 1)
116
+ this.saveIndicator(null, true);
117
 
118
+ }; // INIT
119
 
120
+ maxAdmin.prototype.loadLivePreview = function()
121
  {
122
+ if (typeof window.maxFoundry.livePreview == 'function' )
123
+ {
124
+ this.livePreview = new window.maxFoundry.livePreview();
125
+ this.livePreview.init();
126
+ $(document).trigger('livepreview-loaded');
127
+
128
+ }
129
+ else {
130
+ alert('Live Preview not loaded, button preview not functional');
131
+ }
132
+
133
+ if (typeof window.location.hash !== 'undefined' && window.location.hash.length > 0)
134
+ {
135
+ var screenid = window.location.hash.replace('#', '');
136
+ this.change_screen(screenid);
137
+ }
138
  }
139
 
140
+ maxAdmin.prototype.change_screen_event = function(e)
 
 
141
  {
142
+ e.preventDefault();
143
+ var $target = $(e.target);
144
+ if (typeof ($target.data('screenid')) == 'undefined')
145
+ $target = $target.parents('.screen-option');
 
 
 
 
 
 
146
 
147
+ var change_screen = $target.data('screenid');
148
+ if (typeof change_screen !== 'undefined')
149
+ this.change_screen(change_screen);
150
+ }
151
+ maxAdmin.prototype.change_screen = function(change_screen)
152
+ {
153
 
154
+ var active_screen = $('.screen-option.option-active').data('screenid');
155
+ var $target = $('.screen-option[data-screenid="' + change_screen + '"]');
156
+ if (change_screen != 'new')
157
+ {
158
+ $('#current_screen').val(change_screen);
159
+ }
160
+ // not the same.
161
+ if (active_screen !== change_screen)
162
+ {
163
+ window.location.hash = change_screen;
164
 
165
+ $('.screen-option').removeClass('option-active');
166
+ $target.addClass('option-active');
167
+ $(document).trigger('changed_screen', change_screen);
168
 
169
+ $('.mbscreen-editor').removeClass('current-screen');
170
+ $('#screen_' + change_screen).addClass('current-screen');
 
171
 
 
 
 
 
 
172
  }
173
+ //change_screen
174
+ }
 
 
175
 
176
+ maxAdmin.prototype.remove_screen = function(e)
177
+ {
178
+ if (confirm(maxadmin_settings.remove_confirm))
179
  {
180
+ var $target = $(e.target);
181
+ var screen_id = $target.parents('.mbscreen-editor').data('screenid');
182
+ $target.parents('.mbscreen-editor').remove(); // remove editor screen
 
 
 
 
 
 
183
 
184
+ $('.screen-option[data-screenid="' + screen_id + '"]').remove(); // remove the menu tab
185
+ $('input[name="screens[]"][value="' + screen_id + '"]').remove(); // remove the input hidden registration
186
+
187
+ // indicator for add new screen when limited.
188
+ $('.removed-note').show();
 
 
 
 
189
 
190
+ this.change_screen('default');
191
+
192
+ this.saveIndicator(null, true);
193
  }
194
+ }
195
 
196
+ maxAdmin.prototype.toggle_preview = function (e)
197
+ {
198
+ if ( $('.output .inner').is(':hidden') )
199
+ {
200
+ $('.output .inner').show();
201
+ $('.output').css('height', 'auto');
202
+ $('.preview .preview-toggle').removeClass('dashicons-arrow-down').addClass('dashicons-arrow-up');
203
+ }
204
+ else
205
+ {
206
+ $('.output .inner').hide();
207
+ $('.output').css('height', 'auto');
208
+ $('.preview .preview-toggle').removeClass('dashicons-arrow-up').addClass('dashicons-arrow-down');
209
+ }
210
  };
211
 
212
  maxAdmin.prototype.select_field = function(e)
231
  }
232
 
233
  var button_id = $(e.target).data('buttonid');
 
 
234
  var nonce = $('input[name="' + action + '_nonce"]').val();
235
  var paged = $('input[name="paged"]').val();
236
 
277
  $(modal.currentModal).find('.mb-message').hide();
278
  }
279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
 
281
  maxAdmin.prototype.copyColor = function (e)
282
  {
334
 
335
  }
336
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  maxAdmin.prototype.toggleRadiusLock = function (event)
338
  {
339
  var target = $(event.target);
351
 
352
  }
353
 
 
354
  maxAdmin.prototype.initResponsive = function()
355
  {
356
 
357
+ //window.maxFoundry.maxadmin.responsive = new mbResponsive();
358
+ //window.maxFoundry.maxadmin.responsive.init(this);
359
 
360
  }
361
 
442
  var values = condition.values;
443
  var self = this;
444
 
 
445
  $(document).on('change','[name="' + target + '"]', {child: this, values: values}, $.proxy(mAP.updateConditional, mAP) );
446
 
447
  if ( $('[name="' + target + '"]').length > 1) // trigger change to test condition
574
 
575
  }
576
 
577
+ maxAdmin.prototype.saveIndicator = function(e, toggle)
578
  {
 
579
  if (toggle)
580
+ {
581
+ this.form_updated = true;
582
+ $('.button-save').removeClass('disabled').addClass('button-primary');
583
+ }
584
  else
585
+ {
586
  this.form_updated = false;
587
+ $('.button-save').addClass('disabled').removeClass('button-primary');
588
+ }
589
  }
590
 
591
  // General AJAX form save
676
  maxAdmin.prototype.updateLink = function (e)
677
  {
678
  e.preventDefault();
679
+ var old_url = $('#url').val();
680
  var url = $('#wp-link-url').val();
681
  var host = maxadmin_settings.homeurl;
682
 
684
 
685
  $('#url').val(url);
686
 
687
+ if (old_url != url)
688
+ { // trigger update when changing URL
689
+ $(document).trigger('livePreviewUpdate', true);
690
+ }
691
+
692
  wpLink.close();
693
  return false;
694
  }
js/media_button.js CHANGED
@@ -52,7 +52,10 @@ jQuery(document).ready(function(jq) {
52
  }
53
  this.ajaxSuccessHandler = $.proxy(this.putContent, this);
54
  $(document).off('click','.pagination span, .pagination-links a', $.proxy(this.doPagination, this));
55
- $(document).on('click','.pagination span, .pagination-links a', $.proxy(this.doPagination, this)); // should be more specific
 
 
 
56
 
57
  $(document).off('media_button_content_buttons_load', $.proxy(this.hookButtonAction, this));
58
  $(document).on('media_button_content_buttons_load', $.proxy(this.hookButtonAction, this));
@@ -206,8 +209,24 @@ jQuery(document).ready(function(jq) {
206
  this.maxajax.ajaxPost(data, this.ajaxSuccessHandler);
207
  }
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
 
210
 
 
 
211
  maxMedia.prototype.doPagination = function (e)
212
  {
213
  e.preventDefault();
52
  }
53
  this.ajaxSuccessHandler = $.proxy(this.putContent, this);
54
  $(document).off('click','.pagination span, .pagination-links a', $.proxy(this.doPagination, this));
55
+ $(document).on('click', '.pagination span, .pagination-links a', $.proxy(this.doPagination, this)); // should be more specific
56
+
57
+ $(document).off('change', '.pagination-links .input-paging', $.proxy(this.doInputPagination, this));
58
+ $(document).on('change', '.pagination-links .input-paging', $.proxy(this.doInputPagination, this));
59
 
60
  $(document).off('media_button_content_buttons_load', $.proxy(this.hookButtonAction, this));
61
  $(document).on('media_button_content_buttons_load', $.proxy(this.hookButtonAction, this));
209
  this.maxajax.ajaxPost(data, this.ajaxSuccessHandler);
210
  }
211
 
212
+ maxMedia.prototype.doInputPagination = function(e)
213
+ {
214
+ e.preventDefault();
215
+ var $target = $(e.target);
216
+
217
+ var current = parseInt($target.data('current'));
218
+ var value = parseInt($target.val());
219
+ var max = parseInt($target.attr('max'));
220
+
221
+ if (value != current && value >= 1 && value <= max)
222
+ {
223
+ this.getPage = value;
224
+ this.loadButtons();
225
+ }
226
 
227
 
228
+ }
229
+
230
  maxMedia.prototype.doPagination = function (e)
231
  {
232
  e.preventDefault();
js/min/init.js CHANGED
@@ -1 +1 @@
1
- var $=jQuery;jQuery(document).ready(function(a){$=a,void 0===window.maxFoundry&&(window.maxFoundry={}),window.maxFoundry.maxadmin=new maxAdmin,window.maxFoundry.maxadmin.init(),window.maxFoundry.maxmodal=new maxModal,window.maxFoundry.maxmodal.init(),window.maxFoundry.maxAjax=new maxAjax,window.maxFoundry.maxAjax.init(),window.maxFoundry.maxTabs=new maxTabs,window.maxFoundry.maxTabs.init()});
1
+ var $=jQuery;jQuery(document).ready(function(n){$=n,void 0===window.maxFoundry&&(window.maxFoundry={}),"function"==typeof maxLivePreview&&(window.maxFoundry.livePreview=maxLivePreview),window.maxFoundry.maxadmin=new maxAdmin,window.maxFoundry.maxadmin.init(),window.maxFoundry.maxmodal=new maxModal,window.maxFoundry.maxmodal.init(),window.maxFoundry.maxAjax=new maxAjax,window.maxFoundry.maxAjax.init(),window.maxFoundry.maxTabs=new maxTabs,window.maxFoundry.maxTabs.init(),$(window).trigger("maxbuttons-js-init-done")});
js/min/live-preview.js ADDED
@@ -0,0 +1 @@
 
1
+ function maxLivePreview(){}var $=jQuery;maxLivePreview.prototype={fields:{},screens:{},currentScreen:"",currentFields:{},reloadInProgress:!1,reloaded:{}},maxLivePreview.prototype.init=function(){this.loadScreens(),this.bindFields()},maxLivePreview.prototype.bindFields=function(){$("#maxbuttons input,#maxbuttons textarea").not(".mb-color-field").on("keyup change",$.proxy(this.update_preview_event,this)),$("#maxbuttons select").on("change",$.proxy(this.update_preview_event,this)),$("#maxbuttons .mb-color-field").alphaColorPicker({width:300,palettes:this.colorPalettes,changeFunc:$.proxy(_.throttle(function(e,t){e.preventDefault();var i=t.color.toString();this.update_color_event(e,t,i)},200),this)}),$('[data-action="set-preset"]').on("click",$.proxy(this.setPreset,this)),$(document).on("changed_screen",$.proxy(this.changed_screen,this))},maxLivePreview.prototype.changed_screen=function(e,t){this.setCurrentScreen("default"),this.reloadFields(),"default"!=t&&(this.setCurrentScreen(t),this.reloadFields())},maxLivePreview.prototype.reloadFields=function(){$(document).trigger("livepreview-reload-start"),this.reloadInProgress=!0;for(var e in this.currentFields){var t=this.fields[this.currentScreen][e];this.update_preview($("#"+e),t)}this.reloadInProgress=!1,this.reloaded={},$(document).trigger("livepreview-reload-end")},maxLivePreview.prototype.loadScreens=function(){var e=this;$(".mbscreen-editor .fieldmap").each(function(){var t=$(this).parents(".mbscreen-editor"),i=t.attr("id").replace("screen_",""),r=$(this).text();void 0!==r&&(e.fields[i]=$.parseJSON(r)),t.hasClass("current-screen")&&e.setCurrentScreen(i)})},maxLivePreview.prototype.getFieldByID=function(e,t){if(void 0===t&&(t=!1),"default"==this.currentScreen)i=e;else var i=this.currentScreen+"_"+e;if(t)r=$('input[name="'+i+'"]');else var r=$("#"+i);return r},maxLivePreview.prototype.setCurrentScreen=function(e){this.currentScreen=e,this.currentFields=this.fields[e],$(document).trigger("livepreview-screen-set",[e,this.currentFields])},maxLivePreview.prototype.update_preview_event=function(e){e.preventDefault();var t=$(e.target),i=($(t).data("field"),$(t).attr("id")),r=this.currentFields[i];$(document).trigger("livePreviewUpdate",!0),null!==r&&this.update_preview($("#"+i),r)},maxLivePreview.prototype.update_preview=function(e,t){var i=null;if(void 0!==t){if(void 0!==t.css){if(value=e.val(),e.is(":checkbox")&&!e.is(":checked")&&(value=""),e.is(":radio")&&!e.is(":checked"))return;void 0!==t.pseudo&&(i=t.pseudo),this.putCSS(t,value,i)}if(void 0!==t.attr&&$(".output .result").find("a").attr(t.attr,e.val()),void 0!==t.func){var r=t.func;r.indexOf(".")<0?r="self."+r+"(target)":r+="(target)";try{new Function("target","self",r)(e,this)}catch(e){console.error(e)}}}},maxLivePreview.prototype.putCSS=function(e,t,r){var a=".maxbutton";if("hover"==(r=r||"both")?a="a.hover ":"normal"==r&&(a="a.normal "),void 0!==e.unitfield){var o=this.getFieldByID(e.unitfield,!0).filter(":checked").val();0==t?t="auto":"percent"==o||"%"==o?t+="%":"pixel"!=o&&"px"!=o||(t+="px")}else void 0!==e.css_unit&&-1==t.indexOf(e.css_unit)&&-1==t.indexOf(e.css_unit)&&(t+=e.css_unit);if(void 0!==e.csspart){var s=e.csspart.split(",");for(i=0;i<s.length;i++){var n=a+" ."+s[i];$(".output .result").find(n).css(e.css,t)}}else $(".output .result").find(a).css(e.css,t)},maxLivePreview.prototype.update_color_event=function(e,t,i){e.preventDefault();var r=$(e.target);this.update_color(r,t,i),$(document).trigger("livePreviewUpdate",!0)},maxLivePreview.prototype.update_color=function(t,i,r){var a=t.attr("id");if(-1===r.indexOf("#")&&r.indexOf("rgba")<0&&(r="#"+r),$("#"+a).val(r),""==$(t).val()?($(t).parents(".mbcolor").find(".wp-color-result").children(".the_color").css("background-image","url("+maxadmin_settings.icon_transparent+")"),void 0!==event.type&&"change"==event.type&&this.update_color(e,null,"rgba(0,0,0,0)")):$(t).parents(".mbcolor").find(".wp-color-result").children(".the_color").css("background-image","none"),-1!==a.indexOf("box_shadow"))this.updateBoxShadow(t);else if(-1!==a.indexOf("text_shadow"))this.updateTextShadow(t);else if(-1!==a.indexOf("gradient"))-1==a.indexOf("hover")?this.updateGradient():this.updateGradient(!0);else if("button_preview"==a)r.indexOf("rgba"),$(".output .result").css("backgroundColor",r);else{var o=this.currentFields[a],s="normal";void 0!==o.pseudo&&(s=o.pseudo),this.putCSS(o,r,s)}},maxLivePreview.prototype.updateBoxShadow=function(e){if(!this.reloadInProgress||void 0===this.reloaded.boxshadow){var t=$(e).attr("id"),i=this.getFieldByID("box_shadow_offset_left").val(),r=this.getFieldByID("box_shadow_offset_top").val(),a=this.getFieldByID("box_shadow_width").val(),o=this.getFieldByID("box_shadow_spread").val(),s=this.getFieldByID("box_shadow_color").val(),n=this.getFieldByID("box_shadow_color_hover").val();""==s&&(s="rgba(0,0,0,0)"),""==n&&(n="rgba(0,0,0,0)");var t=$(e).attr("id"),d=this.currentFields[t];d.css="boxShadow",value=i+"px "+r+"px "+a+"px "+o+"px "+s,value_hover=i+"px "+r+"px "+a+"px "+o+"px "+n,this.putCSS(d,value,"normal"),this.putCSS(d,value_hover,"hover"),this.reloaded.boxshadow=!0}},maxLivePreview.prototype.updateTextShadow=function(e){if(!this.reloadInProgress||void 0===this.reloaded.textshadow){var t=this.getFieldByID("text_shadow_offset_left").val(),i=this.getFieldByID("text_shadow_offset_top").val(),r=this.getFieldByID("text_shadow_width").val(),a=this.getFieldByID("text_shadow_color").val(),o=this.getFieldByID("text_shadow_color_hover").val(),s=$(e).attr("id"),n=this.currentFields[s];n.css="textShadow",""==a&&(a="rgba(0,0,0,0)"),""==o&&(o="rgba(0,0,0,0)");var d=t+"px "+i+"px "+r+"px "+a;this.putCSS(n,d,"normal"),d=t+"px "+i+"px "+r+"px "+o,this.putCSS(n,d,"hover"),this.reloaded.textshadow=!0}},maxLivePreview.prototype.updateAnchorText=function(e){0===$(".output .result").find("a .mb-text").length&&($(".output .result").find("a").append('<span class="mb-text"></span>'),$(".output .result").find("a .mb-text").css({display:"block","line-height":"1em","box-sizing":"border-box"}),this.reloadFields()),$(".output .result").find("a .mb-text").text(e.val())},maxLivePreview.prototype.updateGradientOpacity=function(e){this.updateGradient(!0),this.updateGradient(!1)},maxLivePreview.prototype.updateDimension=function(e){if(!this.reloadInProgress||void 0===this.reloaded.dimension){if(void 0===(t=e.data("field")))var t=e.attr("id");if(void 0!==t){var i={};if(t.indexOf("width")>=0){var e=this.getFieldByID("button_width"),r=this.getFieldByID("button_size_unit_width",!0);i.css="width";var a=".preview_border_width span",o=".input."+e.attr("name")+" .unit"}else if(t.indexOf("height")>=0){var e=this.getFieldByID("button_height"),r=this.getFieldByID("button_size_unit_height",!0);i.css="height";var a=".preview_border_height span",o=".input."+e.attr("name")+" .unit"}var s=e.val(),n=r.filter(":checked").val();0==s&&(n="",s="auto",this.putCSS(i,"auto")),"percent"==n&&(n="%"),"pixel"==n&&(n="px"),i.css_unit=n,$(a).text(s+n),$(a).css("width",s+n),this.putCSS(i,s),$(o).text(n),this.reloaded.dimension=!0}}},maxLivePreview.prototype.updateRadius=function(e){if(!this.reloadInProgress||void 0===this.reloaded.radius){var t=e.val(),r=["radius_bottom_left","radius_bottom_right","radius_top_left","radius_top_right"],a=this.getFieldByID("radius_toggle");if("lock"==$(a).data("lock"))for(i=0;i<r.length;i++){var o=this.getFieldByID(r[i]);o.val(t);var s=o.attr("id"),n=this.currentFields[s];this.putCSS(n,t+"px")}else{var t=$(e).val(),s=$(e).attr("id"),n=this.currentFields[s];this.putCSS(n,t)}this.reloaded.radius=!0}},maxLivePreview.prototype.getGradient=function(e){var t="";(e=e||!1)&&(t="_hover");var i=parseInt(this.getFieldByID("gradient_stop").val());isNaN(i)&&(i=45);var r=this.getFieldByID("use_gradient").prop("checked"),a=this.getFieldByID("gradient_start_color"+t).val(),o=this.getFieldByID("gradient_end_color"+t).val();""==a&&(a="rgba(0,0,0,0)"),""==o&&(o="rgba(0,0,0,0)");var s=this.hexToRgb(a),n=this.hexToRgb(o),d=parseInt(this.getFieldByID("gradient_start_opacity"+t).val()),l=parseInt(this.getFieldByID("gradient_end_opacity"+t).val());if(r||(n=s,l=d),isNaN(d)&&(d=100),isNaN(l)&&(l=100),s.indexOf("rgba")<0)h="rgba("+s+","+d/100+") ";else var h=s;if(n.indexOf("rgba")<0)u="rgba("+n+","+l/100+") ";else var u=n;return"linear-gradient("+h+i+"%,"+u+")"},maxLivePreview.prototype.updateGradient=function(e){if(!this.reloadInProgress||void 0===this.reloaded.gradient){var t=this.getGradient(e);if(e)i=$(".output .result").find("a.hover");else var i=$(".output .result").find("a.normal");i.css("background",t),$(document).trigger("livepreview/gradient/updated",[t,e]),this.reloaded.gradient=!0}},maxLivePreview.prototype.updateContainerUnit=function(e){var t=this.getFieldByID("container_width_unit",!0).filter(":checked").val();t="pixel"==t?"px":"%";var i=this.getFieldByID("container_width").attr("name");$(".option."+i+" .unit").text(t)},maxLivePreview.prototype.setPreset=function(e){var t=$("#"+this.currentScreen+"_preset-hidden").val(),i=$("#"+this.currentScreen+"_preset option:selected").val();t=$.parseJSON(t);var r=$("#"+this.currentScreen+"_min_width"),a=$("#"+this.currentScreen+"_max_width");if(t[i]&&"none"!==i){var o=t[i],s=o.minwidth,n=o.maxwidth;s<=0&&(s=0),n<=0&&(n=0),r.val(s),a.val(n)}},maxLivePreview.prototype.hexToRgb=function(e){if(e.indexOf("rgba")>=0)return e;e=e.replace("#","");var t=parseInt(e,16);return(t>>16&255)+","+(t>>8&255)+","+(255&t)};
js/min/maxajax.js CHANGED
@@ -150,4 +150,5 @@ maxAjax.prototype.defaultErrorHandler = function(jq,status,error, action)
150
  console.error(jq);
151
  console.error(status);
152
  console.error(error);
 
153
  }
150
  console.error(jq);
151
  console.error(status);
152
  console.error(error);
153
+ console.error(action);
154
  }
js/min/maxbuttons-admin.js CHANGED
@@ -1 +1 @@
1
- function maxAdmin(){}var $=jQuery;maxAdmin.prototype={colorUpdateTime:!0,colorPalettes:!0,fields:null,button_id:null,form_updated:!1,tabs:null},maxAdmin.prototype.init=function(){this.button_id=$('input[name="button_id"]').val(),$(document).on("click",".maxbutton-preview",function(t){t.preventDefault(),t.stopPropagation()}),$(document).on("click",".output .preview-toggle",$.proxy(this.toggle_preview,this)),$("#maxbuttons .input-paging").on("change",$.proxy(this.do_paging,this)),$(".manual-toggle").on("click",$.proxy(this.toggleManual,this)),$(".manual-entry").draggable({cancel:"p, li"}),$(document).on("submit","form.mb_ajax_save",$.proxy(this.formAjaxSave,this)),$(document).on("click","[data-buttonaction]",$.proxy(this.button_action,this)),$(document).on("reInitConditionals",$.proxy(this.initConditionials,this)),this.initConditionials(),$(document).on("change, input",'input[type="range"]',$.proxy(this.updateRange,this)),this.updateRange(null),0!=$("#new-button-form").length&&(this.button_id>0&&$("#maxbuttons .mb-message").show(),this.initResponsive(),$("#maxbuttons .output").draggable({cancel:".nodrag"}),$("#maxbuttons .color-field").alphaColorPicker({width:300,palettes:this.colorPalettes,changeFunc:$.proxy(_.throttle(function(t,e){t.preventDefault();var a=e.color.toString();this.update_color(t,e,a)},200),this)}),$(".iris-picker-inner .iris-square-value").removeAttr("href"),$(document).on("click",".iris-picker-inner .iris-square-value",function(t){return t.preventDefault(),t.stopPropagation(),!1}),$(".input.mbcolor .arrows").on("click",$.proxy(this.copyColor,this)),$("#radius_toggle").on("click",$.proxy(this.toggleRadiusLock,this)),"undefined"!=typeof buttonFieldMap&&(this.fields=$.parseJSON(buttonFieldMap)),$("#maxbuttons input").not(".color-field").on("keyup change",$.proxy(this.update_preview,this)),$("#maxbuttons input.color-field").on("focus",$.proxy(this.select_field,this)),$("#maxbuttons select").on("change",$.proxy(this.update_preview,this)),$(window).on("beforeunload",$.proxy(function(){if(this.form_updated)return maxajax.leave_page},this)),$(document).on("keyup","input",function(t){if(t.keyCode&&13==t.keyCode)return $(":input")[$(":input").index(document.activeElement)+1].focus(),!1}),$(".button-save").click($.proxy(function(){return this.saveIndicator(!1),$("#new-button-form").submit(),!1},this)),$(".shortcode-expand").on("click",this.toggleShortcode),$("#url_button").on("click",$.proxy(this.openURLDialog,this)),$(".block_sidebar .open_control").on("click",this.toggleSidebar))},maxAdmin.prototype.repaint_preview=function(){$('.mb_tab input[type="text"]').trigger("change"),$('.mb_tab input[type="number"]').trigger("change"),$(".mb_tab select").trigger("change"),$('.mb_tab input[type="hidden"]').trigger("change"),$('.mb_tab input[type="radio"]:checked').trigger("change"),$('.mb_tab input[type="checkbox"]:checked').trigger("change")},maxAdmin.prototype.update_preview=function(t){t.preventDefault(),this.saveIndicator(!0);var e=$(t.target),a=$(e).data("field");if(void 0===a)o=$(e).attr("id");else var o=a;var n=this.fields[o],i=null;if(void 0!==n&&(void 0!==n.css&&(value=e.val(),void 0!==n.css_unit&&-1==value.indexOf(n.css_unit)&&(value+=n.css_unit),e.is(":checkbox")&&!e.is(":checked")&&(value=""),void 0!==n.pseudo&&(i=n.pseudo),this.putCSS(n,value,i)),void 0!==n.attr&&$(".output .result").find("a").attr(n.attr,e.val()),void 0!==n.func)){var r=n.func;r.indexOf(".")<0?r="self."+r+"(target)":r+="(target)";try{new Function("target","self",r)(e,this)}catch(t){console.error(t)}}},maxAdmin.prototype.select_field=function(t){$(t.target).select()},maxAdmin.prototype.button_action=function(t){t.preventDefault();var e=$(t.target).data("buttonaction"),a=$(t.target).data("confirm");if(this.form_updated=!1,void 0!==a){if(!window.confirm(a))return}var o=$(t.target).data("buttonid");console.log(t.target),console.log(o);var n=$('input[name="'+e+'_nonce"]').val(),i=$('input[name="paged"]').val(),r=maxajax.ajax_url,s={action:"mb_button_action",button_action:e,button_id:o,nonce:n};void 0!==i&&(s.paged=i),$.post({url:r,data:s,success:function(t){response=JSON.parse(t),void 0!==response.redirection&&(window.location=response.redirection)},error:function(){console.error("error in button action"+e)}})},maxAdmin.prototype.checkCopyModal=function(t){this.form_updated?t.currentModal.find(".mb-message").show():$(t.currentModal).find(".mb-message").hide()},maxAdmin.prototype.toggle_preview=function(t){$(".output .inner").is(":hidden")?($(".output .inner").show(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up")):($(".output .inner").hide(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-up").addClass("dashicons-arrow-down"))},maxAdmin.prototype.putCSS=function(t,e,a){var o=".maxbutton";if("hover"==(a=a||"both")?o="a.hover ":"normal"==a&&(o="a.normal "),void 0!==t.csspart){var n=t.csspart.split(",");for(i=0;i<n.length;i++){var r=o+" ."+n[i];$(".output .result").find(r).css(t.css,e)}}else $(".output .result").find(o).css(t.css,e)},maxAdmin.prototype.update_color=function(t,a,o){t.preventDefault(),this.saveIndicator(!0);var n=$(t.target);console.log("update_color :: "+o),-1===o.indexOf("#")&&o.indexOf("rgba")<0&&(o="#"+o,$("#"+i).val(o));var i=n.attr("id");if(""==$(n).val()?($(n).parents(".mbcolor").find(".wp-color-result").children(".the_color").css("background-image","url("+maxadmin_settings.icon_transparent+")"),void 0!==t.type&&"change"==t.type&&this.update_color(e,null,"rgba(0,0,0,0)")):$(n).parents(".mbcolor").find(".wp-color-result").children(".the_color").css("background-image","none"),-1!==i.indexOf("box_shadow"))this.updateBoxShadow(n);else if(-1!==i.indexOf("text_shadow"))this.updateTextShadow(n);else if(-1!==i.indexOf("gradient"))-1==i.indexOf("hover")?this.updateGradient():this.updateGradient(!0);else{if("button_preview"!=i){var r=this.fields[i],s="normal";return void 0!==r.pseudo&&(s=r.pseudo),void this.putCSS(r,o,s)}o.indexOf("rgba"),$(".output .result").css("backgroundColor",o)}},maxAdmin.prototype.copyColor=function(t){t.preventDefault(),t.stopPropagation();var e=$(t.target),a=$(t.target).parents("[data-bind]"),o="#"+a.data("id"),n="#"+a.data("bind");if(e.hasClass("arrow-right"))i="right";else var i="left";if(a.hasClass("right"))r="left";else var r="right";"left"==r?copy="right"==i:"right"==r&&(copy="right"!=i),copy?($(n).val($(o).val()),$(n).trigger("change"),$(n).wpColorPicker("color",$(o).val())):($(o).val($(n).val()),$(o).trigger("change"),$(o).wpColorPicker("color",$(n).val()))},maxAdmin.prototype.updateGradient=function(t){var e="";(t=t||!1)&&(e="_hover");var a=parseInt($("#gradient_stop").val());isNaN(a)&&(a=45);var o=$("#use_gradient").prop("checked"),n=$("#gradient_start_color"+e).val(),i=$("#gradient_end_color"+e).val();""==n&&(n="rgba(0,0,0,0)"),""==i&&(i="rgba(0,0,0,0)");var r=this.hexToRgb(n),s=this.hexToRgb(i),d=parseInt($("#gradient_start_opacity"+e).val()),l=parseInt($("#gradient_end_opacity"+e).val());if(o||(s=r,l=d),isNaN(d)&&(d=100),isNaN(l)&&(l=100),t)p=$(".output .result").find("a.hover");else var p=$(".output .result").find("a.normal");if(r.indexOf("rgba")<0)c="rgba("+r+","+d/100+") ";else var c=r;if(s.indexOf("rgba")<0)u="rgba("+s+","+l/100+") ";else var u=s;console.log(r.indexOf("rgba")+" "+r+" "+c+" "+u),p.css("background","linear-gradient("+c+a+"%,"+u+")")},maxAdmin.prototype.hexToRgb=function(t){if(t.indexOf("rgba")>=0)return t;t=t.replace("#","");var e=parseInt(t,16);return(e>>16&255)+","+(e>>8&255)+","+(255&e)},maxAdmin.prototype.updateBoxShadow=function(t){t=t||null;var e=$("#box_shadow_offset_left").val(),a=$("#box_shadow_offset_top").val(),o=$("#box_shadow_width").val(),n=$("#box_shadow_spread").val(),i=$("#box_shadow_color").val(),r=$("#box_shadow_color_hover").val();""==i&&(i="rgba(0,0,0,0)"),""==r&&(r="rgba(0,0,0,0)"),$(".output .result").find("a.normal").css("boxShadow",e+"px "+a+"px "+o+"px "+n+"px "+i),$(".output .result").find("a.hover").css("boxShadow",e+"px "+a+"px "+o+"px "+n+"px "+r)},maxAdmin.prototype.updateTextShadow=function(t,e){e=e||!1;var a=$("#text_shadow_offset_left").val(),o=$("#text_shadow_offset_top").val(),n=$("#text_shadow_width").val(),i=$("#text_shadow_color").val(),r=$("#text_shadow_color_hover").val(),s=$(t).attr("id"),d=this.fields[s];d.css="textShadow",""==i&&(i="rgba(0,0,0,0)"),""==r&&(r="rgba(0,0,0,0)");var l=a+"px "+o+"px "+n+"px "+i;this.putCSS(d,l,"normal"),l=a+"px "+o+"px "+n+"px "+r,this.putCSS(d,l,"hover")},maxAdmin.prototype.updateAnchorText=function(t){0===$(".output .result").find("a .mb-text").length&&($(".output .result").find("a").append('<span class="mb-text"></span>'),$(".output .result").find("a .mb-text").css({display:"block","line-height":"1em","box-sizing":"border-box"}),this.repaint_preview()),$(".output .result").find("a .mb-text").text(t.val())},maxAdmin.prototype.updateGradientOpacity=function(t){this.updateGradient(!0),this.updateGradient(!1)},maxAdmin.prototype.updateDimension=function(t){var e=$(t).val(),a=$(t).attr("id"),o=this.fields[a];e>0?this.putCSS(o,e):this.putCSS(o,"auto")},maxAdmin.prototype.updateRadius=function(t){var e=t.val(),a=["radius_bottom_left","radius_bottom_right","radius_top_left","radius_top_right"];if("lock"==$("#radius_toggle").data("lock"))for(i=0;i<a.length;i++){o=a[i];$("#"+o).val(e);n=this.fields[o];this.putCSS(n,e+"px")}else{var e=$(t).val(),o=$(t).attr("id"),n=this.fields[o];this.putCSS(n,e)}},maxAdmin.prototype.toggleRadiusLock=function(t){var e=$(t.target),a=$(e).data("lock");"lock"==a?($(e).removeClass("dashicons-lock").addClass("dashicons-unlock"),$(e).data("lock","unlock")):"unlock"==a&&($(e).removeClass("dashicons-unlock").addClass("dashicons-lock"),$(e).data("lock","lock"))},maxAdmin.prototype.initResponsive=function(){window.maxFoundry.maxadmin.responsive=new mbResponsive,window.maxFoundry.maxadmin.responsive.init(this)},maxAdmin.prototype.do_paging=function(t){var e=parseInt($(t.target).val());if(e<=parseInt($(t.target).attr("max"))){var a=$(t.target).data("url");window.location=a+"&paged="+e}},maxAdmin.prototype.toggleShortcode=function(t){$(".shortcode-expand").hasClass("closed")?($(" .mb-message.shortcode .expanded").css("display","inline-block"),$(".shortcode-expand span").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up"),$(".shortcode-expand").removeClass("closed").addClass("open")):($(" .mb-message.shortcode .expanded").css("display","none"),$(".shortcode-expand span").addClass("dashicons-arrow-down").removeClass("dashicons-arrow-up"),$(".shortcode-expand").addClass("closed").removeClass("open"))},maxAdmin.prototype.toggleManual=function(t){t.preventDefault();var e=$(t.target),a=e.data("target"),o=$('.manual-entry[data-manual="'+a+'"]');if(o.is(":visible"))return o.hide(),!0;var n=e.parents(".option-container");o.css("top","0px"),o.css("right","-25%"),o.prependTo(n),o.show()},maxAdmin.prototype.resetConditionals=function(){$("[data-show], [data-has]").each(function(){var t=$(this).data("show");if(void 0===t&&(t=$(this).data("has")),void 0!==t){var e=t.target;$(document).off("change",'[name="'+e+'"]')}else console.error($(this)+"has a improperly set conditional")})},maxAdmin.prototype.initConditionials=function(){var t=this;this.resetConditionals(),$("[data-show]").each(function(){var e=$(this).data("show"),a=e.target,o=e.values;$(document).on("change",'[name="'+a+'"]',{child:this,values:o},$.proxy(t.updateConditional,t)),$('[name="'+a+'"]').length>1?$('[name="'+a+'"]:checked').trigger("change",["conditional"]):$('[name="'+a+'"]').trigger("change",["conditional"])});var e=[];$("[data-has]").each(function(){var a=$(this).data("has"),o=a.target,n=a.values;$('[name="'+o+'"]').on("change",{target:o,child:this,values:n},$.proxy(t.updateHasConditional,t));var i='[name="'+o+'"]';$.inArray(i,e),e.push(i)}),e.length>0&&$(e.toString()).first().trigger("change",["conditional"])},maxAdmin.prototype.updateConditional=function(t){var e=t.data,a=e.values,o=e.child,n=$(t.currentTarget),i=$(n).val();if("checkbox"===n.attr("type")){var r=$(n).prop("checked");i="checked"==a&&r?"checked":"unchecked"!=a||r?0:"unchecked"}a.indexOf(i)>=0?($(o).fadeIn("fast"),$(o).find("input, select").trigger("change")):($(o).fadeOut("fast"),$(o).find("input, select").trigger("change"))},maxAdmin.prototype.updateHasConditional=function(t){var e=t.data,a=e.values,o=e.child,n=e.target,i=[];$(a).each(function(t){i.push("[value="+this+"]")}),$('[name="'+n+'"]').filter(i.toString()).length>0?$(o).fadeIn("fast"):$(o).fadeOut("fast")},maxAdmin.prototype.updateRange=function(t){if(void 0===t||null===t)e=$('input[type="range"]');else var e=[t.target];$(e).each(function(){var t=$(this).val();$(this).parents(".input").find(".range_value output").val(t+"%")})},maxAdmin.prototype.saveIndicator=function(t){this.form_updated=!!t},maxAdmin.prototype.formAjaxSave=function(t){t.preventDefault();var e=mb_ajax.ajaxurl,a=$(t.target).serialize();$.ajax({type:"POST",url:e,data:a}).done($.proxy(this.saveDone,this))},maxAdmin.prototype.saveDone=function(t){$("[data-form]").prop("disabled",!1);var e=$.parseJSON(t),a=e.result,o=e.title,n=e.data.id;if(void 0!==e.data.new_nonce){e.data.new_nonce;$('input[name="nonce"]').val(e.data.new_nonce)}if(a){$('input[name="collection_id"]').val(n);var i=window.location.href;-1===i.indexOf("collection_id")&&window.history.replaceState({},"",i+"&collection_id="+n),$(document).trigger("mbFormSaved");var r=$('input[name="sorted"]').val();$('input[name="previous_selection"]').val(r),e.data.reload&&document.location.reload(!0)}a||($modal=window.maxFoundry.maxModal,$modal.newModal("collection_error"),$modal.setTitle(o),$modal.setContent(e.body),$modal.setControls('<button class="modal_close button-primary">'+e.close_text+"</button>"),$modal.show())},maxAdmin.prototype.openURLDialog=function(t){return window.wpActiveEditor="url",wpLink.open(),$("#link-options").hide(),$(".query-results").css("top","70px"),$("#wp-link-submit").off("click keyup change"),$("#wp-link-submit").on("click",$.proxy(this.updateLink,this)),!1},maxAdmin.prototype.updateLink=function(t){t.preventDefault();var e=$("#wp-link-url").val(),a=maxadmin_settings.homeurl;return e=e.replace(a,""),$("#url").val(e),wpLink.close(),!1},maxAdmin.prototype.toggleSidebar=function(t){var e=t.target,a=$(e).parents(".block_sidebar");a.hasClass("active")?a.removeClass("active"):a.addClass("active")};
1
+ function maxAdmin(){}var $=jQuery;maxAdmin.prototype={colorUpdateTime:!0,colorPalettes:!0,fields:null,button_id:null,form_updated:!1,tabs:null},maxAdmin.prototype.init=function(){this.button_id=$('input[name="button_id"]').val(),$(document).on("click",".maxbutton-preview",function(e){e.preventDefault(),e.stopPropagation()}),$("#maxbuttons .input-paging").on("change",$.proxy(this.do_paging,this)),$(".manual-toggle").on("click",$.proxy(this.toggleManual,this)),$(".manual-entry").draggable({cancel:"p, li"}),$(document).on("submit","form.mb_ajax_save",$.proxy(this.formAjaxSave,this)),$(document).on("click","[data-buttonaction]",$.proxy(this.button_action,this)),$(document).on("reInitConditionals",$.proxy(this.initConditionials,this)),this.initConditionials(),$("#maxbuttons").on("change, input",'input[type="range"]',$.proxy(this.updateRange,this)),this.updateRange(null),0!=$("#new-button-form").length&&(this.button_id>0&&$("#maxbuttons .mb-message").show(),$(document).on("livePreviewUpdate",$.proxy(this.saveIndicator,this)),$(".screen-option").on("click",$.proxy(this.change_screen_event,this)),$(".remove-screen").on("click",$.proxy(this.remove_screen,this)),$("#maxbuttons .output").draggable({cancel:".nodrag"}),$(".iris-picker-inner .iris-square-value").removeAttr("href"),$(document).on("click",".iris-picker-inner .iris-square-value",function(e){return e.preventDefault(),e.stopPropagation(),!1}),$(".input.mbcolor .arrows").on("click",$.proxy(this.copyColor,this)),$('[id$="radius_toggle"]').on("click",$.proxy(this.toggleRadiusLock,this)),$(".output .preview-toggle").on("click",$.proxy(this.toggle_preview,this)),$("#maxbuttons input.mb-color-field").on("focus",$.proxy(this.select_field,this)),$(window).on("beforeunload",$.proxy(function(){if(this.form_updated)return maxajax.leave_page},this)),$(document).on("keyup","input",function(e){if(e.keyCode&&13==e.keyCode)return $(":input")[$(":input").index(document.activeElement)+1].focus(),!1}),$(".button-save").click($.proxy(function(e){return this.saveIndicator(null,!1),"new_add_screen"==$(e.target).attr("id")&&$("#add_new_screen").val("yes"),$("#new-button-form").submit(),!1},this)),$(".shortcode-expand").on("click",this.toggleShortcode),$("#url_button").on("click",$.proxy(this.openURLDialog,this)),$(".block_sidebar .open_control").on("click",this.toggleSidebar),$(window).on("maxbuttons-js-init-done",$.proxy(this.loadLivePreview,this)),1==$('input[name="button_is_new"]').val()&&this.saveIndicator(null,!0))},maxAdmin.prototype.loadLivePreview=function(){if("function"==typeof window.maxFoundry.livePreview?(this.livePreview=new window.maxFoundry.livePreview,this.livePreview.init(),$(document).trigger("livepreview-loaded")):alert("Live Preview not loaded, button preview not functional"),void 0!==window.location.hash&&window.location.hash.length>0){var e=window.location.hash.replace("#","");this.change_screen(e)}},maxAdmin.prototype.change_screen_event=function(e){e.preventDefault();var t=$(e.target);void 0===t.data("screenid")&&(t=t.parents(".screen-option"));var o=t.data("screenid");void 0!==o&&this.change_screen(o)},maxAdmin.prototype.change_screen=function(e){var t=$(".screen-option.option-active").data("screenid"),o=$('.screen-option[data-screenid="'+e+'"]');"new"!=e&&$("#current_screen").val(e),t!==e&&(window.location.hash=e,$(".screen-option").removeClass("option-active"),o.addClass("option-active"),$(document).trigger("changed_screen",e),$(".mbscreen-editor").removeClass("current-screen"),$("#screen_"+e).addClass("current-screen"))},maxAdmin.prototype.remove_screen=function(e){if(confirm(maxadmin_settings.remove_confirm)){var t=$(e.target),o=t.parents(".mbscreen-editor").data("screenid");t.parents(".mbscreen-editor").remove(),$('.screen-option[data-screenid="'+o+'"]').remove(),$('input[name="screens[]"][value="'+o+'"]').remove(),$(".removed-note").show(),this.change_screen("default"),this.saveIndicator(null,!0)}},maxAdmin.prototype.toggle_preview=function(e){$(".output .inner").is(":hidden")?($(".output .inner").show(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up")):($(".output .inner").hide(),$(".output").css("height","auto"),$(".preview .preview-toggle").removeClass("dashicons-arrow-up").addClass("dashicons-arrow-down"))},maxAdmin.prototype.select_field=function(e){$(e.target).select()},maxAdmin.prototype.button_action=function(e){e.preventDefault();var t=$(e.target).data("buttonaction"),o=$(e.target).data("confirm");if(this.form_updated=!1,void 0!==o){if(!window.confirm(o))return}var a=$(e.target).data("buttonid"),n=$('input[name="'+t+'_nonce"]').val(),i=$('input[name="paged"]').val(),r=maxajax.ajax_url,s={action:"mb_button_action",button_action:t,button_id:a,nonce:n};void 0!==i&&(s.paged=i),$.post({url:r,data:s,success:function(e){response=JSON.parse(e),void 0!==response.redirection&&(window.location=response.redirection)},error:function(){console.error("error in button action"+t)}})},maxAdmin.prototype.checkCopyModal=function(e){this.form_updated?e.currentModal.find(".mb-message").show():$(e.currentModal).find(".mb-message").hide()},maxAdmin.prototype.copyColor=function(e){e.preventDefault(),e.stopPropagation();var t=$(e.target),o=$(e.target).parents("[data-bind]"),a="#"+o.data("id"),n="#"+o.data("bind");if(t.hasClass("arrow-right"))i="right";else var i="left";if(o.hasClass("right"))r="left";else var r="right";"left"==r?copy="right"==i:"right"==r&&(copy="right"!=i),copy?($(n).val($(a).val()),$(n).trigger("change"),$(n).wpColorPicker("color",$(a).val())):($(a).val($(n).val()),$(a).trigger("change"),$(a).wpColorPicker("color",$(n).val()))},maxAdmin.prototype.toggleRadiusLock=function(e){var t=$(e.target),o=$(t).data("lock");"lock"==o?($(t).removeClass("dashicons-lock").addClass("dashicons-unlock"),$(t).data("lock","unlock")):"unlock"==o&&($(t).removeClass("dashicons-unlock").addClass("dashicons-lock"),$(t).data("lock","lock"))},maxAdmin.prototype.initResponsive=function(){},maxAdmin.prototype.do_paging=function(e){var t=parseInt($(e.target).val());if(t<=parseInt($(e.target).attr("max"))){var o=$(e.target).data("url");window.location=o+"&paged="+t}},maxAdmin.prototype.toggleShortcode=function(e){$(".shortcode-expand").hasClass("closed")?($(" .mb-message.shortcode .expanded").css("display","inline-block"),$(".shortcode-expand span").removeClass("dashicons-arrow-down").addClass("dashicons-arrow-up"),$(".shortcode-expand").removeClass("closed").addClass("open")):($(" .mb-message.shortcode .expanded").css("display","none"),$(".shortcode-expand span").addClass("dashicons-arrow-down").removeClass("dashicons-arrow-up"),$(".shortcode-expand").addClass("closed").removeClass("open"))},maxAdmin.prototype.toggleManual=function(e){e.preventDefault();var t=$(e.target),o=t.data("target"),a=$('.manual-entry[data-manual="'+o+'"]');if(a.is(":visible"))return a.hide(),!0;var n=t.parents(".option-container");a.css("top","0px"),a.css("right","-25%"),a.prependTo(n),a.show()},maxAdmin.prototype.resetConditionals=function(){$("[data-show], [data-has]").each(function(){var e=$(this).data("show");if(void 0===e&&(e=$(this).data("has")),void 0!==e){var t=e.target;$(document).off("change",'[name="'+t+'"]')}else console.error($(this)+"has a improperly set conditional")})},maxAdmin.prototype.initConditionials=function(){var e=this;this.resetConditionals(),$("[data-show]").each(function(){var t=$(this).data("show"),o=t.target,a=t.values;$(document).on("change",'[name="'+o+'"]',{child:this,values:a},$.proxy(e.updateConditional,e)),$('[name="'+o+'"]').length>1?$('[name="'+o+'"]:checked').trigger("change",["conditional"]):$('[name="'+o+'"]').trigger("change",["conditional"])});var t=[];$("[data-has]").each(function(){var o=$(this).data("has"),a=o.target,n=o.values;$('[name="'+a+'"]').on("change",{target:a,child:this,values:n},$.proxy(e.updateHasConditional,e));var i='[name="'+a+'"]';$.inArray(i,t),t.push(i)}),t.length>0&&$(t.toString()).first().trigger("change",["conditional"])},maxAdmin.prototype.updateConditional=function(e){var t=e.data,o=t.values,a=t.child,n=$(e.currentTarget),i=$(n).val();if("checkbox"===n.attr("type")){var r=$(n).prop("checked");i="checked"==o&&r?"checked":"unchecked"!=o||r?0:"unchecked"}o.indexOf(i)>=0?($(a).fadeIn("fast"),$(a).find("input, select").trigger("change")):($(a).fadeOut("fast"),$(a).find("input, select").trigger("change"))},maxAdmin.prototype.updateHasConditional=function(e){var t=e.data,o=t.values,a=t.child,n=t.target,i=[];$(o).each(function(e){i.push("[value="+this+"]")}),$('[name="'+n+'"]').filter(i.toString()).length>0?$(a).fadeIn("fast"):$(a).fadeOut("fast")},maxAdmin.prototype.updateRange=function(e){if(void 0===e||null===e)t=$('input[type="range"]');else var t=[e.target];$(t).each(function(){var e=$(this).val();$(this).parents(".input").find(".range_value output").val(e+"%")})},maxAdmin.prototype.saveIndicator=function(e,t){t?(this.form_updated=!0,$(".button-save").removeClass("disabled").addClass("button-primary")):(this.form_updated=!1,$(".button-save").addClass("disabled").removeClass("button-primary"))},maxAdmin.prototype.formAjaxSave=function(e){e.preventDefault();var t=mb_ajax.ajaxurl,o=$(e.target).serialize();$.ajax({type:"POST",url:t,data:o}).done($.proxy(this.saveDone,this))},maxAdmin.prototype.saveDone=function(e){$("[data-form]").prop("disabled",!1);var t=$.parseJSON(e),o=t.result,a=t.title,n=t.data.id;if(void 0!==t.data.new_nonce){t.data.new_nonce;$('input[name="nonce"]').val(t.data.new_nonce)}if(o){$('input[name="collection_id"]').val(n);var i=window.location.href;-1===i.indexOf("collection_id")&&window.history.replaceState({},"",i+"&collection_id="+n),$(document).trigger("mbFormSaved");var r=$('input[name="sorted"]').val();$('input[name="previous_selection"]').val(r),t.data.reload&&document.location.reload(!0)}o||($modal=window.maxFoundry.maxModal,$modal.newModal("collection_error"),$modal.setTitle(a),$modal.setContent(t.body),$modal.setControls('<button class="modal_close button-primary">'+t.close_text+"</button>"),$modal.show())},maxAdmin.prototype.openURLDialog=function(e){return window.wpActiveEditor="url",wpLink.open(),$("#link-options").hide(),$(".query-results").css("top","70px"),$("#wp-link-submit").off("click keyup change"),$("#wp-link-submit").on("click",$.proxy(this.updateLink,this)),!1},maxAdmin.prototype.updateLink=function(e){e.preventDefault();var t=$("#url").val(),o=$("#wp-link-url").val(),a=maxadmin_settings.homeurl;return o=o.replace(a,""),$("#url").val(o),t!=o&&$(document).trigger("livePreviewUpdate",!0),wpLink.close(),!1},maxAdmin.prototype.toggleSidebar=function(e){var t=e.target,o=$(t).parents(".block_sidebar");o.hasClass("active")?o.removeClass("active"):o.addClass("active")};
js/min/media_button.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(t){function o(){"object"!=typeof window.maxFoundry.maxmodal&&(window.maxFoundry.maxmodal=new maxModal,window.maxFoundry.maxmodal.init()),"object"!=typeof window.maxFoundry.maxAjax&&(window.maxFoundry.maxAjax=new maxAjax,window.maxFoundry.maxAjax.init()),this.maxmodal=window.maxFoundry.maxmodal,this.maxajax=window.maxFoundry.maxAjax}$=t,(o.prototype={parent:"body",is_active:!1,maxmodal:null,maxajax:null,callback:null,useShortCodeOptions:!0,shortcodeData:null,getPage:1,ajaxSuccessHandler:null}).init=function(t){void 0!==t&&(void 0!==t.callback&&(this.callback=t.callback||null),void 0!==t.useShortCodeOptions&&(this.useShortCodeOptions=t.useShortCodeOptions),void 0!==t.parent&&(this.parent=t.parent)),this.ajaxSuccessHandler=$.proxy(this.putContent,this),$(document).off("click",".pagination span, .pagination-links a",$.proxy(this.doPagination,this)),$(document).on("click",".pagination span, .pagination-links a",$.proxy(this.doPagination,this)),$(document).off("media_button_content_buttons_load",$.proxy(this.hookButtonAction,this)),$(document).on("media_button_content_buttons_load",$.proxy(this.hookButtonAction,this)),$(document).off("media_button_content_shortcode_options",$.proxy(this.hookShortCodeAction,this)),$(document).on("media_button_content_shortcode_options",$.proxy(this.hookShortCodeAction,this))},o.prototype.openModal=function(){this.maxmodal.newModal("media-popup"),this.maxmodal.parent=this.parent,this.maxmodal.setTitle(mbtrans.windowtitle),this.maxmodal.setContent('<span class="loading"></span>'),this.maxmodal.show(),this.maxajax.showSpinner($(".loading")),this.loadButtons(),this.is_active=!0},o.prototype.loadButtons=function(){var t=this.maxajax.ajaxInit();t.plugin_action="getAjaxButtons",t.page=this.getPage,this.maxajax.ajaxPost(t,this.ajaxSuccessHandler)},o.prototype.putContent=function(t){t=JSON.parse(t);this.maxajax.removeSpinner(),void 0!==t.output&&this.maxmodal.setContent(t.output),void 0!==t.action&&$(document).trigger("media_button_content_"+t.action,t)},o.prototype.hookButtonAction=function(){$(document).off("click",".button-list"),$(document).on("click",".button-list",$.proxy(function(t){var o=$(t.target);void 0===$(o).data("button")&&(o=$(o).parents(".button-list"));var a=$(o).data("button");$(".button-list").removeClass("selected"),$(o).addClass("selected"),$(".controls .button-primary").data("button",a),this.maxmodal.currentModal.find(".controls .button-primary").removeClass("disabled")},this)),$(document).off("click",".button-preview a"),$(document).on("click",".button-preview a",function(t){t.preventDefault()}),this.maxmodal.resetControls(),this.useShortCodeOptions?this.maxmodal.addControl(mbtrans.use,"",$.proxy(this.shortCodeOptions,this)):this.maxmodal.addControl(mbtrans.insert,"",$.proxy(this.selectAction,this)),this.maxmodal.setControls(),this.maxmodal.currentModal.find(".controls .button-primary").addClass("disabled"),this.maxmodal.checkResize()},o.prototype.hookShortCodeAction=function(t,o){this.shortcodeData=o.shortcodeData;var a=o.button_id;this.maxmodal.resetControls(),this.maxmodal.addControl(mbtrans.insert,"",$.proxy(this.selectAction,this)),this.maxmodal.setControls(),$(this.maxmodal.currentModal).find(".controls .button-primary").data("button",a),$(this.maxmodal.currentModal).find(".more-options a").off("click"),$(this.maxmodal.currentModal).find(".more-options a").on("click",$.proxy(function(t){$(this.maxmodal.currentModal).find(".more-field").show(),$(t.target).parents(".option .more").hide(),this.maxmodal.checkResize()},this)),this.maxmodal.checkResize()},o.prototype.selectAction=function(t){if(t.preventDefault(),!$(t.target).hasClass("disabled")){var o=$(t.target).data("button");void 0===o||parseInt(o)<=0||("function"==typeof this.callback?this.callback(o,$(t.target)):(this.buttonToEditor(o),this.close()))}},o.prototype.shortCodeOptions=function(t){if(t.preventDefault(),!$(t.target).hasClass("disabled")){var o=$(t.target).data("button"),a=this.maxajax.ajaxInit();a.plugin_action="mediaShortcodeOptions",a.button_id=o,this.maxajax.ajaxPost(a,this.ajaxSuccessHandler)}},o.prototype.doPagination=function(t){if(t.preventDefault(),$(t.target).hasClass("disabled"))return!1;var o=$(t.target).data("page");o<=1&&(o=1),this.getPage=o,this.loadButtons()},o.prototype.generateShortcode=function(t){var o='[maxbutton id="'+t+'"';return void 0!==this.shortcodeData&&$(this.shortcodeData).each(function(t,a){var n=$('input[name="'+a.name+'"]'),i=$('input[name="'+a.name+'"]').val();if("checkbox"==n.attr("type")){var e=n.is(":checked");e!=a.original&&(o+=e?" "+a.shortcode+'="'+a.checked+'"':" "+a.shortcode+'="'+a.unchecked+'"')}else i!=a.original&&(o+=" "+a.shortcode+'="'+i+'"')}),o+=" ] "},o.prototype.buttonToEditor=function(t){shortcode=this.generateShortcode(t),window.send_to_editor(shortcode,t)},o.prototype.close=function(){this.maxmodal.close()},void 0===window.maxFoundry&&(window.maxFoundry={}),window.maxFoundry.maxMedia=o});
1
+ jQuery(document).ready(function(t){function o(){"object"!=typeof window.maxFoundry.maxmodal&&(window.maxFoundry.maxmodal=new maxModal,window.maxFoundry.maxmodal.init()),"object"!=typeof window.maxFoundry.maxAjax&&(window.maxFoundry.maxAjax=new maxAjax,window.maxFoundry.maxAjax.init()),this.maxmodal=window.maxFoundry.maxmodal,this.maxajax=window.maxFoundry.maxAjax}$=t,(o.prototype={parent:"body",is_active:!1,maxmodal:null,maxajax:null,callback:null,useShortCodeOptions:!0,shortcodeData:null,getPage:1,ajaxSuccessHandler:null}).init=function(t){void 0!==t&&(void 0!==t.callback&&(this.callback=t.callback||null),void 0!==t.useShortCodeOptions&&(this.useShortCodeOptions=t.useShortCodeOptions),void 0!==t.parent&&(this.parent=t.parent)),this.ajaxSuccessHandler=$.proxy(this.putContent,this),$(document).off("click",".pagination span, .pagination-links a",$.proxy(this.doPagination,this)),$(document).on("click",".pagination span, .pagination-links a",$.proxy(this.doPagination,this)),$(document).off("change",".pagination-links .input-paging",$.proxy(this.doInputPagination,this)),$(document).on("change",".pagination-links .input-paging",$.proxy(this.doInputPagination,this)),$(document).off("media_button_content_buttons_load",$.proxy(this.hookButtonAction,this)),$(document).on("media_button_content_buttons_load",$.proxy(this.hookButtonAction,this)),$(document).off("media_button_content_shortcode_options",$.proxy(this.hookShortCodeAction,this)),$(document).on("media_button_content_shortcode_options",$.proxy(this.hookShortCodeAction,this))},o.prototype.openModal=function(){this.maxmodal.newModal("media-popup"),this.maxmodal.parent=this.parent,this.maxmodal.setTitle(mbtrans.windowtitle),this.maxmodal.setContent('<span class="loading"></span>'),this.maxmodal.show(),this.maxajax.showSpinner($(".loading")),this.loadButtons(),this.is_active=!0},o.prototype.loadButtons=function(){var t=this.maxajax.ajaxInit();t.plugin_action="getAjaxButtons",t.page=this.getPage,this.maxajax.ajaxPost(t,this.ajaxSuccessHandler)},o.prototype.putContent=function(t){t=JSON.parse(t);this.maxajax.removeSpinner(),void 0!==t.output&&this.maxmodal.setContent(t.output),void 0!==t.action&&$(document).trigger("media_button_content_"+t.action,t)},o.prototype.hookButtonAction=function(){$(document).off("click",".button-list"),$(document).on("click",".button-list",$.proxy(function(t){var o=$(t.target);void 0===$(o).data("button")&&(o=$(o).parents(".button-list"));var a=$(o).data("button");$(".button-list").removeClass("selected"),$(o).addClass("selected"),$(".controls .button-primary").data("button",a),this.maxmodal.currentModal.find(".controls .button-primary").removeClass("disabled")},this)),$(document).off("click",".button-preview a"),$(document).on("click",".button-preview a",function(t){t.preventDefault()}),this.maxmodal.resetControls(),this.useShortCodeOptions?this.maxmodal.addControl(mbtrans.use,"",$.proxy(this.shortCodeOptions,this)):this.maxmodal.addControl(mbtrans.insert,"",$.proxy(this.selectAction,this)),this.maxmodal.setControls(),this.maxmodal.currentModal.find(".controls .button-primary").addClass("disabled"),this.maxmodal.checkResize()},o.prototype.hookShortCodeAction=function(t,o){this.shortcodeData=o.shortcodeData;var a=o.button_id;this.maxmodal.resetControls(),this.maxmodal.addControl(mbtrans.insert,"",$.proxy(this.selectAction,this)),this.maxmodal.setControls(),$(this.maxmodal.currentModal).find(".controls .button-primary").data("button",a),$(this.maxmodal.currentModal).find(".more-options a").off("click"),$(this.maxmodal.currentModal).find(".more-options a").on("click",$.proxy(function(t){$(this.maxmodal.currentModal).find(".more-field").show(),$(t.target).parents(".option .more").hide(),this.maxmodal.checkResize()},this)),this.maxmodal.checkResize()},o.prototype.selectAction=function(t){if(t.preventDefault(),!$(t.target).hasClass("disabled")){var o=$(t.target).data("button");void 0===o||parseInt(o)<=0||("function"==typeof this.callback?this.callback(o,$(t.target)):(this.buttonToEditor(o),this.close()))}},o.prototype.shortCodeOptions=function(t){if(t.preventDefault(),!$(t.target).hasClass("disabled")){var o=$(t.target).data("button"),a=this.maxajax.ajaxInit();a.plugin_action="mediaShortcodeOptions",a.button_id=o,this.maxajax.ajaxPost(a,this.ajaxSuccessHandler)}},o.prototype.doInputPagination=function(t){t.preventDefault();var o=$(t.target),a=parseInt(o.data("current")),n=parseInt(o.val()),i=parseInt(o.attr("max"));n!=a&&n>=1&&n<=i&&(this.getPage=n,this.loadButtons())},o.prototype.doPagination=function(t){if(t.preventDefault(),$(t.target).hasClass("disabled"))return!1;var o=$(t.target).data("page");o<=1&&(o=1),this.getPage=o,this.loadButtons()},o.prototype.generateShortcode=function(t){var o='[maxbutton id="'+t+'"';return void 0!==this.shortcodeData&&$(this.shortcodeData).each(function(t,a){var n=$('input[name="'+a.name+'"]'),i=$('input[name="'+a.name+'"]').val();if("checkbox"==n.attr("type")){var e=n.is(":checked");e!=a.original&&(o+=e?" "+a.shortcode+'="'+a.checked+'"':" "+a.shortcode+'="'+a.unchecked+'"')}else i!=a.original&&(o+=" "+a.shortcode+'="'+i+'"')}),o+=" ] "},o.prototype.buttonToEditor=function(t){shortcode=this.generateShortcode(t),window.send_to_editor(shortcode,t)},o.prototype.close=function(){this.maxmodal.close()},void 0===window.maxFoundry&&(window.maxFoundry={}),window.maxFoundry.maxMedia=o});
js/responsive.js DELETED
@@ -1,177 +0,0 @@
1
-
2
- function mbResponsive()
3
- {
4
-
5
- }
6
-
7
- mbResponsive.prototype = {
8
- mbAdmin: null,
9
- responsiveMap: null,
10
- }
11
-
12
- mbResponsive.prototype.init = function (mbAdmin)
13
- {
14
-
15
- this.mbAdmin = mbAdmin;
16
-
17
- if ($('#new-button-form').length == 0) // Don't load outside button editor
18
- return;
19
-
20
- this.checkAutoQuery();
21
-
22
- $('input[name="auto_responsive"]').on('click', $.proxy(this.checkAutoQuery,this));
23
- $('.add_media_query').on('click', $.proxy(this.addMediaQuery, this));
24
-
25
- this.responsiveMap = JSON.parse(responsiveMap);
26
-
27
- $(document).on('click', '.removebutton', $.proxy(this.removeMediaQuery, this));
28
- //$(document).on('click', '.responsive_preview', $.proxy(this.toggleResponsivePreview, this));
29
-
30
- }
31
-
32
- mbResponsive.prototype.checkAutoQuery = function()
33
- {
34
-
35
- if ( $('input[name="auto_responsive"]').is(':checked') )
36
- {
37
-
38
- $('.media_queries_options').hide();
39
- $('.option-design.new-query').hide();
40
- }
41
- else
42
- {
43
- $('.media_queries_options').show();
44
- $('.option-design.new-query').show();
45
- }
46
- }
47
-
48
- mbResponsive.prototype.addMediaQuery = function()
49
- {
50
-
51
- this.mbAdmin.saveIndicator(true);
52
- var new_option = $('.media_option_prot').children().clone();
53
-
54
- var new_query = $("#new_query").val();
55
- var new_title = $("#new_query :selected").text();
56
- var new_desc = $("#media_desc").children('#' + new_query).text();
57
-
58
- $(new_option).data('query', new_query);
59
- $(new_option).children('input[name="media_query[]"]').val(new_query);
60
- $(new_option).children('.title').text(new_title);
61
- $(new_option).children('.description').text(new_desc);
62
-
63
- if (new_query == 'custom')
64
- {
65
-
66
- $(new_option).find('.custom').removeClass('hidden');
67
- }
68
-
69
- var new_index = $('input[name="next_media_index"]').val();
70
-
71
- // rename new field to the proper ID
72
- $(new_option).find('label, select, input').each(function () {
73
-
74
- var name = $(this).attr('name');
75
- var id = $(this).attr('id');
76
- var data = $(this).data('field');
77
- var tagname = $(this).prop('tagName').toLowerCase();
78
-
79
- if (typeof id !== 'undefined')
80
- $(this).attr('id', id.replace('[]','[' + new_index + ']'));
81
- if (typeof name !== 'undefined')
82
- $(this).attr('name', name.replace('[]','[' + new_index + ']'));
83
- if (typeof data !== 'undefined')
84
- $(this).data('field', data.replace('[]','[' + new_index + ']'));
85
- if (tagname == 'label')
86
- {
87
- var attrfor = $(this).attr('for');
88
- if ( typeof attrfor != 'undefined')
89
- $(this).attr('for', attrfor.replace('[]','[' + new_index + ']'));
90
- }
91
-
92
- })
93
-
94
- $(document).trigger('reinitConditionals');
95
-
96
- new_index = parseInt(new_index);
97
-
98
- $('input[name="next_media_index"]').val( (new_index+1) );
99
-
100
- if (new_query !== 'custom')
101
- {
102
- $('#new_query :selected').prop('disabled', true);
103
- $('#new_query :selected').prop('selected', false);
104
- }
105
-
106
- $('.new_query_space').append(new_option);
107
-
108
- var pos = $('.new_query_space').offset().top;
109
- $(window).scrollTop( (pos-100) );
110
-
111
- }
112
-
113
- mbResponsive.prototype.removeMediaQuery = function(e)
114
- {
115
- var target = e.target;
116
-
117
- var query = $(target).parents('.media_query').data('query');
118
- $(target).parents('.media_query').fadeOut(function() { $(this).remove() } );
119
-
120
- $('#new_query option[value="' + query + '"]').prop('disabled', false);
121
- }
122
-
123
- mbResponsive.prototype.toggleResponsivePreview = function(e)
124
- {
125
- var target = $(e.target);
126
- var id = target.attr('id')
127
- id = id.replace('mq_preview[','');
128
- id = id.replace(']', '');
129
- this.renderPreview(id);
130
- }
131
-
132
-
133
- mbResponsive.prototype.renderPreview = function (id)
134
- {
135
- var excluded = ['mq_container_width', 'mq_container_float','mq_custom_minwidth','mq_custom_minheight', 'mq_hide'];
136
- var responsiveMap = this.responsiveMap;
137
- var self = this;
138
-
139
- $.each(responsiveMap, function (index) {
140
-
141
- var css = this.css;
142
- var field_pattern = '[id^="' + index + '["]';
143
- var unit_pattern = '[id^="' + index + '_unit["]';
144
- var $field = $(field_pattern).eq(id);
145
-
146
- var field_id = $field.attr('id');
147
- field_id = field_id.replace(/\[[0-9]\]/gi, '');
148
-
149
- if ($.inArray(field_id, excluded) >= 0 )
150
- {
151
- return true; // continue
152
- }
153
- if (field_id.indexOf('_unit') >= 0 )
154
- {
155
- return true;
156
- }
157
-
158
- var value= $field.val();
159
- var unit_val = '';
160
-
161
- if (typeof responsiveMap[index + '_unit'] !== 'undefined')
162
- {
163
- var unit_val = $(unit_pattern).eq(id).val();
164
- }
165
-
166
-
167
- var data = { css: css };
168
- if (css == 'font-size')
169
- {
170
- data.csspart = 'mb-text,mb-text2';
171
- }
172
-
173
- self.mbAdmin.putCSS(data, value + unit_val)
174
-
175
-
176
- });
177
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/maxbuttons-de_DE.mo DELETED
Binary file
languages/maxbuttons-de_DE.po DELETED
@@ -1,1393 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: MaxButtonV3\n"
4
- "POT-Creation-Date: 2015-06-26 16:31+0100\n"
5
- "PO-Revision-Date: 2015-06-26 16:32+0100\n"
6
- "Last-Translator: Roland Stumpp <support@mediaoffice.de>\n"
7
- "Language-Team: mediaOffice GbR <support@mediaoffice.de>\n"
8
- "Language: de_DE\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.3\n"
13
- "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
14
- "X-Poedit-Basepath: .\n"
15
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-SearchPath-0: ..\n"
18
-
19
- #: ../blocks/advanced.php:67
20
- msgid "Advanced"
21
- msgstr "Erweitert"
22
-
23
- #: ../blocks/advanced.php:70
24
- msgid ""
25
- "Adding !important to the button styles can help avoid potential conflicts "
26
- "with your theme styles."
27
- msgstr ""
28
- "Wenn Sie Ihren Style Anweisungen (css) !important hinzufügen vermeiden Sie "
29
- "Konflikte mit der style.css Ihres Themas. "
30
-
31
- #: ../blocks/advanced.php:71
32
- msgid "Use !important"
33
- msgstr "Benutzen Sie !important in der Style Anweisung (css)"
34
-
35
- #: ../blocks/advanced.php:79
36
- msgid ""
37
- "By default, the CSS styles for the button are rendered within a &lt;"
38
- "style&gt; block in the HTML body. Enabling the \"Use External CSS\" option "
39
- "allows you to put the CSS code for the button into your theme stylesheet "
40
- "instead."
41
- msgstr ""
42
- "Standardmäßig werden die CSS Style Anweisungen innerhalb eines &lt;style&gt; "
43
- "Block im HTML body ausgegeben. Wenn Sie \"Nutze Thema Style CSS\" "
44
- "aktivieren, können Sie den CSS Code für Ihre Buttons in die Style CSS Ihres "
45
- "Themas integrieren."
46
-
47
- #: ../blocks/advanced.php:80
48
- msgid "Use External CSS"
49
- msgstr "Verwenden Sie die CSS im Thema"
50
-
51
- #: ../blocks/advanced.php:87
52
- msgid "View CSS"
53
- msgstr "CSS anzeigen"
54
-
55
- #: ../blocks/advanced.php:94
56
- msgid "External CSS"
57
- msgstr "CSS im Thema"
58
-
59
- #: ../blocks/advanced.php:99
60
- msgid ""
61
- "If the \"Use External CSS\" option is enabled for this button, copy and "
62
- "paste the CSS code below into your theme stylesheet."
63
- msgstr ""
64
- "Wenn die Option \"Nutze Thema Style CSS\" aktiviert ist, kopieren Sie den "
65
- "unten stehenden CSS Code in die Style CSS Ihres Themas."
66
-
67
- #: ../blocks/advanced.php:116
68
- msgid "Please save the button first"
69
- msgstr "Bitte den Button zuerst speichern"
70
-
71
- #: ../blocks/basic.php:118
72
- msgid "Basics"
73
- msgstr "Grundsätzliches"
74
-
75
- #: ../blocks/basic.php:121
76
- msgid "Name"
77
- msgstr "Name des Buttons"
78
-
79
- #: ../blocks/basic.php:122
80
- msgid "Something that you can quickly identify the button with."
81
- msgstr ""
82
- "Ein eindeutiger Name, mit dem der Button schnell identifiziert werden kann."
83
-
84
- #: ../blocks/basic.php:130
85
- msgid "Description"
86
- msgstr "Beschreibung"
87
-
88
- #: ../blocks/basic.php:131
89
- msgid "Brief explanation about how and where the button is used."
90
- msgstr "Kurze Beschreibung wie und wo der Button genutzt wird."
91
-
92
- #: ../blocks/basic.php:139
93
- msgid "URL"
94
- msgstr "URL"
95
-
96
- #: ../blocks/basic.php:140
97
- msgid "The link when the button is clicked."
98
- msgstr "Der Link im Button"
99
-
100
- #: ../blocks/basic.php:149
101
- msgid "Open in New Window"
102
- msgstr "In neuem Fenster öffnen"
103
-
104
- #: ../blocks/basic.php:157
105
- msgid "Use rel=\"nofollow\""
106
- msgstr "Verwenden von Rel = \"nofollow\""
107
-
108
- #: ../blocks/border.php:72 ../blocks/color.php:76
109
- msgid "Border"
110
- msgstr "Rahmen"
111
-
112
- #: ../blocks/border.php:75
113
- msgid "Radius"
114
- msgstr "Radius eingeben z. Bsp. (4)"
115
-
116
- #: ../blocks/border.php:80
117
- msgid "Top Left"
118
- msgstr "Oben Links"
119
-
120
- #: ../blocks/border.php:82 ../blocks/border.php:88 ../blocks/border.php:96
121
- #: ../blocks/border.php:102 ../blocks/border.php:122 ../blocks/border.php:129
122
- #: ../blocks/border.php:136 ../blocks/border.php:143 ../blocks/border.php:150
123
- #: ../blocks/gradient.php:58 ../blocks/gradient.php:65
124
- #: ../blocks/gradient.php:72 ../blocks/gradient.php:79
125
- #: ../blocks/gradient.php:86 ../blocks/text.php:148 ../blocks/text.php:166
126
- #: ../blocks/text.php:182 ../blocks/text.php:198 ../blocks/text.php:214
127
- #: ../blocks/text.php:221 ../blocks/text.php:228 ../blocks/text.php:235
128
- #: ../blocks/text.php:250 ../blocks/text.php:256 ../blocks/text.php:264
129
- #: ../blocks/text.php:270
130
- msgid "Default:"
131
- msgstr "Standard:"
132
-
133
- #: ../blocks/border.php:86
134
- msgid "Top Right"
135
- msgstr "Oben Rechts"
136
-
137
- #: ../blocks/border.php:94
138
- msgid "Bottom Left"
139
- msgstr "Unten Links"
140
-
141
- #: ../blocks/border.php:100
142
- msgid "Bottom Right"
143
- msgstr "Unten Rechts"
144
-
145
- #: ../blocks/border.php:112
146
- msgid "Style"
147
- msgstr "Rahmenstil"
148
-
149
- #: ../blocks/border.php:127 ../blocks/container.php:128
150
- msgid "Width"
151
- msgstr "Breite"
152
-
153
- #: ../blocks/border.php:134 ../blocks/text.php:219
154
- msgid "Shadow Offset Left"
155
- msgstr "Schattenabstand Links"
156
-
157
- #: ../blocks/border.php:141 ../blocks/text.php:226
158
- msgid "Shadow Offset Top"
159
- msgstr "Schatten Oben"
160
-
161
- #: ../blocks/border.php:148 ../blocks/text.php:233
162
- msgid "Shadow Width"
163
- msgstr "Schattenbreite"
164
-
165
- #: ../blocks/color.php:72 ../blocks/text.php:121 ../blocks/text.php:126
166
- msgid "Text"
167
- msgstr "Textfeld"
168
-
169
- #: ../blocks/color.php:73
170
- #, php-format
171
- msgid "Text%sShadow"
172
- msgstr "Text% sSchatten"
173
-
174
- #: ../blocks/color.php:74
175
- #, php-format
176
- msgid "Gradient%sStart"
177
- msgstr "Verlauf%sAnfang"
178
-
179
- #: ../blocks/color.php:75
180
- #, php-format
181
- msgid "Gradient%sEnd"
182
- msgstr "Verlauf%sEnde"
183
-
184
- #: ../blocks/color.php:77
185
- #, php-format
186
- msgid "Border%sShadow"
187
- msgstr "Rahmen%sSchatten"
188
-
189
- #: ../blocks/color.php:91
190
- msgid "Colors"
191
- msgstr "Farben"
192
-
193
- #: ../blocks/color.php:105
194
- msgid "Normal"
195
- msgstr "Normal"
196
-
197
- #: ../blocks/color.php:125
198
- msgid "Hover"
199
- msgstr "Maus-Hover (Berührung mit der Maus)"
200
-
201
- #: ../blocks/color.php:150
202
- msgid "Shortcuts"
203
- msgstr "Shortcuts (Kurzbefehle) "
204
-
205
- #: ../blocks/color.php:152
206
- msgid "Copy normal colors to hover"
207
- msgstr "Normal Farben zu Maus Hover kopieren"
208
-
209
- #: ../blocks/color.php:153
210
- msgid "Copy hover colors to normal"
211
- msgstr "Maus-Hover Farben zu Normal kopieren"
212
-
213
- #: ../blocks/color.php:154
214
- msgid "Swap normal and hover colors"
215
- msgstr "Tausche Normal Farben mit Maus-Hover Farben "
216
-
217
- #: ../blocks/color.php:155
218
- msgid "Copy and invert normal colors"
219
- msgstr "Wechsle den Verlauf der Normal Farben (oben > unten) "
220
-
221
- #: ../blocks/container.php:112
222
- msgid "Container"
223
- msgstr "Container"
224
-
225
- #: ../blocks/container.php:115
226
- msgid "Use Container"
227
- msgstr "Einen Container erzeugen"
228
-
229
- #: ../blocks/container.php:121
230
- msgid "Wrap with Center Div"
231
- msgstr "Den Container zentrieren"
232
-
233
- #: ../blocks/container.php:134
234
- msgid "Margin Top"
235
- msgstr "Außenabstand oben"
236
-
237
- #: ../blocks/container.php:140
238
- msgid "Margin Right"
239
- msgstr "Außenabstand rechts"
240
-
241
- #: ../blocks/container.php:146
242
- msgid "Margin Bottom"
243
- msgstr "Außenabstand unten"
244
-
245
- #: ../blocks/container.php:152
246
- msgid "Margin Left"
247
- msgstr "Außenabstand links"
248
-
249
- #: ../blocks/container.php:158
250
- msgid "Alignment"
251
- msgstr "Ausrichtung"
252
-
253
- #: ../blocks/dimension.php:62
254
- msgid "Dimensions"
255
- msgstr "Größe"
256
-
257
- #: ../blocks/dimension.php:65
258
- msgid "Button Width"
259
- msgstr "Button Breite"
260
-
261
- #: ../blocks/dimension.php:70
262
- msgid "Button Height"
263
- msgstr "Button Höhe"
264
-
265
- #: ../blocks/gradient.php:53
266
- msgid "Gradients and Opacity"
267
- msgstr "Verläufe und Transparenz"
268
-
269
- #: ../blocks/gradient.php:56
270
- msgid "Gradient Stop"
271
- msgstr "Verlauf Ende"
272
-
273
- #: ../blocks/gradient.php:63
274
- msgid "Gradient Start Opacity"
275
- msgstr "Verlauf beginnt transparent"
276
-
277
- #: ../blocks/gradient.php:70
278
- msgid "Gradient End Opacity"
279
- msgstr "Verlauf endet transparent"
280
-
281
- #: ../blocks/gradient.php:77
282
- msgid "Gradient Start Opacity Hover"
283
- msgstr "Verlauf beginnt transparent bei Hover (Berührung mit der Maus)"
284
-
285
- #: ../blocks/gradient.php:84
286
- msgid "Gradient End Opacity Hover"
287
- msgstr "Verlauf endet transparent bei Hover (Berührung mit der Maus)"
288
-
289
- #: ../blocks/responsive.php:177
290
- msgid "px"
291
- msgstr "px"
292
-
293
- #: ../blocks/responsive.php:178
294
- msgid "%"
295
- msgstr "%"
296
-
297
- #: ../blocks/responsive.php:182
298
- msgid "None"
299
- msgstr "Keine"
300
-
301
- #: ../blocks/responsive.php:183 ../blocks/text.php:262
302
- msgid "Left"
303
- msgstr "Links"
304
-
305
- #: ../blocks/responsive.php:184 ../blocks/text.php:268
306
- msgid "Right"
307
- msgstr "Rechts"
308
-
309
- #: ../blocks/responsive.php:201
310
- msgid "Responsive Settings"
311
- msgstr "Responsive Einstellungen"
312
-
313
- #: ../blocks/responsive.php:203
314
- msgid ""
315
- "Responsive settings let you decide the behavior of the button on different "
316
- "devices and screen sizes. For instance large buttons on small screens."
317
- msgstr ""
318
- "Mit den Responsive-Einstellungen können Sie die Abbildung der Buttons auf "
319
- "verschiedenen Geräten und Bildschirmgrößen festlegen. Zum Beispiel große "
320
- "Buttons auf kleinen Bildschirmen. (Smartphone, Tablet , Notebook, Desktop PC)"
321
-
322
- #: ../blocks/responsive.php:205
323
- msgid "Auto Responsive"
324
- msgstr "Responsive automatisch"
325
-
326
- #: ../blocks/responsive.php:205
327
- msgid "(Experimental)"
328
- msgstr "(Beta Version)"
329
-
330
- #: ../blocks/responsive.php:212
331
- msgid "Note:"
332
- msgstr "Hinweis:"
333
-
334
- #: ../blocks/responsive.php:212
335
- msgid ""
336
- " Auto responsive settings will take a guess only on small screens. To "
337
- "control your responsive settings uncheck this button. This will show more "
338
- "options."
339
- msgstr ""
340
- "Die automatischen Responsiv-Einstellungen werden vermutlich nur auf kleinen "
341
- "Smartphones funktionieren. Um die Responsiv-Einstellungen für alle Medien zu "
342
- "optimieren, bitte diesen Button deaktivieren. Sie sehen dann mehr Optionen. "
343
-
344
- #: ../blocks/responsive.php:234 ../blocks/responsive.php:300
345
- msgid "Min width"
346
- msgstr "Mindestbreite"
347
-
348
- #: ../blocks/responsive.php:237 ../blocks/responsive.php:303
349
- msgid "Max width"
350
- msgstr "Maximale Breite"
351
-
352
- #: ../blocks/responsive.php:243 ../blocks/responsive.php:308
353
- msgid "Font size"
354
- msgstr "Schriftgröße"
355
-
356
- #: ../blocks/responsive.php:247 ../blocks/responsive.php:312
357
- msgid "Button width"
358
- msgstr "Button Breite"
359
-
360
- #: ../blocks/responsive.php:251 ../blocks/responsive.php:314
361
- msgid "Container width"
362
- msgstr "Container Breite"
363
-
364
- #: ../blocks/responsive.php:256 ../blocks/responsive.php:319
365
- msgid "Container float"
366
- msgstr "Ausrichtung im Inhalt (links, mitte, rechts)"
367
-
368
- #: ../blocks/responsive.php:260 ../blocks/responsive.php:321
369
- msgid "Hide button on this view"
370
- msgstr "Button in dieser Ansicht ausblenden"
371
-
372
- #: ../blocks/responsive.php:278
373
- msgid "New Query"
374
- msgstr "Neue Abfrage"
375
-
376
- #: ../blocks/responsive.php:283
377
- msgid "Add"
378
- msgstr "Hinzufügen"
379
-
380
- #: ../blocks/text.php:69 ../includes/maxbuttons-list-trash.php:142
381
- #: ../includes/maxbuttons-list.php:220
382
- msgid "Button"
383
- msgstr "Button"
384
-
385
- #: ../blocks/text.php:132
386
- msgid "The actual words that appear on the button."
387
- msgstr "Der Text der auf dem Button angezeigt wird."
388
-
389
- #: ../blocks/text.php:137
390
- msgid "Font"
391
- msgstr "Schriftart"
392
-
393
- #: ../blocks/text.php:155 ../blocks/text.php:171
394
- msgid "Size"
395
- msgstr "Größen"
396
-
397
- #: ../blocks/text.php:187
398
- msgid "Text align"
399
- msgstr "Text Ausrichtung"
400
-
401
- #: ../blocks/text.php:203
402
- msgid "Weight"
403
- msgstr "Gewicht"
404
-
405
- #: ../blocks/text.php:242
406
- msgid "Padding"
407
- msgstr "Innenabstand"
408
-
409
- #: ../blocks/text.php:247
410
- msgid "Top"
411
- msgstr "Oben"
412
-
413
- #: ../blocks/text.php:254
414
- msgid "Bottom"
415
- msgstr "Unten"
416
-
417
- #: ../classes/admin-class.php:206
418
- msgid "Insert This Button"
419
- msgstr "Diesen Button einfügen"
420
-
421
- #: ../classes/max-utils.php:84
422
- msgid "Small phones"
423
- msgstr "Kleine Mobilgeräte"
424
-
425
- #: ../classes/max-utils.php:85
426
- msgid "Small phones (landscape)"
427
- msgstr "Kleine Mobilgeräte (Querformat)"
428
-
429
- #: ../classes/max-utils.php:86
430
- msgid "Small phones (portrait)"
431
- msgstr "Kleine Mobilgeräte (Hochformat)"
432
-
433
- #: ../classes/max-utils.php:87
434
- msgid "Ipad (all)"
435
- msgstr "Tablet Ipad (Alle)"
436
-
437
- #: ../classes/max-utils.php:88
438
- msgid "Medium-size (smart)phone"
439
- msgstr "Mittlere Größe Smartphone"
440
-
441
- #: ../classes/max-utils.php:89
442
- msgid "Ipad landscape"
443
- msgstr "Tablet Ipad Querformat"
444
-
445
- #: ../classes/max-utils.php:90
446
- msgid "Ipad portrait"
447
- msgstr "Tablet Ipad Hochformat"
448
-
449
- #: ../classes/max-utils.php:91
450
- msgid "Desktop"
451
- msgstr "Desktop Monitor"
452
-
453
- #: ../classes/max-utils.php:92
454
- msgid "Large desktops"
455
- msgstr "Große Monitore (1920 x 1080)"
456
-
457
- #: ../classes/max-utils.php:93
458
- msgid "Custom size"
459
- msgstr "Eigene Größe"
460
-
461
- #: ../classes/max-utils.php:97
462
- msgid "Optimized for small smartphones ( screen sizes under 480px )"
463
- msgstr "Optimiert für kleine Smartphones (Bildschirmgrößen unter 480px)"
464
-
465
- #: ../classes/max-utils.php:98
466
- msgid ""
467
- "Optimzed for small smartphones in landscape and higher ( screen sizes 321px "
468
- "- 480px)"
469
- msgstr ""
470
- "Optimiert für kleine Smartphones im Querformat und größer (Bildschirmgrößen "
471
- "321px - 480px)"
472
-
473
- #: ../classes/max-utils.php:99
474
- msgid "Optimized for small phones ( screen size max 320px )"
475
- msgstr "Optimiert für kleine Mobilgeräte (Handy) (Bildschirmgröße max 320px)"
476
-
477
- #: ../classes/max-utils.php:100
478
- msgid "Optimized for devices between 768px and 1024px"
479
- msgstr "Optimiert für Geräte zwischen 768px und 1024px"
480
-
481
- #: ../classes/max-utils.php:101
482
- msgid "Optimized for medium sizes devices between 480px and 768px"
483
- msgstr "Optimiert für mittlere Geräte zwischen 480px und 768px"
484
-
485
- #: ../classes/max-utils.php:102
486
- msgid "Optimized for devices between 768px and 1024px in landscape"
487
- msgstr "Optimiert für Geräte zwischen 768px und 1024px im Querformat"
488
-
489
- #: ../classes/max-utils.php:103
490
- msgid "Optimized for deviced between 768px and 1024 in portrait"
491
- msgstr "Optimiert für Geräte zwischen 768px und 1024px im Hochformat"
492
-
493
- #: ../classes/max-utils.php:104
494
- msgid "Desktop screens from 1224px"
495
- msgstr "Desktop Monitore ab 1224px"
496
-
497
- #: ../classes/max-utils.php:105
498
- msgid "Large desktop screens, from 1824px"
499
- msgstr "Große Desktop Monitore ab 1824px "
500
-
501
- #: ../classes/max-utils.php:106
502
- msgid "Set your own breakpoints"
503
- msgstr "Legen Sie Ihre eigenen Responsive Größen fest"
504
-
505
- #: ../classes/max-utils.php:185
506
- msgid "MaxButtons Loading Time:"
507
- msgstr "MaxButtons Ladezeit:"
508
-
509
- #: ../classes/maxbuttons-class.php:180
510
- msgid "MaxButtons : Buttons"
511
- msgstr "MaxButtons: Buttons"
512
-
513
- #: ../classes/maxbuttons-class.php:181
514
- msgid "MaxButtons"
515
- msgstr "MaxButtons"
516
-
517
- #: ../classes/maxbuttons-class.php:192 ../classes/maxbuttons-class.php:317
518
- #: ../includes/maxbuttons-admin-helper.php:28
519
- msgid "Buttons"
520
- msgstr "Buttons"
521
-
522
- #: ../classes/maxbuttons-class.php:196
523
- msgid "MaxButtons : Add/Edit Button"
524
- msgstr "MaxButtons: Hinzufügen / Bearbeiten Button"
525
-
526
- #: ../classes/maxbuttons-class.php:197
527
- #: ../includes/maxbuttons-list-trash.php:117
528
- #: ../includes/maxbuttons-list.php:147
529
- msgid "Add New"
530
- msgstr "Neu hinzufügen"
531
-
532
- #: ../classes/maxbuttons-class.php:203
533
- msgid "MaxButtons : Upgrade to Pro"
534
- msgstr "MaxButtons: Upgrade auf die Pro Version (kostenpflichtig)"
535
-
536
- #: ../classes/maxbuttons-class.php:204
537
- #: ../includes/maxbuttons-admin-helper.php:34
538
- msgid "Upgrade to Pro"
539
- msgstr "Upgrade auf die Pro Version"
540
-
541
- #: ../classes/maxbuttons-class.php:210
542
- msgid "MaxButtons : Settings"
543
- msgstr "MaxButtons: Einstellungen"
544
-
545
- #: ../classes/maxbuttons-class.php:211
546
- #: ../includes/maxbuttons-admin-helper.php:38
547
- #: ../includes/maxbuttons-settings.php:56
548
- msgid "Settings"
549
- msgstr "Einstellungen"
550
-
551
- #: ../classes/maxbuttons-class.php:217
552
- msgid "MaxButtons : Support"
553
- msgstr "MaxButtons : Support"
554
-
555
- #: ../classes/maxbuttons-class.php:218
556
- #: ../includes/maxbuttons-admin-helper.php:42
557
- msgid "Support"
558
- msgstr "Support"
559
-
560
- #: ../classes/maxbuttons-class.php:281
561
- msgid "Select a MaxButton"
562
- msgstr "Einen MaxButton auswählen"
563
-
564
- #: ../classes/maxbuttons-class.php:328
565
- #, php-format
566
- msgid "%sUpgrade to Pro Version%s"
567
- msgstr "%sUpgrade zur Pro Version%s"
568
-
569
- #: ../classes/maxbuttons-class.php:343
570
- msgid "Add Button"
571
- msgstr "Button hinzufügen"
572
-
573
- #: ../includes/arrays.php:4
574
- msgid "dashed"
575
- msgstr "Gestrichelt"
576
-
577
- #: ../includes/arrays.php:5
578
- msgid "dotted"
579
- msgstr "Gepunktet"
580
-
581
- #: ../includes/arrays.php:6
582
- msgid "double"
583
- msgstr "doppelt"
584
-
585
- #: ../includes/arrays.php:7
586
- msgid "groove"
587
- msgstr "vertieft"
588
-
589
- #: ../includes/arrays.php:8
590
- msgid "inset"
591
- msgstr "3D inset"
592
-
593
- #: ../includes/arrays.php:9
594
- msgid "outset"
595
- msgstr "3 D outset"
596
-
597
- #: ../includes/arrays.php:10
598
- msgid "ridge"
599
- msgstr "erhöht"
600
-
601
- #: ../includes/arrays.php:11
602
- msgid "solid"
603
- msgstr "Durchgehend"
604
-
605
- #: ../includes/arrays.php:79 ../includes/arrays.php:85
606
- msgid "normal"
607
- msgstr "normal"
608
-
609
- #: ../includes/arrays.php:80
610
- msgid "italic"
611
- msgstr "Kursiv"
612
-
613
- #: ../includes/arrays.php:86
614
- msgid "bold"
615
- msgstr "Fett"
616
-
617
- #: ../includes/maxbuttons-admin-helper.php:19
618
- msgid "Brought to you by"
619
- msgstr "Präsentiert von"
620
-
621
- #: ../includes/maxbuttons-admin-helper.php:21
622
- #, php-format
623
- msgid "Upgrade to MaxButtons Pro today! %sClick Here%s"
624
- msgstr ""
625
- "Aktualisieren Sie noch heute auf die MaxButtons Pro Version! %s Klicken Sie "
626
- "hier %s"
627
-
628
- #: ../includes/maxbuttons-admin-helper.php:75
629
- msgid "MaxButtons Pro only $24"
630
- msgstr "MaxButtons Pro Version für nur 24,00 $"
631
-
632
- #: ../includes/maxbuttons-admin-helper.php:77
633
- msgid "MaxButton Pro bonus features include:"
634
- msgstr "Zum Funktionsumfang der MaxButtons Pro Version gehören:"
635
-
636
- #: ../includes/maxbuttons-admin-helper.php:81
637
- msgid "Button Search!"
638
- msgstr "Button Suche!"
639
-
640
- #: ../includes/maxbuttons-admin-helper.php:82
641
- msgid "Google Event Tracking"
642
- msgstr "Google-Ereignis-Tracking"
643
-
644
- #: ../includes/maxbuttons-admin-helper.php:83
645
- msgid "Two Lines of Editable Text"
646
- msgstr "2 Zeilen bearbeitbarer Text"
647
-
648
- #: ../includes/maxbuttons-admin-helper.php:84
649
- msgid "Pre-Made Button Packs"
650
- msgstr "Vorgefertigte Button Pakete"
651
-
652
- #: ../includes/maxbuttons-admin-helper.php:85
653
- msgid "Add An Icon To Your Buttons"
654
- msgstr "Ein Icon für den Button wählen"
655
-
656
- #: ../includes/maxbuttons-admin-helper.php:86
657
- #: ../includes/maxbuttons-pro.php:29
658
- msgid "Google Web Fonts"
659
- msgstr "Google Web Schriftarten"
660
-
661
- #: ../includes/maxbuttons-admin-helper.php:87
662
- msgid "Font Awesome Icon Support"
663
- msgstr "Support für Awesome Icons"
664
-
665
- #: ../includes/maxbuttons-admin-helper.php:88
666
- msgid "Responsive Buttons"
667
- msgstr "Responsive Buttons"
668
-
669
- #: ../includes/maxbuttons-admin-helper.php:89
670
- msgid "Our terrific Support"
671
- msgstr "Unser Support"
672
-
673
- #: ../includes/maxbuttons-admin-helper.php:90
674
- msgid "Plus More!"
675
- msgstr "Mehr lesen"
676
-
677
- #: ../includes/maxbuttons-admin-helper.php:93
678
- msgid "Get MaxButtons Pro Now!"
679
- msgstr "MaxButtons Pro Version kaufen!"
680
-
681
- #: ../includes/maxbuttons-admin-helper.php:97
682
- msgid "Everything for $99!"
683
- msgstr "Alles für 99,00 $!"
684
-
685
- #: ../includes/maxbuttons-admin-helper.php:99
686
- msgid "Get Everything Now!"
687
- msgstr "Jetzt kaufen!"
688
-
689
- #: ../includes/maxbuttons-admin-helper.php:103
690
- msgid "Get MaxGalleria"
691
- msgstr "MaxGalleria installieren"
692
-
693
- #: ../includes/maxbuttons-admin-helper.php:104
694
- msgid ""
695
- "Download our free WordPress Gallery plugin MaxGalleria! Add-ons for Albums, "
696
- "Videos, and Image Sliders."
697
- msgstr ""
698
- "Installieren Sie unser kostenloses WordPress-Galerie-Plugin MaxGalleria! "
699
- "Ein Add-on für Alben, Videos und Bilder Slider."
700
-
701
- #: ../includes/maxbuttons-admin-helper.php:105
702
- msgid "Get MaxGalleria Now!"
703
- msgstr "MaxGalleria jetzt installieren!"
704
-
705
- #: ../includes/maxbuttons-admin-helper.php:109
706
- msgid "Font Awesome Support"
707
- msgstr "Support für Awesome Icons"
708
-
709
- #: ../includes/maxbuttons-admin-helper.php:110
710
- msgid ""
711
- "With MaxButtons Pro you have access to all 439 Font Awesome icons, ready to "
712
- "add to your buttons."
713
- msgstr ""
714
- "Mit der MaxButtons Pro Version haben Sie Zugriff auf alle 439 Awesome Icons, "
715
- "vorbereitet zur Nutzung in Ihren Buttons."
716
-
717
- #: ../includes/maxbuttons-admin-helper.php:111
718
- msgid ""
719
- "Never upload another icon again, just choose an icon and go about your "
720
- "normal button-making business."
721
- msgstr ""
722
- "Sie brauchen nie wieder andere Icons laden. Über Ihre normale MaxButton "
723
- "Funktion haben Sie Zugriff auf alle Icons."
724
-
725
- #: ../includes/maxbuttons-admin-helper.php:112
726
- msgid "Use Font Awesome!"
727
- msgstr "Verwenden Sie die Schriftart Awesome!"
728
-
729
- #: ../includes/maxbuttons-admin-helper.php:144
730
- msgid "Go to the first page"
731
- msgstr "Zur 1. Seite gehen"
732
-
733
- #: ../includes/maxbuttons-admin-helper.php:146
734
- msgid "Go to the previous page"
735
- msgstr "Zur vorherigen Seite gehen"
736
-
737
- #: ../includes/maxbuttons-admin-helper.php:148
738
- msgid "of"
739
- msgstr "von"
740
-
741
- #: ../includes/maxbuttons-admin-helper.php:150
742
- msgid "Go to the next page"
743
- msgstr "Zur nächsten Seite gehen"
744
-
745
- #: ../includes/maxbuttons-admin-helper.php:152
746
- msgid "Go to the last page"
747
- msgstr "Zur letzten Seite gehen"
748
-
749
- #: ../includes/maxbuttons-button.php:22
750
- msgid "Maxbuttons Error: Button id should never be zero"
751
- msgstr "Maxbuttons Error: Die Button ID sollte niemals 0 sein"
752
-
753
- #: ../includes/maxbuttons-button.php:36
754
- msgid ""
755
- "Maxbuttons button id is zero. Your data is not saved correctly! Please check "
756
- "your database."
757
- msgstr ""
758
- "Die Maxbuttons Button ID zeigt 0. Ihre Daten wurden nicht korrekt "
759
- "gespeichert. Bitte überprüfen Sie Ihre Datenbank."
760
-
761
- #: ../includes/maxbuttons-button.php:43
762
- msgid ""
763
- "MaxButtons could not find this button in the database. It might not be "
764
- "possible to save this button! Please check your database or contact support! "
765
- msgstr ""
766
- "Dieser MaxButtons Button wurde in der Datenbank nicht gefunden. Es war "
767
- "nicht möglich den Button zu speichern. Bitte überprüfen Sie Ihre Datenbank "
768
- "oder wenden sich an den Support!"
769
-
770
- #: ../includes/maxbuttons-button.php:56
771
- msgid "MaxButtons: Add/Edit Button"
772
- msgstr "MaxButtons: Hinzufügen / Bearbeiten"
773
-
774
- #: ../includes/maxbuttons-button.php:71 ../includes/maxbuttons-button.php:134
775
- msgid "Save"
776
- msgstr "Speichern"
777
-
778
- #: ../includes/maxbuttons-button.php:72 ../includes/maxbuttons-list.php:252
779
- msgid "Copy"
780
- msgstr "Kopieren"
781
-
782
- #: ../includes/maxbuttons-button.php:73 ../includes/maxbuttons-list.php:191
783
- #: ../includes/maxbuttons-list.php:254
784
- msgid "Move to Trash"
785
- msgstr "In den Papierkorb verschieben"
786
-
787
- #: ../includes/maxbuttons-button.php:74
788
- msgid "Delete"
789
- msgstr "Löschen"
790
-
791
- #: ../includes/maxbuttons-button.php:79
792
- msgid "Removing button"
793
- msgstr "Button entfernen"
794
-
795
- #: ../includes/maxbuttons-button.php:82
796
- msgid "You are about to permanently remove this button. Are you sure?"
797
- msgstr "Sie sind dabei, diesen Button dauerhaft zu entfernen. Sind Sie sicher?"
798
-
799
- #: ../includes/maxbuttons-button.php:83
800
- msgid "Yes"
801
- msgstr "Ja"
802
-
803
- #: ../includes/maxbuttons-button.php:85
804
- msgid "No"
805
- msgstr "Nein"
806
-
807
- #: ../includes/maxbuttons-button.php:95
808
- msgid ""
809
- "To use this button, place the following shortcode anywhere in your site "
810
- "content:"
811
- msgstr ""
812
- "Um diesen Button zu benutzen, platzieren Sie den folgenden Shortcode "
813
- "irgendwo in Ihrem Seiten Inhalt:"
814
-
815
- #: ../includes/maxbuttons-button.php:96
816
- msgid "or"
817
- msgstr "oder"
818
-
819
- #: ../includes/maxbuttons-button.php:97
820
- msgid "See more examples"
821
- msgstr "Weitere Beispiele für Sie"
822
-
823
- #: ../includes/maxbuttons-button.php:103
824
- msgid "Add the same button with different link"
825
- msgstr "Fügen Sie den gleichen Button mit einem anderen Link hinzu"
826
-
827
- #: ../includes/maxbuttons-button.php:107
828
- msgid "Use the same button but change the text"
829
- msgstr "Benutzen Sie den gleichen Button aber mit einem anderen Text"
830
-
831
- #: ../includes/maxbuttons-button.php:110
832
- msgid "All possible shortcode options"
833
- msgstr "Alle möglichen Shortcode-Optionen"
834
-
835
- #: ../includes/maxbuttons-button.php:114
836
- msgid "Some tips"
837
- msgstr "Einige Tipps"
838
-
839
- #: ../includes/maxbuttons-button.php:115
840
- msgid ""
841
- "If you use the button on a static page, on multiple pages, or upload your "
842
- "theme to another WordPress installation choose an unique name and use "
843
- msgstr ""
844
- "Wenn Sie den Button in einer statischen Seite oder auf mehren Seiten "
845
- "verwenden oder Ihr Thema in eine andere WordPress Installation laden, "
846
- "verwenden Sie eindeutige wiedererkennbare Namen. "
847
-
848
- #: ../includes/maxbuttons-button.php:119
849
- msgid ""
850
- "Using this syntax if you change your button it will change throughout the "
851
- "entire site. If you delete the button and create a new one with the same "
852
- "name the site will use the new button. "
853
- msgstr ""
854
- "Wenn Sie diese Syntax (Zeichenfolge) verwenden erscheinen Änderungen in "
855
- "Ihrem Button immer auf allen Seiten in denen der Button gezeigt wird. Wenn "
856
- "Sie den Button löschen und unter der Syntax einen neuen Button anlegen wird "
857
- "in Ihren Seiten der neue Button angezeigt. "
858
-
859
- #: ../includes/maxbuttons-button.php:139
860
- msgid "Button Output"
861
- msgstr "Vorschau Button (Fenster hier halten & ziehen)"
862
-
863
- #: ../includes/maxbuttons-button.php:142
864
- msgid "The top is the normal button, the bottom one is the hover."
865
- msgstr ""
866
- "Der obere Button ist die Normal Version und der untere Button die Version "
867
- "Maus-Hover."
868
-
869
- #: ../includes/maxbuttons-button.php:162
870
- msgid "Change this color to see your button on a different background."
871
- msgstr ""
872
- "Hier können Sie eine eigene Hintergrundfarbe in der Button Ausgabe wählen."
873
-
874
- #: ../includes/maxbuttons-groups.php:6
875
- msgid "Button groups"
876
- msgstr "Button-Gruppen"
877
-
878
- #: ../includes/maxbuttons-groups.php:13
879
- msgid "Create new group"
880
- msgstr "Neue Gruppe anlegen"
881
-
882
- #: ../includes/maxbuttons-list-trash.php:22
883
- #: ../includes/maxbuttons-list-trash.php:50 ../includes/maxbuttons-list.php:46
884
- #: ../includes/maxbuttons-list.php:79
885
- msgid "Restored 1 button."
886
- msgstr "1 Button wiederhergestellt."
887
-
888
- #: ../includes/maxbuttons-list-trash.php:26 ../includes/maxbuttons-list.php:50
889
- msgid "Restored "
890
- msgstr "Wiederhergestellt!"
891
-
892
- #: ../includes/maxbuttons-list-trash.php:26
893
- #: ../includes/maxbuttons-list-trash.php:43 ../includes/maxbuttons-list.php:50
894
- #: ../includes/maxbuttons-list.php:69
895
- msgid " buttons."
896
- msgstr "Buttons."
897
-
898
- #: ../includes/maxbuttons-list-trash.php:39
899
- #: ../includes/maxbuttons-list-trash.php:54 ../includes/maxbuttons-list.php:65
900
- #: ../includes/maxbuttons-list.php:83
901
- msgid "Deleted 1 button."
902
- msgstr "1 Button gelöscht."
903
-
904
- #: ../includes/maxbuttons-list-trash.php:43 ../includes/maxbuttons-list.php:69
905
- msgid "Deleted "
906
- msgstr "Gelöscht"
907
-
908
- #: ../includes/maxbuttons-list-trash.php:107
909
- #: ../includes/maxbuttons-list.php:135
910
- msgid "MaxButtons: Button List"
911
- msgstr "MaxButtons: Button Liste"
912
-
913
- #: ../includes/maxbuttons-list-trash.php:125
914
- #: ../includes/maxbuttons-list.php:162 ../includes/maxbuttons-list.php:167
915
- msgid "All"
916
- msgstr "Alle"
917
-
918
- #: ../includes/maxbuttons-list-trash.php:127
919
- #: ../includes/maxbuttons-list.php:163 ../includes/maxbuttons-list.php:168
920
- msgid "Trash"
921
- msgstr "Papierkorb"
922
-
923
- #: ../includes/maxbuttons-list-trash.php:132
924
- #: ../includes/maxbuttons-list.php:188
925
- msgid "Bulk Actions"
926
- msgstr "Mehrfach-Aktionen"
927
-
928
- #: ../includes/maxbuttons-list-trash.php:133
929
- #: ../includes/maxbuttons-list-trash.php:171
930
- #: ../includes/maxbuttons-list.php:194 ../includes/maxbuttons-list.php:258
931
- msgid "Restore"
932
- msgstr "Wiederherstellen"
933
-
934
- #: ../includes/maxbuttons-list-trash.php:134
935
- #: ../includes/maxbuttons-list-trash.php:173
936
- #: ../includes/maxbuttons-list.php:195 ../includes/maxbuttons-list.php:260
937
- msgid "Delete Permanently"
938
- msgstr "Dauerhaft löschen"
939
-
940
- #: ../includes/maxbuttons-list-trash.php:136
941
- #: ../includes/maxbuttons-list.php:198
942
- msgid "Apply"
943
- msgstr "Übernehmen"
944
-
945
- #: ../includes/maxbuttons-list-trash.php:143
946
- #: ../includes/maxbuttons-list.php:223
947
- msgid "Name and Description"
948
- msgstr "Name und Beschreibung"
949
-
950
- #: ../includes/maxbuttons-list-trash.php:144
951
- #: ../includes/maxbuttons-list.php:227
952
- msgid "Shortcode"
953
- msgstr "Shortcode"
954
-
955
- #: ../includes/maxbuttons-list-trash.php:145
956
- msgid "Actions"
957
- msgstr "Aktionen"
958
-
959
- #: ../includes/maxbuttons-list.php:25 ../includes/maxbuttons-list.php:75
960
- msgid "Moved 1 button to the trash."
961
- msgstr "1 Button in den Papierkorb geschoben."
962
-
963
- #: ../includes/maxbuttons-list.php:29
964
- msgid "Moved "
965
- msgstr "Verschoben"
966
-
967
- #: ../includes/maxbuttons-list.php:29
968
- msgid " buttons to the trash."
969
- msgstr "Buttons in den Papierkorb"
970
-
971
- #: ../includes/maxbuttons-list.php:250
972
- msgid "Edit"
973
- msgstr "Bearbeiten"
974
-
975
- #: ../includes/maxbuttons-media-button.php:18
976
- msgid "Please select a button."
977
- msgstr "Bitte einen Button auswählen"
978
-
979
- #: ../includes/maxbuttons-media-button.php:30
980
- msgid "Insert Button into Editor"
981
- msgstr "Einen Button in den WordPress Editor einbinden"
982
-
983
- #: ../includes/maxbuttons-media-button.php:35
984
- msgid ""
985
- "Select a button from the list below to place the button shortcode in the "
986
- "editor."
987
- msgstr ""
988
- "Um einen Button Shortcode im WordPress Editor zu platzieren, wählen Sie ihn "
989
- "aus der untenstehenden Liste aus."
990
-
991
- #: ../includes/maxbuttons-media-button.php:37
992
- msgid "Loading your buttons"
993
- msgstr "Ihre Buttons laden"
994
-
995
- #: ../includes/maxbuttons-media-button.php:42
996
- msgid "Cancel"
997
- msgstr "Abbrechen"
998
-
999
- #: ../includes/maxbuttons-pro.php:11
1000
- msgid "MaxButtons: Upgrade to Pro"
1001
- msgstr "MaxButtons: Upgrade auf die Pro Version (kostenpflichtig)"
1002
-
1003
- #: ../includes/maxbuttons-pro.php:22
1004
- msgid "Upgrade to MaxButtons Pro - It's Only $19!"
1005
- msgstr "Upgrade auf die MaxButtons Pro Version - es kostet nur 19,00 $!"
1006
-
1007
- #: ../includes/maxbuttons-pro.php:23
1008
- msgid ""
1009
- "If you've created at least one button with MaxButtons, then you know what it "
1010
- "can do: Unlimited colors. Rounded corners. Gradients. Text shadowing. Box "
1011
- "shadowing."
1012
- msgstr ""
1013
- "Wenn Sie schon einmal einen Button mit MaxButton erstellt haben kennen Sie "
1014
- "bereits die Vorteile: Unlimitierte Farben, Abgerundete Ecken, Farbverläufe, "
1015
- "Textschatten und Button Schatten."
1016
-
1017
- #: ../includes/maxbuttons-pro.php:24
1018
- #, php-format
1019
- msgid ""
1020
- "Now you can take your buttons to the next level with %sMaxButtons Pro%s. The "
1021
- "Pro version gives you all the CSS3 goodness and so much more:"
1022
- msgstr ""
1023
- "Jetzt können Sie Ihre Buttons noch um einen Leistungslevel verbessern mit "
1024
- "%sMaxButtons Pro%s. Die Pro Version ermöglicht alle CSS3 Styles und noch "
1025
- "einiges mehr: "
1026
-
1027
- #: ../includes/maxbuttons-pro.php:26
1028
- msgid "Font Awesome Integration"
1029
- msgstr "Integration von Awesome Icons"
1030
-
1031
- #: ../includes/maxbuttons-pro.php:26
1032
- msgid "Use icons from the most popular icon font set on the web!"
1033
- msgstr "Nutzen Sie die Icons vom populärsten Schrift Icon im Web!"
1034
-
1035
- #: ../includes/maxbuttons-pro.php:27
1036
- msgid "Icon Support"
1037
- msgstr "Support für Awesome Icons"
1038
-
1039
- #: ../includes/maxbuttons-pro.php:27
1040
- msgid "Like buttons, everyone loves icons. Use Font Awesome or upload yor own."
1041
- msgstr ""
1042
- "Jeder liebt Icons in seinen Buttons. Benutzen Sie die Awesome Icons oder "
1043
- "laden Sie Ihr eigenes Icon hoch."
1044
-
1045
- #: ../includes/maxbuttons-pro.php:28
1046
- msgid "Multi-Line Text"
1047
- msgstr "Mehrzeiliger Text"
1048
-
1049
- #: ../includes/maxbuttons-pro.php:28
1050
- msgid ""
1051
- "Use a second a line of text to communicate extra information to your users "
1052
- "and customers."
1053
- msgstr ""
1054
- "Verwenden Sie eine zweite Textzeile, um zusätzliche Informationen an Ihre "
1055
- "Button Nutzer und Kunden zu kommunizieren."
1056
-
1057
- #: ../includes/maxbuttons-pro.php:29
1058
- msgid "Great typography can take your buttons up several notches."
1059
- msgstr ""
1060
- "Mit einer guten Typographie hinterlassen Ihre Buttons einen zusätzlichen "
1061
- "Eindruck! "
1062
-
1063
- #: ../includes/maxbuttons-pro.php:30
1064
- msgid "Button Packs"
1065
- msgstr "Button Pakete"
1066
-
1067
- #: ../includes/maxbuttons-pro.php:30
1068
- msgid ""
1069
- "Import sets of pre-defined buttons, which you can then use as-is or "
1070
- "customize as you need."
1071
- msgstr ""
1072
- "Importieren Sie vorgefertigte Sets von Buttons die Sie nutzen oder verändern "
1073
- "können, je wie Sie die Buttons brauchen."
1074
-
1075
- #: ../includes/maxbuttons-pro.php:31
1076
- msgid "Shopp Integration"
1077
- msgstr "Shopp Plugin Integration"
1078
-
1079
- #: ../includes/maxbuttons-pro.php:31
1080
- msgid ""
1081
- "Use buttons created with MaxButtons Pro as the shopping cart buttons of the "
1082
- "Shopp e-commerce plugin."
1083
- msgstr ""
1084
- "Nutzen Sie Buttons aus der MaxButtons Pro Version als Warenkorb Button im "
1085
- "Shopp E-Commerce Plugin."
1086
-
1087
- #: ../includes/maxbuttons-pro.php:33
1088
- #, php-format
1089
- msgid "And did we mention you can %sget MaxButtons Pro for only $19%s"
1090
- msgstr ""
1091
- "Und haben wir schon erwähnt, dass Sie %sMaxButtons Pro für nur $ 19,00%s "
1092
- "bekommen? "
1093
-
1094
- #: ../includes/maxbuttons-pro.php:35
1095
- msgid "CSS3 Button Examples"
1096
- msgstr "CSS3 Buttons Beispiele"
1097
-
1098
- #: ../includes/maxbuttons-pro.php:36
1099
- msgid ""
1100
- "Just take a look at the types of buttons you can make with MaxButtons Pro:"
1101
- msgstr ""
1102
- "Werfen Sie einen Blick auf die verschiedenen Buttons, die Sie mit MaxButtons "
1103
- "Pro machen können:"
1104
-
1105
- #: ../includes/maxbuttons-pro.php:39
1106
- msgid "Button Packs: Pre-Made Sets of CSS3 and Icon Goodness"
1107
- msgstr "Button Pakete: Vorgefertigte Sets in CSS3 und Icon Qualität"
1108
-
1109
- #: ../includes/maxbuttons-pro.php:40
1110
- #, php-format
1111
- msgid ""
1112
- "Button packs are sets of buttons with icons and settings already predefined "
1113
- "for you, saving you loads of time. We have an %sever-growing collection of "
1114
- "button packs%s that you can buy and import into your website (only $5 each). "
1115
- "You can then use those buttons as they are, or customize them to fit your "
1116
- "needs (below are a few to get you started)."
1117
- msgstr ""
1118
- "Button Pakete sind vorgefertigte Button Sets mit Icons und allen "
1119
- "Einstellungen. Damit sparen Sie eine Menge Zeit. Wir haben eine % ständig "
1120
- "wachsende Kollektion mit Button-Paketen% s, die Sie kaufen, und in Ihre "
1121
- "Website importieren können. (nur jeweils 5 $) Anschließend können Sie diese "
1122
- "Buttons nutzen wie sie sind oder an Ihre Bedürfnisse anpassen (Nachstehend "
1123
- "sind ein paar zum Einstieg)."
1124
-
1125
- #: ../includes/maxbuttons-pro.php:45
1126
- msgid "E-Commerce Buttons"
1127
- msgstr "E-Commerce Buttons"
1128
-
1129
- #: ../includes/maxbuttons-pro.php:50
1130
- msgid "Colored Round Social Icons Set #1"
1131
- msgstr "Farbiges Round Social Icons Set #1"
1132
-
1133
- #: ../includes/maxbuttons-pro.php:55
1134
- msgid "Chrome Icons"
1135
- msgstr "Chrom Icons"
1136
-
1137
- #: ../includes/maxbuttons-pro.php:60
1138
- msgid "Shopping Cart Blue"
1139
- msgstr "Warenkorb blau"
1140
-
1141
- #: ../includes/maxbuttons-pro.php:65
1142
- msgid "Pace"
1143
- msgstr "Geschwindigkeit"
1144
-
1145
- #: ../includes/maxbuttons-pro.php:70
1146
- msgid "Social Sign-In"
1147
- msgstr "Im Social Network registrieren"
1148
-
1149
- #: ../includes/maxbuttons-pro.php:74
1150
- msgid "Feature Comparison"
1151
- msgstr "Funktionen Vergleich"
1152
-
1153
- #: ../includes/maxbuttons-pro.php:75
1154
- msgid ""
1155
- "There's nothing like a nice, straightforward checklist to do a product "
1156
- "comparison, so here's another one:"
1157
- msgstr ""
1158
- "Es geht nichts über eine schöne, einfache Checkliste, um einen "
1159
- "Produktvergleich zu erstellen. Hier ist eine Checkliste:"
1160
-
1161
- #: ../includes/maxbuttons-pro.php:79
1162
- msgid "Free Version"
1163
- msgstr "Kostenfreie Version"
1164
-
1165
- #: ../includes/maxbuttons-pro.php:80
1166
- msgid "MaxButtons Pro"
1167
- msgstr "MaxButtons Pro Version"
1168
-
1169
- #: ../includes/maxbuttons-pro.php:83
1170
- msgid ""
1171
- "Icon support (put icons to the left, right, top, or bottom of your text)"
1172
- msgstr ""
1173
- "Icon Support (Platzieren Sie Icons links, rechts, über oder unter Ihren Text)"
1174
-
1175
- #: ../includes/maxbuttons-pro.php:88
1176
- msgid ""
1177
- "Multi-line text, to add a second line of text for communicating extra "
1178
- "information"
1179
- msgstr ""
1180
- "Mehrzeiliges Textfeld, um eine zweite Textzeile zur Kommunikation oder für "
1181
- "Informationen einzufügen"
1182
-
1183
- #: ../includes/maxbuttons-pro.php:93
1184
- msgid ""
1185
- "Google Web Fonts, to make your buttons stand out with beautiful typography"
1186
- msgstr ""
1187
- "Google Web Fonts, um Ihre Buttons mit wunderschöner Typographie hervorzuheben"
1188
-
1189
- #: ../includes/maxbuttons-pro.php:98
1190
- msgid "Button packs, to import pre-made sets of buttons into your website"
1191
- msgstr "Button Pakete, um vorgefertigte Sets in Ihre Website zu integrieren"
1192
-
1193
- #: ../includes/maxbuttons-pro.php:103
1194
- msgid ""
1195
- "Import/export functionality (useful for backing up and/or moving your "
1196
- "buttons)"
1197
- msgstr ""
1198
- "Import / Export Funktion (nützlich für das Sichern und / oder die Nutzung "
1199
- "der Buttons in anderen Websites)"
1200
-
1201
- #: ../includes/maxbuttons-pro.php:108
1202
- msgid ""
1203
- "Explicit height and width options, to ensure your buttons are the same size"
1204
- msgstr ""
1205
- "Optionen für genaue Höhe und Breite, um sicherzustellen, dass Ihre Buttons "
1206
- "die gleiche Größe haben"
1207
-
1208
- #: ../includes/maxbuttons-pro.php:113
1209
- msgid "Shopp integration for buttons in your e-commerce shopping cart"
1210
- msgstr "Shopp Plugin Integration für Buttons in Ihrem E-Commerce Warenkorb"
1211
-
1212
- #: ../includes/maxbuttons-pro.php:118
1213
- msgid "Major browser support (Firefox, Chrome, Opera, Safari, and IE9)"
1214
- msgstr "Browserunterstützung für: (Firefox, Chrome, Opera, Safari und IE9)"
1215
-
1216
- #: ../includes/maxbuttons-pro.php:123
1217
- msgid "Gradients for background colors"
1218
- msgstr "Verläufe und Transparenz"
1219
-
1220
- #: ../includes/maxbuttons-pro.php:128
1221
- msgid "Border radius for rounded corners"
1222
- msgstr "Rahmen Radius für runde Ecken"
1223
-
1224
- #: ../includes/maxbuttons-pro.php:133
1225
- msgid "Text and box shadowing"
1226
- msgstr "Schatten für Text und Box "
1227
-
1228
- #: ../includes/maxbuttons-pro.php:138
1229
- msgid "Hover effects and styles"
1230
- msgstr "Hover Effekte (Berührung mit der Maus) und Stile (css)"
1231
-
1232
- #: ../includes/maxbuttons-pro.php:143
1233
- msgid "Shortcodes to use anywhere in your WordPress site"
1234
- msgstr ""
1235
- "Shortcodes die Sie in den Seiten in Ihrer WordPress Installation verwenden "
1236
- "können. "
1237
-
1238
- #: ../includes/maxbuttons-pro.php:149
1239
- msgid "Get Your Copy Today"
1240
- msgstr "Holen Sie Sich Ihr Exemplar!"
1241
-
1242
- #: ../includes/maxbuttons-pro.php:150
1243
- #, php-format
1244
- msgid ""
1245
- "So what are you waiting for? %sGrab your copy of MaxButtons Pro today%s!"
1246
- msgstr ""
1247
- "Also, worauf warten Sie noch? %sHolen Sie sich MaxButtons Pro noch heute%s!"
1248
-
1249
- #: ../includes/maxbuttons-settings.php:42
1250
- msgid "MaxButtons: Settings"
1251
- msgstr "MaxButtons : Einstellungen"
1252
-
1253
- #: ../includes/maxbuttons-settings.php:61
1254
- msgid "MaxButtons User Level"
1255
- msgstr "MaxButtons Benutzerrechte"
1256
-
1257
- #: ../includes/maxbuttons-settings.php:71
1258
- msgid ""
1259
- "For more details on user roles and permissions, click <a target=\"_blank\" "
1260
- "href=\"https://codex.wordpress.org/Roles_and_Capabilities\">here</a>."
1261
- msgstr ""
1262
- "Für mehr Informationen zu Rollen und Benutzerrechten klicken Sie bitte <a "
1263
- "target=\"_blank\" href=\"https://codex.wordpress.org/Roles_and_Capabilities"
1264
- "\">hier</a>."
1265
-
1266
- #: ../includes/maxbuttons-settings.php:82
1267
- msgid "Don't show add button in editor"
1268
- msgstr "Hinzufügen Button im WordPress Editor nicht zeigen"
1269
-
1270
- #: ../includes/maxbuttons-settings.php:96
1271
- msgid "Clear button cache"
1272
- msgstr "Button Cache leeren"
1273
-
1274
- #: ../includes/maxbuttons-settings.php:98
1275
- msgid ""
1276
- "Maxbuttons caches the style output allowing for lightning fast display of "
1277
- "your buttons. In the event \n"
1278
- " \t\t\tthis cache needs to be flushed and rebuilt you can reset the "
1279
- "cache here."
1280
- msgstr ""
1281
- "MaxButtons speichert die Stile der Buttons im Zwischenspeicher für eine "
1282
- "schnelle Vorschau. Falls \n"
1283
- " \t\t\tder Cache (Speicher) gelöscht werden muss, können Sie das hier "
1284
- "tun. "
1285
-
1286
- #: ../includes/maxbuttons-settings.php:100
1287
- msgid "Reset Cache"
1288
- msgstr "Cache löschen"
1289
-
1290
- #: ../includes/maxbuttons-settings.php:108
1291
- msgid "Retry Database migration"
1292
- msgstr "Datenbankmigration wiederholen"
1293
-
1294
- #: ../includes/maxbuttons-settings.php:109
1295
- msgid ""
1296
- "In case the upgrade functionality failed to move your old buttons from "
1297
- "MaxButtons before version 3, you can do so here manually. <strong>Attention</"
1298
- "strong> The new database table (maxbuttonsv3) *must* be empty, and the old "
1299
- "database table *must* contain buttons otherwise this will not run. Run this "
1300
- "<strong>at your own risk</strong> - it is strongly advised to make a backup "
1301
- "before doing so."
1302
- msgstr ""
1303
- "Falls die Aktualisierungs Funktion für Ihre alten Buttons von MaxButtons vor "
1304
- "Version 3 nicht funktioniert, können Sie das hier manuell durchführen. "
1305
- "<strong>Achtung</strong> Die neue Datenbanktabelle (maxbuttonsv3) *muss* "
1306
- "leer sein, und die alte Datenbanktabelle *muss* Buttons enthalten damit das "
1307
- "hier funktioniert. Wenn Sie das tun, geschieht das <strong>auf Ihr eigenes "
1308
- "Risiko</strong> - es wird dringend empfohlen vorher eine Datenbanksicherung "
1309
- "anzulegen."
1310
-
1311
- #: ../includes/maxbuttons-settings.php:110
1312
- msgid "Remigrate"
1313
- msgstr "Migrieren Sie"
1314
-
1315
- #: ../includes/maxbuttons-settings.php:118
1316
- msgid "UTF8 Table Fix"
1317
- msgstr "UTF8 Tabellen Zeichensatz"
1318
-
1319
- #: ../includes/maxbuttons-settings.php:121
1320
- msgid ""
1321
- "WARNING: We strongly recommend backing up your database before altering the "
1322
- "charset of the MaxButtons table in your WordPress database."
1323
- msgstr ""
1324
- "ACHTUNG: Wir empfehlen dringend, eine Sicherung Ihrer Datenbank zu "
1325
- "erstellen, bevor Sie eine Änderung des Zeichensatzes in der MaxButtons "
1326
- "Tabelle in Ihrer Wordpress-Datenbank durchführen."
1327
-
1328
- #: ../includes/maxbuttons-settings.php:123
1329
- msgid ""
1330
- "The button below should help fix the \"foreign character issue\" some people "
1331
- "experience when using MaxButtons. If you use foreign characters in your "
1332
- "buttons and after saving see ????, use this button."
1333
- msgstr ""
1334
- "Der unten stehende Button soll helfen \"Probleme mit unbekannten Zeichen\" "
1335
- "zu beheben die Sie eventuell in MaxButtons benutzen. Wenn Sie eigene Zeichen "
1336
- "in Ihren Buttons benutzen und sehen nach dem Speichern ???? benutzen Sie "
1337
- "diesen Button."
1338
-
1339
- #: ../includes/maxbuttons-settings.php:126
1340
- msgid "Change MaxButtons Table To UTF8"
1341
- msgstr "Die MaxButtons Tabelle zum Zeichensatz UTF8 konvertieren"
1342
-
1343
- #: ../includes/maxbuttons-support.php:131
1344
- msgid "MaxButtons: Support"
1345
- msgstr "MaxButtons : Support"
1346
-
1347
- #: ../includes/maxbuttons-support.php:142
1348
- #, php-format
1349
- msgid "All support is handled through the %sSupport Forums%s."
1350
- msgstr "Jede Supportanfrage wird über unser %sSupport Forum%s abgewickelt."
1351
-
1352
- #: ../includes/maxbuttons-support.php:145
1353
- msgid "Latest Support Questions"
1354
- msgstr "Letzte Support Anfragen"
1355
-
1356
- #: ../includes/maxbuttons-support.php:180
1357
- msgid "Your server doesn't allow us to catch the latest support questions"
1358
- msgstr ""
1359
- "Ihre Server Einstellungen verhindern den Zugriff auf die aktuellen Support "
1360
- "Anfragen"
1361
-
1362
- #: ../includes/maxbuttons-support.php:189
1363
- msgid ""
1364
- "You may be asked to provide the information below to help troubleshoot your "
1365
- "issue."
1366
- msgstr ""
1367
- "Es kann sein, dass Sie aufgefordert werden, unten stehende Informationen "
1368
- "einzugeben um Ihr geschildertes Problem lösen zu können."
1369
-
1370
- #: ../includes/maxbuttons_group_edit.php:3
1371
- msgid "Button Group Editor"
1372
- msgstr "Button Gruppen Editor"
1373
-
1374
- #~ msgid ""
1375
- #~ "From version 3 MaxButtons requires at least PHP 5.3 . You are running "
1376
- #~ "version: %s "
1377
- #~ msgstr ""
1378
- #~ "Ab der MaxButtons Version 3 ist mindestens PHP 5.3 erforderlich. Sie "
1379
- #~ "benutzen aktuell die PHP Version: %s "
1380
-
1381
- #~ msgid ""
1382
- #~ "Already found an instance of MaxButtons running. Please check if you are "
1383
- #~ "trying to activate two MaxButtons plugins and deactivate one. "
1384
- #~ msgstr ""
1385
- #~ "Sie haben bereits eine Version von MaxButtons in Funktion. Bitte "
1386
- #~ "kontrollieren Sie, ob eventuell 2 Plugins aktiviert sind und deaktivieren "
1387
- #~ "ein Plugin. "
1388
-
1389
- #~ msgid "Get MaxButtons Pro!"
1390
- #~ msgstr "MaxButtons Pro Version kaufen!"
1391
-
1392
- #~ msgid "Dashed Border"
1393
- #~ msgstr "Gestrichelter Rahmen"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/maxbuttons-nl_NL.mo ADDED
Binary file
languages/maxbuttons-nl_NL.po ADDED
@@ -0,0 +1,1830 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Plugins - WordPress Button Plugin MaxButtons - Development (trunk) in Dutch
2
+ # This file is distributed under the same license as the Plugins - WordPress Button Plugin MaxButtons - Development (trunk) package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Plugins - WordPress Button Plugin MaxButtons - "
6
+ "Development (trunk)\n"
7
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/maxbuttons\n"
8
+ "POT-Creation-Date: 2020-05-28T11:35:14+03:00\n"
9
+ "PO-Revision-Date: 2020-05-28 11:55+0300\n"
10
+ "Last-Translator: \n"
11
+ "Language-Team: \n"
12
+ "Language: nl\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
+ "X-Generator: Poedit 2.0.6\n"
18
+
19
+ #. Plugin Name of the plugin
20
+ #: assets/integrations/shortcake/shortcake.php:63
21
+ #: assets/integrations/siteorigins_builder/sitebuilder.php:8
22
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:18
23
+ #: classes/maxbuttons-class.php:291
24
+ msgid "MaxButtons"
25
+ msgstr "MaxButtons"
26
+
27
+ #. Plugin URI of the plugin
28
+ msgid "http://maxbuttons.com"
29
+ msgstr "http://maxbuttons.com"
30
+
31
+ #. Description of the plugin
32
+ msgid ""
33
+ "The best WordPress button generator. This is the free version; the Pro "
34
+ "version <a href=\"http://maxbuttons.com/?ref=mbfree\">can be found here</a>."
35
+ msgstr ""
36
+ "De beste WordPress button generator. DIT is de gratis versie; de Pro versie "
37
+ "<a href=\"http://maxbuttons.com/?ref=mbfree\">vind je hier</a>."
38
+
39
+ #. Author of the plugin
40
+ msgid "Max Foundry"
41
+ msgstr "Max Foundry"
42
+
43
+ #. Author URI of the plugin
44
+ msgid "http://maxfoundry.com"
45
+ msgstr "http://maxfoundry.com"
46
+
47
+ #: views/modals/trash-modal.php:3
48
+ msgid "Trash button"
49
+ msgstr "Prullenbak knop"
50
+
51
+ #: views/modals/trash-modal.php:4
52
+ msgid ""
53
+ "The button will be moved to trash. It can be recovered from the trash bin "
54
+ "later. Continue?"
55
+ msgstr ""
56
+ "De knop wordt naar de prullenbak verplaatst. Deze kan er later weer uit "
57
+ "worden gehaald. Doorgaan?"
58
+
59
+ #: views/modals/trash-modal.php:7 views/modals/delete-modal.php:7
60
+ #: classes/maxbuttons-class.php:530
61
+ msgid "Yes"
62
+ msgstr "Ja"
63
+
64
+ #: views/modals/trash-modal.php:9 views/modals/delete-modal.php:9
65
+ #: classes/maxbuttons-class.php:531
66
+ msgid "No"
67
+ msgstr "Nee"
68
+
69
+ #: views/modals/delete-modal.php:3
70
+ msgid "Removing button"
71
+ msgstr "Knop verwijderen"
72
+
73
+ #: views/modals/delete-modal.php:4
74
+ msgid "You are about to permanently remove this button. Are you sure?"
75
+ msgstr ""
76
+ "Je staat op het punt deze knop permanent te verwijderen. Ben je daar zeker "
77
+ "van?"
78
+
79
+ #: views/modals/copy-modal.php:4
80
+ msgid "Copy this button"
81
+ msgstr "Kopieer deze knop"
82
+
83
+ #: views/modals/copy-modal.php:8
84
+ msgid "You probably don't want to copy your button!"
85
+ msgstr "Je wilt waarschijnlijk je knop niet kopiëren!"
86
+
87
+ #: views/modals/copy-modal.php:13
88
+ msgid "Add the same button with different link"
89
+ msgstr "Voeg dezelfde knop toe met een andere link"
90
+
91
+ #: views/modals/copy-modal.php:17
92
+ msgid "Use the same button but change the text"
93
+ msgstr "Gebruik dezelfde knop maar wijzig de tekst"
94
+
95
+ #: views/modals/copy-modal.php:21
96
+ msgid "Both"
97
+ msgstr "Beide"
98
+
99
+ #: views/modals/copy-modal.php:25
100
+ #, fuzzy
101
+ #| msgid "More Options"
102
+ msgid "All Options"
103
+ msgstr "Meer opties"
104
+
105
+ #: views/modals/copy-modal.php:30
106
+ msgid "Your button has not been saved. Any changes will be lost!"
107
+ msgstr "Je knop is niet opgeslagen. Alle wijzigingen zullen verloren gaan!"
108
+
109
+ #: views/modals/copy-modal.php:32
110
+ msgid "Do you want to copy this button to a new button?"
111
+ msgstr "Wil je deze knop naar een nieuwe knop kopiëren?"
112
+
113
+ #: views/modals/copy-modal.php:36 classes/controller.php:71
114
+ msgid "Copy"
115
+ msgstr "Kopieer"
116
+
117
+ #: views/modals/copy-modal.php:38 classes/maxbuttons-class.php:533
118
+ #: classes/maxbuttons-class.php:580
119
+ msgid "Cancel"
120
+ msgstr "Annuleren"
121
+
122
+ #: includes/maxbuttons-button.php:9
123
+ msgid "Button editor"
124
+ msgstr "Knop bewerker"
125
+
126
+ #: includes/maxbuttons-button.php:52
127
+ msgid ""
128
+ "To use this button, place the following shortcode anywhere you want it to "
129
+ "appear in your site content:"
130
+ msgstr ""
131
+ "Om deze button te gebruiken plaats de volgende shortcode op elke plaats waar "
132
+ "je dit wenst in de inhoud van de site:"
133
+
134
+ #: includes/maxbuttons-button.php:55
135
+ msgid ""
136
+ "Shortcode options can make using MaxButtons much easier! Check all possible "
137
+ "options"
138
+ msgstr ""
139
+ "Shortcode opties kunnen het gebruik van Maxbuttons veel makkelijker maken! "
140
+ "Bekijk alle mogelijkheden"
141
+
142
+ #: includes/maxbuttons-button.php:57
143
+ msgid "How to make your life easier"
144
+ msgstr "Hoe het leven makkelijker te maken"
145
+
146
+ #: includes/maxbuttons-button.php:65
147
+ msgid "Add a button by using the button name"
148
+ msgstr "Voeg een knop toe door de naam van de knop te gebruiken"
149
+
150
+ #: includes/maxbuttons-button.php:69
151
+ msgid "Same button with different link"
152
+ msgstr "Dezelfde knop met een verschillende link"
153
+
154
+ #: includes/maxbuttons-button.php:73
155
+ msgid "Same button with diffent text"
156
+ msgstr "Dezelfde knop met een andere tekst"
157
+
158
+ #: includes/maxbuttons-button.php:76
159
+ msgid "All possible shortcode options"
160
+ msgstr "Alle mogelijke shortcode opties"
161
+
162
+ #: includes/maxbuttons-button.php:80
163
+ msgid "More tips"
164
+ msgstr "Meer tips"
165
+
166
+ #: includes/maxbuttons-button.php:81
167
+ msgid ""
168
+ "If you use this button on a static page, on multiple pages, or upload your "
169
+ "theme to another WordPress installation choose an unique name and use "
170
+ msgstr ""
171
+ "Als je deze button gebruikt op een statische pagina, op meerdere pagina's of "
172
+ "wanneer je jouw thema upload naar een andere WordPress installatie kies dan "
173
+ "een unieke naam en gebruik deze "
174
+
175
+ #: includes/maxbuttons-button.php:85
176
+ msgid ""
177
+ "By using this syntax when you edit and save your button it will be changed "
178
+ "everywhere it is used on your site. If you delete the button and create a "
179
+ "new one with the same name the new button will be used on your site. Easy!"
180
+ msgstr ""
181
+ "Door het gebruik van deze syntaxis wanneer je jouw knop bewerkt wordt het "
182
+ "overal op je site waar je deze gebruikt gewijzigd. Als je deze knop "
183
+ "verwijdert en een nieuwe aanmaakt met dezelfde naam zal deze op je gehele "
184
+ "site worden gebruikt. Eenvoudig!"
185
+
186
+ #: includes/maxbuttons-button.php:94
187
+ msgid "Preview"
188
+ msgstr "Voorvertoning"
189
+
190
+ #: includes/maxbuttons-button.php:108 includes/maxbuttons-button.php:109
191
+ #: includes/maxbuttons-button.php:195 includes/maxbuttons-button.php:196
192
+ #: includes/maxbuttons-button.php:200 includes/maxbuttons-button.php:201
193
+ #: includes/maxbuttons-button.php:206 includes/maxbuttons-button.php:207
194
+ #: blocks/responsive.php:205 blocks/responsive.php:222 blocks/basic.php:387
195
+ #: blocks/basic.php:509 blocks/basic.php:525 blocks/basic.php:548
196
+ #: blocks/basic.php:575 blocks/border.php:212 blocks/container.php:184
197
+ msgid "px"
198
+ msgstr "px"
199
+
200
+ #: includes/maxbuttons-button.php:111
201
+ msgid "The top is the normal button, the bottom one is the hover."
202
+ msgstr "De bovenste is de normale knop, de onderste de zwevende."
203
+
204
+ #: includes/maxbuttons-button.php:136
205
+ msgid "Change this color to see your button on a different background."
206
+ msgstr "Wijzig deze kleur om je knop op een andere achtergrond te zien."
207
+
208
+ #: includes/maxbuttons-button.php:187
209
+ msgid "Your main button for all screens. "
210
+ msgstr "Startknop voor alle schermen"
211
+
212
+ #: includes/maxbuttons-button.php:191
213
+ msgid "Add a new responsive screen"
214
+ msgstr "Nieuw responsief scherm toevoegen"
215
+
216
+ #: includes/maxbuttons-button.php:196
217
+ msgid "Shows at screen size from %s to %s"
218
+ msgstr "Zichtbaar op schermen van %s tot %s"
219
+
220
+ #: includes/maxbuttons-button.php:201
221
+ msgid "Shows at screen size smaller than %s"
222
+ msgstr "Zichtbaar op schermen kleiner dan %s"
223
+
224
+ #: includes/maxbuttons-button.php:207
225
+ msgid "Shows at screen size bigger than %s"
226
+ msgstr "Zichtbaar op schermen groter dan %s"
227
+
228
+ #: includes/maxbuttons-button.php:212
229
+ msgid "Set width and height to use this responsive screen"
230
+ msgstr "Set breedte en hoogte voor dit scherm"
231
+
232
+ #: includes/maxbuttons-list.php:26
233
+ msgid "Overview"
234
+ msgstr "Overzicht"
235
+
236
+ #: includes/maxbuttons-list.php:48 includes/maxbuttons-list.php:53
237
+ #: includes/maxbuttons-list-trash.php:128
238
+ msgid "All"
239
+ msgstr "Alles"
240
+
241
+ #: includes/maxbuttons-list.php:49 includes/maxbuttons-list.php:54
242
+ #: includes/maxbuttons-list-trash.php:130
243
+ msgid "Trash"
244
+ msgstr "Prullenbak"
245
+
246
+ #: includes/maxbuttons-list.php:83 includes/maxbuttons-list-trash.php:135
247
+ msgid "Bulk Actions"
248
+ msgstr "Acties"
249
+
250
+ #: includes/maxbuttons-list.php:86 classes/controller.php:73
251
+ msgid "Move to Trash"
252
+ msgstr "Verplaats naar prullenbak"
253
+
254
+ #: includes/maxbuttons-list.php:89 includes/maxbuttons-list.php:173
255
+ #: includes/maxbuttons-list-trash.php:136
256
+ #: includes/maxbuttons-list-trash.php:173
257
+ msgid "Restore"
258
+ msgstr "Herstellen"
259
+
260
+ #: includes/maxbuttons-list.php:90 includes/maxbuttons-list.php:175
261
+ #: includes/maxbuttons-list-trash.php:137
262
+ #: includes/maxbuttons-list-trash.php:175
263
+ msgid "Delete Permanently"
264
+ msgstr "Permanent verwijderen"
265
+
266
+ #: includes/maxbuttons-list.php:93 includes/maxbuttons-list-trash.php:139
267
+ msgid "Apply"
268
+ msgstr "Uitvoeren"
269
+
270
+ #: includes/maxbuttons-list.php:96
271
+ msgid "Empty Trash"
272
+ msgstr "Leeg de Prullenbak"
273
+
274
+ #: includes/maxbuttons-list.php:123 includes/maxbuttons-list-trash.php:145
275
+ #: assets/integrations/shortcake/shortcake.php:98
276
+ msgid "Button"
277
+ msgstr "Knop"
278
+
279
+ #: includes/maxbuttons-list.php:131 includes/maxbuttons-list-trash.php:146
280
+ msgid "Name and Description"
281
+ msgstr "Naam en omschrijving"
282
+
283
+ #: includes/maxbuttons-list.php:138 includes/maxbuttons-list-trash.php:147
284
+ msgid "Shortcode"
285
+ msgstr "Shortcode"
286
+
287
+ #: includes/maxbuttons-list.php:162
288
+ msgid "Edit"
289
+ msgstr "Bewerken"
290
+
291
+ #: includes/maxbuttons-list.php:185
292
+ msgid "or"
293
+ msgstr "of"
294
+
295
+ #: includes/maxbuttons-pro.php:11 classes/maxbuttons-class.php:316
296
+ #: classes/maxbuttons-admin-helper.php:39
297
+ msgid "Upgrade to Pro"
298
+ msgstr "Upgrade naar Pro"
299
+
300
+ #: includes/maxbuttons-pro.php:16 blocks/responsive.php:289
301
+ msgid "Buy Now"
302
+ msgstr "Nu Kopen"
303
+
304
+ #: includes/admin_header.php:15
305
+ msgid "MaxButtons:"
306
+ msgstr "MaxButtons:"
307
+
308
+ #: includes/social-share.php:17
309
+ msgid "WordPress Share Buttons"
310
+ msgstr "WordPress Share Buttons"
311
+
312
+ #: includes/social-share.php:31
313
+ msgid "MaxButtons Share Buttons"
314
+ msgstr "MaxButtons Share Buttons"
315
+
316
+ #: includes/social-share.php:33
317
+ msgid ""
318
+ "We created a brand new plugin to make your Social Share experiences better."
319
+ msgstr ""
320
+ "We creëerden een nagelnieuwe plugin om je Social Share ervaringen te "
321
+ "verbeteren."
322
+
323
+ #: includes/social-share.php:42
324
+ msgid "Features"
325
+ msgstr "Kenmerken"
326
+
327
+ #: includes/social-share.php:44
328
+ msgid "Presets to get going quickly"
329
+ msgstr "Vooraf instellingen om snel aan de slag te gaan"
330
+
331
+ #: includes/social-share.php:45
332
+ msgid ""
333
+ "Many networks: Facebook,\n"
334
+ "\t\t Twitter,\n"
335
+ "\t\t Instagram,\n"
336
+ "\t\t Pinterest,\n"
337
+ "\t\t Linkedin,\n"
338
+ "\t\t Google+,\n"
339
+ "\t\t YouTube,\n"
340
+ "\t\t Pinterest,\n"
341
+ "\t\t VKontakte,\n"
342
+ "\t\t StumbleUpon,\n"
343
+ "\t\t Reddit,\n"
344
+ "\t\t Whatsapp,\n"
345
+ "\t\t Buffer"
346
+ msgstr ""
347
+ "Veel netwerken: Facebook,\n"
348
+ "\t\t Twitter,\n"
349
+ "\t\t Instagram,\n"
350
+ "\t\t Pinterest,\n"
351
+ "\t\t Linkedin,\n"
352
+ "\t\t Google+,\n"
353
+ "\t\t YouTube,\n"
354
+ "\t\t Pinterest,\n"
355
+ "\t\t VKontakte,\n"
356
+ "\t\t StumbleUpon,\n"
357
+ "\t\t Reddit,\n"
358
+ "\t\t Whatsapp,\n"
359
+ "\t\t Buffer"
360
+
361
+ #: includes/social-share.php:59
362
+ msgid "Customizable layout"
363
+ msgstr "Aanpasbare layout"
364
+
365
+ #: includes/social-share.php:63
366
+ msgid "Only with MaxButton PRO:"
367
+ msgstr "Alleen met MaxButton PRO:"
368
+
369
+ #: includes/social-share.php:66
370
+ msgid "Customize Twitter hashtag per post for maximum SEO value"
371
+ msgstr "Pas Twitter hashtag aan per post voor maximum SEO waarde"
372
+
373
+ #: includes/social-share.php:67
374
+ msgid "More options for customization"
375
+ msgstr "Meer aanpassingsopties"
376
+
377
+ #: includes/social-share.php:68
378
+ msgid "Add custom buttons via MaxButtons"
379
+ msgstr "Voeg aangepaste knoppen toe via MaxButtons"
380
+
381
+ #: includes/social-share.php:74
382
+ msgid "Install for Free!"
383
+ msgstr "Installeer gratis!"
384
+
385
+ #: includes/social-share.php:75
386
+ msgid "Check plugin on WordPress site"
387
+ msgstr "Check plugin op de WordPress site"
388
+
389
+ #: includes/maxbuttons-list-trash.php:25 includes/maxbuttons-list-trash.php:53
390
+ #: classes/controllers/listController.php:107
391
+ #: classes/controllers/listController.php:143
392
+ msgid "Restored 1 button."
393
+ msgstr "1 knop teruggezet."
394
+
395
+ #: includes/maxbuttons-list-trash.php:29
396
+ #: classes/controllers/listController.php:111
397
+ msgid "Restored "
398
+ msgstr "Teruggezet "
399
+
400
+ #: includes/maxbuttons-list-trash.php:29 includes/maxbuttons-list-trash.php:46
401
+ #: classes/controllers/listController.php:111
402
+ #: classes/controllers/listController.php:130
403
+ msgid " buttons."
404
+ msgstr " knoppen."
405
+
406
+ #: includes/maxbuttons-list-trash.php:42 includes/maxbuttons-list-trash.php:57
407
+ #: classes/controllers/listController.php:126
408
+ #: classes/controllers/listController.php:147
409
+ msgid "Deleted 1 button."
410
+ msgstr "1 knop verwijderd."
411
+
412
+ #: includes/maxbuttons-list-trash.php:46
413
+ #: classes/controllers/listController.php:130
414
+ msgid "Deleted "
415
+ msgstr "Verwijderd "
416
+
417
+ #: includes/maxbuttons-list-trash.php:110
418
+ msgid "MaxButtons: Button List"
419
+ msgstr "MaxButtons: Lijst van knoppen"
420
+
421
+ #: includes/maxbuttons-list-trash.php:120 classes/maxbuttons-class.php:308
422
+ #: classes/controller.php:69
423
+ msgid "Add New"
424
+ msgstr "Nieuwe toevoegen"
425
+
426
+ #: includes/maxbuttons-list-trash.php:148
427
+ msgid "Actions"
428
+ msgstr "Acties"
429
+
430
+ #: includes/maxbuttons-settings.php:10 includes/maxbuttons-settings.php:19
431
+ #: includes/maxbuttons-settings.php:22 classes/maxbuttons-class.php:323
432
+ #: classes/maxbuttons-admin-helper.php:43
433
+ msgid "Settings"
434
+ msgstr "Instellingen"
435
+
436
+ #: includes/maxbuttons-settings.php:29
437
+ msgid "MaxButtons User Level for editing buttons"
438
+ msgstr "MaxButtons gebruikers niveau voor het bewerken van knoppen"
439
+
440
+ #: includes/maxbuttons-settings.php:39
441
+ msgid "For more details on user roles and permissions, click %s here%s."
442
+ msgstr ""
443
+ "Voor meer details over gebruikers rol en toestemmingen, klik %s hier%s."
444
+
445
+ #: includes/maxbuttons-settings.php:54
446
+ msgid "Hide \"add button\" in post editor toolbar"
447
+ msgstr "Verberg \"add button\" in post editor toolbar"
448
+
449
+ #: includes/maxbuttons-settings.php:73
450
+ msgid ""
451
+ "Recommended, only turn off in case of issues. You will have to clear your "
452
+ "cache after changing this setting"
453
+ msgstr ""
454
+ "Aangeraden word dit alleen bij problemen uit te zetten. Je zult je cache "
455
+ "moeten schoonmaken nadat je deze setting hebt gewijzigd"
456
+
457
+ #: includes/maxbuttons-settings.php:74
458
+ msgid "Minify Button CSS"
459
+ msgstr "Verklein Button CSS"
460
+
461
+ #: includes/maxbuttons-settings.php:86
462
+ msgid "Hide description field"
463
+ msgstr "Verberg het veld beschrijving"
464
+
465
+ #: includes/maxbuttons-settings.php:98
466
+ msgid "Preview in Border Box mode"
467
+ msgstr "Preview in Border Box mode"
468
+
469
+ #: includes/maxbuttons-settings.php:99
470
+ msgid ""
471
+ "A lot of modern themes render their templates as \"border box\". If you "
472
+ "notice that padding\n"
473
+ " \t\t\t\t\t\t and borders looks differently on the "
474
+ "site compared to preview, try to turn this option on"
475
+ msgstr ""
476
+ "Veel moderne thema's geven hun templates weer als een \"border box\". Als je "
477
+ "ziet dat padding\n"
478
+ " \t\t\t\t\t\t en borders er anders uitzien op de site "
479
+ "dan in de preview, probeer dan deze optie aan te zetten"
480
+
481
+ #: includes/maxbuttons-settings.php:126
482
+ msgid "Additional allowed link protocols"
483
+ msgstr "Toegevoegde toegestane link protocollen"
484
+
485
+ #: includes/maxbuttons-settings.php:127
486
+ msgid "Separate multiple protocols with comma"
487
+ msgstr "Scheid meerdere waardes van elkaar met een komma. "
488
+
489
+ #: includes/maxbuttons-settings.php:128
490
+ msgid ""
491
+ "You can add link formats not regarded as \"safe\" by WordPress. Use this if "
492
+ "links are removed or lose their protocol ( xx:// ). For instance: \"file,sms,"
493
+ "skype\" ."
494
+ msgstr ""
495
+ "Je kunt link formats die door WordPress niet als veilig worden gezien "
496
+ "gebruiken. Gebruik dit wanneer links zijn verwijderd of hun protocol "
497
+ "verlezen (xx://). Voorbeeld: \"file,sms,skype\"."
498
+
499
+ #: includes/maxbuttons-settings.php:145
500
+ msgid "Clear button cache"
501
+ msgstr "Wis de knop cache"
502
+
503
+ #: includes/maxbuttons-settings.php:147
504
+ msgid ""
505
+ "Maxbuttons caches the style output allowing for lightning fast display of "
506
+ "your buttons. In the event\n"
507
+ " \t\t\tthis cache needs to be flushed and rebuilt you can reset the "
508
+ "cache here."
509
+ msgstr ""
510
+ "Maxbuttons zet de stijl output in cache geheugen voor een razendsnelle "
511
+ "display van je buttons.\n"
512
+ "Voor het geval dat deze cache verwijderd en herschapen moet worden kan je de "
513
+ "cache hier resetten."
514
+
515
+ #: includes/maxbuttons-settings.php:149
516
+ msgid "Reset Cache"
517
+ msgstr "Reset Cache"
518
+
519
+ #: includes/maxbuttons-settings.php:158 blocks/advanced.php:107
520
+ msgid "Advanced"
521
+ msgstr "Geavanceerd"
522
+
523
+ #: includes/maxbuttons-settings.php:165
524
+ msgid "Retry Database migration"
525
+ msgstr "Probeer Database migratie opnieuw"
526
+
527
+ #: includes/maxbuttons-settings.php:166
528
+ msgid ""
529
+ "In case the upgrade functionality failed to move your old buttons from "
530
+ "MaxButtons before version 3, you can do so here manually. <strong>Attention</"
531
+ "strong> The new database table (maxbuttonsv3) *must* be empty, and the old "
532
+ "database table *must* contain buttons otherwise this will not run. Run this "
533
+ "<strong>at your own risk</strong> - it is strongly advised to make a backup "
534
+ "before doing so."
535
+ msgstr ""
536
+ "In het geval dat de verplaatsing van je oude buttons van MaxButtons van voor "
537
+ "versie 3 functioneel faalde kan je dat hier handmatig doen. "
538
+ "<strong>Attentie</strong> De nieuwe database tabel (maxbuttonsv3) *moet* "
539
+ "leeg zijn en de oude database tabel *moet* buttons bevatten anders zal dit "
540
+ "niet werken. Doe dit <strong>op eigen risico</strong> - het wordt ten "
541
+ "sterkste aangeraden om een backup te maken alvorens dit te doen."
542
+
543
+ #: includes/maxbuttons-settings.php:167
544
+ msgid "Remigrate"
545
+ msgstr "Remigreren"
546
+
547
+ #: includes/maxbuttons-settings.php:178
548
+ #, fuzzy
549
+ #| msgid "Retry Database migration"
550
+ msgid "Retry Responsive Migration"
551
+ msgstr "Probeer Database migratie opnieuw"
552
+
553
+ #: includes/maxbuttons-settings.php:179
554
+ msgid ""
555
+ "In case you still have legacy responsive data ( before version 8 ) and this "
556
+ "was not migrated for some reason. <strong>Warning</strong> Create a "
557
+ "database backup. Use at your own risk. "
558
+ msgstr ""
559
+ "Indien u nog responsieve knoppen heeft van voor versie 8 en deze waren om de "
560
+ "een of andere reden niet gemigreerd. <strong>Waarschuwing!</strong> Make een "
561
+ "database backup. Gebruik op eigen risico."
562
+
563
+ #: includes/maxbuttons-settings.php:180
564
+ #, fuzzy
565
+ #| msgid "Remigrate"
566
+ msgid "Remigrate Responsive"
567
+ msgstr "Remigreren"
568
+
569
+ #: includes/maxbuttons-settings.php:190
570
+ msgid "UTF8 Table Fix"
571
+ msgstr "UTF8 Table Fix"
572
+
573
+ #: includes/maxbuttons-settings.php:193
574
+ msgid ""
575
+ "WARNING: We strongly recommend backing up your database before altering the "
576
+ "charset of the MaxButtons table in your WordPress database."
577
+ msgstr ""
578
+ "WAARSCHUWING: Wij raden ten sterkste aan om een backup van je database te "
579
+ "maken alvorens de tekenset van de MaxButtons tabel in je WordPress database "
580
+ "te wijzigen."
581
+
582
+ #: includes/maxbuttons-settings.php:195
583
+ msgid ""
584
+ "The button below should help fix the \"foreign character issue\" some people "
585
+ "experience when using MaxButtons. If you use foreign characters in your "
586
+ "buttons and after saving see ????, use this button."
587
+ msgstr ""
588
+ "De onderstaande knop zou het \"vreemde tekens probleem\" dat sommige "
589
+ "MaxButtons gebruikers ondervinden kunnen helpen oplossen. Als je vreemde "
590
+ "tekens gebruikt in je knoppen en na het opslaan ervan ???? ziet, gebruik "
591
+ "deze dan."
592
+
593
+ #: includes/maxbuttons-settings.php:198
594
+ msgid "Change MaxButtons Table To UTF8"
595
+ msgstr "Wijzig de MaxButtons tabel naar UTF8"
596
+
597
+ #: includes/maxbuttons-settings.php:229
598
+ msgid "Bulk edit"
599
+ msgstr "Bulkbewerken"
600
+
601
+ #: includes/maxbuttons-settings.php:232
602
+ msgid ""
603
+ "Using Bulk editor MAY and probably WILL destroy your buttons. In case you "
604
+ "wish to prevent this - please BACKUP all your buttons before proceeding!"
605
+ msgstr ""
606
+ "Gebruikmaking van de Bulk editor KAN en ZAL hoogstwaarschijnlijk je buttons "
607
+ "vernietigen. Om dit te voorkomen BACKUP s.v.p. al je buttons alvorens door "
608
+ "te gaan!"
609
+
610
+ #: includes/maxbuttons-settings.php:234
611
+ msgid "Field"
612
+ msgstr "Veld"
613
+
614
+ #: includes/maxbuttons-settings.php:236
615
+ msgid "Search"
616
+ msgstr "Zoeken"
617
+
618
+ #: includes/maxbuttons-settings.php:237 includes/maxbuttons-settings.php:243
619
+ msgid "Replace"
620
+ msgstr "Vervangen"
621
+
622
+ #: includes/maxbuttons-settings.php:240
623
+ msgid "I understand that this may destroy all my buttons"
624
+ msgstr "Ik begrijp dat dit al mijn knoppen kan verwijderen"
625
+
626
+ #: includes/maxbuttons-settings.php:249
627
+ msgid "I need to bulk edit something"
628
+ msgstr "Ik moet overal iets wijzigen"
629
+
630
+ #: includes/maxbuttons-welcome.php:5
631
+ msgid "Welcome to MaxButtons!"
632
+ msgstr "Welkom bij MaxButtons!"
633
+
634
+ #: includes/maxbuttons-welcome.php:7
635
+ msgid "To get you started, %s Create your first button %s"
636
+ msgstr "Om te beginnen, %s Creëer je eerste knop %s"
637
+
638
+ #: includes/maxbuttons-welcome.php:10
639
+ msgid "Some links that may be helpful:"
640
+ msgstr "Enige links die van pas kunnen komen:"
641
+
642
+ #: includes/maxbuttons-welcome.php:12
643
+ msgid "Creating buttons with MaxButtons"
644
+ msgstr "Knoppen aanmaken met MaxButtons"
645
+
646
+ #: includes/maxbuttons-welcome.php:13
647
+ msgid "Support Forums"
648
+ msgstr "Support Forums"
649
+
650
+ #: includes/maxbuttons-welcome.php:18
651
+ msgid "Organize your Designs"
652
+ msgstr "Orgineer de ontwerpen"
653
+
654
+ #: includes/maxbuttons-welcome.php:20
655
+ msgid ""
656
+ "MaxButtons uses shortcodes. These are small snippets you can copy into your "
657
+ "posts and pages. You will see a button in your post editor which will make "
658
+ "this easier."
659
+ msgstr ""
660
+ "Maxbuttons gebruikt shortcodes. Dit zijn kleine stukjes tekst die je in de "
661
+ "pagina's en artikelen kan knippen en plakken. Er is een aparte knop in de "
662
+ "editor die daarbij kan assisteren."
663
+
664
+ #: includes/maxbuttons-welcome.php:22
665
+ msgid "Do Not Repeat!"
666
+ msgstr "Niet herhalen!"
667
+
668
+ #: includes/maxbuttons-welcome.php:22
669
+ msgid ""
670
+ "You can use your button design many times. Even with a different text and "
671
+ "link!"
672
+ msgstr ""
673
+ "Je kan je knopontwerpen meerdere keren gebruiken. Zelfs met een andere tekst "
674
+ "en link!"
675
+
676
+ #: includes/maxbuttons-no-simplexml.php:6
677
+ msgid "Enable SimpleXML"
678
+ msgstr "Zet SimpleXML aan"
679
+
680
+ #: includes/maxbuttons-no-simplexml.php:21
681
+ msgid "PHP Module SimpleXML not found. This module will not work"
682
+ msgstr "PHP Module SimpleXML niet gevonden. Deze module werkt niet"
683
+
684
+ #: includes/maxbuttons-no-simplexml.php:23
685
+ msgid ""
686
+ "To enable this module please install the SimpleXML PHP module. If you don't "
687
+ "know how, ask your support from your\n"
688
+ "\thosting provider"
689
+ msgstr ""
690
+ "Om dit module te activeren installeer dan de SimpleXML PHP module. Als je "
691
+ "niet weet hoe je dat moet doen, vraag dan ondersteuning van je\n"
692
+ "\thosting provider"
693
+
694
+ #: includes/maxbuttons-no-simplexml.php:27
695
+ msgid "SimpleXML installation"
696
+ msgstr "SimpleXML installatie"
697
+
698
+ #: includes/maxbuttons-support.php:18 classes/maxbuttons-class.php:330
699
+ #: classes/maxbuttons-admin-helper.php:47
700
+ msgid "Support"
701
+ msgstr "Ondersteuning"
702
+
703
+ #: includes/maxbuttons-support.php:19
704
+ msgid "Go to support"
705
+ msgstr "Ga naar ondersteuning"
706
+
707
+ #: includes/maxbuttons-support.php:28
708
+ msgid "%sSupport Forums%s."
709
+ msgstr "%sSupport Forums%s."
710
+
711
+ #: includes/maxbuttons-support.php:32
712
+ msgid ""
713
+ "You may be asked to provide the information below to help troubleshoot your "
714
+ "issue."
715
+ msgstr ""
716
+ "Je kunt gevraagd worden onderstaande informatie te verstrekken om je "
717
+ "probleem te onderzoeken."
718
+
719
+ #: assets/integrations/shortcake/shortcake.php:102
720
+ msgid "Select a button"
721
+ msgstr "Selecteer een button"
722
+
723
+ #: assets/integrations/shortcake/shortcake.php:106
724
+ msgid "Custom URL [optional]"
725
+ msgstr "Pas de URL aan [optioneell]"
726
+
727
+ #: assets/integrations/shortcake/shortcake.php:116
728
+ msgid "Custom Text [optional]"
729
+ msgstr "Pas tekst aan"
730
+
731
+ #: assets/integrations/siteorigins_builder/fields/maxbutton.class.php:68
732
+ msgid "Choose Maxbutton"
733
+ msgstr "Kies Maxbutton"
734
+
735
+ #: assets/integrations/siteorigins_builder/fields/maxbutton.class.php:69
736
+ msgid "Set Media"
737
+ msgstr "Zet media"
738
+
739
+ #: assets/integrations/siteorigins_builder/fields/maxbutton.class.php:117
740
+ msgid "Selected Button"
741
+ msgstr "Geselecteerde knop"
742
+
743
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:20
744
+ msgid "MaxButtons for the page builder."
745
+ msgstr "MaxButtons voor de pagina bouwer."
746
+
747
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:29
748
+ msgid "Select a maxbutton"
749
+ msgstr "Selecteer een maxbutton"
750
+
751
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:35
752
+ msgid "Button text [optional]"
753
+ msgstr "Knop tekst [optioneel]"
754
+
755
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:40
756
+ msgid "Destination URL [optional]"
757
+ msgstr "Bestemmingsadres URL [optional]"
758
+
759
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:46
760
+ msgid "Open in a new window [optional]"
761
+ msgstr "Open in een nieuw tabblad [optioneel]"
762
+
763
+ #: maxbuttons.php:27
764
+ msgid ""
765
+ "Already found an instance of MaxButtons running. Please check if you are "
766
+ "trying to activate two MaxButtons plugins and deactivate one. "
767
+ msgstr ""
768
+ "MaxButtons draait al op deze machine. Check s.v.p. of je tracht een "
769
+ "nieuwe(re) versie te starten en een oude(re) te deactiveren. "
770
+
771
+ #: classes/maxbuttons-class.php:81
772
+ msgid "Fatal Problem with MaxButtons"
773
+ msgstr "Fataal probleem met MaxButtons"
774
+
775
+ #: classes/maxbuttons-class.php:82
776
+ msgid ""
777
+ "Can't read directory. %s Reinstall the plugin or check directory permissions"
778
+ msgstr ""
779
+ "Kan de directory niet lezen. %s Herinstalleer de plugin of controleer de "
780
+ "rechten van de directory"
781
+
782
+ #: classes/maxbuttons-class.php:290
783
+ msgid "MaxButtons: Buttons"
784
+ msgstr "MaxButtons: Knoppen"
785
+
786
+ #: classes/maxbuttons-class.php:302 classes/maxbuttons-class.php:708
787
+ #: classes/maxbuttons-admin-helper.php:36
788
+ msgid "Buttons"
789
+ msgstr "Knoppen"
790
+
791
+ #: classes/maxbuttons-class.php:307
792
+ msgid "MaxButtons: Add/Edit Button"
793
+ msgstr "MaxButtons: Bewerk/Voeg knop toe"
794
+
795
+ #: classes/maxbuttons-class.php:315
796
+ msgid "MaxButtons: Upgrade to Pro"
797
+ msgstr "MaxButtons: Upgrade naar Pro"
798
+
799
+ #: classes/maxbuttons-class.php:322
800
+ msgid "MaxButtons: Settings"
801
+ msgstr "MaxButtons: Instellingen"
802
+
803
+ #: classes/maxbuttons-class.php:329
804
+ msgid "MaxButtons: Support"
805
+ msgstr "MaxButtons: Ondersteuning"
806
+
807
+ #: classes/maxbuttons-class.php:337
808
+ msgid "MaxButtons: Share Buttons"
809
+ msgstr "MaxButtons: Share Buttons"
810
+
811
+ #: classes/maxbuttons-class.php:338
812
+ msgid "Share Buttons"
813
+ msgstr "Deel knoppen"
814
+
815
+ #: classes/maxbuttons-class.php:490
816
+ #, fuzzy
817
+ #| msgid "You have unsaved data, are you sure you want to leave the page?"
818
+ msgid "Are you sure you want to remove this screen?"
819
+ msgstr ""
820
+ "Je hebt wijzigingen die niet zijn opgeslagen. Weet je zeker dat je deze "
821
+ "pagina wilt verlaten?"
822
+
823
+ #: classes/maxbuttons-class.php:532
824
+ msgid "OK"
825
+ msgstr "Oké"
826
+
827
+ #: classes/maxbuttons-class.php:554
828
+ msgid "You have unsaved data, are you sure you want to leave the page?"
829
+ msgstr ""
830
+ "Je hebt wijzigingen die niet zijn opgeslagen. Weet je zeker dat je deze "
831
+ "pagina wilt verlaten?"
832
+
833
+ #: classes/maxbuttons-class.php:576
834
+ msgid "Insert Button into Editor"
835
+ msgstr "Zet knop in de editor"
836
+
837
+ #: classes/maxbuttons-class.php:577
838
+ msgid "Use this Button"
839
+ msgstr "Gebruik deze knop"
840
+
841
+ #: classes/maxbuttons-class.php:578
842
+ msgid "Loading your buttons"
843
+ msgstr "Bezig met het laden van je buttons"
844
+
845
+ #: classes/maxbuttons-class.php:579
846
+ msgid ""
847
+ "Click on a button from the list below to place the button shortcode in the "
848
+ "editor."
849
+ msgstr ""
850
+ "Klik op een knop in de lijst hieronder om de knop shortcode in de editor te "
851
+ "plaatsen."
852
+
853
+ #: classes/maxbuttons-class.php:581
854
+ msgid "Select a MaxButton"
855
+ msgstr "Selecteer een MaxButton"
856
+
857
+ #: classes/maxbuttons-class.php:584 classes/admin-class.php:314
858
+ msgid "Button URL"
859
+ msgstr "Knop url"
860
+
861
+ #: classes/maxbuttons-class.php:585 classes/admin-class.php:327
862
+ msgid "Button Text"
863
+ msgstr "Knoptekst"
864
+
865
+ #: classes/maxbuttons-class.php:586
866
+ msgid ""
867
+ "If you want to change the URL or Text of the Button, enter the appropiate "
868
+ "field. If you want to use the button values, just click Add to editor"
869
+ msgstr ""
870
+ "Als je de URL of de tekst van de button wilt wijzigen vul het betreffende "
871
+ "veld in. Als je de waardes van de button wilt gebruiken klik dan alleen op "
872
+ "Voeg toe van de editor"
873
+
874
+ #: classes/maxbuttons-class.php:587
875
+ msgid "Add to Editor"
876
+ msgstr "Voeg toe aan de Editor"
877
+
878
+ #: classes/maxbuttons-class.php:623
879
+ msgid "Add Button"
880
+ msgstr "Knop toevoegen"
881
+
882
+ #: classes/maxbuttons-class.php:719
883
+ msgid "%sUpgrade to Pro Version%s"
884
+ msgstr "%sUpgrade naar de Pro Versie%s"
885
+
886
+ #: classes/maxbuttons-admin-helper.php:27
887
+ msgid "Upgrade to MaxButtons Pro today! %sClick Here%s"
888
+ msgstr "Upgrade naar MaxButtons Pro vandaag! %sKlik Hier%s"
889
+
890
+ #: classes/maxbuttons-admin-helper.php:235
891
+ msgid "Go to the first page"
892
+ msgstr "Ga naar de eerste pagina"
893
+
894
+ #: classes/maxbuttons-admin-helper.php:241
895
+ msgid "Go to the previous page"
896
+ msgstr "Ga naar de vorige pagina"
897
+
898
+ #: classes/maxbuttons-admin-helper.php:244
899
+ msgid "of"
900
+ msgstr "van"
901
+
902
+ #: classes/maxbuttons-admin-helper.php:250
903
+ msgid "Go to the next page"
904
+ msgstr "Ga naar de volgende pagina"
905
+
906
+ #: classes/maxbuttons-admin-helper.php:256
907
+ msgid "Go to the last page"
908
+ msgstr "Ga naar de laatste pagina"
909
+
910
+ #: classes/maxbuttons-admin-helper.php:270
911
+ msgid "Rate us Please!"
912
+ msgstr "Geef s.v.p. uw waardering!"
913
+
914
+ #: classes/maxbuttons-admin-helper.php:271
915
+ msgid ""
916
+ "Your rating is the simplest way to support MaxButtons. We really appreciate "
917
+ "it!"
918
+ msgstr ""
919
+ "Je waardering is de eenvoudigste weg om MaxButtons te ondersteunen. Wij "
920
+ "stellen dat echt op prijs!"
921
+
922
+ #: classes/maxbuttons-admin-helper.php:274
923
+ msgid "I've already left a review"
924
+ msgstr "Ik heb al een review achtergelaten"
925
+
926
+ #: classes/maxbuttons-admin-helper.php:275
927
+ msgid "Maybe Later"
928
+ msgstr "Misschien later"
929
+
930
+ #: classes/maxbuttons-admin-helper.php:276
931
+ msgid "Sure! I'd love to!"
932
+ msgstr "Zeker! Doe ik graag!"
933
+
934
+ #: classes/maxbuttons-admin-helper.php:292
935
+ msgid "Welcome to MaxButtons Social Sharing"
936
+ msgstr "Welkom bij MaxButtons Social Sharing"
937
+
938
+ #: classes/maxbuttons-admin-helper.php:293
939
+ msgid ""
940
+ "Social Sharing sets are collections of buttons that are primarily used to "
941
+ "promote your social media profiles on your site."
942
+ msgstr ""
943
+ "Social Sharing sets zijn collecties van buttons die in eerste instantie "
944
+ "gebruikt worden om de sociale media profielen op je site te promoten."
945
+
946
+ #: classes/maxbuttons-admin-helper.php:294
947
+ msgid ""
948
+ "MaxButtons comes with 5 terrific free sets of Social Sharing buttons for you "
949
+ "to use: Notched Box Social Share, Modern Social Share, Round White Social "
950
+ "Share, Social Share Squares, Minimalistic Share Buttons. You can also add "
951
+ "any other button you have made to a collection of Social Sharing buttons."
952
+ msgstr ""
953
+ "MaxButtons bevat 5 fantastische gratis sets Social Sharing knoppen voor jou "
954
+ "om te gebruiken: Notched Box Social Share, Modern Social Share, Round White "
955
+ "Social Share, Social Share Squares, Minimalistic Share Buttons. Ook kan je "
956
+ "iedere andere knop die je zelf gemaakt hebt toevoegen aan een collectie van "
957
+ "Social Sharing buttons."
958
+
959
+ #: classes/maxbuttons-admin-helper.php:296
960
+ msgid ""
961
+ "After clicking the Get Started link below you’ll come to the ‘Select your "
962
+ "buttons’ page. Here you will see the listing of free Social Sharing sets "
963
+ "plus all of the buttons that you have on your site can be used in the "
964
+ "collection that you are putting together."
965
+ msgstr ""
966
+ "Na op de Aan de slag link hieronder geklikt te hebben kom je op de "
967
+ "'Selecteer je buttons' pagina. Hier zie je een lijst van gratis Social "
968
+ "Sharing sets inclusief alle knoppen op je site die je kunt gebruiken voor de "
969
+ "collectie die je aan het maken bent."
970
+
971
+ #: classes/maxbuttons-admin-helper.php:298
972
+ msgid ""
973
+ "You build your Social Sharing set by selecting the buttons you want in your "
974
+ "collection. Then click the Add selected buttons button in the lower right. "
975
+ "Aside from being included in your collection your selected buttons are now "
976
+ "included with all of the other buttons on your site. You can edit those "
977
+ "buttons by going to the Buttons section in the Nav bar on the left."
978
+ msgstr ""
979
+ "Je bouwt je Social Sharing set door de knoppen te selecteren die je in jouw "
980
+ "collectie wilt hebben. Daarna klik je op de Voeg geselecteerde knoppen toe "
981
+ "knop rechts onder. Behalve toegevoegd te zijn in jouw collectie zijn jouw "
982
+ "geselecteerde knoppen nu ook beschikbaar samen met alle overige knoppen van "
983
+ "je site. Je kunt deze knoppen bewerken door naar de Knoppen sectie in de "
984
+ "Navigatie werkbalk links te gaan."
985
+
986
+ #: classes/maxbuttons-admin-helper.php:300
987
+ msgid ""
988
+ "By upgrading to %sMaxButtons Pro%s you get an 13 additional Social Sharing "
989
+ "button sets along with the ability to build your own Social Sharing sets "
990
+ "using your own icons, using Google Fonts in your Social Sharing buttons "
991
+ "along with all of the features that come with our premium product."
992
+ msgstr ""
993
+ "Door te upgraden naar %sMaxButtons Pro%s krijg je 13 additionele Social "
994
+ "Sharing button sets samen met de mogelijkheid jouw eigen Social Sharing sets "
995
+ "te bouwen met jouw eigen icons, met gebruikmaking van Google Fonts in je "
996
+ "Social Sharing buttons naast alle features die ons premium product bevat."
997
+
998
+ #: classes/maxbuttons-admin-helper.php:302
999
+ msgid ""
1000
+ "Click Get Started and we will have your social media icons up and running on "
1001
+ "your site super quick!"
1002
+ msgstr ""
1003
+ "Klik op Aan de slag en we hebben je social media icons supersnel aan de gang "
1004
+ "op je site!"
1005
+
1006
+ #: classes/maxbuttons-admin-helper.php:304
1007
+ msgid "The Max Foundry Team"
1008
+ msgstr "Het Max Foundry Team"
1009
+
1010
+ #: classes/maxbuttons-admin-helper.php:307
1011
+ msgid "Get Started"
1012
+ msgstr "Aan de slag"
1013
+
1014
+ #: classes/field.php:79
1015
+ msgid "Default:"
1016
+ msgstr "Standaard:"
1017
+
1018
+ #: classes/controllers/editorController.php:38
1019
+ msgid ""
1020
+ "Maxbuttons button id is zero. Your data is not saved correctly! Please check "
1021
+ "your database."
1022
+ msgstr ""
1023
+ "Het id van de MaxButtons button is nul. Je data is niet correct opgeslagen! "
1024
+ "Check s.v.p. je database."
1025
+
1026
+ #: classes/controllers/editorController.php:46
1027
+ msgid ""
1028
+ "MaxButtons could not find this button in the database. It might not be "
1029
+ "possible to save this button! Please check your database or contact support! "
1030
+ msgstr ""
1031
+ "MaxButtons kon deze knop niet in de database vinden. Het is waarschijnlijk "
1032
+ "niet mogelijk deze knop op te slaan! Check s.v.p. je database of vraag "
1033
+ "ondersteuning! "
1034
+
1035
+ #: classes/controllers/editorController.php:144
1036
+ msgid "Maxbuttons Error: Button id should never be zero"
1037
+ msgstr "Maxbuttons Fout: Button id kan nooit nul zijn"
1038
+
1039
+ #: classes/controllers/listController.php:70
1040
+ msgid "Something went wrong with the form, nonce not verified"
1041
+ msgstr "Er ging iets mis met het formulier, nonce niet geverifieerd"
1042
+
1043
+ #: classes/controllers/listController.php:87
1044
+ #: classes/controllers/listController.php:139
1045
+ msgid "Moved 1 button to the trash."
1046
+ msgstr "1 knop naar de prullenbak verplaatst."
1047
+
1048
+ #: classes/controllers/listController.php:91
1049
+ msgid "Moved "
1050
+ msgstr "Verplaatst "
1051
+
1052
+ #: classes/controllers/listController.php:91
1053
+ msgid " buttons to the trash."
1054
+ msgstr " knoppen naar de prullenbak."
1055
+
1056
+ #: classes/controllers/listController.php:152
1057
+ msgid "Emptied Trash"
1058
+ msgstr "Prullenbak geleegd"
1059
+
1060
+ #: classes/admin-class.php:32
1061
+ msgid "[Site Default]"
1062
+ msgstr "Site-standaard"
1063
+
1064
+ #: classes/admin-class.php:215
1065
+ msgid "Click on a button to select it and add the shortcode to the editor"
1066
+ msgstr ""
1067
+ "Klik op een knop om hem te selecteren en voeg de shortcode toe in de editor"
1068
+
1069
+ #: classes/admin-class.php:225
1070
+ msgid "You didn't create any buttons yet!"
1071
+ msgstr "Je hebt nog geen knop aangemaakt!"
1072
+
1073
+ #: classes/admin-class.php:226
1074
+ msgid "Click %shere%s to add one"
1075
+ msgstr "Klik %shier%s om er een toe te voegen"
1076
+
1077
+ #: classes/admin-class.php:306
1078
+ msgid "Change the options to add shortcode attributes. "
1079
+ msgstr "Wijzig de opties om shortcode attributes toe te voegen. "
1080
+
1081
+ #: classes/admin-class.php:339
1082
+ msgid "More Options"
1083
+ msgstr "Meer opties"
1084
+
1085
+ #: classes/admin-class.php:346 blocks/basic.php:327
1086
+ msgid "Open in New Window"
1087
+ msgstr "Open in nieuw venster"
1088
+
1089
+ #: classes/admin-class.php:361 blocks/basic.php:337
1090
+ msgid "Use rel=\"nofollow\""
1091
+ msgstr "Gebruik rel=\"nofollow\""
1092
+
1093
+ #: classes/admin-class.php:379 blocks/basic.php:347
1094
+ msgid "Button Tooltip"
1095
+ msgstr "Knop Tooltip"
1096
+
1097
+ #: classes/admin-class.php:396 blocks/advanced.php:122
1098
+ msgid "Extra classes"
1099
+ msgstr "Extra klassen"
1100
+
1101
+ #: classes/screen.php:70
1102
+ msgid "Main"
1103
+ msgstr "Hoofdknop"
1104
+
1105
+ #: classes/screen.php:89
1106
+ msgid "Add"
1107
+ msgstr "Toevoegen"
1108
+
1109
+ #: classes/controller.php:70
1110
+ msgid "Save"
1111
+ msgstr "Bewaar"
1112
+
1113
+ #: classes/controller.php:74
1114
+ msgid "Delete"
1115
+ msgstr "Verwijderen"
1116
+
1117
+ #: classes/max-utils.php:38
1118
+ msgid "Nonce not verified ("
1119
+ msgstr "Nonce is niet geverifiëerd ("
1120
+
1121
+ #: classes/max-utils.php:164
1122
+ msgid "Small phones, < 480px"
1123
+ msgstr "Small phones, < 480px"
1124
+
1125
+ #: classes/max-utils.php:165
1126
+ msgid "Small phones (landscape) "
1127
+ msgstr "Kleine telefoons (landscape) "
1128
+
1129
+ #: classes/max-utils.php:166
1130
+ msgid "Small phones (portrait), < 320px "
1131
+ msgstr "Small phones (portrait), < 320px "
1132
+
1133
+ #: classes/max-utils.php:167
1134
+ msgid "Medium-size (smart)phone (480px-768px)"
1135
+ msgstr "Medium-size (smart)phone (480px-768px)"
1136
+
1137
+ #: classes/max-utils.php:168
1138
+ msgid "Ipad (all) / Large phones (768px-1024px)"
1139
+ msgstr "Ipad (all) / Large phones (768px-1024px)"
1140
+
1141
+ #: classes/max-utils.php:169
1142
+ msgid "Ipad landscape"
1143
+ msgstr "Ipad landscape"
1144
+
1145
+ #: classes/max-utils.php:170
1146
+ msgid "Ipad portrait"
1147
+ msgstr "Ipad portret"
1148
+
1149
+ #: classes/max-utils.php:171
1150
+ msgid "Desktop, > 1224px"
1151
+ msgstr "Desktop, > 1224px"
1152
+
1153
+ #: classes/max-utils.php:172
1154
+ msgid "Large desktops"
1155
+ msgstr "Grote desktops"
1156
+
1157
+ #: classes/max-utils.php:173
1158
+ msgid "Custom size"
1159
+ msgstr "Aangepast formaat"
1160
+
1161
+ #: classes/max-utils.php:177
1162
+ msgid "Optimized for small smartphones ( screen sizes under 480px )"
1163
+ msgstr ""
1164
+ "Geoptimaliseerd voor kleine smartphones (schermgroottes kleiner dan 480px)"
1165
+
1166
+ #: classes/max-utils.php:178
1167
+ msgid ""
1168
+ "Optimzed for small smartphones in landscape and higher ( screen sizes 321px "
1169
+ "- 480px)"
1170
+ msgstr ""
1171
+ "Geoptimaliseerd voor kleine smartphones in landschap en hoger "
1172
+ "(schermgroottes 321px - 480px)"
1173
+
1174
+ #: classes/max-utils.php:179
1175
+ msgid "Optimized for small phones ( screen size max 320px )"
1176
+ msgstr "Geoptimaliseerd voor kleine telefoons ( schermgrootte max 320px )"
1177
+
1178
+ #: classes/max-utils.php:180
1179
+ msgid "Optimized for devices between 768px and 1024px"
1180
+ msgstr "Geoptimaliseerd voor apparaten tussen 768px en 1024px"
1181
+
1182
+ #: classes/max-utils.php:181
1183
+ msgid "Optimized for medium sizes devices between 480px and 768px"
1184
+ msgstr "Geoptimaliseerd voor mediumgrote apparaten tussen 480px en 768px"
1185
+
1186
+ #: classes/max-utils.php:182
1187
+ msgid "Optimized for devices between 768px and 1024px in landscape"
1188
+ msgstr "Geoptimaliseerd voor apparaten tussen 768px en 1024 in landscape"
1189
+
1190
+ #: classes/max-utils.php:183
1191
+ msgid "Optimized for deviced between 768px and 1024 in portrait"
1192
+ msgstr "Geoptimaliseerd voor apparaten tussen 768px en 1024 in portrait"
1193
+
1194
+ #: classes/max-utils.php:184
1195
+ msgid "Desktop screens from 1224px"
1196
+ msgstr "Desktop monitors vanaf 1224px"
1197
+
1198
+ #: classes/max-utils.php:185
1199
+ msgid "Large desktop screens, from 1824px"
1200
+ msgstr "Grote desktop monitors, vanaf 1824px"
1201
+
1202
+ #: classes/max-utils.php:186
1203
+ msgid "Set your own breakpoints"
1204
+ msgstr "Zet je eigen breekpunten"
1205
+
1206
+ #: classes/max-utils.php:457
1207
+ msgid "MaxButtons Loading Time:"
1208
+ msgstr "MaxButtons Laadtijd:"
1209
+
1210
+ #: blocks/responsive.php:110
1211
+ #, fuzzy
1212
+ #| msgid "Medium-size (smart)phone (480px-768px)"
1213
+ msgid "Modern Smartphone (1080px)"
1214
+ msgstr "Medium-size (smart)phone (480px-768px)"
1215
+
1216
+ #: blocks/responsive.php:111
1217
+ #, fuzzy
1218
+ #| msgid "Medium-size (smart)phone (480px-768px)"
1219
+ msgid "Medium Smartphone (768px)"
1220
+ msgstr "Medium-size (smart)phone (480px-768px)"
1221
+
1222
+ #: blocks/responsive.php:112
1223
+ msgid "Small screen (640px)"
1224
+ msgstr "Klein scherm (640px)"
1225
+
1226
+ #: blocks/responsive.php:113
1227
+ #, fuzzy
1228
+ #| msgid "Small phones, < 480px"
1229
+ msgid "Old Phone (480px)"
1230
+ msgstr "Small phones, < 480px"
1231
+
1232
+ #: blocks/responsive.php:118
1233
+ msgid "No Preset"
1234
+ msgstr "Zonder instelling"
1235
+
1236
+ #: blocks/responsive.php:149
1237
+ #, fuzzy
1238
+ #| msgid "Responsive Settings"
1239
+ msgid "responsive"
1240
+ msgstr "Responsive instellingen"
1241
+
1242
+ #: blocks/responsive.php:150
1243
+ #, fuzzy
1244
+ #| msgid "Settings"
1245
+ msgid "Screen Settings"
1246
+ msgstr "Instellingen"
1247
+
1248
+ #: blocks/responsive.php:157
1249
+ msgid "Screen Name"
1250
+ msgstr "Schermnaam"
1251
+
1252
+ #: blocks/responsive.php:189
1253
+ msgid "Apply preset"
1254
+ msgstr "Instelling toepassen"
1255
+
1256
+ #: blocks/responsive.php:195
1257
+ msgid "Selecting a preset will overwrite screen settings below"
1258
+ msgstr ""
1259
+
1260
+ #: blocks/responsive.php:204
1261
+ #, fuzzy
1262
+ #| msgid "Min Width"
1263
+ msgid "Minimum Width"
1264
+ msgstr "Minimale breedte"
1265
+
1266
+ #: blocks/responsive.php:209
1267
+ msgid "Smallest screen size this screen will show. 0 for all"
1268
+ msgstr ""
1269
+
1270
+ #: blocks/responsive.php:216
1271
+ #, fuzzy
1272
+ #| msgid "Max Width"
1273
+ msgid "Maximum Width"
1274
+ msgstr "Maximale breedte"
1275
+
1276
+ #: blocks/responsive.php:220
1277
+ msgid "Biggest screen size this screen will show. 0 for no maximum"
1278
+ msgstr ""
1279
+
1280
+ #: blocks/responsive.php:229
1281
+ #, fuzzy
1282
+ #| msgid "Hide button in this view"
1283
+ msgid "Hide button in this screen"
1284
+ msgstr "Verberg knop in deze view"
1285
+
1286
+ #: blocks/responsive.php:232
1287
+ msgid "When set, the button will not display at all in this screen"
1288
+ msgstr ""
1289
+
1290
+ #: blocks/responsive.php:241
1291
+ msgid "Remove this screen"
1292
+ msgstr ""
1293
+
1294
+ #: blocks/responsive.php:257
1295
+ msgid "Save changes and add new Screen"
1296
+ msgstr ""
1297
+
1298
+ #: blocks/responsive.php:274
1299
+ msgid "upgrade"
1300
+ msgstr ""
1301
+
1302
+ #: blocks/responsive.php:275
1303
+ #, fuzzy
1304
+ #| msgid "Upgrade to Pro"
1305
+ msgid "Upgrade Today"
1306
+ msgstr "Upgrade naar Pro"
1307
+
1308
+ #: blocks/responsive.php:280
1309
+ msgid "Save your settings first to remove the screen"
1310
+ msgstr ""
1311
+
1312
+ #: blocks/responsive.php:281
1313
+ msgid ""
1314
+ "You already have %s screens. To add more responsive screens to your buttons, "
1315
+ "upgrade to MaxButtons PRO."
1316
+ msgstr ""
1317
+
1318
+ #: blocks/responsive.php:284
1319
+ msgid "Infinite amount of screens"
1320
+ msgstr ""
1321
+
1322
+ #: blocks/responsive.php:285
1323
+ msgid "Icons and Images"
1324
+ msgstr ""
1325
+
1326
+ #: blocks/responsive.php:286
1327
+ msgid "Effects"
1328
+ msgstr ""
1329
+
1330
+ #: blocks/responsive.php:287
1331
+ msgid "Google Fonts and Font-Awesome"
1332
+ msgstr ""
1333
+
1334
+ #: blocks/responsive.php:290
1335
+ msgid "See all features"
1336
+ msgstr ""
1337
+
1338
+ #: blocks/basic.php:244
1339
+ msgid ""
1340
+ "Button name already used. Using non-unique names with the shortcode can "
1341
+ "cause issues"
1342
+ msgstr ""
1343
+ "Knopnaam al eerder gebruikt. Het gebruik van niet unieke namen met shortcode "
1344
+ "kan problemen veroorzaken"
1345
+
1346
+ #: blocks/basic.php:262
1347
+ msgid "basic"
1348
+ msgstr "basic"
1349
+
1350
+ #: blocks/basic.php:263
1351
+ msgid "Basics"
1352
+ msgstr "Basics"
1353
+
1354
+ #: blocks/basic.php:266 blocks/gradient.php:80 blocks/border.php:111
1355
+ #: blocks/text.php:143
1356
+ msgid "Replace color from other field"
1357
+ msgstr "Vervang kleur met die van een ander veld"
1358
+
1359
+ #: blocks/basic.php:267 blocks/gradient.php:81 blocks/border.php:112
1360
+ #: blocks/text.php:144
1361
+ msgid "Copy Color to other field"
1362
+ msgstr "Kopieer kleur naar een ander veld"
1363
+
1364
+ #: blocks/basic.php:273 blocks/basic.php:278
1365
+ msgid "Button Name"
1366
+ msgstr "Knopnaam"
1367
+
1368
+ #: blocks/basic.php:289
1369
+ msgid "URL"
1370
+ msgstr "URL"
1371
+
1372
+ #: blocks/basic.php:293
1373
+ msgid "http://"
1374
+ msgstr "http://"
1375
+
1376
+ #: blocks/basic.php:296
1377
+ msgid ""
1378
+ "<p>Enter any URL you wish to link to. </p>\n"
1379
+ "\t\t\t\t\t<p>Examples: <br><ul class='nowrap'><li> https://example.com/ </"
1380
+ "li>\n"
1381
+ "\t\t\t\t\t\t\t\t <li> /local-page/ </li>\n"
1382
+ "\t\t\t\t\t\t\t\t <li> javascript:window.history.back(); </li></ul></p>\n"
1383
+ "\t\t\t\t\t<p class='shortcode'> Shortcode attribute : url </p>"
1384
+ msgstr ""
1385
+
1386
+ #: blocks/basic.php:306
1387
+ msgid "Select Site Content"
1388
+ msgstr "Selecteer site inhoud"
1389
+
1390
+ #: blocks/basic.php:352
1391
+ msgid ""
1392
+ "<p>This text will appear when hovering over the button</p>\n"
1393
+ "\t\t\t\t\t<p class=\"shortcode\">Shortcode attribute : linktitle</p>"
1394
+ msgstr ""
1395
+ "<p>Deze tekst wordt getoond wanneer boven de button wordt gezweefd</p>\n"
1396
+ "\t\t\t\t\t<p class=\"shortcode\">Shortcode attribute : linktitle</p>"
1397
+
1398
+ #: blocks/basic.php:358
1399
+ msgid "Text"
1400
+ msgstr "Tekst"
1401
+
1402
+ #: blocks/basic.php:369
1403
+ msgid "Font"
1404
+ msgstr "Lettertype"
1405
+
1406
+ #: blocks/basic.php:394
1407
+ msgid "Bold"
1408
+ msgstr "Vetgedrukt"
1409
+
1410
+ #: blocks/basic.php:405
1411
+ msgid "Italic"
1412
+ msgstr "Italic"
1413
+
1414
+ #: blocks/basic.php:415
1415
+ msgid "Align left"
1416
+ msgstr "Links uitlijnen"
1417
+
1418
+ #: blocks/basic.php:425
1419
+ msgid "Align center"
1420
+ msgstr "Centreren"
1421
+
1422
+ #: blocks/basic.php:435
1423
+ msgid "Align right"
1424
+ msgstr "Rechts uitlijnen"
1425
+
1426
+ #: blocks/basic.php:445
1427
+ msgid "Padding"
1428
+ msgstr "Opvulling"
1429
+
1430
+ #: blocks/basic.php:450
1431
+ msgid "Padding Top"
1432
+ msgstr "Bovenkant opvulling"
1433
+
1434
+ #: blocks/basic.php:459
1435
+ msgid "Padding Right"
1436
+ msgstr "Opvulling rechts"
1437
+
1438
+ #: blocks/basic.php:468
1439
+ msgid "Padding Bottom"
1440
+ msgstr "Onderkant opvulling"
1441
+
1442
+ #: blocks/basic.php:477
1443
+ msgid "Padding Left"
1444
+ msgstr "Opvulling links"
1445
+
1446
+ #: blocks/basic.php:486
1447
+ msgid "Text Color"
1448
+ msgstr "Tekstkleur"
1449
+
1450
+ #: blocks/basic.php:499
1451
+ msgid "Text Color Hover"
1452
+ msgstr "Zwevende tekstkleur"
1453
+
1454
+ #: blocks/basic.php:509 blocks/basic.php:525 blocks/basic.php:559
1455
+ #: blocks/basic.php:583 blocks/container.php:193
1456
+ msgid "%"
1457
+ msgstr "%"
1458
+
1459
+ #: blocks/basic.php:515
1460
+ msgid "Button Width"
1461
+ msgstr "Breedte knop"
1462
+
1463
+ #: blocks/basic.php:530
1464
+ msgid "Button Height"
1465
+ msgstr "Knop hoogte"
1466
+
1467
+ #: blocks/basic.php:536
1468
+ msgid ""
1469
+ "Width and Height are optional. When set to 0,button size will be determined "
1470
+ "by text size plus padding"
1471
+ msgstr ""
1472
+ "Breedte en hoogte zijn optioneel. Wanneer de waarde 0 is zal de knop grootte "
1473
+ "worden bepaald door de grootte van de tekst plus de padding"
1474
+
1475
+ #: blocks/basic.php:541 blocks/container.php:177
1476
+ #, fuzzy
1477
+ #| msgid "Width"
1478
+ msgid "Width Unit"
1479
+ msgstr "Breedte"
1480
+
1481
+ #: blocks/basic.php:569
1482
+ msgid "Height Unit"
1483
+ msgstr ""
1484
+
1485
+ #: blocks/basic.php:597
1486
+ msgid "Description"
1487
+ msgstr "Beschrijving"
1488
+
1489
+ #: blocks/basic.php:603
1490
+ msgid "Brief explanation about how and where the button is used."
1491
+ msgstr "Korte verklaring over hoe en waar de button wordt gebruikt."
1492
+
1493
+ #: blocks/gradient.php:56
1494
+ msgid "gradient-options"
1495
+ msgstr "gradient-options"
1496
+
1497
+ #: blocks/gradient.php:57
1498
+ msgid "Background"
1499
+ msgstr "Achtergrond"
1500
+
1501
+ #: blocks/gradient.php:84
1502
+ msgid "Use Gradients"
1503
+ msgstr "Gebruik Gradients"
1504
+
1505
+ #: blocks/gradient.php:101
1506
+ msgid "Start"
1507
+ msgstr "Start"
1508
+
1509
+ #: blocks/gradient.php:108
1510
+ msgid "End"
1511
+ msgstr "Einde"
1512
+
1513
+ #: blocks/gradient.php:120
1514
+ msgid "Background color"
1515
+ msgstr "Achtergrondkleur"
1516
+
1517
+ #: blocks/gradient.php:150
1518
+ msgid "Background hover"
1519
+ msgstr "Achtergrond zweven"
1520
+
1521
+ #: blocks/gradient.php:178
1522
+ msgid "Normal Opacity"
1523
+ msgstr "Normale doorzichtigheid"
1524
+
1525
+ #: blocks/gradient.php:201
1526
+ msgid "Hover opacity"
1527
+ msgstr "Zweefdoorzichtigheid"
1528
+
1529
+ #: blocks/gradient.php:224
1530
+ msgid "Gradient stop"
1531
+ msgstr "Verloop stop"
1532
+
1533
+ #: blocks/advanced.php:106
1534
+ msgid "advanced"
1535
+ msgstr "advanced"
1536
+
1537
+ #: blocks/advanced.php:111
1538
+ msgid ""
1539
+ "Adding !important to the button styles can help avoid potential conflicts "
1540
+ "with your theme styles."
1541
+ msgstr ""
1542
+ "Het toevoegen van !important aan je button stijlen kan potentiële conflicten "
1543
+ "met je thema stijlen helpen voorkomen."
1544
+
1545
+ #: blocks/advanced.php:115
1546
+ msgid "Use !Important"
1547
+ msgstr "Gebruik !important"
1548
+
1549
+ #: blocks/advanced.php:124
1550
+ msgid "Useful for custom code or other plugins who target classes"
1551
+ msgstr ""
1552
+ "Nuttig voor aangepaste code of andere plugins die klassen tot doel hebben"
1553
+
1554
+ #: blocks/advanced.php:131
1555
+ msgid "Custom Rel Tag"
1556
+ msgstr "Aangepaste Rel Tag"
1557
+
1558
+ #: blocks/advanced.php:133
1559
+ msgid ""
1560
+ "Useful when button is targeting lightbox and/or popup plugins that use this "
1561
+ "method"
1562
+ msgstr ""
1563
+ "Nuttig als de button een lichtbox en/of popup plugins tot doel heeft die "
1564
+ "deze methode gebruiken"
1565
+
1566
+ #: blocks/advanced.php:139
1567
+ msgid ""
1568
+ "Enabling the \"Use External CSS\" will stop loading any button styling. You "
1569
+ "will need to put the button style manually"
1570
+ msgstr ""
1571
+ "Aanzetten van Üse External CSS\" stopt het laden van elke button styling. Je "
1572
+ "dient de button style zelf handmatig te maken"
1573
+
1574
+ #: blocks/advanced.php:140
1575
+ msgid "Use External CSS"
1576
+ msgstr "Gebruik Externe CSS"
1577
+
1578
+ #: blocks/advanced.php:148
1579
+ msgid "Warning: This will remove all styling of the buttons!"
1580
+ msgstr "Waarschuwing: Dit verwijdert alle styling van de knoppen!"
1581
+
1582
+ #: blocks/advanced.php:156
1583
+ msgid "View CSS"
1584
+ msgstr "Zie CSS"
1585
+
1586
+ #: blocks/advanced.php:168
1587
+ msgid "External CSS"
1588
+ msgstr "Externe CSS"
1589
+
1590
+ #: blocks/advanced.php:170
1591
+ msgid ""
1592
+ "If the \"Use External CSS\" option is enabled for this button, copy and "
1593
+ "paste the CSS code below into your theme stylesheet."
1594
+ msgstr ""
1595
+ "Indien de \"Use External CSS\" optie is ingeschakeld voor deze, kopieer en "
1596
+ "plak de CSS code hieronder in je thema's stijlpagina."
1597
+
1598
+ #: blocks/advanced.php:187
1599
+ msgid "Please save the button first"
1600
+ msgstr "Sla eerst de knop op"
1601
+
1602
+ #: blocks/advanced.php:192
1603
+ msgid "Close"
1604
+ msgstr "Sluit"
1605
+
1606
+ #: blocks/meta.php:86
1607
+ msgid "Meta"
1608
+ msgstr "Meta"
1609
+
1610
+ #: blocks/border.php:101
1611
+ msgid "dashed"
1612
+ msgstr "gestreept"
1613
+
1614
+ #: blocks/border.php:102
1615
+ msgid "dotted"
1616
+ msgstr "gestippeld"
1617
+
1618
+ #: blocks/border.php:103
1619
+ msgid "double"
1620
+ msgstr "dubbel"
1621
+
1622
+ #: blocks/border.php:104
1623
+ msgid "groove"
1624
+ msgstr "groove"
1625
+
1626
+ #: blocks/border.php:105
1627
+ msgid "inset"
1628
+ msgstr "inset"
1629
+
1630
+ #: blocks/border.php:106
1631
+ msgid "outset"
1632
+ msgstr "begin"
1633
+
1634
+ #: blocks/border.php:107
1635
+ msgid "ridge"
1636
+ msgstr "rand"
1637
+
1638
+ #: blocks/border.php:108
1639
+ msgid "solid"
1640
+ msgstr "doorlopend"
1641
+
1642
+ #: blocks/border.php:117
1643
+ msgid "border"
1644
+ msgstr "rand"
1645
+
1646
+ #: blocks/border.php:118
1647
+ msgid "Border"
1648
+ msgstr "Rand"
1649
+
1650
+ #: blocks/border.php:124
1651
+ msgid "Radius"
1652
+ msgstr "Radius"
1653
+
1654
+ #: blocks/border.php:185
1655
+ msgid "Top Left"
1656
+ msgstr "Boven links"
1657
+
1658
+ #: blocks/border.php:187
1659
+ msgid "Top Right"
1660
+ msgstr "Boven rechts"
1661
+
1662
+ #: blocks/border.php:189
1663
+ msgid "Bottom Left"
1664
+ msgstr "Onder links"
1665
+
1666
+ #: blocks/border.php:191
1667
+ msgid "Bottom Right"
1668
+ msgstr "Onder rechts"
1669
+
1670
+ #: blocks/border.php:197
1671
+ msgid "Style"
1672
+ msgstr "Vormgeving"
1673
+
1674
+ #: blocks/border.php:207 blocks/container.php:171
1675
+ msgid "Width"
1676
+ msgstr "Breedte"
1677
+
1678
+ #: blocks/border.php:221
1679
+ msgid "Border Color"
1680
+ msgstr "Randkleur"
1681
+
1682
+ #: blocks/border.php:234 blocks/border.php:296 blocks/text.php:201
1683
+ msgid "Hover"
1684
+ msgstr "Zweef over"
1685
+
1686
+ #: blocks/border.php:244 blocks/text.php:155
1687
+ msgid "Shadow Offset Left"
1688
+ msgstr "Schaduwafstand links"
1689
+
1690
+ #: blocks/border.php:253 blocks/text.php:165
1691
+ msgid "Shadow Offset Top"
1692
+ msgstr "Schaduwafstand boven"
1693
+
1694
+ #: blocks/border.php:262 blocks/text.php:175
1695
+ msgid "Shadow Blur"
1696
+ msgstr "Schaduwvervaging"
1697
+
1698
+ #: blocks/border.php:271
1699
+ msgid "Shadow Spread"
1700
+ msgstr "Schaduw verspreiding"
1701
+
1702
+ #: blocks/border.php:283
1703
+ msgid "Border Shadow Color"
1704
+ msgstr "Schaduwkleur van de begrenzing"
1705
+
1706
+ #: blocks/text.php:79
1707
+ msgid "YOUR TEXT"
1708
+ msgstr "EIGEN TEKST"
1709
+
1710
+ #: blocks/text.php:148
1711
+ msgid "shadow"
1712
+ msgstr "schaduw"
1713
+
1714
+ #: blocks/text.php:149
1715
+ msgid "Text Shadow"
1716
+ msgstr "Tekst schaduw"
1717
+
1718
+ #: blocks/text.php:188
1719
+ msgid "Shadow Color"
1720
+ msgstr "Schaduwkleur"
1721
+
1722
+ #: blocks/container.php:132
1723
+ msgid "container"
1724
+ msgstr "container"
1725
+
1726
+ #: blocks/container.php:133
1727
+ msgid "Container"
1728
+ msgstr "Container"
1729
+
1730
+ #: blocks/container.php:138
1731
+ msgid "Use Container"
1732
+ msgstr "Gebruik Container"
1733
+
1734
+ #: blocks/container.php:141
1735
+ msgid "Creates a container around the button which pushes other content"
1736
+ msgstr "Creëert een houder rond de button die andere inhoud wegdrukt"
1737
+
1738
+ #: blocks/container.php:158
1739
+ msgid "Center the container"
1740
+ msgstr "Centreer de inhoud"
1741
+
1742
+ #: blocks/container.php:202
1743
+ msgid "Margin"
1744
+ msgstr "Kantlijn"
1745
+
1746
+ #: blocks/container.php:207
1747
+ msgid "Margin Top"
1748
+ msgstr "Kantlijn boven"
1749
+
1750
+ #: blocks/container.php:216
1751
+ msgid "Margin Right"
1752
+ msgstr "Kantlijn rechts"
1753
+
1754
+ #: blocks/container.php:225
1755
+ msgid "Margin Bottom"
1756
+ msgstr "Kantlijn onder"
1757
+
1758
+ #: blocks/container.php:234
1759
+ msgid "Margin Left"
1760
+ msgstr "Kantlijn links"
1761
+
1762
+ #: blocks/container.php:239
1763
+ msgid "Alignment"
1764
+ msgstr "Uitlijning"
1765
+
1766
+ #: blocks/container.php:244
1767
+ msgid "Float can help to align the button and other content on the same line"
1768
+ msgstr ""
1769
+ "Float kan helpen de button op één lijn te plaatsen tezamen met andere inhoud "
1770
+ "op dezelfde lijn"
1771
+
1772
+ #~ msgid "Permanently delete all buttons in trash. Are you sure?"
1773
+ #~ msgstr "Verwijder alle knoppen uit de prullenbak. Ben je daar zeker van?"
1774
+
1775
+ #~ msgid "Already used in : "
1776
+ #~ msgstr "Reeds gebruikt in: "
1777
+
1778
+ #~ msgid "Shortcode Options"
1779
+ #~ msgstr "Shortcode Opties"
1780
+
1781
+ #~ msgid "Packs"
1782
+ #~ msgstr "Paketten"
1783
+
1784
+ #~ msgid "Auto Responsive (experimental)"
1785
+ #~ msgstr "Auto Responsive (experimenteel)"
1786
+
1787
+ #~ msgid "Select a Button"
1788
+ #~ msgstr "Selecteer een knop"
1789
+
1790
+ #~ msgid "New Query"
1791
+ #~ msgstr "Nieuwe Query"
1792
+
1793
+ #~ msgid "Container Float"
1794
+ #~ msgstr "Lettertypes hoofdvak"
1795
+
1796
+ #~ msgid "Container Width"
1797
+ #~ msgstr "Container-breedte"
1798
+
1799
+ #~ msgid "Font Size"
1800
+ #~ msgstr "Lettertypegrootte"
1801
+
1802
+ #~ msgid ""
1803
+ #~ " Auto responsive settings will take a guess only on small screens. To "
1804
+ #~ "control your responsive settings uncheck this button. This will show more "
1805
+ #~ "options."
1806
+ #~ msgstr ""
1807
+ #~ " Auto responsive instellingen nemen slechts een gok op kleine telefoons. "
1808
+ #~ "Om je instellingen te controleren haal het vinkje weg bij deze button. "
1809
+ #~ "Dit zal meer opties tonen."
1810
+
1811
+ #~ msgid "Note:"
1812
+ #~ msgstr "Let op:"
1813
+
1814
+ #~ msgid ""
1815
+ #~ "Responsive settings let you decide the behavior of the button on "
1816
+ #~ "different devices and screen sizes. For instance large buttons on small "
1817
+ #~ "screens."
1818
+ #~ msgstr ""
1819
+ #~ "Responsive instellingen staan je toe het gedrag van de knop op "
1820
+ #~ "verschillende apparaten en schermgroottes te bepalen. Bijvoorbeeld grote "
1821
+ #~ "knoppen op kleine schermen."
1822
+
1823
+ #~ msgid "Right"
1824
+ #~ msgstr "Rechts"
1825
+
1826
+ #~ msgid "Left"
1827
+ #~ msgstr "Links"
1828
+
1829
+ #~ msgid "None"
1830
+ #~ msgstr "Geen"
languages/maxbuttons.mo DELETED
Binary file
languages/maxbuttons.po DELETED
@@ -1,1265 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: MaxButtonV3\n"
4
- "POT-Creation-Date: 2015-06-19 16:45+0300\n"
5
- "PO-Revision-Date: 2015-06-19 16:46+0300\n"
6
- "Last-Translator: \n"
7
- "Language-Team: MaxFoundry <support@maxfoundry.com>\n"
8
- "Language: English\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.5.4\n"
13
- "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
14
- "X-Poedit-Basepath: .\n"
15
- "X-Poedit-SearchPath-0: ..\n"
16
-
17
- #: ../maxbuttons.php:20
18
- #, php-format
19
- msgid ""
20
- "From version 3 MaxButtons requires at least PHP 5.3 . You are running "
21
- "version: %s "
22
- msgstr ""
23
-
24
- #: ../maxbuttons.php:35
25
- msgid ""
26
- "Already found an instance of MaxButtons running. Please check if you are "
27
- "trying to activate two MaxButtons plugins and deactivate one. "
28
- msgstr ""
29
-
30
- #: ../includes/maxbuttons-pro.php:11
31
- msgid "MaxButtons: Upgrade to Pro"
32
- msgstr ""
33
-
34
- #: ../includes/maxbuttons-pro.php:22
35
- msgid "Upgrade to MaxButtons Pro - It's Only $19!"
36
- msgstr ""
37
-
38
- #: ../includes/maxbuttons-pro.php:23
39
- msgid ""
40
- "If you've created at least one button with MaxButtons, then you know what it "
41
- "can do: Unlimited colors. Rounded corners. Gradients. Text shadowing. Box "
42
- "shadowing."
43
- msgstr ""
44
-
45
- #: ../includes/maxbuttons-pro.php:24
46
- #, php-format
47
- msgid ""
48
- "Now you can take your buttons to the next level with %sMaxButtons Pro%s. The "
49
- "Pro version gives you all the CSS3 goodness and so much more:"
50
- msgstr ""
51
-
52
- #: ../includes/maxbuttons-pro.php:26
53
- msgid "Font Awesome Integration"
54
- msgstr ""
55
-
56
- #: ../includes/maxbuttons-pro.php:26
57
- msgid "Use icons from the most popular icon font set on the web!"
58
- msgstr ""
59
-
60
- #: ../includes/maxbuttons-pro.php:27
61
- msgid "Icon Support"
62
- msgstr ""
63
-
64
- #: ../includes/maxbuttons-pro.php:27
65
- msgid "Like buttons, everyone loves icons. Use Font Awesome or upload yor own."
66
- msgstr ""
67
-
68
- #: ../includes/maxbuttons-pro.php:28
69
- msgid "Multi-Line Text"
70
- msgstr ""
71
-
72
- #: ../includes/maxbuttons-pro.php:28
73
- msgid ""
74
- "Use a second a line of text to communicate extra information to your users "
75
- "and customers."
76
- msgstr ""
77
-
78
- #: ../includes/maxbuttons-pro.php:29
79
- #: ../includes/maxbuttons-admin-helper.php:85
80
- msgid "Google Web Fonts"
81
- msgstr ""
82
-
83
- #: ../includes/maxbuttons-pro.php:29
84
- msgid "Great typography can take your buttons up several notches."
85
- msgstr ""
86
-
87
- #: ../includes/maxbuttons-pro.php:30
88
- msgid "Button Packs"
89
- msgstr ""
90
-
91
- #: ../includes/maxbuttons-pro.php:30
92
- msgid ""
93
- "Import sets of pre-defined buttons, which you can then use as-is or "
94
- "customize as you need."
95
- msgstr ""
96
-
97
- #: ../includes/maxbuttons-pro.php:31
98
- msgid "Shopp Integration"
99
- msgstr ""
100
-
101
- #: ../includes/maxbuttons-pro.php:31
102
- msgid ""
103
- "Use buttons created with MaxButtons Pro as the shopping cart buttons of the "
104
- "Shopp e-commerce plugin."
105
- msgstr ""
106
-
107
- #: ../includes/maxbuttons-pro.php:33
108
- #, php-format
109
- msgid "And did we mention you can %sget MaxButtons Pro for only $19%s"
110
- msgstr ""
111
-
112
- #: ../includes/maxbuttons-pro.php:35
113
- msgid "CSS3 Button Examples"
114
- msgstr ""
115
-
116
- #: ../includes/maxbuttons-pro.php:36
117
- msgid ""
118
- "Just take a look at the types of buttons you can make with MaxButtons Pro:"
119
- msgstr ""
120
-
121
- #: ../includes/maxbuttons-pro.php:39
122
- msgid "Button Packs: Pre-Made Sets of CSS3 and Icon Goodness"
123
- msgstr ""
124
-
125
- #: ../includes/maxbuttons-pro.php:40
126
- #, php-format
127
- msgid ""
128
- "Button packs are sets of buttons with icons and settings already predefined "
129
- "for you, saving you loads of time. We have an %sever-growing collection of "
130
- "button packs%s that you can buy and import into your website (only $5 each). "
131
- "You can then use those buttons as they are, or customize them to fit your "
132
- "needs (below are a few to get you started)."
133
- msgstr ""
134
-
135
- #: ../includes/maxbuttons-pro.php:45
136
- msgid "E-Commerce Buttons"
137
- msgstr ""
138
-
139
- #: ../includes/maxbuttons-pro.php:50
140
- msgid "Colored Round Social Icons Set #1"
141
- msgstr ""
142
-
143
- #: ../includes/maxbuttons-pro.php:55
144
- msgid "Chrome Icons"
145
- msgstr ""
146
-
147
- #: ../includes/maxbuttons-pro.php:60
148
- msgid "Shopping Cart Blue"
149
- msgstr ""
150
-
151
- #: ../includes/maxbuttons-pro.php:65
152
- msgid "Pace"
153
- msgstr ""
154
-
155
- #: ../includes/maxbuttons-pro.php:70
156
- msgid "Social Sign-In"
157
- msgstr ""
158
-
159
- #: ../includes/maxbuttons-pro.php:74
160
- msgid "Feature Comparison"
161
- msgstr ""
162
-
163
- #: ../includes/maxbuttons-pro.php:75
164
- msgid ""
165
- "There's nothing like a nice, straightforward checklist to do a product "
166
- "comparison, so here's another one:"
167
- msgstr ""
168
-
169
- #: ../includes/maxbuttons-pro.php:79
170
- msgid "Free Version"
171
- msgstr ""
172
-
173
- #: ../includes/maxbuttons-pro.php:80
174
- msgid "MaxButtons Pro"
175
- msgstr ""
176
-
177
- #: ../includes/maxbuttons-pro.php:83
178
- msgid ""
179
- "Icon support (put icons to the left, right, top, or bottom of your text)"
180
- msgstr ""
181
-
182
- #: ../includes/maxbuttons-pro.php:88
183
- msgid ""
184
- "Multi-line text, to add a second line of text for communicating extra "
185
- "information"
186
- msgstr ""
187
-
188
- #: ../includes/maxbuttons-pro.php:93
189
- msgid ""
190
- "Google Web Fonts, to make your buttons stand out with beautiful typography"
191
- msgstr ""
192
-
193
- #: ../includes/maxbuttons-pro.php:98
194
- msgid "Button packs, to import pre-made sets of buttons into your website"
195
- msgstr ""
196
-
197
- #: ../includes/maxbuttons-pro.php:103
198
- msgid ""
199
- "Import/export functionality (useful for backing up and/or moving your "
200
- "buttons)"
201
- msgstr ""
202
-
203
- #: ../includes/maxbuttons-pro.php:108
204
- msgid ""
205
- "Explicit height and width options, to ensure your buttons are the same size"
206
- msgstr ""
207
-
208
- #: ../includes/maxbuttons-pro.php:113
209
- msgid "Shopp integration for buttons in your e-commerce shopping cart"
210
- msgstr ""
211
-
212
- #: ../includes/maxbuttons-pro.php:118
213
- msgid "Major browser support (Firefox, Chrome, Opera, Safari, and IE9)"
214
- msgstr ""
215
-
216
- #: ../includes/maxbuttons-pro.php:123
217
- msgid "Gradients for background colors"
218
- msgstr ""
219
-
220
- #: ../includes/maxbuttons-pro.php:128
221
- msgid "Border radius for rounded corners"
222
- msgstr ""
223
-
224
- #: ../includes/maxbuttons-pro.php:133
225
- msgid "Text and box shadowing"
226
- msgstr ""
227
-
228
- #: ../includes/maxbuttons-pro.php:138
229
- msgid "Hover effects and styles"
230
- msgstr ""
231
-
232
- #: ../includes/maxbuttons-pro.php:143
233
- msgid "Shortcodes to use anywhere in your WordPress site"
234
- msgstr ""
235
-
236
- #: ../includes/maxbuttons-pro.php:149
237
- msgid "Get Your Copy Today"
238
- msgstr ""
239
-
240
- #: ../includes/maxbuttons-pro.php:150
241
- #, php-format
242
- msgid ""
243
- "So what are you waiting for? %sGrab your copy of MaxButtons Pro today%s!"
244
- msgstr ""
245
-
246
- #: ../includes/maxbuttons-settings.php:44
247
- msgid "MaxButtons: Settings"
248
- msgstr ""
249
-
250
- #: ../includes/maxbuttons-settings.php:58
251
- #: ../includes/maxbuttons-admin-helper.php:38
252
- #: ../classes/maxbuttons-class.php:210
253
- msgid "Settings"
254
- msgstr ""
255
-
256
- #: ../includes/maxbuttons-settings.php:63
257
- msgid "MaxButtons User Level"
258
- msgstr ""
259
-
260
- #: ../includes/maxbuttons-settings.php:73
261
- msgid ""
262
- "For more details on user roles and permissions, click <a target=\"_blank\" "
263
- "href=\"https://codex.wordpress.org/Roles_and_Capabilities\">here</a>."
264
- msgstr ""
265
-
266
- #: ../includes/maxbuttons-settings.php:84
267
- msgid "Don't show add button in editor"
268
- msgstr ""
269
-
270
- #: ../includes/maxbuttons-settings.php:98
271
- msgid "Clear button cache"
272
- msgstr ""
273
-
274
- #: ../includes/maxbuttons-settings.php:100
275
- msgid ""
276
- "Maxbuttons caches the style output allowing for lightning fast display of "
277
- "your buttons. In the event \n"
278
- " \t\t\tthis cache needs to be flushed and rebuilt you can reset the "
279
- "cache here."
280
- msgstr ""
281
-
282
- #: ../includes/maxbuttons-settings.php:102
283
- msgid "Reset Cache"
284
- msgstr ""
285
-
286
- #: ../includes/maxbuttons-settings.php:110
287
- msgid "Retry Database migration"
288
- msgstr ""
289
-
290
- #: ../includes/maxbuttons-settings.php:111
291
- msgid ""
292
- "In case the upgrade functionality failed to move your old buttons from "
293
- "MaxButtons before version 3, you can do so here manually. <strong>Attention</"
294
- "strong> The new database table (maxbuttonsv3) *must* be empty, and the old "
295
- "database table *must* contain buttons otherwise this will not run. Run this "
296
- "<strong>at your own risk</strong> - it is strongly advised to make a backup "
297
- "before doing so."
298
- msgstr ""
299
-
300
- #: ../includes/maxbuttons-settings.php:112
301
- msgid "Remigrate"
302
- msgstr ""
303
-
304
- #: ../includes/maxbuttons-settings.php:120
305
- msgid "UTF8 Table Fix"
306
- msgstr ""
307
-
308
- #: ../includes/maxbuttons-settings.php:123
309
- msgid ""
310
- "WARNING: We strongly recommend backing up your database before altering the "
311
- "charset of the MaxButtons table in your WordPress database."
312
- msgstr ""
313
-
314
- #: ../includes/maxbuttons-settings.php:125
315
- msgid ""
316
- "The button below should help fix the \"foreign character issue\" some people "
317
- "experience when using MaxButtons. If you use foreign characters in your "
318
- "buttons and after saving see ????, use this button."
319
- msgstr ""
320
-
321
- #: ../includes/maxbuttons-settings.php:128
322
- msgid "Change MaxButtons Table To UTF8"
323
- msgstr ""
324
-
325
- #: ../includes/maxbuttons-media-button.php:18
326
- msgid "Please select a button."
327
- msgstr ""
328
-
329
- #: ../includes/maxbuttons-media-button.php:30
330
- msgid "Insert Button into Editor"
331
- msgstr ""
332
-
333
- #: ../includes/maxbuttons-media-button.php:34
334
- msgid ""
335
- "Select a button from the list below to place the button shortcode in the "
336
- "editor."
337
- msgstr ""
338
-
339
- #: ../includes/maxbuttons-media-button.php:36
340
- msgid "Loading your buttons"
341
- msgstr ""
342
-
343
- #: ../includes/maxbuttons-media-button.php:41
344
- msgid "Cancel"
345
- msgstr ""
346
-
347
- #: ../includes/maxbuttons_group_edit.php:3
348
- msgid "Button Group Editor"
349
- msgstr ""
350
-
351
- #: ../includes/maxbuttons-list-trash.php:22
352
- #: ../includes/maxbuttons-list-trash.php:50 ../includes/maxbuttons-list.php:46
353
- #: ../includes/maxbuttons-list.php:79
354
- msgid "Restored 1 button."
355
- msgstr ""
356
-
357
- #: ../includes/maxbuttons-list-trash.php:26 ../includes/maxbuttons-list.php:50
358
- msgid "Restored "
359
- msgstr ""
360
-
361
- #: ../includes/maxbuttons-list-trash.php:26
362
- #: ../includes/maxbuttons-list-trash.php:43 ../includes/maxbuttons-list.php:50
363
- #: ../includes/maxbuttons-list.php:69
364
- msgid " buttons."
365
- msgstr ""
366
-
367
- #: ../includes/maxbuttons-list-trash.php:39
368
- #: ../includes/maxbuttons-list-trash.php:54 ../includes/maxbuttons-list.php:65
369
- #: ../includes/maxbuttons-list.php:83
370
- msgid "Deleted 1 button."
371
- msgstr ""
372
-
373
- #: ../includes/maxbuttons-list-trash.php:43 ../includes/maxbuttons-list.php:69
374
- msgid "Deleted "
375
- msgstr ""
376
-
377
- #: ../includes/maxbuttons-list-trash.php:107
378
- #: ../includes/maxbuttons-list.php:137
379
- msgid "MaxButtons: Button List"
380
- msgstr ""
381
-
382
- #: ../includes/maxbuttons-list-trash.php:117
383
- #: ../includes/maxbuttons-list.php:149 ../classes/maxbuttons-class.php:196
384
- msgid "Add New"
385
- msgstr ""
386
-
387
- #: ../includes/maxbuttons-list-trash.php:125
388
- #: ../includes/maxbuttons-list.php:164 ../includes/maxbuttons-list.php:169
389
- msgid "All"
390
- msgstr ""
391
-
392
- #: ../includes/maxbuttons-list-trash.php:127
393
- #: ../includes/maxbuttons-list.php:165 ../includes/maxbuttons-list.php:170
394
- msgid "Trash"
395
- msgstr ""
396
-
397
- #: ../includes/maxbuttons-list-trash.php:132
398
- #: ../includes/maxbuttons-list.php:190
399
- msgid "Bulk Actions"
400
- msgstr ""
401
-
402
- #: ../includes/maxbuttons-list-trash.php:133
403
- #: ../includes/maxbuttons-list-trash.php:171
404
- #: ../includes/maxbuttons-list.php:196 ../includes/maxbuttons-list.php:260
405
- msgid "Restore"
406
- msgstr ""
407
-
408
- #: ../includes/maxbuttons-list-trash.php:134
409
- #: ../includes/maxbuttons-list-trash.php:173
410
- #: ../includes/maxbuttons-list.php:197 ../includes/maxbuttons-list.php:262
411
- msgid "Delete Permanently"
412
- msgstr ""
413
-
414
- #: ../includes/maxbuttons-list-trash.php:136
415
- #: ../includes/maxbuttons-list.php:200
416
- msgid "Apply"
417
- msgstr ""
418
-
419
- #: ../includes/maxbuttons-list-trash.php:142
420
- #: ../includes/maxbuttons-list.php:222 ../blocks/text.php:65
421
- msgid "Button"
422
- msgstr ""
423
-
424
- #: ../includes/maxbuttons-list-trash.php:143
425
- #: ../includes/maxbuttons-list.php:225
426
- msgid "Name and Description"
427
- msgstr ""
428
-
429
- #: ../includes/maxbuttons-list-trash.php:144
430
- #: ../includes/maxbuttons-list.php:229
431
- msgid "Shortcode"
432
- msgstr ""
433
-
434
- #: ../includes/maxbuttons-list-trash.php:145
435
- msgid "Actions"
436
- msgstr ""
437
-
438
- #: ../includes/maxbuttons-list.php:25 ../includes/maxbuttons-list.php:75
439
- msgid "Moved 1 button to the trash."
440
- msgstr ""
441
-
442
- #: ../includes/maxbuttons-list.php:29
443
- msgid "Moved "
444
- msgstr ""
445
-
446
- #: ../includes/maxbuttons-list.php:29
447
- msgid " buttons to the trash."
448
- msgstr ""
449
-
450
- #: ../includes/maxbuttons-list.php:193 ../includes/maxbuttons-list.php:256
451
- #: ../includes/maxbuttons-button.php:73
452
- msgid "Move to Trash"
453
- msgstr ""
454
-
455
- #: ../includes/maxbuttons-list.php:252
456
- msgid "Edit"
457
- msgstr ""
458
-
459
- #: ../includes/maxbuttons-list.php:254 ../includes/maxbuttons-button.php:72
460
- msgid "Copy"
461
- msgstr ""
462
-
463
- #: ../includes/maxbuttons-button.php:22
464
- msgid "Maxbuttons Error: Button id should never be zero"
465
- msgstr ""
466
-
467
- #: ../includes/maxbuttons-button.php:36
468
- msgid ""
469
- "Maxbuttons button id is zero. Your data is not saved correctly! Please check "
470
- "your database."
471
- msgstr ""
472
-
473
- #: ../includes/maxbuttons-button.php:43
474
- msgid ""
475
- "MaxButtons could not find this button in the database. It might not be "
476
- "possible to save this button! Please check your database or contact support! "
477
- msgstr ""
478
-
479
- #: ../includes/maxbuttons-button.php:56
480
- msgid "MaxButtons: Add/Edit Button"
481
- msgstr ""
482
-
483
- #: ../includes/maxbuttons-button.php:71 ../includes/maxbuttons-button.php:134
484
- msgid "Save"
485
- msgstr ""
486
-
487
- #: ../includes/maxbuttons-button.php:74
488
- msgid "Delete"
489
- msgstr ""
490
-
491
- #: ../includes/maxbuttons-button.php:79
492
- msgid "Removing button"
493
- msgstr ""
494
-
495
- #: ../includes/maxbuttons-button.php:82
496
- msgid "You are about to permanently remove this button. Are you sure?"
497
- msgstr ""
498
-
499
- #: ../includes/maxbuttons-button.php:83
500
- msgid "Yes"
501
- msgstr ""
502
-
503
- #: ../includes/maxbuttons-button.php:85
504
- msgid "No"
505
- msgstr ""
506
-
507
- #: ../includes/maxbuttons-button.php:95
508
- msgid ""
509
- "To use this button, place the following shortcode anywhere in your site "
510
- "content:"
511
- msgstr ""
512
-
513
- #: ../includes/maxbuttons-button.php:96
514
- msgid "or"
515
- msgstr ""
516
-
517
- #: ../includes/maxbuttons-button.php:97
518
- msgid "See more examples"
519
- msgstr ""
520
-
521
- #: ../includes/maxbuttons-button.php:103
522
- msgid "Add the same button with different link"
523
- msgstr ""
524
-
525
- #: ../includes/maxbuttons-button.php:107
526
- msgid "Use the same button but change the text"
527
- msgstr ""
528
-
529
- #: ../includes/maxbuttons-button.php:110
530
- msgid "All possible shortcode options"
531
- msgstr ""
532
-
533
- #: ../includes/maxbuttons-button.php:114
534
- msgid "Some tips"
535
- msgstr ""
536
-
537
- #: ../includes/maxbuttons-button.php:115
538
- msgid ""
539
- "If you use the button on a static page, on multiple pages, or upload your "
540
- "theme to another WordPress installation choose an unique name and use "
541
- msgstr ""
542
-
543
- #: ../includes/maxbuttons-button.php:119
544
- msgid ""
545
- "Using this syntax if you change your button it will change throughout the "
546
- "entire site. If you delete the button and create a new one with the same "
547
- "name the site will use the new button. "
548
- msgstr ""
549
-
550
- #: ../includes/maxbuttons-button.php:139
551
- msgid "Button Output"
552
- msgstr ""
553
-
554
- #: ../includes/maxbuttons-button.php:142
555
- msgid "The top is the normal button, the bottom one is the hover."
556
- msgstr ""
557
-
558
- #: ../includes/maxbuttons-button.php:162
559
- msgid "Change this color to see your button on a different background."
560
- msgstr ""
561
-
562
- #: ../includes/maxbuttons-groups.php:6
563
- msgid "Button groups"
564
- msgstr ""
565
-
566
- #: ../includes/maxbuttons-groups.php:13
567
- msgid "Create new group"
568
- msgstr ""
569
-
570
- #: ../includes/maxbuttons-admin-helper.php:19
571
- msgid "Brought to you by"
572
- msgstr ""
573
-
574
- #: ../includes/maxbuttons-admin-helper.php:21
575
- #, php-format
576
- msgid "Upgrade to MaxButtons Pro today! %sClick Here%s"
577
- msgstr ""
578
-
579
- #: ../includes/maxbuttons-admin-helper.php:28
580
- #: ../classes/maxbuttons-class.php:191 ../classes/maxbuttons-class.php:316
581
- msgid "Buttons"
582
- msgstr ""
583
-
584
- #: ../includes/maxbuttons-admin-helper.php:34
585
- #: ../classes/maxbuttons-class.php:203
586
- msgid "Upgrade to Pro"
587
- msgstr ""
588
-
589
- #: ../includes/maxbuttons-admin-helper.php:42
590
- #: ../classes/maxbuttons-class.php:217
591
- msgid "Support"
592
- msgstr ""
593
-
594
- #: ../includes/maxbuttons-admin-helper.php:75
595
- msgid "Get MaxButtons Pro!"
596
- msgstr ""
597
-
598
- #: ../includes/maxbuttons-admin-helper.php:77
599
- msgid "MaxButton Pro bonus features include:"
600
- msgstr ""
601
-
602
- #: ../includes/maxbuttons-admin-helper.php:81
603
- msgid "Button Search!"
604
- msgstr ""
605
-
606
- #: ../includes/maxbuttons-admin-helper.php:82
607
- msgid "Two Lines of Editable Text"
608
- msgstr ""
609
-
610
- #: ../includes/maxbuttons-admin-helper.php:83
611
- msgid "Pre-Made Button Packs"
612
- msgstr ""
613
-
614
- #: ../includes/maxbuttons-admin-helper.php:84
615
- msgid "Add An Icon To Your Buttons"
616
- msgstr ""
617
-
618
- #: ../includes/maxbuttons-admin-helper.php:86
619
- msgid "Font Awesome Icon Support"
620
- msgstr ""
621
-
622
- #: ../includes/maxbuttons-admin-helper.php:87
623
- msgid "Responsive Buttons"
624
- msgstr ""
625
-
626
- #: ../includes/maxbuttons-admin-helper.php:88
627
- msgid "Our terrific Support"
628
- msgstr ""
629
-
630
- #: ../includes/maxbuttons-admin-helper.php:89
631
- msgid "Plus More!"
632
- msgstr ""
633
-
634
- #: ../includes/maxbuttons-admin-helper.php:92
635
- msgid "Get MaxButtons Pro Now!"
636
- msgstr ""
637
-
638
- #: ../includes/maxbuttons-admin-helper.php:96
639
- msgid "Everything for $99!"
640
- msgstr ""
641
-
642
- #: ../includes/maxbuttons-admin-helper.php:98
643
- msgid "Get Everything Now!"
644
- msgstr ""
645
-
646
- #: ../includes/maxbuttons-admin-helper.php:102
647
- msgid "Get MaxGalleria"
648
- msgstr ""
649
-
650
- #: ../includes/maxbuttons-admin-helper.php:103
651
- msgid ""
652
- "Download our free WordPress Gallery plugin MaxGalleria! Add-ons for Albums, "
653
- "Videos, and Image Sliders."
654
- msgstr ""
655
-
656
- #: ../includes/maxbuttons-admin-helper.php:104
657
- msgid "Get MaxGalleria Now!"
658
- msgstr ""
659
-
660
- #: ../includes/maxbuttons-admin-helper.php:108
661
- msgid "Font Awesome Support"
662
- msgstr ""
663
-
664
- #: ../includes/maxbuttons-admin-helper.php:109
665
- msgid ""
666
- "With MaxButtons Pro you have access to all 439 Font Awesome icons, ready to "
667
- "add to your buttons."
668
- msgstr ""
669
-
670
- #: ../includes/maxbuttons-admin-helper.php:110
671
- msgid ""
672
- "Never upload another icon again, just choose an icon and go about your "
673
- "normal button-making business."
674
- msgstr ""
675
-
676
- #: ../includes/maxbuttons-admin-helper.php:111
677
- msgid "Use Font Awesome!"
678
- msgstr ""
679
-
680
- #: ../includes/maxbuttons-admin-helper.php:143
681
- msgid "Go to the first page"
682
- msgstr ""
683
-
684
- #: ../includes/maxbuttons-admin-helper.php:145
685
- msgid "Go to the previous page"
686
- msgstr ""
687
-
688
- #: ../includes/maxbuttons-admin-helper.php:147
689
- msgid "of"
690
- msgstr ""
691
-
692
- #: ../includes/maxbuttons-admin-helper.php:149
693
- msgid "Go to the next page"
694
- msgstr ""
695
-
696
- #: ../includes/maxbuttons-admin-helper.php:151
697
- msgid "Go to the last page"
698
- msgstr ""
699
-
700
- #: ../includes/maxbuttons-support.php:133
701
- msgid "MaxButtons: Support"
702
- msgstr ""
703
-
704
- #: ../includes/maxbuttons-support.php:144
705
- #, php-format
706
- msgid "All support is handled through the %sSupport Forums%s."
707
- msgstr ""
708
-
709
- #: ../includes/maxbuttons-support.php:147
710
- msgid "Latest Support Questions"
711
- msgstr ""
712
-
713
- #: ../includes/maxbuttons-support.php:182
714
- msgid "Your server doesn't allow us to catch the latest support questions"
715
- msgstr ""
716
-
717
- #: ../includes/maxbuttons-support.php:191
718
- msgid ""
719
- "You may be asked to provide the information below to help troubleshoot your "
720
- "issue."
721
- msgstr ""
722
-
723
- #: ../includes/arrays.php:4
724
- msgid "dashed"
725
- msgstr ""
726
-
727
- #: ../includes/arrays.php:5
728
- msgid "dotted"
729
- msgstr ""
730
-
731
- #: ../includes/arrays.php:6
732
- msgid "double"
733
- msgstr ""
734
-
735
- #: ../includes/arrays.php:7
736
- msgid "groove"
737
- msgstr ""
738
-
739
- #: ../includes/arrays.php:8
740
- msgid "inset"
741
- msgstr ""
742
-
743
- #: ../includes/arrays.php:9
744
- msgid "outset"
745
- msgstr ""
746
-
747
- #: ../includes/arrays.php:10
748
- msgid "ridge"
749
- msgstr ""
750
-
751
- #: ../includes/arrays.php:11
752
- msgid "solid"
753
- msgstr ""
754
-
755
- #: ../includes/arrays.php:79 ../includes/arrays.php:85
756
- msgid "normal"
757
- msgstr ""
758
-
759
- #: ../includes/arrays.php:80
760
- msgid "italic"
761
- msgstr ""
762
-
763
- #: ../includes/arrays.php:86
764
- msgid "bold"
765
- msgstr ""
766
-
767
- #: ../blocks/advanced.php:67
768
- msgid "Advanced"
769
- msgstr ""
770
-
771
- #: ../blocks/advanced.php:70
772
- msgid ""
773
- "Adding !important to the button styles can help avoid potential conflicts "
774
- "with your theme styles."
775
- msgstr ""
776
-
777
- #: ../blocks/advanced.php:71
778
- msgid "Use !important"
779
- msgstr ""
780
-
781
- #: ../blocks/advanced.php:79
782
- msgid ""
783
- "By default, the CSS styles for the button are rendered within a &lt;"
784
- "style&gt; block in the HTML body. Enabling the \"Use External CSS\" option "
785
- "allows you to put the CSS code for the button into your theme stylesheet "
786
- "instead."
787
- msgstr ""
788
-
789
- #: ../blocks/advanced.php:80
790
- msgid "Use External CSS"
791
- msgstr ""
792
-
793
- #: ../blocks/advanced.php:87
794
- msgid "View CSS"
795
- msgstr ""
796
-
797
- #: ../blocks/advanced.php:94
798
- msgid "External CSS"
799
- msgstr ""
800
-
801
- #: ../blocks/advanced.php:99
802
- msgid ""
803
- "If the \"Use External CSS\" option is enabled for this button, copy and "
804
- "paste the CSS code below into your theme stylesheet."
805
- msgstr ""
806
-
807
- #: ../blocks/advanced.php:116
808
- msgid "Please save the button first"
809
- msgstr ""
810
-
811
- #: ../blocks/container.php:112
812
- msgid "Container"
813
- msgstr ""
814
-
815
- #: ../blocks/container.php:115
816
- msgid "Use Container"
817
- msgstr ""
818
-
819
- #: ../blocks/container.php:121
820
- msgid "Wrap with Center Div"
821
- msgstr ""
822
-
823
- #: ../blocks/container.php:128 ../blocks/border.php:127
824
- msgid "Width"
825
- msgstr ""
826
-
827
- #: ../blocks/container.php:134
828
- msgid "Margin Top"
829
- msgstr ""
830
-
831
- #: ../blocks/container.php:140
832
- msgid "Margin Right"
833
- msgstr ""
834
-
835
- #: ../blocks/container.php:146
836
- msgid "Margin Bottom"
837
- msgstr ""
838
-
839
- #: ../blocks/container.php:152
840
- msgid "Margin Left"
841
- msgstr ""
842
-
843
- #: ../blocks/container.php:158
844
- msgid "Alignment"
845
- msgstr ""
846
-
847
- #: ../blocks/gradient.php:53
848
- msgid "Gradients and Opacity"
849
- msgstr ""
850
-
851
- #: ../blocks/gradient.php:56
852
- msgid "Gradient Stop"
853
- msgstr ""
854
-
855
- #: ../blocks/gradient.php:58 ../blocks/gradient.php:65
856
- #: ../blocks/gradient.php:72 ../blocks/gradient.php:79
857
- #: ../blocks/gradient.php:86 ../blocks/border.php:82 ../blocks/border.php:88
858
- #: ../blocks/border.php:96 ../blocks/border.php:102 ../blocks/border.php:122
859
- #: ../blocks/border.php:129 ../blocks/border.php:136 ../blocks/border.php:143
860
- #: ../blocks/border.php:150 ../blocks/text.php:143 ../blocks/text.php:161
861
- #: ../blocks/text.php:177 ../blocks/text.php:193 ../blocks/text.php:200
862
- #: ../blocks/text.php:207 ../blocks/text.php:214 ../blocks/text.php:229
863
- #: ../blocks/text.php:235 ../blocks/text.php:243 ../blocks/text.php:249
864
- msgid "Default:"
865
- msgstr ""
866
-
867
- #: ../blocks/gradient.php:63
868
- msgid "Gradient Start Opacity"
869
- msgstr ""
870
-
871
- #: ../blocks/gradient.php:70
872
- msgid "Gradient End Opacity"
873
- msgstr ""
874
-
875
- #: ../blocks/gradient.php:77
876
- msgid "Gradient Start Opacity Hover"
877
- msgstr ""
878
-
879
- #: ../blocks/gradient.php:84
880
- msgid "Gradient End Opacity Hover"
881
- msgstr ""
882
-
883
- #: ../blocks/border.php:72 ../blocks/color.php:76
884
- msgid "Border"
885
- msgstr ""
886
-
887
- #: ../blocks/border.php:75
888
- msgid "Radius"
889
- msgstr ""
890
-
891
- #: ../blocks/border.php:80
892
- msgid "Top Left"
893
- msgstr ""
894
-
895
- #: ../blocks/border.php:86
896
- msgid "Top Right"
897
- msgstr ""
898
-
899
- #: ../blocks/border.php:94
900
- msgid "Bottom Left"
901
- msgstr ""
902
-
903
- #: ../blocks/border.php:100
904
- msgid "Bottom Right"
905
- msgstr ""
906
-
907
- #: ../blocks/border.php:112 ../blocks/text.php:166
908
- msgid "Style"
909
- msgstr ""
910
-
911
- #: ../blocks/border.php:134 ../blocks/text.php:198
912
- msgid "Shadow Offset Left"
913
- msgstr ""
914
-
915
- #: ../blocks/border.php:141 ../blocks/text.php:205
916
- msgid "Shadow Offset Top"
917
- msgstr ""
918
-
919
- #: ../blocks/border.php:148 ../blocks/text.php:212
920
- msgid "Shadow Width"
921
- msgstr ""
922
-
923
- #: ../blocks/color.php:72 ../blocks/text.php:116 ../blocks/text.php:121
924
- msgid "Text"
925
- msgstr ""
926
-
927
- #: ../blocks/color.php:73
928
- #, php-format
929
- msgid "Text%sShadow"
930
- msgstr ""
931
-
932
- #: ../blocks/color.php:74
933
- #, php-format
934
- msgid "Gradient%sStart"
935
- msgstr ""
936
-
937
- #: ../blocks/color.php:75
938
- #, php-format
939
- msgid "Gradient%sEnd"
940
- msgstr ""
941
-
942
- #: ../blocks/color.php:77
943
- #, php-format
944
- msgid "Border%sShadow"
945
- msgstr ""
946
-
947
- #: ../blocks/color.php:91
948
- msgid "Colors"
949
- msgstr ""
950
-
951
- #: ../blocks/color.php:105
952
- msgid "Normal"
953
- msgstr ""
954
-
955
- #: ../blocks/color.php:125
956
- msgid "Hover"
957
- msgstr ""
958
-
959
- #: ../blocks/color.php:150
960
- msgid "Shortcuts"
961
- msgstr ""
962
-
963
- #: ../blocks/color.php:152
964
- msgid "Copy normal colors to hover"
965
- msgstr ""
966
-
967
- #: ../blocks/color.php:153
968
- msgid "Copy hover colors to normal"
969
- msgstr ""
970
-
971
- #: ../blocks/color.php:154
972
- msgid "Swap normal and hover colors"
973
- msgstr ""
974
-
975
- #: ../blocks/color.php:155
976
- msgid "Copy and invert normal colors"
977
- msgstr ""
978
-
979
- #: ../blocks/dimension.php:62
980
- msgid "Dimensions"
981
- msgstr ""
982
-
983
- #: ../blocks/dimension.php:65
984
- msgid "Button Width"
985
- msgstr ""
986
-
987
- #: ../blocks/dimension.php:70
988
- msgid "Button Height"
989
- msgstr ""
990
-
991
- #: ../blocks/responsive.php:177
992
- msgid "px"
993
- msgstr ""
994
-
995
- #: ../blocks/responsive.php:178
996
- msgid "%"
997
- msgstr ""
998
-
999
- #: ../blocks/responsive.php:182
1000
- msgid "None"
1001
- msgstr ""
1002
-
1003
- #: ../blocks/responsive.php:183 ../blocks/text.php:241
1004
- msgid "Left"
1005
- msgstr ""
1006
-
1007
- #: ../blocks/responsive.php:184 ../blocks/text.php:247
1008
- msgid "Right"
1009
- msgstr ""
1010
-
1011
- #: ../blocks/responsive.php:201
1012
- msgid "Responsive Settings"
1013
- msgstr ""
1014
-
1015
- #: ../blocks/responsive.php:203
1016
- msgid ""
1017
- "Responsive settings let you decide the behavior of the button on different "
1018
- "devices and screen sizes. For instance large buttons on small screens."
1019
- msgstr ""
1020
-
1021
- #: ../blocks/responsive.php:205
1022
- msgid "Auto Responsive"
1023
- msgstr ""
1024
-
1025
- #: ../blocks/responsive.php:205
1026
- msgid "(Experimental)"
1027
- msgstr ""
1028
-
1029
- #: ../blocks/responsive.php:212
1030
- msgid "Note:"
1031
- msgstr ""
1032
-
1033
- #: ../blocks/responsive.php:212
1034
- msgid ""
1035
- " Auto responsive settings will take a guess only on small screens. To "
1036
- "control your responsive settings uncheck this button. This will show more "
1037
- "options."
1038
- msgstr ""
1039
-
1040
- #: ../blocks/responsive.php:234 ../blocks/responsive.php:298
1041
- msgid "Min width"
1042
- msgstr ""
1043
-
1044
- #: ../blocks/responsive.php:237 ../blocks/responsive.php:301
1045
- msgid "Max width"
1046
- msgstr ""
1047
-
1048
- #: ../blocks/responsive.php:243 ../blocks/responsive.php:306
1049
- msgid "Font size"
1050
- msgstr ""
1051
-
1052
- #: ../blocks/responsive.php:247 ../blocks/responsive.php:310
1053
- msgid "Button width"
1054
- msgstr ""
1055
-
1056
- #: ../blocks/responsive.php:251 ../blocks/responsive.php:312
1057
- msgid "Container width"
1058
- msgstr ""
1059
-
1060
- #: ../blocks/responsive.php:256 ../blocks/responsive.php:317
1061
- msgid "Container float"
1062
- msgstr ""
1063
-
1064
- #: ../blocks/responsive.php:258 ../blocks/responsive.php:319
1065
- msgid "Hide button on this view"
1066
- msgstr ""
1067
-
1068
- #: ../blocks/responsive.php:276
1069
- msgid "New Query"
1070
- msgstr ""
1071
-
1072
- #: ../blocks/responsive.php:281
1073
- msgid "Add"
1074
- msgstr ""
1075
-
1076
- #: ../blocks/text.php:127
1077
- msgid "The actual words that appear on the button."
1078
- msgstr ""
1079
-
1080
- #: ../blocks/text.php:132
1081
- msgid "Font"
1082
- msgstr ""
1083
-
1084
- #: ../blocks/text.php:150
1085
- msgid "Size"
1086
- msgstr ""
1087
-
1088
- #: ../blocks/text.php:182
1089
- msgid "Weight"
1090
- msgstr ""
1091
-
1092
- #: ../blocks/text.php:221
1093
- msgid "Padding"
1094
- msgstr ""
1095
-
1096
- #: ../blocks/text.php:226
1097
- msgid "Top"
1098
- msgstr ""
1099
-
1100
- #: ../blocks/text.php:233
1101
- msgid "Bottom"
1102
- msgstr ""
1103
-
1104
- #: ../blocks/basic.php:117
1105
- msgid "Basics"
1106
- msgstr ""
1107
-
1108
- #: ../blocks/basic.php:120
1109
- msgid "Name"
1110
- msgstr ""
1111
-
1112
- #: ../blocks/basic.php:121
1113
- msgid "Something that you can quickly identify the button with."
1114
- msgstr ""
1115
-
1116
- #: ../blocks/basic.php:129
1117
- msgid "Description"
1118
- msgstr ""
1119
-
1120
- #: ../blocks/basic.php:130
1121
- msgid "Brief explanation about how and where the button is used."
1122
- msgstr ""
1123
-
1124
- #: ../blocks/basic.php:138
1125
- msgid "URL"
1126
- msgstr ""
1127
-
1128
- #: ../blocks/basic.php:139
1129
- msgid "The link when the button is clicked."
1130
- msgstr ""
1131
-
1132
- #: ../blocks/basic.php:148
1133
- msgid "Open in New Window"
1134
- msgstr ""
1135
-
1136
- #: ../blocks/basic.php:156
1137
- msgid "Use rel=\"nofollow\""
1138
- msgstr ""
1139
-
1140
- #: ../classes/max-utils.php:84
1141
- msgid "Small phones"
1142
- msgstr ""
1143
-
1144
- #: ../classes/max-utils.php:85
1145
- msgid "Small phones (landscape)"
1146
- msgstr ""
1147
-
1148
- #: ../classes/max-utils.php:86
1149
- msgid "Small phones (portrait)"
1150
- msgstr ""
1151
-
1152
- #: ../classes/max-utils.php:87
1153
- msgid "Ipad (all)"
1154
- msgstr ""
1155
-
1156
- #: ../classes/max-utils.php:88
1157
- msgid "Medium-size (smart)phone"
1158
- msgstr ""
1159
-
1160
- #: ../classes/max-utils.php:89
1161
- msgid "Ipad landscape"
1162
- msgstr ""
1163
-
1164
- #: ../classes/max-utils.php:90
1165
- msgid "Ipad portrait"
1166
- msgstr ""
1167
-
1168
- #: ../classes/max-utils.php:91
1169
- msgid "Desktop"
1170
- msgstr ""
1171
-
1172
- #: ../classes/max-utils.php:92
1173
- msgid "Large desktops"
1174
- msgstr ""
1175
-
1176
- #: ../classes/max-utils.php:93
1177
- msgid "Custom size"
1178
- msgstr ""
1179
-
1180
- #: ../classes/max-utils.php:97
1181
- msgid "Optimized for small smartphones ( screen sizes under 480px )"
1182
- msgstr ""
1183
-
1184
- #: ../classes/max-utils.php:98
1185
- msgid ""
1186
- "Optimzed for small smartphones in landscape and higher ( screen sizes 321px "
1187
- "- 480px)"
1188
- msgstr ""
1189
-
1190
- #: ../classes/max-utils.php:99
1191
- msgid "Optimized for small phones ( screen size max 320px )"
1192
- msgstr ""
1193
-
1194
- #: ../classes/max-utils.php:100
1195
- msgid "Optimized for devices between 768px and 1024px"
1196
- msgstr ""
1197
-
1198
- #: ../classes/max-utils.php:101
1199
- msgid "Optimized for medium sizes devices between 480px and 768px"
1200
- msgstr ""
1201
-
1202
- #: ../classes/max-utils.php:102
1203
- msgid "Optimized for devices between 768px and 1024px in landscape"
1204
- msgstr ""
1205
-
1206
- #: ../classes/max-utils.php:103
1207
- msgid "Optimized for deviced between 768px and 1024 in portrait"
1208
- msgstr ""
1209
-
1210
- #: ../classes/max-utils.php:104
1211
- msgid "Desktop screens from 1224px"
1212
- msgstr ""
1213
-
1214
- #: ../classes/max-utils.php:105
1215
- msgid "Large desktop screens, from 1824px"
1216
- msgstr ""
1217
-
1218
- #: ../classes/max-utils.php:106
1219
- msgid "Set your own breakpoints"
1220
- msgstr ""
1221
-
1222
- #: ../classes/max-utils.php:185
1223
- msgid "MaxButtons Loading Time:"
1224
- msgstr ""
1225
-
1226
- #: ../classes/maxbuttons-class.php:179
1227
- msgid "MaxButtons : Buttons"
1228
- msgstr ""
1229
-
1230
- #: ../classes/maxbuttons-class.php:180
1231
- msgid "MaxButtons"
1232
- msgstr ""
1233
-
1234
- #: ../classes/maxbuttons-class.php:195
1235
- msgid "MaxButtons : Add/Edit Button"
1236
- msgstr ""
1237
-
1238
- #: ../classes/maxbuttons-class.php:202
1239
- msgid "MaxButtons : Upgrade to Pro"
1240
- msgstr ""
1241
-
1242
- #: ../classes/maxbuttons-class.php:209
1243
- msgid "MaxButtons : Settings"
1244
- msgstr ""
1245
-
1246
- #: ../classes/maxbuttons-class.php:216
1247
- msgid "MaxButtons : Support"
1248
- msgstr ""
1249
-
1250
- #: ../classes/maxbuttons-class.php:280
1251
- msgid "Select a MaxButton"
1252
- msgstr ""
1253
-
1254
- #: ../classes/maxbuttons-class.php:327
1255
- #, php-format
1256
- msgid "%sUpgrade to Pro Version%s"
1257
- msgstr ""
1258
-
1259
- #: ../classes/maxbuttons-class.php:342
1260
- msgid "Add Button"
1261
- msgstr ""
1262
-
1263
- #: ../classes/admin-class.php:206
1264
- msgid "Insert This Button"
1265
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/maxbuttons.pot ADDED
@@ -0,0 +1,1560 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020 Max Foundry
2
+ # This file is distributed under the same license as the MaxButtons plugin.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: MaxButtons 8.0-BETA05\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/maxbuttons\n"
7
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
+ "Language-Team: LANGUAGE <LL@li.org>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2020-05-28T11:35:14+03:00\n"
13
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
+ "X-Generator: WP-CLI 2.2.0\n"
15
+ "X-Domain: maxbuttons\n"
16
+
17
+ #. Plugin Name of the plugin
18
+ #: assets/integrations/shortcake/shortcake.php:63
19
+ #: assets/integrations/siteorigins_builder/sitebuilder.php:8
20
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:18
21
+ #: classes/maxbuttons-class.php:291
22
+ msgid "MaxButtons"
23
+ msgstr ""
24
+
25
+ #. Plugin URI of the plugin
26
+ msgid "http://maxbuttons.com"
27
+ msgstr ""
28
+
29
+ #. Description of the plugin
30
+ msgid "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>."
31
+ msgstr ""
32
+
33
+ #. Author of the plugin
34
+ msgid "Max Foundry"
35
+ msgstr ""
36
+
37
+ #. Author URI of the plugin
38
+ msgid "http://maxfoundry.com"
39
+ msgstr ""
40
+
41
+ #: views/modals/trash-modal.php:3
42
+ msgid "Trash button"
43
+ msgstr ""
44
+
45
+ #: views/modals/trash-modal.php:4
46
+ msgid "The button will be moved to trash. It can be recovered from the trash bin later. Continue?"
47
+ msgstr ""
48
+
49
+ #: views/modals/trash-modal.php:7
50
+ #: views/modals/delete-modal.php:7
51
+ #: classes/maxbuttons-class.php:530
52
+ msgid "Yes"
53
+ msgstr ""
54
+
55
+ #: views/modals/trash-modal.php:9
56
+ #: views/modals/delete-modal.php:9
57
+ #: classes/maxbuttons-class.php:531
58
+ msgid "No"
59
+ msgstr ""
60
+
61
+ #: views/modals/delete-modal.php:3
62
+ msgid "Removing button"
63
+ msgstr ""
64
+
65
+ #: views/modals/delete-modal.php:4
66
+ msgid "You are about to permanently remove this button. Are you sure?"
67
+ msgstr ""
68
+
69
+ #: views/modals/copy-modal.php:4
70
+ msgid "Copy this button"
71
+ msgstr ""
72
+
73
+ #: views/modals/copy-modal.php:8
74
+ msgid "You probably don't want to copy your button!"
75
+ msgstr ""
76
+
77
+ #: views/modals/copy-modal.php:13
78
+ msgid "Add the same button with different link"
79
+ msgstr ""
80
+
81
+ #: views/modals/copy-modal.php:17
82
+ msgid "Use the same button but change the text"
83
+ msgstr ""
84
+
85
+ #: views/modals/copy-modal.php:21
86
+ msgid "Both"
87
+ msgstr ""
88
+
89
+ #: views/modals/copy-modal.php:25
90
+ msgid "All Options"
91
+ msgstr ""
92
+
93
+ #: views/modals/copy-modal.php:30
94
+ msgid "Your button has not been saved. Any changes will be lost!"
95
+ msgstr ""
96
+
97
+ #: views/modals/copy-modal.php:32
98
+ msgid "Do you want to copy this button to a new button?"
99
+ msgstr ""
100
+
101
+ #: views/modals/copy-modal.php:36
102
+ #: classes/controller.php:71
103
+ msgid "Copy"
104
+ msgstr ""
105
+
106
+ #: views/modals/copy-modal.php:38
107
+ #: classes/maxbuttons-class.php:533
108
+ #: classes/maxbuttons-class.php:580
109
+ msgid "Cancel"
110
+ msgstr ""
111
+
112
+ #: includes/maxbuttons-button.php:9
113
+ msgid "Button editor"
114
+ msgstr ""
115
+
116
+ #: includes/maxbuttons-button.php:52
117
+ msgid "To use this button, place the following shortcode anywhere you want it to appear in your site content:"
118
+ msgstr ""
119
+
120
+ #: includes/maxbuttons-button.php:55
121
+ msgid "Shortcode options can make using MaxButtons much easier! Check all possible options"
122
+ msgstr ""
123
+
124
+ #: includes/maxbuttons-button.php:57
125
+ msgid "How to make your life easier"
126
+ msgstr ""
127
+
128
+ #: includes/maxbuttons-button.php:65
129
+ msgid "Add a button by using the button name"
130
+ msgstr ""
131
+
132
+ #: includes/maxbuttons-button.php:69
133
+ msgid "Same button with different link"
134
+ msgstr ""
135
+
136
+ #: includes/maxbuttons-button.php:73
137
+ msgid "Same button with diffent text"
138
+ msgstr ""
139
+
140
+ #: includes/maxbuttons-button.php:76
141
+ msgid "All possible shortcode options"
142
+ msgstr ""
143
+
144
+ #: includes/maxbuttons-button.php:80
145
+ msgid "More tips"
146
+ msgstr ""
147
+
148
+ #: includes/maxbuttons-button.php:81
149
+ msgid "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 "
150
+ msgstr ""
151
+
152
+ #: includes/maxbuttons-button.php:85
153
+ msgid "By using this syntax when you edit and save your button it will be changed everywhere it is used on your site. If you delete the button and create a new one with the same name the new button will be used on your site. Easy!"
154
+ msgstr ""
155
+
156
+ #: includes/maxbuttons-button.php:94
157
+ msgid "Preview"
158
+ msgstr ""
159
+
160
+ #: includes/maxbuttons-button.php:108
161
+ #: includes/maxbuttons-button.php:109
162
+ #: includes/maxbuttons-button.php:195
163
+ #: includes/maxbuttons-button.php:196
164
+ #: includes/maxbuttons-button.php:200
165
+ #: includes/maxbuttons-button.php:201
166
+ #: includes/maxbuttons-button.php:206
167
+ #: includes/maxbuttons-button.php:207
168
+ #: blocks/responsive.php:205
169
+ #: blocks/responsive.php:222
170
+ #: blocks/basic.php:387
171
+ #: blocks/basic.php:509
172
+ #: blocks/basic.php:525
173
+ #: blocks/basic.php:548
174
+ #: blocks/basic.php:575
175
+ #: blocks/border.php:212
176
+ #: blocks/container.php:184
177
+ msgid "px"
178
+ msgstr ""
179
+
180
+ #: includes/maxbuttons-button.php:111
181
+ msgid "The top is the normal button, the bottom one is the hover."
182
+ msgstr ""
183
+
184
+ #: includes/maxbuttons-button.php:136
185
+ msgid "Change this color to see your button on a different background."
186
+ msgstr ""
187
+
188
+ #: includes/maxbuttons-button.php:187
189
+ msgid "Your main button for all screens. "
190
+ msgstr ""
191
+
192
+ #: includes/maxbuttons-button.php:191
193
+ msgid "Add a new responsive screen"
194
+ msgstr ""
195
+
196
+ #: includes/maxbuttons-button.php:196
197
+ msgid "Shows at screen size from %s to %s"
198
+ msgstr ""
199
+
200
+ #: includes/maxbuttons-button.php:201
201
+ msgid "Shows at screen size smaller than %s"
202
+ msgstr ""
203
+
204
+ #: includes/maxbuttons-button.php:207
205
+ msgid "Shows at screen size bigger than %s"
206
+ msgstr ""
207
+
208
+ #: includes/maxbuttons-button.php:212
209
+ msgid "Set width and height to use this responsive screen"
210
+ msgstr ""
211
+
212
+ #: includes/maxbuttons-list.php:26
213
+ msgid "Overview"
214
+ msgstr ""
215
+
216
+ #: includes/maxbuttons-list.php:48
217
+ #: includes/maxbuttons-list.php:53
218
+ #: includes/maxbuttons-list-trash.php:128
219
+ msgid "All"
220
+ msgstr ""
221
+
222
+ #: includes/maxbuttons-list.php:49
223
+ #: includes/maxbuttons-list.php:54
224
+ #: includes/maxbuttons-list-trash.php:130
225
+ msgid "Trash"
226
+ msgstr ""
227
+
228
+ #: includes/maxbuttons-list.php:83
229
+ #: includes/maxbuttons-list-trash.php:135
230
+ msgid "Bulk Actions"
231
+ msgstr ""
232
+
233
+ #: includes/maxbuttons-list.php:86
234
+ #: classes/controller.php:73
235
+ msgid "Move to Trash"
236
+ msgstr ""
237
+
238
+ #: includes/maxbuttons-list.php:89
239
+ #: includes/maxbuttons-list.php:173
240
+ #: includes/maxbuttons-list-trash.php:136
241
+ #: includes/maxbuttons-list-trash.php:173
242
+ msgid "Restore"
243
+ msgstr ""
244
+
245
+ #: includes/maxbuttons-list.php:90
246
+ #: includes/maxbuttons-list.php:175
247
+ #: includes/maxbuttons-list-trash.php:137
248
+ #: includes/maxbuttons-list-trash.php:175
249
+ msgid "Delete Permanently"
250
+ msgstr ""
251
+
252
+ #: includes/maxbuttons-list.php:93
253
+ #: includes/maxbuttons-list-trash.php:139
254
+ msgid "Apply"
255
+ msgstr ""
256
+
257
+ #: includes/maxbuttons-list.php:96
258
+ msgid "Empty Trash"
259
+ msgstr ""
260
+
261
+ #: includes/maxbuttons-list.php:123
262
+ #: includes/maxbuttons-list-trash.php:145
263
+ #: assets/integrations/shortcake/shortcake.php:98
264
+ msgid "Button"
265
+ msgstr ""
266
+
267
+ #: includes/maxbuttons-list.php:131
268
+ #: includes/maxbuttons-list-trash.php:146
269
+ msgid "Name and Description"
270
+ msgstr ""
271
+
272
+ #: includes/maxbuttons-list.php:138
273
+ #: includes/maxbuttons-list-trash.php:147
274
+ msgid "Shortcode"
275
+ msgstr ""
276
+
277
+ #: includes/maxbuttons-list.php:162
278
+ msgid "Edit"
279
+ msgstr ""
280
+
281
+ #: includes/maxbuttons-list.php:185
282
+ msgid "or"
283
+ msgstr ""
284
+
285
+ #: includes/maxbuttons-pro.php:11
286
+ #: classes/maxbuttons-class.php:316
287
+ #: classes/maxbuttons-admin-helper.php:39
288
+ msgid "Upgrade to Pro"
289
+ msgstr ""
290
+
291
+ #: includes/maxbuttons-pro.php:16
292
+ #: blocks/responsive.php:289
293
+ msgid "Buy Now"
294
+ msgstr ""
295
+
296
+ #: includes/admin_header.php:15
297
+ msgid "MaxButtons:"
298
+ msgstr ""
299
+
300
+ #: includes/social-share.php:17
301
+ msgid "WordPress Share Buttons"
302
+ msgstr ""
303
+
304
+ #: includes/social-share.php:31
305
+ msgid "MaxButtons Share Buttons"
306
+ msgstr ""
307
+
308
+ #: includes/social-share.php:33
309
+ msgid "We created a brand new plugin to make your Social Share experiences better."
310
+ msgstr ""
311
+
312
+ #: includes/social-share.php:42
313
+ msgid "Features"
314
+ msgstr ""
315
+
316
+ #: includes/social-share.php:44
317
+ msgid "Presets to get going quickly"
318
+ msgstr ""
319
+
320
+ #: includes/social-share.php:45
321
+ msgid ""
322
+ "Many networks: Facebook,\n"
323
+ "\t\t Twitter,\n"
324
+ "\t\t Instagram,\n"
325
+ "\t\t Pinterest,\n"
326
+ "\t\t Linkedin,\n"
327
+ "\t\t Google+,\n"
328
+ "\t\t YouTube,\n"
329
+ "\t\t Pinterest,\n"
330
+ "\t\t VKontakte,\n"
331
+ "\t\t StumbleUpon,\n"
332
+ "\t\t Reddit,\n"
333
+ "\t\t Whatsapp,\n"
334
+ "\t\t Buffer"
335
+ msgstr ""
336
+
337
+ #: includes/social-share.php:59
338
+ msgid "Customizable layout"
339
+ msgstr ""
340
+
341
+ #: includes/social-share.php:63
342
+ msgid "Only with MaxButton PRO:"
343
+ msgstr ""
344
+
345
+ #: includes/social-share.php:66
346
+ msgid "Customize Twitter hashtag per post for maximum SEO value"
347
+ msgstr ""
348
+
349
+ #: includes/social-share.php:67
350
+ msgid "More options for customization"
351
+ msgstr ""
352
+
353
+ #: includes/social-share.php:68
354
+ msgid "Add custom buttons via MaxButtons"
355
+ msgstr ""
356
+
357
+ #: includes/social-share.php:74
358
+ msgid "Install for Free!"
359
+ msgstr ""
360
+
361
+ #: includes/social-share.php:75
362
+ msgid "Check plugin on WordPress site"
363
+ msgstr ""
364
+
365
+ #: includes/maxbuttons-list-trash.php:25
366
+ #: includes/maxbuttons-list-trash.php:53
367
+ #: classes/controllers/listController.php:107
368
+ #: classes/controllers/listController.php:143
369
+ msgid "Restored 1 button."
370
+ msgstr ""
371
+
372
+ #: includes/maxbuttons-list-trash.php:29
373
+ #: classes/controllers/listController.php:111
374
+ msgid "Restored "
375
+ msgstr ""
376
+
377
+ #: includes/maxbuttons-list-trash.php:29
378
+ #: includes/maxbuttons-list-trash.php:46
379
+ #: classes/controllers/listController.php:111
380
+ #: classes/controllers/listController.php:130
381
+ msgid " buttons."
382
+ msgstr ""
383
+
384
+ #: includes/maxbuttons-list-trash.php:42
385
+ #: includes/maxbuttons-list-trash.php:57
386
+ #: classes/controllers/listController.php:126
387
+ #: classes/controllers/listController.php:147
388
+ msgid "Deleted 1 button."
389
+ msgstr ""
390
+
391
+ #: includes/maxbuttons-list-trash.php:46
392
+ #: classes/controllers/listController.php:130
393
+ msgid "Deleted "
394
+ msgstr ""
395
+
396
+ #: includes/maxbuttons-list-trash.php:110
397
+ msgid "MaxButtons: Button List"
398
+ msgstr ""
399
+
400
+ #: includes/maxbuttons-list-trash.php:120
401
+ #: classes/maxbuttons-class.php:308
402
+ #: classes/controller.php:69
403
+ msgid "Add New"
404
+ msgstr ""
405
+
406
+ #: includes/maxbuttons-list-trash.php:148
407
+ msgid "Actions"
408
+ msgstr ""
409
+
410
+ #: includes/maxbuttons-settings.php:10
411
+ #: includes/maxbuttons-settings.php:19
412
+ #: includes/maxbuttons-settings.php:22
413
+ #: classes/maxbuttons-class.php:323
414
+ #: classes/maxbuttons-admin-helper.php:43
415
+ msgid "Settings"
416
+ msgstr ""
417
+
418
+ #: includes/maxbuttons-settings.php:29
419
+ msgid "MaxButtons User Level for editing buttons"
420
+ msgstr ""
421
+
422
+ #: includes/maxbuttons-settings.php:39
423
+ msgid "For more details on user roles and permissions, click %s here%s."
424
+ msgstr ""
425
+
426
+ #: includes/maxbuttons-settings.php:54
427
+ msgid "Hide \"add button\" in post editor toolbar"
428
+ msgstr ""
429
+
430
+ #: includes/maxbuttons-settings.php:73
431
+ msgid "Recommended, only turn off in case of issues. You will have to clear your cache after changing this setting"
432
+ msgstr ""
433
+
434
+ #: includes/maxbuttons-settings.php:74
435
+ msgid "Minify Button CSS"
436
+ msgstr ""
437
+
438
+ #: includes/maxbuttons-settings.php:86
439
+ msgid "Hide description field"
440
+ msgstr ""
441
+
442
+ #: includes/maxbuttons-settings.php:98
443
+ msgid "Preview in Border Box mode"
444
+ msgstr ""
445
+
446
+ #: includes/maxbuttons-settings.php:99
447
+ msgid ""
448
+ "A lot of modern themes render their templates as \"border box\". If you notice that padding\n"
449
+ " \t\t\t\t\t\t and borders looks differently on the site compared to preview, try to turn this option on"
450
+ msgstr ""
451
+
452
+ #: includes/maxbuttons-settings.php:126
453
+ msgid "Additional allowed link protocols"
454
+ msgstr ""
455
+
456
+ #: includes/maxbuttons-settings.php:127
457
+ msgid "Separate multiple protocols with comma"
458
+ msgstr ""
459
+
460
+ #: includes/maxbuttons-settings.php:128
461
+ msgid "You can add link formats not regarded as \"safe\" by WordPress. Use this if links are removed or lose their protocol ( xx:// ). For instance: \"file,sms,skype\" ."
462
+ msgstr ""
463
+
464
+ #: includes/maxbuttons-settings.php:145
465
+ msgid "Clear button cache"
466
+ msgstr ""
467
+
468
+ #: includes/maxbuttons-settings.php:147
469
+ msgid ""
470
+ "Maxbuttons caches the style output allowing for lightning fast display of your buttons. In the event\n"
471
+ " \t\t\tthis cache needs to be flushed and rebuilt you can reset the cache here."
472
+ msgstr ""
473
+
474
+ #: includes/maxbuttons-settings.php:149
475
+ msgid "Reset Cache"
476
+ msgstr ""
477
+
478
+ #: includes/maxbuttons-settings.php:158
479
+ #: blocks/advanced.php:107
480
+ msgid "Advanced"
481
+ msgstr ""
482
+
483
+ #: includes/maxbuttons-settings.php:165
484
+ msgid "Retry Database migration"
485
+ msgstr ""
486
+
487
+ #: includes/maxbuttons-settings.php:166
488
+ msgid "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."
489
+ msgstr ""
490
+
491
+ #: includes/maxbuttons-settings.php:167
492
+ msgid "Remigrate"
493
+ msgstr ""
494
+
495
+ #: includes/maxbuttons-settings.php:178
496
+ msgid "Retry Responsive Migration"
497
+ msgstr ""
498
+
499
+ #: includes/maxbuttons-settings.php:179
500
+ msgid "In case you still have legacy responsive data ( before version 8 ) and this was not migrated for some reason. <strong>Warning</strong> Create a database backup. Use at your own risk. "
501
+ msgstr ""
502
+
503
+ #: includes/maxbuttons-settings.php:180
504
+ msgid "Remigrate Responsive"
505
+ msgstr ""
506
+
507
+ #: includes/maxbuttons-settings.php:190
508
+ msgid "UTF8 Table Fix"
509
+ msgstr ""
510
+
511
+ #: includes/maxbuttons-settings.php:193
512
+ msgid "WARNING: We strongly recommend backing up your database before altering the charset of the MaxButtons table in your WordPress database."
513
+ msgstr ""
514
+
515
+ #: includes/maxbuttons-settings.php:195
516
+ msgid "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."
517
+ msgstr ""
518
+
519
+ #: includes/maxbuttons-settings.php:198
520
+ msgid "Change MaxButtons Table To UTF8"
521
+ msgstr ""
522
+
523
+ #: includes/maxbuttons-settings.php:229
524
+ msgid "Bulk edit"
525
+ msgstr ""
526
+
527
+ #: includes/maxbuttons-settings.php:232
528
+ msgid "Using Bulk editor MAY and probably WILL destroy your buttons. In case you wish to prevent this - please BACKUP all your buttons before proceeding!"
529
+ msgstr ""
530
+
531
+ #: includes/maxbuttons-settings.php:234
532
+ msgid "Field"
533
+ msgstr ""
534
+
535
+ #: includes/maxbuttons-settings.php:236
536
+ msgid "Search"
537
+ msgstr ""
538
+
539
+ #: includes/maxbuttons-settings.php:237
540
+ #: includes/maxbuttons-settings.php:243
541
+ msgid "Replace"
542
+ msgstr ""
543
+
544
+ #: includes/maxbuttons-settings.php:240
545
+ msgid "I understand that this may destroy all my buttons"
546
+ msgstr ""
547
+
548
+ #: includes/maxbuttons-settings.php:249
549
+ msgid "I need to bulk edit something"
550
+ msgstr ""
551
+
552
+ #: includes/maxbuttons-welcome.php:5
553
+ msgid "Welcome to MaxButtons!"
554
+ msgstr ""
555
+
556
+ #: includes/maxbuttons-welcome.php:7
557
+ msgid "To get you started, %s Create your first button %s"
558
+ msgstr ""
559
+
560
+ #: includes/maxbuttons-welcome.php:10
561
+ msgid "Some links that may be helpful:"
562
+ msgstr ""
563
+
564
+ #: includes/maxbuttons-welcome.php:12
565
+ msgid "Creating buttons with MaxButtons"
566
+ msgstr ""
567
+
568
+ #: includes/maxbuttons-welcome.php:13
569
+ msgid "Support Forums"
570
+ msgstr ""
571
+
572
+ #: includes/maxbuttons-welcome.php:18
573
+ msgid "Organize your Designs"
574
+ msgstr ""
575
+
576
+ #: includes/maxbuttons-welcome.php:20
577
+ msgid "MaxButtons uses shortcodes. These are small snippets you can copy into your posts and pages. You will see a button in your post editor which will make this easier."
578
+ msgstr ""
579
+
580
+ #: includes/maxbuttons-welcome.php:22
581
+ msgid "Do Not Repeat!"
582
+ msgstr ""
583
+
584
+ #: includes/maxbuttons-welcome.php:22
585
+ msgid "You can use your button design many times. Even with a different text and link!"
586
+ msgstr ""
587
+
588
+ #: includes/maxbuttons-no-simplexml.php:6
589
+ msgid "Enable SimpleXML"
590
+ msgstr ""
591
+
592
+ #: includes/maxbuttons-no-simplexml.php:21
593
+ msgid "PHP Module SimpleXML not found. This module will not work"
594
+ msgstr ""
595
+
596
+ #: includes/maxbuttons-no-simplexml.php:23
597
+ msgid ""
598
+ "To enable this module please install the SimpleXML PHP module. If you don't know how, ask your support from your\n"
599
+ "\thosting provider"
600
+ msgstr ""
601
+
602
+ #: includes/maxbuttons-no-simplexml.php:27
603
+ msgid "SimpleXML installation"
604
+ msgstr ""
605
+
606
+ #: includes/maxbuttons-support.php:18
607
+ #: classes/maxbuttons-class.php:330
608
+ #: classes/maxbuttons-admin-helper.php:47
609
+ msgid "Support"
610
+ msgstr ""
611
+
612
+ #: includes/maxbuttons-support.php:19
613
+ msgid "Go to support"
614
+ msgstr ""
615
+
616
+ #: includes/maxbuttons-support.php:28
617
+ msgid "%sSupport Forums%s."
618
+ msgstr ""
619
+
620
+ #: includes/maxbuttons-support.php:32
621
+ msgid "You may be asked to provide the information below to help troubleshoot your issue."
622
+ msgstr ""
623
+
624
+ #: assets/integrations/shortcake/shortcake.php:102
625
+ msgid "Select a button"
626
+ msgstr ""
627
+
628
+ #: assets/integrations/shortcake/shortcake.php:106
629
+ msgid "Custom URL [optional]"
630
+ msgstr ""
631
+
632
+ #: assets/integrations/shortcake/shortcake.php:116
633
+ msgid "Custom Text [optional]"
634
+ msgstr ""
635
+
636
+ #: assets/integrations/siteorigins_builder/fields/maxbutton.class.php:68
637
+ msgid "Choose Maxbutton"
638
+ msgstr ""
639
+
640
+ #: assets/integrations/siteorigins_builder/fields/maxbutton.class.php:69
641
+ msgid "Set Media"
642
+ msgstr ""
643
+
644
+ #: assets/integrations/siteorigins_builder/fields/maxbutton.class.php:117
645
+ msgid "Selected Button"
646
+ msgstr ""
647
+
648
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:20
649
+ msgid "MaxButtons for the page builder."
650
+ msgstr ""
651
+
652
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:29
653
+ msgid "Select a maxbutton"
654
+ msgstr ""
655
+
656
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:35
657
+ msgid "Button text [optional]"
658
+ msgstr ""
659
+
660
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:40
661
+ msgid "Destination URL [optional]"
662
+ msgstr ""
663
+
664
+ #: assets/integrations/siteorigins_builder/widgets/maxbuttons-widget/maxbuttons-widget.php:46
665
+ msgid "Open in a new window [optional]"
666
+ msgstr ""
667
+
668
+ #: maxbuttons.php:27
669
+ msgid "Already found an instance of MaxButtons running. Please check if you are trying to activate two MaxButtons plugins and deactivate one. "
670
+ msgstr ""
671
+
672
+ #: classes/maxbuttons-class.php:81
673
+ msgid "Fatal Problem with MaxButtons"
674
+ msgstr ""
675
+
676
+ #: classes/maxbuttons-class.php:82
677
+ msgid "Can't read directory. %s Reinstall the plugin or check directory permissions"
678
+ msgstr ""
679
+
680
+ #: classes/maxbuttons-class.php:290
681
+ msgid "MaxButtons: Buttons"
682
+ msgstr ""
683
+
684
+ #: classes/maxbuttons-class.php:302
685
+ #: classes/maxbuttons-class.php:708
686
+ #: classes/maxbuttons-admin-helper.php:36
687
+ msgid "Buttons"
688
+ msgstr ""
689
+
690
+ #: classes/maxbuttons-class.php:307
691
+ msgid "MaxButtons: Add/Edit Button"
692
+ msgstr ""
693
+
694
+ #: classes/maxbuttons-class.php:315
695
+ msgid "MaxButtons: Upgrade to Pro"
696
+ msgstr ""
697
+
698
+ #: classes/maxbuttons-class.php:322
699
+ msgid "MaxButtons: Settings"
700
+ msgstr ""
701
+
702
+ #: classes/maxbuttons-class.php:329
703
+ msgid "MaxButtons: Support"
704
+ msgstr ""
705
+
706
+ #: classes/maxbuttons-class.php:337
707
+ msgid "MaxButtons: Share Buttons"
708
+ msgstr ""
709
+
710
+ #: classes/maxbuttons-class.php:338
711
+ msgid "Share Buttons"
712
+ msgstr ""
713
+
714
+ #: classes/maxbuttons-class.php:490
715
+ msgid "Are you sure you want to remove this screen?"
716
+ msgstr ""
717
+
718
+ #: classes/maxbuttons-class.php:532
719
+ msgid "OK"
720
+ msgstr ""
721
+
722
+ #: classes/maxbuttons-class.php:554
723
+ msgid "You have unsaved data, are you sure you want to leave the page?"
724
+ msgstr ""
725
+
726
+ #: classes/maxbuttons-class.php:576
727
+ msgid "Insert Button into Editor"
728
+ msgstr ""
729
+
730
+ #: classes/maxbuttons-class.php:577
731
+ msgid "Use this Button"
732
+ msgstr ""
733
+
734
+ #: classes/maxbuttons-class.php:578
735
+ msgid "Loading your buttons"
736
+ msgstr ""
737
+
738
+ #: classes/maxbuttons-class.php:579
739
+ msgid "Click on a button from the list below to place the button shortcode in the editor."
740
+ msgstr ""
741
+
742
+ #: classes/maxbuttons-class.php:581
743
+ msgid "Select a MaxButton"
744
+ msgstr ""
745
+
746
+ #: classes/maxbuttons-class.php:584
747
+ #: classes/admin-class.php:314
748
+ msgid "Button URL"
749
+ msgstr ""
750
+
751
+ #: classes/maxbuttons-class.php:585
752
+ #: classes/admin-class.php:327
753
+ msgid "Button Text"
754
+ msgstr ""
755
+
756
+ #: classes/maxbuttons-class.php:586
757
+ msgid "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"
758
+ msgstr ""
759
+
760
+ #: classes/maxbuttons-class.php:587
761
+ msgid "Add to Editor"
762
+ msgstr ""
763
+
764
+ #: classes/maxbuttons-class.php:623
765
+ msgid "Add Button"
766
+ msgstr ""
767
+
768
+ #: classes/maxbuttons-class.php:719
769
+ msgid "%sUpgrade to Pro Version%s"
770
+ msgstr ""
771
+
772
+ #: classes/maxbuttons-admin-helper.php:27
773
+ msgid "Upgrade to MaxButtons Pro today! %sClick Here%s"
774
+ msgstr ""
775
+
776
+ #: classes/maxbuttons-admin-helper.php:235
777
+ msgid "Go to the first page"
778
+ msgstr ""
779
+
780
+ #: classes/maxbuttons-admin-helper.php:241
781
+ msgid "Go to the previous page"
782
+ msgstr ""
783
+
784
+ #: classes/maxbuttons-admin-helper.php:244
785
+ msgid "of"
786
+ msgstr ""
787
+
788
+ #: classes/maxbuttons-admin-helper.php:250
789
+ msgid "Go to the next page"
790
+ msgstr ""
791
+
792
+ #: classes/maxbuttons-admin-helper.php:256
793
+ msgid "Go to the last page"
794
+ msgstr ""
795
+
796
+ #: classes/maxbuttons-admin-helper.php:270
797
+ msgid "Rate us Please!"
798
+ msgstr ""
799
+
800
+ #: classes/maxbuttons-admin-helper.php:271
801
+ msgid "Your rating is the simplest way to support MaxButtons. We really appreciate it!"
802
+ msgstr ""
803
+
804
+ #: classes/maxbuttons-admin-helper.php:274
805
+ msgid "I've already left a review"
806
+ msgstr ""
807
+
808
+ #: classes/maxbuttons-admin-helper.php:275
809
+ msgid "Maybe Later"
810
+ msgstr ""
811
+
812
+ #: classes/maxbuttons-admin-helper.php:276
813
+ msgid "Sure! I'd love to!"
814
+ msgstr ""
815
+
816
+ #: classes/maxbuttons-admin-helper.php:292
817
+ msgid "Welcome to MaxButtons Social Sharing"
818
+ msgstr ""
819
+
820
+ #: classes/maxbuttons-admin-helper.php:293
821
+ msgid "Social Sharing sets are collections of buttons that are primarily used to promote your social media profiles on your site."
822
+ msgstr ""
823
+
824
+ #: classes/maxbuttons-admin-helper.php:294
825
+ msgid "MaxButtons comes with 5 terrific free sets of Social Sharing buttons for you to use: Notched Box Social Share, Modern Social Share, Round White Social Share, Social Share Squares, Minimalistic Share Buttons. You can also add any other button you have made to a collection of Social Sharing buttons."
826
+ msgstr ""
827
+
828
+ #: classes/maxbuttons-admin-helper.php:296
829
+ msgid "After clicking the Get Started link below you’ll come to the ‘Select your buttons’ page. Here you will see the listing of free Social Sharing sets plus all of the buttons that you have on your site can be used in the collection that you are putting together."
830
+ msgstr ""
831
+
832
+ #: classes/maxbuttons-admin-helper.php:298
833
+ msgid "You build your Social Sharing set by selecting the buttons you want in your collection. Then click the Add selected buttons button in the lower right. Aside from being included in your collection your selected buttons are now included with all of the other buttons on your site. You can edit those buttons by going to the Buttons section in the Nav bar on the left."
834
+ msgstr ""
835
+
836
+ #: classes/maxbuttons-admin-helper.php:300
837
+ msgid "By upgrading to %sMaxButtons Pro%s you get an 13 additional Social Sharing button sets along with the ability to build your own Social Sharing sets using your own icons, using Google Fonts in your Social Sharing buttons along with all of the features that come with our premium product."
838
+ msgstr ""
839
+
840
+ #: classes/maxbuttons-admin-helper.php:302
841
+ msgid "Click Get Started and we will have your social media icons up and running on your site super quick!"
842
+ msgstr ""
843
+
844
+ #: classes/maxbuttons-admin-helper.php:304
845
+ msgid "The Max Foundry Team"
846
+ msgstr ""
847
+
848
+ #: classes/maxbuttons-admin-helper.php:307
849
+ msgid "Get Started"
850
+ msgstr ""
851
+
852
+ #: classes/field.php:79
853
+ msgid "Default:"
854
+ msgstr ""
855
+
856
+ #: classes/controllers/editorController.php:38
857
+ msgid "Maxbuttons button id is zero. Your data is not saved correctly! Please check your database."
858
+ msgstr ""
859
+
860
+ #: classes/controllers/editorController.php:46
861
+ msgid "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! "
862
+ msgstr ""
863
+
864
+ #: classes/controllers/editorController.php:144
865
+ msgid "Maxbuttons Error: Button id should never be zero"
866
+ msgstr ""
867
+
868
+ #: classes/controllers/listController.php:70
869
+ msgid "Something went wrong with the form, nonce not verified"
870
+ msgstr ""
871
+
872
+ #: classes/controllers/listController.php:87
873
+ #: classes/controllers/listController.php:139
874
+ msgid "Moved 1 button to the trash."
875
+ msgstr ""
876
+
877
+ #: classes/controllers/listController.php:91
878
+ msgid "Moved "
879
+ msgstr ""
880
+
881
+ #: classes/controllers/listController.php:91
882
+ msgid " buttons to the trash."
883
+ msgstr ""
884
+
885
+ #: classes/controllers/listController.php:152
886
+ msgid "Emptied Trash"
887
+ msgstr ""
888
+
889
+ #: classes/admin-class.php:32
890
+ msgid "[Site Default]"
891
+ msgstr ""
892
+
893
+ #: classes/admin-class.php:215
894
+ msgid "Click on a button to select it and add the shortcode to the editor"
895
+ msgstr ""
896
+
897
+ #: classes/admin-class.php:225
898
+ msgid "You didn't create any buttons yet!"
899
+ msgstr ""
900
+
901
+ #: classes/admin-class.php:226
902
+ msgid "Click %shere%s to add one"
903
+ msgstr ""
904
+
905
+ #: classes/admin-class.php:306
906
+ msgid "Change the options to add shortcode attributes. "
907
+ msgstr ""
908
+
909
+ #: classes/admin-class.php:339
910
+ msgid "More Options"
911
+ msgstr ""
912
+
913
+ #: classes/admin-class.php:346
914
+ #: blocks/basic.php:327
915
+ msgid "Open in New Window"
916
+ msgstr ""
917
+
918
+ #: classes/admin-class.php:361
919
+ #: blocks/basic.php:337
920
+ msgid "Use rel=\"nofollow\""
921
+ msgstr ""
922
+
923
+ #: classes/admin-class.php:379
924
+ #: blocks/basic.php:347
925
+ msgid "Button Tooltip"
926
+ msgstr ""
927
+
928
+ #: classes/admin-class.php:396
929
+ #: blocks/advanced.php:122
930
+ msgid "Extra classes"
931
+ msgstr ""
932
+
933
+ #: classes/screen.php:70
934
+ msgid "Main"
935
+ msgstr ""
936
+
937
+ #: classes/screen.php:89
938
+ msgid "Add"
939
+ msgstr ""
940
+
941
+ #: classes/controller.php:70
942
+ msgid "Save"
943
+ msgstr ""
944
+
945
+ #: classes/controller.php:74
946
+ msgid "Delete"
947
+ msgstr ""
948
+
949
+ #: classes/max-utils.php:38
950
+ msgid "Nonce not verified ("
951
+ msgstr ""
952
+
953
+ #: classes/max-utils.php:164
954
+ msgid "Small phones, < 480px"
955
+ msgstr ""
956
+
957
+ #: classes/max-utils.php:165
958
+ msgid "Small phones (landscape) "
959
+ msgstr ""
960
+
961
+ #: classes/max-utils.php:166
962
+ msgid "Small phones (portrait), < 320px "
963
+ msgstr ""
964
+
965
+ #: classes/max-utils.php:167
966
+ msgid "Medium-size (smart)phone (480px-768px)"
967
+ msgstr ""
968
+
969
+ #: classes/max-utils.php:168
970
+ msgid "Ipad (all) / Large phones (768px-1024px)"
971
+ msgstr ""
972
+
973
+ #: classes/max-utils.php:169
974
+ msgid "Ipad landscape"
975
+ msgstr ""
976
+
977
+ #: classes/max-utils.php:170
978
+ msgid "Ipad portrait"
979
+ msgstr ""
980
+
981
+ #: classes/max-utils.php:171
982
+ msgid "Desktop, > 1224px"
983
+ msgstr ""
984
+
985
+ #: classes/max-utils.php:172
986
+ msgid "Large desktops"
987
+ msgstr ""
988
+
989
+ #: classes/max-utils.php:173
990
+ msgid "Custom size"
991
+ msgstr ""
992
+
993
+ #: classes/max-utils.php:177
994
+ msgid "Optimized for small smartphones ( screen sizes under 480px )"
995
+ msgstr ""
996
+
997
+ #: classes/max-utils.php:178
998
+ msgid "Optimzed for small smartphones in landscape and higher ( screen sizes 321px - 480px)"
999
+ msgstr ""
1000
+
1001
+ #: classes/max-utils.php:179
1002
+ msgid "Optimized for small phones ( screen size max 320px )"
1003
+ msgstr ""
1004
+
1005
+ #: classes/max-utils.php:180
1006
+ msgid "Optimized for devices between 768px and 1024px"
1007
+ msgstr ""
1008
+
1009
+ #: classes/max-utils.php:181
1010
+ msgid "Optimized for medium sizes devices between 480px and 768px"
1011
+ msgstr ""
1012
+
1013
+ #: classes/max-utils.php:182
1014
+ msgid "Optimized for devices between 768px and 1024px in landscape"
1015
+ msgstr ""
1016
+
1017
+ #: classes/max-utils.php:183
1018
+ msgid "Optimized for deviced between 768px and 1024 in portrait"
1019
+ msgstr ""
1020
+
1021
+ #: classes/max-utils.php:184
1022
+ msgid "Desktop screens from 1224px"
1023
+ msgstr ""
1024
+
1025
+ #: classes/max-utils.php:185
1026
+ msgid "Large desktop screens, from 1824px"
1027
+ msgstr ""
1028
+
1029
+ #: classes/max-utils.php:186
1030
+ msgid "Set your own breakpoints"
1031
+ msgstr ""
1032
+
1033
+ #: classes/max-utils.php:457
1034
+ msgid "MaxButtons Loading Time:"
1035
+ msgstr ""
1036
+
1037
+ #: blocks/responsive.php:110
1038
+ msgid "Modern Smartphone (1080px)"
1039
+ msgstr ""
1040
+
1041
+ #: blocks/responsive.php:111
1042
+ msgid "Medium Smartphone (768px)"
1043
+ msgstr ""
1044
+
1045
+ #: blocks/responsive.php:112
1046
+ msgid "Small screen (640px)"
1047
+ msgstr ""
1048
+
1049
+ #: blocks/responsive.php:113
1050
+ msgid "Old Phone (480px)"
1051
+ msgstr ""
1052
+
1053
+ #: blocks/responsive.php:118
1054
+ msgid "No Preset"
1055
+ msgstr ""
1056
+
1057
+ #: blocks/responsive.php:149
1058
+ msgid "responsive"
1059
+ msgstr ""
1060
+
1061
+ #: blocks/responsive.php:150
1062
+ msgid "Screen Settings"
1063
+ msgstr ""
1064
+
1065
+ #: blocks/responsive.php:157
1066
+ msgid "Screen Name"
1067
+ msgstr ""
1068
+
1069
+ #: blocks/responsive.php:189
1070
+ msgid "Apply preset"
1071
+ msgstr ""
1072
+
1073
+ #: blocks/responsive.php:195
1074
+ msgid "Selecting a preset will overwrite screen settings below"
1075
+ msgstr ""
1076
+
1077
+ #: blocks/responsive.php:204
1078
+ msgid "Minimum Width"
1079
+ msgstr ""
1080
+
1081
+ #: blocks/responsive.php:209
1082
+ msgid "Smallest screen size this screen will show. 0 for all"
1083
+ msgstr ""
1084
+
1085
+ #: blocks/responsive.php:216
1086
+ msgid "Maximum Width"
1087
+ msgstr ""
1088
+
1089
+ #: blocks/responsive.php:220
1090
+ msgid "Biggest screen size this screen will show. 0 for no maximum"
1091
+ msgstr ""
1092
+
1093
+ #: blocks/responsive.php:229
1094
+ msgid "Hide button in this screen"
1095
+ msgstr ""
1096
+
1097
+ #: blocks/responsive.php:232
1098
+ msgid "When set, the button will not display at all in this screen"
1099
+ msgstr ""
1100
+
1101
+ #: blocks/responsive.php:241
1102
+ msgid "Remove this screen"
1103
+ msgstr ""
1104
+
1105
+ #: blocks/responsive.php:257
1106
+ msgid "Save changes and add new Screen"
1107
+ msgstr ""
1108
+
1109
+ #: blocks/responsive.php:274
1110
+ msgid "upgrade"
1111
+ msgstr ""
1112
+
1113
+ #: blocks/responsive.php:275
1114
+ msgid "Upgrade Today"
1115
+ msgstr ""
1116
+
1117
+ #: blocks/responsive.php:280
1118
+ msgid "Save your settings first to remove the screen"
1119
+ msgstr ""
1120
+
1121
+ #: blocks/responsive.php:281
1122
+ msgid "You already have %s screens. To add more responsive screens to your buttons, upgrade to MaxButtons PRO."
1123
+ msgstr ""
1124
+
1125
+ #: blocks/responsive.php:284
1126
+ msgid "Infinite amount of screens"
1127
+ msgstr ""
1128
+
1129
+ #: blocks/responsive.php:285
1130
+ msgid "Icons and Images"
1131
+ msgstr ""
1132
+
1133
+ #: blocks/responsive.php:286
1134
+ msgid "Effects"
1135
+ msgstr ""
1136
+
1137
+ #: blocks/responsive.php:287
1138
+ msgid "Google Fonts and Font-Awesome"
1139
+ msgstr ""
1140
+
1141
+ #: blocks/responsive.php:290
1142
+ msgid "See all features"
1143
+ msgstr ""
1144
+
1145
+ #: blocks/basic.php:244
1146
+ msgid "Button name already used. Using non-unique names with the shortcode can cause issues"
1147
+ msgstr ""
1148
+
1149
+ #: blocks/basic.php:262
1150
+ msgid "basic"
1151
+ msgstr ""
1152
+
1153
+ #: blocks/basic.php:263
1154
+ msgid "Basics"
1155
+ msgstr ""
1156
+
1157
+ #: blocks/basic.php:266
1158
+ #: blocks/gradient.php:80
1159
+ #: blocks/border.php:111
1160
+ #: blocks/text.php:143
1161
+ msgid "Replace color from other field"
1162
+ msgstr ""
1163
+
1164
+ #: blocks/basic.php:267
1165
+ #: blocks/gradient.php:81
1166
+ #: blocks/border.php:112
1167
+ #: blocks/text.php:144
1168
+ msgid "Copy Color to other field"
1169
+ msgstr ""
1170
+
1171
+ #: blocks/basic.php:273
1172
+ #: blocks/basic.php:278
1173
+ msgid "Button Name"
1174
+ msgstr ""
1175
+
1176
+ #: blocks/basic.php:289
1177
+ msgid "URL"
1178
+ msgstr ""
1179
+
1180
+ #: blocks/basic.php:293
1181
+ msgid "http://"
1182
+ msgstr ""
1183
+
1184
+ #: blocks/basic.php:296
1185
+ msgid ""
1186
+ "<p>Enter any URL you wish to link to. </p>\n"
1187
+ "\t\t\t\t\t<p>Examples: <br><ul class='nowrap'><li> https://example.com/ </li>\n"
1188
+ "\t\t\t\t\t\t\t\t <li> /local-page/ </li>\n"
1189
+ "\t\t\t\t\t\t\t\t <li> javascript:window.history.back(); </li></ul></p>\n"
1190
+ "\t\t\t\t\t<p class='shortcode'> Shortcode attribute : url </p>"
1191
+ msgstr ""
1192
+
1193
+ #: blocks/basic.php:306
1194
+ msgid "Select Site Content"
1195
+ msgstr ""
1196
+
1197
+ #: blocks/basic.php:352
1198
+ msgid ""
1199
+ "<p>This text will appear when hovering over the button</p>\n"
1200
+ "\t\t\t\t\t<p class=\"shortcode\">Shortcode attribute : linktitle</p>"
1201
+ msgstr ""
1202
+
1203
+ #: blocks/basic.php:358
1204
+ msgid "Text"
1205
+ msgstr ""
1206
+
1207
+ #: blocks/basic.php:369
1208
+ msgid "Font"
1209
+ msgstr ""
1210
+
1211
+ #: blocks/basic.php:394
1212
+ msgid "Bold"
1213
+ msgstr ""
1214
+
1215
+ #: blocks/basic.php:405
1216
+ msgid "Italic"
1217
+ msgstr ""
1218
+
1219
+ #: blocks/basic.php:415
1220
+ msgid "Align left"
1221
+ msgstr ""
1222
+
1223
+ #: blocks/basic.php:425
1224
+ msgid "Align center"
1225
+ msgstr ""
1226
+
1227
+ #: blocks/basic.php:435
1228
+ msgid "Align right"
1229
+ msgstr ""
1230
+
1231
+ #: blocks/basic.php:445
1232
+ msgid "Padding"
1233
+ msgstr ""
1234
+
1235
+ #: blocks/basic.php:450
1236
+ msgid "Padding Top"
1237
+ msgstr ""
1238
+
1239
+ #: blocks/basic.php:459
1240
+ msgid "Padding Right"
1241
+ msgstr ""
1242
+
1243
+ #: blocks/basic.php:468
1244
+ msgid "Padding Bottom"
1245
+ msgstr ""
1246
+
1247
+ #: blocks/basic.php:477
1248
+ msgid "Padding Left"
1249
+ msgstr ""
1250
+
1251
+ #: blocks/basic.php:486
1252
+ msgid "Text Color"
1253
+ msgstr ""
1254
+
1255
+ #: blocks/basic.php:499
1256
+ msgid "Text Color Hover"
1257
+ msgstr ""
1258
+
1259
+ #: blocks/basic.php:509
1260
+ #: blocks/basic.php:525
1261
+ #: blocks/basic.php:559
1262
+ #: blocks/basic.php:583
1263
+ #: blocks/container.php:193
1264
+ msgid "%"
1265
+ msgstr ""
1266
+
1267
+ #: blocks/basic.php:515
1268
+ msgid "Button Width"
1269
+ msgstr ""
1270
+
1271
+ #: blocks/basic.php:530
1272
+ msgid "Button Height"
1273
+ msgstr ""
1274
+
1275
+ #: blocks/basic.php:536
1276
+ msgid "Width and Height are optional. When set to 0,button size will be determined by text size plus padding"
1277
+ msgstr ""
1278
+
1279
+ #: blocks/basic.php:541
1280
+ #: blocks/container.php:177
1281
+ msgid "Width Unit"
1282
+ msgstr ""
1283
+
1284
+ #: blocks/basic.php:569
1285
+ msgid "Height Unit"
1286
+ msgstr ""
1287
+
1288
+ #: blocks/basic.php:597
1289
+ msgid "Description"
1290
+ msgstr ""
1291
+
1292
+ #: blocks/basic.php:603
1293
+ msgid "Brief explanation about how and where the button is used."
1294
+ msgstr ""
1295
+
1296
+ #: blocks/gradient.php:56
1297
+ msgid "gradient-options"
1298
+ msgstr ""
1299
+
1300
+ #: blocks/gradient.php:57
1301
+ msgid "Background"
1302
+ msgstr ""
1303
+
1304
+ #: blocks/gradient.php:84
1305
+ msgid "Use Gradients"
1306
+ msgstr ""
1307
+
1308
+ #: blocks/gradient.php:101
1309
+ msgid "Start"
1310
+ msgstr ""
1311
+
1312
+ #: blocks/gradient.php:108
1313
+ msgid "End"
1314
+ msgstr ""
1315
+
1316
+ #: blocks/gradient.php:120
1317
+ msgid "Background color"
1318
+ msgstr ""
1319
+
1320
+ #: blocks/gradient.php:150
1321
+ msgid "Background hover"
1322
+ msgstr ""
1323
+
1324
+ #: blocks/gradient.php:178
1325
+ msgid "Normal Opacity"
1326
+ msgstr ""
1327
+
1328
+ #: blocks/gradient.php:201
1329
+ msgid "Hover opacity"
1330
+ msgstr ""
1331
+
1332
+ #: blocks/gradient.php:224
1333
+ msgid "Gradient stop"
1334
+ msgstr ""
1335
+
1336
+ #: blocks/advanced.php:106
1337
+ msgid "advanced"
1338
+ msgstr ""
1339
+
1340
+ #: blocks/advanced.php:111
1341
+ msgid "Adding !important to the button styles can help avoid potential conflicts with your theme styles."
1342
+ msgstr ""
1343
+
1344
+ #: blocks/advanced.php:115
1345
+ msgid "Use !Important"
1346
+ msgstr ""
1347
+
1348
+ #: blocks/advanced.php:124
1349
+ msgid "Useful for custom code or other plugins who target classes"
1350
+ msgstr ""
1351
+
1352
+ #: blocks/advanced.php:131
1353
+ msgid "Custom Rel Tag"
1354
+ msgstr ""
1355
+
1356
+ #: blocks/advanced.php:133
1357
+ msgid "Useful when button is targeting lightbox and/or popup plugins that use this method"
1358
+ msgstr ""
1359
+
1360
+ #: blocks/advanced.php:139
1361
+ msgid "Enabling the \"Use External CSS\" will stop loading any button styling. You will need to put the button style manually"
1362
+ msgstr ""
1363
+
1364
+ #: blocks/advanced.php:140
1365
+ msgid "Use External CSS"
1366
+ msgstr ""
1367
+
1368
+ #: blocks/advanced.php:148
1369
+ msgid "Warning: This will remove all styling of the buttons!"
1370
+ msgstr ""
1371
+
1372
+ #: blocks/advanced.php:156
1373
+ msgid "View CSS"
1374
+ msgstr ""
1375
+
1376
+ #: blocks/advanced.php:168
1377
+ msgid "External CSS"
1378
+ msgstr ""
1379
+
1380
+ #: blocks/advanced.php:170
1381
+ msgid "If the \"Use External CSS\" option is enabled for this button, copy and paste the CSS code below into your theme stylesheet."
1382
+ msgstr ""
1383
+
1384
+ #: blocks/advanced.php:187
1385
+ msgid "Please save the button first"
1386
+ msgstr ""
1387
+
1388
+ #: blocks/advanced.php:192
1389
+ msgid "Close"
1390
+ msgstr ""
1391
+
1392
+ #: blocks/meta.php:86
1393
+ msgid "Meta"
1394
+ msgstr ""
1395
+
1396
+ #: blocks/border.php:101
1397
+ msgid "dashed"
1398
+ msgstr ""
1399
+
1400
+ #: blocks/border.php:102
1401
+ msgid "dotted"
1402
+ msgstr ""
1403
+
1404
+ #: blocks/border.php:103
1405
+ msgid "double"
1406
+ msgstr ""
1407
+
1408
+ #: blocks/border.php:104
1409
+ msgid "groove"
1410
+ msgstr ""
1411
+
1412
+ #: blocks/border.php:105
1413
+ msgid "inset"
1414
+ msgstr ""
1415
+
1416
+ #: blocks/border.php:106
1417
+ msgid "outset"
1418
+ msgstr ""
1419
+
1420
+ #: blocks/border.php:107
1421
+ msgid "ridge"
1422
+ msgstr ""
1423
+
1424
+ #: blocks/border.php:108
1425
+ msgid "solid"
1426
+ msgstr ""
1427
+
1428
+ #: blocks/border.php:117
1429
+ msgid "border"
1430
+ msgstr ""
1431
+
1432
+ #: blocks/border.php:118
1433
+ msgid "Border"
1434
+ msgstr ""
1435
+
1436
+ #: blocks/border.php:124
1437
+ msgid "Radius"
1438
+ msgstr ""
1439
+
1440
+ #: blocks/border.php:185
1441
+ msgid "Top Left"
1442
+ msgstr ""
1443
+
1444
+ #: blocks/border.php:187
1445
+ msgid "Top Right"
1446
+ msgstr ""
1447
+
1448
+ #: blocks/border.php:189
1449
+ msgid "Bottom Left"
1450
+ msgstr ""
1451
+
1452
+ #: blocks/border.php:191
1453
+ msgid "Bottom Right"
1454
+ msgstr ""
1455
+
1456
+ #: blocks/border.php:197
1457
+ msgid "Style"
1458
+ msgstr ""
1459
+
1460
+ #: blocks/border.php:207
1461
+ #: blocks/container.php:171
1462
+ msgid "Width"
1463
+ msgstr ""
1464
+
1465
+ #: blocks/border.php:221
1466
+ msgid "Border Color"
1467
+ msgstr ""
1468
+
1469
+ #: blocks/border.php:234
1470
+ #: blocks/border.php:296
1471
+ #: blocks/text.php:201
1472
+ msgid "Hover"
1473
+ msgstr ""
1474
+
1475
+ #: blocks/border.php:244
1476
+ #: blocks/text.php:155
1477
+ msgid "Shadow Offset Left"
1478
+ msgstr ""
1479
+
1480
+ #: blocks/border.php:253
1481
+ #: blocks/text.php:165
1482
+ msgid "Shadow Offset Top"
1483
+ msgstr ""
1484
+
1485
+ #: blocks/border.php:262
1486
+ #: blocks/text.php:175
1487
+ msgid "Shadow Blur"
1488
+ msgstr ""
1489
+
1490
+ #: blocks/border.php:271
1491
+ msgid "Shadow Spread"
1492
+ msgstr ""
1493
+
1494
+ #: blocks/border.php:283
1495
+ msgid "Border Shadow Color"
1496
+ msgstr ""
1497
+
1498
+ #: blocks/text.php:79
1499
+ msgid "YOUR TEXT"
1500
+ msgstr ""
1501
+
1502
+ #: blocks/text.php:148
1503
+ msgid "shadow"
1504
+ msgstr ""
1505
+
1506
+ #: blocks/text.php:149
1507
+ msgid "Text Shadow"
1508
+ msgstr ""
1509
+
1510
+ #: blocks/text.php:188
1511
+ msgid "Shadow Color"
1512
+ msgstr ""
1513
+
1514
+ #: blocks/container.php:132
1515
+ msgid "container"
1516
+ msgstr ""
1517
+
1518
+ #: blocks/container.php:133
1519
+ msgid "Container"
1520
+ msgstr ""
1521
+
1522
+ #: blocks/container.php:138
1523
+ msgid "Use Container"
1524
+ msgstr ""
1525
+
1526
+ #: blocks/container.php:141
1527
+ msgid "Creates a container around the button which pushes other content"
1528
+ msgstr ""
1529
+
1530
+ #: blocks/container.php:158
1531
+ msgid "Center the container"
1532
+ msgstr ""
1533
+
1534
+ #: blocks/container.php:202
1535
+ msgid "Margin"
1536
+ msgstr ""
1537
+
1538
+ #: blocks/container.php:207
1539
+ msgid "Margin Top"
1540
+ msgstr ""
1541
+
1542
+ #: blocks/container.php:216
1543
+ msgid "Margin Right"
1544
+ msgstr ""
1545
+
1546
+ #: blocks/container.php:225
1547
+ msgid "Margin Bottom"
1548
+ msgstr ""
1549
+
1550
+ #: blocks/container.php:234
1551
+ msgid "Margin Left"
1552
+ msgstr ""
1553
+
1554
+ #: blocks/container.php:239
1555
+ msgid "Alignment"
1556
+ msgstr ""
1557
+
1558
+ #: blocks/container.php:244
1559
+ msgid "Float can help to align the button and other content on the same line"
1560
+ msgstr ""
maxbuttons.php CHANGED
@@ -3,22 +3,22 @@
3
  Plugin Name: MaxButtons
4
  Plugin URI: http://maxbuttons.com
5
  Description: The best WordPress button generator. This is the free version; the Pro version <a href="http://maxbuttons.com/?ref=mbfree">can be found here</a>.
6
- Version: 7.13.4
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
9
  Text Domain: maxbuttons
10
  Domain Path: /languages
11
 
12
- Copyright 2019 Max Foundry, LLC (http://maxfoundry.com)
13
  */
14
  namespace MaxButtons;
15
 
16
  if (! defined('MAXBUTTONS_ROOT_FILE'))
17
  define("MAXBUTTONS_ROOT_FILE", __FILE__);
18
  if (! defined('MAXBUTTONS_VERSION_NUM'))
19
- define('MAXBUTTONS_VERSION_NUM', '7.13.4');
20
 
21
- define('MAXBUTTONS_RELEASE',"8 February 2020");
22
 
23
  if (! function_exists('MaxButtons\maxbutton_double_load'))
24
  {
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: 8.0
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
9
  Text Domain: maxbuttons
10
  Domain Path: /languages
11
 
12
+ Copyright 2020 Max Foundry, LLC (http://maxfoundry.com)
13
  */
14
  namespace MaxButtons;
15
 
16
  if (! defined('MAXBUTTONS_ROOT_FILE'))
17
  define("MAXBUTTONS_ROOT_FILE", __FILE__);
18
  if (! defined('MAXBUTTONS_VERSION_NUM'))
19
+ define('MAXBUTTONS_VERSION_NUM', '8.0');
20
 
21
+ define('MAXBUTTONS_RELEASE',"7 July 2020");
22
 
23
  if (! function_exists('MaxButtons\maxbutton_double_load'))
24
  {
pie/PIE.htc DELETED
@@ -1,96 +0,0 @@
1
- <!--
2
- PIE: CSS3 rendering for IE
3
- Version 1.0.0
4
- http://css3pie.com
5
- Dual-licensed for use under the Apache License Version 2.0 or the General Public License (GPL) Version 2.
6
- -->
7
- <PUBLIC:COMPONENT lightWeight="true">
8
- <!-- saved from url=(0014)about:internet -->
9
- <PUBLIC:ATTACH EVENT="oncontentready" FOR="element" ONEVENT="init()" />
10
- <PUBLIC:ATTACH EVENT="ondocumentready" FOR="element" ONEVENT="init()" />
11
- <PUBLIC:ATTACH EVENT="ondetach" FOR="element" ONEVENT="cleanup()" />
12
-
13
- <script type="text/javascript">
14
- var doc = element.document;var f=window.PIE;
15
- if(!f){f=window.PIE={F:"-pie-",nb:"Pie",La:"pie_",Ac:{TD:1,TH:1},cc:{TABLE:1,THEAD:1,TBODY:1,TFOOT:1,TR:1,INPUT:1,TEXTAREA:1,SELECT:1,OPTION:1,IMG:1,HR:1},fc:{A:1,INPUT:1,TEXTAREA:1,SELECT:1,BUTTON:1},Gd:{submit:1,button:1,reset:1},aa:function(){}};try{doc.execCommand("BackgroundImageCache",false,true)}catch(aa){}for(var ba=4,Z=doc.createElement("div"),ca=Z.getElementsByTagName("i"),ga;Z.innerHTML="<!--[if gt IE "+ ++ba+"]><i></i><![endif]--\>",ca[0];);f.O=ba;if(ba===6)f.F=f.F.replace(/^-/,"");f.ja=
16
- doc.documentMode||f.O;Z.innerHTML='<v:shape adj="1"/>';ga=Z.firstChild;ga.style.behavior="url(#default#VML)";f.zc=typeof ga.adj==="object";(function(){var a,b=0,c={};f.p={Za:function(d){if(!a){a=doc.createDocumentFragment();a.namespaces.add("css3vml","urn:schemas-microsoft-com:vml")}return a.createElement("css3vml:"+d)},Ba:function(d){return d&&d._pieId||(d._pieId="_"+ ++b)},Eb:function(d){var e,g,j,i,h=arguments;e=1;for(g=h.length;e<g;e++){i=h[e];for(j in i)if(i.hasOwnProperty(j))d[j]=i[j]}return d},
17
- Rb:function(d,e,g){var j=c[d],i,h;if(j)Object.prototype.toString.call(j)==="[object Array]"?j.push([e,g]):e.call(g,j);else{h=c[d]=[[e,g]];i=new Image;i.onload=function(){j=c[d]={h:i.width,f:i.height};for(var k=0,n=h.length;k<n;k++)h[k][0].call(h[k][1],j);i.onload=null};i.src=d}}}})();f.Na={gc:function(a,b,c,d){function e(){k=j>=90&&j<270?b:0;n=j<180?c:0;m=b-k;p=c-n}function g(){for(;j<0;)j+=360;j%=360}var j=d.sa;d=d.zb;var i,h,k,n,m,p,r,t;if(d){d=d.coords(a,b,c);i=d.x;h=d.y}if(j){j=j.jd();g();e();
18
- if(!d){i=k;h=n}d=f.Na.tc(i,h,j,m,p);a=d[0];d=d[1]}else if(d){a=b-i;d=c-h}else{i=h=a=0;d=c}r=a-i;t=d-h;if(j===void 0){j=!r?t<0?90:270:!t?r<0?180:0:-Math.atan2(t,r)/Math.PI*180;g();e()}return{sa:j,xc:i,yc:h,td:a,ud:d,Wd:k,Xd:n,rd:m,sd:p,kd:r,ld:t,rc:f.Na.dc(i,h,a,d)}},tc:function(a,b,c,d,e){if(c===0||c===180)return[d,b];else if(c===90||c===270)return[a,e];else{c=Math.tan(-c*Math.PI/180);a=c*a-b;b=-1/c;d=b*d-e;e=b-c;return[(d-a)/e,(c*d-b*a)/e]}},dc:function(a,b,c,d){a=c-a;b=d-b;return Math.abs(a===0?
19
- b:b===0?a:Math.sqrt(a*a+b*b))}};f.ea=function(){this.Gb=[];this.oc={}};f.ea.prototype={ba:function(a){var b=f.p.Ba(a),c=this.oc,d=this.Gb;if(!(b in c)){c[b]=d.length;d.push(a)}},Ha:function(a){a=f.p.Ba(a);var b=this.oc;if(a&&a in b){delete this.Gb[b[a]];delete b[a]}},xa:function(){for(var a=this.Gb,b=a.length;b--;)a[b]&&a[b]()}};f.Oa=new f.ea;f.Oa.Rd=function(){var a=this,b;if(!a.Sd){b=doc.documentElement.currentStyle.getAttribute(f.F+"poll-interval")||250;(function c(){a.xa();setTimeout(c,b)})();
20
- a.Sd=1}};(function(){function a(){f.L.xa();window.detachEvent("onunload",a);window.PIE=null}f.L=new f.ea;window.attachEvent("onunload",a);f.L.ta=function(b,c,d){b.attachEvent(c,d);this.ba(function(){b.detachEvent(c,d)})}})();f.Qa=new f.ea;f.L.ta(window,"onresize",function(){f.Qa.xa()});(function(){function a(){f.mb.xa()}f.mb=new f.ea;f.L.ta(window,"onscroll",a);f.Qa.ba(a)})();(function(){function a(){c=f.kb.md()}function b(){if(c){for(var d=0,e=c.length;d<e;d++)f.attach(c[d]);c=0}}var c;if(f.ja<9){f.L.ta(window,
21
- "onbeforeprint",a);f.L.ta(window,"onafterprint",b)}})();f.lb=new f.ea;f.L.ta(doc,"onmouseup",function(){f.lb.xa()});f.he=function(){function a(h){this.Y=h}var b=doc.createElement("length-calc"),c=doc.body||doc.documentElement,d=b.style,e={},g=["mm","cm","in","pt","pc"],j=g.length,i={};d.position="absolute";d.top=d.left="-9999px";for(c.appendChild(b);j--;){d.width="100"+g[j];e[g[j]]=b.offsetWidth/100}c.removeChild(b);d.width="1em";a.prototype={Kb:/(px|em|ex|mm|cm|in|pt|pc|%)$/,ic:function(){var h=
22
- this.Jd;if(h===void 0)h=this.Jd=parseFloat(this.Y);return h},yb:function(){var h=this.ae;if(!h)h=this.ae=(h=this.Y.match(this.Kb))&&h[0]||"px";return h},a:function(h,k){var n=this.ic(),m=this.yb();switch(m){case "px":return n;case "%":return n*(typeof k==="function"?k():k)/100;case "em":return n*this.xb(h);case "ex":return n*this.xb(h)/2;default:return n*e[m]}},xb:function(h){var k=h.currentStyle.fontSize,n,m;if(k.indexOf("px")>0)return parseFloat(k);else if(h.tagName in f.cc){m=this;n=h.parentNode;
23
- return f.n(k).a(n,function(){return m.xb(n)})}else{h.appendChild(b);k=b.offsetWidth;b.parentNode===h&&h.removeChild(b);return k}}};f.n=function(h){return i[h]||(i[h]=new a(h))};return a}();f.Ja=function(){function a(e){this.X=e}var b=f.n("50%"),c={top:1,center:1,bottom:1},d={left:1,center:1,right:1};a.prototype={zd:function(){if(!this.ac){var e=this.X,g=e.length,j=f.v,i=j.qa,h=f.n("0");i=i.na;h=["left",h,"top",h];if(g===1){e.push(new j.ob(i,"center"));g++}if(g===2){i&(e[0].k|e[1].k)&&e[0].d in c&&
24
- e[1].d in d&&e.push(e.shift());if(e[0].k&i)if(e[0].d==="center")h[1]=b;else h[0]=e[0].d;else if(e[0].W())h[1]=f.n(e[0].d);if(e[1].k&i)if(e[1].d==="center")h[3]=b;else h[2]=e[1].d;else if(e[1].W())h[3]=f.n(e[1].d)}this.ac=h}return this.ac},coords:function(e,g,j){var i=this.zd(),h=i[1].a(e,g);e=i[3].a(e,j);return{x:i[0]==="right"?g-h:h,y:i[2]==="bottom"?j-e:e}}};return a}();f.Ka=function(){function a(b,c){this.h=b;this.f=c}a.prototype={a:function(b,c,d,e,g){var j=this.h,i=this.f,h=c/d;e=e/g;if(j===
25
- "contain"){j=e>h?c:d*e;i=e>h?c/e:d}else if(j==="cover"){j=e<h?c:d*e;i=e<h?c/e:d}else if(j==="auto"){i=i==="auto"?g:i.a(b,d);j=i*e}else{j=j.a(b,c);i=i==="auto"?j/e:i.a(b,d)}return{h:j,f:i}}};a.Kc=new a("auto","auto");return a}();f.Ec=function(){function a(b){this.Y=b}a.prototype={Kb:/[a-z]+$/i,yb:function(){return this.ad||(this.ad=this.Y.match(this.Kb)[0].toLowerCase())},jd:function(){var b=this.Vc,c;if(b===undefined){b=this.yb();c=parseFloat(this.Y,10);b=this.Vc=b==="deg"?c:b==="rad"?c/Math.PI*180:
26
- b==="grad"?c/400*360:b==="turn"?c*360:0}return b}};return a}();f.Jc=function(){function a(c){this.Y=c}var b={};a.Qd=/\s*rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d+|\d*\.\d+)\s*\)\s*/;a.Fb={aliceblue:"F0F8FF",antiquewhite:"FAEBD7",aqua:"0FF",aquamarine:"7FFFD4",azure:"F0FFFF",beige:"F5F5DC",bisque:"FFE4C4",black:"000",blanchedalmond:"FFEBCD",blue:"00F",blueviolet:"8A2BE2",brown:"A52A2A",burlywood:"DEB887",cadetblue:"5F9EA0",chartreuse:"7FFF00",chocolate:"D2691E",coral:"FF7F50",cornflowerblue:"6495ED",
27
- cornsilk:"FFF8DC",crimson:"DC143C",cyan:"0FF",darkblue:"00008B",darkcyan:"008B8B",darkgoldenrod:"B8860B",darkgray:"A9A9A9",darkgreen:"006400",darkkhaki:"BDB76B",darkmagenta:"8B008B",darkolivegreen:"556B2F",darkorange:"FF8C00",darkorchid:"9932CC",darkred:"8B0000",darksalmon:"E9967A",darkseagreen:"8FBC8F",darkslateblue:"483D8B",darkslategray:"2F4F4F",darkturquoise:"00CED1",darkviolet:"9400D3",deeppink:"FF1493",deepskyblue:"00BFFF",dimgray:"696969",dodgerblue:"1E90FF",firebrick:"B22222",floralwhite:"FFFAF0",
28
- forestgreen:"228B22",fuchsia:"F0F",gainsboro:"DCDCDC",ghostwhite:"F8F8FF",gold:"FFD700",goldenrod:"DAA520",gray:"808080",green:"008000",greenyellow:"ADFF2F",honeydew:"F0FFF0",hotpink:"FF69B4",indianred:"CD5C5C",indigo:"4B0082",ivory:"FFFFF0",khaki:"F0E68C",lavender:"E6E6FA",lavenderblush:"FFF0F5",lawngreen:"7CFC00",lemonchiffon:"FFFACD",lightblue:"ADD8E6",lightcoral:"F08080",lightcyan:"E0FFFF",lightgoldenrodyellow:"FAFAD2",lightgreen:"90EE90",lightgrey:"D3D3D3",lightpink:"FFB6C1",lightsalmon:"FFA07A",
29
- lightseagreen:"20B2AA",lightskyblue:"87CEFA",lightslategray:"789",lightsteelblue:"B0C4DE",lightyellow:"FFFFE0",lime:"0F0",limegreen:"32CD32",linen:"FAF0E6",magenta:"F0F",maroon:"800000",mediumauqamarine:"66CDAA",mediumblue:"0000CD",mediumorchid:"BA55D3",mediumpurple:"9370D8",mediumseagreen:"3CB371",mediumslateblue:"7B68EE",mediumspringgreen:"00FA9A",mediumturquoise:"48D1CC",mediumvioletred:"C71585",midnightblue:"191970",mintcream:"F5FFFA",mistyrose:"FFE4E1",moccasin:"FFE4B5",navajowhite:"FFDEAD",
30
- navy:"000080",oldlace:"FDF5E6",olive:"808000",olivedrab:"688E23",orange:"FFA500",orangered:"FF4500",orchid:"DA70D6",palegoldenrod:"EEE8AA",palegreen:"98FB98",paleturquoise:"AFEEEE",palevioletred:"D87093",papayawhip:"FFEFD5",peachpuff:"FFDAB9",peru:"CD853F",pink:"FFC0CB",plum:"DDA0DD",powderblue:"B0E0E6",purple:"800080",red:"F00",rosybrown:"BC8F8F",royalblue:"4169E1",saddlebrown:"8B4513",salmon:"FA8072",sandybrown:"F4A460",seagreen:"2E8B57",seashell:"FFF5EE",sienna:"A0522D",silver:"C0C0C0",skyblue:"87CEEB",
31
- slateblue:"6A5ACD",slategray:"708090",snow:"FFFAFA",springgreen:"00FF7F",steelblue:"4682B4",tan:"D2B48C",teal:"008080",thistle:"D8BFD8",tomato:"FF6347",turquoise:"40E0D0",violet:"EE82EE",wheat:"F5DEB3",white:"FFF",whitesmoke:"F5F5F5",yellow:"FF0",yellowgreen:"9ACD32"};a.prototype={parse:function(){if(!this.Ua){var c=this.Y,d;if(d=c.match(a.Qd)){this.Ua="rgb("+d[1]+","+d[2]+","+d[3]+")";this.Yb=parseFloat(d[4])}else{if((d=c.toLowerCase())in a.Fb)c="#"+a.Fb[d];this.Ua=c;this.Yb=c==="transparent"?0:
32
- 1}}},U:function(c){this.parse();return this.Ua==="currentColor"?c.currentStyle.color:this.Ua},fa:function(){this.parse();return this.Yb}};f.ha=function(c){return b[c]||(b[c]=new a(c))};return a}();f.v=function(){function a(c){this.$a=c;this.ch=0;this.X=[];this.Ga=0}var b=a.qa={Ia:1,Wb:2,z:4,Lc:8,Xb:16,na:32,K:64,oa:128,pa:256,Ra:512,Tc:1024,URL:2048};a.ob=function(c,d){this.k=c;this.d=d};a.ob.prototype={Ca:function(){return this.k&b.K||this.k&b.oa&&this.d==="0"},W:function(){return this.Ca()||this.k&
33
- b.Ra}};a.prototype={de:/\s/,Kd:/^[\+\-]?(\d*\.)?\d+/,url:/^url\(\s*("([^"]*)"|'([^']*)'|([!#$%&*-~]*))\s*\)/i,nc:/^\-?[_a-z][\w-]*/i,Yd:/^("([^"]*)"|'([^']*)')/,Bd:/^#([\da-f]{6}|[\da-f]{3})/i,be:{px:b.K,em:b.K,ex:b.K,mm:b.K,cm:b.K,"in":b.K,pt:b.K,pc:b.K,deg:b.Ia,rad:b.Ia,grad:b.Ia},fd:{rgb:1,rgba:1,hsl:1,hsla:1},next:function(c){function d(p,r){p=new a.ob(p,r);if(!c){k.X.push(p);k.Ga++}return p}function e(){k.Ga++;return null}var g,j,i,h,k=this;if(this.Ga<this.X.length)return this.X[this.Ga++];for(;this.de.test(this.$a.charAt(this.ch));)this.ch++;
34
- if(this.ch>=this.$a.length)return e();j=this.ch;g=this.$a.substring(this.ch);i=g.charAt(0);switch(i){case "#":if(h=g.match(this.Bd)){this.ch+=h[0].length;return d(b.z,h[0])}break;case '"':case "'":if(h=g.match(this.Yd)){this.ch+=h[0].length;return d(b.Tc,h[2]||h[3]||"")}break;case "/":case ",":this.ch++;return d(b.pa,i);case "u":if(h=g.match(this.url)){this.ch+=h[0].length;return d(b.URL,h[2]||h[3]||h[4]||"")}}if(h=g.match(this.Kd)){i=h[0];this.ch+=i.length;if(g.charAt(i.length)==="%"){this.ch++;
35
- return d(b.Ra,i+"%")}if(h=g.substring(i.length).match(this.nc)){i+=h[0];this.ch+=h[0].length;return d(this.be[h[0].toLowerCase()]||b.Lc,i)}return d(b.oa,i)}if(h=g.match(this.nc)){i=h[0];this.ch+=i.length;if(i.toLowerCase()in f.Jc.Fb||i==="currentColor"||i==="transparent")return d(b.z,i);if(g.charAt(i.length)==="("){this.ch++;if(i.toLowerCase()in this.fd){g=function(p){return p&&p.k&b.oa};h=function(p){return p&&p.k&(b.oa|b.Ra)};var n=function(p,r){return p&&p.d===r},m=function(){return k.next(1)};
36
- if((i.charAt(0)==="r"?h(m()):g(m()))&&n(m(),",")&&h(m())&&n(m(),",")&&h(m())&&(i==="rgb"||i==="hsa"||n(m(),",")&&g(m()))&&n(m(),")"))return d(b.z,this.$a.substring(j,this.ch));return e()}return d(b.Xb,i)}return d(b.na,i)}this.ch++;return d(b.Wb,i)},D:function(){return this.X[this.Ga-- -2]},all:function(){for(;this.next(););return this.X},ma:function(c,d){for(var e=[],g,j;g=this.next();){if(c(g)){j=true;this.D();break}e.push(g)}return d&&!j?null:e}};return a}();var ha=function(a){this.e=a};ha.prototype=
37
- {Z:0,Od:function(){var a=this.qb,b;return!a||(b=this.o())&&(a.x!==b.x||a.y!==b.y)},Td:function(){var a=this.qb,b;return!a||(b=this.o())&&(a.h!==b.h||a.f!==b.f)},hc:function(){var a=this.e,b=a.getBoundingClientRect(),c=f.ja===9,d=f.O===7,e=b.right-b.left;return{x:b.left,y:b.top,h:c||d?a.offsetWidth:e,f:c||d?a.offsetHeight:b.bottom-b.top,Hd:d&&e?a.offsetWidth/e:1}},o:function(){return this.Z?this.Va||(this.Va=this.hc()):this.hc()},Ad:function(){return!!this.qb},cb:function(){++this.Z},hb:function(){if(!--this.Z){if(this.Va)this.qb=
38
- this.Va;this.Va=null}}};(function(){function a(b){var c=f.p.Ba(b);return function(){if(this.Z){var d=this.$b||(this.$b={});return c in d?d[c]:(d[c]=b.call(this))}else return b.call(this)}}f.B={Z:0,ka:function(b){function c(d){this.e=d;this.Zb=this.ia()}f.p.Eb(c.prototype,f.B,b);c.$c={};return c},j:function(){var b=this.ia(),c=this.constructor.$c;return b?b in c?c[b]:(c[b]=this.la(b)):null},ia:a(function(){var b=this.e,c=this.constructor,d=b.style;b=b.currentStyle;var e=this.wa,g=this.Fa,j=c.Yc||(c.Yc=
39
- f.F+e);c=c.Zc||(c.Zc=f.nb+g.charAt(0).toUpperCase()+g.substring(1));return d[c]||b.getAttribute(j)||d[g]||b.getAttribute(e)}),i:a(function(){return!!this.j()}),H:a(function(){var b=this.ia(),c=b!==this.Zb;this.Zb=b;return c}),va:a,cb:function(){++this.Z},hb:function(){--this.Z||delete this.$b}}})();f.Sb=f.B.ka({wa:f.F+"background",Fa:f.nb+"Background",cd:{scroll:1,fixed:1,local:1},fb:{"repeat-x":1,"repeat-y":1,repeat:1,"no-repeat":1},sc:{"padding-box":1,"border-box":1,"content-box":1},Pd:{top:1,right:1,
40
- bottom:1,left:1,center:1},Ud:{contain:1,cover:1},eb:{Ma:"backgroundClip",z:"backgroundColor",da:"backgroundImage",Pa:"backgroundOrigin",S:"backgroundPosition",T:"backgroundRepeat",Sa:"backgroundSize"},la:function(a){function b(s){return s&&s.W()||s.k&k&&s.d in t}function c(s){return s&&(s.W()&&f.n(s.d)||s.d==="auto"&&"auto")}var d=this.e.currentStyle,e,g,j,i=f.v.qa,h=i.pa,k=i.na,n=i.z,m,p,r=0,t=this.Pd,v,l,q={M:[]};if(this.wb()){e=new f.v(a);for(j={};g=e.next();){m=g.k;p=g.d;if(!j.P&&m&i.Xb&&p===
41
- "linear-gradient"){v={ca:[],P:p};for(l={};g=e.next();){m=g.k;p=g.d;if(m&i.Wb&&p===")"){l.color&&v.ca.push(l);v.ca.length>1&&f.p.Eb(j,v);break}if(m&n){if(v.sa||v.zb){g=e.D();if(g.k!==h)break;e.next()}l={color:f.ha(p)};g=e.next();if(g.W())l.db=f.n(g.d);else e.D()}else if(m&i.Ia&&!v.sa&&!l.color&&!v.ca.length)v.sa=new f.Ec(g.d);else if(b(g)&&!v.zb&&!l.color&&!v.ca.length){e.D();v.zb=new f.Ja(e.ma(function(s){return!b(s)},false))}else if(m&h&&p===","){if(l.color){v.ca.push(l);l={}}}else break}}else if(!j.P&&
42
- m&i.URL){j.Ab=p;j.P="image"}else if(b(g)&&!j.$){e.D();j.$=new f.Ja(e.ma(function(s){return!b(s)},false))}else if(m&k)if(p in this.fb&&!j.bb)j.bb=p;else if(p in this.sc&&!j.Wa){j.Wa=p;if((g=e.next())&&g.k&k&&g.d in this.sc)j.ub=g.d;else{j.ub=p;e.D()}}else if(p in this.cd&&!j.bc)j.bc=p;else return null;else if(m&n&&!q.color)q.color=f.ha(p);else if(m&h&&p==="/"&&!j.Xa&&j.$){g=e.next();if(g.k&k&&g.d in this.Ud)j.Xa=new f.Ka(g.d);else if(g=c(g)){m=c(e.next());if(!m){m=g;e.D()}j.Xa=new f.Ka(g,m)}else return null}else if(m&
43
- h&&p===","&&j.P){j.Hb=a.substring(r,e.ch-1);r=e.ch;q.M.push(j);j={}}else return null}if(j.P){j.Hb=a.substring(r);q.M.push(j)}}else this.Bc(f.ja<9?function(){var s=this.eb,o=d[s.S+"X"],u=d[s.S+"Y"],x=d[s.da],y=d[s.z];if(y!=="transparent")q.color=f.ha(y);if(x!=="none")q.M=[{P:"image",Ab:(new f.v(x)).next().d,bb:d[s.T],$:new f.Ja((new f.v(o+" "+u)).all())}]}:function(){var s=this.eb,o=/\s*,\s*/,u=d[s.da].split(o),x=d[s.z],y,z,B,E,D,C;if(x!=="transparent")q.color=f.ha(x);if((E=u.length)&&u[0]!=="none"){x=
44
- d[s.T].split(o);y=d[s.S].split(o);z=d[s.Pa].split(o);B=d[s.Ma].split(o);s=d[s.Sa].split(o);q.M=[];for(o=0;o<E;o++)if((D=u[o])&&D!=="none"){C=s[o].split(" ");q.M.push({Hb:D+" "+x[o]+" "+y[o]+" / "+s[o]+" "+z[o]+" "+B[o],P:"image",Ab:(new f.v(D)).next().d,bb:x[o],$:new f.Ja((new f.v(y[o])).all()),Wa:z[o],ub:B[o],Xa:new f.Ka(C[0],C[1])})}}});return q.color||q.M[0]?q:null},Bc:function(a){var b=f.ja>8,c=this.eb,d=this.e.runtimeStyle,e=d[c.da],g=d[c.z],j=d[c.T],i,h,k,n;if(e)d[c.da]="";if(g)d[c.z]="";if(j)d[c.T]=
45
- "";if(b){i=d[c.Ma];h=d[c.Pa];n=d[c.S];k=d[c.Sa];if(i)d[c.Ma]="";if(h)d[c.Pa]="";if(n)d[c.S]="";if(k)d[c.Sa]=""}a=a.call(this);if(e)d[c.da]=e;if(g)d[c.z]=g;if(j)d[c.T]=j;if(b){if(i)d[c.Ma]=i;if(h)d[c.Pa]=h;if(n)d[c.S]=n;if(k)d[c.Sa]=k}return a},ia:f.B.va(function(){return this.wb()||this.Bc(function(){var a=this.e.currentStyle,b=this.eb;return a[b.z]+" "+a[b.da]+" "+a[b.T]+" "+a[b.S+"X"]+" "+a[b.S+"Y"]})}),wb:f.B.va(function(){var a=this.e;return a.style[this.Fa]||a.currentStyle.getAttribute(this.wa)}),
46
- qc:function(){var a=0;if(f.O<7){a=this.e;a=""+(a.style[f.nb+"PngFix"]||a.currentStyle.getAttribute(f.F+"png-fix"))==="true"}return a},i:f.B.va(function(){return(this.wb()||this.qc())&&!!this.j()})});f.Vb=f.B.ka({wc:["Top","Right","Bottom","Left"],Id:{thin:"1px",medium:"3px",thick:"5px"},la:function(){var a={},b={},c={},d=false,e=true,g=true,j=true;this.Cc(function(){for(var i=this.e.currentStyle,h=0,k,n,m,p,r,t,v;h<4;h++){m=this.wc[h];v=m.charAt(0).toLowerCase();k=b[v]=i["border"+m+"Style"];n=i["border"+
47
- m+"Color"];m=i["border"+m+"Width"];if(h>0){if(k!==p)g=false;if(n!==r)e=false;if(m!==t)j=false}p=k;r=n;t=m;c[v]=f.ha(n);m=a[v]=f.n(b[v]==="none"?"0":this.Id[m]||m);if(m.a(this.e)>0)d=true}});return d?{J:a,Zd:b,gd:c,ee:j,hd:e,$d:g}:null},ia:f.B.va(function(){var a=this.e,b=a.currentStyle,c;a.tagName in f.Ac&&a.offsetParent.currentStyle.borderCollapse==="collapse"||this.Cc(function(){c=b.borderWidth+"|"+b.borderStyle+"|"+b.borderColor});return c}),Cc:function(a){var b=this.e.runtimeStyle,c=b.borderWidth,
48
- d=b.borderColor;if(c)b.borderWidth="";if(d)b.borderColor="";a=a.call(this);if(c)b.borderWidth=c;if(d)b.borderColor=d;return a}});(function(){f.jb=f.B.ka({wa:"border-radius",Fa:"borderRadius",la:function(b){var c=null,d,e,g,j,i=false;if(b){e=new f.v(b);var h=function(){for(var k=[],n;(g=e.next())&&g.W();){j=f.n(g.d);n=j.ic();if(n<0)return null;if(n>0)i=true;k.push(j)}return k.length>0&&k.length<5?{tl:k[0],tr:k[1]||k[0],br:k[2]||k[0],bl:k[3]||k[1]||k[0]}:null};if(b=h()){if(g){if(g.k&f.v.qa.pa&&g.d===
49
- "/")d=h()}else d=b;if(i&&b&&d)c={x:b,y:d}}}return c}});var a=f.n("0");a={tl:a,tr:a,br:a,bl:a};f.jb.Dc={x:a,y:a}})();f.Ub=f.B.ka({wa:"border-image",Fa:"borderImage",fb:{stretch:1,round:1,repeat:1,space:1},la:function(a){var b=null,c,d,e,g,j,i,h=0,k=f.v.qa,n=k.na,m=k.oa,p=k.Ra;if(a){c=new f.v(a);b={};for(var r=function(l){return l&&l.k&k.pa&&l.d==="/"},t=function(l){return l&&l.k&n&&l.d==="fill"},v=function(){g=c.ma(function(l){return!(l.k&(m|p))});if(t(c.next())&&!b.fill)b.fill=true;else c.D();if(r(c.next())){h++;
50
- j=c.ma(function(l){return!l.W()&&!(l.k&n&&l.d==="auto")});if(r(c.next())){h++;i=c.ma(function(l){return!l.Ca()})}}else c.D()};a=c.next();){d=a.k;e=a.d;if(d&(m|p)&&!g){c.D();v()}else if(t(a)&&!b.fill){b.fill=true;v()}else if(d&n&&this.fb[e]&&!b.repeat){b.repeat={f:e};if(a=c.next())if(a.k&n&&this.fb[a.d])b.repeat.Ob=a.d;else c.D()}else if(d&k.URL&&!b.src)b.src=e;else return null}if(!b.src||!g||g.length<1||g.length>4||j&&j.length>4||h===1&&j.length<1||i&&i.length>4||h===2&&i.length<1)return null;if(!b.repeat)b.repeat=
51
- {f:"stretch"};if(!b.repeat.Ob)b.repeat.Ob=b.repeat.f;a=function(l,q){return{t:q(l[0]),r:q(l[1]||l[0]),b:q(l[2]||l[0]),l:q(l[3]||l[1]||l[0])}};b.slice=a(g,function(l){return f.n(l.k&m?l.d+"px":l.d)});if(j&&j[0])b.J=a(j,function(l){return l.W()?f.n(l.d):l.d});if(i&&i[0])b.Da=a(i,function(l){return l.Ca()?f.n(l.d):l.d})}return b}});f.Ic=f.B.ka({wa:"box-shadow",Fa:"boxShadow",la:function(a){var b,c=f.n,d=f.v.qa,e;if(a){e=new f.v(a);b={Da:[],Bb:[]};for(a=function(){for(var g,j,i,h,k,n;g=e.next();){i=g.d;
52
- j=g.k;if(j&d.pa&&i===",")break;else if(g.Ca()&&!k){e.D();k=e.ma(function(m){return!m.Ca()})}else if(j&d.z&&!h)h=i;else if(j&d.na&&i==="inset"&&!n)n=true;else return false}g=k&&k.length;if(g>1&&g<5){(n?b.Bb:b.Da).push({fe:c(k[0].d),ge:c(k[1].d),blur:c(k[2]?k[2].d:"0"),Vd:c(k[3]?k[3].d:"0"),color:f.ha(h||"currentColor")});return true}return false};a(););}return b&&(b.Bb.length||b.Da.length)?b:null}});f.Uc=f.B.ka({ia:f.B.va(function(){var a=this.e.currentStyle;return a.visibility+"|"+a.display}),la:function(){var a=
53
- this.e,b=a.runtimeStyle;a=a.currentStyle;var c=b.visibility,d;b.visibility="";d=a.visibility;b.visibility=c;return{ce:d!=="hidden",nd:a.display!=="none"}},i:function(){return false}});f.u={R:function(a){function b(c,d,e,g){this.e=c;this.s=d;this.g=e;this.parent=g}f.p.Eb(b.prototype,f.u,a);return b},Cb:false,Q:function(){return false},Ea:f.aa,Lb:function(){this.m();this.i()&&this.V()},ib:function(){this.Cb=true},Mb:function(){this.i()?this.V():this.m()},sb:function(a,b){this.vc(a);for(var c=this.ra||
54
- (this.ra=[]),d=a+1,e=c.length,g;d<e;d++)if(g=c[d])break;c[a]=b;this.I().insertBefore(b,g||null)},za:function(a){var b=this.ra;return b&&b[a]||null},vc:function(a){var b=this.za(a),c=this.Ta;if(b&&c){c.removeChild(b);this.ra[a]=null}},Aa:function(a,b,c,d){var e=this.rb||(this.rb={}),g=e[a];if(!g){g=e[a]=f.p.Za("shape");if(b)g.appendChild(g[b]=f.p.Za(b));if(d){c=this.za(d);if(!c){this.sb(d,doc.createElement("group"+d));c=this.za(d)}}c.appendChild(g);a=g.style;a.position="absolute";a.left=a.top=0;a.behavior=
55
- "url(#default#VML)"}return g},vb:function(a){var b=this.rb,c=b&&b[a];if(c){c.parentNode.removeChild(c);delete b[a]}return!!c},kc:function(a){var b=this.e,c=this.s.o(),d=c.h,e=c.f,g,j,i,h,k,n;c=a.x.tl.a(b,d);g=a.y.tl.a(b,e);j=a.x.tr.a(b,d);i=a.y.tr.a(b,e);h=a.x.br.a(b,d);k=a.y.br.a(b,e);n=a.x.bl.a(b,d);a=a.y.bl.a(b,e);d=Math.min(d/(c+j),e/(i+k),d/(n+h),e/(g+a));if(d<1){c*=d;g*=d;j*=d;i*=d;h*=d;k*=d;n*=d;a*=d}return{x:{tl:c,tr:j,br:h,bl:n},y:{tl:g,tr:i,br:k,bl:a}}},ya:function(a,b,c){b=b||1;var d,e,
56
- g=this.s.o();e=g.h*b;g=g.f*b;var j=this.g.G,i=Math.floor,h=Math.ceil,k=a?a.Jb*b:0,n=a?a.Ib*b:0,m=a?a.tb*b:0;a=a?a.Db*b:0;var p,r,t,v,l;if(c||j.i()){d=this.kc(c||j.j());c=d.x.tl*b;j=d.y.tl*b;p=d.x.tr*b;r=d.y.tr*b;t=d.x.br*b;v=d.y.br*b;l=d.x.bl*b;b=d.y.bl*b;e="m"+i(a)+","+i(j)+"qy"+i(c)+","+i(k)+"l"+h(e-p)+","+i(k)+"qx"+h(e-n)+","+i(r)+"l"+h(e-n)+","+h(g-v)+"qy"+h(e-t)+","+h(g-m)+"l"+i(l)+","+h(g-m)+"qx"+i(a)+","+h(g-b)+" x e"}else e="m"+i(a)+","+i(k)+"l"+h(e-n)+","+i(k)+"l"+h(e-n)+","+h(g-m)+"l"+i(a)+
57
- ","+h(g-m)+"xe";return e},I:function(){var a=this.parent.za(this.N),b;if(!a){a=doc.createElement(this.Ya);b=a.style;b.position="absolute";b.top=b.left=0;this.parent.sb(this.N,a)}return a},mc:function(){var a=this.e,b=a.currentStyle,c=a.runtimeStyle,d=a.tagName,e=f.O===6,g;if(e&&(d in f.cc||d==="FIELDSET")||d==="BUTTON"||d==="INPUT"&&a.type in f.Gd){c.borderWidth="";d=this.g.w.wc;for(g=d.length;g--;){e=d[g];c["padding"+e]="";c["padding"+e]=f.n(b["padding"+e]).a(a)+f.n(b["border"+e+"Width"]).a(a)+(f.O!==
58
- 8&&g%2?1:0)}c.borderWidth=0}else if(e){if(a.childNodes.length!==1||a.firstChild.tagName!=="ie6-mask"){b=doc.createElement("ie6-mask");d=b.style;d.visibility="visible";for(d.zoom=1;d=a.firstChild;)b.appendChild(d);a.appendChild(b);c.visibility="hidden"}}else c.borderColor="transparent"},ie:function(){},m:function(){this.parent.vc(this.N);delete this.rb;delete this.ra}};f.Rc=f.u.R({i:function(){var a=this.ed;for(var b in a)if(a.hasOwnProperty(b)&&a[b].i())return true;return false},Q:function(){return this.g.Pb.H()},
59
- ib:function(){if(this.i()){var a=this.jc(),b=a,c;a=a.currentStyle;var d=a.position,e=this.I().style,g=0,j=0;j=this.s.o();var i=j.Hd;if(d==="fixed"&&f.O>6){g=j.x*i;j=j.y*i;b=d}else{do b=b.offsetParent;while(b&&b.currentStyle.position==="static");if(b){c=b.getBoundingClientRect();b=b.currentStyle;g=(j.x-c.left)*i-(parseFloat(b.borderLeftWidth)||0);j=(j.y-c.top)*i-(parseFloat(b.borderTopWidth)||0)}else{b=doc.documentElement;g=(j.x+b.scrollLeft-b.clientLeft)*i;j=(j.y+b.scrollTop-b.clientTop)*i}b="absolute"}e.position=
60
- b;e.left=g;e.top=j;e.zIndex=d==="static"?-1:a.zIndex;this.Cb=true}},Mb:f.aa,Nb:function(){var a=this.g.Pb.j();this.I().style.display=a.ce&&a.nd?"":"none"},Lb:function(){this.i()?this.Nb():this.m()},jc:function(){var a=this.e;return a.tagName in f.Ac?a.offsetParent:a},I:function(){var a=this.Ta,b;if(!a){b=this.jc();a=this.Ta=doc.createElement("css3-container");a.style.direction="ltr";this.Nb();b.parentNode.insertBefore(a,b)}return a},ab:f.aa,m:function(){var a=this.Ta,b;if(a&&(b=a.parentNode))b.removeChild(a);
61
- delete this.Ta;delete this.ra}});f.Fc=f.u.R({N:2,Ya:"background",Q:function(){var a=this.g;return a.C.H()||a.G.H()},i:function(){var a=this.g;return a.q.i()||a.G.i()||a.C.i()||a.ga.i()&&a.ga.j().Bb},V:function(){var a=this.s.o();if(a.h&&a.f){this.od();this.pd()}},od:function(){var a=this.g.C.j(),b=this.s.o(),c=this.e,d=a&&a.color,e,g;if(d&&d.fa()>0){this.lc();a=this.Aa("bgColor","fill",this.I(),1);e=b.h;b=b.f;a.stroked=false;a.coordsize=e*2+","+b*2;a.coordorigin="1,1";a.path=this.ya(null,2);g=a.style;
62
- g.width=e;g.height=b;a.fill.color=d.U(c);c=d.fa();if(c<1)a.fill.opacity=c}else this.vb("bgColor")},pd:function(){var a=this.g.C.j(),b=this.s.o();a=a&&a.M;var c,d,e,g,j;if(a){this.lc();d=b.h;e=b.f;for(j=a.length;j--;){b=a[j];c=this.Aa("bgImage"+j,"fill",this.I(),2);c.stroked=false;c.fill.type="tile";c.fillcolor="none";c.coordsize=d*2+","+e*2;c.coordorigin="1,1";c.path=this.ya(0,2);g=c.style;g.width=d;g.height=e;if(b.P==="linear-gradient")this.bd(c,b);else{c.fill.src=b.Ab;this.Nd(c,j)}}}for(j=a?a.length:
63
- 0;this.vb("bgImage"+j++););},Nd:function(a,b){var c=this;f.p.Rb(a.fill.src,function(d){var e=c.e,g=c.s.o(),j=g.h;g=g.f;if(j&&g){var i=a.fill,h=c.g,k=h.w.j(),n=k&&k.J;k=n?n.t.a(e):0;var m=n?n.r.a(e):0,p=n?n.b.a(e):0;n=n?n.l.a(e):0;h=h.C.j().M[b];e=h.$?h.$.coords(e,j-d.h-n-m,g-d.f-k-p):{x:0,y:0};h=h.bb;p=m=0;var r=j+1,t=g+1,v=f.O===8?0:1;n=Math.round(e.x)+n+0.5;k=Math.round(e.y)+k+0.5;i.position=n/j+","+k/g;i.size.x=1;i.size=d.h+"px,"+d.f+"px";if(h&&h!=="repeat"){if(h==="repeat-x"||h==="no-repeat"){m=
64
- k+1;t=k+d.f+v}if(h==="repeat-y"||h==="no-repeat"){p=n+1;r=n+d.h+v}a.style.clip="rect("+m+"px,"+r+"px,"+t+"px,"+p+"px)"}}})},bd:function(a,b){var c=this.e,d=this.s.o(),e=d.h,g=d.f;a=a.fill;d=b.ca;var j=d.length,i=Math.PI,h=f.Na,k=h.tc,n=h.dc;b=h.gc(c,e,g,b);h=b.sa;var m=b.xc,p=b.yc,r=b.Wd,t=b.Xd,v=b.rd,l=b.sd,q=b.kd,s=b.ld;b=b.rc;e=h%90?Math.atan2(q*e/g,s)/i*180:h+90;e+=180;e%=360;v=k(r,t,h,v,l);g=n(r,t,v[0],v[1]);i=[];v=k(m,p,h,r,t);n=n(m,p,v[0],v[1])/g*100;k=[];for(h=0;h<j;h++)k.push(d[h].db?d[h].db.a(c,
65
- b):h===0?0:h===j-1?b:null);for(h=1;h<j;h++){if(k[h]===null){m=k[h-1];b=h;do p=k[++b];while(p===null);k[h]=m+(p-m)/(b-h+1)}k[h]=Math.max(k[h],k[h-1])}for(h=0;h<j;h++)i.push(n+k[h]/g*100+"% "+d[h].color.U(c));a.angle=e;a.type="gradient";a.method="sigma";a.color=d[0].color.U(c);a.color2=d[j-1].color.U(c);if(a.colors)a.colors.value=i.join(",");else a.colors=i.join(",")},lc:function(){var a=this.e.runtimeStyle;a.backgroundImage="url(about:blank)";a.backgroundColor="transparent"},m:function(){f.u.m.call(this);
66
- var a=this.e.runtimeStyle;a.backgroundImage=a.backgroundColor=""}});f.Gc=f.u.R({N:4,Ya:"border",Q:function(){var a=this.g;return a.w.H()||a.G.H()},i:function(){var a=this.g;return a.G.i()&&!a.q.i()&&a.w.i()},V:function(){var a=this.e,b=this.g.w.j(),c=this.s.o(),d=c.h;c=c.f;var e,g,j,i,h;if(b){this.mc();b=this.wd(2);i=0;for(h=b.length;i<h;i++){j=b[i];e=this.Aa("borderPiece"+i,j.stroke?"stroke":"fill",this.I());e.coordsize=d*2+","+c*2;e.coordorigin="1,1";e.path=j.path;g=e.style;g.width=d;g.height=c;
67
- e.filled=!!j.fill;e.stroked=!!j.stroke;if(j.stroke){e=e.stroke;e.weight=j.Qb+"px";e.color=j.color.U(a);e.dashstyle=j.stroke==="dashed"?"2 2":j.stroke==="dotted"?"1 1":"solid";e.linestyle=j.stroke==="double"&&j.Qb>2?"ThinThin":"Single"}else e.fill.color=j.fill.U(a)}for(;this.vb("borderPiece"+i++););}},wd:function(a){var b=this.e,c,d,e,g=this.g.w,j=[],i,h,k,n,m=Math.round,p,r,t;if(g.i()){c=g.j();g=c.J;r=c.Zd;t=c.gd;if(c.ee&&c.$d&&c.hd){if(t.t.fa()>0){c=g.t.a(b);k=c/2;j.push({path:this.ya({Jb:k,Ib:k,
68
- tb:k,Db:k},a),stroke:r.t,color:t.t,Qb:c})}}else{a=a||1;c=this.s.o();d=c.h;e=c.f;c=m(g.t.a(b));k=m(g.r.a(b));n=m(g.b.a(b));b=m(g.l.a(b));var v={t:c,r:k,b:n,l:b};b=this.g.G;if(b.i())p=this.kc(b.j());i=Math.floor;h=Math.ceil;var l=function(o,u){return p?p[o][u]:0},q=function(o,u,x,y,z,B){var E=l("x",o),D=l("y",o),C=o.charAt(1)==="r";o=o.charAt(0)==="b";return E>0&&D>0?(B?"al":"ae")+(C?h(d-E):i(E))*a+","+(o?h(e-D):i(D))*a+","+(i(E)-u)*a+","+(i(D)-x)*a+","+y*65535+","+2949075*(z?1:-1):(B?"m":"l")+(C?d-
69
- u:u)*a+","+(o?e-x:x)*a},s=function(o,u,x,y){var z=o==="t"?i(l("x","tl"))*a+","+h(u)*a:o==="r"?h(d-u)*a+","+i(l("y","tr"))*a:o==="b"?h(d-l("x","br"))*a+","+i(e-u)*a:i(u)*a+","+h(e-l("y","bl"))*a;o=o==="t"?h(d-l("x","tr"))*a+","+h(u)*a:o==="r"?h(d-u)*a+","+h(e-l("y","br"))*a:o==="b"?i(l("x","bl"))*a+","+i(e-u)*a:i(u)*a+","+i(l("y","tl"))*a;return x?(y?"m"+o:"")+"l"+z:(y?"m"+z:"")+"l"+o};b=function(o,u,x,y,z,B){var E=o==="l"||o==="r",D=v[o],C,F;if(D>0&&r[o]!=="none"&&t[o].fa()>0){C=v[E?o:u];u=v[E?u:
70
- o];F=v[E?o:x];x=v[E?x:o];if(r[o]==="dashed"||r[o]==="dotted"){j.push({path:q(y,C,u,B+45,0,1)+q(y,0,0,B,1,0),fill:t[o]});j.push({path:s(o,D/2,0,1),stroke:r[o],Qb:D,color:t[o]});j.push({path:q(z,F,x,B,0,1)+q(z,0,0,B-45,1,0),fill:t[o]})}else j.push({path:q(y,C,u,B+45,0,1)+s(o,D,0,0)+q(z,F,x,B,0,0)+(r[o]==="double"&&D>2?q(z,F-i(F/3),x-i(x/3),B-45,1,0)+s(o,h(D/3*2),1,0)+q(y,C-i(C/3),u-i(u/3),B,1,0)+"x "+q(y,i(C/3),i(u/3),B+45,0,1)+s(o,i(D/3),1,0)+q(z,i(F/3),i(x/3),B,0,0):"")+q(z,0,0,B-45,1,0)+s(o,0,1,
71
- 0)+q(y,0,0,B,1,0),fill:t[o]})}};b("t","l","r","tl","tr",90);b("r","t","b","tr","br",0);b("b","r","l","br","bl",-90);b("l","b","t","bl","tl",-180)}}return j},m:function(){if(this.ec||!this.g.q.i())this.e.runtimeStyle.borderColor="";f.u.m.call(this)}});f.Tb=f.u.R({N:5,Md:["t","tr","r","br","b","bl","l","tl","c"],Q:function(){return this.g.q.H()},i:function(){return this.g.q.i()},V:function(){this.I();var a=this.g.q.j(),b=this.g.w.j(),c=this.s.o(),d=this.e,e=this.uc;f.p.Rb(a.src,function(g){function j(s,
72
- o,u,x,y){s=e[s].style;var z=Math.max;s.width=z(o,0);s.height=z(u,0);s.left=x;s.top=y}function i(s,o,u){for(var x=0,y=s.length;x<y;x++)e[s[x]].imagedata[o]=u}var h=c.h,k=c.f,n=f.n("0"),m=a.J||(b?b.J:{t:n,r:n,b:n,l:n});n=m.t.a(d);var p=m.r.a(d),r=m.b.a(d);m=m.l.a(d);var t=a.slice,v=t.t.a(d),l=t.r.a(d),q=t.b.a(d);t=t.l.a(d);j("tl",m,n,0,0);j("t",h-m-p,n,m,0);j("tr",p,n,h-p,0);j("r",p,k-n-r,h-p,n);j("br",p,r,h-p,k-r);j("b",h-m-p,r,m,k-r);j("bl",m,r,0,k-r);j("l",m,k-n-r,0,n);j("c",h-m-p,k-n-r,m,n);i(["tl",
73
- "t","tr"],"cropBottom",(g.f-v)/g.f);i(["tl","l","bl"],"cropRight",(g.h-t)/g.h);i(["bl","b","br"],"cropTop",(g.f-q)/g.f);i(["tr","r","br"],"cropLeft",(g.h-l)/g.h);i(["l","r","c"],"cropTop",v/g.f);i(["l","r","c"],"cropBottom",q/g.f);i(["t","b","c"],"cropLeft",t/g.h);i(["t","b","c"],"cropRight",l/g.h);e.c.style.display=a.fill?"":"none"},this)},I:function(){var a=this.parent.za(this.N),b,c,d,e=this.Md,g=e.length;if(!a){a=doc.createElement("border-image");b=a.style;b.position="absolute";this.uc={};for(d=
74
- 0;d<g;d++){c=this.uc[e[d]]=f.p.Za("rect");c.appendChild(f.p.Za("imagedata"));b=c.style;b.behavior="url(#default#VML)";b.position="absolute";b.top=b.left=0;c.imagedata.src=this.g.q.j().src;c.stroked=false;c.filled=false;a.appendChild(c)}this.parent.sb(this.N,a)}return a},Ea:function(){if(this.i()){var a=this.e,b=a.runtimeStyle,c=this.g.q.j().J;b.borderStyle="solid";if(c){b.borderTopWidth=c.t.a(a)+"px";b.borderRightWidth=c.r.a(a)+"px";b.borderBottomWidth=c.b.a(a)+"px";b.borderLeftWidth=c.l.a(a)+"px"}this.mc()}},
75
- m:function(){var a=this.e.runtimeStyle;a.borderStyle="";if(this.ec||!this.g.w.i())a.borderColor=a.borderWidth="";f.u.m.call(this)}});f.Hc=f.u.R({N:1,Ya:"outset-box-shadow",Q:function(){var a=this.g;return a.ga.H()||a.G.H()},i:function(){var a=this.g.ga;return a.i()&&a.j().Da[0]},V:function(){function a(C,F,O,H,M,P,I){C=b.Aa("shadow"+C+F,"fill",d,j-C);F=C.fill;C.coordsize=n*2+","+m*2;C.coordorigin="1,1";C.stroked=false;C.filled=true;F.color=M.U(c);if(P){F.type="gradienttitle";F.color2=F.color;F.opacity=
76
- 0}C.path=I;l=C.style;l.left=O;l.top=H;l.width=n;l.height=m;return C}var b=this,c=this.e,d=this.I(),e=this.g,g=e.ga.j().Da;e=e.G.j();var j=g.length,i=j,h,k=this.s.o(),n=k.h,m=k.f;k=f.O===8?1:0;for(var p=["tl","tr","br","bl"],r,t,v,l,q,s,o,u,x,y,z,B,E,D;i--;){t=g[i];q=t.fe.a(c);s=t.ge.a(c);h=t.Vd.a(c);o=t.blur.a(c);t=t.color;u=-h-o;if(!e&&o)e=f.jb.Dc;u=this.ya({Jb:u,Ib:u,tb:u,Db:u},2,e);if(o){x=(h+o)*2+n;y=(h+o)*2+m;z=x?o*2/x:0;B=y?o*2/y:0;if(o-h>n/2||o-h>m/2)for(h=4;h--;){r=p[h];E=r.charAt(0)==="b";
77
- D=r.charAt(1)==="r";r=a(i,r,q,s,t,o,u);v=r.fill;v.focusposition=(D?1-z:z)+","+(E?1-B:B);v.focussize="0,0";r.style.clip="rect("+((E?y/2:0)+k)+"px,"+(D?x:x/2)+"px,"+(E?y:y/2)+"px,"+((D?x/2:0)+k)+"px)"}else{r=a(i,"",q,s,t,o,u);v=r.fill;v.focusposition=z+","+B;v.focussize=1-z*2+","+(1-B*2)}}else{r=a(i,"",q,s,t,o,u);q=t.fa();if(q<1)r.fill.opacity=q}}}});f.Pc=f.u.R({N:6,Ya:"imgEl",Q:function(){var a=this.g;return this.e.src!==this.Xc||a.G.H()},i:function(){var a=this.g;return a.G.i()||a.C.qc()},V:function(){this.Xc=
78
- j;this.Cd();var a=this.Aa("img","fill",this.I()),b=a.fill,c=this.s.o(),d=c.h;c=c.f;var e=this.g.w.j(),g=e&&e.J;e=this.e;var j=e.src,i=Math.round,h=e.currentStyle,k=f.n;if(!g||f.O<7){g=f.n("0");g={t:g,r:g,b:g,l:g}}a.stroked=false;b.type="frame";b.src=j;b.position=(d?0.5/d:0)+","+(c?0.5/c:0);a.coordsize=d*2+","+c*2;a.coordorigin="1,1";a.path=this.ya({Jb:i(g.t.a(e)+k(h.paddingTop).a(e)),Ib:i(g.r.a(e)+k(h.paddingRight).a(e)),tb:i(g.b.a(e)+k(h.paddingBottom).a(e)),Db:i(g.l.a(e)+k(h.paddingLeft).a(e))},
79
- 2);a=a.style;a.width=d;a.height=c},Cd:function(){this.e.runtimeStyle.filter="alpha(opacity=0)"},m:function(){f.u.m.call(this);this.e.runtimeStyle.filter=""}});f.Oc=f.u.R({ib:f.aa,Mb:f.aa,Nb:f.aa,Lb:f.aa,Ld:/^,+|,+$/g,Fd:/,+/g,gb:function(a,b){(this.pb||(this.pb=[]))[a]=b||void 0},ab:function(){var a=this.pb,b;if(a&&(b=a.join(",").replace(this.Ld,"").replace(this.Fd,","))!==this.Wc)this.Wc=this.e.runtimeStyle.background=b},m:function(){this.e.runtimeStyle.background="";delete this.pb}});f.Mc=f.u.R({ua:1,
80
- Q:function(){return this.g.C.H()},i:function(){var a=this.g;return a.C.i()||a.q.i()},V:function(){var a=this.g.C.j(),b,c,d=0,e,g;if(a){b=[];if(c=a.M)for(;e=c[d++];)if(e.P==="linear-gradient"){g=this.vd(e.Wa);g=(e.Xa||f.Ka.Kc).a(this.e,g.h,g.f,g.h,g.f);b.push("url(data:image/svg+xml,"+escape(this.xd(e,g.h,g.f))+") "+this.dd(e.$)+" / "+g.h+"px "+g.f+"px "+(e.bc||"")+" "+(e.Wa||"")+" "+(e.ub||""))}else b.push(e.Hb);a.color&&b.push(a.color.Y);this.parent.gb(this.ua,b.join(","))}},dd:function(a){return a?
81
- a.X.map(function(b){return b.d}).join(" "):"0 0"},vd:function(a){var b=this.e,c=this.s.o(),d=c.h;c=c.f;var e;if(a!=="border-box")if((e=this.g.w.j())&&(e=e.J)){d-=e.l.a(b)+e.l.a(b);c-=e.t.a(b)+e.b.a(b)}if(a==="content-box"){a=f.n;e=b.currentStyle;d-=a(e.paddingLeft).a(b)+a(e.paddingRight).a(b);c-=a(e.paddingTop).a(b)+a(e.paddingBottom).a(b)}return{h:d,f:c}},xd:function(a,b,c){var d=this.e,e=a.ca,g=e.length,j=f.Na.gc(d,b,c,a);a=j.xc;var i=j.yc,h=j.td,k=j.ud;j=j.rc;var n,m,p,r,t;n=[];for(m=0;m<g;m++)n.push(e[m].db?
82
- e[m].db.a(d,j):m===0?0:m===g-1?j:null);for(m=1;m<g;m++)if(n[m]===null){r=n[m-1];p=m;do t=n[++p];while(t===null);n[m]=r+(t-r)/(p-m+1)}b=['<svg width="'+b+'" height="'+c+'" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="g" gradientUnits="userSpaceOnUse" x1="'+a/b*100+'%" y1="'+i/c*100+'%" x2="'+h/b*100+'%" y2="'+k/c*100+'%">'];for(m=0;m<g;m++)b.push('<stop offset="'+n[m]/j+'" stop-color="'+e[m].color.U(d)+'" stop-opacity="'+e[m].color.fa()+'"/>');b.push('</linearGradient></defs><rect width="100%" height="100%" fill="url(#g)"/></svg>');
83
- return b.join("")},m:function(){this.parent.gb(this.ua)}});f.Nc=f.u.R({T:"repeat",Sc:"stretch",Qc:"round",ua:0,Q:function(){return this.g.q.H()},i:function(){return this.g.q.i()},V:function(){var a=this,b=a.g.q.j(),c=a.g.w.j(),d=a.s.o(),e=b.repeat,g=e.f,j=e.Ob,i=a.e,h=0;f.p.Rb(b.src,function(k){function n(Q,R,U,V,W,Y,X,S,w,A){K.push('<pattern patternUnits="userSpaceOnUse" id="pattern'+G+'" x="'+(g===l?Q+U/2-w/2:Q)+'" y="'+(j===l?R+V/2-A/2:R)+'" width="'+w+'" height="'+A+'"><svg width="'+w+'" height="'+
84
- A+'" viewBox="'+W+" "+Y+" "+X+" "+S+'" preserveAspectRatio="none"><image xlink:href="'+v+'" x="0" y="0" width="'+r+'" height="'+t+'" /></svg></pattern>');J.push('<rect x="'+Q+'" y="'+R+'" width="'+U+'" height="'+V+'" fill="url(#pattern'+G+')" />');G++}var m=d.h,p=d.f,r=k.h,t=k.f,v=a.Dd(b.src,r,t),l=a.T,q=a.Sc;k=a.Qc;var s=Math.ceil,o=f.n("0"),u=b.J||(c?c.J:{t:o,r:o,b:o,l:o});o=u.t.a(i);var x=u.r.a(i),y=u.b.a(i);u=u.l.a(i);var z=b.slice,B=z.t.a(i),E=z.r.a(i),D=z.b.a(i);z=z.l.a(i);var C=m-u-x,F=p-o-
85
- y,O=r-z-E,H=t-B-D,M=g===q?C:O*o/B,P=j===q?F:H*x/E,I=g===q?C:O*y/D;q=j===q?F:H*u/z;var K=[],J=[],G=0;if(g===k){M-=(M-(C%M||M))/s(C/M);I-=(I-(C%I||I))/s(C/I)}if(j===k){P-=(P-(F%P||P))/s(F/P);q-=(q-(F%q||q))/s(F/q)}k=['<svg width="'+m+'" height="'+p+'" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'];n(0,0,u,o,0,0,z,B,u,o);n(u,0,C,o,z,0,O,B,M,o);n(m-x,0,x,o,r-E,0,E,B,x,o);n(0,o,u,F,0,B,z,H,u,q);if(b.fill)n(u,o,C,F,z,B,O,H,M||I||O,q||P||H);n(m-x,o,x,F,r-E,B,E,H,x,P);n(0,
86
- p-y,u,y,0,t-D,z,D,u,y);n(u,p-y,C,y,z,t-D,O,D,I,y);n(m-x,p-y,x,y,r-E,t-D,E,D,x,y);k.push("<defs>"+K.join("\n")+"</defs>"+J.join("\n")+"</svg>");a.parent.gb(a.ua,"url(data:image/svg+xml,"+escape(k.join(""))+") no-repeat border-box border-box");h&&a.parent.ab()},a);h=1},Dd:function(){var a={};return function(b,c,d){var e=a[b],g;if(!e){e=new Image;g=doc.createElement("canvas");e.src=b;g.width=c;g.height=d;g.getContext("2d").drawImage(e,0,0);e=a[b]=g.toDataURL()}return e}}(),Ea:f.Tb.prototype.Ea,m:function(){var a=
87
- this.e.runtimeStyle;this.parent.gb(this.ua);a.borderColor=a.borderStyle=a.borderWidth=""}});f.kb=function(){function a(l,q){l.className+=" "+q}function b(l){var q=v.slice.call(arguments,1),s=q.length;setTimeout(function(){if(l)for(;s--;)a(l,q[s])},0)}function c(l){var q=v.slice.call(arguments,1),s=q.length;setTimeout(function(){if(l)for(;s--;){var o=q[s];o=t[o]||(t[o]=new RegExp("\\b"+o+"\\b","g"));l.className=l.className.replace(o,"")}},0)}function d(l){function q(){if(!U){var w,A,L=f.ja,T=l.currentStyle,
88
- N=T.getAttribute(g)==="true",da=T.getAttribute(i)!=="false",ea=T.getAttribute(h)!=="false";S=T.getAttribute(j);S=L>7?S!=="false":S==="true";if(!R){R=1;l.runtimeStyle.zoom=1;T=l;for(var fa=1;T=T.previousSibling;)if(T.nodeType===1){fa=0;break}fa&&a(l,p)}J.cb();if(N&&(A=J.o())&&(w=doc.documentElement||doc.body)&&(A.y>w.clientHeight||A.x>w.clientWidth||A.y+A.f<0||A.x+A.h<0)){if(!Y){Y=1;f.mb.ba(q)}}else{U=1;Y=R=0;f.mb.Ha(q);if(L===9){G={C:new f.Sb(l),q:new f.Ub(l),w:new f.Vb(l)};Q=[G.C,G.q];K=new f.Oc(l,
89
- J,G);w=[new f.Mc(l,J,G,K),new f.Nc(l,J,G,K)]}else{G={C:new f.Sb(l),w:new f.Vb(l),q:new f.Ub(l),G:new f.jb(l),ga:new f.Ic(l),Pb:new f.Uc(l)};Q=[G.C,G.w,G.q,G.G,G.ga,G.Pb];K=new f.Rc(l,J,G);w=[new f.Hc(l,J,G,K),new f.Fc(l,J,G,K),new f.Gc(l,J,G,K),new f.Tb(l,J,G,K)];l.tagName==="IMG"&&w.push(new f.Pc(l,J,G,K));K.ed=w}I=[K].concat(w);if(w=l.currentStyle.getAttribute(f.F+"watch-ancestors")){w=parseInt(w,10);A=0;for(N=l.parentNode;N&&(w==="NaN"||A++<w);){H(N,"onpropertychange",C);H(N,"onmouseenter",x);
90
- H(N,"onmouseleave",y);H(N,"onmousedown",z);if(N.tagName in f.fc){H(N,"onfocus",E);H(N,"onblur",D)}N=N.parentNode}}if(S){f.Oa.ba(o);f.Oa.Rd()}o(1)}if(!V){V=1;L<9&&H(l,"onmove",s);H(l,"onresize",s);H(l,"onpropertychange",u);ea&&H(l,"onmouseenter",x);if(ea||da)H(l,"onmouseleave",y);da&&H(l,"onmousedown",z);if(l.tagName in f.fc){H(l,"onfocus",E);H(l,"onblur",D)}f.Qa.ba(s);f.L.ba(M)}J.hb()}}function s(){J&&J.Ad()&&o()}function o(w){if(!X)if(U){var A,L=I.length;F();for(A=0;A<L;A++)I[A].Ea();if(w||J.Od())for(A=
91
- 0;A<L;A++)I[A].ib();if(w||J.Td())for(A=0;A<L;A++)I[A].Mb();K.ab();O()}else R||q()}function u(){var w,A=I.length,L;w=event;if(!X&&!(w&&w.propertyName in r))if(U){F();for(w=0;w<A;w++)I[w].Ea();for(w=0;w<A;w++){L=I[w];L.Cb||L.ib();L.Q()&&L.Lb()}K.ab();O()}else R||q()}function x(){b(l,k)}function y(){c(l,k,n)}function z(){b(l,n);f.lb.ba(B)}function B(){c(l,n);f.lb.Ha(B)}function E(){b(l,m)}function D(){c(l,m)}function C(){var w=event.propertyName;if(w==="className"||w==="id")u()}function F(){J.cb();for(var w=
92
- Q.length;w--;)Q[w].cb()}function O(){for(var w=Q.length;w--;)Q[w].hb();J.hb()}function H(w,A,L){w.attachEvent(A,L);W.push([w,A,L])}function M(){if(V){for(var w=W.length,A;w--;){A=W[w];A[0].detachEvent(A[1],A[2])}f.L.Ha(M);V=0;W=[]}}function P(){if(!X){var w,A;M();X=1;if(I){w=0;for(A=I.length;w<A;w++){I[w].ec=1;I[w].m()}}S&&f.Oa.Ha(o);f.Qa.Ha(o);I=J=G=Q=l=null}}var I,K,J=new ha(l),G,Q,R,U,V,W=[],Y,X,S;this.Ed=q;this.update=o;this.m=P;this.qd=l}var e={},g=f.F+"lazy-init",j=f.F+"poll",i=f.F+"track-active",
93
- h=f.F+"track-hover",k=f.La+"hover",n=f.La+"active",m=f.La+"focus",p=f.La+"first-child",r={background:1,bgColor:1,display:1},t={},v=[];d.yd=function(l){var q=f.p.Ba(l);return e[q]||(e[q]=new d(l))};d.m=function(l){l=f.p.Ba(l);var q=e[l];if(q){q.m();delete e[l]}};d.md=function(){var l=[],q;if(e){for(var s in e)if(e.hasOwnProperty(s)){q=e[s];l.push(q.qd);q.m()}e={}}return l};return d}();f.supportsVML=f.zc;f.attach=function(a){f.ja<10&&f.zc&&f.kb.yd(a).Ed()};f.detach=function(a){f.kb.m(a)}};
94
- var $=element;function init(){if(doc.media!=="print"){var a=window.PIE;a&&a.attach($)}}function cleanup(){if(doc.media!=="print"){var a=window.PIE;if(a){a.detach($);$=0}}}$.readyState==="complete"&&init();
95
- </script>
96
- </PUBLIC:COMPONENT>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -2,16 +2,16 @@
2
  Contributors: maxfoundry, basszje, arcware, johnbhartley
3
  Tags: wordpress button plugin, share button, wordpress buttons, css3 button generator, responsive buttons, css wordpress button
4
  Requires at least: 4.8
5
- Tested up to: 5.3
6
  Requires PHP: 5.6
7
- Stable tag: 7.13.4
8
 
9
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
10
 
11
  == Description ==
12
  [MaxButtons](https://maxbuttons.com/?utm_source=repowp1&utm_medium=mbrepo&utm_content=mbr_maxbuttons&utm_campaign=mbr_maxbuttons) is a powerful WordPress button, share button and social icon plugin. Create great looking CSS3 WordPress buttons in a minute. Easy to understand. Our button editor with live preview makes it a snap to generate awesome responsive buttons in very little time. The social share buttons and social icon features allow you to add social options to your website in minutes.
13
 
14
- MaxButtons [WordPress button plugin](https://www.maxbuttons.com/#CSS3/?utm_source=repowbp&utm_medium=mbrepo&utm_content=wordpress_button_plugin&utm_campaign=repowbp) has been going strong for over 6 years and was the first button plugin for WordPress. MaxButtons has earned over 700 5-star reviews and over 1.5 million downloads. Here are couple of our favorites:
15
 
16
  > “The best plugin of its kind” - by celito
17
 
@@ -89,7 +89,7 @@ Our premium WordPress plugin for buttons, share buttons and social icons brings
89
  * Include images in buttons.
90
  * **Button Search** - for easier management of large button sets.
91
  * **Font Awesome 5** - Largest icon collection, fastest served
92
- * **Visual Composer** - Integrated with Visual Composer
93
  * **Contact Form 7** Integration
94
  * **Beaver Builder** Integration
95
  * **Easy Digital Downloads** Purchase and Checkout Button Integration
@@ -239,13 +239,22 @@ Enable the container option and set the alignment property to either "display: i
239
 
240
  By default WordPress can't display shortcodes in a menu. You can use this [plugin](https://wordpress.org/plugins/shortcode-in-menus/) to allow shortcodes in a menu. Just copy the MaxButton shortcode in the menu after installing
241
 
 
 
 
 
 
 
 
 
 
242
  = How do I display a MaxButton in a slider? =
243
 
244
  This depends on the slider plugin you are using. Most of the well-known ones are allowing the use of shortcodes within the slides. To find out if your plugin can handle that, please ask the slider vendor.
245
 
246
  = I use Autoptimize with MaxButtons =
247
 
248
- If you use Autoptimize plugin and see weird result, try to load the pageby adding ?ao_noptimize=1 to the URL. If the buttons load normally then the issue is with Autoptimize. You can enter an exclusion for .maxbutton in the CSS exclusions.
249
 
250
  = Non-Latin language users =
251
 
@@ -255,6 +264,21 @@ Secondly, please use latin only characters for button name ( Basic settings) and
255
 
256
  == Changelog ==
257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  = 7.13.4 =
259
 
260
  * Updated ScssPhp to 1.0.7
@@ -414,151 +438,9 @@ Secondly, please use latin only characters for button name ( Basic settings) and
414
  * Fixed - Issue with button updated warning when nothing was updated.
415
  * Fixed - Issue with shortcake integration
416
 
417
- = 6.28 =
418
-
419
- * Tested for 4.9.4
420
- * Improved performance of editor javascript
421
- * Fixed issue with showing certain conditional fields
422
- * Fixed issue in maxmodal with double init
423
-
424
- = 6.27 =
425
-
426
- * Tested for 4.9.2
427
- * Security - Added rel='noopener' for links opening in new window
428
- * Fixed missing values on a template
429
-
430
- = 6.26.1 =
431
-
432
- * Fixed - Advanced options
433
-
434
- = 6.26 =
435
-
436
- * Technical maintenance
437
- * Tested up to 4.9.1.
438
- * Fixed interface issue with conditional Javascript for sharing plugin
439
-
440
- = 6.25 =
441
-
442
- * New setting for extra URL Schemes
443
- * Small layout color picker fix
444
- * Renamed button title to tooltip for clarity
445
- * Rename empty font setting to 'site default' for clarity
446
-
447
- = 6.24 =
448
-
449
- * Social Share deprecated. For Social Sharing please check the new MaxButton Social Share addon
450
- * New allowed link URL schemes - ms-windows-store and steam.
451
- * Fixed Copy Color interface
452
- * Improvements how Modals handle scrolling
453
- * Change / Issue in MaxCSSParser which didn't allow to properly parse Pseudo CSS element which are a parent of the main anchor class.
454
- * Improvements in editor
455
-
456
- = 6.23 =
457
-
458
- * Fixed font-size in color picker styling
459
- * Adapted to changes on color picker layout ( WP 4.9 Alpha )
460
-
461
- = 6.22 =
462
-
463
- * Fixed bug in External CSS function and is now working again
464
- * Enhanced visibility of 'show shortcode examples' option
465
-
466
- = 6.21 =
467
-
468
- * Feature - Add simple link title to buttons plus shortcode attribute linktitle
469
- * Updated Font Awesome override to work only where needed
470
- * Removed PHP 5.2 check for being not functional
471
-
472
- = 6.20.2 =
473
-
474
- * Fixed issue with window resizes in post / page editor
475
- * Fixed issue with Shortcake integration
476
-
477
- = 6.20.1 =
478
-
479
- * Fix - warnings when using Origins Sitebuilder
480
-
481
- = 6.20 =
482
-
483
- * Big technical update and clean up of code
484
- * Moved plugin to proper use of namespaces
485
- * File:// now allowed for URL's
486
- * Moved color class to mbcolor due to frequent issues with offending plugins.
487
- * Tested for WP 4.8
488
-
489
-
490
- = 6.19.1 =
491
-
492
- * Button overview loading in editor screen (fixed)
493
-
494
- = 6.19 =
495
-
496
- * Fixed minor security issue regarding cross-site scripting (JVN#70411623). Thanks to JPCert for responsible disclosure.
497
- * Fixed fatal error in settings function 'reset cache'
498
-
499
- = 6.18 =
500
-
501
- * Fixed bug where scrollbar didn't show in Add Button dialog
502
- * Extra check for multi-byte string support
503
-
504
- = 6.17 =
505
-
506
- * Button load data hook added
507
- * Fixed - Add button dialog showing scrollbars without need in certain cases
508
- * Fixed - Minor notice in Social share when buttons are not in database
509
-
510
- = 6.16 =
511
-
512
- * New option for better accuracy of preview if site theme runs 'border-box'
513
- * Fixed Install class to check and create Social share transient table
514
- * Added check for SimpleXML module
515
-
516
- = 6.15 =
517
-
518
- * New setting to solve FontAwesome conflict
519
- * Updated settings page
520
-
521
- = 6.14 =
522
-
523
- * Fixed small layout issue in responsive section
524
- * Updated copy warning to be even more clear
525
- * Added shortcode options to FAQ
526
-
527
- = 6.13.1 =
528
-
529
- * Fixed error message on action buttons.
530
-
531
- = 6.13 =
532
-
533
- * Enter on text fields now moves to the next field
534
- * Fixed bug that could trigger action buttons in editor when using enter button
535
-
536
- = 6.12 =
537
-
538
- * Updated Copy / Trash / Delete interfaces
539
- * Fixed issue with refresh page warning when removing buttons
540
- * Fixed Social Share Facebook count
541
- * Fixed lower save button not working in social share
542
- * Fixed layout issue in Social Share
543
-
544
-
545
  == Upgrade Notice ==
546
 
547
- = 7. 0 =
548
-
549
- Social Share has been split of into it's own plugin. Check your site if you are using this feature.
550
-
551
- = 4.0 =
552
-
553
- This major update includes new Social sharing features. If you run into issues please let us know via support. Experiences are also welcome!
554
-
555
- = 3.19 =
556
-
557
- URL handling has been changed. If you use non-usual URL's in your buttons please let us know directly if you encounter any problems.
558
-
559
- = 3.0 =
560
- Attention! This is a big upgrade from 2.x. Before installation it's adviced take a backup. In case your buttons don't appear after upgrading,
561
- please try to deactivate and activate the plugin again
562
 
563
- = 1.24.2 =
564
- Please deactivate and then reactivate before using. If the save button does not work, be sure to clear your browser cache. Also, if the "copy and invert" button does not work, try a hard refresh of your browser or clear your cache.
2
  Contributors: maxfoundry, basszje, arcware, johnbhartley
3
  Tags: wordpress button plugin, share button, wordpress buttons, css3 button generator, responsive buttons, css wordpress button
4
  Requires at least: 4.8
5
+ Tested up to: 5.4.2
6
  Requires PHP: 5.6
7
+ Stable tag: 8.0
8
 
9
  WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
10
 
11
  == Description ==
12
  [MaxButtons](https://maxbuttons.com/?utm_source=repowp1&utm_medium=mbrepo&utm_content=mbr_maxbuttons&utm_campaign=mbr_maxbuttons) is a powerful WordPress button, share button and social icon plugin. Create great looking CSS3 WordPress buttons in a minute. Easy to understand. Our button editor with live preview makes it a snap to generate awesome responsive buttons in very little time. The social share buttons and social icon features allow you to add social options to your website in minutes.
13
 
14
+ MaxButtons [WordPress button plugin](https://www.maxbuttons.com/#CSS3/?utm_source=repowbp&utm_medium=mbrepo&utm_content=wordpress_button_plugin&utm_campaign=repowbp) has been going strong for over 6 years and was the first button plugin for WordPress. MaxButtons has earned over 900 5-star reviews and over 2.5 million downloads. Here are couple of our favorites:
15
 
16
  > “The best plugin of its kind” - by celito
17
 
89
  * Include images in buttons.
90
  * **Button Search** - for easier management of large button sets.
91
  * **Font Awesome 5** - Largest icon collection, fastest served
92
+ * **WPBakery Page Builder** - Integrated with WPBakery Page Builder
93
  * **Contact Form 7** Integration
94
  * **Beaver Builder** Integration
95
  * **Easy Digital Downloads** Purchase and Checkout Button Integration
239
 
240
  By default WordPress can't display shortcodes in a menu. You can use this [plugin](https://wordpress.org/plugins/shortcode-in-menus/) to allow shortcodes in a menu. Just copy the MaxButton shortcode in the menu after installing
241
 
242
+ = How do I display a MaxButton in Excerpts / Post listing =
243
+
244
+ By default WordPress only displays plain text in Post Excerpts. If you want to show a button there, you can add this snippet to your functions.php
245
+
246
+ `add_filter( 'the_excerpt', 'shortcode_unautop');
247
+ add_filter( 'the_excerpt', 'do_shortcode');`
248
+
249
+ Alternatively there are many plugins for customizing the excerpt that can do this for you and give control over other parts of the excerpt as well.
250
+
251
  = How do I display a MaxButton in a slider? =
252
 
253
  This depends on the slider plugin you are using. Most of the well-known ones are allowing the use of shortcodes within the slides. To find out if your plugin can handle that, please ask the slider vendor.
254
 
255
  = I use Autoptimize with MaxButtons =
256
 
257
+ Autoptimize is supported and should work fine in most cases. However, if you see weird results, try to load the pageby adding ?ao_noptimize=1 to the URL. If the buttons load normally then the issue is with Autoptimize. You can enter an exclusion for .maxbutton in the CSS exclusions.
258
 
259
  = Non-Latin language users =
260
 
264
 
265
  == Changelog ==
266
 
267
+ = 8.0 =
268
+
269
+ * Major rework of responsive options :
270
+ - Better UI / Layout with Screens
271
+ - Almost all styles can be altered in responsive
272
+ - Smart system keeps extra output to a minimum
273
+ - New LivePreview system let's you preview responsive options
274
+ - Rulers and sizes in preview pane
275
+ * Width / Height can now be put as percentages.
276
+ * Several CSS properties will now combine to shorthand CSS, resulting in small CSS
277
+ * Textareas now trigger save status
278
+ * Updated SCSSPHP library to 1.1.1.
279
+
280
+ * Translations: Dutch translation ( Thanks Peter Smits! )
281
+
282
  = 7.13.4 =
283
 
284
  * Updated ScssPhp to 1.0.7
438
  * Fixed - Issue with button updated warning when nothing was updated.
439
  * Fixed - Issue with shortcake integration
440
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
441
  == Upgrade Notice ==
442
 
443
+ = 8.0 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
444
 
445
+ **Warning** . This is a big upgrade. This update has major changes to responsive options. Before updating - Make backup of database table
446
+ - Check your buttons after updating - Check your responsive buttons
views/modals/copy-modal.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <!-- copy modal -->
3
+ <div class='maxmodal-data' id='copy-modal' data-load='window.maxFoundry.maxadmin.checkCopyModal'>
4
+ <span class='title'><?php _e("Copy this button","maxbuttons"); ?></span>
5
+ <span class="content">
6
+
7
+ <div class='copy-warning'>
8
+ <h3><?php _e('You probably don\'t want to copy your button!', 'maxbuttons'); ?></h3>
9
+ <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>
10
+
11
+ <p class="example">
12
+
13
+ <strong><?php _e("Add the same button with different link","maxbuttons"); ?></strong><br>
14
+ &nbsp; [maxbutton id="<?php echo $this->view->button_id ?>" url="http://yoururl"]
15
+ </p>
16
+
17
+ <p class="example"><strong><?php _e("Use the same button but change the text","maxbuttons"); ?> </strong><br />
18
+ &nbsp; [maxbutton id="<?php echo $this->view->button_id ?>" text="yourtext"]
19
+ </p>
20
+
21
+ <p class="example"><strong><?php _e("Both","maxbuttons"); ?> </strong><br />
22
+ &nbsp; [maxbutton id="<?php echo $this->view->button_id ?>" text="yourtext" url="http://yoururl"]
23
+ </p>
24
+
25
+ <p class="example"><strong><?php _e('All Options', 'maxbuttons'); ?></strong><br />
26
+ &nbsp; [maxbutton id="<?php echo $this->view->button_id ?>" text="yourtext" url="http://yoururl" linktitle="tooltip" window="new" nofollow="true"] </p>
27
+ </div>
28
+
29
+
30
+ <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>
31
+ </div>
32
+ <p><?php _e("Do you want to copy this button to a new button?","maxbuttons"); ?></p>
33
+ </span>
34
+ <span class="controls">
35
+ <button type="button" class='button-primary' data-buttonaction='copy' data-buttonid='<?php echo $this->view->button_id ?>'>
36
+ <?php _e('Copy','maxbuttons'); ?></button>
37
+
38
+ <a class='button modal_close'><?php _e("Cancel",'maxbuttons'); ?></a>
39
+ </span>
40
+ </div>
views/modals/delete-modal.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- delete modal -->
2
+ <div class="maxmodal-data" id="delete-modal">
3
+ <span class='title'><?php _e("Removing button","maxbuttons"); ?></span>
4
+ <span class="content"><p><?php _e("You are about to permanently remove this button. Are you sure?", "maxbuttons"); ?></p></span>
5
+ <div class='controls'>
6
+ <button type="button" class='button-primary' data-buttonaction='delete' data-buttonid='<?php echo $this->view->button_id ?>'>
7
+ <?php _e('Yes','maxbuttons'); ?></button>
8
+
9
+ <a class="modal_close button-primary"><?php _e("No", "maxbuttons"); ?></a>
10
+
11
+ </div>
12
+ </div>
views/modals/trash-modal.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- trash modal -->
2
+ <div class="maxmodal-data" id="trash-modal">
3
+ <span class='title'><?php _e("Trash button","maxbuttons"); ?></span>
4
+ <span class="content"><p><?php _e("The button will be moved to trash. It can be recovered from the trash bin later. Continue?", "maxbuttons"); ?></p></span>
5
+ <div class='controls'>
6
+ <button type="button" class='button-primary' data-buttonaction='trash' data-buttonid='<?php echo $this->view->button_id ?>'>
7
+ <?php _e('Yes','maxbuttons'); ?></button>
8
+
9
+ <a class="modal_close button-primary"><?php _e("No", "maxbuttons"); ?></a>
10
+
11
+ </div>
12
+ </div>