Accordion - Version 1.0.30

Version Description

Download this release

Release Info

Developer pickplugins
Plugin Icon 128x128 Accordion
Version 1.0.30
Comparing to
See all releases

Code changes from version 2.2.54 to 1.0.30

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.54
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.54');
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
- .settings-tabs .submit{
 
22
  padding: 15px 20px;
23
  }
24
 
@@ -26,27 +27,29 @@
26
 
27
  /* Collapsible */
28
 
29
- .settings-tabs .collapsible{
30
  margin-bottom: 2px;
31
  }
32
- .settings-tabs .collapsible .header{
 
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
- .settings-tabs .tab-navs{
 
68
  float: left;
69
  margin: 0;
70
  padding: 0;
71
  position: sticky;
72
  top: 32px;
73
  }
74
- .settings-tabs .tab-nav{
 
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:#f1f1f159;
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
- .settings-tabs .tab-content{
 
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
- .settings-tabs .section-title{
 
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
- .settings-tabs .setting-field .field-input{
 
217
  margin-left: 270px;
218
  }
219
- .settings-tabs .setting-field .description{
 
220
  word-break: break-word;
221
  }
222
 
223
- .settings-tabs .setting-field .setting-field{
224
  padding: 0 15px 15px 0px;
225
  }
226
- .settings-tabs .setting-field .setting-field .field-lable{
 
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
- .settings-tabs .expandable .setting-field .field-lable{
 
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
- .settings-tabs .expandable .setting-field .setting-field .field-lable{
 
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, .field-media-wrapper .clear {
 
270
  display: inline-block;
271
  background: #ddd;
272
  padding: 2px 10px;
273
  border-radius: 3px;
274
  border: 1px solid #999;
275
  }
276
- .ppof-settings .repeatable .item-wrap{
 
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
- .field-repeatable-wrapper .title-text{
 
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, .field-media-wrapper .clear {
 
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"], .settings-tabs .range-slider, .settings-tabs input[type="email"],.settings-tabs textarea, .settings-tabs select, .settings-tabs input[type="range"]{
 
 
 
 
 
334
  width: 360px;
335
  background: #f1f1f1;
336
  }
337
 
338
 
339
- @media (max-width: 1170px){
340
- .settings-tabs input[type="text"], .settings-tabs input[type="email"],.settings-tabs textarea, .settings-tabs select, .settings-tabs input[type="range"], .settings-tabs .select2{
 
 
 
 
 
 
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
- .settings-tabs .setting-field .field-input{
 
356
  margin-left: 0px;
357
  }
358
- .settings-tabs .setting-field .description{}
 
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
- .settings-tabs .setting-field .setting-field .field-input{
 
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:#f1f1f1;
428
  display: none;
429
  padding: 10px;
430
  }
@@ -465,7 +488,7 @@
465
 
466
  /*}*/
467
 
468
- .settings-tabs .expandable .options.active {
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
- .settings-tabs .accordion .accordion-title{
 
542
  padding: 10px;
543
  background: #f1f1f1;
544
  margin: 2px 0;
@@ -546,34 +572,31 @@
546
  font-weight: normal;
547
  font-size: 14px;
548
  }
549
- .settings-tabs .accordion .accordion-content{
 
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 ( min-width: 0px ) and ( max-width: 767px ){
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], input[type=radio] {
 
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
- $( 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);
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 ( ! 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
  $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');?></p>
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();" ><?php echo esc_textarea($shortcode); ?></textarea> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
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();" ><?php echo esc_textarea($shortcode2); ?></textarea> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
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' => 'accordions_shortcodes',
64
- 'title' => __('Accordion shortcode','accordions'),
65
- 'details' => '',
66
- 'type' => 'custom_html',
67
- 'html' => $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();" ><?php echo esc_textarea($shortcode); ?></textarea> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
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();" ><?php echo esc_textarea($shortcode); ?></textarea> <span class="copied"><?php echo __('Copied','accordions'); ?></span>
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
- .copy-to-clipboard .copied{
 
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
- $( document ).ready( function() {
121
-
122
 
123
 
124
- $(document).on('click', '.copy-to-clipboard input, .copy-to-clipboard textarea', function () {
125
 
126
- $(this).focus();
127
- $(this).select();
128
- document.execCommand('copy');
129
 
130
- $(this).parent().children('.copied').fadeIn().fadeOut(2000);
131
- })
 
132
 
133
- })
134
- })(jQuery);
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' => 'accordions_shortcodes',
147
- 'title' => __('Tabs shortcodes','accordions'),
148
- 'details' => '',
149
- 'type' => 'custom_html',
150
- 'html' => $html,
151
 
152
 
153
  );
@@ -165,13 +166,14 @@ $shortcode2 = '<?php echo do_shortcode("[accordions_tabs_pplugins id="'.esc_attr
165
 
166
 
167
  </div>
168
- <?php
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' => 'lazy_load',
201
- 'parent' => 'accordions_options',
202
- 'title' => __('Enable lazy load','accordions'),
203
- 'details' => __('Accordion content will be hidden until page load completed.','accordions'),
204
- 'type' => 'select',
205
- 'value' => $lazy_load,
206
- 'default' => 'yes',
207
- 'args' => array(
208
- 'no' => __('No','accordions'),
209
- 'yes' => __('Yes','accordions'),
210
  ),
211
  );
212
 
213
  $settings_tabs_field->generate_field($args);
214
 
215
  $args = array(
216
- 'id' => 'lazy_load_src',
217
- 'parent' => 'accordions_options',
218
- 'title' => __('Lazy load image','accordions'),
219
- 'details' => __('Set custom image source for lazy load icon.','accordions'),
220
- 'type' => 'media_url',
221
- 'value' => $lazy_load_src,
222
- 'default' => '',
223
  'placeholder' => '',
224
  );
225
 
226
  $settings_tabs_field->generate_field($args);
227
 
228
  $args = array(
229
- 'id' => 'hide_edit',
230
- 'parent' => 'accordions_options',
231
- 'title' => __('Hide edit link','accordions'),
232
- 'details' => __('You can display/hide accordion edit link on front-end','accordions'),
233
- 'type' => 'select',
234
- 'value' => $hide_edit,
235
- 'default' => 'yes',
236
- 'args' => array(
237
- 'no' => __('No','accordions'),
238
- 'yes' => __('Yes','accordions'),
239
  ),
240
  );
241
 
242
  $settings_tabs_field->generate_field($args);
243
 
244
  $args = array(
245
- 'id' => 'edit_link_access_role',
246
- 'parent' => 'accordions_options',
247
- 'title' => __('Who can see edit link','accordions'),
248
- 'details' => __('Select which user role can access to edit link.','accordions'),
249
- 'type' => 'select',
250
- 'multiple' => true,
251
- 'value' => $edit_link_access_role,
252
- 'default' => array('administrator'),
253
- 'args' => accordions_all_user_roles(),
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' => 'enable_autoembed',
263
- 'parent' => 'accordions_options',
264
- 'title' => __('Enable autoembed','accordions'),
265
- 'details' => __('Enable autoembed for content.','accordions'),
266
- 'type' => 'select',
267
- 'value' => $enable_autoembed,
268
- 'default' => 'yes',
269
- 'args' => array(
270
- 'no' => __('No','accordions'),
271
- 'yes' => __('Yes','accordions'),
272
  ),
273
  );
274
 
275
  $settings_tabs_field->generate_field($args);
276
 
277
  $args = array(
278
- 'id' => 'enable_shortcode',
279
- 'parent' => 'accordions_options',
280
- 'title' => __('Enable shortcode','accordions'),
281
- 'details' => __('Enable shortcode for content.','accordions'),
282
- 'type' => 'select',
283
- 'value' => $enable_shortcode,
284
- 'default' => 'yes',
285
- 'args' => array(
286
- 'no' => __('No','accordions'),
287
- 'yes' => __('Yes','accordions'),
288
  ),
289
  );
290
 
291
  $settings_tabs_field->generate_field($args);
292
 
293
  $args = array(
294
- 'id' => 'enable_wpautop',
295
- 'parent' => 'accordions_options',
296
- 'title' => __('Enable wpautop','accordions'),
297
- 'details' => __('Enable wpautop for content.','accordions'),
298
- 'type' => 'select',
299
- 'value' => $enable_wpautop,
300
- 'default' => 'yes',
301
- 'args' => array(
302
- 'no' => __('No','accordions'),
303
- 'yes' => __('Yes','accordions'),
304
  ),
305
  );
306
 
307
  $settings_tabs_field->generate_field($args);
308
 
309
  $args = array(
310
- 'id' => 'enable_schema',
311
- 'parent' => 'accordions_options',
312
- 'title' => __('Enable schema','accordions'),
313
- 'details' => __('Enable schema for accordion or tabs.','accordions'),
314
- 'type' => 'select',
315
- 'value' => $enable_schema,
316
- 'default' => 'no',
317
- 'args' => array(
318
- 'no' => __('No','accordions'),
319
- 'yes' => __('Yes','accordions'),
320
  ),
321
  );
322
 
@@ -327,16 +329,17 @@ function accordions_metabox_content_general($post_id){
327
  ?>
328
 
329
  </div>
330
- <?php
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' => 'collapsible',
359
- 'parent' => 'accordions_options[accordion]',
360
- 'title' => __('Collapsible','accordions'),
361
- 'details' => __('Make accordion collapsible.','accordions'),
362
- 'type' => 'select',
363
- 'value' => $collapsible,
364
- 'default' => 'true',
365
- 'args' => array(
366
- 'true' => __('True','accordions'),
367
- 'false' => __('False','accordions'),
368
  ),
369
  );
370
 
371
  $settings_tabs_field->generate_field($args);
372
 
373
  $args = array(
374
- 'id' => 'expanded_other',
375
- 'parent' => 'accordions_options[accordion]',
376
- 'title' => __('Keep expanded others','accordions'),
377
- 'details' => __('This is useful when use collapsible.','accordions'),
378
- 'type' => 'select',
379
- 'value' => $expanded_other,
380
- 'default' => 'no',
381
- 'args' => array(
382
- 'no' => __('No','accordions'),
383
- 'yes' => __('Yes','accordions'),
384
  ),
385
  );
386
 
387
  $settings_tabs_field->generate_field($args);
388
 
389
  $args = array(
390
- 'id' => 'height_style',
391
- 'parent' => 'accordions_options[accordion]',
392
- 'title' => __('Content height style','accordions'),
393
- 'details' => __('accordion content style.','accordions'),
394
- 'type' => 'select',
395
- 'value' => $height_style,
396
- 'default' => 'content',
397
- 'args' => array(
398
-
399
- 'content' => __('Content','accordions'),
400
- 'fill' => __('Fill','accordions'),
401
  ),
402
  );
403
 
404
  $settings_tabs_field->generate_field($args);
405
 
406
  $args = array(
407
- 'id' => 'active_event',
408
- 'parent' => 'accordions_options[accordion]',
409
- 'title' => __('Activate event','accordions'),
410
- 'details' => __('Activate event type for header.','accordions'),
411
- 'type' => 'select',
412
- 'value' => $active_event,
413
- 'default' => 'click',
414
- 'args' => array(
415
- 'click' => __('Click','accordions'),
416
- 'mouseover' => __('Mouseover','accordions'),
417
- 'focus' => __('Focus','accordions'),
418
  ),
419
  );
420
 
@@ -422,7 +425,7 @@ function accordions_metabox_content_accordion_options($post_id){
422
  ?>
423
 
424
  </div>
425
- <?php
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' => 'collapsible',
456
- 'parent' => 'accordions_options[tabs]',
457
- 'title' => __('Collapsible','accordions'),
458
- 'details' => __('Make tabs collapsible.','accordions'),
459
- 'type' => 'select',
460
- 'value' => $collapsible,
461
- 'default' => 'true',
462
- 'args' => array(
463
- 'true' => __('True','accordions'),
464
- 'false' => __('False','accordions'),
465
  ),
466
  );
467
 
468
  $settings_tabs_field->generate_field($args);
469
 
470
  $args = array(
471
- 'id' => 'active_event',
472
- 'parent' => 'accordions_options[tabs]',
473
- 'title' => __('Activate event','accordions'),
474
- 'details' => __('Event for activate tabs','accordions'),
475
- 'type' => 'select',
476
- 'value' => $active_event,
477
- 'default' => 'click',
478
- 'args' => array(
479
- 'click' => __('Click','accordions'),
480
- 'mouseover' => __('Mouseover','accordions'),
481
  ),
482
  );
483
 
484
  $settings_tabs_field->generate_field($args);
485
 
486
  $args = array(
487
- 'id' => 'navs_alignment',
488
- 'parent' => 'accordions_options[tabs]',
489
- 'title' => __('Navs alignment','accordions'),
490
- 'details' => __('Set navs alignment','accordions'),
491
- 'type' => 'select',
492
- 'value' => $navs_alignment,
493
- 'default' => 'left',
494
- 'args' => array(
495
- 'left' => __('Left','accordions'),
496
- 'right' => __('Right','accordions'),
497
  ),
498
  );
499
 
@@ -503,7 +507,7 @@ function accordions_metabox_content_tabs_options($post_id){
503
  ?>
504
 
505
  </div>
506
- <?php
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' => 'active',
567
- 'parent' => 'accordions_options[icon]',
568
- 'title' => __('Active icon','accordions'),
569
- 'details' => __('Icon for idle, you can use <a target="_blank" href="https://fontawesome.com/icons">Font Awesome</a> icon html <code>&lt;i class="fas fa-chevron-right">&lt;/i></code>','accordions'),
570
- 'type' => 'text_icon',
571
- 'value' => $icon_active,
572
- 'default' => '',
573
  'placeholder' => '',
574
  );
575
 
576
  $settings_tabs_field->generate_field($args);
577
 
578
  $args = array(
579
- 'id' => 'inactive',
580
- 'parent' => 'accordions_options[icon]',
581
- 'title' => __('Inactive icon','accordions'),
582
- 'details' => __('Icon for activate, you can use <a target="_blank" href="https://fontawesome.com/icons">Font Awesome</a> icon html <code>&lt;i class="fas fa-chevron-down">&lt;/i></code>','accordions'),
583
- 'type' => 'text_icon',
584
- 'value' => $icon_inactive,
585
- 'default' => '',
586
  'placeholder' => '',
587
  );
588
 
589
  $settings_tabs_field->generate_field($args);
590
 
591
  $args = array(
592
- 'id' => 'color',
593
- 'css_id' => 'icon_color',
594
- 'parent' => 'accordions_options[icon]',
595
- 'title' => __('Color','accordions'),
596
- 'details' => __('Color for icons','accordions'),
597
- 'type' => 'colorpicker',
598
- 'value' => $icon_color,
599
- 'default' => '',
600
  'placeholder' => '#999999',
601
  );
602
 
603
  $settings_tabs_field->generate_field($args);
604
 
605
  $args = array(
606
- 'id' => 'color_hover',
607
- 'css_id' => 'icon_color_hover',
608
- 'parent' => 'accordions_options[icon]',
609
- 'title' => __('Hover color','accordions'),
610
- 'details' => __('Color for icons on mousehover','accordions'),
611
- 'type' => 'colorpicker',
612
- 'value' => $icon_color_hover,
613
- 'default' => '',
614
  'placeholder' => '#777777',
615
  );
616
 
617
  $settings_tabs_field->generate_field($args);
618
 
619
  $args = array(
620
- 'id' => 'background_color',
621
- 'css_id' => 'icon_background_color',
622
- 'parent' => 'accordions_options[icon]',
623
- 'title' => __('Background color','accordions'),
624
- 'details' => __('Background color for icons','accordions'),
625
- 'type' => 'colorpicker',
626
- 'value' => $icon_background_color,
627
- 'default' => '',
628
  'placeholder' => '#777777',
629
  );
630
 
631
  $settings_tabs_field->generate_field($args);
632
 
633
  $args = array(
634
- 'id' => 'font_size',
635
- 'parent' => 'accordions_options[icon]',
636
- 'title' => __('Font size','accordions'),
637
- 'details' => __('You can set custom font size.','accordions'),
638
- 'type' => 'text',
639
- 'value' => $icon_font_size,
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' => 'padding',
649
- 'parent' => 'accordions_options[icon]',
650
- 'title' => __('Padding','accordions'),
651
- 'details' => __('Choose icon area padding','accordions'),
652
- 'type' => 'text',
653
- 'value' => $icon_padding,
654
- 'default' => '',
655
  'placeholder' => '10px',
656
  );
657
 
658
  $settings_tabs_field->generate_field($args);
659
 
660
  $args = array(
661
- 'id' => 'margin',
662
- 'parent' => 'accordions_options[icon]',
663
- 'title' => __('Margin','accordions'),
664
- 'details' => __('Choose header area margin','accordions'),
665
- 'type' => 'text',
666
- 'value' => $icon_margin,
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' => 'position',
676
- 'parent' => 'accordions_options[icon]',
677
- 'title' => __('Position','accordions'),
678
- 'details' => __('Set icon position','accordions'),
679
- 'type' => 'select',
680
- 'value' => $icon_position,
681
- 'default' => 'left',
682
- 'args' => array(
683
- 'none' => __('None','accordions'),
684
- 'left' => __('Left','accordions'),
685
- 'right' => __('Right','accordions'),
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' => 'class',
703
- 'css_id' => 'header_background_color',
704
- 'parent' => 'accordions_options[header]',
705
- 'title' => __('Add class','accordions'),
706
- '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'),
707
- 'type' => 'text',
708
- 'value' => $header_class,
709
- 'default' => '',
710
  'placeholder' => '',
711
  );
712
 
@@ -717,69 +722,69 @@ function accordions_metabox_content_style($post_id){
717
 
718
 
719
  $args = array(
720
- 'id' => 'background_color',
721
- 'css_id' => 'header_background_color',
722
- 'parent' => 'accordions_options[header]',
723
- 'title' => __('Background color','accordions'),
724
- 'details' => __('Background color of header on idle','accordions'),
725
- 'type' => 'colorpicker',
726
- 'value' => $header_background_color,
727
- 'default' => '',
728
  'placeholder' => '#eeeeee',
729
  );
730
 
731
  $settings_tabs_field->generate_field($args);
732
 
733
  $args = array(
734
- 'id' => 'active_background_color',
735
- 'css_id' => 'header_active_background_color',
736
- 'parent' => 'accordions_options[header]',
737
- 'title' => __('Active background color','accordions'),
738
- 'details' => __('Background color of header on active stats','accordions'),
739
- 'type' => 'colorpicker',
740
- 'value' => $header_active_background_color,
741
- 'default' => '',
742
  'placeholder' => '#dddddd',
743
  );
744
 
745
  $settings_tabs_field->generate_field($args);
746
 
747
  $args = array(
748
- 'id' => 'color',
749
- 'css_id' => 'header_color',
750
- 'parent' => 'accordions_options[header]',
751
- 'title' => __('Color','accordions'),
752
- 'details' => __('Font color for accordion headers','accordions'),
753
- 'type' => 'colorpicker',
754
- 'value' => $header_color,
755
- 'default' => '',
756
  'placeholder' => '#999999',
757
  );
758
 
759
  $settings_tabs_field->generate_field($args);
760
 
761
  $args = array(
762
- 'id' => 'color_hover',
763
- 'css_id' => 'header_color_hover',
764
- 'parent' => 'accordions_options[header]',
765
- 'title' => __('Color on hover','accordions'),
766
- 'details' => __('Font color for accordion headers','accordions'),
767
- 'type' => 'colorpicker',
768
- 'value' => $header_color_hover,
769
- 'default' => '',
770
  'placeholder' => '#7777777',
771
  );
772
 
773
  $settings_tabs_field->generate_field($args);
774
 
775
  $args = array(
776
- 'id' => 'font_size',
777
- 'parent' => 'accordions_options[header]',
778
- 'title' => __('Font size','accordions'),
779
- 'details' => __('Choose font size for header text','accordions'),
780
- 'type' => 'text',
781
- 'value' => $header_font_size,
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' => 'font_family',
791
- 'parent' => 'accordions_options[header]',
792
- 'title' => __('Font family','accordions'),
793
- 'details' => __('Choose font family for header text','accordions'),
794
- 'type' => 'text',
795
- 'value' => $header_font_family,
796
  'placeholder' => 'Open Sans',
797
  );
798
 
799
  $settings_tabs_field->generate_field($args);
800
 
801
  $args = array(
802
- 'id' => 'padding',
803
- 'parent' => 'accordions_options[header]',
804
- 'title' => __('Padding','accordions'),
805
- 'details' => __('Choose header area padding','accordions'),
806
- 'type' => 'text',
807
- 'value' => $header_padding,
808
- 'default' => '',
809
  'placeholder' => '10px',
810
  );
811
 
812
  $settings_tabs_field->generate_field($args);
813
 
814
  $args = array(
815
- 'id' => 'margin',
816
- 'parent' => 'accordions_options[header]',
817
- 'title' => __('Margin','accordions'),
818
- 'details' => __('Choose header area margin','accordions'),
819
- 'type' => 'text',
820
- 'value' => $header_margin,
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' => 'class',
838
- 'css_id' => 'header_class',
839
- 'parent' => 'accordions_options[body]',
840
- 'title' => __('Add class','accordions'),
841
- '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'),
842
- 'type' => 'text',
843
- 'value' => $body_class,
844
- 'default' => '',
845
  'placeholder' => '',
846
  );
847
 
@@ -849,14 +854,14 @@ function accordions_metabox_content_style($post_id){
849
 
850
 
851
  $args = array(
852
- 'id' => 'color',
853
- 'css_id' => 'body_color_hover',
854
- 'parent' => 'accordions_options[body]',
855
- 'title' => __('Color','accordions'),
856
- 'details' => __('You can choose custom color for accordion content','accordions'),
857
- 'type' => 'colorpicker',
858
- 'value' => $body_color,
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' => 'font_size',
870
- 'parent' => 'accordions_options[body]',
871
- 'title' => __('Font size','accordions'),
872
- 'details' => __('You can set custom font size for accordion content','accordions'),
873
- 'type' => 'text',
874
- 'value' => $body_font_size,
875
- 'default' => '',
876
  'placeholder' => '10px',
877
  );
878
 
879
  $settings_tabs_field->generate_field($args);
880
 
881
  $args = array(
882
- 'id' => 'font_family',
883
- 'parent' => 'accordions_options[body]',
884
- 'title' => __('Font family','accordions'),
885
- 'details' => __('Choose font family for accordion content text','accordions'),
886
- 'type' => 'text',
887
- 'value' => $body_font_family,
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' => 'background_color',
898
- 'css_id' => 'body_background_color',
899
- 'parent' => 'accordions_options[body]',
900
- 'title' => __('Background color','accordions'),
901
- 'details' => __('You can choose custom background color for accordion content area','accordions'),
902
- 'type' => 'colorpicker',
903
- 'value' => $body_background_color,
904
- 'default' => '#ffffff',
905
  'placeholder' => '#ffffff',
906
  );
907
 
@@ -911,13 +916,13 @@ function accordions_metabox_content_style($post_id){
911
 
912
  <?php
913
  $args = array(
914
- 'id' => 'padding',
915
- 'parent' => 'accordions_options[body]',
916
- 'title' => __('Padding','accordions'),
917
- 'details' => __('You can set custom padding for accordion content','accordions'),
918
- 'type' => 'text',
919
- 'value' => $body_padding,
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' => 'margin',
931
- 'parent' => 'accordions_options[body]',
932
- 'title' => __('Margin','accordions'),
933
- 'details' => __('You can set custom margin for accordion content','accordions'),
934
- 'type' => 'text',
935
- 'value' => $body_margin,
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' => 'padding',
964
- 'parent' => 'accordions_options[container]',
965
- 'title' => __('Padding','accordions'),
966
- 'details' => __('Set container padding','accordions'),
967
- 'type' => 'text',
968
- 'value' => $container_padding,
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' => 'background_color',
978
- 'parent' => 'accordions_options[container]',
979
- 'title' => __('Background color','accordions'),
980
- 'details' => __('Set container background color','accordions'),
981
- 'type' => 'colorpicker',
982
- 'value' => $container_background_color,
983
- 'default' => '#ffffff',
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' => 'text_align',
992
- 'parent' => 'accordions_options[container]',
993
- 'title' => __('Text align','accordions'),
994
- 'details' => __('Set container text align','accordions'),
995
- 'type' => 'select',
996
- 'value' => $container_text_align,
997
- 'default' => 'left',
998
- 'args' => array(
999
- 'left' => __('Left','accordions'),
1000
- 'right' => __('Right','accordions'),
1001
- 'center' => __('Center','accordions'),
1002
- 'justify' => __('Justify','accordions'),
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' => 'background_img',
1012
- 'parent' => 'accordions_options[container]',
1013
- 'title' => __('Background image','accordions'),
1014
- 'details' => __('Set container background image','accordions'),
1015
- 'type' => 'media_url',
1016
- 'value' => $container_background_img,
1017
- 'default' => '',
1018
  'placeholder' => '',
1019
 
1020
  );
@@ -1024,39 +1029,39 @@ function accordions_metabox_content_style($post_id){
1024
 
1025
 
1026
  $args = array(
1027
- 'id' => 'width',
1028
- 'title' => __('Container width','accordions'),
1029
- 'details' => __('Set accordion width.','accordions'),
1030
- 'type' => 'option_group',
1031
- 'options' => array(
1032
  array(
1033
- 'id' => 'width_large',
1034
- 'parent' => 'accordions_options[container]',
1035
- 'title' => __('In desktop','accordions'),
1036
- 'details' => __('min-width: 1200px, ex: 300px','accordions'),
1037
- 'type' => 'text',
1038
- 'value' => $width_large,
1039
- 'default' => '',
1040
  'placeholder' => '',
1041
  ),
1042
  array(
1043
- 'id' => 'width_medium',
1044
- 'parent' => 'accordions_options[container]',
1045
- 'title' => __('In tablet & small desktop','accordions'),
1046
- 'details' => __('min-width: 992px, ex: 90%','accordions'),
1047
- 'type' => 'text',
1048
- 'value' => $width_medium,
1049
- 'default' => '',
1050
  'placeholder' => '',
1051
  ),
1052
  array(
1053
- 'id' => 'width_small',
1054
- 'parent' => 'accordions_options[container]',
1055
- 'title' => __('In mobile','accordions'),
1056
- 'details' => __('min-width: 576px, ex: 90%','accordions'),
1057
- 'type' => 'text',
1058
- 'value' => $width_small,
1059
- 'default' => '',
1060
  'placeholder' => '',
1061
  ),
1062
  ),
@@ -1071,7 +1076,7 @@ function accordions_metabox_content_style($post_id){
1071
 
1072
  </div>
1073
 
1074
- <?php
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' => 'header',
1105
- 'css_id' => 'header_TIMEINDEX',
1106
- 'title' => __('Header','accordions'),
1107
- 'details' => __('Accordion header.','accordions'),
1108
- 'type' => 'text',
1109
- 'value' => '',
1110
- 'default' => '',
1111
- 'placeholder' => 'Address',
1112
  ),
1113
  array(
1114
- 'id' => 'body',
1115
- 'css_id' => 'body_TIMEINDEX',
1116
- 'title' => __('Accordion body','accordions'),
1117
- 'details' => __('Accordion body content.','accordions'),
1118
- 'type' => 'textarea_editor',
1119
- 'value' => '',
1120
- 'default' => '',
1121
- 'placeholder' => '',
1122
  ),
1123
  array(
1124
- 'id' => 'hide',
1125
- 'css_id' => 'hide_TIMEINDEX',
1126
- 'title' => __('Hide','accordions'),
1127
- 'details' => __('Hide this.','accordions'),
1128
- 'type' => 'select',
1129
- 'value' => '',
1130
- 'default' => 'false',
1131
- 'args' => array(
1132
- 'true' => __('True','accordions'),
1133
- 'false' => __('False','accordions'),
1134
  ),
1135
  ),
1136
-
1137
  array(
1138
- 'id' => 'hide_schema',
1139
- 'css_id' => 'hide_TIMEINDEX',
1140
- 'title' => __('Hide schema','accordions'),
1141
- 'details' => __('Hide schema for this.','accordions'),
1142
- 'type' => 'select',
1143
- 'value' => '',
1144
- 'default' => 'false',
1145
- 'args' => array(
1146
- 'true' => __('True','accordions'),
1147
- 'false' => __('False','accordions'),
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' => 'content',
1157
- 'parent' => 'accordions_options',
1158
- 'title' => __('Accordion content','text-domain'),
1159
- 'details' => __('Set accordion content & title here.','text-domain'),
1160
- 'collapsible'=> true,
1161
- 'type' => 'repeatable',
1162
- 'limit' => 10,
1163
- 'title_field' => 'header',
1164
- 'value' => $accordions_content,
1165
  'fields' => $meta_fields,
1166
  );
1167
 
@@ -1177,18 +1182,19 @@ function accordions_metabox_content_content($post_id){
1177
 
1178
 
1179
  </div>
1180
- <?php
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' => 'custom_js',
1207
- 'parent' => 'accordions_options[custom_scripts]',
1208
- 'title' => __('Custom Js','accordions'),
1209
- 'details' => __('You can add custom scripts here, do not use <code>&lt;script&gt; &lt;/script&gt;</code> tag','accordions'),
1210
- 'type' => 'scripts_js',
1211
- 'value' => htmlspecialchars_decode($custom_js, ENT_QUOTES),
1212
- 'default' => '',
1213
  );
1214
 
1215
  $settings_tabs_field->generate_field($args);
1216
 
1217
  $args = array(
1218
- 'id' => 'custom_css',
1219
- 'parent' => 'accordions_options[custom_scripts]',
1220
- 'title' => __('Custom CSS','accordions'),
1221
- 'details' => __('You can add custom css here, do not use <code> &lt;style&gt; &lt;/style&gt;</code> tag','accordions'),
1222
- 'type' => 'scripts_css',
1223
- 'value' => $custom_css,
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' => 'get_support',
1280
  //'parent' => '',
1281
- 'title' => __('Ask question','accordions'),
1282
- 'details' => '',
1283
- 'type' => 'custom_html',
1284
- 'html' => $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' => 'reviews',
1305
  //'parent' => '',
1306
- 'title' => __('Submit reviews','accordions'),
1307
- 'details' => '',
1308
- 'type' => 'custom_html',
1309
- 'html' => $html,
1310
 
1311
  );
1312
 
@@ -1320,7 +1327,7 @@ if(!function_exists('accordions_metabox_content_help_support')) {
1320
 
1321
 
1322
  </div>
1323
- <?php
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>&lt;i class="fas fa-chevron-right">&lt;/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>&lt;i class="fas fa-chevron-down">&lt;/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>&lt;script&gt; &lt;/script&gt;</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> &lt;style&gt; &lt;/style&gt;</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()"><?php echo accordions_wp_kses($remove_text); ?></span>
 
 
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" 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>
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 esc_attr($code_editor); ?>);
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.54
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