Version Description
- Removed Shortcake integration
- Fix - Hidden items would still take space when invisible
Download this release
Release Info
Developer | basszje |
Plugin | WordPress Button Plugin MaxButtons |
Version | 8.7 |
Comparing to | |
See all releases |
Code changes from version 8.6 to 8.7
- assets/css/maxmodal.css +119 -93
- assets/css/maxmodal.css.map +1 -0
- assets/css/media_button.css.map +1 -0
- assets/css/review_notice.css +59 -1
- assets/css/review_notice.css.map +1 -0
- assets/css/style.css +2 -1
- assets/css/style.css.map +1 -0
- assets/integrations/shortcake/assets/banner.png +0 -0
- assets/integrations/shortcake/class-field-maxbutton.php +0 -136
- assets/integrations/shortcake/edit-attribute-field-maxbutton.js +0 -80
- assets/integrations/shortcake/shortcake.php +0 -131
- assets/scss/_editor.scss +3 -2
- blocks/color.php +1 -1
- classes/integrations.php +0 -1
- includes/maxbuttons-button.php +3 -1
- js/maxbuttons-admin.js +5 -6
- js/min/maxbuttons-admin.js +1 -1
- maxbuttons.php +3 -3
- readme.txt +7 -3
assets/css/maxmodal.css
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
.maxmodal-data {
|
2 |
-
display: none;
|
|
|
3 |
|
4 |
body.max-modal-active {
|
5 |
-
overflow: hidden;
|
|
|
6 |
|
7 |
.max-modal {
|
8 |
display: none;
|
@@ -22,103 +24,124 @@ body.max-modal-active {
|
|
22 |
-webkit-box-shadow: -3px -3px 10px rgba(0, 0, 0, 0.5);
|
23 |
-moz-box-shadow: -3px -3px 10px rgba(0, 0, 0, 0.5);
|
24 |
box-shadow: -3px -3px 10px rgba(0, 0, 0, 0.5);
|
25 |
-
/* Fixes for Beaver Builder, which loads without WP backend styles */
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
.max-modal
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
.max-modal textarea#maxbutton-css {
|
115 |
width: 100%;
|
116 |
height: 250px;
|
117 |
-
font-family: Consolas,
|
118 |
font-size: 13px;
|
119 |
white-space: normal;
|
120 |
word-wrap: break-word;
|
121 |
-
overflow: none;
|
|
|
122 |
|
123 |
.maxmodal_overlay {
|
124 |
background: #000;
|
@@ -130,4 +153,7 @@ body.max-modal-active {
|
|
130 |
position: fixed;
|
131 |
opacity: 0.7;
|
132 |
z-index: 100104;
|
133 |
-
display: none;
|
|
|
|
|
|
1 |
.maxmodal-data {
|
2 |
+
display: none;
|
3 |
+
}
|
4 |
|
5 |
body.max-modal-active {
|
6 |
+
overflow: hidden;
|
7 |
+
}
|
8 |
|
9 |
.max-modal {
|
10 |
display: none;
|
24 |
-webkit-box-shadow: -3px -3px 10px rgba(0, 0, 0, 0.5);
|
25 |
-moz-box-shadow: -3px -3px 10px rgba(0, 0, 0, 0.5);
|
26 |
box-shadow: -3px -3px 10px rgba(0, 0, 0, 0.5);
|
27 |
+
/* Fixes for Beaver Builder, which loads without WP backend styles */
|
28 |
+
}
|
29 |
+
.max-modal.fullscreen {
|
30 |
+
width: auto;
|
31 |
+
max-width: auto;
|
32 |
+
max-height: auto;
|
33 |
+
left: 10px;
|
34 |
+
right: 10px;
|
35 |
+
top: 10px;
|
36 |
+
bottom: 10px;
|
37 |
+
}
|
38 |
+
@media (max-width: 960px) {
|
39 |
+
.max-modal {
|
40 |
+
max-width: 90%;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
@media (max-width: 780px) {
|
44 |
+
.max-modal {
|
45 |
+
max-width: 100%;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
.max-modal.success {
|
49 |
+
border: 4px solid green;
|
50 |
+
}
|
51 |
+
.max-modal.error {
|
52 |
+
border: 4px solid red;
|
53 |
+
}
|
54 |
+
.max-modal.error h3 {
|
55 |
+
background-color: #ff0000;
|
56 |
+
}
|
57 |
+
.max-modal .content-area {
|
58 |
+
background-color: #fff;
|
59 |
+
}
|
60 |
+
.max-modal .modal_header {
|
61 |
+
text-align: center;
|
62 |
+
font-size: 16px;
|
63 |
+
font-weight: 700;
|
64 |
+
background-color: #f3f3f3;
|
65 |
+
border-bottom: 1px solid #ccc;
|
66 |
+
padding: 8px 5px;
|
67 |
+
cursor: move;
|
68 |
+
}
|
69 |
+
.max-modal .modal_header h3 {
|
70 |
+
margin: 0;
|
71 |
+
color: #444;
|
72 |
+
font-weight: 400;
|
73 |
+
padding: 0;
|
74 |
+
text-align: center;
|
75 |
+
text-shadow: none;
|
76 |
+
font-size: 16px;
|
77 |
+
}
|
78 |
+
.max-modal .modal_header .modal_close {
|
79 |
+
position: absolute;
|
80 |
+
right: 5px;
|
81 |
+
top: 8px;
|
82 |
+
width: 20px;
|
83 |
+
height: 20px;
|
84 |
+
cursor: pointer;
|
85 |
+
color: #444;
|
86 |
+
}
|
87 |
+
.max-modal .modal_header .modal_close:hover {
|
88 |
+
cursor: pointer;
|
89 |
+
color: #111;
|
90 |
+
}
|
91 |
+
.max-modal .content, .max-modal .modal_content {
|
92 |
+
text-align: center;
|
93 |
+
padding: 5px 15px 10px;
|
94 |
+
overflow-y: auto;
|
95 |
+
}
|
96 |
+
.max-modal textarea {
|
97 |
+
overflow-x: auto;
|
98 |
+
}
|
99 |
+
.max-modal .controls {
|
100 |
+
padding: 10px;
|
101 |
+
text-align: center;
|
102 |
+
clear: both;
|
103 |
+
}
|
104 |
+
.max-modal .controls .button, .max-modal .controls .button-primary {
|
105 |
+
margin-right: 8px;
|
106 |
+
background: #0085ba;
|
107 |
+
border-color: #0073aa #006799 #006799;
|
108 |
+
box-shadow: 0 1px 0 #006799;
|
109 |
+
color: #fff;
|
110 |
+
text-decoration: none;
|
111 |
+
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
|
112 |
+
cursor: pointer;
|
113 |
+
height: 28px;
|
114 |
+
line-height: 26px;
|
115 |
+
display: inline-block;
|
116 |
+
padding: 0 10px;
|
117 |
+
}
|
118 |
+
.max-modal .controls .button.disabled, .max-modal .controls .button-primary.disabled {
|
119 |
+
background-color: #008ec2;
|
120 |
+
color: #66c6e4;
|
121 |
+
cursor: default;
|
122 |
+
border-color: #007cb2;
|
123 |
+
}
|
124 |
+
.max-modal .tablenav .tablenav-pages a, .max-modal .tablenav-pages-navspan {
|
125 |
+
display: inline-block;
|
126 |
+
vertical-align: baseline;
|
127 |
+
min-width: 28px;
|
128 |
+
min-height: 28px;
|
129 |
+
margin: 0;
|
130 |
+
padding: 0 4px;
|
131 |
+
font-size: 16px;
|
132 |
+
line-height: 1.5;
|
133 |
+
text-align: center;
|
134 |
+
}
|
135 |
|
136 |
.max-modal textarea#maxbutton-css {
|
137 |
width: 100%;
|
138 |
height: 250px;
|
139 |
+
font-family: Consolas, "Courier New", "Courier";
|
140 |
font-size: 13px;
|
141 |
white-space: normal;
|
142 |
word-wrap: break-word;
|
143 |
+
overflow: none;
|
144 |
+
}
|
145 |
|
146 |
.maxmodal_overlay {
|
147 |
background: #000;
|
153 |
position: fixed;
|
154 |
opacity: 0.7;
|
155 |
z-index: 100104;
|
156 |
+
display: none;
|
157 |
+
}
|
158 |
+
|
159 |
+
/*# sourceMappingURL=maxmodal.css.map */
|
assets/css/maxmodal.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sourceRoot":"","sources":["../scss/maxmodal.scss","../scss/_mixins.scss"],"names":[],"mappings":"AAEA;EACC;;;AAGD;EACE;;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EAEA;EAYA;EACA;ECSA;EACA;EAZA;EACA;EACA;ADuGA;;AAlHA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;ACyDC;ED9EH;IAgCE;;;ACuCE;EDvEJ;IAqCE;;;AAED;EAEE;;AAGF;EACE;;AACA;EAAK;;AAGP;EACE;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;;AAIH;EACC;EACA;EAIA;;AAED;EAAW;;AACX;EACC;EACA;EACA;;AACA;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;AAUH;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAMF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA","file":"maxmodal.css"}
|
assets/css/media_button.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sourceRoot":"","sources":["../scss/media_button.scss"],"names":[],"mappings":"AAEC;EACE;EACA;EACA;;AAGF;EACC;EACA;;AAEA;EACC;EACA;EACA;;AAIA;EACC;;AAGD;EACC;EACA;EACA;;AAED;EACC;;AAOD;EACC;EACA;;AAED;EACC;EACA;EACA;;AAIH;EAEC;EACA;EACA;;AACA;EACC;EAGA;;AAGD;EAAgB;;AAChB;EACC;;AAED;EACC;EACA;;AAIF;EAEC;EACA;AAwCA;;AAvCA;EACC;;AAKD;EACC;EACA;;AAED;EACC;;AAGD;EACC;EACA;;AAID;EACC;EACA;EAEA;EACA;EACA;EACA;;AAGD;EACC;;AAED;EACC;EACA;;AAED;EAAc;;AAGd;EAEC;;AAEA;EACC;;AAEA;EACC;;AAGF;EAAQ;;AACP;EAA0B;;AAC1B;EACE;EACA;;AAGF;EAEC;;AAED;EACE;EACA;;AAEF;EAAiC;;AAElC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EACC;EACA;;AACA;EACG;EACD;EACA;;AAIH;EAAiB;;AACjB;EACC;;AAQJ;EACC;EACA;EAEA;EACA;EACA;EACA;EAEA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA","file":"media_button.css"}
|
assets/css/review_notice.css
CHANGED
@@ -1 +1,59 @@
|
|
1 |
-
.maxbuttons-notice
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.maxbuttons-notice {
|
2 |
+
height: 148px;
|
3 |
+
color: #000;
|
4 |
+
display: block;
|
5 |
+
}
|
6 |
+
.maxbuttons-notice .review-logo {
|
7 |
+
background: url("../../images/maxbuttonspro-128.png") no-repeat scroll 0 0 transparent;
|
8 |
+
display: block;
|
9 |
+
float: left;
|
10 |
+
margin: 10px;
|
11 |
+
height: 128px;
|
12 |
+
width: 128px;
|
13 |
+
}
|
14 |
+
.maxbuttons-notice .mb-notice {
|
15 |
+
display: block;
|
16 |
+
height: 128px;
|
17 |
+
float: left;
|
18 |
+
margin: 10px;
|
19 |
+
}
|
20 |
+
.maxbuttons-notice .mb-notice p {
|
21 |
+
font-size: 16px;
|
22 |
+
}
|
23 |
+
.maxbuttons-notice .title {
|
24 |
+
font-size: 24px !important;
|
25 |
+
margin: 4px 0;
|
26 |
+
}
|
27 |
+
.maxbuttons-notice ul.review-notice-links li {
|
28 |
+
float: left;
|
29 |
+
display: inline-block;
|
30 |
+
margin-right: 20px;
|
31 |
+
}
|
32 |
+
.maxbuttons-notice ul.review-notice-links li a {
|
33 |
+
font-size: 16px;
|
34 |
+
}
|
35 |
+
.maxbuttons-notice .close-mb-notice {
|
36 |
+
float: right;
|
37 |
+
margin-top: 70px;
|
38 |
+
}
|
39 |
+
|
40 |
+
.maxbuttons-reviewoffer {
|
41 |
+
font-size: 14px;
|
42 |
+
padding: 15px;
|
43 |
+
background: #fbfbfb;
|
44 |
+
display: inline-block;
|
45 |
+
color: #000;
|
46 |
+
border: 1px solid #e5e5e5;
|
47 |
+
border-radius: 5px;
|
48 |
+
margin: 8px 0;
|
49 |
+
line-height: 25px;
|
50 |
+
}
|
51 |
+
.maxbuttons-reviewoffer .dismiss {
|
52 |
+
cursor: pointer;
|
53 |
+
display: block;
|
54 |
+
float: right;
|
55 |
+
margin-right: 10px;
|
56 |
+
margin-top: 3px;
|
57 |
+
}
|
58 |
+
|
59 |
+
/*# sourceMappingURL=review_notice.css.map */
|
assets/css/review_notice.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sourceRoot":"","sources":["../scss/review_notice.scss"],"names":[],"mappings":"AACA;EACG;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AACC;EACC;;AAIJ;EACE;EACA;;AAGF;EACE;EACA;EACA;;AACA;EAAI;;AAGN;EACE;EACA;;;AAIH;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA","file":"review_notice.css"}
|
assets/css/style.css
CHANGED
@@ -488,8 +488,9 @@
|
|
488 |
border-top: solid 1px #cccccc;
|
489 |
background-color: #ffffff;
|
490 |
}
|
491 |
-
#maxbuttons .option-container > .inside [data-show], #maxbuttons .block_sidebar > .inside [data-show] {
|
492 |
opacity: 0;
|
|
|
493 |
}
|
494 |
#maxbuttons .option-container > .inside .option, #maxbuttons .option-container > .inside .option-design, #maxbuttons .block_sidebar > .inside .option, #maxbuttons .block_sidebar > .inside .option-design {
|
495 |
margin-bottom: 10px;
|
488 |
border-top: solid 1px #cccccc;
|
489 |
background-color: #ffffff;
|
490 |
}
|
491 |
+
#maxbuttons .option-container > .inside [data-show]:not(.condshow), #maxbuttons .option-container > .inside .option[data-show]:not(.condshow), #maxbuttons .block_sidebar > .inside [data-show]:not(.condshow), #maxbuttons .block_sidebar > .inside .option[data-show]:not(.condshow) {
|
492 |
opacity: 0;
|
493 |
+
display: none;
|
494 |
}
|
495 |
#maxbuttons .option-container > .inside .option, #maxbuttons .option-container > .inside .option-design, #maxbuttons .block_sidebar > .inside .option, #maxbuttons .block_sidebar > .inside .option-design {
|
496 |
margin-bottom: 10px;
|
assets/css/style.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sourceRoot":"","sources":["../scss/_global.scss","../scss/style.scss","../scss/_general.scss","../scss/_overview.scss","../scss/_editor.scss","../scss/_elements.scss","../scss/_collection.scss","../scss/_mixins.scss","../scss/_input_range.scss","../scss/_support.scss","../scss/_settings.scss","../scss/_subtabs.scss","../scss/_feedback.scss","../scss/_ads.scss","../scss/_gopro.scss","../scss/_gosocial.scss"],"names":[],"mappings":";AAEA;AAGC;EACC;;;AAOD;EACC;EACA;EACA;EACA;EACA;;;AAIF;EACC;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACC;EACI;EACA;EACA;;;AAIN;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AC3CD;EAGC;EACA;ACZD;;AAAA;ACqJA;AAeA;AC2OA;AAyIA;AA+IA;ACvqBA;AA4SA;AA2GA;AChZA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;;AJJA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKD;EACC;EACA;EACA;EACA;EACA;;AAMA;EAEC;;AAED;EACC;EACA;;AAGD;EAAY;;AACZ;EAAU;;AASX;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAKD;EACC;EACA;;AK+BC;ELjCF;IAKE;;;AAKD;EAEA;EAEA;EAGA;EACA;;AKeC;ELvBD;IAYC;IACA;;;AAGD;EACC;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;;AAEA;EAAO;;AAST;EAAiB;;AAGjB;EACC;IAAQ;;;AC5GR;EAAgB;;AAMhB;EAAQ;;AAIT;EACC;EACA;EACA;;AAEA;EAEC;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;;AAGF;EAEC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;AAED;EAEC;EACA;EACA;EACA;EAEA;EACA;EACA;;AAED;EAEC;;AAKF;EACC;;AAED;EACC;;AAED;EAEC;EAEA;;AIUE;EJdH;IAOE;IACA;;;AAED;EACC;EACA;;AAKF;EACC;;AIJE;EJGH;IAIE;;;AAGF;EACC;EACA;;AACA;EAEC;EACA;EACA;EAEA;EACA;;AASF;EACC;;AAED;EACC;;AAKF;EACC;EACA;;AACA;EACC;;AAEA;EACA;;AAED;EACC;;AAEA;EACA;;AAGD;EACC;EACA;EACA;EACA;;AAMA;EAAgB;EAAsB;EAAuB;;AAC9D;EAAa;;AAMb;EACC;EACA;;AACA;EACC;EACA;EACA;;AAOH;EAEC;EACA;EACA;;AAEA;EACC;EACA;;AACA;EACC;EACC;EACD;EACA;EACA;EACA;EACA;EACA;EACA;;AAOH;EAEE;EACA;EACA;EACA;;AAEA;EACC;;AAED;EACC;;AAED;EACC;EAAiB;;AAElB;EAAK;;AACL;EACE;EACD;;AAGD;EAEC;EACA;EACA;;ACvNH;EAEC;EACA;;AAGA;EACA;EACA;EGmCA;EACA;EHlCA;EACA;EACA;;AAEA;EAEC;EACA;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;;AAIA;EACC;;AAKA;EAEC;;AACA;EAAU;;AACV;EACC;EACA;;AAIH;EAEC;EAGA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;;AAKD;EACC;EAEC;;AAIH;EACE;;AAIH;EACC;EACA;EACA;EACA;EAEA;EACA;EACA;EACC;EACD;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;;AAGA;EAEC;;AAID;EACC;EACA;;AAGD;EACC;EACA;EACA;;AAMF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;;AAMH;EACC;;AAMH;EACA;EACA;EACA;;AACA;EAEG;EACA;;AAKF;EACA;EACA;EACA;;AACC;EACC;;AAGD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EAEC;;AG1HA;EH+GD;IAeC;;;AAKD;EAAoB;;AAKrB;EACC;;AACA;EAAY;;AAGb;EACC;EACA;;AAED;EACC;;AAED;EGpLA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;;AH6KA;EGrLA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;;AHkLD;EACA;AAiBA;AAAA;AAAA;AAAA;;AAdA;EACC;EACA;EACA;EACA;EACA;EACA;;AAKD;EACC;;AASD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAID;EACC;EACA;EACA;EACA;EACA;;AAID;EACC;EACA;EACA;EACA;EACA;EAEA;;AAKC;EACC;;AAED;EAAS;;AAET;EACC;;AACD;EAAI;EAAiB;;AAGnB;EAAS;EACP;;AAKL;EAEE;EACA;EACA;EACA;EAEA;;AGlOD;EH2ND;IAUG;IACA;IACA;IACA;;;AAKH;EAEE;EACA;EACD;EACA;;AAEA;EACC;EACA;EACA;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKD;EACE;EAED;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACE;EACF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIF;EACC;;AAED;EAAK;;AACL;EAAI;;AAMN;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AGxUG;EH+TJ;IG/WC;IACA;IACA;IHyXC;IACA;IACA;IACA;IACA;IACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AAIF;EACC;;AACA;EAEC;;AAGF;EACC;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EG1aF;EACA;EACA;;AH4aA;EACC;EACA;;AAED;EACC;;AAEA;EACC;EACA;;AAED;EACC;;AAED;EAEC;EACA;EACA;;AACA;EAGC;EACA;EACA;EACA;EACA;;AAGA;EAGC;EACA;EACE;EACA;EACA;EACF;EACA;;AASF;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EAEC;;AAGF;EAEC;;AAUJ;EAAsB;;AAGrB;EACA;;AAID;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;;AAMA;AAGF;AAAA;AAAA;AAAA;;AAIC;EACC;;AAKF;EAEC;;AAID;EAEE;;AAEA;EAEC;;AAEA;EAEC;EACA;EACA;EACA;EACA;EAEA;EAGA;EAEA;EACA;EACA;EACA;EACA;EACA;AAYH;AAAA;AAAA;AAAA;;AAVG;EAEC;;AAED;EAEC;EACA;EACA;;AAMD;EAEC;EAGA;;AACA;EAEC;;AAIF;EAEC;EACA;EACA;EACA;EACA;;AAEA;EAEC;EACA;EACA;EACA;;AAKH;EAEE;EACA;;AAGH;EAEC;;AACA;EAEC;;AAED;EAAY;;AAOd;EAEC;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;;AAEA;EAAK;;AAGN;EAEE;;AACD;EAEC;EACA;EACA;;AAEA;EACC;;AAED;EAEC;;ACtsBJ;EACC;;AACA;EAAU;;AAGX;EACC;EACA;EAEA;EACA;;AAEA;EAAM;;AACN;EAAY;;AAEV;EAAQ;;AACR;EACC;EACA;;AAKJ;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AASD;EACC;;AEuCG;EFxCJ;IAIE;;;AAED;EACC;EACA;;AAED;EACC;;AAED;EACC;;AAED;EACA;;AAID;EAEC;;AAEA;EACC;;AEcE;EFfH;IAIE;;;AAGF;EAAU;;AEQP;EFRH;IAGE;;;AAOH;EACC;EACA;;AASC;EACC;;AAGF;EAAQ;;AACR;EAAgB;;AAChB;EAAuB;;AACvB;EAA0B;;AAGzB;EACC;;AAIF;EACC;;AAGD;EAA0B;;AACzB;EAAyC;;AAEzC;EACC;;AACC;EACC;;AAKH;EAAiB;EAAoB;;AACrC;EAAQ;;AAER;EAAe;;AE9Cb;EFmDD;IACC;;EACA;IACC;;EAGD;IAAM;;;AAIR;EACC;;AE9DC;EF6DF;IAKG;IACD;IACA;;;AAGF;EACC;;AExEC;EFuEF;IAIE;IACA;;;AAIH;EACC;;AACA;EAAiB;;AElFf;EFgFH;IAKE;;;AAKF;EAAoC;;AACpC;EAAsB;;AAEtB;EACC;EACA;EACA;;AAGC;EAAqB;EAAc;;AACnC;EACC;;AACA;EAAS;EAAiB;;AAC1B;EAA0B;;AAE3B;EAAO;;AACP;EACC;EACA;EACA;EACA;EACA;;AAED;EAAa;EAAiB;EAAc;EAAc;;AAC1D;EAAkB;;AAClB;EAAqB;;AACrB;EACC;EACA;EACA;EACA;EACA;;AAIF;EAAwC;;AACxC;EACE;;AAIH;EAEE;;AAIF;EACE;EACA;;AAQH;EAEC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;;AAMF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;AAIF;EAEC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AE9LE;EFuLH;IAUE;;;AAGF;EACC;;AAID;EAEC;EACA;EACA;;AACA;EACC;;AAIF;EACK;EACD;EACA;;AAML;EACC;EACA;;AACA;EAAS;;AACT;EAAU;;AAGX;EAEC;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;;AAKF;EAGC;EACA;EACA;AACA;AAAA;AAAA;AAAA;AAAA;;AASD;EAEC;;AAEA;EACC;;AAEA;EACC;;AAGF;EAAQ;;AACP;EAA0B;;AAC1B;EACE;EACA;;AAGF;EAEC;;AAED;EACE;EACA;;AAEF;EAAiC;;AAElC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EACC;EACA;;AACA;EACG;EACD;EACA;;AAIH;EAAiB;;AACjB;EACC;;AASH;EACC;EACA;;AAEA;EAAmB;;AACnB;EAAqB;EAAa;;AAClC;EACC;;AAED;EEhYA;EACA;EACA;EFgYC;EACA;EACA;EACA;EACA;;AAOA;EACC;EACA;EACA;;AAED;EACC;EEnZF;EACA;EACA;;AFsZC;EAEA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACA;;AACA;EAEC;EACA;;AAIF;EAEC;EACA;;AAIC;EACA;;AAID;EACC;EACA;EACD;EACC;;AACA;EACC;;AAED;EACC;;AAGD;EACE;EACD;EACA;EACA;EACA;EACC;EACF;;AAGA;EACC;EACA;EACA;;AACD;EACE;;AAIF;EACC;EACA;EAEA;EACA;;AACD;EACE;;AAKF;EACC;EACA;EACA;EACA;EACA;;AAGD;EACC;;AG3dJ;EACE;EAEA,OApCY;EAqCZ;;AAEA;EACE;;AAEA;EACE;;AAGF;EACE,YA3DQ;;AA8DV;EACE;;AAIJ;EAvCA;EACA,QAhBa;EAiBb;EACA,OAnBY;EA0DV,YAtEU;EAuEV;EACA,eApDW;;AAuDb;EAvCA,YAnCY;EAoCZ;EACA,eAnCa;EAoCb;EACA,QApCa;EAqCb,OApCY;EAwEV;EACA;;AAGF;EArDA;EACA,QAhBa;EAiBb;EACA,OAnBY;EAwEV,YApFU;EAqFV;EACA,eAlEW;;AAqEb;EArDA,YAnCY;EAoCZ;EACA,eAnCa;EAoCb;EACA,QApCa;EAqCb,OApCY;;AAwFZ;EAjEA;EACA,QAhBa;EAiBb;EACA,OAnBY;EAmFV;EACA;EACA;EACA;;AAGF;EAEE;EACA;EACA;;AAGF;EAEE,YA9GU;EA+GV;EACA;;AAGF;EA/EA,YAnCY;EAoCZ;EACA,eAnCa;EAoCb;EACA,QApCa;EAqCb,OApCY;EAgHV;;ACxHJ;EACE;;AAEA;EAEC;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;;AAMJ;EACC;EACA;EACA;EACA;;AACA;EACC;;AAEA;EACC;EACA;EACA;;AC7BF;EAEC;;AAEA;EAEC;EACA;EACA;EACA;EACA;;ACXH;EACC;EACA;;AAGD;EACC;EAEA;EACA;;AAEA;EACC;EACA;EACA;;AAKA;EAAa;EAAoB;;AAElC;EAEC;EACA;EACC;EACD;;AACA;EAEC;;AAED;EAEC;;AAOH;EACC;EACA;EJCA;EACA;;AIIC;EAAS;;AACT;EAAS;;AAEV;EACC;;ALpDF;EACC;EACA;;AA8BD;EAEC;;AC8CG;EDhDJ;IAOE;;;AAKD;EACC;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;;AACA;EAAS;;AAEV;EACC;EACA;;AAED;EACC;EACA;EACA;EACA;;AAGF;EACC;EACA;EACA;EACA;EACA;EACA;;AAED;EAGE;EACA;;AAIH;EACC;EACA;EAEA;EACA;;AACA;EACC;;AAWF;EACC;EACA;EACA;EACA;;AAQF;EAEE;EAED;EAGA;;AACA;EACC;EACA;EACA;EAEA;EAEA;;AAGA;EACC;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EAAU;;AACV;EACC;EACA;EACA;EACA;;AAUH;EACC;EACA;EACA;EACA;;AAED;EAAe;;AAKhB;EACC;EACA;EACA;EACA;;AAID;EACC;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;AAqBA;AAAA;AAAA;;AC/IG;ED8GJ;IAeE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;;AAED;EACC;EACC;EAEA;;AAUF;EACC;EACA;;AACA;EAAY;;AAYd;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;EAGA;EAEA;EACA;EAAW;EACX;EAAY;EAEZ;;AAEA;EACC;EACA;EAEA;EAEA;EACA;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EAEA;EAEA;EACA;EACA;EACA;AACD;AAAA;AAAA;AAAA;AAAA;AAAA;;AAMC;EAAK;;AAEJ;EACC;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;;AAED;EACC;EACA;;AAMJ;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACC;;AAIA;EAAkB;EACjB;;AAIF;EACC;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAAe;;AACf;EACC;EACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EAEA;EACA;;AACA;EAAO;;AAMV;EACC;EACC;EACD;EACA;EACA;EACA;EACA;;AAIA;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;;AACA;EACC;EACA;;AAIH;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;;ACnVC;ED2UF;IAWE;;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;;AAEA;EAA6B;;AAC7B;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAEA;EACC;EACA;EACA;EACA;;AAGF;EACC;;AAMH;EACC;EACA;EACA;EACA;;AAWF;EAEC;EACA;;AAEA;EAAuB;;AACtB;EACA;EACA;EAEA;EACA;;AMreD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGC;EAEA;EACC;EAEA;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAA+B;EAA6B;;AAC5D;EACC;;AC9BL;EACC;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEC;EACA;EACA;;AAEA;EAEC;EACA;;AACA;EACC;;AAIF;EACC;;AAED;EACC;EACC;EACA;EACA;EACD;;AAEA;EACA;EACA;;AAGD;EACC;;AAGA;EAEC;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAMH;EACC;EACA;;AAED;EACC;EACA;;AAEC;EACC;EACA;EACA;EACA;EACA;EACA;;AAML;EACC;IACC;;;AC7EA;EACC;EACA;;AAGF;EACE;EACA;EACD;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAIH;EACC;EACA;EACA;;AAEA;EACE;EACA;;AAKH;EACE;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;;AAEA;EACK;;AAEL;EACC;;AAED;EACC;EACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;;AACG;EACC;EACA;EACA;;AAKL;EACG;;AAEH;EACC;EACA;;AAMH;EAAM;;AACN;EACC;EACA;EACA;EACA;;AAGD;EAAM;;AACN;EAAO;;AAGR;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACC;EACA;EACC;EACA;;AAIF;EACE;;AAGF;EAEE;EACA;EACA;EACC;EACD;;APnEC;EO6DH;IAUG;IAEA;;;AAKH;EACE;;AAGF;EACE;EACA;;AAGF;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE;;AAGD;EACE;EACA;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;ACzMN;EACI;;AACA;EACE;;AAIH;EAAK;EAAuB;EAAiB;;AAC5C;EACE;EACA;EACA;;AAEF;EAAK;;AACL;EAAU;;AAGd;EACE;;AAGF;EACI;EACA;;AACA;EAAK;;AACL;EACI;EACA;EACA;;AAIR;EACI;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA","file":"style.css"}
|
assets/integrations/shortcake/assets/banner.png
DELETED
Binary file
|
assets/integrations/shortcake/class-field-maxbutton.php
DELETED
@@ -1,136 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace MaxButtons;
|
3 |
-
defined('ABSPATH') or die('No direct access permitted');
|
4 |
-
// Maxbutton field class
|
5 |
-
|
6 |
-
class Shortcake_Field_MaxButton
|
7 |
-
{
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Shortcake Color Field controller instance.
|
11 |
-
*
|
12 |
-
* @access private
|
13 |
-
* @var object
|
14 |
-
*/
|
15 |
-
private static $instance;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* All registered post fields.
|
19 |
-
*
|
20 |
-
* @access private
|
21 |
-
* @var array
|
22 |
-
*/
|
23 |
-
private $post_fields = array();
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Settings for the Color Field.
|
27 |
-
*
|
28 |
-
* @access private
|
29 |
-
* @var array
|
30 |
-
*/
|
31 |
-
private $fields = array(
|
32 |
-
'MaxButton' => array(
|
33 |
-
'template' => 'fusion-shortcake-field-maxbutton',
|
34 |
-
'view' => 'editAttributeFieldMaxButton',
|
35 |
-
),
|
36 |
-
);
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Get instance of Shortcake Color Field controller.
|
40 |
-
*
|
41 |
-
* Instantiates object on the fly when not already loaded.
|
42 |
-
*
|
43 |
-
* @return object
|
44 |
-
*/
|
45 |
-
public static function get_instance() {
|
46 |
-
if ( ! isset( self::$instance ) ) {
|
47 |
-
self::$instance = new self;
|
48 |
-
self::$instance->setup_actions();
|
49 |
-
}
|
50 |
-
return self::$instance;
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Set up actions needed for Color Field
|
55 |
-
*/
|
56 |
-
private function setup_actions() {
|
57 |
-
add_filter( 'shortcode_ui_fields', array( $this, 'filter_shortcode_ui_fields' ) );
|
58 |
-
add_action( 'shortcode_ui_loaded_editor', array( $this, 'load_template' ) );
|
59 |
-
add_action( 'enqueue_shortcode_ui', array( $this, 'action_enqueue_shortcode_maxbutton' ), 99 );
|
60 |
-
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Whether or not the color attribute is present in registered shortcode UI
|
65 |
-
*
|
66 |
-
* @return bool
|
67 |
-
*/
|
68 |
-
private function maxbutton_attribute_present() {
|
69 |
-
|
70 |
-
foreach ( \Shortcode_UI::get_instance()->get_shortcodes() as $shortcode ) {
|
71 |
-
|
72 |
-
if ( empty( $shortcode['attrs'] ) ) {
|
73 |
-
continue;
|
74 |
-
}
|
75 |
-
|
76 |
-
foreach ( $shortcode['attrs'] as $attribute ) {
|
77 |
-
if ( empty( $attribute['type'] ) ) {
|
78 |
-
continue;
|
79 |
-
}
|
80 |
-
|
81 |
-
if ( 'MaxButton' === $attribute['type'] ) {
|
82 |
-
return true;
|
83 |
-
}
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
return false;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Add Color Field settings to Shortcake fields
|
92 |
-
*
|
93 |
-
* @param array $fields
|
94 |
-
* @return array
|
95 |
-
*/
|
96 |
-
public function filter_shortcode_ui_fields( $fields ) {
|
97 |
-
return array_merge( $fields, $this->fields );
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Output templates used by the color field.
|
102 |
-
*/
|
103 |
-
public function load_template() {
|
104 |
-
|
105 |
-
if ( ! $this->maxbutton_attribute_present() ) {
|
106 |
-
return;
|
107 |
-
}
|
108 |
-
|
109 |
-
?>
|
110 |
-
|
111 |
-
<script type="text/html" id="tmpl-fusion-shortcake-field-maxbutton">
|
112 |
-
<div class="field-block shortcode-ui-field-maxbutton shortcode-ui-attribute-{{ data.attr }}">
|
113 |
-
<button class="button-primary maxbutton_media_button" type="button" data-nonce="{{ data.nonce }}" name="{{ data.attr }}" value="{{ data.value }}">{{data.meta.select}}</button>
|
114 |
-
<p class='button_preview'> </p>
|
115 |
-
|
116 |
-
|
117 |
-
<input id='{{ data.attr }}' type='hidden' name='button_id' value='' >
|
118 |
-
<# if ( typeof data.description == 'string' ) { #>
|
119 |
-
<p class="description">{{{ data.description }}}</p>
|
120 |
-
<# } #>
|
121 |
-
</div>
|
122 |
-
</script>
|
123 |
-
|
124 |
-
<?php
|
125 |
-
}
|
126 |
-
|
127 |
-
public function action_enqueue_shortcode_maxbutton()
|
128 |
-
{
|
129 |
-
|
130 |
-
wp_enqueue_script('maxbutton-shortcake', MB()->get_plugin_url() . 'assets/integrations/shortcake/edit-attribute-field-maxbutton.js',
|
131 |
-
array('jquery','backbone','mce-view', 'shortcode-ui-js-hooks','shortcode-ui'), null, true);
|
132 |
-
//wp_localize_script( 'maxbutton-shortcake', 'shortcodeUIFieldData', $this->fields );
|
133 |
-
|
134 |
-
}
|
135 |
-
|
136 |
-
} // class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/integrations/shortcake/edit-attribute-field-maxbutton.js
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
( function( $ ) {
|
2 |
-
|
3 |
-
|
4 |
-
var sui = window.Shortcode_UI;
|
5 |
-
//var construct = sui.utils.shortcodeViewConstructor;
|
6 |
-
|
7 |
-
sui.views.editAttributeFieldMaxButton = sui.views.editAttributeField.extend( {
|
8 |
-
|
9 |
-
updateButton: function(id)
|
10 |
-
{
|
11 |
-
|
12 |
-
this.setValue(id);
|
13 |
-
var preview = this.$el.find('.button_preview');
|
14 |
-
|
15 |
-
var query = [{
|
16 |
-
counter: 1,
|
17 |
-
post_id: $( '#post_ID' ).val(),
|
18 |
-
shortcode: this.shortcode.formatShortcode(),
|
19 |
-
}];
|
20 |
-
|
21 |
-
// provisional
|
22 |
-
wp.ajax.post( 'bulk_do_shortcode', {
|
23 |
-
queries: query,
|
24 |
-
nonce: shortcodeUIData.nonces.preview,
|
25 |
-
}).done( function( response ) {
|
26 |
-
var button = response[1].response;
|
27 |
-
preview.html(button);
|
28 |
-
})
|
29 |
-
|
30 |
-
},
|
31 |
-
|
32 |
-
render: function ()
|
33 |
-
{
|
34 |
-
|
35 |
-
var self = this;
|
36 |
-
//var maxMedia = window.maxFoundry.maxMedia;
|
37 |
-
this.cake_mm = new window.maxFoundry.maxMedia();
|
38 |
-
|
39 |
-
this.cake_mm.init({callback: $.proxy(this.callback, this), useShortCodeOptions: false});
|
40 |
-
//cake_mm.openModal();
|
41 |
-
|
42 |
-
var data = jQuery.extend( {
|
43 |
-
id: 'shortcode-ui-' + this.model.get( 'attr' ) + '-' + this.model.cid,
|
44 |
-
}, this.model.toJSON() );
|
45 |
-
|
46 |
-
//maxMedia.setCallback( $.proxy(this.updateButton, this) );
|
47 |
-
|
48 |
-
this.$el.html( this.template( data ) );
|
49 |
-
//this.triggerCallbacks();
|
50 |
-
|
51 |
-
$(document).on('click', '.maxbutton_media_button', $.proxy(function(e)
|
52 |
-
{
|
53 |
-
e.preventDefault();
|
54 |
-
this.cake_mm.openModal();
|
55 |
-
$('.media-modal, .media-modal-backdrop').hide();
|
56 |
-
},this));
|
57 |
-
|
58 |
-
|
59 |
-
$(document).on('modal_close', function ()
|
60 |
-
{
|
61 |
-
$('.media-modal, .media-modal-backdrop').show();
|
62 |
-
});
|
63 |
-
|
64 |
-
this.updateButton( this.model.get( 'value' ) );
|
65 |
-
|
66 |
-
return this;
|
67 |
-
},
|
68 |
-
|
69 |
-
callback: function(id)
|
70 |
-
{
|
71 |
-
this.updateButton(id);
|
72 |
-
this.cake_mm.close();
|
73 |
-
$('.media-modal, .media-modal-backdrop').show();
|
74 |
-
}
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
}); // extend
|
79 |
-
|
80 |
-
} )( jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/integrations/shortcake/shortcake.php
DELETED
@@ -1,131 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace MaxButtons;
|
3 |
-
defined('ABSPATH') or die('No direct access permitted');
|
4 |
-
|
5 |
-
class mbCake
|
6 |
-
{
|
7 |
-
|
8 |
-
public static function init()
|
9 |
-
{
|
10 |
-
add_action('register_shortcode_ui', array(maxUtils::namespaceit('mbCake'), 'register'));
|
11 |
-
add_action('init', array(maxUtils::namespaceit('mbCake'), 'initField'));
|
12 |
-
add_action('shortcode_ui_after_do_shortcode', array(maxUtils::namespaceit('mbCake'), 'shortcode'));
|
13 |
-
|
14 |
-
// Load FA within TinyMCE
|
15 |
-
// add_action('admin_enqueue_scripts', array(maxUtils::namespaceit('mbCake'), 'editor_styles')) ;
|
16 |
-
|
17 |
-
}
|
18 |
-
|
19 |
-
public static function initField()
|
20 |
-
{
|
21 |
-
//MB()->get_plugin_path()
|
22 |
-
$integration_path = MB()->get_plugin_path() . 'assets/integrations/';
|
23 |
-
require_once($integration_path . 'shortcake/class-field-maxbutton.php');
|
24 |
-
|
25 |
-
Shortcake_Field_MaxButton::get_instance();
|
26 |
-
|
27 |
-
}
|
28 |
-
|
29 |
-
public static function shortcode($shortcode)
|
30 |
-
{
|
31 |
-
|
32 |
-
if (strpos ($shortcode, 'maxbutton') === false)
|
33 |
-
return; // not our shorts
|
34 |
-
|
35 |
-
|
36 |
-
// style controls the output - if set to something else assume css is there.
|
37 |
-
if (strpos ( $shortcode, 'style') === false)
|
38 |
-
{
|
39 |
-
preg_match('/id=?("|\'|)([0-9]+)/i', $shortcode, $match);
|
40 |
-
if (count($match) == 0)
|
41 |
-
return; // happens when adding new button from shortcake
|
42 |
-
|
43 |
-
$button_id = $match[2];
|
44 |
-
|
45 |
-
$button = MB()->getClass('button');
|
46 |
-
$button->set($button_id);
|
47 |
-
|
48 |
-
$button->parse_button();
|
49 |
-
$button->parse_css('preview');
|
50 |
-
$button->display_css();
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
|
55 |
-
public static function register()
|
56 |
-
{
|
57 |
-
|
58 |
-
shortcode_ui_register_for_shortcode( 'maxbutton',
|
59 |
-
array(
|
60 |
-
/*
|
61 |
-
* How the shortcode should be labeled in the UI. Required argument.
|
62 |
-
*/
|
63 |
-
'label' => esc_html__( 'MaxButtons', 'maxbuttons' ),
|
64 |
-
/*
|
65 |
-
* Include an icon with your shortcode. Optional.
|
66 |
-
* Use a dashicon, or full URL to image.
|
67 |
-
*/
|
68 |
-
'listItemImage' => '<img src="' . MB()->get_plugin_url() . 'assets/integrations/shortcake/assets/banner.png">',
|
69 |
-
//'dashicons-editor-quote',
|
70 |
-
/*
|
71 |
-
* Limit this shortcode UI to specific posts. Optional.
|
72 |
-
*/
|
73 |
-
//'post_type' => array( 'post' ),
|
74 |
-
|
75 |
-
/*
|
76 |
-
* Register UI for the "inner content" of the shortcode. Optional.
|
77 |
-
* If no UI is registered for the inner content, then any inner content
|
78 |
-
* data present will be backed up during editing.
|
79 |
-
*/
|
80 |
-
/*
|
81 |
-
* Register UI for attributes of the shortcode. Optional.
|
82 |
-
*
|
83 |
-
* If no UI is registered for an attribute, then the attribute will
|
84 |
-
* not be editable through Shortcake's UI. However, the value of any
|
85 |
-
* unregistered attributes will be preserved when editing.
|
86 |
-
*
|
87 |
-
* Each array must include 'attr', 'type', and 'label'.
|
88 |
-
* 'attr' should be the name of the attribute.
|
89 |
-
* 'type' options include: text, checkbox, textarea, radio, select, email,
|
90 |
-
* url, number, and date, post_select, attachment, color.
|
91 |
-
* Use 'meta' to add arbitrary attributes to the HTML of the field.
|
92 |
-
* Use 'encode' to encode attribute data. Requires customization to callback to decode.
|
93 |
-
* Depending on 'type', additional arguments may be available.
|
94 |
-
*/
|
95 |
-
'attrs' => array(
|
96 |
-
|
97 |
-
array(
|
98 |
-
'label' => esc_html__( 'Button', 'maxbuttons' ),
|
99 |
-
'attr' => 'id',
|
100 |
-
'type' => 'MaxButton',
|
101 |
-
'nonce' => wp_create_nonce('maxajax'),
|
102 |
-
'meta' => array('select' => __("Select a button","maxbuttons")),
|
103 |
-
|
104 |
-
),
|
105 |
-
array(
|
106 |
-
'label' => esc_html__( 'Custom URL [optional]', 'maxbuttons' ),
|
107 |
-
'attr' => 'url',
|
108 |
-
'type' => 'url',
|
109 |
-
'encode' => true,
|
110 |
-
'meta' => array(
|
111 |
-
'placeholder' => esc_html__( 'http://', '' ),
|
112 |
-
'data-test' => 1,
|
113 |
-
),
|
114 |
-
),
|
115 |
-
array(
|
116 |
-
'label' => esc_html__( 'Custom Text [optional]', 'maxbuttons' ),
|
117 |
-
'attr' => 'text',
|
118 |
-
'type' => 'text',
|
119 |
-
'query' => array( 'post_type' => 'page' ),
|
120 |
-
|
121 |
-
),
|
122 |
-
),
|
123 |
-
)
|
124 |
-
);
|
125 |
-
|
126 |
-
|
127 |
-
}
|
128 |
-
|
129 |
-
}
|
130 |
-
|
131 |
-
mbCake::init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/scss/_editor.scss
CHANGED
@@ -175,9 +175,10 @@
|
|
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 |
-
[data-show]
|
179 |
{
|
180 |
-
|
|
|
181 |
}
|
182 |
|
183 |
// option-design should dissapear
|
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 |
+
[data-show]:not(.condshow), .option[data-show]:not(.condshow)
|
179 |
{
|
180 |
+
opacity: 0;
|
181 |
+
display: none;
|
182 |
}
|
183 |
|
184 |
// option-design should dissapear
|
blocks/color.php
CHANGED
@@ -88,7 +88,7 @@ class colorBlock extends maxBlock
|
|
88 |
|
89 |
"icon_color_hover" => array( "default" => '#2b469e',
|
90 |
"css" => "color",
|
91 |
-
"csspart" => "mb-icon-hover",
|
92 |
"csspseudo" => "hover",
|
93 |
'cssvalidate' => 'checkColor',
|
94 |
),
|
88 |
|
89 |
"icon_color_hover" => array( "default" => '#2b469e',
|
90 |
"css" => "color",
|
91 |
+
"csspart" => "mb-icon,mb-icon-hover",
|
92 |
"csspseudo" => "hover",
|
93 |
'cssvalidate' => 'checkColor',
|
94 |
),
|
classes/integrations.php
CHANGED
@@ -28,7 +28,6 @@ class maxIntegrations
|
|
28 |
{
|
29 |
$integration_path = MB()->get_plugin_path() . 'assets/integrations/';
|
30 |
require_once( $integration_path . "siteorigins_builder/sitebuilder.php");
|
31 |
-
require_once( $integration_path . "shortcake/shortcake.php");
|
32 |
require_once( $integration_path . "gutenberg/gutenberg.php");
|
33 |
require_once( $integration_path . "cache/cache.php");
|
34 |
require_once( $integration_path . "tablepress/tablepress.php");
|
28 |
{
|
29 |
$integration_path = MB()->get_plugin_path() . 'assets/integrations/';
|
30 |
require_once( $integration_path . "siteorigins_builder/sitebuilder.php");
|
|
|
31 |
require_once( $integration_path . "gutenberg/gutenberg.php");
|
32 |
require_once( $integration_path . "cache/cache.php");
|
33 |
require_once( $integration_path . "tablepress/tablepress.php");
|
includes/maxbuttons-button.php
CHANGED
@@ -52,7 +52,7 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
|
52 |
<?php _e('To use this button, place the following shortcode anywhere you want it to appear in your site content:', 'maxbuttons') ?>
|
53 |
<strong>[maxbutton id="<?php echo $button_id ?>"]</strong>
|
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"); ?>
|
@@ -78,6 +78,8 @@ $admin->get_header(array("title" => $page_title, "title_action" => $action) );
|
|
78 |
[maxbutton id="<?php echo $button_id ?>" text="yourtext" url="http://yoururl" linktitle="tooltip" window="new" nofollow="true" extraclass="extra"]
|
79 |
</p>
|
80 |
|
|
|
|
|
81 |
<h4><?php _e("More tips","maxbuttons"); ?></h4>
|
82 |
<p><?php _e("If you use this button on a static page, on multiple pages, or upload your theme to another WordPress installation choose an unique name and use ",
|
83 |
"maxbuttons"); ?> <strong>[maxbutton name='my-buy-button' url='http://yoururl']</strong>.
|
52 |
<?php _e('To use this button, place the following shortcode anywhere you want it to appear in your site content:', 'maxbuttons') ?>
|
53 |
<strong>[maxbutton id="<?php echo $button_id ?>"]</strong>
|
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"); ?>
|
78 |
[maxbutton id="<?php echo $button_id ?>" text="yourtext" url="http://yoururl" linktitle="tooltip" window="new" nofollow="true" extraclass="extra"]
|
79 |
</p>
|
80 |
|
81 |
+
<p><?php _e('You can find most of these options in the dialogs you can access in classic editor, Gutenberg and various pagebuilders so you don\'t need to memorize.', 'maxbuttons'); ?> </p>
|
82 |
+
|
83 |
<h4><?php _e("More tips","maxbuttons"); ?></h4>
|
84 |
<p><?php _e("If you use this button on a static page, on multiple pages, or upload your theme to another WordPress installation choose an unique name and use ",
|
85 |
"maxbuttons"); ?> <strong>[maxbutton name='my-buy-button' url='http://yoururl']</strong>.
|
js/maxbuttons-admin.js
CHANGED
@@ -503,13 +503,12 @@ maxAdmin.prototype.updateConditional = function (event)
|
|
503 |
|
504 |
if (cond_values.indexOf(value) >= 0)
|
505 |
{
|
506 |
-
|
507 |
-
$(cond_child).fadeTo('fast',1);
|
508 |
$(cond_child).find('input, select').trigger('change');
|
509 |
}
|
510 |
else
|
511 |
{
|
512 |
-
|
513 |
$(cond_child).find('input, select').trigger('change');
|
514 |
}
|
515 |
}
|
@@ -540,16 +539,16 @@ maxAdmin.prototype.updateHasConditional = function(event)
|
|
540 |
hascond = true;
|
541 |
}
|
542 |
else {
|
543 |
-
|
544 |
}
|
545 |
|
546 |
if (hascond)
|
547 |
{
|
548 |
-
|
549 |
}
|
550 |
else
|
551 |
{
|
552 |
-
|
553 |
}
|
554 |
|
555 |
}
|
503 |
|
504 |
if (cond_values.indexOf(value) >= 0)
|
505 |
{
|
506 |
+
$(cond_child).addClass('condshow').animate({'opacity': 1}, 300);
|
|
|
507 |
$(cond_child).find('input, select').trigger('change');
|
508 |
}
|
509 |
else
|
510 |
{
|
511 |
+
$(cond_child).animate({'opacity': 0}, 300, function () { $(cond_child).removeClass('condshow')});
|
512 |
$(cond_child).find('input, select').trigger('change');
|
513 |
}
|
514 |
}
|
539 |
hascond = true;
|
540 |
}
|
541 |
else {
|
542 |
+
hascond = false
|
543 |
}
|
544 |
|
545 |
if (hascond)
|
546 |
{
|
547 |
+
$(cond_child).addClass('condshow').animate({'opacity': 1}, 300);
|
548 |
}
|
549 |
else
|
550 |
{
|
551 |
+
$(cond_child).animate({'opacity': 0}, 300, function () { $(cond_child).removeClass('condshow')});
|
552 |
}
|
553 |
|
554 |
}
|
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(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).fadeTo("fast",1),$(a).find("input, select").trigger("change")):($(a).fadeTo("fast",0),$(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).fadeTo("fast",1):$(a).fadeTo("fast",0)},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",-1==window.ajaxurl.indexOf("ajax_maxbuttons")&&(window.ajaxurl=window.ajaxurl+"?ajax_maxbuttons=editor"),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")};
|
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).addClass("condshow").animate({opacity:1},300),$(a).find("input, select").trigger("change")):($(a).animate({opacity:0},300,function(){$(a).removeClass("condshow")}),$(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).addClass("condshow").animate({opacity:1},300):$(a).animate({opacity:0},300,function(){$(a).removeClass("condshow")})},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",-1==window.ajaxurl.indexOf("ajax_maxbuttons")&&(window.ajaxurl=window.ajaxurl+"?ajax_maxbuttons=editor"),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")};
|
maxbuttons.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: MaxButtons
|
4 |
Plugin URI: http://maxbuttons.com
|
5 |
Description: The best WordPress button generator. This is the free version; the Pro version <a href="http://maxbuttons.com/?ref=mbfree">can be found here</a>.
|
6 |
-
Version: 8.
|
7 |
Author: Max Foundry
|
8 |
Author URI: http://maxfoundry.com
|
9 |
Text Domain: maxbuttons
|
@@ -16,9 +16,9 @@ namespace MaxButtons;
|
|
16 |
if (! defined('MAXBUTTONS_ROOT_FILE'))
|
17 |
define("MAXBUTTONS_ROOT_FILE", __FILE__);
|
18 |
if (! defined('MAXBUTTONS_VERSION_NUM'))
|
19 |
-
define('MAXBUTTONS_VERSION_NUM', '8.
|
20 |
|
21 |
-
define('MAXBUTTONS_RELEASE',"
|
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.7
|
7 |
Author: Max Foundry
|
8 |
Author URI: http://maxfoundry.com
|
9 |
Text Domain: maxbuttons
|
16 |
if (! defined('MAXBUTTONS_ROOT_FILE'))
|
17 |
define("MAXBUTTONS_ROOT_FILE", __FILE__);
|
18 |
if (! defined('MAXBUTTONS_VERSION_NUM'))
|
19 |
+
define('MAXBUTTONS_VERSION_NUM', '8.7');
|
20 |
|
21 |
+
define('MAXBUTTONS_RELEASE',"15 July 2021");
|
22 |
|
23 |
if (! function_exists('MaxButtons\maxbutton_double_load'))
|
24 |
{
|
readme.txt
CHANGED
@@ -4,8 +4,7 @@ Tags: wordpress button plugin, share button, wordpress buttons, css3 button gene
|
|
4 |
Requires at least: 4.8
|
5 |
Tested up to: 5.8
|
6 |
Requires PHP: 7.0
|
7 |
-
Stable tag: 8.
|
8 |
-
|
9 |
WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
|
10 |
|
11 |
== Description ==
|
@@ -269,6 +268,11 @@ Secondly, please use latin only characters for button name ( Basic settings) and
|
|
269 |
|
270 |
== Changelog ==
|
271 |
|
|
|
|
|
|
|
|
|
|
|
272 |
= 8.6 =
|
273 |
|
274 |
* Fixed notices on argument order ( PHP8+ )
|
@@ -276,7 +280,7 @@ Secondly, please use latin only characters for button name ( Basic settings) and
|
|
276 |
* Updated Alpha Color picker to version 3
|
277 |
* Fix - When 'add button' is hidden in classic editor, would cause issue with Gutenberg.
|
278 |
* Fix - If a widget would load calendar during init time, could trigger a fatal error.
|
279 |
-
* End of support for PHP 5.x.
|
280 |
|
281 |
= 8.5 =
|
282 |
|
4 |
Requires at least: 4.8
|
5 |
Tested up to: 5.8
|
6 |
Requires PHP: 7.0
|
7 |
+
Stable tag: 8.7
|
|
|
8 |
WordPress button plugin so powerful and easy to use anyone can create beautiful buttons, share buttons and social icons.
|
9 |
|
10 |
== Description ==
|
268 |
|
269 |
== Changelog ==
|
270 |
|
271 |
+
= 8.7 =
|
272 |
+
|
273 |
+
* Removed Shortcake integration
|
274 |
+
* Fix - Hidden items would still take space when invisible
|
275 |
+
|
276 |
= 8.6 =
|
277 |
|
278 |
* Fixed notices on argument order ( PHP8+ )
|
280 |
* Updated Alpha Color picker to version 3
|
281 |
* Fix - When 'add button' is hidden in classic editor, would cause issue with Gutenberg.
|
282 |
* Fix - If a widget would load calendar during init time, could trigger a fatal error.
|
283 |
+
* End of support for PHP 5.x. Minimum PHP version is now 7.0
|
284 |
|
285 |
= 8.5 =
|
286 |
|