Version Description
Download this release
Release Info
Developer | pickplugins |
Plugin | Accordion |
Version | 1.0.30 |
Comparing to | |
See all releases |
Code changes from version 2.2.54 to 1.0.30
- accordions.php +2 -2
- assets/settings-tabs/settings-tabs.css +124 -109
- assets/settings-tabs/settings-tabs.js +193 -193
- includes/class-post-meta-accordions-hook.php +569 -563
- includes/class-settings-tabs.php +8 -12
- readme.txt +5 -1
accordions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Accordions by PickPlugins
|
4 |
Plugin URI: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
|
5 |
Description: Fully responsive and mobile ready accordion grid for wordpress.
|
6 |
-
Version: 2.2.
|
7 |
Author: PickPlugins
|
8 |
Author URI: http://pickplugins.com
|
9 |
Text Domain: accordions
|
@@ -23,7 +23,7 @@ class Accordions
|
|
23 |
|
24 |
define('accordions_plugin_url', plugins_url('/', __FILE__));
|
25 |
define('accordions_plugin_dir', plugin_dir_path(__FILE__));
|
26 |
-
define('accordions_version', '2.2.
|
27 |
define('accordions_plugin_name', 'Accordions');
|
28 |
define('accordions_plugin_basename', plugin_basename(__FILE__));
|
29 |
|
3 |
Plugin Name: Accordions by PickPlugins
|
4 |
Plugin URI: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
|
5 |
Description: Fully responsive and mobile ready accordion grid for wordpress.
|
6 |
+
Version: 2.2.55
|
7 |
Author: PickPlugins
|
8 |
Author URI: http://pickplugins.com
|
9 |
Text Domain: accordions
|
23 |
|
24 |
define('accordions_plugin_url', plugins_url('/', __FILE__));
|
25 |
define('accordions_plugin_dir', plugin_dir_path(__FILE__));
|
26 |
+
define('accordions_version', '2.2.55');
|
27 |
define('accordions_plugin_name', 'Accordions');
|
28 |
define('accordions_plugin_basename', plugin_basename(__FILE__));
|
29 |
|
assets/settings-tabs/settings-tabs.css
CHANGED
@@ -4,21 +4,22 @@
|
|
4 |
|
5 |
/*General CSS*/
|
6 |
|
7 |
-
.settings-tabs .float-right{
|
8 |
float: right;
|
9 |
}
|
10 |
|
11 |
-
.settings-tabs .float-left{
|
12 |
float: right;
|
13 |
}
|
14 |
|
15 |
-
.settings-tabs .float-none{
|
16 |
float: right;
|
17 |
}
|
18 |
|
19 |
|
20 |
-
.settings-tabs .loading{}
|
21 |
-
|
|
|
22 |
padding: 15px 20px;
|
23 |
}
|
24 |
|
@@ -26,27 +27,29 @@
|
|
26 |
|
27 |
/* Collapsible */
|
28 |
|
29 |
-
.settings-tabs .collapsible{
|
30 |
margin-bottom: 2px;
|
31 |
}
|
32 |
-
|
|
|
33 |
background: #eee;
|
34 |
padding: 8px 10px;
|
|
|
35 |
}
|
36 |
|
37 |
-
.settings-tabs .collapsible .header span{
|
38 |
display: inline-block;
|
39 |
vertical-align: middle;
|
40 |
}
|
41 |
|
42 |
-
.settings-tabs .collapsible .content{
|
43 |
display: none;
|
44 |
padding: 10px;
|
45 |
background: #f1f1f1;
|
46 |
}
|
47 |
|
48 |
|
49 |
-
.settings-tabs .collapsible.active .content{
|
50 |
display: block;
|
51 |
}
|
52 |
|
@@ -56,22 +59,24 @@
|
|
56 |
|
57 |
|
58 |
|
59 |
-
.settings-tabs{
|
60 |
background: #fff;
|
61 |
margin: 25px 0;
|
62 |
}
|
63 |
|
64 |
-
.settings-tabs.vertical{
|
65 |
position: relative;
|
66 |
}
|
67 |
-
|
|
|
68 |
float: left;
|
69 |
margin: 0;
|
70 |
padding: 0;
|
71 |
position: sticky;
|
72 |
top: 32px;
|
73 |
}
|
74 |
-
|
|
|
75 |
width: 200px;
|
76 |
padding: 12px 10px;
|
77 |
background: #f1f1f1;
|
@@ -81,8 +86,8 @@
|
|
81 |
font-size: 13px;
|
82 |
}
|
83 |
|
84 |
-
.settings-tabs .tab-nav.active{
|
85 |
-
background
|
86 |
}
|
87 |
|
88 |
.settings-tabs .tab-nav .pro-feature {
|
@@ -94,30 +99,30 @@
|
|
94 |
width: 25px;
|
95 |
color: #b7b7b7;
|
96 |
}
|
|
|
97 |
.tab-nav.active i {
|
98 |
color: #333;
|
99 |
}
|
100 |
-
|
|
|
101 |
margin-left: 220px;
|
102 |
padding: 0px 0;
|
103 |
background: #f1f1f159;
|
104 |
display: none;
|
105 |
}
|
106 |
|
107 |
-
.settings-tabs .tab-content.active{
|
108 |
display: block;
|
109 |
}
|
110 |
|
111 |
-
.settings-tabs.has-right-panel{
|
112 |
-
|
113 |
-
}
|
114 |
|
115 |
.settings-tabs.has-right-panel .tab-content {
|
116 |
margin-right: 280px;
|
117 |
}
|
118 |
|
119 |
|
120 |
-
.settings-tabs-right-panel{
|
121 |
width: 250px;
|
122 |
float: right;
|
123 |
padding: 15px;
|
@@ -125,41 +130,39 @@
|
|
125 |
background: #fff;
|
126 |
}
|
127 |
|
128 |
-
.settings-tabs-right-panel .right-panel-content{
|
129 |
display: none;
|
130 |
}
|
131 |
|
132 |
-
.settings-tabs-right-panel .right-panel-content.active{
|
133 |
display: block;
|
134 |
}
|
135 |
|
136 |
|
137 |
/*horizontal*/
|
138 |
|
139 |
-
.settings-tabs.horizontal{
|
140 |
-
|
141 |
-
}
|
142 |
|
143 |
-
.settings-tabs.horizontal .tab-navs{
|
144 |
float: none;
|
145 |
position: relative;
|
146 |
top: 0;
|
147 |
padding: 0 20px;
|
148 |
}
|
149 |
|
150 |
-
.settings-tabs.horizontal .tab-navs .tab-nav{
|
151 |
display: inline-block;
|
152 |
float: left;
|
153 |
width: auto;
|
154 |
border-right: 1px solid #ddd;
|
155 |
}
|
156 |
|
157 |
-
.settings-tabs.horizontal .tab-navs .tab-nav:last-child{
|
158 |
-
border-right: 1px solid rgba(0,0,0,0);
|
159 |
}
|
160 |
|
161 |
|
162 |
-
.settings-tabs.horizontal .tab-content{
|
163 |
margin-left: 0;
|
164 |
/*clear: both;*/
|
165 |
padding: 0 20px;
|
@@ -180,79 +183,84 @@
|
|
180 |
|
181 |
|
182 |
|
183 |
-
.settings-tabs .section{
|
184 |
margin: 0;
|
185 |
padding: 15px 0;
|
186 |
}
|
187 |
-
|
|
|
188 |
padding: 0 15px;
|
189 |
font-size: 16px;
|
190 |
font-weight: 600;
|
191 |
}
|
192 |
|
193 |
-
.settings-tabs .section-description{
|
194 |
padding: 0 15px;
|
195 |
margin-bottom: 25px;
|
196 |
}
|
197 |
|
198 |
|
199 |
|
200 |
-
.settings-tabs .setting-field{
|
201 |
border-bottom: 1px solid #eee;
|
202 |
padding: 15px;
|
203 |
}
|
204 |
-
.settings-tabs .setting-field:last-child{
|
205 |
|
206 |
-
}
|
207 |
|
208 |
|
209 |
|
210 |
-
.settings-tabs .setting-field .field-lable{
|
211 |
width: 270px;
|
212 |
float: left;
|
213 |
font-size: 14px;
|
214 |
word-break: break-word;
|
215 |
}
|
216 |
-
|
|
|
217 |
margin-left: 270px;
|
218 |
}
|
219 |
-
|
|
|
220 |
word-break: break-word;
|
221 |
}
|
222 |
|
223 |
-
.settings-tabs .setting-field .setting-field{
|
224 |
padding: 0 15px 15px 0px;
|
225 |
}
|
226 |
-
|
|
|
227 |
|
228 |
float: none;
|
229 |
}
|
230 |
|
231 |
-
.settings-tabs .setting-field .setting-field .field-input{
|
232 |
margin-left: 0px;
|
233 |
}
|
234 |
|
235 |
|
236 |
-
.settings-tabs .expandable .setting-field{
|
237 |
padding: 0 15px 15px 0px;
|
238 |
}
|
239 |
-
|
|
|
240 |
float: left;
|
241 |
}
|
242 |
|
243 |
-
.settings-tabs .expandable .setting-field .field-input{
|
244 |
margin-left: 270px;
|
245 |
}
|
246 |
|
247 |
|
248 |
-
.settings-tabs .expandable .setting-field{
|
249 |
padding: 0 15px 15px 0px;
|
250 |
}
|
251 |
-
|
|
|
252 |
float: none;
|
253 |
}
|
254 |
|
255 |
-
.settings-tabs .expandable .setting-field .setting-field .field-input{
|
256 |
margin-left: 0px;
|
257 |
}
|
258 |
|
@@ -260,33 +268,34 @@
|
|
260 |
background: #ff3f3f1a;
|
261 |
}
|
262 |
|
263 |
-
.settings-tabs .field-error .error-details{
|
264 |
color: #c11f1f;
|
265 |
}
|
266 |
|
267 |
/*field-repeatable-wrapper*/
|
268 |
|
269 |
-
.settings-tabs .field-media-wrapper .media-upload,
|
|
|
270 |
display: inline-block;
|
271 |
background: #ddd;
|
272 |
padding: 2px 10px;
|
273 |
border-radius: 3px;
|
274 |
border: 1px solid #999;
|
275 |
}
|
276 |
-
|
|
|
277 |
margin-bottom: 5px;
|
278 |
padding-bottom: 0px;
|
279 |
}
|
280 |
|
281 |
|
282 |
-
.field-repeatable-wrapper .field-list{
|
283 |
margin-top: 18px;
|
284 |
}
|
285 |
-
.field-repeatable-wrapper .button{
|
286 |
|
287 |
-
}
|
288 |
|
289 |
-
.field-repeatable-wrapper .sort{
|
290 |
background: rgba(87, 99, 117, 0.48) none repeat scroll 0 0;
|
291 |
color: rgb(255, 255, 255);
|
292 |
cursor: n-resize;
|
@@ -295,7 +304,7 @@
|
|
295 |
border-radius: 3px;
|
296 |
}
|
297 |
|
298 |
-
.field-repeatable-wrapper .remove{
|
299 |
background: rgb(228, 65, 8) none repeat scroll 0 0;
|
300 |
color: rgb(255, 255, 255);
|
301 |
cursor: pointer;
|
@@ -303,11 +312,13 @@
|
|
303 |
padding: 5px 10px;
|
304 |
border-radius: 3px;
|
305 |
}
|
306 |
-
|
|
|
307 |
cursor: pointer;
|
|
|
308 |
}
|
309 |
|
310 |
-
.field-repeatable-wrapper .add-repeat-field{
|
311 |
background: rgba(87, 99, 117, 0.48) none repeat scroll 0 0;
|
312 |
color: rgb(255, 255, 255);
|
313 |
cursor: pointer;
|
@@ -319,7 +330,8 @@
|
|
319 |
}
|
320 |
|
321 |
|
322 |
-
.settings-tabs .field-media-wrapper .media-upload,
|
|
|
323 |
display: inline-block;
|
324 |
background: #ddd;
|
325 |
padding: 2px 10px;
|
@@ -330,32 +342,45 @@
|
|
330 |
|
331 |
/*input*/
|
332 |
|
333 |
-
.settings-tabs input[type="text"],
|
|
|
|
|
|
|
|
|
|
|
334 |
width: 360px;
|
335 |
background: #f1f1f1;
|
336 |
}
|
337 |
|
338 |
|
339 |
-
@media (max-width: 1170px){
|
340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
width: 100% !important;
|
342 |
|
343 |
}
|
344 |
}
|
345 |
|
346 |
|
347 |
-
@media (max-width: 1440px){
|
348 |
|
349 |
-
.settings-tabs .setting-field .field-lable{
|
350 |
width: auto;
|
351 |
float: none;
|
352 |
font-size: 14px;
|
353 |
margin-bottom: 10px;
|
354 |
}
|
355 |
-
|
|
|
356 |
margin-left: 0px;
|
357 |
}
|
358 |
-
|
|
|
359 |
|
360 |
/*.settings-tabs-right-panel {*/
|
361 |
/* width: 95%;*/
|
@@ -371,14 +396,15 @@
|
|
371 |
|
372 |
}
|
373 |
|
374 |
-
@media (max-width: 1700px){
|
375 |
|
376 |
-
.settings-tabs .setting-field .setting-field .field-lable{
|
377 |
width: auto;
|
378 |
float: none;
|
379 |
font-size: 14px;
|
380 |
}
|
381 |
-
|
|
|
382 |
margin-left: 0px;
|
383 |
}
|
384 |
|
@@ -391,7 +417,8 @@
|
|
391 |
/*expandable*/
|
392 |
|
393 |
|
394 |
-
.settings-tabs .expandable{}
|
|
|
395 |
.settings-tabs .expandable .item {
|
396 |
|
397 |
margin: 1px 0;
|
@@ -399,9 +426,7 @@
|
|
399 |
}
|
400 |
|
401 |
|
402 |
-
.settings-tabs .expandable .header label{
|
403 |
-
|
404 |
-
}
|
405 |
|
406 |
|
407 |
|
@@ -411,9 +436,7 @@
|
|
411 |
}
|
412 |
|
413 |
|
414 |
-
.settings-tabs .expandable {
|
415 |
-
|
416 |
-
}
|
417 |
|
418 |
.settings-tabs .expandable .options {
|
419 |
background: #bde6fc;
|
@@ -424,7 +447,7 @@
|
|
424 |
|
425 |
|
426 |
.settings-tabs .expandable .options {
|
427 |
-
background
|
428 |
display: none;
|
429 |
padding: 10px;
|
430 |
}
|
@@ -465,7 +488,7 @@
|
|
465 |
|
466 |
/*}*/
|
467 |
|
468 |
-
.settings-tabs .expandable
|
469 |
|
470 |
display: block;
|
471 |
|
@@ -479,9 +502,11 @@
|
|
479 |
.settings-tabs .item .expand .fa-compress {
|
480 |
display: none;
|
481 |
}
|
|
|
482 |
.settings-tabs .item.active .expand .fa-compress {
|
483 |
display: inline-block;
|
484 |
}
|
|
|
485 |
.settings-tabs .item.active .expand .fa-expand {
|
486 |
display: none;
|
487 |
}
|
@@ -509,7 +534,7 @@
|
|
509 |
border-radius: 3px;
|
510 |
}
|
511 |
|
512 |
-
.settings-tabs .expandable .sort
|
513 |
background: rgba(87, 99, 117, 0.48) none repeat scroll 0 0;
|
514 |
color: rgb(255, 255, 255);
|
515 |
cursor: n-resize;
|
@@ -521,7 +546,7 @@
|
|
521 |
|
522 |
|
523 |
|
524 |
-
.settings-tabs .pro-feature{
|
525 |
background: #ffd87f;
|
526 |
padding: 0 5px;
|
527 |
}
|
@@ -530,15 +555,16 @@
|
|
530 |
|
531 |
/*3rd Party*/
|
532 |
|
533 |
-
.settings-tabs .field-input .CodeMirror{
|
534 |
background: #f1f1f1;
|
535 |
}
|
536 |
|
537 |
|
538 |
/*.accordion*/
|
539 |
|
540 |
-
.settings-tabs .accordion{}
|
541 |
-
|
|
|
542 |
padding: 10px;
|
543 |
background: #f1f1f1;
|
544 |
margin: 2px 0;
|
@@ -546,34 +572,31 @@
|
|
546 |
font-weight: normal;
|
547 |
font-size: 14px;
|
548 |
}
|
549 |
-
|
|
|
550 |
padding: 10px;
|
551 |
background: #f5f4f4a6;
|
552 |
}
|
553 |
|
554 |
|
555 |
|
556 |
-
@media only screen and (min-width: 1024px
|
557 |
-
|
558 |
-
}
|
559 |
-
|
560 |
-
@media only screen and ( min-width: 768px ) and ( max-width: 1023px ) {
|
561 |
|
562 |
-
}
|
563 |
|
564 |
-
@media only screen and (
|
565 |
|
566 |
|
567 |
|
568 |
|
569 |
-
.settings-tabs .tab-navs{
|
570 |
float: none;
|
571 |
position: relative;
|
572 |
top: 0;
|
573 |
padding: 0 20px;
|
574 |
}
|
575 |
|
576 |
-
.settings-tabs .tab-navs .tab-nav{
|
577 |
display: inline-block;
|
578 |
float: left;
|
579 |
width: auto;
|
@@ -581,12 +604,12 @@
|
|
581 |
padding: 10px 20px;
|
582 |
}
|
583 |
|
584 |
-
.settings-tabs .tab-navs .tab-nav:last-child{
|
585 |
-
border-right: 1px solid rgba(0,0,0,0);
|
586 |
}
|
587 |
|
588 |
|
589 |
-
.settings-tabs .tab-content{
|
590 |
margin-left: 0;
|
591 |
/*clear: both;*/
|
592 |
padding: 0 20px;
|
@@ -607,7 +630,8 @@
|
|
607 |
margin-right: 0px;
|
608 |
}
|
609 |
|
610 |
-
input[type=checkbox],
|
|
|
611 |
margin: 6px 7px 0 0;
|
612 |
}
|
613 |
|
@@ -619,13 +643,4 @@
|
|
619 |
|
620 |
|
621 |
|
622 |
-
}
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
4 |
|
5 |
/*General CSS*/
|
6 |
|
7 |
+
.settings-tabs .float-right {
|
8 |
float: right;
|
9 |
}
|
10 |
|
11 |
+
.settings-tabs .float-left {
|
12 |
float: right;
|
13 |
}
|
14 |
|
15 |
+
.settings-tabs .float-none {
|
16 |
float: right;
|
17 |
}
|
18 |
|
19 |
|
20 |
+
.settings-tabs .loading {}
|
21 |
+
|
22 |
+
.settings-tabs .submit {
|
23 |
padding: 15px 20px;
|
24 |
}
|
25 |
|
27 |
|
28 |
/* Collapsible */
|
29 |
|
30 |
+
.settings-tabs .collapsible {
|
31 |
margin-bottom: 2px;
|
32 |
}
|
33 |
+
|
34 |
+
.settings-tabs .collapsible .header {
|
35 |
background: #eee;
|
36 |
padding: 8px 10px;
|
37 |
+
display: flex;
|
38 |
}
|
39 |
|
40 |
+
.settings-tabs .collapsible .header span {
|
41 |
display: inline-block;
|
42 |
vertical-align: middle;
|
43 |
}
|
44 |
|
45 |
+
.settings-tabs .collapsible .content {
|
46 |
display: none;
|
47 |
padding: 10px;
|
48 |
background: #f1f1f1;
|
49 |
}
|
50 |
|
51 |
|
52 |
+
.settings-tabs .collapsible.active .content {
|
53 |
display: block;
|
54 |
}
|
55 |
|
59 |
|
60 |
|
61 |
|
62 |
+
.settings-tabs {
|
63 |
background: #fff;
|
64 |
margin: 25px 0;
|
65 |
}
|
66 |
|
67 |
+
.settings-tabs.vertical {
|
68 |
position: relative;
|
69 |
}
|
70 |
+
|
71 |
+
.settings-tabs .tab-navs {
|
72 |
float: left;
|
73 |
margin: 0;
|
74 |
padding: 0;
|
75 |
position: sticky;
|
76 |
top: 32px;
|
77 |
}
|
78 |
+
|
79 |
+
.settings-tabs .tab-nav {
|
80 |
width: 200px;
|
81 |
padding: 12px 10px;
|
82 |
background: #f1f1f1;
|
86 |
font-size: 13px;
|
87 |
}
|
88 |
|
89 |
+
.settings-tabs .tab-nav.active {
|
90 |
+
background: #f1f1f159;
|
91 |
}
|
92 |
|
93 |
.settings-tabs .tab-nav .pro-feature {
|
99 |
width: 25px;
|
100 |
color: #b7b7b7;
|
101 |
}
|
102 |
+
|
103 |
.tab-nav.active i {
|
104 |
color: #333;
|
105 |
}
|
106 |
+
|
107 |
+
.settings-tabs .tab-content {
|
108 |
margin-left: 220px;
|
109 |
padding: 0px 0;
|
110 |
background: #f1f1f159;
|
111 |
display: none;
|
112 |
}
|
113 |
|
114 |
+
.settings-tabs .tab-content.active {
|
115 |
display: block;
|
116 |
}
|
117 |
|
118 |
+
.settings-tabs.has-right-panel {}
|
|
|
|
|
119 |
|
120 |
.settings-tabs.has-right-panel .tab-content {
|
121 |
margin-right: 280px;
|
122 |
}
|
123 |
|
124 |
|
125 |
+
.settings-tabs-right-panel {
|
126 |
width: 250px;
|
127 |
float: right;
|
128 |
padding: 15px;
|
130 |
background: #fff;
|
131 |
}
|
132 |
|
133 |
+
.settings-tabs-right-panel .right-panel-content {
|
134 |
display: none;
|
135 |
}
|
136 |
|
137 |
+
.settings-tabs-right-panel .right-panel-content.active {
|
138 |
display: block;
|
139 |
}
|
140 |
|
141 |
|
142 |
/*horizontal*/
|
143 |
|
144 |
+
.settings-tabs.horizontal {}
|
|
|
|
|
145 |
|
146 |
+
.settings-tabs.horizontal .tab-navs {
|
147 |
float: none;
|
148 |
position: relative;
|
149 |
top: 0;
|
150 |
padding: 0 20px;
|
151 |
}
|
152 |
|
153 |
+
.settings-tabs.horizontal .tab-navs .tab-nav {
|
154 |
display: inline-block;
|
155 |
float: left;
|
156 |
width: auto;
|
157 |
border-right: 1px solid #ddd;
|
158 |
}
|
159 |
|
160 |
+
.settings-tabs.horizontal .tab-navs .tab-nav:last-child {
|
161 |
+
border-right: 1px solid rgba(0, 0, 0, 0);
|
162 |
}
|
163 |
|
164 |
|
165 |
+
.settings-tabs.horizontal .tab-content {
|
166 |
margin-left: 0;
|
167 |
/*clear: both;*/
|
168 |
padding: 0 20px;
|
183 |
|
184 |
|
185 |
|
186 |
+
.settings-tabs .section {
|
187 |
margin: 0;
|
188 |
padding: 15px 0;
|
189 |
}
|
190 |
+
|
191 |
+
.settings-tabs .section-title {
|
192 |
padding: 0 15px;
|
193 |
font-size: 16px;
|
194 |
font-weight: 600;
|
195 |
}
|
196 |
|
197 |
+
.settings-tabs .section-description {
|
198 |
padding: 0 15px;
|
199 |
margin-bottom: 25px;
|
200 |
}
|
201 |
|
202 |
|
203 |
|
204 |
+
.settings-tabs .setting-field {
|
205 |
border-bottom: 1px solid #eee;
|
206 |
padding: 15px;
|
207 |
}
|
|
|
208 |
|
209 |
+
.settings-tabs .setting-field:last-child {}
|
210 |
|
211 |
|
212 |
|
213 |
+
.settings-tabs .setting-field .field-lable {
|
214 |
width: 270px;
|
215 |
float: left;
|
216 |
font-size: 14px;
|
217 |
word-break: break-word;
|
218 |
}
|
219 |
+
|
220 |
+
.settings-tabs .setting-field .field-input {
|
221 |
margin-left: 270px;
|
222 |
}
|
223 |
+
|
224 |
+
.settings-tabs .setting-field .description {
|
225 |
word-break: break-word;
|
226 |
}
|
227 |
|
228 |
+
.settings-tabs .setting-field .setting-field {
|
229 |
padding: 0 15px 15px 0px;
|
230 |
}
|
231 |
+
|
232 |
+
.settings-tabs .setting-field .setting-field .field-lable {
|
233 |
|
234 |
float: none;
|
235 |
}
|
236 |
|
237 |
+
.settings-tabs .setting-field .setting-field .field-input {
|
238 |
margin-left: 0px;
|
239 |
}
|
240 |
|
241 |
|
242 |
+
.settings-tabs .expandable .setting-field {
|
243 |
padding: 0 15px 15px 0px;
|
244 |
}
|
245 |
+
|
246 |
+
.settings-tabs .expandable .setting-field .field-lable {
|
247 |
float: left;
|
248 |
}
|
249 |
|
250 |
+
.settings-tabs .expandable .setting-field .field-input {
|
251 |
margin-left: 270px;
|
252 |
}
|
253 |
|
254 |
|
255 |
+
.settings-tabs .expandable .setting-field {
|
256 |
padding: 0 15px 15px 0px;
|
257 |
}
|
258 |
+
|
259 |
+
.settings-tabs .expandable .setting-field .setting-field .field-lable {
|
260 |
float: none;
|
261 |
}
|
262 |
|
263 |
+
.settings-tabs .expandable .setting-field .setting-field .field-input {
|
264 |
margin-left: 0px;
|
265 |
}
|
266 |
|
268 |
background: #ff3f3f1a;
|
269 |
}
|
270 |
|
271 |
+
.settings-tabs .field-error .error-details {
|
272 |
color: #c11f1f;
|
273 |
}
|
274 |
|
275 |
/*field-repeatable-wrapper*/
|
276 |
|
277 |
+
.settings-tabs .field-media-wrapper .media-upload,
|
278 |
+
.field-media-wrapper .clear {
|
279 |
display: inline-block;
|
280 |
background: #ddd;
|
281 |
padding: 2px 10px;
|
282 |
border-radius: 3px;
|
283 |
border: 1px solid #999;
|
284 |
}
|
285 |
+
|
286 |
+
.ppof-settings .repeatable .item-wrap {
|
287 |
margin-bottom: 5px;
|
288 |
padding-bottom: 0px;
|
289 |
}
|
290 |
|
291 |
|
292 |
+
.field-repeatable-wrapper .field-list {
|
293 |
margin-top: 18px;
|
294 |
}
|
|
|
295 |
|
296 |
+
.field-repeatable-wrapper .button {}
|
297 |
|
298 |
+
.field-repeatable-wrapper .sort {
|
299 |
background: rgba(87, 99, 117, 0.48) none repeat scroll 0 0;
|
300 |
color: rgb(255, 255, 255);
|
301 |
cursor: n-resize;
|
304 |
border-radius: 3px;
|
305 |
}
|
306 |
|
307 |
+
.field-repeatable-wrapper .remove {
|
308 |
background: rgb(228, 65, 8) none repeat scroll 0 0;
|
309 |
color: rgb(255, 255, 255);
|
310 |
cursor: pointer;
|
312 |
padding: 5px 10px;
|
313 |
border-radius: 3px;
|
314 |
}
|
315 |
+
|
316 |
+
.field-repeatable-wrapper .title-text {
|
317 |
cursor: pointer;
|
318 |
+
width: 90%;
|
319 |
}
|
320 |
|
321 |
+
.field-repeatable-wrapper .add-repeat-field {
|
322 |
background: rgba(87, 99, 117, 0.48) none repeat scroll 0 0;
|
323 |
color: rgb(255, 255, 255);
|
324 |
cursor: pointer;
|
330 |
}
|
331 |
|
332 |
|
333 |
+
.settings-tabs .field-media-wrapper .media-upload,
|
334 |
+
.field-media-wrapper .clear {
|
335 |
display: inline-block;
|
336 |
background: #ddd;
|
337 |
padding: 2px 10px;
|
342 |
|
343 |
/*input*/
|
344 |
|
345 |
+
.settings-tabs input[type="text"],
|
346 |
+
.settings-tabs .range-slider,
|
347 |
+
.settings-tabs input[type="email"],
|
348 |
+
.settings-tabs textarea,
|
349 |
+
.settings-tabs select,
|
350 |
+
.settings-tabs input[type="range"] {
|
351 |
width: 360px;
|
352 |
background: #f1f1f1;
|
353 |
}
|
354 |
|
355 |
|
356 |
+
@media (max-width: 1170px) {
|
357 |
+
|
358 |
+
.settings-tabs input[type="text"],
|
359 |
+
.settings-tabs input[type="email"],
|
360 |
+
.settings-tabs textarea,
|
361 |
+
.settings-tabs select,
|
362 |
+
.settings-tabs input[type="range"],
|
363 |
+
.settings-tabs .select2 {
|
364 |
width: 100% !important;
|
365 |
|
366 |
}
|
367 |
}
|
368 |
|
369 |
|
370 |
+
@media (max-width: 1440px) {
|
371 |
|
372 |
+
.settings-tabs .setting-field .field-lable {
|
373 |
width: auto;
|
374 |
float: none;
|
375 |
font-size: 14px;
|
376 |
margin-bottom: 10px;
|
377 |
}
|
378 |
+
|
379 |
+
.settings-tabs .setting-field .field-input {
|
380 |
margin-left: 0px;
|
381 |
}
|
382 |
+
|
383 |
+
.settings-tabs .setting-field .description {}
|
384 |
|
385 |
/*.settings-tabs-right-panel {*/
|
386 |
/* width: 95%;*/
|
396 |
|
397 |
}
|
398 |
|
399 |
+
@media (max-width: 1700px) {
|
400 |
|
401 |
+
.settings-tabs .setting-field .setting-field .field-lable {
|
402 |
width: auto;
|
403 |
float: none;
|
404 |
font-size: 14px;
|
405 |
}
|
406 |
+
|
407 |
+
.settings-tabs .setting-field .setting-field .field-input {
|
408 |
margin-left: 0px;
|
409 |
}
|
410 |
|
417 |
/*expandable*/
|
418 |
|
419 |
|
420 |
+
.settings-tabs .expandable {}
|
421 |
+
|
422 |
.settings-tabs .expandable .item {
|
423 |
|
424 |
margin: 1px 0;
|
426 |
}
|
427 |
|
428 |
|
429 |
+
.settings-tabs .expandable .header label {}
|
|
|
|
|
430 |
|
431 |
|
432 |
|
436 |
}
|
437 |
|
438 |
|
439 |
+
.settings-tabs .expandable {}
|
|
|
|
|
440 |
|
441 |
.settings-tabs .expandable .options {
|
442 |
background: #bde6fc;
|
447 |
|
448 |
|
449 |
.settings-tabs .expandable .options {
|
450 |
+
background: #f1f1f1;
|
451 |
display: none;
|
452 |
padding: 10px;
|
453 |
}
|
488 |
|
489 |
/*}*/
|
490 |
|
491 |
+
.settings-tabs .expandable .options.active {
|
492 |
|
493 |
display: block;
|
494 |
|
502 |
.settings-tabs .item .expand .fa-compress {
|
503 |
display: none;
|
504 |
}
|
505 |
+
|
506 |
.settings-tabs .item.active .expand .fa-compress {
|
507 |
display: inline-block;
|
508 |
}
|
509 |
+
|
510 |
.settings-tabs .item.active .expand .fa-expand {
|
511 |
display: none;
|
512 |
}
|
534 |
border-radius: 3px;
|
535 |
}
|
536 |
|
537 |
+
.settings-tabs .expandable .sort {
|
538 |
background: rgba(87, 99, 117, 0.48) none repeat scroll 0 0;
|
539 |
color: rgb(255, 255, 255);
|
540 |
cursor: n-resize;
|
546 |
|
547 |
|
548 |
|
549 |
+
.settings-tabs .pro-feature {
|
550 |
background: #ffd87f;
|
551 |
padding: 0 5px;
|
552 |
}
|
555 |
|
556 |
/*3rd Party*/
|
557 |
|
558 |
+
.settings-tabs .field-input .CodeMirror {
|
559 |
background: #f1f1f1;
|
560 |
}
|
561 |
|
562 |
|
563 |
/*.accordion*/
|
564 |
|
565 |
+
.settings-tabs .accordion {}
|
566 |
+
|
567 |
+
.settings-tabs .accordion .accordion-title {
|
568 |
padding: 10px;
|
569 |
background: #f1f1f1;
|
570 |
margin: 2px 0;
|
572 |
font-weight: normal;
|
573 |
font-size: 14px;
|
574 |
}
|
575 |
+
|
576 |
+
.settings-tabs .accordion .accordion-content {
|
577 |
padding: 10px;
|
578 |
background: #f5f4f4a6;
|
579 |
}
|
580 |
|
581 |
|
582 |
|
583 |
+
@media only screen and (min-width: 1024px) {}
|
|
|
|
|
|
|
|
|
584 |
|
585 |
+
@media only screen and (min-width: 768px) and (max-width: 1023px) {}
|
586 |
|
587 |
+
@media only screen and (min-width: 0px) and (max-width: 767px) {
|
588 |
|
589 |
|
590 |
|
591 |
|
592 |
+
.settings-tabs .tab-navs {
|
593 |
float: none;
|
594 |
position: relative;
|
595 |
top: 0;
|
596 |
padding: 0 20px;
|
597 |
}
|
598 |
|
599 |
+
.settings-tabs .tab-navs .tab-nav {
|
600 |
display: inline-block;
|
601 |
float: left;
|
602 |
width: auto;
|
604 |
padding: 10px 20px;
|
605 |
}
|
606 |
|
607 |
+
.settings-tabs .tab-navs .tab-nav:last-child {
|
608 |
+
border-right: 1px solid rgba(0, 0, 0, 0);
|
609 |
}
|
610 |
|
611 |
|
612 |
+
.settings-tabs .tab-content {
|
613 |
margin-left: 0;
|
614 |
/*clear: both;*/
|
615 |
padding: 0 20px;
|
630 |
margin-right: 0px;
|
631 |
}
|
632 |
|
633 |
+
input[type=checkbox],
|
634 |
+
input[type=radio] {
|
635 |
margin: 6px 7px 0 0;
|
636 |
}
|
637 |
|
643 |
|
644 |
|
645 |
|
646 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/settings-tabs/settings-tabs.js
CHANGED
@@ -1,311 +1,311 @@
|
|
1 |
|
2 |
-
(function($) {
|
3 |
|
4 |
-
|
5 |
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
|
16 |
-
|
17 |
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
|
32 |
|
33 |
|
34 |
-
|
35 |
|
36 |
|
37 |
-
|
38 |
|
39 |
-
|
40 |
|
41 |
-
|
42 |
|
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 |
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
|
141 |
-
|
142 |
|
143 |
-
|
144 |
|
145 |
-
|
146 |
|
147 |
-
|
148 |
-
|
149 |
|
150 |
-
|
151 |
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
|
157 |
|
158 |
-
|
159 |
|
160 |
-
|
161 |
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
|
167 |
-
|
168 |
-
|
169 |
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
-
|
182 |
-
|
183 |
|
184 |
|
185 |
-
|
186 |
|
187 |
|
188 |
|
189 |
-
|
190 |
|
191 |
|
192 |
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
|
206 |
-
|
207 |
|
208 |
-
|
209 |
|
210 |
-
|
211 |
|
212 |
|
213 |
-
|
214 |
|
215 |
|
216 |
-
|
217 |
|
218 |
-
|
219 |
|
220 |
-
|
221 |
|
222 |
-
|
223 |
|
224 |
-
|
225 |
-
|
226 |
|
227 |
-
|
228 |
|
229 |
|
230 |
-
|
231 |
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
|
247 |
|
248 |
|
|
|
|
|
249 |
}
|
250 |
|
251 |
-
|
252 |
|
253 |
-
|
|
|
254 |
|
255 |
-
id = $(this).attr('id');
|
256 |
-
editor_enabled = $(this).attr('editor_enabled');
|
257 |
|
|
|
258 |
|
259 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
|
261 |
-
|
262 |
-
|
263 |
-
mediaButtons: true,
|
264 |
-
tinymce: {
|
265 |
-
wpautop: true,
|
266 |
-
toolbar1: 'bold italic underline strikethrough | bullist numlist | blockquote hr wp_more | alignleft aligncenter alignright | link unlink | fullscreen | wp_adv',
|
267 |
-
toolbar2: 'formatselect alignjustify forecolor | pastetext removeformat charmap table | outdent indent | undo redo | wp_help'
|
268 |
-
},
|
269 |
-
quicktags: true,
|
270 |
-
} );
|
271 |
|
272 |
-
|
273 |
-
}
|
274 |
|
275 |
-
})
|
276 |
|
277 |
|
278 |
|
|
|
279 |
|
280 |
-
|
281 |
|
282 |
-
|
283 |
|
284 |
-
})
|
285 |
|
286 |
|
287 |
|
288 |
|
289 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
|
291 |
-
$(document).on('click', '.settings-tabs .expandable .expand', function(){
|
292 |
-
if($(this).parent().parent().children('.options').hasClass('active')){
|
293 |
-
//$(this).parent().parent().removeClass('active');
|
294 |
-
$(this).parent().parent().children('.options').removeClass('active');
|
295 |
-
}else {
|
296 |
-
//$(this).parent().parent().addClass('active');
|
297 |
-
$(this).parent().parent().children('.options').addClass('active');
|
298 |
-
}
|
299 |
|
|
|
300 |
|
301 |
-
})
|
302 |
|
303 |
|
304 |
|
305 |
|
306 |
|
307 |
-
|
308 |
|
309 |
-
});
|
310 |
|
311 |
})(jQuery);
|
1 |
|
2 |
+
(function ($) {
|
3 |
|
4 |
+
$(document).ready(function () {
|
5 |
|
6 |
+
$(".settings-tabs-loading").fadeOut();
|
7 |
+
$(".settings-tabs").fadeIn();
|
8 |
|
9 |
+
accordion = $(".settings-tabs .accordion").accordion({
|
10 |
+
heightStyle: 'content',
|
11 |
+
active: 99,
|
12 |
+
header: "> div > h3",
|
13 |
+
collapsible: true,
|
14 |
+
});
|
15 |
|
16 |
+
$(".settings-tabs [colorPicker]").wpColorPicker();
|
17 |
|
18 |
|
19 |
+
$(".settings-tabs .accordion[sortable='true']").sortable({
|
20 |
+
axis: "y",
|
21 |
+
handle: "h3",
|
22 |
+
stop: function (event, ui) {
|
23 |
+
// IE doesn't register the blur when sorting
|
24 |
+
// so trigger focusout handlers to remove .ui-state-focus
|
25 |
+
ui.item.children("h3").triggerHandler("focusout");
|
26 |
|
27 |
+
// Refresh accordion to handle new order
|
28 |
+
$(this).accordion("refresh");
|
29 |
+
}
|
30 |
+
})
|
31 |
|
32 |
|
33 |
|
34 |
+
$(".settings-tabs .sortable").sortable({ handle: ".sort" });
|
35 |
|
36 |
|
37 |
+
$(document).on('click', '.settings-tabs .tab-nav', function () {
|
38 |
|
39 |
+
$(this).parent().parent().children('.tab-navs').children('.tab-nav').removeClass('active');
|
40 |
|
41 |
+
$(this).addClass('active');
|
42 |
|
43 |
+
id = $(this).attr('data-id');
|
44 |
+
$('input[name="tab"], input.current_tab').val(id);
|
45 |
|
46 |
|
47 |
+
//console.log('Hello click');
|
48 |
+
//console.log(id);
|
49 |
|
50 |
+
$(this).parent().parent().children('.tab-content').removeClass('active');
|
51 |
+
$(this).parent().parent().children('.tab-content#' + id).addClass('active');
|
52 |
|
53 |
+
$(this).parent().parent().children('.settings-tabs-right-panel').children('.right-panel-content').removeClass('active');
|
54 |
+
$(this).parent().parent().children('.settings-tabs-right-panel').children('.right-panel-content-' + id).addClass('active');
|
55 |
|
56 |
|
57 |
|
58 |
+
})
|
59 |
|
60 |
|
61 |
|
62 |
+
$(document).on('click', '.settings-tabs .field-media-wrapper .clear ', function (e) {
|
63 |
|
64 |
+
$(this).parent().children().children('.media-preview').attr('src', '');
|
65 |
+
$(this).parent().children().children('.media-title').html('');
|
66 |
+
$(this).parent().children('.media-input-value').val('');
|
67 |
|
68 |
+
placeholder = $(this).attr('placeholder');
|
69 |
+
$(this).parent().children().children('.media-preview').attr('src', placeholder);
|
70 |
|
71 |
+
})
|
72 |
|
73 |
+
$(document).on('click', '.settings-tabs .field-media-wrapper .media-upload', function (e) {
|
74 |
+
var side_uploader;
|
75 |
+
this_ = $(this);
|
76 |
+
//alert(target_input);
|
77 |
+
e.preventDefault();
|
78 |
+
//If the uploader object has already been created, reopen the dialog
|
79 |
+
if (side_uploader) {
|
80 |
+
side_uploader.open();
|
81 |
+
return;
|
82 |
+
}
|
83 |
+
//Extend the wp.media object
|
84 |
+
side_uploader = wp.media.frames.file_frame = wp.media({
|
85 |
+
title: 'Choose Image',
|
86 |
+
button: {
|
87 |
+
text: 'Choose Image'
|
88 |
+
},
|
89 |
+
multiple: false
|
90 |
+
});
|
91 |
+
//When a file is selected, grab the URL and set it as the text field's value
|
92 |
+
side_uploader.on('select', function () {
|
93 |
+
attachment = side_uploader.state().get('selection').first().toJSON();
|
94 |
|
95 |
+
attachmentId = attachment.id;
|
96 |
|
97 |
+
src_url = attachment.url;
|
98 |
+
src_filename = attachment.filename;
|
99 |
|
100 |
+
//console.log(attachment);
|
101 |
|
102 |
+
$(this_).prev().val(attachmentId);
|
103 |
|
104 |
+
$(this_).parent().children('.media-preview-wrap').children('img').attr('src', src_url);
|
105 |
+
$(this_).parent().children().children('.media-title').html(src_filename);
|
106 |
+
});
|
107 |
|
108 |
+
//Open the uploader dialog
|
109 |
+
side_uploader.open();
|
110 |
|
111 |
+
})
|
112 |
|
113 |
|
114 |
|
115 |
+
$(document).on('click', '.settings-tabs .field-media-url-wrapper .media-upload', function (e) {
|
116 |
+
var side_uploader;
|
117 |
+
this_ = $(this);
|
118 |
+
//alert(target_input);
|
119 |
+
e.preventDefault();
|
120 |
+
//If the uploader object has already been created, reopen the dialog
|
121 |
+
if (side_uploader) {
|
122 |
+
side_uploader.open();
|
123 |
+
return;
|
124 |
+
}
|
125 |
+
//Extend the wp.media object
|
126 |
+
side_uploader = wp.media.frames.file_frame = wp.media({
|
127 |
+
title: 'Choose Image',
|
128 |
+
button: {
|
129 |
+
text: 'Choose Image'
|
130 |
+
},
|
131 |
+
multiple: false
|
132 |
+
});
|
133 |
+
//When a file is selected, grab the URL and set it as the text field's value
|
134 |
+
side_uploader.on('select', function () {
|
135 |
+
attachment = side_uploader.state().get('selection').first().toJSON();
|
136 |
|
137 |
+
attachmentId = attachment.id;
|
138 |
+
src_url = attachment.url;
|
139 |
+
//console.log(attachment);
|
140 |
|
141 |
+
$(this_).prev().val(src_url);
|
142 |
|
143 |
+
$(this_).parent().children('.media-preview-wrap').children('img').attr('src', src_url);
|
144 |
|
145 |
+
});
|
146 |
|
147 |
+
//Open the uploader dialog
|
148 |
+
side_uploader.open();
|
149 |
|
150 |
+
})
|
151 |
|
152 |
|
153 |
+
$(document).on('click', '.settings-tabs .field-media-url-wrapper .clear', function (e) {
|
154 |
+
$(this).parent().children('.media-preview-wrap').children('img').attr('src', '');
|
155 |
+
$(this).parent().children('input').val('');
|
156 |
|
157 |
|
158 |
+
})
|
159 |
|
160 |
+
$(document).on('click', '.settings-tabs .input-text-multi-wrapper .add-item', function () {
|
161 |
|
162 |
+
dataName = $(this).attr('data-name');
|
163 |
+
dataSort = $(this).attr('data-sort');
|
164 |
+
dataClone = $(this).attr('data-clone');
|
165 |
+
dataPlaceholder = $(this).attr('data-placeholder');
|
166 |
|
167 |
+
html = '<div class="item">';
|
168 |
+
html += '<input type="text" name="' + dataName + '" placeholder="' + dataPlaceholder + '" />';
|
169 |
|
170 |
+
if (dataClone) {
|
171 |
+
html += ' <span class="button clone"><i class="far fa-clone"></i></span>';
|
172 |
+
}
|
173 |
|
174 |
+
if (dataSort) {
|
175 |
+
html += ' <span class="button sort" ><i class="fas fa-arrows-alt"></i></span>';
|
176 |
+
}
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
+
html += ' <span class="button remove" onclick="$(this).parent().remove()"><i class="fas fa-times"></i></span>';
|
182 |
+
html += '</div>';
|
183 |
|
184 |
|
185 |
+
$(this).parent().children('.field-list').append(html);
|
186 |
|
187 |
|
188 |
|
189 |
+
})
|
190 |
|
191 |
|
192 |
|
193 |
+
$(document).on("click", ".settings-tabs .field-repeatable-wrapper .collapsible .header .title-text", function () {
|
194 |
+
if ($(this).parent().parent().hasClass("active")) {
|
195 |
+
$(this).parent().parent().removeClass("active");
|
196 |
+
} else {
|
197 |
+
$(this).parent().parent().addClass("active");
|
198 |
+
textarea_to_editor();
|
199 |
+
}
|
200 |
+
})
|
201 |
|
202 |
+
$(document).on("click", ".settings-tabs .field-repeatable-wrapper .add-repeat-field", function () {
|
203 |
+
now = $.now();
|
204 |
+
add_html = $(this).attr('add_html');
|
205 |
|
206 |
+
repeatable_html = add_html.replace(/TIMEINDEX/g, now);
|
207 |
|
208 |
+
$(this).parent().children('.repeatable-field-list').append(repeatable_html);
|
209 |
|
210 |
+
textarea_to_editor();
|
211 |
|
212 |
|
213 |
+
})
|
214 |
|
215 |
|
216 |
+
function textarea_to_editor() {
|
217 |
|
218 |
+
//textarea = $('.textarea-editor');
|
219 |
|
220 |
+
var textarea = document.getElementsByClassName("textarea-editor");
|
221 |
|
222 |
+
for (i = 0; i < textarea.length; i++) {
|
223 |
|
224 |
+
el_id = textarea[i].id;
|
225 |
+
el_attr = textarea[i].getAttribute('editor_enabled');
|
226 |
|
227 |
+
//editor_enabled = $(this).attr('editor_enabled');
|
228 |
|
229 |
|
230 |
+
//console.log(typeof wp.editor);
|
231 |
|
232 |
+
if (el_attr == 'no' && typeof wp.editor != 'undefined') {
|
233 |
+
wp.editor.initialize(el_id, {
|
234 |
+
mediaButtons: true,
|
235 |
+
tinymce: {
|
236 |
+
wpautop: true,
|
237 |
+
toolbar1: 'bold italic underline strikethrough | bullist numlist | blockquote hr wp_more | alignleft aligncenter alignright | link unlink | fullscreen | wp_adv',
|
238 |
+
toolbar2: 'formatselect alignjustify forecolor | pastetext removeformat charmap table | outdent indent | undo redo | wp_help',
|
239 |
+
},
|
240 |
+
quicktags: true,
|
241 |
+
});
|
242 |
|
243 |
+
textarea[i].setAttribute('editor_enabled', 'yes')
|
244 |
+
//$(this).attr('editor_enabled','yes');
|
245 |
+
}
|
246 |
|
247 |
|
248 |
|
249 |
+
}
|
250 |
+
|
251 |
}
|
252 |
|
253 |
+
$(document).on('click', '.settings-tabs .textarea-editor', function () {
|
254 |
|
255 |
+
id = $(this).attr('id');
|
256 |
+
editor_enabled = $(this).attr('editor_enabled');
|
257 |
|
|
|
|
|
258 |
|
259 |
+
//console.log(typeof wp.editor);
|
260 |
|
261 |
+
if (editor_enabled == 'no' && typeof wp.editor != 'undefined') {
|
262 |
+
wp.editor.initialize(id, {
|
263 |
+
mediaButtons: true,
|
264 |
+
tinymce: {
|
265 |
+
wpautop: true,
|
266 |
+
toolbar1: 'bold italic underline strikethrough | bullist numlist | blockquote hr wp_more | alignleft aligncenter alignright | link unlink | fullscreen | wp_adv',
|
267 |
+
toolbar2: 'formatselect alignjustify forecolor | pastetext removeformat charmap table | outdent indent | undo redo | wp_help'
|
268 |
+
},
|
269 |
+
quicktags: true,
|
270 |
+
});
|
271 |
|
272 |
+
$(this).attr('editor_enabled', 'yes');
|
273 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
|
275 |
+
})
|
|
|
276 |
|
|
|
277 |
|
278 |
|
279 |
|
280 |
+
$(document).on("click", ".settings-tabs .select-reset", function () {
|
281 |
|
282 |
+
$(this).prev('select').val('');
|
283 |
|
284 |
+
})
|
285 |
|
|
|
286 |
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
+
$(document).on('click', '.settings-tabs .expandable .expand', function () {
|
292 |
+
if ($(this).parent().parent().children('.options').hasClass('active')) {
|
293 |
+
//$(this).parent().parent().removeClass('active');
|
294 |
+
$(this).parent().parent().children('.options').removeClass('active');
|
295 |
+
} else {
|
296 |
+
//$(this).parent().parent().addClass('active');
|
297 |
+
$(this).parent().parent().children('.options').addClass('active');
|
298 |
+
}
|
299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
|
301 |
+
})
|
302 |
|
|
|
303 |
|
304 |
|
305 |
|
306 |
|
307 |
|
|
|
308 |
|
309 |
+
});
|
310 |
|
311 |
})(jQuery);
|
includes/class-post-meta-accordions-hook.php
CHANGED
@@ -4,53 +4,54 @@
|
|
4 |
* @Author PickPlugins
|
5 |
*/
|
6 |
|
7 |
-
if (
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
-
add_action('accordions_metabox_content_shortcode', 'accordions_metabox_content_shortcode',10, 2);
|
13 |
|
14 |
-
function accordions_metabox_content_shortcode($post_id)
|
|
|
15 |
|
16 |
$settings_tabs_field = new settings_tabs_field();
|
17 |
|
18 |
|
19 |
-
|
20 |
<div class="section">
|
21 |
-
<div class="section-title"><?php echo __('Shortcodes','accordions'); ?></div>
|
22 |
-
<p class="description section-description"><?php echo __('Simply copy these shortcode and user under content','accordions')
|
23 |
|
24 |
|
25 |
<?php
|
26 |
|
27 |
-
$shortcode = '<?php echo do_shortcode("[accordions id="'.esc_attr($post_id).'"]"); ?>';
|
28 |
-
$shortcode2 = '<?php echo do_shortcode("[accordions_pplugins id="'.esc_attr($post_id).'"]"); ?>';
|
29 |
|
30 |
-
//var_dump($shortcode);
|
31 |
|
32 |
ob_start();
|
33 |
|
34 |
?>
|
35 |
|
36 |
<div class="copy-to-clipboard">
|
37 |
-
<input type="text" value="[accordions id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
|
38 |
-
<p class="description"><?php echo __('You can use this shortcode under post content','accordions'); ?></p>
|
39 |
</div>
|
40 |
|
41 |
<div class="copy-to-clipboard">
|
42 |
-
<input type="text" value="[accordions_pplugins id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
|
43 |
-
<p class="description"><?php echo __('To avoid conflict with 3rd party shortcode also used same <code>[accordions]</code>You can use this shortcode under post content.','accordions'); ?></p>
|
44 |
</div>
|
45 |
|
46 |
<div class="copy-to-clipboard">
|
47 |
-
<textarea cols="50" rows="2" style="background:#bfefff" onClick="this.select();"
|
48 |
-
<p class="description"><?php echo __('PHP Code, you can use under theme .php files.','accordions'); ?></p>
|
49 |
</div>
|
50 |
|
51 |
<div class="copy-to-clipboard">
|
52 |
-
<textarea cols="50" rows="2" style="background:#bfefff" onClick="this.select();"
|
53 |
-
<p class="description"><?php echo __('To avoid conflict, PHP code you can use under theme .php files.','accordions'); ?></p>
|
54 |
</div>
|
55 |
|
56 |
|
@@ -60,11 +61,11 @@ $shortcode2 = '<?php echo do_shortcode("[accordions_pplugins id="'.esc_attr($pos
|
|
60 |
$html = ob_get_clean();
|
61 |
|
62 |
$args = array(
|
63 |
-
'id'
|
64 |
-
'title'
|
65 |
-
'details'
|
66 |
-
'type'
|
67 |
-
'html'
|
68 |
|
69 |
|
70 |
);
|
@@ -74,8 +75,8 @@ $shortcode2 = '<?php echo do_shortcode("[accordions_pplugins id="'.esc_attr($pos
|
|
74 |
|
75 |
<?php
|
76 |
|
77 |
-
$shortcode = '<?php echo do_shortcode("[accordions_tabs id="'.esc_attr($post_id).'"]"); ?>';
|
78 |
-
$shortcode2 = '<?php echo do_shortcode("[accordions_tabs_pplugins id="'.esc_attr($post_id).'"]"); ?>';
|
79 |
|
80 |
|
81 |
ob_start();
|
@@ -83,30 +84,31 @@ $shortcode2 = '<?php echo do_shortcode("[accordions_tabs_pplugins id="'.esc_attr
|
|
83 |
?>
|
84 |
|
85 |
<div class="copy-to-clipboard">
|
86 |
-
<input type="text" value="[accordions_tabs id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
|
87 |
-
<p class="description"><?php echo __('You can use this shortcode under post content','accordions'); ?></p>
|
88 |
</div>
|
89 |
|
90 |
<div class="copy-to-clipboard">
|
91 |
-
<input type="text" value="[accordions_tabs_pplugins id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
|
92 |
-
<p class="description"><?php echo __('To avoid conflict with 3rd party shortcode also used same <code>[accordions_tabs]</code>You can use this shortcode under post content','accordions'); ?></p>
|
93 |
</div>
|
94 |
|
95 |
<div class="copy-to-clipboard">
|
96 |
-
<textarea cols="50" rows="2" style="background:#bfefff" onClick="this.select();"
|
97 |
-
<p class="description"><?php echo __('PHP Code, you can use under theme .php files.','accordions'); ?></p>
|
98 |
</div>
|
99 |
|
100 |
<div class="copy-to-clipboard">
|
101 |
-
<textarea cols="50" rows="2" style="background:#bfefff" onClick="this.select();"
|
102 |
-
<p class="description"><?php echo __('To avoid conflict, PHP code you can use under theme .php files.','accordions'); ?></p>
|
103 |
</div>
|
104 |
|
105 |
|
106 |
|
107 |
<style type="text/css">
|
108 |
-
.copy-to-clipboard{}
|
109 |
-
|
|
|
110 |
display: none;
|
111 |
background: #e5e5e5;
|
112 |
padding: 4px 10px;
|
@@ -117,22 +119,21 @@ $shortcode2 = '<?php echo do_shortcode("[accordions_tabs_pplugins id="'.esc_attr
|
|
117 |
<script>
|
118 |
(function($) {
|
119 |
|
120 |
-
|
121 |
-
|
122 |
|
123 |
|
124 |
-
$(document).on('click', '.copy-to-clipboard input, .copy-to-clipboard textarea', function () {
|
125 |
|
126 |
-
$(
|
127 |
-
$(this).select();
|
128 |
-
document.execCommand('copy');
|
129 |
|
130 |
-
|
131 |
-
|
|
|
132 |
|
133 |
-
|
134 |
-
|
135 |
|
|
|
|
|
136 |
</script>
|
137 |
|
138 |
|
@@ -143,11 +144,11 @@ $shortcode2 = '<?php echo do_shortcode("[accordions_tabs_pplugins id="'.esc_attr
|
|
143 |
$html = ob_get_clean();
|
144 |
|
145 |
$args = array(
|
146 |
-
'id'
|
147 |
-
'title'
|
148 |
-
'details'
|
149 |
-
'type'
|
150 |
-
'html'
|
151 |
|
152 |
|
153 |
);
|
@@ -165,13 +166,14 @@ $shortcode2 = '<?php echo do_shortcode("[accordions_tabs_pplugins id="'.esc_attr
|
|
165 |
|
166 |
|
167 |
</div>
|
168 |
-
|
169 |
}
|
170 |
|
171 |
|
172 |
add_action('accordions_metabox_content_general', 'accordions_metabox_content_general', 10);
|
173 |
|
174 |
-
function accordions_metabox_content_general($post_id)
|
|
|
175 |
|
176 |
$settings_tabs_field = new settings_tabs_field();
|
177 |
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
@@ -189,68 +191,68 @@ function accordions_metabox_content_general($post_id){
|
|
189 |
|
190 |
//var_dump($lazy_load);
|
191 |
|
192 |
-
|
193 |
|
194 |
<div class="section">
|
195 |
-
<div class="section-title"><?php echo __('General options','accordions'); ?></div>
|
196 |
-
<p class="description section-description"><?php echo __('Some general options','accordions'); ?></p>
|
197 |
|
198 |
<?php
|
199 |
$args = array(
|
200 |
-
'id'
|
201 |
-
'parent'
|
202 |
-
'title'
|
203 |
-
'details'
|
204 |
-
'type'
|
205 |
-
'value'
|
206 |
-
'default'
|
207 |
-
'args'
|
208 |
-
'no'
|
209 |
-
'yes'
|
210 |
),
|
211 |
);
|
212 |
|
213 |
$settings_tabs_field->generate_field($args);
|
214 |
|
215 |
$args = array(
|
216 |
-
'id'
|
217 |
-
'parent'
|
218 |
-
'title'
|
219 |
-
'details'
|
220 |
-
'type'
|
221 |
-
'value'
|
222 |
-
'default'
|
223 |
'placeholder' => '',
|
224 |
);
|
225 |
|
226 |
$settings_tabs_field->generate_field($args);
|
227 |
|
228 |
$args = array(
|
229 |
-
'id'
|
230 |
-
'parent'
|
231 |
-
'title'
|
232 |
-
'details'
|
233 |
-
'type'
|
234 |
-
'value'
|
235 |
-
'default'
|
236 |
-
'args'
|
237 |
-
'no'
|
238 |
-
'yes'
|
239 |
),
|
240 |
);
|
241 |
|
242 |
$settings_tabs_field->generate_field($args);
|
243 |
|
244 |
$args = array(
|
245 |
-
'id'
|
246 |
-
'parent'
|
247 |
-
'title'
|
248 |
-
'details'
|
249 |
-
'type'
|
250 |
-
'multiple'
|
251 |
-
'value'
|
252 |
-
'default'
|
253 |
-
'args'
|
254 |
);
|
255 |
|
256 |
$settings_tabs_field->generate_field($args);
|
@@ -259,64 +261,64 @@ function accordions_metabox_content_general($post_id){
|
|
259 |
|
260 |
|
261 |
$args = array(
|
262 |
-
'id'
|
263 |
-
'parent'
|
264 |
-
'title'
|
265 |
-
'details'
|
266 |
-
'type'
|
267 |
-
'value'
|
268 |
-
'default'
|
269 |
-
'args'
|
270 |
-
'no'
|
271 |
-
'yes'
|
272 |
),
|
273 |
);
|
274 |
|
275 |
$settings_tabs_field->generate_field($args);
|
276 |
|
277 |
$args = array(
|
278 |
-
'id'
|
279 |
-
'parent'
|
280 |
-
'title'
|
281 |
-
'details'
|
282 |
-
'type'
|
283 |
-
'value'
|
284 |
-
'default'
|
285 |
-
'args'
|
286 |
-
'no'
|
287 |
-
'yes'
|
288 |
),
|
289 |
);
|
290 |
|
291 |
$settings_tabs_field->generate_field($args);
|
292 |
|
293 |
$args = array(
|
294 |
-
'id'
|
295 |
-
'parent'
|
296 |
-
'title'
|
297 |
-
'details'
|
298 |
-
'type'
|
299 |
-
'value'
|
300 |
-
'default'
|
301 |
-
'args'
|
302 |
-
'no'
|
303 |
-
'yes'
|
304 |
),
|
305 |
);
|
306 |
|
307 |
$settings_tabs_field->generate_field($args);
|
308 |
|
309 |
$args = array(
|
310 |
-
'id'
|
311 |
-
'parent'
|
312 |
-
'title'
|
313 |
-
'details'
|
314 |
-
'type'
|
315 |
-
'value'
|
316 |
-
'default'
|
317 |
-
'args'
|
318 |
-
'no'
|
319 |
-
'yes'
|
320 |
),
|
321 |
);
|
322 |
|
@@ -327,16 +329,17 @@ function accordions_metabox_content_general($post_id){
|
|
327 |
?>
|
328 |
|
329 |
</div>
|
330 |
-
|
331 |
|
332 |
}
|
333 |
|
334 |
add_action('accordions_metabox_content_accordion_options', 'accordions_metabox_content_accordion_options', 10);
|
335 |
|
336 |
-
function accordions_metabox_content_accordion_options($post_id)
|
|
|
337 |
|
338 |
$settings_tabs_field = new settings_tabs_field();
|
339 |
-
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
340 |
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
341 |
|
342 |
|
@@ -347,74 +350,74 @@ function accordions_metabox_content_accordion_options($post_id){
|
|
347 |
$active_event = isset($accordion['active_event']) ? $accordion['active_event'] : 'click';
|
348 |
|
349 |
|
350 |
-
|
351 |
|
352 |
<div class="section">
|
353 |
-
<div class="section-title"><?php echo __('Accordion options','accordions'); ?></div>
|
354 |
-
<p class="description section-description"><?php echo __('Some general setting for accordion','accordions'); ?></p>
|
355 |
|
356 |
<?php
|
357 |
$args = array(
|
358 |
-
'id'
|
359 |
-
'parent'
|
360 |
-
'title'
|
361 |
-
'details'
|
362 |
-
'type'
|
363 |
-
'value'
|
364 |
-
'default'
|
365 |
-
'args'
|
366 |
-
'true'
|
367 |
-
'false'
|
368 |
),
|
369 |
);
|
370 |
|
371 |
$settings_tabs_field->generate_field($args);
|
372 |
|
373 |
$args = array(
|
374 |
-
'id'
|
375 |
-
'parent'
|
376 |
-
'title'
|
377 |
-
'details'
|
378 |
-
'type'
|
379 |
-
'value'
|
380 |
-
'default'
|
381 |
-
'args'
|
382 |
-
'no'
|
383 |
-
'yes'
|
384 |
),
|
385 |
);
|
386 |
|
387 |
$settings_tabs_field->generate_field($args);
|
388 |
|
389 |
$args = array(
|
390 |
-
'id'
|
391 |
-
'parent'
|
392 |
-
'title'
|
393 |
-
'details'
|
394 |
-
'type'
|
395 |
-
'value'
|
396 |
-
'default'
|
397 |
-
'args'
|
398 |
-
|
399 |
-
'content'
|
400 |
-
'fill'
|
401 |
),
|
402 |
);
|
403 |
|
404 |
$settings_tabs_field->generate_field($args);
|
405 |
|
406 |
$args = array(
|
407 |
-
'id'
|
408 |
-
'parent'
|
409 |
-
'title'
|
410 |
-
'details'
|
411 |
-
'type'
|
412 |
-
'value'
|
413 |
-
'default'
|
414 |
-
'args'
|
415 |
-
'click'
|
416 |
-
'mouseover'
|
417 |
-
'focus'
|
418 |
),
|
419 |
);
|
420 |
|
@@ -422,7 +425,7 @@ function accordions_metabox_content_accordion_options($post_id){
|
|
422 |
?>
|
423 |
|
424 |
</div>
|
425 |
-
|
426 |
|
427 |
|
428 |
}
|
@@ -430,10 +433,11 @@ function accordions_metabox_content_accordion_options($post_id){
|
|
430 |
|
431 |
add_action('accordions_metabox_content_tabs_options', 'accordions_metabox_content_tabs_options', 10);
|
432 |
|
433 |
-
function accordions_metabox_content_tabs_options($post_id)
|
|
|
434 |
|
435 |
$settings_tabs_field = new settings_tabs_field();
|
436 |
-
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
437 |
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
438 |
|
439 |
|
@@ -443,57 +447,57 @@ function accordions_metabox_content_tabs_options($post_id){
|
|
443 |
$navs_alignment = isset($tabs['navs_alignment']) ? $tabs['navs_alignment'] : 'left';
|
444 |
|
445 |
|
446 |
-
|
447 |
|
448 |
<div class="section">
|
449 |
-
<div class="section-title"><?php echo __('Tabs options','accordions'); ?></div>
|
450 |
-
<p class="description section-description"><?php echo __('Settings for tabs','accordions'); ?></p>
|
451 |
|
452 |
|
453 |
<?php
|
454 |
$args = array(
|
455 |
-
'id'
|
456 |
-
'parent'
|
457 |
-
'title'
|
458 |
-
'details'
|
459 |
-
'type'
|
460 |
-
'value'
|
461 |
-
'default'
|
462 |
-
'args'
|
463 |
-
'true'
|
464 |
-
'false'
|
465 |
),
|
466 |
);
|
467 |
|
468 |
$settings_tabs_field->generate_field($args);
|
469 |
|
470 |
$args = array(
|
471 |
-
'id'
|
472 |
-
'parent'
|
473 |
-
'title'
|
474 |
-
'details'
|
475 |
-
'type'
|
476 |
-
'value'
|
477 |
-
'default'
|
478 |
-
'args'
|
479 |
-
'click'
|
480 |
-
'mouseover'
|
481 |
),
|
482 |
);
|
483 |
|
484 |
$settings_tabs_field->generate_field($args);
|
485 |
|
486 |
$args = array(
|
487 |
-
'id'
|
488 |
-
'parent'
|
489 |
-
'title'
|
490 |
-
'details'
|
491 |
-
'type'
|
492 |
-
'value'
|
493 |
-
'default'
|
494 |
-
'args'
|
495 |
-
'left'
|
496 |
-
'right'
|
497 |
),
|
498 |
);
|
499 |
|
@@ -503,7 +507,7 @@ function accordions_metabox_content_tabs_options($post_id){
|
|
503 |
?>
|
504 |
|
505 |
</div>
|
506 |
-
|
507 |
|
508 |
|
509 |
}
|
@@ -513,10 +517,11 @@ function accordions_metabox_content_tabs_options($post_id){
|
|
513 |
|
514 |
add_action('accordions_metabox_content_style', 'accordions_metabox_content_style', 10);
|
515 |
|
516 |
-
function accordions_metabox_content_style($post_id)
|
|
|
517 |
|
518 |
$settings_tabs_field = new settings_tabs_field();
|
519 |
-
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
520 |
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
521 |
|
522 |
$icon = isset($accordions_options['icon']) ? $accordions_options['icon'] : array();
|
@@ -555,89 +560,89 @@ function accordions_metabox_content_style($post_id){
|
|
555 |
$body_padding = isset($body['padding']) ? $body['padding'] : '';
|
556 |
$body_margin = isset($body['margin']) ? $body['margin'] : '';
|
557 |
|
558 |
-
|
559 |
<div class="section">
|
560 |
-
<div class="section-title"><?php echo __('Accordion icons','accordions'); ?></div>
|
561 |
-
<p class="description section-description"><?php echo __('Customize accordion icons.','accordions'); ?></p>
|
562 |
|
563 |
<?php
|
564 |
|
565 |
$args = array(
|
566 |
-
'id'
|
567 |
-
'parent'
|
568 |
-
'title'
|
569 |
-
'details'
|
570 |
-
'type'
|
571 |
-
'value'
|
572 |
-
'default'
|
573 |
'placeholder' => '',
|
574 |
);
|
575 |
|
576 |
$settings_tabs_field->generate_field($args);
|
577 |
|
578 |
$args = array(
|
579 |
-
'id'
|
580 |
-
'parent'
|
581 |
-
'title'
|
582 |
-
'details'
|
583 |
-
'type'
|
584 |
-
'value'
|
585 |
-
'default'
|
586 |
'placeholder' => '',
|
587 |
);
|
588 |
|
589 |
$settings_tabs_field->generate_field($args);
|
590 |
|
591 |
$args = array(
|
592 |
-
'id'
|
593 |
-
'css_id'
|
594 |
-
'parent'
|
595 |
-
'title'
|
596 |
-
'details'
|
597 |
-
'type'
|
598 |
-
'value'
|
599 |
-
'default'
|
600 |
'placeholder' => '#999999',
|
601 |
);
|
602 |
|
603 |
$settings_tabs_field->generate_field($args);
|
604 |
|
605 |
$args = array(
|
606 |
-
'id'
|
607 |
-
'css_id'
|
608 |
-
'parent'
|
609 |
-
'title'
|
610 |
-
'details'
|
611 |
-
'type'
|
612 |
-
'value'
|
613 |
-
'default'
|
614 |
'placeholder' => '#777777',
|
615 |
);
|
616 |
|
617 |
$settings_tabs_field->generate_field($args);
|
618 |
|
619 |
$args = array(
|
620 |
-
'id'
|
621 |
-
'css_id'
|
622 |
-
'parent'
|
623 |
-
'title'
|
624 |
-
'details'
|
625 |
-
'type'
|
626 |
-
'value'
|
627 |
-
'default'
|
628 |
'placeholder' => '#777777',
|
629 |
);
|
630 |
|
631 |
$settings_tabs_field->generate_field($args);
|
632 |
|
633 |
$args = array(
|
634 |
-
'id'
|
635 |
-
'parent'
|
636 |
-
'title'
|
637 |
-
'details'
|
638 |
-
'type'
|
639 |
-
'value'
|
640 |
-
'default'
|
641 |
'placeholder' => '14px',
|
642 |
);
|
643 |
|
@@ -645,26 +650,26 @@ function accordions_metabox_content_style($post_id){
|
|
645 |
|
646 |
|
647 |
$args = array(
|
648 |
-
'id'
|
649 |
-
'parent'
|
650 |
-
'title'
|
651 |
-
'details'
|
652 |
-
'type'
|
653 |
-
'value'
|
654 |
-
'default'
|
655 |
'placeholder' => '10px',
|
656 |
);
|
657 |
|
658 |
$settings_tabs_field->generate_field($args);
|
659 |
|
660 |
$args = array(
|
661 |
-
'id'
|
662 |
-
'parent'
|
663 |
-
'title'
|
664 |
-
'details'
|
665 |
-
'type'
|
666 |
-
'value'
|
667 |
-
'default'
|
668 |
'placeholder' => '5px',
|
669 |
);
|
670 |
|
@@ -672,17 +677,17 @@ function accordions_metabox_content_style($post_id){
|
|
672 |
|
673 |
|
674 |
$args = array(
|
675 |
-
'id'
|
676 |
-
'parent'
|
677 |
-
'title'
|
678 |
-
'details'
|
679 |
-
'type'
|
680 |
-
'value'
|
681 |
-
'default'
|
682 |
-
'args'
|
683 |
-
'none'
|
684 |
-
'left'
|
685 |
-
'right'
|
686 |
),
|
687 |
|
688 |
);
|
@@ -694,19 +699,19 @@ function accordions_metabox_content_style($post_id){
|
|
694 |
|
695 |
|
696 |
<div class="section">
|
697 |
-
<div class="section-title"><?php echo __('Accordion header style','accordions'); ?></div>
|
698 |
-
<p class="description section-description"><?php echo __('Customize accordion header.','accordions'); ?></p>
|
699 |
<?php
|
700 |
|
701 |
$args = array(
|
702 |
-
'id'
|
703 |
-
'css_id'
|
704 |
-
'parent'
|
705 |
-
'title'
|
706 |
-
'details'
|
707 |
-
'type'
|
708 |
-
'value'
|
709 |
-
'default'
|
710 |
'placeholder' => '',
|
711 |
);
|
712 |
|
@@ -717,69 +722,69 @@ function accordions_metabox_content_style($post_id){
|
|
717 |
|
718 |
|
719 |
$args = array(
|
720 |
-
'id'
|
721 |
-
'css_id'
|
722 |
-
'parent'
|
723 |
-
'title'
|
724 |
-
'details'
|
725 |
-
'type'
|
726 |
-
'value'
|
727 |
-
'default'
|
728 |
'placeholder' => '#eeeeee',
|
729 |
);
|
730 |
|
731 |
$settings_tabs_field->generate_field($args);
|
732 |
|
733 |
$args = array(
|
734 |
-
'id'
|
735 |
-
'css_id'
|
736 |
-
'parent'
|
737 |
-
'title'
|
738 |
-
'details'
|
739 |
-
'type'
|
740 |
-
'value'
|
741 |
-
'default'
|
742 |
'placeholder' => '#dddddd',
|
743 |
);
|
744 |
|
745 |
$settings_tabs_field->generate_field($args);
|
746 |
|
747 |
$args = array(
|
748 |
-
'id'
|
749 |
-
'css_id'
|
750 |
-
'parent'
|
751 |
-
'title'
|
752 |
-
'details'
|
753 |
-
'type'
|
754 |
-
'value'
|
755 |
-
'default'
|
756 |
'placeholder' => '#999999',
|
757 |
);
|
758 |
|
759 |
$settings_tabs_field->generate_field($args);
|
760 |
|
761 |
$args = array(
|
762 |
-
'id'
|
763 |
-
'css_id'
|
764 |
-
'parent'
|
765 |
-
'title'
|
766 |
-
'details'
|
767 |
-
'type'
|
768 |
-
'value'
|
769 |
-
'default'
|
770 |
'placeholder' => '#7777777',
|
771 |
);
|
772 |
|
773 |
$settings_tabs_field->generate_field($args);
|
774 |
|
775 |
$args = array(
|
776 |
-
'id'
|
777 |
-
'parent'
|
778 |
-
'title'
|
779 |
-
'details'
|
780 |
-
'type'
|
781 |
-
'value'
|
782 |
-
'default'
|
783 |
'placeholder' => '14px',
|
784 |
);
|
785 |
|
@@ -787,38 +792,38 @@ function accordions_metabox_content_style($post_id){
|
|
787 |
|
788 |
|
789 |
$args = array(
|
790 |
-
'id'
|
791 |
-
'parent'
|
792 |
-
'title'
|
793 |
-
'details'
|
794 |
-
'type'
|
795 |
-
'value'
|
796 |
'placeholder' => 'Open Sans',
|
797 |
);
|
798 |
|
799 |
$settings_tabs_field->generate_field($args);
|
800 |
|
801 |
$args = array(
|
802 |
-
'id'
|
803 |
-
'parent'
|
804 |
-
'title'
|
805 |
-
'details'
|
806 |
-
'type'
|
807 |
-
'value'
|
808 |
-
'default'
|
809 |
'placeholder' => '10px',
|
810 |
);
|
811 |
|
812 |
$settings_tabs_field->generate_field($args);
|
813 |
|
814 |
$args = array(
|
815 |
-
'id'
|
816 |
-
'parent'
|
817 |
-
'title'
|
818 |
-
'details'
|
819 |
-
'type'
|
820 |
-
'value'
|
821 |
-
'default'
|
822 |
'placeholder' => '5px',
|
823 |
);
|
824 |
|
@@ -828,20 +833,20 @@ function accordions_metabox_content_style($post_id){
|
|
828 |
</div>
|
829 |
|
830 |
<div class="section">
|
831 |
-
<div class="section-title"><?php echo __('Accordions content style','accordions'); ?></div>
|
832 |
-
<p class="description section-description"><?php echo __('Customize accordion content.','accordions'); ?></p>
|
833 |
|
834 |
<?php
|
835 |
|
836 |
$args = array(
|
837 |
-
'id'
|
838 |
-
'css_id'
|
839 |
-
'parent'
|
840 |
-
'title'
|
841 |
-
'details'
|
842 |
-
'type'
|
843 |
-
'value'
|
844 |
-
'default'
|
845 |
'placeholder' => '',
|
846 |
);
|
847 |
|
@@ -849,14 +854,14 @@ function accordions_metabox_content_style($post_id){
|
|
849 |
|
850 |
|
851 |
$args = array(
|
852 |
-
'id'
|
853 |
-
'css_id'
|
854 |
-
'parent'
|
855 |
-
'title'
|
856 |
-
'details'
|
857 |
-
'type'
|
858 |
-
'value'
|
859 |
-
'default'
|
860 |
'placeholder' => '#999999',
|
861 |
);
|
862 |
|
@@ -866,25 +871,25 @@ function accordions_metabox_content_style($post_id){
|
|
866 |
|
867 |
<?php
|
868 |
$args = array(
|
869 |
-
'id'
|
870 |
-
'parent'
|
871 |
-
'title'
|
872 |
-
'details'
|
873 |
-
'type'
|
874 |
-
'value'
|
875 |
-
'default'
|
876 |
'placeholder' => '10px',
|
877 |
);
|
878 |
|
879 |
$settings_tabs_field->generate_field($args);
|
880 |
|
881 |
$args = array(
|
882 |
-
'id'
|
883 |
-
'parent'
|
884 |
-
'title'
|
885 |
-
'details'
|
886 |
-
'type'
|
887 |
-
'value'
|
888 |
'placeholder' => 'Open Sans',
|
889 |
);
|
890 |
|
@@ -894,14 +899,14 @@ function accordions_metabox_content_style($post_id){
|
|
894 |
|
895 |
<?php
|
896 |
$args = array(
|
897 |
-
'id'
|
898 |
-
'css_id'
|
899 |
-
'parent'
|
900 |
-
'title'
|
901 |
-
'details'
|
902 |
-
'type'
|
903 |
-
'value'
|
904 |
-
'default'
|
905 |
'placeholder' => '#ffffff',
|
906 |
);
|
907 |
|
@@ -911,13 +916,13 @@ function accordions_metabox_content_style($post_id){
|
|
911 |
|
912 |
<?php
|
913 |
$args = array(
|
914 |
-
'id'
|
915 |
-
'parent'
|
916 |
-
'title'
|
917 |
-
'details'
|
918 |
-
'type'
|
919 |
-
'value'
|
920 |
-
'default'
|
921 |
'placeholder' => '10px',
|
922 |
);
|
923 |
|
@@ -927,13 +932,13 @@ function accordions_metabox_content_style($post_id){
|
|
927 |
|
928 |
<?php
|
929 |
$args = array(
|
930 |
-
'id'
|
931 |
-
'parent'
|
932 |
-
'title'
|
933 |
-
'details'
|
934 |
-
'type'
|
935 |
-
'value'
|
936 |
-
'default'
|
937 |
'placeholder' => '10px',
|
938 |
);
|
939 |
|
@@ -943,8 +948,8 @@ function accordions_metabox_content_style($post_id){
|
|
943 |
</div>
|
944 |
|
945 |
<div class="section">
|
946 |
-
<div class="section-title"><?php echo __('Container style','accordions'); ?></div>
|
947 |
-
<p class="description section-description"><?php echo __('Customize container style optons.','accordions'); ?></p>
|
948 |
|
949 |
<?php
|
950 |
|
@@ -960,13 +965,13 @@ function accordions_metabox_content_style($post_id){
|
|
960 |
|
961 |
|
962 |
$args = array(
|
963 |
-
'id'
|
964 |
-
'parent'
|
965 |
-
'title'
|
966 |
-
'details'
|
967 |
-
'type'
|
968 |
-
'value'
|
969 |
-
'default'
|
970 |
'placeholder' => '10px',
|
971 |
|
972 |
);
|
@@ -974,13 +979,13 @@ function accordions_metabox_content_style($post_id){
|
|
974 |
$settings_tabs_field->generate_field($args);
|
975 |
|
976 |
$args = array(
|
977 |
-
'id'
|
978 |
-
'parent'
|
979 |
-
'title'
|
980 |
-
'details'
|
981 |
-
'type'
|
982 |
-
'value'
|
983 |
-
'default'
|
984 |
'placeholder' => '',
|
985 |
|
986 |
);
|
@@ -988,18 +993,18 @@ function accordions_metabox_content_style($post_id){
|
|
988 |
$settings_tabs_field->generate_field($args);
|
989 |
|
990 |
$args = array(
|
991 |
-
'id'
|
992 |
-
'parent'
|
993 |
-
'title'
|
994 |
-
'details'
|
995 |
-
'type'
|
996 |
-
'value'
|
997 |
-
'default'
|
998 |
-
'args'
|
999 |
-
'left'
|
1000 |
-
'right'
|
1001 |
-
'center'
|
1002 |
-
'justify'
|
1003 |
|
1004 |
),
|
1005 |
|
@@ -1008,13 +1013,13 @@ function accordions_metabox_content_style($post_id){
|
|
1008 |
$settings_tabs_field->generate_field($args);
|
1009 |
|
1010 |
$args = array(
|
1011 |
-
'id'
|
1012 |
-
'parent'
|
1013 |
-
'title'
|
1014 |
-
'details'
|
1015 |
-
'type'
|
1016 |
-
'value'
|
1017 |
-
'default'
|
1018 |
'placeholder' => '',
|
1019 |
|
1020 |
);
|
@@ -1024,39 +1029,39 @@ function accordions_metabox_content_style($post_id){
|
|
1024 |
|
1025 |
|
1026 |
$args = array(
|
1027 |
-
'id'
|
1028 |
-
'title'
|
1029 |
-
'details'
|
1030 |
-
'type'
|
1031 |
-
'options'
|
1032 |
array(
|
1033 |
-
'id'
|
1034 |
-
'parent'
|
1035 |
-
'title'
|
1036 |
-
'details'
|
1037 |
-
'type'
|
1038 |
-
'value'
|
1039 |
-
'default'
|
1040 |
'placeholder' => '',
|
1041 |
),
|
1042 |
array(
|
1043 |
-
'id'
|
1044 |
-
'parent'
|
1045 |
-
'title'
|
1046 |
-
'details'
|
1047 |
-
'type'
|
1048 |
-
'value'
|
1049 |
-
'default'
|
1050 |
'placeholder' => '',
|
1051 |
),
|
1052 |
array(
|
1053 |
-
'id'
|
1054 |
-
'parent'
|
1055 |
-
'title'
|
1056 |
-
'details'
|
1057 |
-
'type'
|
1058 |
-
'value'
|
1059 |
-
'default'
|
1060 |
'placeholder' => '',
|
1061 |
),
|
1062 |
),
|
@@ -1071,7 +1076,7 @@ function accordions_metabox_content_style($post_id){
|
|
1071 |
|
1072 |
</div>
|
1073 |
|
1074 |
-
|
1075 |
|
1076 |
}
|
1077 |
|
@@ -1079,20 +1084,21 @@ function accordions_metabox_content_style($post_id){
|
|
1079 |
|
1080 |
add_action('accordions_metabox_content_content', 'accordions_metabox_content_content', 10);
|
1081 |
|
1082 |
-
function accordions_metabox_content_content($post_id)
|
|
|
1083 |
|
1084 |
$settings_tabs_field = new settings_tabs_field();
|
1085 |
-
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
1086 |
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
1087 |
|
1088 |
$accordions_content = isset($accordions_options['content']) ? $accordions_options['content'] : array();
|
1089 |
|
1090 |
|
1091 |
-
|
1092 |
|
1093 |
<div class="section">
|
1094 |
-
<div class="section-title"><?php echo __('Accordions content','accordions'); ?></div>
|
1095 |
-
<p class="description section-description"><?php echo __('Add you accordion content here.','accordions'); ?></p>
|
1096 |
|
1097 |
<?php
|
1098 |
|
@@ -1101,50 +1107,49 @@ function accordions_metabox_content_content($post_id){
|
|
1101 |
|
1102 |
$meta_fields = array(
|
1103 |
array(
|
1104 |
-
'id'
|
1105 |
-
'css_id'
|
1106 |
-
'title'
|
1107 |
-
'details'
|
1108 |
-
'type'
|
1109 |
-
'value'
|
1110 |
-
'default'
|
1111 |
-
'placeholder'
|
1112 |
),
|
1113 |
array(
|
1114 |
-
'id'
|
1115 |
-
'css_id'
|
1116 |
-
'title'
|
1117 |
-
'details'
|
1118 |
-
'type'
|
1119 |
-
'value'
|
1120 |
-
'default'
|
1121 |
-
'placeholder'
|
1122 |
),
|
1123 |
array(
|
1124 |
-
'id'
|
1125 |
-
'css_id'
|
1126 |
-
'title'
|
1127 |
-
'details'
|
1128 |
-
'type'
|
1129 |
-
'value'
|
1130 |
-
'default'
|
1131 |
-
'args'
|
1132 |
-
'true'
|
1133 |
-
'false'
|
1134 |
),
|
1135 |
),
|
1136 |
-
|
1137 |
array(
|
1138 |
-
'id'
|
1139 |
-
'css_id'
|
1140 |
-
'title'
|
1141 |
-
'details'
|
1142 |
-
'type'
|
1143 |
-
'value'
|
1144 |
-
'default'
|
1145 |
-
'args'
|
1146 |
-
'true'
|
1147 |
-
'false'
|
1148 |
),
|
1149 |
),
|
1150 |
|
@@ -1153,15 +1158,15 @@ function accordions_metabox_content_content($post_id){
|
|
1153 |
$meta_fields = apply_filters('accordions_content_fields', $meta_fields);
|
1154 |
|
1155 |
$args = array(
|
1156 |
-
'id'
|
1157 |
-
'parent'
|
1158 |
-
'title'
|
1159 |
-
'details'
|
1160 |
-
'collapsible'=> true,
|
1161 |
-
'type'
|
1162 |
-
'limit'
|
1163 |
-
'title_field'
|
1164 |
-
'value'
|
1165 |
'fields' => $meta_fields,
|
1166 |
);
|
1167 |
|
@@ -1177,18 +1182,19 @@ function accordions_metabox_content_content($post_id){
|
|
1177 |
|
1178 |
|
1179 |
</div>
|
1180 |
-
|
1181 |
}
|
1182 |
|
1183 |
|
1184 |
add_action('accordions_metabox_content_custom_scripts', 'accordions_metabox_content_custom_scripts', 10);
|
1185 |
|
1186 |
-
function accordions_metabox_content_custom_scripts($post_id)
|
|
|
1187 |
|
1188 |
|
1189 |
$settings_tabs_field = new settings_tabs_field();
|
1190 |
|
1191 |
-
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
1192 |
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
1193 |
|
1194 |
$custom_scripts = isset($accordions_options['custom_scripts']) ? $accordions_options['custom_scripts'] : array();
|
@@ -1196,32 +1202,32 @@ function accordions_metabox_content_custom_scripts($post_id){
|
|
1196 |
$custom_css = isset($custom_scripts['custom_css']) ? $custom_scripts['custom_css'] : '';
|
1197 |
|
1198 |
|
1199 |
-
|
1200 |
<div class="section">
|
1201 |
-
<div class="section-title"><?php echo __('Accordions Scripts','accordions'); ?></div>
|
1202 |
-
<p class="description section-description"><?php echo __('Add your own CSS & Scripts.','accordions'); ?></p>
|
1203 |
|
1204 |
<?php
|
1205 |
$args = array(
|
1206 |
-
'id'
|
1207 |
-
'parent'
|
1208 |
-
'title'
|
1209 |
-
'details'
|
1210 |
-
'type'
|
1211 |
-
'value'
|
1212 |
-
'default'
|
1213 |
);
|
1214 |
|
1215 |
$settings_tabs_field->generate_field($args);
|
1216 |
|
1217 |
$args = array(
|
1218 |
-
'id'
|
1219 |
-
'parent'
|
1220 |
-
'title'
|
1221 |
-
'details'
|
1222 |
-
'type'
|
1223 |
-
'value'
|
1224 |
-
'default'
|
1225 |
);
|
1226 |
|
1227 |
$settings_tabs_field->generate_field($args);
|
@@ -1237,12 +1243,13 @@ function accordions_metabox_content_custom_scripts($post_id){
|
|
1237 |
|
1238 |
add_action('accordions_metabox_content_help_support', 'accordions_metabox_content_help_support');
|
1239 |
|
1240 |
-
if(!function_exists('accordions_metabox_content_help_support')) {
|
1241 |
-
function accordions_metabox_content_help_support($tab)
|
|
|
1242 |
|
1243 |
$settings_tabs_field = new settings_tabs_field();
|
1244 |
|
1245 |
-
|
1246 |
<div class="section">
|
1247 |
|
1248 |
<div class="section-title"><?php echo __('Get support', 'accordions'); ?></div>
|
@@ -1276,12 +1283,12 @@ if(!function_exists('accordions_metabox_content_help_support')) {
|
|
1276 |
$html = ob_get_clean();
|
1277 |
|
1278 |
$args = array(
|
1279 |
-
'id'
|
1280 |
//'parent' => '',
|
1281 |
-
'title'
|
1282 |
-
'details'
|
1283 |
-
'type'
|
1284 |
-
'html'
|
1285 |
|
1286 |
);
|
1287 |
|
@@ -1301,12 +1308,12 @@ if(!function_exists('accordions_metabox_content_help_support')) {
|
|
1301 |
$html = ob_get_clean();
|
1302 |
|
1303 |
$args = array(
|
1304 |
-
'id'
|
1305 |
//'parent' => '',
|
1306 |
-
'title'
|
1307 |
-
'details'
|
1308 |
-
'type'
|
1309 |
-
'html'
|
1310 |
|
1311 |
);
|
1312 |
|
@@ -1320,7 +1327,7 @@ if(!function_exists('accordions_metabox_content_help_support')) {
|
|
1320 |
|
1321 |
|
1322 |
</div>
|
1323 |
-
|
1324 |
|
1325 |
|
1326 |
}
|
@@ -1333,12 +1340,11 @@ add_action('accordions_metabox_content_buy_pro', 'accordions_settings_content_bu
|
|
1333 |
|
1334 |
|
1335 |
|
1336 |
-
add_action('accordions_post_meta_save','accordions_post_meta_save');
|
1337 |
|
1338 |
-
function accordions_post_meta_save($job_id)
|
|
|
1339 |
|
1340 |
$accordions_options = isset($_POST['accordions_options']) ? accordions_recursive_sanitize_arr($_POST['accordions_options']) : '';
|
1341 |
update_post_meta($job_id, 'accordions_options', $accordions_options);
|
1342 |
-
|
1343 |
-
|
1344 |
}
|
4 |
* @Author PickPlugins
|
5 |
*/
|
6 |
|
7 |
+
if (!defined('ABSPATH')) exit; // if direct access
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
+
add_action('accordions_metabox_content_shortcode', 'accordions_metabox_content_shortcode', 10, 2);
|
13 |
|
14 |
+
function accordions_metabox_content_shortcode($post_id)
|
15 |
+
{
|
16 |
|
17 |
$settings_tabs_field = new settings_tabs_field();
|
18 |
|
19 |
|
20 |
+
?>
|
21 |
<div class="section">
|
22 |
+
<div class="section-title"><?php echo __('Shortcodes', 'accordions'); ?></div>
|
23 |
+
<p class="description section-description"><?php echo __('Simply copy these shortcode and user under content', 'accordions'); ?></p>
|
24 |
|
25 |
|
26 |
<?php
|
27 |
|
28 |
+
$shortcode = '<?php echo do_shortcode("[accordions id="' . esc_attr($post_id) . '"]"); ?>';
|
29 |
+
$shortcode2 = '<?php echo do_shortcode("[accordions_pplugins id="' . esc_attr($post_id) . '"]"); ?>';
|
30 |
|
31 |
+
//var_dump($shortcode);
|
32 |
|
33 |
ob_start();
|
34 |
|
35 |
?>
|
36 |
|
37 |
<div class="copy-to-clipboard">
|
38 |
+
<input type="text" value="[accordions id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied', 'accordions'); ?></span>
|
39 |
+
<p class="description"><?php echo __('You can use this shortcode under post content', 'accordions'); ?></p>
|
40 |
</div>
|
41 |
|
42 |
<div class="copy-to-clipboard">
|
43 |
+
<input type="text" value="[accordions_pplugins id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied', 'accordions'); ?></span>
|
44 |
+
<p class="description"><?php echo __('To avoid conflict with 3rd party shortcode also used same <code>[accordions]</code>You can use this shortcode under post content.', 'accordions'); ?></p>
|
45 |
</div>
|
46 |
|
47 |
<div class="copy-to-clipboard">
|
48 |
+
<textarea cols="50" rows="2" style="background:#bfefff" onClick="this.select();"><?php echo esc_textarea($shortcode); ?></textarea> <span class="copied"><?php echo __('Copied', 'accordions'); ?></span>
|
49 |
+
<p class="description"><?php echo __('PHP Code, you can use under theme .php files.', 'accordions'); ?></p>
|
50 |
</div>
|
51 |
|
52 |
<div class="copy-to-clipboard">
|
53 |
+
<textarea cols="50" rows="2" style="background:#bfefff" onClick="this.select();"><?php echo esc_textarea($shortcode2); ?></textarea> <span class="copied"><?php echo __('Copied', 'accordions'); ?></span>
|
54 |
+
<p class="description"><?php echo __('To avoid conflict, PHP code you can use under theme .php files.', 'accordions'); ?></p>
|
55 |
</div>
|
56 |
|
57 |
|
61 |
$html = ob_get_clean();
|
62 |
|
63 |
$args = array(
|
64 |
+
'id' => 'accordions_shortcodes',
|
65 |
+
'title' => __('Accordion shortcode', 'accordions'),
|
66 |
+
'details' => '',
|
67 |
+
'type' => 'custom_html',
|
68 |
+
'html' => $html,
|
69 |
|
70 |
|
71 |
);
|
75 |
|
76 |
<?php
|
77 |
|
78 |
+
$shortcode = '<?php echo do_shortcode("[accordions_tabs id="' . esc_attr($post_id) . '"]"); ?>';
|
79 |
+
$shortcode2 = '<?php echo do_shortcode("[accordions_tabs_pplugins id="' . esc_attr($post_id) . '"]"); ?>';
|
80 |
|
81 |
|
82 |
ob_start();
|
84 |
?>
|
85 |
|
86 |
<div class="copy-to-clipboard">
|
87 |
+
<input type="text" value="[accordions_tabs id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied', 'accordions'); ?></span>
|
88 |
+
<p class="description"><?php echo __('You can use this shortcode under post content', 'accordions'); ?></p>
|
89 |
</div>
|
90 |
|
91 |
<div class="copy-to-clipboard">
|
92 |
+
<input type="text" value="[accordions_tabs_pplugins id='<?php echo esc_attr($post_id); ?>']"> <span class="copied"><?php echo __('Copied', 'accordions'); ?></span>
|
93 |
+
<p class="description"><?php echo __('To avoid conflict with 3rd party shortcode also used same <code>[accordions_tabs]</code>You can use this shortcode under post content', 'accordions'); ?></p>
|
94 |
</div>
|
95 |
|
96 |
<div class="copy-to-clipboard">
|
97 |
+
<textarea cols="50" rows="2" style="background:#bfefff" onClick="this.select();"><?php echo esc_textarea($shortcode); ?></textarea> <span class="copied"><?php echo __('Copied', 'accordions'); ?></span>
|
98 |
+
<p class="description"><?php echo __('PHP Code, you can use under theme .php files.', 'accordions'); ?></p>
|
99 |
</div>
|
100 |
|
101 |
<div class="copy-to-clipboard">
|
102 |
+
<textarea cols="50" rows="2" style="background:#bfefff" onClick="this.select();"><?php echo esc_textarea($shortcode); ?></textarea> <span class="copied"><?php echo __('Copied', 'accordions'); ?></span>
|
103 |
+
<p class="description"><?php echo __('To avoid conflict, PHP code you can use under theme .php files.', 'accordions'); ?></p>
|
104 |
</div>
|
105 |
|
106 |
|
107 |
|
108 |
<style type="text/css">
|
109 |
+
.copy-to-clipboard {}
|
110 |
+
|
111 |
+
.copy-to-clipboard .copied {
|
112 |
display: none;
|
113 |
background: #e5e5e5;
|
114 |
padding: 4px 10px;
|
119 |
<script>
|
120 |
(function($) {
|
121 |
|
122 |
+
$(document).ready(function() {
|
|
|
123 |
|
124 |
|
|
|
125 |
|
126 |
+
$(document).on('click', '.copy-to-clipboard input, .copy-to-clipboard textarea', function() {
|
|
|
|
|
127 |
|
128 |
+
$(this).focus();
|
129 |
+
$(this).select();
|
130 |
+
document.execCommand('copy');
|
131 |
|
132 |
+
$(this).parent().children('.copied').fadeIn().fadeOut(2000);
|
133 |
+
})
|
134 |
|
135 |
+
})
|
136 |
+
})(jQuery);
|
137 |
</script>
|
138 |
|
139 |
|
144 |
$html = ob_get_clean();
|
145 |
|
146 |
$args = array(
|
147 |
+
'id' => 'accordions_shortcodes',
|
148 |
+
'title' => __('Tabs shortcodes', 'accordions'),
|
149 |
+
'details' => '',
|
150 |
+
'type' => 'custom_html',
|
151 |
+
'html' => $html,
|
152 |
|
153 |
|
154 |
);
|
166 |
|
167 |
|
168 |
</div>
|
169 |
+
<?php
|
170 |
}
|
171 |
|
172 |
|
173 |
add_action('accordions_metabox_content_general', 'accordions_metabox_content_general', 10);
|
174 |
|
175 |
+
function accordions_metabox_content_general($post_id)
|
176 |
+
{
|
177 |
|
178 |
$settings_tabs_field = new settings_tabs_field();
|
179 |
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
191 |
|
192 |
//var_dump($lazy_load);
|
193 |
|
194 |
+
?>
|
195 |
|
196 |
<div class="section">
|
197 |
+
<div class="section-title"><?php echo __('General options', 'accordions'); ?></div>
|
198 |
+
<p class="description section-description"><?php echo __('Some general options', 'accordions'); ?></p>
|
199 |
|
200 |
<?php
|
201 |
$args = array(
|
202 |
+
'id' => 'lazy_load',
|
203 |
+
'parent' => 'accordions_options',
|
204 |
+
'title' => __('Enable lazy load', 'accordions'),
|
205 |
+
'details' => __('Accordion content will be hidden until page load completed.', 'accordions'),
|
206 |
+
'type' => 'select',
|
207 |
+
'value' => $lazy_load,
|
208 |
+
'default' => 'yes',
|
209 |
+
'args' => array(
|
210 |
+
'no' => __('No', 'accordions'),
|
211 |
+
'yes' => __('Yes', 'accordions'),
|
212 |
),
|
213 |
);
|
214 |
|
215 |
$settings_tabs_field->generate_field($args);
|
216 |
|
217 |
$args = array(
|
218 |
+
'id' => 'lazy_load_src',
|
219 |
+
'parent' => 'accordions_options',
|
220 |
+
'title' => __('Lazy load image', 'accordions'),
|
221 |
+
'details' => __('Set custom image source for lazy load icon.', 'accordions'),
|
222 |
+
'type' => 'media_url',
|
223 |
+
'value' => $lazy_load_src,
|
224 |
+
'default' => '',
|
225 |
'placeholder' => '',
|
226 |
);
|
227 |
|
228 |
$settings_tabs_field->generate_field($args);
|
229 |
|
230 |
$args = array(
|
231 |
+
'id' => 'hide_edit',
|
232 |
+
'parent' => 'accordions_options',
|
233 |
+
'title' => __('Hide edit link', 'accordions'),
|
234 |
+
'details' => __('You can display/hide accordion edit link on front-end', 'accordions'),
|
235 |
+
'type' => 'select',
|
236 |
+
'value' => $hide_edit,
|
237 |
+
'default' => 'yes',
|
238 |
+
'args' => array(
|
239 |
+
'no' => __('No', 'accordions'),
|
240 |
+
'yes' => __('Yes', 'accordions'),
|
241 |
),
|
242 |
);
|
243 |
|
244 |
$settings_tabs_field->generate_field($args);
|
245 |
|
246 |
$args = array(
|
247 |
+
'id' => 'edit_link_access_role',
|
248 |
+
'parent' => 'accordions_options',
|
249 |
+
'title' => __('Who can see edit link', 'accordions'),
|
250 |
+
'details' => __('Select which user role can access to edit link.', 'accordions'),
|
251 |
+
'type' => 'select',
|
252 |
+
'multiple' => true,
|
253 |
+
'value' => $edit_link_access_role,
|
254 |
+
'default' => array('administrator'),
|
255 |
+
'args' => accordions_all_user_roles(),
|
256 |
);
|
257 |
|
258 |
$settings_tabs_field->generate_field($args);
|
261 |
|
262 |
|
263 |
$args = array(
|
264 |
+
'id' => 'enable_autoembed',
|
265 |
+
'parent' => 'accordions_options',
|
266 |
+
'title' => __('Enable autoembed', 'accordions'),
|
267 |
+
'details' => __('Enable autoembed for content.', 'accordions'),
|
268 |
+
'type' => 'select',
|
269 |
+
'value' => $enable_autoembed,
|
270 |
+
'default' => 'yes',
|
271 |
+
'args' => array(
|
272 |
+
'no' => __('No', 'accordions'),
|
273 |
+
'yes' => __('Yes', 'accordions'),
|
274 |
),
|
275 |
);
|
276 |
|
277 |
$settings_tabs_field->generate_field($args);
|
278 |
|
279 |
$args = array(
|
280 |
+
'id' => 'enable_shortcode',
|
281 |
+
'parent' => 'accordions_options',
|
282 |
+
'title' => __('Enable shortcode', 'accordions'),
|
283 |
+
'details' => __('Enable shortcode for content.', 'accordions'),
|
284 |
+
'type' => 'select',
|
285 |
+
'value' => $enable_shortcode,
|
286 |
+
'default' => 'yes',
|
287 |
+
'args' => array(
|
288 |
+
'no' => __('No', 'accordions'),
|
289 |
+
'yes' => __('Yes', 'accordions'),
|
290 |
),
|
291 |
);
|
292 |
|
293 |
$settings_tabs_field->generate_field($args);
|
294 |
|
295 |
$args = array(
|
296 |
+
'id' => 'enable_wpautop',
|
297 |
+
'parent' => 'accordions_options',
|
298 |
+
'title' => __('Enable wpautop', 'accordions'),
|
299 |
+
'details' => __('Enable wpautop for content.', 'accordions'),
|
300 |
+
'type' => 'select',
|
301 |
+
'value' => $enable_wpautop,
|
302 |
+
'default' => 'yes',
|
303 |
+
'args' => array(
|
304 |
+
'no' => __('No', 'accordions'),
|
305 |
+
'yes' => __('Yes', 'accordions'),
|
306 |
),
|
307 |
);
|
308 |
|
309 |
$settings_tabs_field->generate_field($args);
|
310 |
|
311 |
$args = array(
|
312 |
+
'id' => 'enable_schema',
|
313 |
+
'parent' => 'accordions_options',
|
314 |
+
'title' => __('Enable schema', 'accordions'),
|
315 |
+
'details' => __('Enable schema for accordion or tabs.', 'accordions'),
|
316 |
+
'type' => 'select',
|
317 |
+
'value' => $enable_schema,
|
318 |
+
'default' => 'no',
|
319 |
+
'args' => array(
|
320 |
+
'no' => __('No', 'accordions'),
|
321 |
+
'yes' => __('Yes', 'accordions'),
|
322 |
),
|
323 |
);
|
324 |
|
329 |
?>
|
330 |
|
331 |
</div>
|
332 |
+
<?php
|
333 |
|
334 |
}
|
335 |
|
336 |
add_action('accordions_metabox_content_accordion_options', 'accordions_metabox_content_accordion_options', 10);
|
337 |
|
338 |
+
function accordions_metabox_content_accordion_options($post_id)
|
339 |
+
{
|
340 |
|
341 |
$settings_tabs_field = new settings_tabs_field();
|
342 |
+
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
343 |
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
344 |
|
345 |
|
350 |
$active_event = isset($accordion['active_event']) ? $accordion['active_event'] : 'click';
|
351 |
|
352 |
|
353 |
+
?>
|
354 |
|
355 |
<div class="section">
|
356 |
+
<div class="section-title"><?php echo __('Accordion options', 'accordions'); ?></div>
|
357 |
+
<p class="description section-description"><?php echo __('Some general setting for accordion', 'accordions'); ?></p>
|
358 |
|
359 |
<?php
|
360 |
$args = array(
|
361 |
+
'id' => 'collapsible',
|
362 |
+
'parent' => 'accordions_options[accordion]',
|
363 |
+
'title' => __('Collapsible', 'accordions'),
|
364 |
+
'details' => __('Make accordion collapsible.', 'accordions'),
|
365 |
+
'type' => 'select',
|
366 |
+
'value' => $collapsible,
|
367 |
+
'default' => 'true',
|
368 |
+
'args' => array(
|
369 |
+
'true' => __('True', 'accordions'),
|
370 |
+
'false' => __('False', 'accordions'),
|
371 |
),
|
372 |
);
|
373 |
|
374 |
$settings_tabs_field->generate_field($args);
|
375 |
|
376 |
$args = array(
|
377 |
+
'id' => 'expanded_other',
|
378 |
+
'parent' => 'accordions_options[accordion]',
|
379 |
+
'title' => __('Keep expanded others', 'accordions'),
|
380 |
+
'details' => __('This is useful when use collapsible.', 'accordions'),
|
381 |
+
'type' => 'select',
|
382 |
+
'value' => $expanded_other,
|
383 |
+
'default' => 'no',
|
384 |
+
'args' => array(
|
385 |
+
'no' => __('No', 'accordions'),
|
386 |
+
'yes' => __('Yes', 'accordions'),
|
387 |
),
|
388 |
);
|
389 |
|
390 |
$settings_tabs_field->generate_field($args);
|
391 |
|
392 |
$args = array(
|
393 |
+
'id' => 'height_style',
|
394 |
+
'parent' => 'accordions_options[accordion]',
|
395 |
+
'title' => __('Content height style', 'accordions'),
|
396 |
+
'details' => __('accordion content style.', 'accordions'),
|
397 |
+
'type' => 'select',
|
398 |
+
'value' => $height_style,
|
399 |
+
'default' => 'content',
|
400 |
+
'args' => array(
|
401 |
+
|
402 |
+
'content' => __('Content', 'accordions'),
|
403 |
+
'fill' => __('Fill', 'accordions'),
|
404 |
),
|
405 |
);
|
406 |
|
407 |
$settings_tabs_field->generate_field($args);
|
408 |
|
409 |
$args = array(
|
410 |
+
'id' => 'active_event',
|
411 |
+
'parent' => 'accordions_options[accordion]',
|
412 |
+
'title' => __('Activate event', 'accordions'),
|
413 |
+
'details' => __('Activate event type for header.', 'accordions'),
|
414 |
+
'type' => 'select',
|
415 |
+
'value' => $active_event,
|
416 |
+
'default' => 'click',
|
417 |
+
'args' => array(
|
418 |
+
'click' => __('Click', 'accordions'),
|
419 |
+
'mouseover' => __('Mouseover', 'accordions'),
|
420 |
+
'focus' => __('Focus', 'accordions'),
|
421 |
),
|
422 |
);
|
423 |
|
425 |
?>
|
426 |
|
427 |
</div>
|
428 |
+
<?php
|
429 |
|
430 |
|
431 |
}
|
433 |
|
434 |
add_action('accordions_metabox_content_tabs_options', 'accordions_metabox_content_tabs_options', 10);
|
435 |
|
436 |
+
function accordions_metabox_content_tabs_options($post_id)
|
437 |
+
{
|
438 |
|
439 |
$settings_tabs_field = new settings_tabs_field();
|
440 |
+
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
441 |
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
442 |
|
443 |
|
447 |
$navs_alignment = isset($tabs['navs_alignment']) ? $tabs['navs_alignment'] : 'left';
|
448 |
|
449 |
|
450 |
+
?>
|
451 |
|
452 |
<div class="section">
|
453 |
+
<div class="section-title"><?php echo __('Tabs options', 'accordions'); ?></div>
|
454 |
+
<p class="description section-description"><?php echo __('Settings for tabs', 'accordions'); ?></p>
|
455 |
|
456 |
|
457 |
<?php
|
458 |
$args = array(
|
459 |
+
'id' => 'collapsible',
|
460 |
+
'parent' => 'accordions_options[tabs]',
|
461 |
+
'title' => __('Collapsible', 'accordions'),
|
462 |
+
'details' => __('Make tabs collapsible.', 'accordions'),
|
463 |
+
'type' => 'select',
|
464 |
+
'value' => $collapsible,
|
465 |
+
'default' => 'true',
|
466 |
+
'args' => array(
|
467 |
+
'true' => __('True', 'accordions'),
|
468 |
+
'false' => __('False', 'accordions'),
|
469 |
),
|
470 |
);
|
471 |
|
472 |
$settings_tabs_field->generate_field($args);
|
473 |
|
474 |
$args = array(
|
475 |
+
'id' => 'active_event',
|
476 |
+
'parent' => 'accordions_options[tabs]',
|
477 |
+
'title' => __('Activate event', 'accordions'),
|
478 |
+
'details' => __('Event for activate tabs', 'accordions'),
|
479 |
+
'type' => 'select',
|
480 |
+
'value' => $active_event,
|
481 |
+
'default' => 'click',
|
482 |
+
'args' => array(
|
483 |
+
'click' => __('Click', 'accordions'),
|
484 |
+
'mouseover' => __('Mouseover', 'accordions'),
|
485 |
),
|
486 |
);
|
487 |
|
488 |
$settings_tabs_field->generate_field($args);
|
489 |
|
490 |
$args = array(
|
491 |
+
'id' => 'navs_alignment',
|
492 |
+
'parent' => 'accordions_options[tabs]',
|
493 |
+
'title' => __('Navs alignment', 'accordions'),
|
494 |
+
'details' => __('Set navs alignment', 'accordions'),
|
495 |
+
'type' => 'select',
|
496 |
+
'value' => $navs_alignment,
|
497 |
+
'default' => 'left',
|
498 |
+
'args' => array(
|
499 |
+
'left' => __('Left', 'accordions'),
|
500 |
+
'right' => __('Right', 'accordions'),
|
501 |
),
|
502 |
);
|
503 |
|
507 |
?>
|
508 |
|
509 |
</div>
|
510 |
+
<?php
|
511 |
|
512 |
|
513 |
}
|
517 |
|
518 |
add_action('accordions_metabox_content_style', 'accordions_metabox_content_style', 10);
|
519 |
|
520 |
+
function accordions_metabox_content_style($post_id)
|
521 |
+
{
|
522 |
|
523 |
$settings_tabs_field = new settings_tabs_field();
|
524 |
+
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
525 |
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
526 |
|
527 |
$icon = isset($accordions_options['icon']) ? $accordions_options['icon'] : array();
|
560 |
$body_padding = isset($body['padding']) ? $body['padding'] : '';
|
561 |
$body_margin = isset($body['margin']) ? $body['margin'] : '';
|
562 |
|
563 |
+
?>
|
564 |
<div class="section">
|
565 |
+
<div class="section-title"><?php echo __('Accordion icons', 'accordions'); ?></div>
|
566 |
+
<p class="description section-description"><?php echo __('Customize accordion icons.', 'accordions'); ?></p>
|
567 |
|
568 |
<?php
|
569 |
|
570 |
$args = array(
|
571 |
+
'id' => 'active',
|
572 |
+
'parent' => 'accordions_options[icon]',
|
573 |
+
'title' => __('Active icon', 'accordions'),
|
574 |
+
'details' => __('Icon for idle, you can use <a target="_blank" href="https://fontawesome.com/icons">Font Awesome</a> icon html <code><i class="fas fa-chevron-right"></i></code>', 'accordions'),
|
575 |
+
'type' => 'text_icon',
|
576 |
+
'value' => $icon_active,
|
577 |
+
'default' => '',
|
578 |
'placeholder' => '',
|
579 |
);
|
580 |
|
581 |
$settings_tabs_field->generate_field($args);
|
582 |
|
583 |
$args = array(
|
584 |
+
'id' => 'inactive',
|
585 |
+
'parent' => 'accordions_options[icon]',
|
586 |
+
'title' => __('Inactive icon', 'accordions'),
|
587 |
+
'details' => __('Icon for activate, you can use <a target="_blank" href="https://fontawesome.com/icons">Font Awesome</a> icon html <code><i class="fas fa-chevron-down"></i></code>', 'accordions'),
|
588 |
+
'type' => 'text_icon',
|
589 |
+
'value' => $icon_inactive,
|
590 |
+
'default' => '',
|
591 |
'placeholder' => '',
|
592 |
);
|
593 |
|
594 |
$settings_tabs_field->generate_field($args);
|
595 |
|
596 |
$args = array(
|
597 |
+
'id' => 'color',
|
598 |
+
'css_id' => 'icon_color',
|
599 |
+
'parent' => 'accordions_options[icon]',
|
600 |
+
'title' => __('Color', 'accordions'),
|
601 |
+
'details' => __('Color for icons', 'accordions'),
|
602 |
+
'type' => 'colorpicker',
|
603 |
+
'value' => $icon_color,
|
604 |
+
'default' => '',
|
605 |
'placeholder' => '#999999',
|
606 |
);
|
607 |
|
608 |
$settings_tabs_field->generate_field($args);
|
609 |
|
610 |
$args = array(
|
611 |
+
'id' => 'color_hover',
|
612 |
+
'css_id' => 'icon_color_hover',
|
613 |
+
'parent' => 'accordions_options[icon]',
|
614 |
+
'title' => __('Hover color', 'accordions'),
|
615 |
+
'details' => __('Color for icons on mousehover', 'accordions'),
|
616 |
+
'type' => 'colorpicker',
|
617 |
+
'value' => $icon_color_hover,
|
618 |
+
'default' => '',
|
619 |
'placeholder' => '#777777',
|
620 |
);
|
621 |
|
622 |
$settings_tabs_field->generate_field($args);
|
623 |
|
624 |
$args = array(
|
625 |
+
'id' => 'background_color',
|
626 |
+
'css_id' => 'icon_background_color',
|
627 |
+
'parent' => 'accordions_options[icon]',
|
628 |
+
'title' => __('Background color', 'accordions'),
|
629 |
+
'details' => __('Background color for icons', 'accordions'),
|
630 |
+
'type' => 'colorpicker',
|
631 |
+
'value' => $icon_background_color,
|
632 |
+
'default' => '',
|
633 |
'placeholder' => '#777777',
|
634 |
);
|
635 |
|
636 |
$settings_tabs_field->generate_field($args);
|
637 |
|
638 |
$args = array(
|
639 |
+
'id' => 'font_size',
|
640 |
+
'parent' => 'accordions_options[icon]',
|
641 |
+
'title' => __('Font size', 'accordions'),
|
642 |
+
'details' => __('You can set custom font size.', 'accordions'),
|
643 |
+
'type' => 'text',
|
644 |
+
'value' => $icon_font_size,
|
645 |
+
'default' => '',
|
646 |
'placeholder' => '14px',
|
647 |
);
|
648 |
|
650 |
|
651 |
|
652 |
$args = array(
|
653 |
+
'id' => 'padding',
|
654 |
+
'parent' => 'accordions_options[icon]',
|
655 |
+
'title' => __('Padding', 'accordions'),
|
656 |
+
'details' => __('Choose icon area padding', 'accordions'),
|
657 |
+
'type' => 'text',
|
658 |
+
'value' => $icon_padding,
|
659 |
+
'default' => '',
|
660 |
'placeholder' => '10px',
|
661 |
);
|
662 |
|
663 |
$settings_tabs_field->generate_field($args);
|
664 |
|
665 |
$args = array(
|
666 |
+
'id' => 'margin',
|
667 |
+
'parent' => 'accordions_options[icon]',
|
668 |
+
'title' => __('Margin', 'accordions'),
|
669 |
+
'details' => __('Choose header area margin', 'accordions'),
|
670 |
+
'type' => 'text',
|
671 |
+
'value' => $icon_margin,
|
672 |
+
'default' => '',
|
673 |
'placeholder' => '5px',
|
674 |
);
|
675 |
|
677 |
|
678 |
|
679 |
$args = array(
|
680 |
+
'id' => 'position',
|
681 |
+
'parent' => 'accordions_options[icon]',
|
682 |
+
'title' => __('Position', 'accordions'),
|
683 |
+
'details' => __('Set icon position', 'accordions'),
|
684 |
+
'type' => 'select',
|
685 |
+
'value' => $icon_position,
|
686 |
+
'default' => 'left',
|
687 |
+
'args' => array(
|
688 |
+
'none' => __('None', 'accordions'),
|
689 |
+
'left' => __('Left', 'accordions'),
|
690 |
+
'right' => __('Right', 'accordions'),
|
691 |
),
|
692 |
|
693 |
);
|
699 |
|
700 |
|
701 |
<div class="section">
|
702 |
+
<div class="section-title"><?php echo __('Accordion header style', 'accordions'); ?></div>
|
703 |
+
<p class="description section-description"><?php echo __('Customize accordion header.', 'accordions'); ?></p>
|
704 |
<?php
|
705 |
|
706 |
$args = array(
|
707 |
+
'id' => 'class',
|
708 |
+
'css_id' => 'header_background_color',
|
709 |
+
'parent' => 'accordions_options[header]',
|
710 |
+
'title' => __('Add class', 'accordions'),
|
711 |
+
'details' => __('Header style class, ex: <code>border-flat, border-semi-round, border-round, border-1px border-2px border-3px, shadow-bottom, shadow-top shadow-bottom-right, shadow-bottom-left</code>', 'accordions'),
|
712 |
+
'type' => 'text',
|
713 |
+
'value' => $header_class,
|
714 |
+
'default' => '',
|
715 |
'placeholder' => '',
|
716 |
);
|
717 |
|
722 |
|
723 |
|
724 |
$args = array(
|
725 |
+
'id' => 'background_color',
|
726 |
+
'css_id' => 'header_background_color',
|
727 |
+
'parent' => 'accordions_options[header]',
|
728 |
+
'title' => __('Background color', 'accordions'),
|
729 |
+
'details' => __('Background color of header on idle', 'accordions'),
|
730 |
+
'type' => 'colorpicker',
|
731 |
+
'value' => $header_background_color,
|
732 |
+
'default' => '',
|
733 |
'placeholder' => '#eeeeee',
|
734 |
);
|
735 |
|
736 |
$settings_tabs_field->generate_field($args);
|
737 |
|
738 |
$args = array(
|
739 |
+
'id' => 'active_background_color',
|
740 |
+
'css_id' => 'header_active_background_color',
|
741 |
+
'parent' => 'accordions_options[header]',
|
742 |
+
'title' => __('Active background color', 'accordions'),
|
743 |
+
'details' => __('Background color of header on active stats', 'accordions'),
|
744 |
+
'type' => 'colorpicker',
|
745 |
+
'value' => $header_active_background_color,
|
746 |
+
'default' => '',
|
747 |
'placeholder' => '#dddddd',
|
748 |
);
|
749 |
|
750 |
$settings_tabs_field->generate_field($args);
|
751 |
|
752 |
$args = array(
|
753 |
+
'id' => 'color',
|
754 |
+
'css_id' => 'header_color',
|
755 |
+
'parent' => 'accordions_options[header]',
|
756 |
+
'title' => __('Color', 'accordions'),
|
757 |
+
'details' => __('Font color for accordion headers', 'accordions'),
|
758 |
+
'type' => 'colorpicker',
|
759 |
+
'value' => $header_color,
|
760 |
+
'default' => '',
|
761 |
'placeholder' => '#999999',
|
762 |
);
|
763 |
|
764 |
$settings_tabs_field->generate_field($args);
|
765 |
|
766 |
$args = array(
|
767 |
+
'id' => 'color_hover',
|
768 |
+
'css_id' => 'header_color_hover',
|
769 |
+
'parent' => 'accordions_options[header]',
|
770 |
+
'title' => __('Color on hover', 'accordions'),
|
771 |
+
'details' => __('Font color for accordion headers', 'accordions'),
|
772 |
+
'type' => 'colorpicker',
|
773 |
+
'value' => $header_color_hover,
|
774 |
+
'default' => '',
|
775 |
'placeholder' => '#7777777',
|
776 |
);
|
777 |
|
778 |
$settings_tabs_field->generate_field($args);
|
779 |
|
780 |
$args = array(
|
781 |
+
'id' => 'font_size',
|
782 |
+
'parent' => 'accordions_options[header]',
|
783 |
+
'title' => __('Font size', 'accordions'),
|
784 |
+
'details' => __('Choose font size for header text', 'accordions'),
|
785 |
+
'type' => 'text',
|
786 |
+
'value' => $header_font_size,
|
787 |
+
'default' => '',
|
788 |
'placeholder' => '14px',
|
789 |
);
|
790 |
|
792 |
|
793 |
|
794 |
$args = array(
|
795 |
+
'id' => 'font_family',
|
796 |
+
'parent' => 'accordions_options[header]',
|
797 |
+
'title' => __('Font family', 'accordions'),
|
798 |
+
'details' => __('Choose font family for header text', 'accordions'),
|
799 |
+
'type' => 'text',
|
800 |
+
'value' => $header_font_family,
|
801 |
'placeholder' => 'Open Sans',
|
802 |
);
|
803 |
|
804 |
$settings_tabs_field->generate_field($args);
|
805 |
|
806 |
$args = array(
|
807 |
+
'id' => 'padding',
|
808 |
+
'parent' => 'accordions_options[header]',
|
809 |
+
'title' => __('Padding', 'accordions'),
|
810 |
+
'details' => __('Choose header area padding', 'accordions'),
|
811 |
+
'type' => 'text',
|
812 |
+
'value' => $header_padding,
|
813 |
+
'default' => '',
|
814 |
'placeholder' => '10px',
|
815 |
);
|
816 |
|
817 |
$settings_tabs_field->generate_field($args);
|
818 |
|
819 |
$args = array(
|
820 |
+
'id' => 'margin',
|
821 |
+
'parent' => 'accordions_options[header]',
|
822 |
+
'title' => __('Margin', 'accordions'),
|
823 |
+
'details' => __('Choose header area margin', 'accordions'),
|
824 |
+
'type' => 'text',
|
825 |
+
'value' => $header_margin,
|
826 |
+
'default' => '',
|
827 |
'placeholder' => '5px',
|
828 |
);
|
829 |
|
833 |
</div>
|
834 |
|
835 |
<div class="section">
|
836 |
+
<div class="section-title"><?php echo __('Accordions content style', 'accordions'); ?></div>
|
837 |
+
<p class="description section-description"><?php echo __('Customize accordion content.', 'accordions'); ?></p>
|
838 |
|
839 |
<?php
|
840 |
|
841 |
$args = array(
|
842 |
+
'id' => 'class',
|
843 |
+
'css_id' => 'header_class',
|
844 |
+
'parent' => 'accordions_options[body]',
|
845 |
+
'title' => __('Add class', 'accordions'),
|
846 |
+
'details' => __('Body style class, ex: <code>border-flat, border-semi-round, border-round, border-1px border-2px border-3px, shadow-bottom, shadow-top shadow-bottom-right, shadow-bottom-left</code>', 'accordions'),
|
847 |
+
'type' => 'text',
|
848 |
+
'value' => $body_class,
|
849 |
+
'default' => '',
|
850 |
'placeholder' => '',
|
851 |
);
|
852 |
|
854 |
|
855 |
|
856 |
$args = array(
|
857 |
+
'id' => 'color',
|
858 |
+
'css_id' => 'body_color_hover',
|
859 |
+
'parent' => 'accordions_options[body]',
|
860 |
+
'title' => __('Color', 'accordions'),
|
861 |
+
'details' => __('You can choose custom color for accordion content', 'accordions'),
|
862 |
+
'type' => 'colorpicker',
|
863 |
+
'value' => $body_color,
|
864 |
+
'default' => '',
|
865 |
'placeholder' => '#999999',
|
866 |
);
|
867 |
|
871 |
|
872 |
<?php
|
873 |
$args = array(
|
874 |
+
'id' => 'font_size',
|
875 |
+
'parent' => 'accordions_options[body]',
|
876 |
+
'title' => __('Font size', 'accordions'),
|
877 |
+
'details' => __('You can set custom font size for accordion content', 'accordions'),
|
878 |
+
'type' => 'text',
|
879 |
+
'value' => $body_font_size,
|
880 |
+
'default' => '',
|
881 |
'placeholder' => '10px',
|
882 |
);
|
883 |
|
884 |
$settings_tabs_field->generate_field($args);
|
885 |
|
886 |
$args = array(
|
887 |
+
'id' => 'font_family',
|
888 |
+
'parent' => 'accordions_options[body]',
|
889 |
+
'title' => __('Font family', 'accordions'),
|
890 |
+
'details' => __('Choose font family for accordion content text', 'accordions'),
|
891 |
+
'type' => 'text',
|
892 |
+
'value' => $body_font_family,
|
893 |
'placeholder' => 'Open Sans',
|
894 |
);
|
895 |
|
899 |
|
900 |
<?php
|
901 |
$args = array(
|
902 |
+
'id' => 'background_color',
|
903 |
+
'css_id' => 'body_background_color',
|
904 |
+
'parent' => 'accordions_options[body]',
|
905 |
+
'title' => __('Background color', 'accordions'),
|
906 |
+
'details' => __('You can choose custom background color for accordion content area', 'accordions'),
|
907 |
+
'type' => 'colorpicker',
|
908 |
+
'value' => $body_background_color,
|
909 |
+
'default' => '#ffffff',
|
910 |
'placeholder' => '#ffffff',
|
911 |
);
|
912 |
|
916 |
|
917 |
<?php
|
918 |
$args = array(
|
919 |
+
'id' => 'padding',
|
920 |
+
'parent' => 'accordions_options[body]',
|
921 |
+
'title' => __('Padding', 'accordions'),
|
922 |
+
'details' => __('You can set custom padding for accordion content', 'accordions'),
|
923 |
+
'type' => 'text',
|
924 |
+
'value' => $body_padding,
|
925 |
+
'default' => '',
|
926 |
'placeholder' => '10px',
|
927 |
);
|
928 |
|
932 |
|
933 |
<?php
|
934 |
$args = array(
|
935 |
+
'id' => 'margin',
|
936 |
+
'parent' => 'accordions_options[body]',
|
937 |
+
'title' => __('Margin', 'accordions'),
|
938 |
+
'details' => __('You can set custom margin for accordion content', 'accordions'),
|
939 |
+
'type' => 'text',
|
940 |
+
'value' => $body_margin,
|
941 |
+
'default' => '',
|
942 |
'placeholder' => '10px',
|
943 |
);
|
944 |
|
948 |
</div>
|
949 |
|
950 |
<div class="section">
|
951 |
+
<div class="section-title"><?php echo __('Container style', 'accordions'); ?></div>
|
952 |
+
<p class="description section-description"><?php echo __('Customize container style optons.', 'accordions'); ?></p>
|
953 |
|
954 |
<?php
|
955 |
|
965 |
|
966 |
|
967 |
$args = array(
|
968 |
+
'id' => 'padding',
|
969 |
+
'parent' => 'accordions_options[container]',
|
970 |
+
'title' => __('Padding', 'accordions'),
|
971 |
+
'details' => __('Set container padding', 'accordions'),
|
972 |
+
'type' => 'text',
|
973 |
+
'value' => $container_padding,
|
974 |
+
'default' => '',
|
975 |
'placeholder' => '10px',
|
976 |
|
977 |
);
|
979 |
$settings_tabs_field->generate_field($args);
|
980 |
|
981 |
$args = array(
|
982 |
+
'id' => 'background_color',
|
983 |
+
'parent' => 'accordions_options[container]',
|
984 |
+
'title' => __('Background color', 'accordions'),
|
985 |
+
'details' => __('Set container background color', 'accordions'),
|
986 |
+
'type' => 'colorpicker',
|
987 |
+
'value' => $container_background_color,
|
988 |
+
'default' => '#ffffff',
|
989 |
'placeholder' => '',
|
990 |
|
991 |
);
|
993 |
$settings_tabs_field->generate_field($args);
|
994 |
|
995 |
$args = array(
|
996 |
+
'id' => 'text_align',
|
997 |
+
'parent' => 'accordions_options[container]',
|
998 |
+
'title' => __('Text align', 'accordions'),
|
999 |
+
'details' => __('Set container text align', 'accordions'),
|
1000 |
+
'type' => 'select',
|
1001 |
+
'value' => $container_text_align,
|
1002 |
+
'default' => 'left',
|
1003 |
+
'args' => array(
|
1004 |
+
'left' => __('Left', 'accordions'),
|
1005 |
+
'right' => __('Right', 'accordions'),
|
1006 |
+
'center' => __('Center', 'accordions'),
|
1007 |
+
'justify' => __('Justify', 'accordions'),
|
1008 |
|
1009 |
),
|
1010 |
|
1013 |
$settings_tabs_field->generate_field($args);
|
1014 |
|
1015 |
$args = array(
|
1016 |
+
'id' => 'background_img',
|
1017 |
+
'parent' => 'accordions_options[container]',
|
1018 |
+
'title' => __('Background image', 'accordions'),
|
1019 |
+
'details' => __('Set container background image', 'accordions'),
|
1020 |
+
'type' => 'media_url',
|
1021 |
+
'value' => $container_background_img,
|
1022 |
+
'default' => '',
|
1023 |
'placeholder' => '',
|
1024 |
|
1025 |
);
|
1029 |
|
1030 |
|
1031 |
$args = array(
|
1032 |
+
'id' => 'width',
|
1033 |
+
'title' => __('Container width', 'accordions'),
|
1034 |
+
'details' => __('Set accordion width.', 'accordions'),
|
1035 |
+
'type' => 'option_group',
|
1036 |
+
'options' => array(
|
1037 |
array(
|
1038 |
+
'id' => 'width_large',
|
1039 |
+
'parent' => 'accordions_options[container]',
|
1040 |
+
'title' => __('In desktop', 'accordions'),
|
1041 |
+
'details' => __('min-width: 1200px, ex: 300px', 'accordions'),
|
1042 |
+
'type' => 'text',
|
1043 |
+
'value' => $width_large,
|
1044 |
+
'default' => '',
|
1045 |
'placeholder' => '',
|
1046 |
),
|
1047 |
array(
|
1048 |
+
'id' => 'width_medium',
|
1049 |
+
'parent' => 'accordions_options[container]',
|
1050 |
+
'title' => __('In tablet & small desktop', 'accordions'),
|
1051 |
+
'details' => __('min-width: 992px, ex: 90%', 'accordions'),
|
1052 |
+
'type' => 'text',
|
1053 |
+
'value' => $width_medium,
|
1054 |
+
'default' => '',
|
1055 |
'placeholder' => '',
|
1056 |
),
|
1057 |
array(
|
1058 |
+
'id' => 'width_small',
|
1059 |
+
'parent' => 'accordions_options[container]',
|
1060 |
+
'title' => __('In mobile', 'accordions'),
|
1061 |
+
'details' => __('min-width: 576px, ex: 90%', 'accordions'),
|
1062 |
+
'type' => 'text',
|
1063 |
+
'value' => $width_small,
|
1064 |
+
'default' => '',
|
1065 |
'placeholder' => '',
|
1066 |
),
|
1067 |
),
|
1076 |
|
1077 |
</div>
|
1078 |
|
1079 |
+
<?php
|
1080 |
|
1081 |
}
|
1082 |
|
1084 |
|
1085 |
add_action('accordions_metabox_content_content', 'accordions_metabox_content_content', 10);
|
1086 |
|
1087 |
+
function accordions_metabox_content_content($post_id)
|
1088 |
+
{
|
1089 |
|
1090 |
$settings_tabs_field = new settings_tabs_field();
|
1091 |
+
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
1092 |
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
1093 |
|
1094 |
$accordions_content = isset($accordions_options['content']) ? $accordions_options['content'] : array();
|
1095 |
|
1096 |
|
1097 |
+
?>
|
1098 |
|
1099 |
<div class="section">
|
1100 |
+
<div class="section-title"><?php echo __('Accordions content', 'accordions'); ?></div>
|
1101 |
+
<p class="description section-description"><?php echo __('Add you accordion content here.', 'accordions'); ?></p>
|
1102 |
|
1103 |
<?php
|
1104 |
|
1107 |
|
1108 |
$meta_fields = array(
|
1109 |
array(
|
1110 |
+
'id' => 'header',
|
1111 |
+
'css_id' => 'header_TIMEINDEX',
|
1112 |
+
'title' => __('Header', 'accordions'),
|
1113 |
+
'details' => __('Accordion header.', 'accordions'),
|
1114 |
+
'type' => 'text',
|
1115 |
+
'value' => '',
|
1116 |
+
'default' => '',
|
1117 |
+
'placeholder' => 'Address',
|
1118 |
),
|
1119 |
array(
|
1120 |
+
'id' => 'body',
|
1121 |
+
'css_id' => 'body_TIMEINDEX',
|
1122 |
+
'title' => __('Accordion body', 'accordions'),
|
1123 |
+
'details' => __('Accordion body content.', 'accordions'),
|
1124 |
+
'type' => 'textarea_editor',
|
1125 |
+
'value' => '',
|
1126 |
+
'default' => '',
|
1127 |
+
'placeholder' => '',
|
1128 |
),
|
1129 |
array(
|
1130 |
+
'id' => 'hide',
|
1131 |
+
'css_id' => 'hide_TIMEINDEX',
|
1132 |
+
'title' => __('Hide', 'accordions'),
|
1133 |
+
'details' => __('Hide this.', 'accordions'),
|
1134 |
+
'type' => 'select',
|
1135 |
+
'value' => '',
|
1136 |
+
'default' => 'false',
|
1137 |
+
'args' => array(
|
1138 |
+
'true' => __('True', 'accordions'),
|
1139 |
+
'false' => __('False', 'accordions'),
|
1140 |
),
|
1141 |
),
|
|
|
1142 |
array(
|
1143 |
+
'id' => 'hide_schema',
|
1144 |
+
'css_id' => 'hide_TIMEINDEX',
|
1145 |
+
'title' => __('Hide schema', 'accordions'),
|
1146 |
+
'details' => __('Hide schema for this.', 'accordions'),
|
1147 |
+
'type' => 'select',
|
1148 |
+
'value' => '',
|
1149 |
+
'default' => 'false',
|
1150 |
+
'args' => array(
|
1151 |
+
'true' => __('True', 'accordions'),
|
1152 |
+
'false' => __('False', 'accordions'),
|
1153 |
),
|
1154 |
),
|
1155 |
|
1158 |
$meta_fields = apply_filters('accordions_content_fields', $meta_fields);
|
1159 |
|
1160 |
$args = array(
|
1161 |
+
'id' => 'content',
|
1162 |
+
'parent' => 'accordions_options',
|
1163 |
+
'title' => __('Accordion content', 'text-domain'),
|
1164 |
+
'details' => __('Set accordion content & title here.', 'text-domain'),
|
1165 |
+
'collapsible' => true,
|
1166 |
+
'type' => 'repeatable',
|
1167 |
+
'limit' => 10,
|
1168 |
+
'title_field' => 'header',
|
1169 |
+
'value' => $accordions_content,
|
1170 |
'fields' => $meta_fields,
|
1171 |
);
|
1172 |
|
1182 |
|
1183 |
|
1184 |
</div>
|
1185 |
+
<?php
|
1186 |
}
|
1187 |
|
1188 |
|
1189 |
add_action('accordions_metabox_content_custom_scripts', 'accordions_metabox_content_custom_scripts', 10);
|
1190 |
|
1191 |
+
function accordions_metabox_content_custom_scripts($post_id)
|
1192 |
+
{
|
1193 |
|
1194 |
|
1195 |
$settings_tabs_field = new settings_tabs_field();
|
1196 |
|
1197 |
+
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
1198 |
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
1199 |
|
1200 |
$custom_scripts = isset($accordions_options['custom_scripts']) ? $accordions_options['custom_scripts'] : array();
|
1202 |
$custom_css = isset($custom_scripts['custom_css']) ? $custom_scripts['custom_css'] : '';
|
1203 |
|
1204 |
|
1205 |
+
?>
|
1206 |
<div class="section">
|
1207 |
+
<div class="section-title"><?php echo __('Accordions Scripts', 'accordions'); ?></div>
|
1208 |
+
<p class="description section-description"><?php echo __('Add your own CSS & Scripts.', 'accordions'); ?></p>
|
1209 |
|
1210 |
<?php
|
1211 |
$args = array(
|
1212 |
+
'id' => 'custom_js',
|
1213 |
+
'parent' => 'accordions_options[custom_scripts]',
|
1214 |
+
'title' => __('Custom Js', 'accordions'),
|
1215 |
+
'details' => __('You can add custom scripts here, do not use <code><script> </script></code> tag', 'accordions'),
|
1216 |
+
'type' => 'scripts_js',
|
1217 |
+
'value' => htmlspecialchars_decode($custom_js, ENT_QUOTES),
|
1218 |
+
'default' => '',
|
1219 |
);
|
1220 |
|
1221 |
$settings_tabs_field->generate_field($args);
|
1222 |
|
1223 |
$args = array(
|
1224 |
+
'id' => 'custom_css',
|
1225 |
+
'parent' => 'accordions_options[custom_scripts]',
|
1226 |
+
'title' => __('Custom CSS', 'accordions'),
|
1227 |
+
'details' => __('You can add custom css here, do not use <code> <style> </style></code> tag', 'accordions'),
|
1228 |
+
'type' => 'scripts_css',
|
1229 |
+
'value' => $custom_css,
|
1230 |
+
'default' => '',
|
1231 |
);
|
1232 |
|
1233 |
$settings_tabs_field->generate_field($args);
|
1243 |
|
1244 |
add_action('accordions_metabox_content_help_support', 'accordions_metabox_content_help_support');
|
1245 |
|
1246 |
+
if (!function_exists('accordions_metabox_content_help_support')) {
|
1247 |
+
function accordions_metabox_content_help_support($tab)
|
1248 |
+
{
|
1249 |
|
1250 |
$settings_tabs_field = new settings_tabs_field();
|
1251 |
|
1252 |
+
?>
|
1253 |
<div class="section">
|
1254 |
|
1255 |
<div class="section-title"><?php echo __('Get support', 'accordions'); ?></div>
|
1283 |
$html = ob_get_clean();
|
1284 |
|
1285 |
$args = array(
|
1286 |
+
'id' => 'get_support',
|
1287 |
//'parent' => '',
|
1288 |
+
'title' => __('Ask question', 'accordions'),
|
1289 |
+
'details' => '',
|
1290 |
+
'type' => 'custom_html',
|
1291 |
+
'html' => $html,
|
1292 |
|
1293 |
);
|
1294 |
|
1308 |
$html = ob_get_clean();
|
1309 |
|
1310 |
$args = array(
|
1311 |
+
'id' => 'reviews',
|
1312 |
//'parent' => '',
|
1313 |
+
'title' => __('Submit reviews', 'accordions'),
|
1314 |
+
'details' => '',
|
1315 |
+
'type' => 'custom_html',
|
1316 |
+
'html' => $html,
|
1317 |
|
1318 |
);
|
1319 |
|
1327 |
|
1328 |
|
1329 |
</div>
|
1330 |
+
<?php
|
1331 |
|
1332 |
|
1333 |
}
|
1340 |
|
1341 |
|
1342 |
|
1343 |
+
add_action('accordions_post_meta_save', 'accordions_post_meta_save');
|
1344 |
|
1345 |
+
function accordions_post_meta_save($job_id)
|
1346 |
+
{
|
1347 |
|
1348 |
$accordions_options = isset($_POST['accordions_options']) ? accordions_recursive_sanitize_arr($_POST['accordions_options']) : '';
|
1349 |
update_post_meta($job_id, 'accordions_options', $accordions_options);
|
|
|
|
|
1350 |
}
|
includes/class-settings-tabs.php
CHANGED
@@ -402,8 +402,6 @@ if (!class_exists('settings_tabs_field')) {
|
|
402 |
$input_html = ob_get_clean();
|
403 |
|
404 |
echo accordions_wp_kses(sprintf($field_template, $title, $input_html, $group_details));
|
405 |
-
|
406 |
-
|
407 |
}
|
408 |
|
409 |
|
@@ -617,7 +615,9 @@ if (!class_exists('settings_tabs_field')) {
|
|
617 |
?>
|
618 |
<div class="item-wrap collapsible">
|
619 |
<div class="header">
|
620 |
-
<span class="remove" onclick="jQuery(this).parent().parent().remove()"
|
|
|
|
|
621 |
<?php
|
622 |
if ($sortable) :
|
623 |
?>
|
@@ -690,7 +690,6 @@ if (!class_exists('settings_tabs_field')) {
|
|
690 |
<?php if ($sortable) : ?>
|
691 |
<span class="sort"><i class="fas fa-arrows-alt"></i></span>
|
692 |
<?php endif; ?>
|
693 |
-
|
694 |
<span class="title-text"><?php echo esc_html($title_field_val); ?></span>
|
695 |
<?php if ($collapsible) : ?>
|
696 |
</div>
|
@@ -746,7 +745,6 @@ if (!class_exists('settings_tabs_field')) {
|
|
746 |
$input_html = ob_get_clean();
|
747 |
|
748 |
echo accordions_wp_kses(sprintf($field_template, $title, $input_html, $details));
|
749 |
-
|
750 |
}
|
751 |
|
752 |
|
@@ -1323,7 +1321,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1323 |
|
1324 |
ob_start();
|
1325 |
?>
|
1326 |
-
<textarea editor_enabled="no" class="textarea-editor"
|
1327 |
<?php
|
1328 |
|
1329 |
$input_html = ob_get_clean();
|
@@ -1356,6 +1354,8 @@ if (!class_exists('settings_tabs_field')) {
|
|
1356 |
$settings = wp_enqueue_code_editor(array('type' => 'text/javascript'));
|
1357 |
$code_editor = wp_json_encode($settings);
|
1358 |
|
|
|
|
|
1359 |
|
1360 |
ob_start();
|
1361 |
?>
|
@@ -1365,7 +1365,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1365 |
(function($) {
|
1366 |
|
1367 |
$(document).ready(function() {
|
1368 |
-
wp.codeEditor.initialize($('#<?php echo esc_attr($css_id); ?>'), <?php echo
|
1369 |
})
|
1370 |
})(jQuery);
|
1371 |
</script>
|
@@ -1409,12 +1409,8 @@ if (!class_exists('settings_tabs_field')) {
|
|
1409 |
<textarea name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" cols="40" rows="5" placeholder="<?php echo esc_attr($placeholder); ?>"><?php echo esc_textarea($value); ?></textarea>
|
1410 |
<script>
|
1411 |
(function($) {
|
1412 |
-
|
1413 |
$(document).ready(function() {
|
1414 |
-
|
1415 |
-
wp.codeEditor.initialize($('#<?php echo esc_attr($css_id); ?>'), <?php echo esc_attr($code_editor); ?>);
|
1416 |
-
|
1417 |
-
|
1418 |
})
|
1419 |
})(jQuery);
|
1420 |
</script>
|
402 |
$input_html = ob_get_clean();
|
403 |
|
404 |
echo accordions_wp_kses(sprintf($field_template, $title, $input_html, $group_details));
|
|
|
|
|
405 |
}
|
406 |
|
407 |
|
615 |
?>
|
616 |
<div class="item-wrap collapsible">
|
617 |
<div class="header">
|
618 |
+
<span class="remove" onclick="jQuery(this).parent().parent().remove()">
|
619 |
+
<?php echo accordions_wp_kses($remove_text); ?>
|
620 |
+
</span>
|
621 |
<?php
|
622 |
if ($sortable) :
|
623 |
?>
|
690 |
<?php if ($sortable) : ?>
|
691 |
<span class="sort"><i class="fas fa-arrows-alt"></i></span>
|
692 |
<?php endif; ?>
|
|
|
693 |
<span class="title-text"><?php echo esc_html($title_field_val); ?></span>
|
694 |
<?php if ($collapsible) : ?>
|
695 |
</div>
|
745 |
$input_html = ob_get_clean();
|
746 |
|
747 |
echo accordions_wp_kses(sprintf($field_template, $title, $input_html, $details));
|
|
|
748 |
}
|
749 |
|
750 |
|
1321 |
|
1322 |
ob_start();
|
1323 |
?>
|
1324 |
+
<textarea editor_enabled="no" class="textarea-editor" name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" cols="40" rows="5" placeholder="<?php echo esc_attr($placeholder); ?>"><?php echo ($value); ?></textarea>
|
1325 |
<?php
|
1326 |
|
1327 |
$input_html = ob_get_clean();
|
1354 |
$settings = wp_enqueue_code_editor(array('type' => 'text/javascript'));
|
1355 |
$code_editor = wp_json_encode($settings);
|
1356 |
|
1357 |
+
//var_dump($code_editor);
|
1358 |
+
|
1359 |
|
1360 |
ob_start();
|
1361 |
?>
|
1365 |
(function($) {
|
1366 |
|
1367 |
$(document).ready(function() {
|
1368 |
+
wp.codeEditor.initialize($('#<?php echo esc_attr($css_id); ?>'), <?php echo ($code_editor); ?>);
|
1369 |
})
|
1370 |
})(jQuery);
|
1371 |
</script>
|
1409 |
<textarea name="<?php echo esc_attr($field_name); ?>" id="<?php echo esc_attr($css_id); ?>" cols="40" rows="5" placeholder="<?php echo esc_attr($placeholder); ?>"><?php echo esc_textarea($value); ?></textarea>
|
1410 |
<script>
|
1411 |
(function($) {
|
|
|
1412 |
$(document).ready(function() {
|
1413 |
+
wp.codeEditor.initialize($('#<?php echo esc_attr($css_id); ?>'), <?php echo ($code_editor); ?>);
|
|
|
|
|
|
|
1414 |
})
|
1415 |
})(jQuery);
|
1416 |
</script>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Tags: accordion, tabs, FAQ, WooCommerce FAQ Tab, accordion short-code, accordions widget, tab
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 6.0
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -139,6 +139,10 @@ then paste this shortcode anywhere in your page to display accordions<br />
|
|
139 |
|
140 |
== Changelog ==
|
141 |
|
|
|
|
|
|
|
|
|
142 |
= 2.2.54 =
|
143 |
* 2022-09-01 - fix - Style issue fixed
|
144 |
|
4 |
Tags: accordion, tabs, FAQ, WooCommerce FAQ Tab, accordion short-code, accordions widget, tab
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 6.0
|
7 |
+
Stable tag: 2.2.55
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
139 |
|
140 |
== Changelog ==
|
141 |
|
142 |
+
= 2.2.55 =
|
143 |
+
* 2022-09-03 - fix - Content adding issue fixed.
|
144 |
+
|
145 |
+
|
146 |
= 2.2.54 =
|
147 |
* 2022-09-01 - fix - Style issue fixed
|
148 |
|