YITH WooCommerce Quick View - Version 1.3.17

Version Description

Released 29 November 2019

  • Update: Plugin framework
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Quick View
Version 1.3.17
Comparing to
See all releases

Code changes from version 1.3.16 to 1.3.17

Files changed (43) hide show
  1. README.txt +6 -2
  2. includes/class.yith-wcqv-admin.php +2 -1
  3. init.php +3 -3
  4. plugin-fw/assets/css/metaboxes.css +351 -320
  5. plugin-fw/assets/css/yit-plugin-panel.css +153 -4
  6. plugin-fw/assets/css/yith-fields.css +1088 -1099
  7. plugin-fw/assets/js/metabox.js +65 -52
  8. plugin-fw/assets/js/metabox.min.js +1 -1
  9. plugin-fw/assets/js/multisite-updater.min.js +8 -1
  10. plugin-fw/assets/js/wp-pages.js +23 -0
  11. plugin-fw/assets/js/wp-pages.min.js +1 -0
  12. plugin-fw/assets/js/yit-cpt-unlimited.min.js +2 -2
  13. plugin-fw/assets/js/yith-dashboard.min.js +1 -1
  14. plugin-fw/assets/js/yith-enhanced-select.min.js +10 -1
  15. plugin-fw/assets/js/yith-fields.js +63 -43
  16. plugin-fw/assets/js/yith-fields.min.js +29 -25
  17. plugin-fw/assets/js/yith-gutenberg.min.js +1 -1
  18. plugin-fw/assets/js/yith-promo.min.js +1 -1
  19. plugin-fw/assets/js/yith-system-info.min.js +1 -13
  20. plugin-fw/assets/js/yith-update-plugins.min.js +1 -1
  21. plugin-fw/init.php +2 -8
  22. plugin-fw/lib/promo/yith-promo.php +19 -3
  23. plugin-fw/lib/promo/yith-promo.xml +2 -41
  24. plugin-fw/lib/yit-assets.php +7 -7
  25. plugin-fw/lib/yit-metabox.php +131 -188
  26. plugin-fw/lib/yit-plugin-panel-wc.php +53 -31
  27. plugin-fw/lib/yit-plugin-panel.php +541 -189
  28. plugin-fw/lib/yit-plugin-subpanel.php +0 -5
  29. plugin-fw/templates/fields/checkbox-array.php +35 -0
  30. plugin-fw/templates/fields/country-select.php +64 -0
  31. plugin-fw/templates/fields/datepicker.php +1 -1
  32. plugin-fw/templates/fields/onoff.php +6 -3
  33. plugin-fw/templates/fields/title.php +1 -1
  34. plugin-fw/templates/fields/toggle-element.php +194 -177
  35. plugin-fw/templates/fields/upload.php +13 -11
  36. plugin-fw/templates/metaboxes/field-row.php +7 -3
  37. plugin-fw/templates/metaboxes/tab.php +16 -12
  38. plugin-fw/templates/panel/sub-tabs-nav.php +46 -0
  39. plugin-fw/templates/panel/woocommerce/woocommerce-form.php +6 -3
  40. plugin-fw/templates/panel/woocommerce/woocommerce-option-row.php +3 -1
  41. plugin-fw/templates/panel/woocommerce/woocommerce-panel.php +7 -14
  42. plugin-fw/templates/sysinfo/system-information-panel.php +32 -0
  43. plugin-fw/yit-functions.php +192 -240
README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: yithemes
3
  Tags: woocommerce, quick view, woocommerce quick view, products quick view
4
  Requires at least: 4.0
5
  Tested up to: 5.3
6
- Stable tag: 1.3.16
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -42,6 +42,10 @@ Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woo
42
 
43
  == Changelog ==
44
 
 
 
 
 
45
  = 1.3.16 = Released 05 November 2019
46
 
47
  * Update: Plugin framework
@@ -253,6 +257,6 @@ Or, if you have created your own language pack, or have an update for an existin
253
 
254
  == Upgrade notice ==
255
 
256
- = 1.3.16 = Released 05 November 2019
257
 
258
  * Update: Plugin framework
3
  Tags: woocommerce, quick view, woocommerce quick view, products quick view
4
  Requires at least: 4.0
5
  Tested up to: 5.3
6
+ Stable tag: 1.3.17
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
42
 
43
  == Changelog ==
44
 
45
+ = 1.3.17 = Released 29 November 2019
46
+
47
+ * Update: Plugin framework
48
+
49
  = 1.3.16 = Released 05 November 2019
50
 
51
  * Update: Plugin framework
257
 
258
  == Upgrade notice ==
259
 
260
+ = 1.3.17 = Released 29 November 2019
261
 
262
  * Update: Plugin framework
includes/class.yith-wcqv-admin.php CHANGED
@@ -151,7 +151,8 @@ if ( ! class_exists( 'YITH_WCQV_Admin' ) ) {
151
  'page' => $this->_panel_page,
152
  'admin-tabs' => $admin_tabs,
153
  'options-path' => YITH_WCQV_DIR . '/plugin-options',
154
- 'class' => yith_set_wrapper_class()
 
155
  );
156
 
157
 
151
  'page' => $this->_panel_page,
152
  'admin-tabs' => $admin_tabs,
153
  'options-path' => YITH_WCQV_DIR . '/plugin-options',
154
+ 'class' => yith_set_wrapper_class(),
155
+ 'plugin_slug' => YITH_WCQV_SLUG
156
  );
157
 
158
 
init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Quick View
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
5
  * Description: The <code><strong>YITH WooCommerce Quick View</strong></code> plugin allows your customers to have a quick look about products. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
- * Version: 1.3.16
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-quick-view
@@ -13,7 +13,7 @@
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Quick View
16
- * @version 1.3.16
17
  */
18
  /* Copyright 2015-2019 - YITH (email : plugins@yithemes.com)
19
 
@@ -61,7 +61,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
61
 
62
 
63
  if ( ! defined( 'YITH_WCQV_VERSION' ) ){
64
- define( 'YITH_WCQV_VERSION', '1.3.16' );
65
  }
66
 
67
  if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
3
  * Plugin Name: YITH WooCommerce Quick View
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
5
  * Description: The <code><strong>YITH WooCommerce Quick View</strong></code> plugin allows your customers to have a quick look about products. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
+ * Version: 1.3.17
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-quick-view
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Quick View
16
+ * @version 1.3.17
17
  */
18
  /* Copyright 2015-2019 - YITH (email : plugins@yithemes.com)
19
 
61
 
62
 
63
  if ( ! defined( 'YITH_WCQV_VERSION' ) ){
64
+ define( 'YITH_WCQV_VERSION', '1.3.17' );
65
  }
66
 
67
  if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
plugin-fw/assets/css/metaboxes.css CHANGED
@@ -1,208 +1,239 @@
1
  /* self-clear floats */
2
  .clearfix:after {
3
- content: ".";
4
- display: block;
5
- height: 0;
6
- clear: both;
7
- visibility: hidden;
8
- overflow: hidden;
9
  }
10
 
11
  /* ie.css */
12
  * html .clearfix { /* IE6 */
13
- height: 1%;
14
  }
15
 
16
  *:first-child + html .clearfix { /* IE7 */
17
- min-height: 1%;
18
  }
19
 
20
  .clearboth {
21
- clear: both
22
  }
23
 
24
  /* === TAB STYLE */
25
  .metaboxes-tab {
26
- margin: -6px -12px -8px;
27
  }
28
 
29
  .metaboxes-tab div.tabs-panel {
30
- height: auto;
31
- overflow: visible;
32
- margin-top: 0px;
33
- padding: 0 10px;
34
- background: none;
35
- border: 0;
36
  }
37
 
38
  .metaboxes-tab ul.metaboxes-tabs {
39
- background: #f1f1f1;
40
- margin: 0;
41
- padding: 10px 0 0 5px;
42
  }
43
 
44
  .metaboxes-tab ul.metaboxes-tabs li {
45
- float: left;
46
- background: #dedede;
47
- margin: 0 0 0 5px;
48
  }
49
 
50
  .metaboxes-tab ul.metaboxes-tabs li a {
51
- color: #555;
52
- text-decoration: none;
53
- padding: 8px 15px;
54
- display: block;
55
- box-shadow: none !important;
56
  }
57
 
58
  .metaboxes-tab ul.metaboxes-tabs li.tabs {
59
- background: #fff;
60
  }
61
 
62
  .metaboxes-tab p.field-row {
63
- margin: 20px 0;
64
  }
65
 
66
  .metaboxes-tab div.sep {
67
- height: 1px;
68
- background: #dfdfdf;
69
- clear: both;
70
- margin-left: -10px;
71
- margin-right: -10px;
72
  }
73
 
74
  .metaboxes-tab label {
75
- font-weight: bold;
76
- width: 160px;
77
- float: left;
78
- line-height: 23px;
79
- margin-left: -184px;
80
  }
81
 
82
  .metaboxes-tab label small {
83
- font-weight: normal;
84
- line-height: 15px;
85
- font-style: italic;
86
- color: #999;
87
- display: block;
88
  }
89
 
90
  .metaboxes-tab .yith-plugin-fw-radio__row {
91
- width: 100%;
92
- min-height: 20px;
93
  }
94
 
95
  .metaboxes-tab .yith-plugin-fw-radio__row label,
96
  .metaboxes-tab .yith-toggle-elements label,
97
  .metaboxes-tab .yith-add-box label {
98
- margin-left: 0;
99
- font-weight: normal;
100
  }
101
 
102
  .metaboxes-tab.yith-plugin-ui h3 {
103
- color: #2a8db0;
104
- font-size: 15px;
105
- text-transform: uppercase;
106
- background-color: #fff;
107
- padding: 35px 20px;
108
- margin: 0px 0 0 -4px;
109
- width: auto;
110
- background: transparent;
111
  }
112
 
113
  .metaboxes-tab.yith-plugin-ui .yith-add-box,
114
  .metaboxes-tab.yith-plugin-ui .yith-toggle-row {
115
- width: auto;
116
  }
117
 
118
  .metaboxes-tab .wp-picker-container label {
119
- font-weight: inherit;
120
- width: auto;
121
- float: none;
122
- line-height: inherit;
123
- margin-left: 0;
124
  }
125
 
126
  .metaboxes-tab.yith-plugin-ui .yith-plugin-fw-radio__row label {
127
- width: auto !important;
128
- display: inline-block;
129
- font-weight: normal;
130
  }
131
 
132
  .metaboxes-tab input[type="checkbox"] {
133
- vertical-align: middle
134
  }
135
 
136
  .metaboxes-tab input.button-secondary, .metaboxes-tab input.checkbox {
137
- width: auto;
138
  }
139
 
140
  .metaboxes-tab p.field-row.textarea .description {
141
- vertical-align: top;
142
  }
143
 
144
  .metaboxes-tab p.field-row.checkbox {
145
- background: none;
146
  }
147
 
148
  .metaboxes-tab .the-metabox {
149
- margin: 20px 0;
150
- margin-left: 184px;
151
  }
152
 
153
  .metaboxes-tab .the-metabox.no-label {
154
- margin: 20px 0;
155
- margin-left: 0;
156
  }
157
 
158
  .metaboxes-tab hr {
159
- height: 0px;
160
- border-top: 1px solid #dadada;
161
- width: auto;
162
- margin-left: -10px;
163
- margin-right: -10px;
164
  }
165
 
166
  .metaboxes-tab .the-metabox p {
167
- margin: 0;
168
  }
169
 
170
  .metaboxes-tab .the-metabox:last-child {
171
- border-bottom: 0px;
172
  }
173
 
174
  .metaboxes-tab .the-metabox.checkbox {
175
- background: none;
176
  }
177
 
178
  .metaboxes-tab span.description.inline {
179
- display: inline-block;
180
- line-height: 23px;
181
- width: auto;
182
- vertical-align: middle;
183
- margin: 0;
184
  }
185
 
186
  .metaboxes-tab .slider label {
187
- padding: 15px 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  }
189
 
190
  /* sortable table posts */
191
 
192
  #the-list.ui-sortable tr:hover {
193
- cursor: move;
194
  }
195
 
196
  .the-metabox.preview {
197
- float: none;
198
  }
199
 
200
  .metaboxes-tab .the-metabox.no-label.preview {
201
- margin-left: 184px;
202
  }
203
 
204
  .metaboxes-tab .the-metabox.no-label.preview img {
205
- box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
206
  }
207
 
208
  /**************************************
@@ -218,504 +249,504 @@
218
  .metaboxes-tab .yith-plugin-fw-text-input,
219
  .metaboxes-tab .yith-plugin-fw-text-array-table,
220
  .metaboxes-tab .yith-plugin-fw-textarea {
221
- width: 400px;
222
- max-width: 100%;
223
  }
224
 
225
  .metaboxes-tab.yith-plugin-ui input[type=number] {
226
- width: auto;
227
- min-width: 90px;
228
  }
229
 
230
  .metaboxes-tab.yith-plugin-ui p {
231
- font-size: 14px;
232
  }
233
 
234
  .metaboxes-tab.yith-plugin-ui p.section-description {
235
 
236
- margin: 0 20px 40px 18px;
237
  }
238
 
239
  .metaboxes-tab .yith-plugin-fw-text-array-table input[type=text] {
240
- width: 100%;
241
  }
242
 
243
  .metaboxes-tab.yith-plugin-ui .yith-add-box h3 {
244
- padding: 0 0 30px 0;
245
- font-weight: 600;
246
- margin: 0;
247
  }
248
 
249
  .metaboxes-tab.yith-plugin-ui .select2-container--default .select2-selection--single {
250
- border: 0;
251
- margin: 0;
252
  }
253
 
254
  /* wp editor */
255
  .the-metabox.textarea-editor .mceIframeContainer {
256
- background: #fff;
257
  }
258
 
259
 
260
  .the-metabox.textarea-editor label {
261
- margin-top: 24px;
262
  }
263
 
264
  /* categories */
265
  .categories-panel {
266
- width: 30%;
267
- float: left;
268
- margin-right: 4px;
269
  }
270
 
271
  .categories-panel .box {
272
- height: 200px;
273
- border: 1px solid #dfdfdf;
274
- background: #fff;
275
- padding: 6px 10px;
276
- overflow: auto;
277
  }
278
 
279
  .categories-panel ul {
280
- list-style: none;
281
- margin: 0;
282
  }
283
 
284
  .categories-panel ul li {
285
- line-height: 19px;
286
- margin: 0;
287
- padding: 0;
288
- word-wrap: break-word;
289
  }
290
 
291
  .categories-panel ul li label {
292
- font-weight: normal !important;
293
- margin-left: 0 !important;
294
  }
295
 
296
  .categories-panel input.newcategory {
297
- width: 100%;
298
- margin-bottom: 3px;
299
  }
300
 
301
  /* contact form */
302
  .contactform_item {
303
- border-style: solid;
304
- border-width: 1px;
305
- line-height: 1;
306
- margin-bottom: 20px;
307
- padding: 0;
308
- background-color: #f5f5f5;
309
- background-image: -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
310
- border-color: #dfdfdf;
311
- border-radius: 3px 3px 3px 3px;
312
- box-shadow: 0 1px 0 #fff inset;
313
- min-width: 255px;
314
- position: relative;
315
  }
316
 
317
  .contactform_item .handlediv {
318
- position: relative;
319
- top: -4px;
320
  }
321
 
322
  .contactform_item h3 {
323
- min-height: 21px;
324
- margin: 13px;
325
  }
326
 
327
  .contactform_item .inside {
328
- padding: 10px !important;
329
  }
330
 
331
  .contactform_item .deps {
332
- display: none;
333
  }
334
 
335
  .contactform_item .addoptions p.option {
336
- margin: 5px 0 5px 200px
337
  }
338
 
339
  .contactform_item .addoptions p label {
340
- width: 80px !important;
341
  }
342
 
343
  .contactform_item .add-field-option {
344
- margin-bottom: 10px !important;
345
  }
346
 
347
  .remove_item {
348
- float: right;
349
  }
350
 
351
  .metabox-sortable-placeholder {
352
- border: 1px dotted #dedede;
353
- margin: 10px 0
354
  }
355
 
356
  /* features tab */
357
  .featurestab_item {
358
- border-style: solid;
359
- border-width: 1px;
360
- line-height: 1;
361
- margin-bottom: 20px;
362
- padding: 0;
363
- background-color: #f5f5f5;
364
- background-image: -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
365
- border-color: #dfdfdf;
366
- border-radius: 3px 3px 3px 3px;
367
- box-shadow: 0 1px 0 #fff inset;
368
- min-width: 255px;
369
- position: relative;
370
  }
371
 
372
  .featurestab_item .handlediv {
373
- position: relative;
374
- top: -4px;
375
  }
376
 
377
  .featurestab_item h3 {
378
- min-height: 21px
379
  }
380
 
381
  .featurestab_item .inside {
382
- padding: 10px !important;
383
  }
384
 
385
  .featurestab_item .deps {
386
- display: none;
387
  }
388
 
389
  .featurestab_item .addoptions p.option {
390
- margin: 5px 0 5px 200px
391
  }
392
 
393
  .featurestab_item .addoptions p label {
394
- width: 80px !important;
395
  }
396
 
397
  .featurestab_item .add-field-option {
398
- margin-bottom: 10px !important;
399
  }
400
 
401
  .messages-panel.updated {
402
- margin: 10px 0px 10px !important;
403
- max-width: 1200px;
404
- border-radius: 5px;
405
- -webkit-box-sizing: border-box;
406
- box-sizing: border-box;
407
  }
408
 
409
  .ui-widget-overlay {
410
- background-image: none !important;
411
  }
412
 
413
  .the-metabox .icon_type {
414
- width: 30%;
415
- float: left;
416
- margin-right: 40px
417
  }
418
 
419
  #post-type-settings .category-list label {
420
- width: 187px;
421
  }
422
 
423
  .remove_cat {
424
- float: right;
425
- text-align: center;
426
- display: block;
427
- width: 20px;
428
- height: 20px;
429
- border-radius: 20px;
430
- font-weight: bold;
431
- font-size: 10px;
432
- background: #efefef;
433
- text-decoration: none;
434
  }
435
 
436
  /* typography */
437
  .the-metabox.typography .select_wrapper.font-family {
438
- width: 200px;
439
  }
440
 
441
  .the-metabox.typography .spinner_container {
442
- float: left;
443
- margin-right: 10px;
444
  }
445
 
446
  .the-metabox.typography .spinner_container input.number {
447
- width: 50px !important;
448
- -webkit-border-top-right-radius: 0px;
449
- -webkit-border-bottom-right-radius: 0px;
450
- -moz-border-radius-topright: 0px;
451
- -moz-border-radius-bottomright: 0px;
452
- border-top-right-radius: 0px;
453
- border-bottom-right-radius: 0px;
454
  }
455
 
456
  /* number */
457
  .the-metabox.number input.number {
458
- width: 50px !important;
459
  }
460
 
461
  /* number */
462
  .rm_number .number {
463
- width: 70px;
464
- text-align: right;
465
- -webkit-border-top-right-radius: 0px;
466
- -webkit-border-bottom-right-radius: 0px;
467
- -moz-border-radius-topright: 0px;
468
- -moz-border-radius-bottomright: 0px;
469
- border-top-right-radius: 0px;
470
- border-bottom-right-radius: 0px;
471
  }
472
 
473
  .spinner-wrapper {
474
- position: relative;
475
- height: 23px;
476
- overflow: hidden;
477
  }
478
 
479
  .spinner-wrapper input.number {
480
- float: left;
481
  }
482
 
483
  .spinner-wrapper .spinner-button {
484
- cursor: pointer;
485
- float: left;
486
- position: absolute;
487
- left: 69px;
488
- width: 15px;
489
- height: 12px;
490
- border: 1px solid #dfdfdf;
491
- background: #fff;
492
- margin: 0;
493
- padding: 0;
494
- line-height: 9999px;
495
- overflow: hidden;
496
- background: url('../images/spinner.png') no-repeat center -11px
497
  }
498
 
499
  .spinner-wrapper .spinner-button.button-plus {
500
- top: 0;
501
- -webkit-border-top-right-radius: 3px !important;
502
- -moz-border-radius-topright: 3px !important;
503
- border-top-right-radius: 3px !important;
504
  }
505
 
506
  .spinner-wrapper .spinner-button.button-minus {
507
- bottom: 0;
508
- background-position: center -30px;
509
- -webkit-border-bottom-right-radius: 3px !important;
510
- -moz-border-radius-bottomright: 3px !important;
511
- border-bottom-right-radius: 3px !important;
512
  }
513
 
514
  .spinner-wrapper .spinner-button.button-plus:active {
515
- background-position: center 0px;
516
  }
517
 
518
  .spinner-wrapper .spinner-button.button-minus:active {
519
- background-position: center -20px;
520
  }
521
 
522
  .rm_typography .spinner_container {
523
- float: left;
524
- margin-right: 10px;
525
  }
526
 
527
  .rm_typography .spinner-wrapper {
528
- height: 28px;
529
  }
530
 
531
  .rm_typography .spinner-wrapper input.number {
532
- height: 28px;
533
  }
534
 
535
  .rm_typography .spinner-wrapper .spinner-button.button-plus {
536
- height: 15px;
537
- background-position: center -10px;
538
  }
539
 
540
  .rm_typography .spinner-wrapper .spinner-button.button-minus {
541
- height: 14px;
542
  }
543
 
544
  .the-metabox .spinner-wrapper .spinner-button {
545
- left: 49px;
546
  }
547
 
548
  .the-metabox.typography .spinner-wrapper .spinner-button {
549
- left: 35px;
550
  }
551
 
552
  /* images */
553
  .the-metabox.images, .the-metabox.images label {
554
- margin-left: 0;
555
- display: block;
556
  }
557
 
558
  .the-metabox.images .slides-wrapper {
559
- clear: both;
560
  }
561
 
562
  .the-metabox.images .slides-wrapper li {
563
- position: relative;
564
  }
565
 
566
  .the-metabox.images a.delete {
567
- display: block;
568
- margin-left: 4px;
569
- text-decoration: none;
570
- font-weight: bold;
571
- color: red;
572
- position: absolute;
573
- top: 0;
574
- right: 0;
575
- width: 10px;
576
- height: 18px;
577
- z-index: 10;
578
- cursor: pointer !important;
579
  }
580
 
581
  /* wp editor */
582
  .wp_themeSkin iframe {
583
- background: #fff !important;
584
  }
585
 
586
  /* custom tabs */
587
  .customtab_item {
588
- border-style: solid;
589
- border-width: 1px;
590
- line-height: 1;
591
- margin-bottom: 20px;
592
- padding: 0;
593
- background-color: #f5f5f5;
594
- background-image: -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
595
- border-color: #dfdfdf;
596
- border-radius: 3px 3px 3px 3px;
597
- box-shadow: 0 1px 0 #fff inset;
598
- min-width: 255px;
599
- position: relative;
600
  }
601
 
602
  .customtab_item .handlediv {
603
- position: relative;
604
- top: -4px;
605
  }
606
 
607
  .customtab_item h3 {
608
- min-height: 21px
609
  }
610
 
611
  .customtab_item .inside {
612
- padding: 10px !important;
613
  }
614
 
615
  .customtab_item .deps {
616
- display: none;
617
  }
618
 
619
  .customtab_item .addoptions p.option {
620
- margin: 5px 0 5px 200px
621
  }
622
 
623
  .customtab_item .addoptions p label {
624
- width: 80px !important;
625
  }
626
 
627
  .customtab_item .add-field-option {
628
- margin-bottom: 10px !important;
629
  }
630
 
631
  .customtab_item .remove_item {
632
- float: right;
633
  }
634
 
635
  .metabox-sortable-placeholder {
636
- border: 1px dotted #dedede;
637
- margin: 10px 0
638
  }
639
 
640
  .the-metabox.customtabs {
641
- margin-left: 0;
642
  }
643
 
644
  #customtab_item_sample {
645
- display: none;
646
  }
647
 
648
  .the-metabox.customtabs .field-row {
649
- margin-bottom: 10px;
650
  }
651
 
652
  #yit_custom_tabs label {
653
- font-weight: normal;
654
- width: auto;
655
- float: none;
656
- line-height: auto;
657
- margin-left: 0;
658
  }
659
 
660
  .wp-admin p label input[type=radio] {
661
- width: 16px;
662
- margin-right: 10px;
663
- margin-top: 3px;
664
  }
665
 
666
  .wp-admin .form-field._preset_onsale_icon_field label input[type=radio] {
667
- margin-top: 0;
668
  }
669
 
670
  .the-metabox .spinner {
671
- margin-top: 5px;
672
- float: none;
673
  }
674
 
675
  /*sidebars*/
676
  #choose-sidebars.choose {
677
- margin-left: 0px;
678
  }
679
 
680
  #_active_page_options-container label, #_active_page_options-container p {
681
- display: inline-block;
682
- margin: 0px;
683
  }
684
 
685
  #_active_page_options-container label {
686
- margin-right: 10px;
687
- margin-top: 3px;
688
  }
689
 
690
  #_active_page_options-container {
691
- float: right;
692
- margin-right: 20px;
693
- margin-top: 5px;
694
- z-index: 9999 !important;
695
- position: absolute;
696
- right: 0;
697
  }
698
 
699
  /*-----------------------
700
  * Colorpicker - fix issues in combination with third-party themes or plugin (Basel, VC Addons, ...)
701
  */
702
  .metaboxes-tab .the-metabox.colorpicker {
703
- display: block;
704
- width: auto;
705
- height: auto;
706
- overflow: visible;
707
- top: auto;
708
- left: auto;
709
- background: transparent;
710
- position: static;
711
- z-index: 1;
712
- font-family: inherit;
713
  }
714
 
715
  .the-metabox.checkbox.checkboxgroup-start.clearfix {
716
- margin: 40px 0 0 264px;
717
  }
718
 
719
  .the-metabox.checkbox.checkboxgroup.clearfix {
720
- margin: 0 0 0 264px;
721
  }
1
  /* self-clear floats */
2
  .clearfix:after {
3
+ content : ".";
4
+ display : block;
5
+ height : 0;
6
+ clear : both;
7
+ visibility : hidden;
8
+ overflow : hidden;
9
  }
10
 
11
  /* ie.css */
12
  * html .clearfix { /* IE6 */
13
+ height : 1%;
14
  }
15
 
16
  *:first-child + html .clearfix { /* IE7 */
17
+ min-height : 1%;
18
  }
19
 
20
  .clearboth {
21
+ clear : both
22
  }
23
 
24
  /* === TAB STYLE */
25
  .metaboxes-tab {
26
+ margin : -6px -12px -8px;
27
  }
28
 
29
  .metaboxes-tab div.tabs-panel {
30
+ height : auto;
31
+ overflow : visible;
32
+ margin-top : 0px;
33
+ padding : 0 10px;
34
+ background : none;
35
+ border : 0;
36
  }
37
 
38
  .metaboxes-tab ul.metaboxes-tabs {
39
+ background : #f1f1f1;
40
+ margin : 0;
41
+ padding : 10px 0 0 5px;
42
  }
43
 
44
  .metaboxes-tab ul.metaboxes-tabs li {
45
+ float : left;
46
+ background : #dedede;
47
+ margin : 0 0 0 5px;
48
  }
49
 
50
  .metaboxes-tab ul.metaboxes-tabs li a {
51
+ color : #555;
52
+ text-decoration : none;
53
+ padding : 8px 15px;
54
+ display : block;
55
+ box-shadow : none !important;
56
  }
57
 
58
  .metaboxes-tab ul.metaboxes-tabs li.tabs {
59
+ background : #fff;
60
  }
61
 
62
  .metaboxes-tab p.field-row {
63
+ margin : 20px 0;
64
  }
65
 
66
  .metaboxes-tab div.sep {
67
+ height : 1px;
68
+ background : #dfdfdf;
69
+ clear : both;
70
+ margin-left : -10px;
71
+ margin-right : -10px;
72
  }
73
 
74
  .metaboxes-tab label {
75
+ font-weight : bold;
76
+ width : 160px;
77
+ float : left;
78
+ line-height : 23px;
79
+ margin-left : -184px;
80
  }
81
 
82
  .metaboxes-tab label small {
83
+ font-weight : normal;
84
+ line-height : 15px;
85
+ font-style : italic;
86
+ color : #999;
87
+ display : block;
88
  }
89
 
90
  .metaboxes-tab .yith-plugin-fw-radio__row {
91
+ width : 100%;
92
+ min-height : 20px;
93
  }
94
 
95
  .metaboxes-tab .yith-plugin-fw-radio__row label,
96
  .metaboxes-tab .yith-toggle-elements label,
97
  .metaboxes-tab .yith-add-box label {
98
+ margin-left : 0;
99
+ font-weight : normal;
100
  }
101
 
102
  .metaboxes-tab.yith-plugin-ui h3 {
103
+ color : #2a8db0;
104
+ font-size : 15px;
105
+ text-transform : uppercase;
106
+ padding : 5px 20px;
107
+ margin : 0 0 0 -4px;
108
+ width : auto;
109
+ background : transparent;
 
110
  }
111
 
112
  .metaboxes-tab.yith-plugin-ui .yith-add-box,
113
  .metaboxes-tab.yith-plugin-ui .yith-toggle-row {
114
+ width : auto;
115
  }
116
 
117
  .metaboxes-tab .wp-picker-container label {
118
+ font-weight : inherit;
119
+ width : auto;
120
+ float : none;
121
+ line-height : inherit;
122
+ margin-left : 0;
123
  }
124
 
125
  .metaboxes-tab.yith-plugin-ui .yith-plugin-fw-radio__row label {
126
+ width : auto !important;
127
+ display : inline-block;
128
+ font-weight : normal;
129
  }
130
 
131
  .metaboxes-tab input[type="checkbox"] {
132
+ vertical-align : middle
133
  }
134
 
135
  .metaboxes-tab input.button-secondary, .metaboxes-tab input.checkbox {
136
+ width : auto;
137
  }
138
 
139
  .metaboxes-tab p.field-row.textarea .description {
140
+ vertical-align : top;
141
  }
142
 
143
  .metaboxes-tab p.field-row.checkbox {
144
+ background : none;
145
  }
146
 
147
  .metaboxes-tab .the-metabox {
148
+ margin : 20px 0;
149
+ margin-left : 184px;
150
  }
151
 
152
  .metaboxes-tab .the-metabox.no-label {
153
+ margin : 20px 0;
154
+ margin-left : 0;
155
  }
156
 
157
  .metaboxes-tab hr {
158
+ height : 0px;
159
+ border-top : 1px solid #dadada;
160
+ width : auto;
161
+ margin-left : -10px;
162
+ margin-right : -10px;
163
  }
164
 
165
  .metaboxes-tab .the-metabox p {
166
+ margin : 0;
167
  }
168
 
169
  .metaboxes-tab .the-metabox:last-child {
170
+ border-bottom : 0px;
171
  }
172
 
173
  .metaboxes-tab .the-metabox.checkbox {
174
+ background : none;
175
  }
176
 
177
  .metaboxes-tab span.description.inline {
178
+ display : inline-block;
179
+ line-height : 23px;
180
+ width : auto;
181
+ vertical-align : middle;
182
+ margin : 0;
183
  }
184
 
185
  .metaboxes-tab .slider label {
186
+ padding : 15px 0;
187
+ }
188
+
189
+ .metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs {
190
+ background : transparent;
191
+ border-bottom : 1px solid #d8d8d8;
192
+ padding : 10px 0 0 0;
193
+ margin : 0 10px
194
+ }
195
+
196
+
197
+ .metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li {
198
+ background : #fff;
199
+ border-top : 1px solid #d8d8d8;
200
+ border-left : 1px solid #d8d8d8;
201
+ border-right : 1px solid #d8d8d8;
202
+ margin : 0 0 -1px -1px;
203
+ }
204
+
205
+ .metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li.tabs {
206
+ border-bottom : 1px solid #fff;
207
+ }
208
+
209
+ .metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li a {
210
+ color : #336374;
211
+ padding : 10px 18px;
212
+ text-transform : uppercase;
213
+ font-weight : 600;
214
+ display : inline-block;
215
+ }
216
+
217
+ .metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li.tabs a {
218
+ color : #2a8db0;
219
  }
220
 
221
  /* sortable table posts */
222
 
223
  #the-list.ui-sortable tr:hover {
224
+ cursor : move;
225
  }
226
 
227
  .the-metabox.preview {
228
+ float : none;
229
  }
230
 
231
  .metaboxes-tab .the-metabox.no-label.preview {
232
+ margin-left : 184px;
233
  }
234
 
235
  .metaboxes-tab .the-metabox.no-label.preview img {
236
+ box-shadow : 0 1px 8px rgba(0, 0, 0, 0.2);
237
  }
238
 
239
  /**************************************
249
  .metaboxes-tab .yith-plugin-fw-text-input,
250
  .metaboxes-tab .yith-plugin-fw-text-array-table,
251
  .metaboxes-tab .yith-plugin-fw-textarea {
252
+ width : 400px;
253
+ max-width : 100%;
254
  }
255
 
256
  .metaboxes-tab.yith-plugin-ui input[type=number] {
257
+ width : auto;
258
+ min-width : 90px;
259
  }
260
 
261
  .metaboxes-tab.yith-plugin-ui p {
262
+ font-size : 14px;
263
  }
264
 
265
  .metaboxes-tab.yith-plugin-ui p.section-description {
266
 
267
+ margin : 0 20px 40px 18px;
268
  }
269
 
270
  .metaboxes-tab .yith-plugin-fw-text-array-table input[type=text] {
271
+ width : 100%;
272
  }
273
 
274
  .metaboxes-tab.yith-plugin-ui .yith-add-box h3 {
275
+ padding : 0 0 30px 0;
276
+ font-weight : 600;
277
+ margin : 0;
278
  }
279
 
280
  .metaboxes-tab.yith-plugin-ui .select2-container--default .select2-selection--single {
281
+ border : 0;
282
+ margin : 0;
283
  }
284
 
285
  /* wp editor */
286
  .the-metabox.textarea-editor .mceIframeContainer {
287
+ background : #fff;
288
  }
289
 
290
 
291
  .the-metabox.textarea-editor label {
292
+ margin-top : 24px;
293
  }
294
 
295
  /* categories */
296
  .categories-panel {
297
+ width : 30%;
298
+ float : left;
299
+ margin-right : 4px;
300
  }
301
 
302
  .categories-panel .box {
303
+ height : 200px;
304
+ border : 1px solid #dfdfdf;
305
+ background : #fff;
306
+ padding : 6px 10px;
307
+ overflow : auto;
308
  }
309
 
310
  .categories-panel ul {
311
+ list-style : none;
312
+ margin : 0;
313
  }
314
 
315
  .categories-panel ul li {
316
+ line-height : 19px;
317
+ margin : 0;
318
+ padding : 0;
319
+ word-wrap : break-word;
320
  }
321
 
322
  .categories-panel ul li label {
323
+ font-weight : normal !important;
324
+ margin-left : 0 !important;
325
  }
326
 
327
  .categories-panel input.newcategory {
328
+ width : 100%;
329
+ margin-bottom : 3px;
330
  }
331
 
332
  /* contact form */
333
  .contactform_item {
334
+ border-style : solid;
335
+ border-width : 1px;
336
+ line-height : 1;
337
+ margin-bottom : 20px;
338
+ padding : 0;
339
+ background-color : #f5f5f5;
340
+ background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
341
+ border-color : #dfdfdf;
342
+ border-radius : 3px 3px 3px 3px;
343
+ box-shadow : 0 1px 0 #fff inset;
344
+ min-width : 255px;
345
+ position : relative;
346
  }
347
 
348
  .contactform_item .handlediv {
349
+ position : relative;
350
+ top : -4px;
351
  }
352
 
353
  .contactform_item h3 {
354
+ min-height : 21px;
355
+ margin : 13px;
356
  }
357
 
358
  .contactform_item .inside {
359
+ padding : 10px !important;
360
  }
361
 
362
  .contactform_item .deps {
363
+ display : none;
364
  }
365
 
366
  .contactform_item .addoptions p.option {
367
+ margin : 5px 0 5px 200px
368
  }
369
 
370
  .contactform_item .addoptions p label {
371
+ width : 80px !important;
372
  }
373
 
374
  .contactform_item .add-field-option {
375
+ margin-bottom : 10px !important;
376
  }
377
 
378
  .remove_item {
379
+ float : right;
380
  }
381
 
382
  .metabox-sortable-placeholder {
383
+ border : 1px dotted #dedede;
384
+ margin : 10px 0
385
  }
386
 
387
  /* features tab */
388
  .featurestab_item {
389
+ border-style : solid;
390
+ border-width : 1px;
391
+ line-height : 1;
392
+ margin-bottom : 20px;
393
+ padding : 0;
394
+ background-color : #f5f5f5;
395
+ background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
396
+ border-color : #dfdfdf;
397
+ border-radius : 3px 3px 3px 3px;
398
+ box-shadow : 0 1px 0 #fff inset;
399
+ min-width : 255px;
400
+ position : relative;
401
  }
402
 
403
  .featurestab_item .handlediv {
404
+ position : relative;
405
+ top : -4px;
406
  }
407
 
408
  .featurestab_item h3 {
409
+ min-height : 21px
410
  }
411
 
412
  .featurestab_item .inside {
413
+ padding : 10px !important;
414
  }
415
 
416
  .featurestab_item .deps {
417
+ display : none;
418
  }
419
 
420
  .featurestab_item .addoptions p.option {
421
+ margin : 5px 0 5px 200px
422
  }
423
 
424
  .featurestab_item .addoptions p label {
425
+ width : 80px !important;
426
  }
427
 
428
  .featurestab_item .add-field-option {
429
+ margin-bottom : 10px !important;
430
  }
431
 
432
  .messages-panel.updated {
433
+ margin : 10px 0px 10px !important;
434
+ max-width : 1200px;
435
+ border-radius : 5px;
436
+ -webkit-box-sizing : border-box;
437
+ box-sizing : border-box;
438
  }
439
 
440
  .ui-widget-overlay {
441
+ background-image : none !important;
442
  }
443
 
444
  .the-metabox .icon_type {
445
+ width : 30%;
446
+ float : left;
447
+ margin-right : 40px
448
  }
449
 
450
  #post-type-settings .category-list label {
451
+ width : 187px;
452
  }
453
 
454
  .remove_cat {
455
+ float : right;
456
+ text-align : center;
457
+ display : block;
458
+ width : 20px;
459
+ height : 20px;
460
+ border-radius : 20px;
461
+ font-weight : bold;
462
+ font-size : 10px;
463
+ background : #efefef;
464
+ text-decoration : none;
465
  }
466
 
467
  /* typography */
468
  .the-metabox.typography .select_wrapper.font-family {
469
+ width : 200px;
470
  }
471
 
472
  .the-metabox.typography .spinner_container {
473
+ float : left;
474
+ margin-right : 10px;
475
  }
476
 
477
  .the-metabox.typography .spinner_container input.number {
478
+ width : 50px !important;
479
+ -webkit-border-top-right-radius : 0px;
480
+ -webkit-border-bottom-right-radius : 0px;
481
+ -moz-border-radius-topright : 0px;
482
+ -moz-border-radius-bottomright : 0px;
483
+ border-top-right-radius : 0px;
484
+ border-bottom-right-radius : 0px;
485
  }
486
 
487
  /* number */
488
  .the-metabox.number input.number {
489
+ width : 50px !important;
490
  }
491
 
492
  /* number */
493
  .rm_number .number {
494
+ width : 70px;
495
+ text-align : right;
496
+ -webkit-border-top-right-radius : 0px;
497
+ -webkit-border-bottom-right-radius : 0px;
498
+ -moz-border-radius-topright : 0px;
499
+ -moz-border-radius-bottomright : 0px;
500
+ border-top-right-radius : 0px;
501
+ border-bottom-right-radius : 0px;
502
  }
503
 
504
  .spinner-wrapper {
505
+ position : relative;
506
+ height : 23px;
507
+ overflow : hidden;
508
  }
509
 
510
  .spinner-wrapper input.number {
511
+ float : left;
512
  }
513
 
514
  .spinner-wrapper .spinner-button {
515
+ cursor : pointer;
516
+ float : left;
517
+ position : absolute;
518
+ left : 69px;
519
+ width : 15px;
520
+ height : 12px;
521
+ border : 1px solid #dfdfdf;
522
+ background : #fff;
523
+ margin : 0;
524
+ padding : 0;
525
+ line-height : 9999px;
526
+ overflow : hidden;
527
+ background : url('../images/spinner.png') no-repeat center -11px
528
  }
529
 
530
  .spinner-wrapper .spinner-button.button-plus {
531
+ top : 0;
532
+ -webkit-border-top-right-radius : 3px !important;
533
+ -moz-border-radius-topright : 3px !important;
534
+ border-top-right-radius : 3px !important;
535
  }
536
 
537
  .spinner-wrapper .spinner-button.button-minus {
538
+ bottom : 0;
539
+ background-position : center -30px;
540
+ -webkit-border-bottom-right-radius : 3px !important;
541
+ -moz-border-radius-bottomright : 3px !important;
542
+ border-bottom-right-radius : 3px !important;
543
  }
544
 
545
  .spinner-wrapper .spinner-button.button-plus:active {
546
+ background-position : center 0px;
547
  }
548
 
549
  .spinner-wrapper .spinner-button.button-minus:active {
550
+ background-position : center -20px;
551
  }
552
 
553
  .rm_typography .spinner_container {
554
+ float : left;
555
+ margin-right : 10px;
556
  }
557
 
558
  .rm_typography .spinner-wrapper {
559
+ height : 28px;
560
  }
561
 
562
  .rm_typography .spinner-wrapper input.number {
563
+ height : 28px;
564
  }
565
 
566
  .rm_typography .spinner-wrapper .spinner-button.button-plus {
567
+ height : 15px;
568
+ background-position : center -10px;
569
  }
570
 
571
  .rm_typography .spinner-wrapper .spinner-button.button-minus {
572
+ height : 14px;
573
  }
574
 
575
  .the-metabox .spinner-wrapper .spinner-button {
576
+ left : 49px;
577
  }
578
 
579
  .the-metabox.typography .spinner-wrapper .spinner-button {
580
+ left : 35px;
581
  }
582
 
583
  /* images */
584
  .the-metabox.images, .the-metabox.images label {
585
+ margin-left : 0;
586
+ display : block;
587
  }
588
 
589
  .the-metabox.images .slides-wrapper {
590
+ clear : both;
591
  }
592
 
593
  .the-metabox.images .slides-wrapper li {
594
+ position : relative;
595
  }
596
 
597
  .the-metabox.images a.delete {
598
+ display : block;
599
+ margin-left : 4px;
600
+ text-decoration : none;
601
+ font-weight : bold;
602
+ color : red;
603
+ position : absolute;
604
+ top : 0;
605
+ right : 0;
606
+ width : 10px;
607
+ height : 18px;
608
+ z-index : 10;
609
+ cursor : pointer !important;
610
  }
611
 
612
  /* wp editor */
613
  .wp_themeSkin iframe {
614
+ background : #fff !important;
615
  }
616
 
617
  /* custom tabs */
618
  .customtab_item {
619
+ border-style : solid;
620
+ border-width : 1px;
621
+ line-height : 1;
622
+ margin-bottom : 20px;
623
+ padding : 0;
624
+ background-color : #f5f5f5;
625
+ background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
626
+ border-color : #dfdfdf;
627
+ border-radius : 3px 3px 3px 3px;
628
+ box-shadow : 0 1px 0 #fff inset;
629
+ min-width : 255px;
630
+ position : relative;
631
  }
632
 
633
  .customtab_item .handlediv {
634
+ position : relative;
635
+ top : -4px;
636
  }
637
 
638
  .customtab_item h3 {
639
+ min-height : 21px
640
  }
641
 
642
  .customtab_item .inside {
643
+ padding : 10px !important;
644
  }
645
 
646
  .customtab_item .deps {
647
+ display : none;
648
  }
649
 
650
  .customtab_item .addoptions p.option {
651
+ margin : 5px 0 5px 200px
652
  }
653
 
654
  .customtab_item .addoptions p label {
655
+ width : 80px !important;
656
  }
657
 
658
  .customtab_item .add-field-option {
659
+ margin-bottom : 10px !important;
660
  }
661
 
662
  .customtab_item .remove_item {
663
+ float : right;
664
  }
665
 
666
  .metabox-sortable-placeholder {
667
+ border : 1px dotted #dedede;
668
+ margin : 10px 0
669
  }
670
 
671
  .the-metabox.customtabs {
672
+ margin-left : 0;
673
  }
674
 
675
  #customtab_item_sample {
676
+ display : none;
677
  }
678
 
679
  .the-metabox.customtabs .field-row {
680
+ margin-bottom : 10px;
681
  }
682
 
683
  #yit_custom_tabs label {
684
+ font-weight : normal;
685
+ width : auto;
686
+ float : none;
687
+ line-height : auto;
688
+ margin-left : 0;
689
  }
690
 
691
  .wp-admin p label input[type=radio] {
692
+ width : 16px;
693
+ margin-right : 10px;
694
+ margin-top : 3px;
695
  }
696
 
697
  .wp-admin .form-field._preset_onsale_icon_field label input[type=radio] {
698
+ margin-top : 0;
699
  }
700
 
701
  .the-metabox .spinner {
702
+ margin-top : 5px;
703
+ float : none;
704
  }
705
 
706
  /*sidebars*/
707
  #choose-sidebars.choose {
708
+ margin-left : 0px;
709
  }
710
 
711
  #_active_page_options-container label, #_active_page_options-container p {
712
+ display : inline-block;
713
+ margin : 0px;
714
  }
715
 
716
  #_active_page_options-container label {
717
+ margin-right : 10px;
718
+ margin-top : 3px;
719
  }
720
 
721
  #_active_page_options-container {
722
+ float : right;
723
+ margin-right : 20px;
724
+ margin-top : 5px;
725
+ z-index : 9999 !important;
726
+ position : absolute;
727
+ right : 0;
728
  }
729
 
730
  /*-----------------------
731
  * Colorpicker - fix issues in combination with third-party themes or plugin (Basel, VC Addons, ...)
732
  */
733
  .metaboxes-tab .the-metabox.colorpicker {
734
+ display : block;
735
+ width : auto;
736
+ height : auto;
737
+ overflow : visible;
738
+ top : auto;
739
+ left : auto;
740
+ background : transparent;
741
+ position : static;
742
+ z-index : 1;
743
+ font-family : inherit;
744
  }
745
 
746
  .the-metabox.checkbox.checkboxgroup-start.clearfix {
747
+ margin : 40px 0 0 264px;
748
  }
749
 
750
  .the-metabox.checkbox.checkboxgroup.clearfix {
751
+ margin : 0 0 0 264px;
752
  }
plugin-fw/assets/css/yit-plugin-panel.css CHANGED
@@ -35,11 +35,22 @@
35
  padding-top : 20px;
36
  }
37
 
38
- #plugin-fw-wc table.form-table, #yith-plugin-fw-panel table.form-table {
39
  background-color : #fff;
40
  margin-bottom : 20px;
41
  }
42
 
 
 
 
 
 
 
 
 
 
 
 
43
  #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th {
44
  padding : 20px;
45
  }
@@ -49,6 +60,83 @@
49
  margin : 0;
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  /* === Plugins Upgrader === */
53
 
54
  .yit-plugin-changelog-wrapper {
@@ -409,7 +497,7 @@
409
 
410
  #wpwrap h2.nav-tab-wrapper, #wpbody-content h2.nav-tab-wrapper {
411
  border-bottom : 1px solid #ccc;
412
- margin-right: 15px;
413
  }
414
 
415
  /* === YIT FRAMEWORK === */
@@ -421,8 +509,8 @@
421
 
422
  /* === Panel Content and Container === */
423
  .yit-admin-panel-container {
424
- position : relative;
425
- margin-right: 15px;
426
  }
427
 
428
  .yit-admin-panel-content-wrap {
@@ -456,6 +544,67 @@
456
  margin : 0;
457
  }
458
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  /* === Responsive === */
460
 
461
  @media (max-width : 767px) {
35
  padding-top : 20px;
36
  }
37
 
38
+ #plugin-fw-wc table.form-table, #yith-plugin-fw-panel table.form-table, .yith-plugin-fw-panel-custom-tab-container {
39
  background-color : #fff;
40
  margin-bottom : 20px;
41
  }
42
 
43
+ .yith-plugin-fw-panel-custom-tab-container {
44
+ padding : 20px;
45
+ box-sizing : border-box;
46
+ margin-right : 15px;
47
+ }
48
+
49
+ .yith-plugin-fw-panel-custom-tab-container > h2 {
50
+ border : none;
51
+ padding : 15px 0;
52
+ }
53
+
54
  #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th {
55
  padding : 20px;
56
  }
60
  margin : 0;
61
  }
62
 
63
+
64
+ /**
65
+ Post type Edit
66
+ */
67
+
68
+ .yith-plugin-fw-wp-page-wrapper {
69
+ margin : 23px 20px 0 2px;
70
+ }
71
+
72
+ .yith-plugin-fw-wp-page-wrapper .notice,
73
+ .yith-plugin-fw-wp-page-wrapper div.updated,
74
+ .yith-plugin-fw-wp-page-wrapper div.error {
75
+ margin : 5px 15px 15px 0;
76
+ }
77
+
78
+ .yith-plugin-fw-wp-page-wrapper .wrap {
79
+ border : 1px solid #d8d8d8;
80
+ border-top : 0;
81
+ margin : 0 15px 0 0;
82
+ background : #fff;
83
+ padding : 20px;
84
+ box-sizing : border-box;
85
+ }
86
+
87
+ #wpwrap .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper {
88
+ padding-bottom : 0;
89
+ }
90
+
91
+ .yith-plugin-fw-wp-page-wrapper .postbox {
92
+ box-shadow : none;
93
+ }
94
+
95
+ .yith-plugin-fw-wp-page-wrapper h1.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper h2.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
96
+ padding-top : 9px;
97
+ padding-bottom : 0;
98
+ }
99
+
100
+ .yith-plugin-fw-wp-page-wrapper .wrap h1.wp-heading-inline {
101
+ color : #2a8db0;
102
+ font-size : 15px;
103
+ text-transform : uppercase;
104
+ font-weight : 600;
105
+ }
106
+
107
+ .yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action,
108
+ .yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:active {
109
+ border-radius : 3px;
110
+ text-transform : uppercase;
111
+ box-shadow : none;
112
+ border : 0;
113
+ font-weight : 700;
114
+ font-size : 11px;
115
+ padding : 0 14px;
116
+ outline : none;
117
+ height : auto;
118
+ transition : all ease 0.3s;
119
+ text-shadow : none;
120
+ vertical-align : middle;
121
+ line-height : 26px;
122
+ display : inline-block;
123
+ text-decoration : none;
124
+ cursor : pointer;
125
+ background-color : #375f6b;
126
+ color : #fff;
127
+ margin-left: 10px !important;
128
+ }
129
+
130
+ .yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:hover {
131
+ border-color : #007694;
132
+ background : #007694;
133
+ color : #fff;
134
+ }
135
+
136
+ .yith-plugin-fw-wp-page-wrapper #wp-content-editor-tools {
137
+ background : transparent;
138
+ }
139
+
140
  /* === Plugins Upgrader === */
141
 
142
  .yit-plugin-changelog-wrapper {
497
 
498
  #wpwrap h2.nav-tab-wrapper, #wpbody-content h2.nav-tab-wrapper {
499
  border-bottom : 1px solid #ccc;
500
+ margin-right : 15px;
501
  }
502
 
503
  /* === YIT FRAMEWORK === */
509
 
510
  /* === Panel Content and Container === */
511
  .yit-admin-panel-container {
512
+ position : relative;
513
+ margin-right : 15px;
514
  }
515
 
516
  .yit-admin-panel-content-wrap {
544
  margin : 0;
545
  }
546
 
547
+ /**
548
+ * Sub Tabs
549
+ */
550
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav {
551
+ background : #fff;
552
+ padding : 10px 20px;
553
+ box-sizing : border-box;
554
+ margin-right : 15px;
555
+ border-left : 1px solid #d8d8d8;
556
+ border-right : 1px solid #d8d8d8;
557
+ }
558
+
559
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav h3.nav-tab-wrapper {
560
+ text-transform : uppercase;
561
+ line-height : inherit;
562
+ font-weight : 600;
563
+ }
564
+
565
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab {
566
+ line-height : 1.71428571;
567
+ margin-left : 0;
568
+ margin-right : 0;
569
+ background-color : #fff;
570
+ color : #336374;
571
+ font-size : 13px;
572
+ padding : 8px 20px 9px;
573
+ border : 0;
574
+ border-left : 1px solid #d8d8d8;
575
+ border-top : 1px solid #d8d8d8;
576
+ }
577
+
578
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__title,
579
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon {
580
+ vertical-align : middle;
581
+ }
582
+
583
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon {
584
+ margin-left : 8px;
585
+ font-size : 22px;
586
+ margin-right : -3px;
587
+ }
588
+
589
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon:before {
590
+ color : inherit;
591
+ }
592
+
593
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab:last-child {
594
+ border-right : 1px solid #d8d8d8;
595
+ }
596
+
597
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .yith-nav-sub-tab--highlight {
598
+ color : #fff;
599
+ background : #2a8db0;
600
+ }
601
+
602
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab-active {
603
+ color : #2a8db0;
604
+ background : #fff;
605
+ border-bottom : 1px solid #fff;
606
+ }
607
+
608
  /* === Responsive === */
609
 
610
  @media (max-width : 767px) {
plugin-fw/assets/css/yith-fields.css CHANGED
@@ -1,43 +1,48 @@
1
  .yith-plugin-fw span.description {
2
- display: block;
3
- margin-top: 5px;
4
- font-size: 12px;
5
- color: #777;
6
- font-style: italic;
7
- clear: both;
8
  }
9
 
10
  .yith-plugin-fw span.description.inline {
11
- display: inline-block;
12
- margin: 0 0 0 5px;
13
  }
14
 
15
  .yith-disabled {
16
- opacity: 0.3;
17
- pointer-events: none;
18
  }
19
 
20
  .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
21
- display: block;
22
- width: 100%;
23
  }
24
 
25
  .yith-plugin-fw-field-wrapper span.desc {
26
- display: block;
27
- width: 100%;
28
  }
29
 
30
  .yith-plugin-fw-title-field-wrapper h3.title {
31
- width: 100%;
 
32
  }
33
 
34
  .the-metabox .yith-plugin-fw-title-field-wrapper h3.title {
35
- float: left;
36
  }
37
 
38
  .yith-plugin-fw span.color-alpha {
39
- height: 23px!important;
 
 
 
40
  }
 
41
  .yith-plugin-fw .wp-color-result-text{
42
  height: 100%;
43
  }
@@ -50,10 +55,10 @@
50
  .yith-plugin-ui input[type=password],
51
  .woocommerce .yith-plugin-fw table.form-table input[type=text]:not(.select2-search__field),
52
  .woocommerce .yith-plugin-fw table.form-table select {
53
- width: 400px;
54
- max-width: 100%;
55
- height: 30px;
56
- padding: 5px;
57
  line-height: 1;
58
  }
59
 
@@ -61,10 +66,10 @@
61
  .woocommerce .yith-plugin-fw table.form-table input[type=text].yith-plugin-fw-colorpicker,
62
  .yith-plugin-fw input[type=text].wp-color-picker,
63
  .yith-plugin-fw input[type=text].yith-plugin-fw-colorpicker {
64
- width: 6em;
65
- max-width: none;
66
- height: auto;
67
- padding: 3px 5px;
68
  }
69
 
70
  .wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button{
@@ -73,350 +78,364 @@
73
 
74
  .woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
75
  .yith-plugin-fw input[type=text].colorpick {
76
- width: 6em;
77
- max-width: none;
78
- height: auto;
79
- padding: 6px;
80
  }
81
 
82
  .yith-plugin-fw input.select2-search__field,
83
  .yith-plugin-fw .select2-container .select2-search--inline .select2-search__field,
84
  .woocommerce .yith-plugin-fw input.select2-search__field,
85
  .woocommerce .yith-plugin-fw table.form-table input.select2-search__field {
86
- padding: 3px;
87
  }
88
 
89
  .yith-plugin-fw .select2-container .select2-selection--single .select2-selection__rendered {
90
- line-height: 27px;
91
  }
92
 
93
  .yith-plugin-fw textarea {
94
- width: 400px;
95
- max-width: 100%;
96
- padding: 5px;
97
  }
98
 
99
  /* ------------- ICONS ------------- */
100
  .yit-icons-manager-wrapper {
101
- width: 100%;
102
- max-width: 400px;
103
  }
104
 
105
  .yit-icons-manager-text {
106
- width: 100%;
107
  }
108
 
109
  .yit-icons-manager-icon-text {
110
- width: calc(100% - 35px) !important;
111
- height: 30px;
112
- float: left;
113
- margin: 0;
114
  }
115
 
116
  .yit-icons-manager-icon-preview {
117
- width: 30px;
118
- height: 30px;
119
- margin-right: 5px;
120
- float: left;
121
- padding-top: 6px;
122
- box-sizing: border-box;
123
- text-align: center;
124
- background: #f1f1f1;
125
  }
126
 
127
  .yit-icons-manager-list-wrapper {
128
- margin: 10px 0;
129
- box-shadow: 0 0 0 1px #ddd;
130
  }
131
 
132
  ul.yit-icons-manager-list {
133
- width: 100%;
134
- height: 300px;
135
- overflow-y: scroll;
136
- margin: 0;
137
  }
138
 
139
  ul.yit-icons-manager-list li {
140
- float: left;
141
- width: 30px;
142
- height: 30px;
143
- padding-top: 6px;
144
- box-sizing: border-box;
145
- text-align: center;
146
- background: #f1f1f1;
147
- margin: 1px;
148
- cursor: pointer;
149
  }
150
 
151
  ul.yit-icons-manager-list li:hover {
152
- background: #c5dcf6;
153
  }
154
 
155
  ul.yit-icons-manager-list li.active {
156
- background: #d4f0ff;
157
  }
158
 
159
  .yit-icons-manager-action-set-default {
160
- margin-bottom: 0;
161
  }
162
 
163
  .yit-icons-manager-default-icon-preview {
164
- height: 100%;
165
- display: inline-block;
166
- padding-left: 10px;
167
- border-left: 1px solid #ccc;
168
- margin-left: 10px;
169
  }
170
 
171
  /* ------- Text Array ------- */
172
  .yith-plugin-fw-text-array-table td {
173
- padding: 1px;
174
  }
175
 
176
  .yith-plugin-fw-text-array-table input[type=text],
177
  .woocommerce table.form-table table.yith-plugin-fw-text-array-table input[type=text] {
178
- width: 100%;
179
  }
180
 
181
  /* ------- Image Gallery ------- */
182
  .yith-plugin-fw .image-gallery ul li {
183
- display: inline-block;
184
- width: 80px;
185
- margin-left: 10px;
186
- position: relative;
187
  }
188
 
189
  .yith-plugin-fw .image-gallery ul li img {
190
- width: 80px;
191
- border: 1px solid #ccc;
192
  }
193
 
194
  .yith-plugin-fw .image-gallery ul li ul {
195
- position: absolute;
196
- top: -6px;
197
- right: -1px;
198
- width: 20px;
199
- height: 20px;
200
  }
201
 
202
  .yith-plugin-fw .image-gallery ul a.delete {
203
- background: url(../images/x.png) no-repeat;
204
- width: 20px;
205
- height: 20px;
206
- display: block;
207
- text-indent: -99999px;
208
  }
209
 
210
  /* ------- OnOff ------- */
211
  .yith-plugin-fw-onoff-container {
212
- display: inline-block;
 
213
  }
214
 
215
  .yith-plugin-fw-onoff-container input {
216
- display: none;
217
  }
218
 
219
  .yith-plugin-fw-onoff-container input + span {
220
- cursor: pointer;
221
- text-indent: -9999px;
222
- display: block;
223
- width: 36px;
224
- line-height: 1;
225
- height: 20px;
226
- background: #a4a4a4;
227
- border-radius: 24px;
228
- position: relative;
229
- transition: all 0.3s;
230
  }
231
 
232
 
233
  .yith-plugin-fw-onoff-container input + span:before {
234
- content: '';
235
- background: #fff;
236
- width: 16px;
237
- height: 16px;
238
- border-radius: 50%;
239
- position: absolute;
240
- top: 2px;
241
- left: 2px;
242
- transition: all 0.3s;
243
  }
244
 
245
  .yith-plugin-fw-onoff-container input:checked + span,
246
  .yith-plugin-fw-onoff-container input.onoffchecked + span {
247
- background: #0073aa;
248
  }
249
 
250
  .yith-plugin-fw-onoff-container input:checked + span:before,
251
  .yith-plugin-fw-onoff-container input.onoffchecked + span:before {
252
- left: 18px;
253
  }
254
 
255
  /* ------- Preview ------- */
256
  .yith-plugin-fw-preview-field {
257
- max-height: 200px;
258
  }
259
 
260
  /* ------- Radio ------- */
261
  .yith-plugin-fw-radio input[type=radio] {
262
- margin: 0 3px 0 0;
263
  }
264
 
265
  .yith-plugin-fw-radio__row {
266
- margin-bottom: 8px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  }
268
 
269
  /* ------- Sidebar Layout ------- */
270
  .yith-plugin-fw-sidebar-layout input[type="radio"] {
271
- display: none;
272
- width: 0px;
273
  }
274
 
275
  .yith-plugin-fw-sidebar-layout input[type="radio"]:first-child {
276
- margin-right: -2px;
277
  }
278
 
279
  .yith-plugin-fw-sidebar-layout input[type="radio"] + img {
280
- border: 2px solid #fff;
281
- padding: 1px;
282
  }
283
 
284
  .yith-plugin-fw-sidebar-layout input[type="radio"] + img:hover {
285
- cursor: pointer;
286
  }
287
 
288
  .yith-plugin-fw-sidebar-layout input[checked] + img {
289
- border: 2px solid #f2ad35;
290
- padding: 1px;
291
  }
292
 
293
  .yith-plugin-fw-sidebar-layout select {
294
- vertical-align: 12px;
295
  }
296
 
297
  .yit-admin-panel-content-wrap .yith-plugin-fw-sidebar-layout label {
298
- font-weight: bold;
299
- width: 200px;
300
- float: left;
301
- line-height: 23px;
302
- margin-left: -230px;
303
  }
304
 
305
  /* ------- Slider ------- */
306
  .yith-plugin-fw .slider {
307
- padding-top: 20px;
308
- }
309
-
310
- .ui-slider .minCaption {
311
- position: absolute;
312
- right: 95%;
313
- top: -6px;
314
- margin-right: 11px;
315
- }
316
-
317
- .ui-slider .maxCaption {
318
- position: absolute;
319
- left: 95%;
320
- top: -6px;
321
- margin-left: 20px;
322
- }
323
-
324
- .ui-slider-horizontal .ui-slider-handle {
325
- background: #fff;
326
- border: 0px !important;
327
- top: -12px !important;
328
- border-radius: 50%;
329
- width: 27px !important;
330
- height: 27px !important;
331
- box-sizing: border-box;
332
- box-shadow: 0 1px 7px -1px rgba(0, 0, 0, 0.5);
333
- font-size: 13px;
334
- padding: 6px 0;
335
- font-weight: 600;
336
- color: #555;
337
- text-align: center;
338
  }
339
 
340
- .ui-slider.ui-widget-content {
341
- background: #ccc;
342
- border: none !important;
343
- height: 3px !important;
344
- border-radius: 3px !important;
345
- width: 90%;
346
- margin: 15px 5% 20px 5%;
347
  }
348
 
349
- .iris-slider-offset.ui-slider.ui-widget-content {
350
- background: transparent !important;
351
- height: auto !important;
 
 
352
  }
353
 
354
- .ui-slider.ui-widget-content .ui-widget-header {
355
- background: #4b93ff;
356
- left: 0px !important;
357
- -webkit-border-radius: 3px;
358
- -moz-border-radius: 3px;
359
- -khtml-border-radius: 3px;
360
- border-radius: 3px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  }
362
 
363
  /* ------- Select2 ------- */
364
  .yith-plugin-fw-select2-wrapper {
365
- width: 400px;
366
  }
367
 
368
  /* ------- Textarea ------- */
369
  .yith-plugin-fw-textarea-editor-field-wrapper {
370
- max-width: 1000px;
371
- clear: both;
372
  }
373
 
374
  .yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area,
375
  .woocommerce table.form-table .yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area {
376
- width: 100%;
377
  }
378
 
379
  /* ------- Buttons ------- */
380
  .yith-plugin-fw-buttons-field-wrapper {
381
- margin-top: 7px;
382
  }
383
 
384
  /* ------- Select Images ------- */
385
  .yith-plugin-fw-select-images__list {
386
- margin: 0;
387
- display: flex;
388
- flex-wrap: wrap;
389
  }
390
 
391
  .yith-plugin-fw-select-images__item {
392
- width: calc(20% - 10px);
393
- min-width: 150px;
394
- margin: 0 10px 10px 0;
395
- padding: 10px;
396
- box-sizing: border-box;
397
- cursor: pointer;
398
- transition: all .3s;
399
- border: 2px solid #eee;
400
- display: flex;
401
- flex-direction: column;
402
- justify-content: space-between;
403
  }
404
 
405
  .yith-plugin-fw-select-images__item:hover,
406
  .yith-plugin-fw-select-images__item.yith-plugin-fw-select-images__item--selected {
407
- border-color: #07bcce;
408
  }
409
 
410
  .yith-plugin-fw-select-images__item__label {
411
- text-align: center;
412
- font-weight: 600;
413
- margin-bottom: 10px;
414
  }
415
 
416
  .yith-plugin-fw-select-images__item img {
417
- display: block;
418
- max-width: 100%;
419
- margin: 0 auto;
420
  }
421
 
422
  /****************
@@ -435,29 +454,29 @@ WordPress 5.3 with old panel fixes
435
  YITH UI
436
  ****************/
437
  @font-face {
438
- font-family: 'yith-icon';
439
- src: url('../fonts/yith-icon.eot?7ik896');
440
- src: url('../fonts/yith-icon.eot?7ik896#iefix') format('embedded-opentype'),
441
  url('../fonts/yith-icon.ttf?7ik896') format('truetype'),
442
  url('../fonts/yith-icon.woff?7ik896') format('woff'),
443
  url('../fonts/yith-icon.svg?7ik896#yith-icon') format('svg');
444
- font-weight: normal;
445
- font-style: normal;
446
  }
447
 
448
  [class^="icon-"], [class*=" icon-"][class^="yith-icon-"], [class*=" yith-icon-"] {
449
  /* use !important to prevent issues with browser extensions that change fonts */
450
- font-family: 'yith-icon' !important;
451
- speak: none;
452
- font-style: normal;
453
- font-weight: normal;
454
- font-variant: normal;
455
- text-transform: none;
456
- line-height: 1;
457
 
458
  /* Better Font Rendering =========== */
459
- -webkit-font-smoothing: antialiased;
460
- -moz-osx-font-smoothing: grayscale;
461
  }
462
 
463
  .yith-icon-reply:before {
@@ -465,351 +484,351 @@ YITH UI
465
  color: #757575;
466
  }
467
  .yith-icon-calendar_add:before {
468
- content: "\e913";
469
- color: #757575;
470
  }
471
 
472
  .yith-icon-calendar_money:before {
473
- content: "\e914";
474
- color: #757575;
475
  }
476
 
477
  .yith-icon-calendar2:before {
478
- content: "\e915";
479
- color: #757575;
480
  }
481
 
482
  .yith-icon-people:before {
483
- content: "\e916";
484
- color: #757575;
485
  }
486
 
487
  .yith-icon-shield_money:before {
488
- content: "\e917";
489
- color: #757575;
490
  }
491
 
492
  .yith-icon-time_check:before {
493
- content: "\e918";
494
- color: #757575;
495
  }
496
 
497
  .yith-icon-world_settings:before {
498
- content: "\e919";
499
- color: #757575;
500
  }
501
 
502
  .yith-icon-arrow_eye_closed:before {
503
- content: "\e912";
504
- color: #757575;
505
  }
506
 
507
  .yith-icon-arrow_eye:before {
508
- content: "\e911";
509
- color: #757575;
510
  }
511
 
512
  .yith-icon-reset:before {
513
- content: "\e910";
514
- color: #757575;
515
  }
516
 
517
  .yith-icon-drag:before {
518
- content: "\e90f";
519
- color: #757575;
520
  }
521
 
522
  .yith-icon-trash:before {
523
- content: "\e90d";
524
- color: #757575;
525
  }
526
 
527
  .yith-icon-info:before {
528
- content: "\e90e";
529
- color: #757575;
530
  }
531
 
532
  .yith-icon-arrow_down:before {
533
- content: "\e900";
534
- color: #757575;
535
  }
536
 
537
  .yith-icon-arrow_left:before {
538
- content: "\e901";
539
- color: #757575;
540
  }
541
 
542
  .yith-icon-arrow_right:before {
543
- content: "\e902";
544
- color: #757575;
545
  }
546
 
547
  .yith-icon-arrow_up:before {
548
- content: "\e903";
549
- color: #757575;
550
  }
551
 
552
  .yith-icon-calendar:before {
553
- content: "\e904";
554
- color: #757575;
555
  }
556
 
557
  .yith-icon-check:before {
558
- content: "\e905";
559
- color: #757575;
560
  }
561
 
562
  .yith-icon-close:before {
563
- content: "\e906";
564
- color: #757575;
565
  }
566
 
567
  .yith-icon-edit:before {
568
- content: "\e907";
569
- color: #757575;
570
  }
571
 
572
  .yith-icon-magnifier:before {
573
- content: "\e908";
574
- color: #757575;
575
  }
576
 
577
  .yith-icon-pencil:before {
578
- content: "\e909";
579
- color: #757575;
580
  }
581
 
582
  .yith-icon-plus:before {
583
- content: "\e90a";
584
- color: #757575;
585
  }
586
 
587
  .yith-icon-update:before {
588
- content: "\e90b";
589
- color: #757575;
590
  }
591
 
592
  .yith-icon-upload:before {
593
- content: "\e90c";
594
- color: #757575;
595
  }
596
 
597
  .yith-plugin-fw-banner {
598
- width: 100%;
599
- height: 75px;
600
- background: url('../images/banner-premium.png');
601
  }
602
 
603
  .yith-plugin-fw-banner.yith-plugin-fw-banner-free {
604
- height: 290px;
605
- background: url('../images/banner-free.png') no-repeat;
606
  }
607
 
608
  .yith-plugin-fw-banner.yith-plugin-fw-banner-free h1 {
609
- max-width: auto;
610
- text-align: left;
611
- margin-left: 110px;
612
- padding-top: 15px;
613
- padding-bottom: 8px;
614
  }
615
 
616
  .yith-plugin-fw-banner h1 {
617
- text-transform: uppercase;
618
- color: #0c5777;
619
- font-size: 15px;
620
- padding-left: 150px;
621
- font-weight: 700;
622
- text-align: left;
623
- display: inline-block;
624
- box-sizing: border-box;
625
  }
626
 
627
  .yith-plugin-fw-banner span {
628
- font-style: italic;
629
- display: block;
630
- font-size: 15px;
631
- color: #214249;
632
- text-transform: none;
633
- text-align: right;
634
  }
635
 
636
  .yith-plugin-fw-banner a,
637
  .yith-plugin-fw-banner a:focus {
638
- text-decoration: none;
639
- outline: none;
640
- box-shadow: none;
641
  }
642
 
643
  .yith-banners ul {
644
- list-style: none;
645
- margin-left: 10px;
646
  }
647
 
648
  .yith-banners ul li {
649
- display: inline-block;
650
- margin-left: 10px;
651
  }
652
 
653
  .yith-plugin-ui a {
654
- outline: none;
655
- box-shadow: none;
656
  }
657
 
658
  .yith-plugin-ui {
659
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
660
  }
661
 
662
  .yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
663
- margin-top: 10px;
664
  }
665
 
666
  .yith-plugin-ui .nav-tab {
667
- margin-left: 0px;
668
- margin-right: 2px;
669
- background-color: #336374;
670
- color: #fff;
671
- font-size: 15px;
672
- padding: 7px 20px;
673
- border: 0;
674
  }
675
 
676
  .yith-plugin-ui .nav-tab:first-child {
677
- border-left: 1px solid #d9d9d9;
678
  }
679
 
680
  .yith-plugin-ui .nav-tab.yith-premium {
681
- background-color: #be421c;
682
  }
683
 
684
  .yith-plugin-ui .nav-tab-active {
685
- background-color: #fff;
686
- color: #336374;
687
- border-bottom: 1px solid #fff;
688
  }
689
 
690
  .yith-plugin-ui .nav-tab-active.yith-premium {
691
- background-color: #fff;
692
- color: #be421c;
693
  }
694
 
695
  .yith-plugin-ui #plugin-fw-wc {
696
- padding-top: 0px;
697
  }
698
 
699
  .yith-plugin-ui .form-table td {
700
- padding: 15px 20px;
701
  }
702
 
703
  .yith-plugin-ui.metaboxes-tab label {
704
- color: #33373b;
705
- font-size: 14px;
706
- margin-left: -248px;
707
  }
708
 
709
  .yith-plugin-ui.metaboxes-tab .the-metabox {
710
- margin: 40px 0 40px 290px;
711
- margin-left: 264px;
712
  }
713
 
714
  .yith-plugin-ui.metaboxes-tab label {
715
- width: 200px;
716
- font-weight: 600;
717
  }
718
 
719
  .yith-plugin-ui span.description {
720
- color: #716269;
721
- font-size: 14px;
722
- font-style: normal;
723
- font-weight: 400;
724
- margin-top: 15px;
725
- margin-left: 0;
726
  }
727
 
728
  #wpwrap .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-ui h2.nav-tab-wrapper {
729
- border: 0;
730
- border-bottom: 1px solid #ccc;
731
- margin-right: 15px;
732
- margin-bottom: 0;
733
- background-color: transparent;
734
- padding-left: 0;
735
  }
736
 
737
  .yith-plugin-ui #plugin-fw-wc table.form-table,
738
  .yith-plugin-ui #yith-plugin-fw-panel table.form-table,
739
  .yith-plugin-ui table.form-table {
740
- border: 1px solid #d8d8d8;
741
- border-top: 0;
742
- margin-bottom: 40px;
743
  }
744
 
745
  .yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
746
- background-color: transparent;
747
- border: 0;
748
- text-transform: none;
749
- border-bottom: 1px solid #ddd;
750
  }
751
 
752
  .yith-plugin-ui h2 {
753
- color: #2a8db0;
754
- font-size: 15px;
755
- text-transform: uppercase;
756
- border: 1px solid #d8d8d8;
757
- border-bottom: 0;
758
- background-color: #fff;
759
- padding: 35px 20px;
760
- margin: 0px;
761
  }
762
 
763
  .yith-plugin-ui .yith-plugin-fw-custom-tab h2 {
764
- border: 0px solid #d8d8d8;
765
- padding-left: 0;
766
  }
767
 
768
  .yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
769
- padding: 30px 20px;
770
  }
771
  .yith-plugin-ui #plugin-fw-wc table.form-table tr.toggle-element-fixed td, #yith-plugin-fw-panel table.form-table tr.toggle-element-fixed td.forminp {
772
  padding: 0 20px 30px;
773
  }
774
  .yith-plugin-ui #plugin-fw-wc h2 + div {
775
- background: #fff;
776
- border-left: 1px solid #d9d9d9;
777
- border-right: 1px solid #d9d9d9;
778
- margin: -20px 0 0 0;
779
- padding-left: 20px;
780
- padding-bottom: 5px;
781
  }
782
 
783
  .yith-plugin-ui #plugin-fw-wc h2 + div p, .yith-plugin-ui p.info-box {
784
- background: #f1f1f1;
785
- font-size: 14px;
786
- font-weight: 700;
787
- width: 40%;
788
- display: block;
789
- padding: 15px;
790
- margin-bottom: 0;
791
  }
792
 
793
  .yith-plugin-ui #plugin-fw-wc h2 + div p:before, .yith-plugin-ui p.info-box:before {
794
- content: "\e90e";
795
- font-family: yith-icon;
796
- font-size: 30px;
797
- font-weight: normal;
798
- display: block;
799
- margin-top: -5px;
800
- float: left;
801
- margin-right: 15px;
802
  }
803
 
804
  .yith-plugin-ui h2:first-child {
805
- border-top: 0;
806
  }
807
 
808
  /*** Icon ***/
809
  .yith-plugin-ui span.yith-icon {
810
- margin-left: -36px;
811
- line-height: 36px;
812
- font-size: 20px;
813
  }
814
 
815
  /*** General Input Style ***/
@@ -830,65 +849,65 @@ YITH UI
830
  .woocommerce .yith-plugin-fw table.form-table input[type=password],
831
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=number],
832
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text] {
833
- border: 1px solid #d8d8d8;
834
- border-radius: 8px;
835
- padding: 8px 10px;
836
- height: 38px;
837
- min-width: 90px;
838
- box-shadow: none;
839
- color: #716269;
840
  }
841
 
842
  .yith-plugin-ui textarea,
843
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea {
844
- height: auto;
845
  }
846
 
 
847
  .yith-plugin-ui table.form-table input[type=text].wp-color-picker,
848
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
849
- border: 0;
850
- height: 30px;
851
- max-width: 121px;
852
- font-size: 11px;
853
- padding: 0;
854
-
855
  }
856
 
857
  .yith-plugin-ui .search-box input[name="s"] {
858
- height: 35px;
859
  }
860
 
861
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].small-text,
862
  .yith-plugin-ui input[type=text].small-text {
863
- width: 100px;
864
- height: 25px;
865
- border: 1px solid #d9d9d9;
866
  }
867
 
868
  .yith-plugin-ui textarea {
869
- height: auto;
870
- padding: 8px;
871
  }
872
 
873
  .yith-plugin-ui select:focus,
874
  .yith-plugin-ui input:focus {
875
- border-color: #a7d9ec !important;
876
  }
877
 
878
  .woocommerce .yith-plugin-ui table.form-table select,
879
  .yith-plugin-ui select {
880
- -webkit-appearance: none;
881
- line-height: 1.2em;
882
- min-height: 35px;
883
- background: url("../images/arrow_down.svg") no-repeat right center;
884
- background-size: 35px 13px;
885
- border-radius: 8px;
886
- padding-left: 10px;
887
  }
888
 
889
  .yith-plugin-ui .form-table th {
890
- width: 200px;
891
- padding-right: 50px;
892
  }
893
 
894
  /** BUTTONS **/
@@ -902,24 +921,24 @@ YITH UI
902
  .yith-plugin-ui .yith-plugin-fw-deselect-all,
903
  .yith-plugin-ui .yith-plugin-fw-upload-button,
904
  .yith-plugin-ui .yith-plugin-fw-upload-button-reset {
905
- border-radius: 3px;
906
- text-transform: uppercase;
907
- box-shadow: none;
908
- border: 0;
909
- font-weight: 700;
910
- font-size: 11px;
911
- padding: 0px 14px;
912
- outline: none;
913
- height: auto;
914
- transition: all ease 0.3s;
915
- background-color: #d6d6d6;
916
- color: #656565;
917
- text-shadow: none;
918
- vertical-align: middle;
919
- line-height: 26px;
920
- display: inline-block;
921
- text-decoration: none;
922
- cursor: pointer;
923
  }
924
 
925
  .wp-core-ui .yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button-reset,
@@ -927,7 +946,7 @@ YITH UI
927
  .yith-plugin-ui .yith-plugin-fw-upload-button-reset,
928
  .yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button-reset,
929
  .yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button {
930
- height: 38px;
931
  }
932
 
933
  .wp-core-ui .yith-plugin-ui .button:focus,
@@ -937,28 +956,28 @@ YITH UI
937
  .yith-plugin-ui .yith-edit-button:focus,
938
  .yith-plugin-ui .yith-update-button:focus,
939
  .wp-core-ui .yith-plugin-ui .button-secondary:focus {
940
- outline: none;
941
- box-shadow: none;
942
  }
943
 
944
  .wp-core-ui .yith-plugin-ui .button-xl {
945
- padding: 0px 20px;
946
- font-size: 14px;
947
- line-height: 38px;
948
- display: inline-block;
949
- font-weight: 600;
950
  }
951
 
952
  /** button with inside a span with icon class */
953
  .yith-plugin-ui .button-secondary span.yith-icon {
954
- margin-left: 0px;
955
- margin-right: 10px;
956
- line-height: normal;
957
  }
958
 
959
  .yith-plugin-ui .button-secondary span.yith-icon:before {
960
- color: #656565;
961
- font-size: 15px;
962
  }
963
 
964
 
@@ -967,24 +986,24 @@ YITH UI
967
  .yith-plugin-ui .yith-save-button:hover,
968
  .wp-core-ui .yith-plugin-ui .button-secondary:hover,
969
  .yith-plugin-ui .yith-plugin-fw-upload-button-reset:hover {
970
- background-color: #cacaca;
971
- color: #515151;
972
  }
973
 
974
  .wp-core-ui .yith-plugin-ui .button-primary,
975
  .yith-plugin-ui .button-secondary.yith-plugin-fw-select-all,
976
  .yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button {
977
- background-color: #007694;
978
- color: #fff;
979
  }
980
 
981
 
982
  .yith-plugin-ui .yith-add-button,
983
  .wp-core-ui .yith-plugin-ui .button-primary:focus,
984
  .wp-core-ui .yith-plugin-ui .button-primary:hover {
985
- background-color: #375f6b;
986
- color: #fff;
987
- cursor: pointer;
988
  }
989
 
990
 
@@ -993,11 +1012,11 @@ YITH UI
993
  .yith-plugin-ui .button-secondary.yith-plugin-fw-select-all:hover,
994
  .yith-plugin-ui .button-secondary.yith-plugin-fw-select-all:focus,
995
  .yith-plugin-ui .yith-plugin-fw-upload-button:hover {
996
- border-color: #007694;
997
- background: #007694;
998
- color: #fff;
999
- line-height: 26px;
1000
- margin-left: 0;
1001
  }
1002
 
1003
  .yith-plugin-ui .button-primary:before,
@@ -1006,608 +1025,572 @@ YITH UI
1006
  .yith-plugin-ui .yith-edit-button:before,
1007
  .yith-plugin-ui .yith-update-button:before,
1008
  .yith-plugin-ui .button-secondary:before {
1009
- font-family: 'yith-icon';
1010
- font-size: 10px;
1011
- font-weight: 700;
1012
- margin-right: 10px;
1013
- vertical-align: bottom;
1014
- display: inline-block;
1015
  }
1016
 
1017
  /** yith-edit-button **/
1018
  .yith-plugin-ui .yith-edit-button {
1019
- background-color: #7f9298;
1020
- color: #fff;
1021
  }
1022
 
1023
  .yith-plugin-ui .yith-edit-button:focus,
1024
  .yith-plugin-ui .yith-edit-button:hover {
1025
- background-color: #718085;
1026
- color: #fff;
1027
  }
1028
 
1029
  .yith-plugin-ui .yith-edit-button:before {
1030
- content: "\e907";
1031
  }
1032
 
1033
  /** yith-update-button **/
1034
  .yith-plugin-ui .yith-update-button {
1035
- background-color: #94aa09;
1036
- color: #fff;
1037
  }
1038
 
1039
  .yith-plugin-ui .yith-update-button:focus,
1040
  .yith-plugin-ui .yith-update-button:hover {
1041
- background-color: #7a9009;
1042
- color: #fff;
1043
  }
1044
 
1045
  .yith-plugin-ui .yith-update-button:before {
1046
- content: "\e90b";
1047
- font-size: 15px;
1048
  }
1049
 
1050
  /** yith-save-button **/
1051
 
1052
  .yith-plugin-ui .yith-save-button {
1053
- background-color: #267390;
1054
- color: #fff;
1055
  }
1056
 
1057
  .yith-plugin-ui .yith-save-button:focus,
1058
  .yith-plugin-ui .yith-save-button:hover {
1059
- background-color: #1c4863;
1060
- color: #fff;
1061
  }
1062
 
1063
 
1064
  /** yith-remove-button **/
1065
 
1066
  .yith-plugin-ui .button-secondary.yith-remove-button:before {
1067
- content: "\e90d";
1068
- font-size: 15px;
1069
  }
1070
 
1071
 
1072
  /** yith-add-button **/
1073
  .yith-plugin-ui .yith-add-button:before {
1074
- content: "\e90a";
1075
  }
1076
 
1077
  .yith-plugin-ui .yith-add-button.closed {
1078
- background-color: #fff;
1079
- color: #375f6b;
1080
- border: 1px solid #375f6b;
1081
  }
1082
 
1083
  .yith-plugin-ui .yith-add-button.closed:before {
1084
- content: "\e906";
1085
  }
1086
 
1087
 
1088
  /** yith-plugin-fw-upload-button **/
1089
  .yith-plugin-ui button.yith-plugin-fw-upload-button:before {
1090
- content: "\e90c";
1091
- font-family: 'yith-icon';
1092
- font-size: 19px;
1093
- font-weight: 400;
1094
- margin-right: 10px;
1095
- vertical-align: middle;
1096
- display: inline-block;
1097
  }
1098
 
1099
  /** SELECT 2 **/
1100
  .yith-plugin-ui .select2-container,
1101
  .yith-plugin-ui .select2-selection--single {
1102
- height: auto;
1103
- padding: 2px;
1104
- outline: none;
1105
  }
1106
 
1107
  .yith-plugin-ui .select2-selection--single {
1108
- margin: 0;
1109
- border: 0;
1110
  }
1111
 
1112
  /* old panel*/
1113
 
1114
- .yith-plugin-ui span.select2.select2-container.select2-container--default {
1115
- border: 1px solid #d8d8d8;
1116
- border-radius: 8px;
 
1117
  }
1118
 
1119
  .yith-plugin-ui span.select2.select2-container.select2-container--default:hover,
1120
  .yith-plugin-ui span.select2.select2-container.select2-container--default:active,
1121
  .yith-plugin-ui span.select2.select2-container.select2-container--default:focus {
1122
- border-color: #a7d9ec;
1123
  }
1124
 
1125
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
1126
- color: #fff;
1127
  }
1128
 
1129
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].select2-search__field,
1130
  .yith-plugin-ui .yith-plugin-fw table.form-table input.select2-search__field {
1131
- border: 0;
1132
- padding: 0;
1133
- height: initial;
1134
  }
1135
 
1136
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice,
1137
  .yith-plugin-ui .select2-selection__choice {
1138
- color: #fff;
1139
- background-color: #4e8ba2;
1140
- border-radius: 12px;
1141
- padding: 3px 11px;
1142
- border-color: #33937e;
1143
- font-size: 13px;
1144
  }
1145
 
1146
  .yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow:before {
1147
- content: "\e900";
1148
- font-family: 'yith-icon' !important;
1149
- line-height: 36px;
1150
- color: #d9d9d9;
1151
  }
1152
 
1153
  .yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow b {
1154
- display: none;
1155
  }
1156
 
1157
- .yith-plugin-ui .select2-container--open .select2-dropdown--below,
1158
- .yith-plugin-ui .select2-container--open .select2-dropdown--above,
1159
- .yith-plugin-fw-panel .select2-container--open .select2-dropdown--below,
1160
- .yith-plugin-fw-panel .select2-container--open .select2-dropdown--above {
1161
- margin-top: 10px;
1162
- border-radius: 8px;
1163
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
1164
  }
1165
 
1166
- .yith-plugin-ui .select2-container--open .select2-dropdown--above,
1167
- .yith-plugin-fw-panel .select2-container--open .select2-dropdown--above {
1168
- margin-top: -10px;
1169
  }
1170
 
1171
- .yith-plugin-ui .select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
1172
- .yith-plugin-ui .select2-container--default.select2-container--open.select2-container--above .select2-selection--single,
1173
- .yith-plugin-fw-panel .select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
1174
- .yith-plugin-fw-panel .select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
1175
- border-radius: 8px;
1176
  }
1177
 
1178
- .yith-plugin-ui .select2-results .select2-results__group, .select2-results .select2-results__option:first-child,
1179
- .yith-plugin-fw-panel .select2-results .select2-results__group, .select2-results .select2-results__option:first-child {
1180
- border-top-left-radius: 8px;
1181
- border-top-right-radius: 8px;
1182
  }
1183
- .yith-plugin-ui .select2-results .select2-results__group, .select2-results .select2-results__option:last-child,
1184
- .yith-plugin-fw-panel .select2-results .select2-results__group, .select2-results .select2-results__option:last-child,
1185
- .yith-plugin-ui .select2-results .select2-results__group,
1186
- .yith-plugin-ui .select2-results .select2-results__option:last-child,
1187
- .yith-plugin-fw-panel .select2-results .select2-results__group,
1188
- .yith-plugin-fw-panel .select2-results .select2-results__option:last-child,
1189
- .yith-plugin-ui .select2-results .select2-results__group,
1190
- .yith-plugin-ui .select2-results .select2-results__option:last-child,
1191
- .yith-plugin-fw-panel .select2-results .select2-results__group,
1192
- .yith-plugin-fw-panel .select2-results .select2-results__option:last-child {
1193
- border-bottom-left-radius: 8px;
1194
- border-bottom-right-radius: 8px;
1195
  }
1196
 
1197
- .yith-plugin-ui .select2-dropdown{
1198
- border: 0;
 
1199
  }
1200
- .yith-plugin-ui .select2-container--default .select2-results__option[data-selected=true],
1201
- .yith-plugin-ui .select2-container--default .select2-results__option[aria-selected=true],
1202
- .yith-plugin-fw-panel .select2-container--default .select2-results__option[data-selected=true],
1203
- .yith-plugin-fw-panel .select2-container--default .select2-results__option[aria-selected=true],
1204
- .yith-plugin-ui .select2-container--default .select2-results__option--highlighted[aria-selected],
1205
- .yith-plugin-ui .select2-container--default .select2-results__option--highlighted[data-selected],
1206
- .yith-plugin-fw-panel .select2-container--default .select2-results__option--highlighted[aria-selected],
1207
- .yith-plugin-fw-panel .select2-container--default .select2-results__option--highlighted[data-selected] {
1208
- background-color: #e8eff1;
1209
- color: #4e8ba2;
1210
- outline: none;
1211
  }
1212
 
1213
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
1214
  .yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
1215
- float: right;
1216
- padding-left: 15px;
1217
- text-indent: -9999px;
1218
  }
1219
 
1220
 
1221
  .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
1222
  .woocommerce .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
1223
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
1224
- float: right;
1225
- color: #fff;
1226
- content: "\e906";
1227
- font-family: 'yith-icon' !important;
1228
- font-size: 9px;
1229
- line-height: 21px;
1230
- text-indent: 0;
1231
  }
1232
 
1233
  .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
1234
- color: #000;
1235
  }
1236
 
1237
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after
1238
  .yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
1239
- color: #000;
1240
  }
1241
 
1242
  .yith-plugin-ui .select2-container .select2-selection--multiple,
1243
  .yith-plugin-ui .select2-container--default.select2-container--focus .select2-selection--multiple {
1244
- border: 0;
1245
  }
1246
 
1247
  .yith-plugin-fw .select2-search input[type=text] {
1248
- border: 0;
1249
- padding: 0;
1250
- height: auto;
1251
  }
1252
 
1253
  .yith-plugin-ui .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier,
1254
  .yith-plugin-fw-panel .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier {
1255
- position: absolute;
1256
- padding-top: 5px;
1257
  }
1258
 
1259
  .yith-plugin-ui input[type=text].select2-search__field {
1260
- border: 0;
1261
- padding: 0;
1262
- height: 30px;
1263
  }
1264
 
1265
  .yith-plugin-ui .select2-container--default .select2-search--dropdown .select2-search__field,
1266
  .yith-plugin-fw-panel .select2-container--default .select2-search--dropdown .select2-search__field {
1267
- border: 1px solid #d9d9d9;
1268
- border-radius: 8px;
1269
- box-shadow: none;
1270
  }
1271
 
1272
  .yith-plugin-ui .select2-dropdown,
1273
  .yith-plugin-fw-panel .select2-dropdown {
1274
- border: 1px solid #d9d9d9;
1275
  }
1276
 
1277
  /** RADIO BUTTON **/
1278
  .yith-plugin-ui [type="radio"]:checked,
1279
  .yith-plugin-ui [type="radio"]:not(:checked) {
1280
- position: absolute;
1281
- left: -9999px;
1282
  }
1283
 
1284
  .yith-plugin-ui [type="radio"]:checked + label,
1285
  .yith-plugin-ui [type="radio"]:not(:checked) + label {
1286
- position: relative;
1287
- padding-left: 35px;
1288
- cursor: pointer;
1289
- line-height: 20px;
1290
- display: inline-block;
1291
- color: #716269;
1292
- font-size: 14px;
1293
  }
1294
 
1295
  .yith-plugin-ui [type="radio"]:checked + label:before,
1296
  .yith-plugin-ui [type="radio"]:not(:checked) + label:before {
1297
- content: '';
1298
- position: absolute;
1299
- left: 0;
1300
- top: 0;
1301
- width: 19px;
1302
- height: 19px;
1303
- border: 1px solid #d8d8d8;
1304
- border-radius: 100%;
1305
- background: #fff;
1306
  }
1307
 
1308
  .yith-plugin-ui [type="radio"]:checked + label:after,
1309
  .yith-plugin-ui [type="radio"]:not(:checked) + label:after {
1310
- content: '';
1311
- width: 13px;
1312
- height: 13px;
1313
- background: #4e8ba2;
1314
- position: absolute;
1315
- top: 4px;
1316
- left: 4px;
1317
- border-radius: 100%;
1318
- -webkit-transition: all 0.2s ease;
1319
- transition: all 0.2s ease;
1320
  }
1321
 
1322
  .yith-plugin-ui [type="radio"]:not(:checked) + label:after {
1323
- opacity: 0;
1324
- -webkit-transform: scale(0);
1325
- transform: scale(0);
1326
  }
1327
 
1328
  .yith-plugin-ui [type="radio"]:checked + label:after {
1329
- opacity: 1;
1330
- -webkit-transform: scale(1);
1331
- transform: scale(1);
1332
  }
1333
 
1334
  /** CHECKBOX **/
1335
  .yith-plugin-ui input[type="checkbox"] {
1336
- -webkit-appearance: none;
1337
- background-color: #fff;
1338
- border: 1px solid #d8d8d8;
1339
- box-shadow: none;
1340
- width: 18px;
1341
- height: 18px;
1342
- border-radius: 3px;
1343
- display: inline-block;
1344
- position: relative;
1345
- margin-right: 10px;
1346
  }
1347
 
1348
  .yith-plugin-ui input[type="checkbox"]:checked {
1349
- background-color: #4e8ba2;
1350
- border-color: #488197;
1351
  }
1352
 
1353
  .yith-plugin-ui .forminp-checkbox span.description.inline {
1354
- margin-left: 10px;
1355
  }
1356
 
1357
  .yith-plugin-ui input[type="checkbox"]:checked:before {
1358
- display: none;
1359
  }
1360
 
1361
  .yith-plugin-ui input[type="checkbox"]:checked:after {
1362
- content: "\e905";
1363
- font-family: 'yith-icon';
1364
- font-size: 15px;
1365
- position: absolute;
1366
- top: 8px;
1367
- left: 1px;
1368
- color: #fff;
1369
  }
1370
 
1371
  /** ONOFF **/
1372
  .yith-plugin-ui .yith-plugin-fw-onoff-container input[type="checkbox"] {
1373
- display: none;
1374
  }
1375
 
1376
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
1377
- border: 1px solid #d8d8d8;
1378
- background-color: #fff;
1379
- width: 60px;
1380
- height: 24px;
1381
  }
1382
 
1383
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
1384
- background-color: #d8d8d8;
1385
  }
1386
 
1387
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
1388
- width: 14px;
1389
- height: 14px;
1390
- top: 5px;
1391
- left: 6px;
1392
- background-color: #d8d8d8;
1393
  }
1394
 
1395
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
1396
- content: 'OFF';
1397
- width: 14px;
1398
- height: 14px;
1399
- font-size: 13px;
1400
- font-weight: 600;
1401
- padding-left: 27px;
1402
- color: #979797;
1403
- margin-top: 5px;
1404
- display: inline-block;
 
1405
  }
1406
 
1407
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span,
1408
  .yith-plugin-ui .yith-plugin-fw-onoff-container input.onoffchecked + span {
1409
- background-color: #fff;
1410
- border-color: #98aa36;
1411
  }
1412
 
1413
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before,
1414
  .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
1415
- background-color: #98aa36;
1416
- left: 41px;
1417
  }
1418
 
1419
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
1420
  .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
1421
- content: 'ON';
1422
- color: #98aa36;
1423
- width: 14px;
1424
- height: 14px;
1425
- display: inline-block;
1426
- font-size: 13px;
1427
- font-weight: 600;
1428
- padding: 0 10px;
1429
- margin-top: 5px;
 
1430
  }
1431
 
1432
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
1433
- text-indent: 0;
1434
  }
1435
 
1436
 
1437
  /**
1438
  DATEPICKER
1439
  */
1440
- .yith-plugin-ui div#ui-datepicker-div,
1441
- .yith-plugin-fw-panel div#ui-datepicker-div {
1442
- border: 0;
1443
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
1444
  }
1445
 
1446
- .yith-plugin-ui .ui-datepicker-header.ui-widget-header,
1447
- .yith-plugin-fw-panel .ui-datepicker-header.ui-widget-header {
1448
- background: #4e8ba2;
1449
- color: #fff;
1450
- font-size: 11px;
1451
- line-height: 25px;
1452
- border: 0;
1453
- min-height: 25px;
1454
- }
1455
-
1456
- .yith-plugin-ui .ui-datepicker-title,
1457
- .yith-plugin-fw-panel .ui-datepicker-title {
1458
- line-height: 25px;
1459
- }
1460
-
1461
- .yith-plugin-ui .ui-datepicker th,
1462
- .yith-plugin-fw-panel .ui-datepicker th {
1463
- color: #716269;
1464
- }
1465
-
1466
- .yith-plugin-ui .ui-widget-header .ui-icon,
1467
- .yith-plugin-ui .ui-widget-header .ui-state-hover,
1468
- .yith-plugin-ui .ui-datepicker .ui-datepicker-prev,
1469
- .yith-plugin-ui .ui-datepicker .ui-datepicker-next,
1470
- .yith-plugin-ui .ui-icon.ui-icon-circle-triangle-w,
1471
- .yith-plugin-ui .ui-icon.ui-icon-circle-triangle-e,
1472
- .yith-plugin-fw-panel .ui-widget-header .ui-icon,
1473
- .yith-plugin-fw-panel .ui-widget-header .ui-state-hover,
1474
- .yith-plugin-fw-panel .ui-datepicker .ui-datepicker-prev,
1475
- .yith-plugin-fw-panel .ui-datepicker .ui-datepicker-next,
1476
- .yith-plugin-fw-panel .ui-icon.ui-icon-circle-triangle-w,
1477
- .yith-plugin-fw-panel .ui-icon.ui-icon-circle-triangle-e {
1478
- background: none;
1479
- content: "";
1480
- border: 0;
1481
- text-indent: 0;
1482
- width: 15px;
1483
- height: 20px;
1484
- display: block;
1485
- overflow: hidden;
1486
  }
1487
 
1488
  .yith-plugin-ui .yith-password-wrapper {
1489
- display: inline-block;
1490
- width: auto;
1491
- position: relative;
1492
  }
1493
 
1494
  .yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before,
1495
  .yith-plugin-ui .yith-password-wrapper .yith-password-eye:before {
1496
- content: '\e911';
1497
- color: #999;
1498
- font-family: 'yith-icon';
1499
- font-size: 20px;
1500
- font-weight: normal;
1501
- width: 15px;
1502
- display: block;
1503
- position: absolute;
1504
- right: 13px;
1505
- top: 0;
1506
- line-height: 38px;
1507
- bottom: 0;
1508
- cursor: pointer;
1509
  }
1510
 
1511
  .yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before {
1512
- content: '\e912';
1513
  }
1514
 
1515
- .yith-plugin-ui .ui-icon.ui-icon-circle-triangle-w:before,
1516
- .yith-plugin-fw-panel .ui-icon.ui-icon-circle-triangle-w:before {
1517
- content: "\e901";
1518
- color: #fff;
1519
- font-family: 'yith-icon';
1520
- font-size: 12px;
1521
- font-weight: normal;
1522
- width: 15px;
1523
- display: block;
1524
  }
1525
 
1526
- .yith-plugin-ui .ui-icon.ui-icon-circle-triangle-e:before,
1527
- .yith-plugin-fw-panel .ui-icon.ui-icon-circle-triangle-e:before {
1528
- content: "\e902";
1529
- color: #fff;
1530
- text-indent: 0;
1531
- font-family: 'yith-icon';
1532
- font-size: 12px;
1533
- font-weight: normal;
1534
- width: 15px;
1535
- display: block;
1536
  }
1537
 
1538
  /* arrow */
1539
- .yith-plugin-ui .ui-datepicker .ui-datepicker-prev,
1540
- .yith-plugin-ui .ui-datepicker .ui-datepicker-next,
1541
- .yith-plugin-ui .ui-datepicker-prev.ui-datepicker-prev-hover,
1542
- .yith-plugin-ui .ui-datepicker-prev.ui-datepicker-next-hover,
1543
- .yith-plugin-fw-panel .ui-datepicker .ui-datepicker-prev,
1544
- .yith-plugin-fw-panel .ui-datepicker .ui-datepicker-next,
1545
- .yith-plugin-fw-panel .ui-datepicker-prev.ui-datepicker-prev-hover,
1546
- .yith-plugin-fw-panel .ui-datepicker-prev.ui-datepicker-next-hover {
1547
- top: 1px;
1548
- cursor: pointer;
1549
- }
1550
-
1551
- .yith-plugin-ui .ui-datepicker-prev.ui-datepicker-prev,
1552
- .yith-plugin-ui .ui-datepicker-prev.ui-datepicker-prev-hover,
1553
- .yith-plugin-fw-panel .ui-datepicker-prev.ui-datepicker-prev,
1554
- .yith-plugin-fw-panel .ui-datepicker-prev.ui-datepicker-prev-hover {
1555
- left: 5px;
1556
- }
1557
-
1558
- .yith-plugin-ui .ui-datepicker .ui-datepicker-next,
1559
- .yith-plugin-ui .ui-datepicker-next.ui-datepicker-next-hover,
1560
- .yith-plugin-fw-panel .ui-datepicker .ui-datepicker-next,
1561
- .yith-plugin-fw-panel .ui-datepicker-next.ui-datepicker-next-hover {
1562
- right: 1px;
1563
- }
1564
-
1565
- .yith-plugin-ui .ui-datepicker table,
1566
- .yith-plugin-fw-panel .ui-datepicker table {
1567
- font-size: 10px;
1568
- }
1569
-
1570
- .yith-plugin-ui .ui-state-default,
1571
- .yith-plugin-ui .ui-widget-content .ui-state-default,
1572
- .yith-plugin-ui .ui-widget-header .ui-state-default,
1573
- .yith-plugin-fw-panel .ui-state-default,
1574
- .yith-plugin-fw-panel .ui-widget-content .ui-state-default,
1575
- .yith-plugin-fw-panel .ui-widget-header .ui-state-default {
1576
- background: #fff;
1577
- border: 1px solid #d9d9d9;
1578
 
1579
  }
1580
 
1581
- .yith-plugin-ui .ui-state-hover,
1582
- .yith-plugin-ui .ui-widget-content .ui-state-hover,
1583
- .yith-plugin-ui a.ui-state-default:focus,
1584
- .yith-plugin-ui .ui-widget-content .ui-state-focus,
1585
- .yith-plugin-ui .ui-widget-header .ui-state-focus,
1586
- .yith-plugin-fw-panel .ui-state-hover,
1587
- .yith-plugin-fw-panel .ui-widget-content .ui-state-hover,
1588
- .yith-plugin-fw-panel a.ui-state-default:focus,
1589
- .yith-plugin-fw-panel .ui-widget-content .ui-state-focus,
1590
- .yith-plugin-fw-panel .ui-widget-header .ui-state-focus {
1591
- background: #ebf1f3;
1592
- border: 1px solid #bfd5dd;
1593
- outline: none;
1594
- box-shadow: none;
1595
  }
1596
 
1597
- .yith-plugin-ui .ui-widget-header .ui-state-hover, .woocommerce .yith-plugin-ui .ui-state-focus,
1598
- .yith-plugin-fw-panel .ui-widget-header .ui-state-hover, .woocommerce .yith-plugin-ui .ui-state-focus {
1599
- background: none;
1600
- border: 0;
1601
  }
1602
 
1603
  /** colorpicker **/
 
 
 
 
 
1604
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .yith-colorpicker-group:not(:first-child) {
1605
- margin-top: 20px;
1606
  }
1607
 
1608
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .iris-picker,
1609
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-holder {
1610
- display: none !important;
1611
  }
1612
 
1613
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap,
@@ -1618,262 +1601,254 @@ DATEPICKER
1618
 
1619
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .iris-picker,
1620
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .wp-picker-holder {
1621
- display: block !important;
1622
  }
1623
 
1624
  .woocommerce .yith-plugin-ui .iris-picker {
1625
- border: 0;
1626
- margin-top: 20px;
1627
  }
1628
 
1629
  .yith-plugin-ui .yith-plugin-fw input[type=text].wp-color-picker {
1630
- border: 0;
1631
- padding: 2px 5px;
1632
- height: 30px;
1633
  }
1634
 
1635
  .yith-plugin-ui .wp-color-result-text {
1636
- display: none;
1637
- }
1638
-
1639
- .yith-plugin-ui .wp-picker-container .wp-color-result.button{
1640
- height: 30px!important;
1641
- }
1642
-
1643
- .yith-plugin-ui .wp-picker-container .color-alpha {
1644
- height: 28px!important;
1645
  }
1646
 
1647
  .yith-plugin-ui .wp-picker-container .wp-color-result.button {
1648
- width: 30px;
1649
- height: 30px;
1650
- border: 0;
1651
- box-shadow: none;
1652
- border: 1px solid #d9d9d9;
1653
- margin-bottom: 0;
1654
- display: inline-block;
1655
- vertical-align: middle;
 
1656
  }
1657
 
1658
  .yith-plugin-ui .wp-picker-default-custom {
1659
- cursor: pointer;
1660
- width: 25px;
1661
- padding: 0 5px;
1662
- display: inline-block;
1663
- vertical-align: middle;
1664
- position: relative;
1665
  }
1666
 
1667
  .yith-plugin-ui .wp-picker-default-custom input.button {
1668
- opacity: 0;
1669
- margin: 0;
1670
- padding: 0;
1671
- position: absolute;
1672
- top: 0;
1673
- right: 0;
1674
- left: 0;
1675
- bottom: 0;
1676
- z-index: 2;
1677
  }
1678
 
1679
  .yith-plugin-ui .wp-picker-default-custom:before {
1680
  content: "\e91a";
1681
- text-indent: 0;
1682
- font-family: 'yith-icon';
1683
- font-size: 20px;
1684
- color: #d8d8d8;
1685
- font-weight: normal;
1686
- width: 15px;
1687
- display: block;
1688
- background: none;
1689
- line-height: 20px;
1690
- margin-left: 8px;
1691
  }
1692
 
1693
  .yith-plugin-ui .wp-picker-container {
1694
- width: auto;
1695
- display: inline-block;
1696
- border: 1px solid #d9d9d9;
1697
- border-radius: 8px;
1698
- padding: 5px;
1699
  }
1700
 
1701
  .yith-plugin-ui .iris-picker .iris-square-inner {
1702
- box-shadow: none;
1703
- border: 1px solid #d9d9d9;
1704
  }
1705
 
1706
  .yith-plugin-ui .yith-single-colorpicker {
1707
- display: inline-block;
1708
- width: 220px;
1709
  }
1710
 
1711
  .yith-plugin-ui .yith-single-colorpicker > label {
1712
- display: block;
1713
- font-size: 11px;
1714
- font-weight: 600;
1715
- margin: 0 0 10px 0;
1716
  }
1717
 
1718
  /* RANGE SLIDER */
1719
- .yith-plugin-ui .ui-slider-horizontal .ui-slider-handle {
1720
- top: -45px !important;
1721
- }
1722
-
1723
- .yith-plugin-ui .ui-slider-horizontal .ui-slider-handle {
1724
- position: absolute;
1725
- top: -33px;
1726
- left: 0;
1727
- width: auto !important;
1728
- height: auto !important;
1729
- padding: 2px 8px;
1730
- margin-left: -15px;
1731
- font-size: 12px;
1732
- line-height: 20px;
1733
- color: #4e8ba2;
1734
- text-align: center;
1735
- background-color: #fff;
1736
- border: 1px solid #fff;
1737
- border-radius: 3px;
1738
- -webkit-transition: opacity .3s ease-in-out 0s;
1739
- transition: opacity .3s ease-in-out 0s;
1740
- box-shadow: 0px 1px 7px 0px rgba(1, 1, 1, 0.13);
1741
- }
1742
-
1743
- .yith-plugin-ui .ui-slider-horizontal .ui-slider-handle:before {
1744
- position: absolute;
1745
- bottom: -3px;
1746
- left: 50%;
1747
- display: inline-block;
1748
- width: 6px;
1749
- height: 6px;
1750
- margin-left: -3px;
1751
- content: "";
1752
- background-color: #fff;
1753
- -webkit-transform: rotate(-45deg);
1754
- -ms-transform: rotate(-45deg);
1755
- transform: rotate(-45deg);
1756
- }
1757
-
1758
- .yith-plugin-ui .ui-slider.ui-widget-content .ui-widget-header {
1759
- background: #4e8ba2;
1760
- }
1761
-
1762
- .yith-plugin-ui .ui-slider-horizontal .ui-slider-handle:after {
1763
- content: '';
1764
- width: 17px;
1765
- height: 17px;
1766
- display: block;
1767
- position: absolute;
1768
- background: #fff;
1769
- top: 37px;
1770
- border-radius: 50%;
1771
- box-shadow: 0px 1px 6px 0px rgba(1, 1, 1, 0.25);
1772
- }
1773
-
1774
- .yith-plugin-ui .ui-slider.ui-widget-content {
1775
- height: 5px !important;
1776
- }
1777
-
1778
- .yith-plugin-ui .ui-slider .minCaption,
1779
- .yith-plugin-ui .ui-slider .maxCaption {
1780
- font-weight: 700;
1781
- font-size: 12px;
1782
  }
1783
 
1784
 
1785
  /* ADD_BOX AND TOGGLE */
1786
  .yith-plugin-ui .yith-add-box,
1787
  .yith-plugin-ui .yith-toggle-row {
1788
- width: 70%;
1789
- border: 1px solid #d9d9d9;
1790
- box-shadow: none;
1791
- border-radius: 4px;
1792
- margin: 20px 0;
1793
- padding: 10px;
1794
- box-sizing: border-box;
1795
- background: white;
1796
  }
1797
 
1798
  .yith-plugin-ui .yith-toggle-row {
1799
- cursor: pointer;
1800
- transition: all ease 0.5s;
1801
  }
1802
  .yith-plugin-ui .yith-toggle-row.fixed {
1803
- width: 100%;
1804
  margin: 0;
1805
  }
1806
  .yith-plugin-ui .yith-toggle-row.highlight {
1807
- transition: all ease 0.5s;
1808
  /*box-shadow: 0 0 7px rgb(81, 117, 129);*/
1809
- box-shadow: 0 0 7px rgb(30, 140, 190);
1810
 
1811
- display: block;
1812
  }
1813
 
1814
  .yith-plugin-ui .yith-add-box {
1815
- padding: 25px;
1816
- display: none;
1817
  }
1818
 
1819
  .yith-plugin-ui .yith-toggle-title {
1820
- position: relative;
1821
  }
1822
 
1823
  .yith-plugin-ui #plugin-fw-wc .yith-toggle-title h3,
1824
- .yith-plugin-ui.metaboxes-tab.yith-plugin-ui h3,
1825
  .yith-plugin-ui .yith-toggle-title h3 {
1826
- padding: 0px 20px 0px 25px;
1827
- margin: 3px 0;
1828
 
1829
- display: inline-block;
1830
- position: relative;
1831
- min-width: 173px;
1832
- box-sizing: border-box;
1833
- font-weight: 600;
1834
- font-size: 15px;
1835
- color: #23282d;
1836
- text-transform: inherit;
1837
  }
1838
 
1839
  .yith-plugin-ui .yith-toggle-title .subtitle {
1840
- padding-left: 0;
1841
- padding-top: 8px;
1842
- font-size: 12px;
1843
  }
1844
 
1845
  .yith-plugin-ui .yith-toggle {
1846
- position: absolute;
1847
- width: 30px;
1848
- cursor: pointer;
1849
- left: 0;
1850
- top: 0;
1851
- bottom: 0;
1852
- margin: auto;
1853
- display: flex;
1854
- align-items: center;
1855
  }
1856
 
1857
  .yith-plugin-ui .yith-toggle > span:before {
1858
- color: #405e69;
1859
  }
1860
 
1861
  .yith-plugin-ui .yith-toggle > span {
1862
- position: absolute;
1863
- right: 50%;
1864
- transition: transform .3s;
1865
- line-height: 1;
1866
  }
1867
 
1868
 
1869
  .yith-plugin-ui .yith-toggle-row-opened .yith-toggle span {
1870
- transform: rotateZ(90deg);
1871
  }
1872
 
1873
  .yith-plugin-ui .yith-toggle-content {
1874
- display: none;
1875
- position: relative;
1876
- padding: 30px 25px;
1877
  }
1878
 
1879
  .yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content {
@@ -1882,229 +1857,239 @@ DATEPICKER
1882
 
1883
  .yith-plugin-ui .yith-add-box-row,
1884
  .yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row {
1885
- display: table;
1886
- margin-bottom: 40px;
1887
  }
1888
 
1889
  .yith-plugin-ui .yith-add-box-row label,
1890
  .yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row > label {
1891
- display: table-cell;
1892
- width: 200px;
1893
- padding-right: 21px;
1894
- color: #33373b;
1895
- font-size: 14px;
1896
- vertical-align: top;
1897
- font-weight: 600;
1898
- }
1899
- .yith-plugin-ui .yith-plugin-fw-radio__row label{
1900
- font-weight: 400!important;
1901
  }
 
1902
  .yith-plugin-ui .yith-add-box-row .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper),
1903
  .yith-plugin-ui .yith-toggle-row-opened .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
1904
- margin-top: 10px;
1905
- width: auto;
1906
- float: none;
1907
- vertical-align: middle;
1908
- position: relative;
1909
  }
1910
 
1911
  .yith-plugin-ui .yith-add-box-row span.yith-icon,
1912
  .yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row span.yith-icon {
1913
- position: absolute;
1914
- right: 15px;
1915
- top: 0;
1916
- bottom: 0;
1917
  }
1918
 
1919
  .yith-plugin-ui .yith-add-box-buttons,
1920
  .yith-plugin-ui .yith-toggle-content-buttons {
1921
- text-align: right;
1922
  }
1923
 
1924
  .yith-plugin-ui .yith-toggle-onoff {
1925
- position: absolute;
1926
- cursor: pointer;
1927
- right: 0;
1928
  }
1929
 
1930
  .yith-plugin-ui .yith-toggle_wrapper.ui-sortable .yith-toggle-onoff {
1931
- right: 30px;
1932
  }
1933
 
1934
  .yith-plugin-ui .yith-toggle-row .yith-icon-drag {
1935
- position: absolute;
1936
- right: 0;
1937
- top: 25%;
1938
- bottom: 0;
1939
- line-height: 1;
1940
  }
1941
 
1942
  .yith-plugin-ui .yith-toggle-row.with-subtitle .yith-toggle-onoff {
1943
- top: 25%;
1944
  }
1945
 
1946
  /** SPINNER **/
1947
  .yith-plugin-ui .spinner {
1948
- vertical-align: -5px;
1949
- float: none;
1950
  }
1951
 
1952
  .yith-plugin-ui .spinner.show {
1953
- visibility: visible;
1954
  }
1955
 
1956
  /* LIST TABLE */
1957
  .yith-plugin-ui .form-table .list-table td {
1958
- padding: 15px 0px;
1959
  }
1960
 
1961
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table .bulkactions select {
1962
- border: 1px solid #d8d8d8;
1963
- max-width: 200px;
1964
- max-height: 30px;
1965
- padding: 0 10px;
1966
- margin-right: 5px;
1967
  }
1968
 
1969
  .yith-plugin-ui .form-table .list-table th {
1970
- width: initial;
 
 
 
 
1971
  }
1972
 
1973
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table tbody td {
1974
- padding-left: 20px;
1975
  }
1976
 
1977
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table th,
1978
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table td {
1979
- padding: 15px 20px 15px 20px;
1980
  }
1981
 
1982
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table thead td,
1983
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table thead th,
1984
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot td,
1985
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot th {
1986
- padding: 3px 20px;
1987
  }
1988
 
1989
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table thead a,
1990
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot a {
1991
- padding-left: 0;
1992
  }
1993
 
1994
  .yith-plugin-ui .yith-plugin-fw-list-table h2 {
1995
- border: 0;
1996
- padding: 35px 0 15px;
1997
- display: inline-block;
1998
- margin-right: 10px;
1999
  }
2000
 
2001
  .yith-plugin-ui .form-table .yith-plugin-fw-list-table table th {
2002
- vertical-align: middle;
2003
  }
2004
 
2005
  .yith-plugin-ui .yith-plugin-fw-list-table-container {
2006
- padding: 0 20px;
2007
  }
2008
 
2009
  .yith-plugin-ui #doaction, .yith-plugin-ui #doaction2,
2010
  .yith-plugin-ui #post-query-submit,
2011
  .yith-plugin-ui #search-submit,
2012
  .yith-plugin-ui .button.filter-button {
2013
- margin-left: 0;
2014
- height: 33px;
2015
- padding: 0 10px;
2016
- line-height: 33px;
2017
  }
2018
 
2019
  .yith-plugin-ui .bulkactions {
2020
- margin: 10px 0;
2021
  }
2022
 
2023
  .yith-plugin-ui .form-table td p.yith-section-description {
2024
- color: #716269;
2025
- margin-bottom: 20px;
2026
  }
2027
 
2028
  /** Time picker width*/
2029
  .yith-plugin-ui input.ui-timepicker-input {
2030
- width: 100px !important;
2031
  }
2032
 
2033
  /** date format **/
2034
  .yith-plugin-ui .yith-plugin-fw-date-format code {
2035
- margin-left: 30px;
2036
  }
2037
 
2038
  .yith-plugin-ui .yith-plugin-fw-date-format input[type=text].small-text {
2039
- margin-left: 45px;
2040
  }
2041
 
2042
  /** checkbox columns **/
2043
  .yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
2044
- width: calc(50% - 20px);
2045
- padding-right: 20px;
2046
- float: left;
2047
  }
2048
 
2049
  .yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
2050
- clear: both;
2051
  }
2052
 
2053
  .yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
2054
- width: calc(33% - 10px);
2055
- padding-right: 10px;
2056
- float: left;
2057
  }
2058
 
2059
  .yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
2060
- clear: both;
2061
  }
2062
 
2063
  .yith-plugin-fw-checkbox-field-wrapper {
2064
- display: inline-block !important;
 
2065
  }
2066
 
2067
  .yith-plugin-fw-checkbox-field-wrapper + span.description {
2068
- display: inline-block;
2069
- vertical-align: middle;
2070
- margin: 0;
2071
  }
2072
 
2073
  .yith-plugin-ui span.description {
2074
- margin-top: 10px;
2075
- line-height: 20px;
2076
  }
2077
 
2078
  .yith-plugin-fw-option-with-description {
2079
- display: table-cell;
2080
- width: auto;
2081
- vertical-align: top;
 
 
 
 
 
 
 
 
 
 
 
 
 
2082
  }
2083
 
2084
  /** YITH PANEL **/
2085
  .yith-plugin-ui #yith-plugin-fw-panel {
2086
- margin-top: -10px;
2087
  }
2088
 
2089
  .yith-plugin-ui #plugin-fw-wc, .yith-plugin-ui #yith-plugin-fw-panel {
2090
- padding-top: 0;
2091
  }
2092
 
2093
  .yith-plugin-ui .plugin-option tr {
2094
- border: 0;
2095
  }
2096
 
2097
  /** MULTI SELECT **/
2098
- .yith-plugin-ui .yith-plugin-fw-multi-select .yith-select-group {
2099
- display: -webkit-flex;
2100
- display: flex;
2101
- -webkit-flex-direction: row;
2102
- flex-direction: row;
2103
- }
2104
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select {
2105
- -webkit-flex: 50%;
2106
- flex: 50%;
2107
- margin-right: 20px;
 
2108
  }
2109
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select label {
2110
  display: block;
@@ -2118,69 +2103,73 @@ DATEPICKER
2118
  min-width: auto !important;
2119
  }
2120
 
2121
- @media screen and (max-width: 1440px) {
2122
  .yith-plugin-ui .yith-add-box,
2123
  .yith-plugin-ui .yith-toggle-row:not(.fixed) {
2124
- width: 80%;
2125
  }
2126
  }
2127
 
2128
- @media screen and (max-width: 1024px) {
2129
  .yith-plugin-ui .yith-add-box,
2130
  .yith-plugin-ui .yith-toggle-row:not(.fixed) {
2131
- width: 90%;
2132
  }
2133
 
2134
  .yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
2135
- width: 100%;
2136
- padding-right: 20px;
2137
- float: left;
2138
  }
2139
 
2140
  .yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
2141
- width: calc(50% - 10px);
2142
- padding-right: 10px;
2143
- float: left;
2144
  }
2145
 
2146
  .yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
2147
- clear: both;
2148
  }
2149
 
2150
  .yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
2151
- clear: initial;
2152
  }
2153
  }
2154
 
2155
- @media screen and (max-width: 782px) {
2156
  .yith-plugin-fw-banner.yith-plugin-fw-banner-free {
2157
- height: auto;
2158
- background-color: #a9c7d3;
2159
  }
2160
 
2161
  .yith-plugin-fw-banner.yith-plugin-fw-banner-free ul {
2162
- width: 90%;
2163
- text-align: center;
2164
  }
2165
 
2166
  .yith-plugin-fw-banner.yith-plugin-fw-banner-free li img {
2167
- width: 90%;
2168
- margin: 0 auto;
2169
  }
2170
 
2171
  .yith-plugin-fw-banner h1 {
2172
- line-height: 1.2em;
2173
  }
2174
 
2175
  .yith-plugin-ui .yith-add-box,
2176
  .yith-plugin-ui .yith-toggle-row {
2177
- width: 100%;
2178
  }
2179
 
2180
  .yith-plugin-ui td.forminp-checkbox.two-cols fieldset,
2181
  .yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
2182
- width: 100%;
2183
- clear: initial;
 
 
 
 
2184
  }
2185
 
2186
  }
1
  .yith-plugin-fw span.description {
2
+ display : block;
3
+ margin-top : 5px;
4
+ font-size : 12px;
5
+ color : #777;
6
+ font-style : italic;
7
+ clear : both;
8
  }
9
 
10
  .yith-plugin-fw span.description.inline {
11
+ display : inline-block;
12
+ margin : 0 0 0 5px;
13
  }
14
 
15
  .yith-disabled {
16
+ opacity : 0.3;
17
+ pointer-events : none;
18
  }
19
 
20
  .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
21
+ display : block;
22
+ width : 100%;
23
  }
24
 
25
  .yith-plugin-fw-field-wrapper span.desc {
26
+ display : block;
27
+ width : 100%;
28
  }
29
 
30
  .yith-plugin-fw-title-field-wrapper h3.title {
31
+ width : 100%;
32
+ padding: 0 !important;
33
  }
34
 
35
  .the-metabox .yith-plugin-fw-title-field-wrapper h3.title {
36
+ float : left;
37
  }
38
 
39
  .yith-plugin-fw span.color-alpha {
40
+ height: 100%!important;
41
+ width: 100% !important;
42
+ border: 1px solid #d9d9d9;
43
+ margin: -1px;
44
  }
45
+
46
  .yith-plugin-fw .wp-color-result-text{
47
  height: 100%;
48
  }
55
  .yith-plugin-ui input[type=password],
56
  .woocommerce .yith-plugin-fw table.form-table input[type=text]:not(.select2-search__field),
57
  .woocommerce .yith-plugin-fw table.form-table select {
58
+ width : 400px;
59
+ max-width : 100%;
60
+ height : 30px;
61
+ padding : 5px;
62
  line-height: 1;
63
  }
64
 
66
  .woocommerce .yith-plugin-fw table.form-table input[type=text].yith-plugin-fw-colorpicker,
67
  .yith-plugin-fw input[type=text].wp-color-picker,
68
  .yith-plugin-fw input[type=text].yith-plugin-fw-colorpicker {
69
+ width : 6em;
70
+ max-width : none;
71
+ height : auto;
72
+ padding : 3px 5px;
73
  }
74
 
75
  .wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button{
78
 
79
  .woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
80
  .yith-plugin-fw input[type=text].colorpick {
81
+ width : 6em;
82
+ max-width : none;
83
+ height : auto;
84
+ padding : 6px;
85
  }
86
 
87
  .yith-plugin-fw input.select2-search__field,
88
  .yith-plugin-fw .select2-container .select2-search--inline .select2-search__field,
89
  .woocommerce .yith-plugin-fw input.select2-search__field,
90
  .woocommerce .yith-plugin-fw table.form-table input.select2-search__field {
91
+ padding : 3px;
92
  }
93
 
94
  .yith-plugin-fw .select2-container .select2-selection--single .select2-selection__rendered {
95
+ line-height : 27px;
96
  }
97
 
98
  .yith-plugin-fw textarea {
99
+ width : 400px;
100
+ max-width : 100%;
101
+ padding : 5px;
102
  }
103
 
104
  /* ------------- ICONS ------------- */
105
  .yit-icons-manager-wrapper {
106
+ width : 100%;
107
+ max-width : 400px;
108
  }
109
 
110
  .yit-icons-manager-text {
111
+ width : 100%;
112
  }
113
 
114
  .yit-icons-manager-icon-text {
115
+ width : calc(100% - 35px) !important;
116
+ height : 30px;
117
+ float : left;
118
+ margin : 0;
119
  }
120
 
121
  .yit-icons-manager-icon-preview {
122
+ width : 30px;
123
+ height : 30px;
124
+ margin-right : 5px;
125
+ float : left;
126
+ padding-top : 6px;
127
+ box-sizing : border-box;
128
+ text-align : center;
129
+ background : #f1f1f1;
130
  }
131
 
132
  .yit-icons-manager-list-wrapper {
133
+ margin : 10px 0;
134
+ box-shadow : 0 0 0 1px #ddd;
135
  }
136
 
137
  ul.yit-icons-manager-list {
138
+ width : 100%;
139
+ height : 300px;
140
+ overflow-y : scroll;
141
+ margin : 0;
142
  }
143
 
144
  ul.yit-icons-manager-list li {
145
+ float : left;
146
+ width : 30px;
147
+ height : 30px;
148
+ padding-top : 6px;
149
+ box-sizing : border-box;
150
+ text-align : center;
151
+ background : #f1f1f1;
152
+ margin : 1px;
153
+ cursor : pointer;
154
  }
155
 
156
  ul.yit-icons-manager-list li:hover {
157
+ background : #c5dcf6;
158
  }
159
 
160
  ul.yit-icons-manager-list li.active {
161
+ background : #d4f0ff;
162
  }
163
 
164
  .yit-icons-manager-action-set-default {
165
+ margin-bottom : 0;
166
  }
167
 
168
  .yit-icons-manager-default-icon-preview {
169
+ height : 100%;
170
+ display : inline-block;
171
+ padding-left : 10px;
172
+ border-left : 1px solid #ccc;
173
+ margin-left : 10px;
174
  }
175
 
176
  /* ------- Text Array ------- */
177
  .yith-plugin-fw-text-array-table td {
178
+ padding : 1px;
179
  }
180
 
181
  .yith-plugin-fw-text-array-table input[type=text],
182
  .woocommerce table.form-table table.yith-plugin-fw-text-array-table input[type=text] {
183
+ width : 100%;
184
  }
185
 
186
  /* ------- Image Gallery ------- */
187
  .yith-plugin-fw .image-gallery ul li {
188
+ display : inline-block;
189
+ width : 80px;
190
+ margin-left : 10px;
191
+ position : relative;
192
  }
193
 
194
  .yith-plugin-fw .image-gallery ul li img {
195
+ width : 80px;
196
+ border : 1px solid #ccc;
197
  }
198
 
199
  .yith-plugin-fw .image-gallery ul li ul {
200
+ position : absolute;
201
+ top : -6px;
202
+ right : -1px;
203
+ width : 20px;
204
+ height : 20px;
205
  }
206
 
207
  .yith-plugin-fw .image-gallery ul a.delete {
208
+ background : url(../images/x.png) no-repeat;
209
+ width : 20px;
210
+ height : 20px;
211
+ display : block;
212
+ text-indent : -99999px;
213
  }
214
 
215
  /* ------- OnOff ------- */
216
  .yith-plugin-fw-onoff-container {
217
+ display : inline-block;
218
+ text-align : left;
219
  }
220
 
221
  .yith-plugin-fw-onoff-container input {
222
+ display : none;
223
  }
224
 
225
  .yith-plugin-fw-onoff-container input + span {
226
+ cursor : pointer;
227
+ text-indent : -9999px;
228
+ display : block;
229
+ width : 36px;
230
+ line-height : 1;
231
+ height : 20px;
232
+ background : #a4a4a4;
233
+ border-radius : 24px;
234
+ position : relative;
235
+ transition : all 0.3s;
236
  }
237
 
238
 
239
  .yith-plugin-fw-onoff-container input + span:before {
240
+ content : '';
241
+ background : #fff;
242
+ width : 16px;
243
+ height : 16px;
244
+ border-radius : 50%;
245
+ position : absolute;
246
+ top : 2px;
247
+ left : 2px;
248
+ transition : all 0.3s;
249
  }
250
 
251
  .yith-plugin-fw-onoff-container input:checked + span,
252
  .yith-plugin-fw-onoff-container input.onoffchecked + span {
253
+ background : #0073aa;
254
  }
255
 
256
  .yith-plugin-fw-onoff-container input:checked + span:before,
257
  .yith-plugin-fw-onoff-container input.onoffchecked + span:before {
258
+ left : 18px;
259
  }
260
 
261
  /* ------- Preview ------- */
262
  .yith-plugin-fw-preview-field {
263
+ max-height : 200px;
264
  }
265
 
266
  /* ------- Radio ------- */
267
  .yith-plugin-fw-radio input[type=radio] {
268
+ margin : 0 3px 0 0;
269
  }
270
 
271
  .yith-plugin-fw-radio__row {
272
+ margin-bottom : 8px;
273
+ }
274
+
275
+ /* ------- Checkbox Array ------- */
276
+ .yith-plugin-fw-checkbox-array input[type=checkbox] {
277
+ margin : 2px 3px 0 0;
278
+ }
279
+
280
+ .yith-plugin-fw-checkbox-array__row {
281
+ margin-bottom : 10px;
282
+ }
283
+
284
+ .yith-plugin-fw-checkbox-array__row label {
285
+ display : inline-block !important;
286
+ width : auto !important;
287
+ float : none !important;
288
+ margin : 0 !important;
289
+ padding : 0 !important;
290
+ font-weight : 400 !important;
291
  }
292
 
293
  /* ------- Sidebar Layout ------- */
294
  .yith-plugin-fw-sidebar-layout input[type="radio"] {
295
+ display : none;
296
+ width : 0px;
297
  }
298
 
299
  .yith-plugin-fw-sidebar-layout input[type="radio"]:first-child {
300
+ margin-right : -2px;
301
  }
302
 
303
  .yith-plugin-fw-sidebar-layout input[type="radio"] + img {
304
+ border : 2px solid #fff;
305
+ padding : 1px;
306
  }
307
 
308
  .yith-plugin-fw-sidebar-layout input[type="radio"] + img:hover {
309
+ cursor : pointer;
310
  }
311
 
312
  .yith-plugin-fw-sidebar-layout input[checked] + img {
313
+ border : 2px solid #f2ad35;
314
+ padding : 1px;
315
  }
316
 
317
  .yith-plugin-fw-sidebar-layout select {
318
+ vertical-align : 12px;
319
  }
320
 
321
  .yit-admin-panel-content-wrap .yith-plugin-fw-sidebar-layout label {
322
+ font-weight : bold;
323
+ width : 200px;
324
+ float : left;
325
+ line-height : 23px;
326
+ margin-left : -230px;
327
  }
328
 
329
  /* ------- Slider ------- */
330
  .yith-plugin-fw .slider {
331
+ padding-top : 20px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  }
333
 
334
+ .yith-plugin-fw-slider-container .ui-slider .minCaption {
335
+ position : absolute;
336
+ right : 95%;
337
+ top : -6px;
338
+ margin-right : 11px;
 
 
339
  }
340
 
341
+ .yith-plugin-fw-slider-container .ui-slider .maxCaption {
342
+ position : absolute;
343
+ left : 95%;
344
+ top : -6px;
345
+ margin-left : 20px;
346
  }
347
 
348
+ .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
349
+ background : #fff;
350
+ border : 0px !important;
351
+ top : -12px !important;
352
+ border-radius : 50%;
353
+ width : 27px !important;
354
+ height : 27px !important;
355
+ box-sizing : border-box;
356
+ box-shadow : 0 1px 7px -1px rgba(0, 0, 0, 0.5);
357
+ font-size : 13px;
358
+ padding : 6px 0;
359
+ font-weight : 600;
360
+ color : #555;
361
+ text-align : center;
362
+ }
363
+
364
+ .yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
365
+ background : #ccc;
366
+ border : none !important;
367
+ height : 3px !important;
368
+ border-radius : 3px !important;
369
+ width : 90%;
370
+ margin : 15px 5% 20px 5%;
371
+ }
372
+
373
+ .yith-plugin-fw-slider-container .ui-slider.ui-widget-content .ui-widget-header {
374
+ background : #4b93ff;
375
+ left : 0px !important;
376
+ -webkit-border-radius : 3px;
377
+ -moz-border-radius : 3px;
378
+ -khtml-border-radius : 3px;
379
+ border-radius : 3px;
380
  }
381
 
382
  /* ------- Select2 ------- */
383
  .yith-plugin-fw-select2-wrapper {
384
+ width : 400px;
385
  }
386
 
387
  /* ------- Textarea ------- */
388
  .yith-plugin-fw-textarea-editor-field-wrapper {
389
+ max-width : 1000px;
390
+ clear : both;
391
  }
392
 
393
  .yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area,
394
  .woocommerce table.form-table .yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area {
395
+ width : 100%;
396
  }
397
 
398
  /* ------- Buttons ------- */
399
  .yith-plugin-fw-buttons-field-wrapper {
400
+ margin-top : 7px;
401
  }
402
 
403
  /* ------- Select Images ------- */
404
  .yith-plugin-fw-select-images__list {
405
+ margin : 0;
406
+ display : flex;
407
+ flex-wrap : wrap;
408
  }
409
 
410
  .yith-plugin-fw-select-images__item {
411
+ width : calc(20% - 10px);
412
+ min-width : 150px;
413
+ margin : 0 10px 10px 0;
414
+ padding : 10px;
415
+ box-sizing : border-box;
416
+ cursor : pointer;
417
+ transition : all .3s;
418
+ border : 2px solid #eee;
419
+ display : flex;
420
+ flex-direction : column;
421
+ justify-content : space-between;
422
  }
423
 
424
  .yith-plugin-fw-select-images__item:hover,
425
  .yith-plugin-fw-select-images__item.yith-plugin-fw-select-images__item--selected {
426
+ border-color : #07bcce;
427
  }
428
 
429
  .yith-plugin-fw-select-images__item__label {
430
+ text-align : center;
431
+ font-weight : 600;
432
+ margin-bottom : 10px;
433
  }
434
 
435
  .yith-plugin-fw-select-images__item img {
436
+ display : block;
437
+ max-width : 100%;
438
+ margin : 0 auto;
439
  }
440
 
441
  /****************
454
  YITH UI
455
  ****************/
456
  @font-face {
457
+ font-family : 'yith-icon';
458
+ src : url('../fonts/yith-icon.eot?7ik896');
459
+ src : url('../fonts/yith-icon.eot?7ik896#iefix') format('embedded-opentype'),
460
  url('../fonts/yith-icon.ttf?7ik896') format('truetype'),
461
  url('../fonts/yith-icon.woff?7ik896') format('woff'),
462
  url('../fonts/yith-icon.svg?7ik896#yith-icon') format('svg');
463
+ font-weight : normal;
464
+ font-style : normal;
465
  }
466
 
467
  [class^="icon-"], [class*=" icon-"][class^="yith-icon-"], [class*=" yith-icon-"] {
468
  /* use !important to prevent issues with browser extensions that change fonts */
469
+ font-family : 'yith-icon' !important;
470
+ speak : none;
471
+ font-style : normal;
472
+ font-weight : normal;
473
+ font-variant : normal;
474
+ text-transform : none;
475
+ line-height : 1;
476
 
477
  /* Better Font Rendering =========== */
478
+ -webkit-font-smoothing : antialiased;
479
+ -moz-osx-font-smoothing : grayscale;
480
  }
481
 
482
  .yith-icon-reply:before {
484
  color: #757575;
485
  }
486
  .yith-icon-calendar_add:before {
487
+ content : "\e913";
488
+ color : #757575;
489
  }
490
 
491
  .yith-icon-calendar_money:before {
492
+ content : "\e914";
493
+ color : #757575;
494
  }
495
 
496
  .yith-icon-calendar2:before {
497
+ content : "\e915";
498
+ color : #757575;
499
  }
500
 
501
  .yith-icon-people:before {
502
+ content : "\e916";
503
+ color : #757575;
504
  }
505
 
506
  .yith-icon-shield_money:before {
507
+ content : "\e917";
508
+ color : #757575;
509
  }
510
 
511
  .yith-icon-time_check:before {
512
+ content : "\e918";
513
+ color : #757575;
514
  }
515
 
516
  .yith-icon-world_settings:before {
517
+ content : "\e919";
518
+ color : #757575;
519
  }
520
 
521
  .yith-icon-arrow_eye_closed:before {
522
+ content : "\e912";
523
+ color : #757575;
524
  }
525
 
526
  .yith-icon-arrow_eye:before {
527
+ content : "\e911";
528
+ color : #757575;
529
  }
530
 
531
  .yith-icon-reset:before {
532
+ content : "\e910";
533
+ color : #757575;
534
  }
535
 
536
  .yith-icon-drag:before {
537
+ content : "\e90f";
538
+ color : #757575;
539
  }
540
 
541
  .yith-icon-trash:before {
542
+ content : "\e90d";
543
+ color : #757575;
544
  }
545
 
546
  .yith-icon-info:before {
547
+ content : "\e90e";
548
+ color : #757575;
549
  }
550
 
551
  .yith-icon-arrow_down:before {
552
+ content : "\e900";
553
+ color : #757575;
554
  }
555
 
556
  .yith-icon-arrow_left:before {
557
+ content : "\e901";
558
+ color : #757575;
559
  }
560
 
561
  .yith-icon-arrow_right:before {
562
+ content : "\e902";
563
+ color : #757575;
564
  }
565
 
566
  .yith-icon-arrow_up:before {
567
+ content : "\e903";
568
+ color : #757575;
569
  }
570
 
571
  .yith-icon-calendar:before {
572
+ content : "\e904";
573
+ color : #757575;
574
  }
575
 
576
  .yith-icon-check:before {
577
+ content : "\e905";
578
+ color : #757575;
579
  }
580
 
581
  .yith-icon-close:before {
582
+ content : "\e906";
583
+ color : #757575;
584
  }
585
 
586
  .yith-icon-edit:before {
587
+ content : "\e907";
588
+ color : #757575;
589
  }
590
 
591
  .yith-icon-magnifier:before {
592
+ content : "\e908";
593
+ color : #757575;
594
  }
595
 
596
  .yith-icon-pencil:before {
597
+ content : "\e909";
598
+ color : #757575;
599
  }
600
 
601
  .yith-icon-plus:before {
602
+ content : "\e90a";
603
+ color : #757575;
604
  }
605
 
606
  .yith-icon-update:before {
607
+ content : "\e90b";
608
+ color : #757575;
609
  }
610
 
611
  .yith-icon-upload:before {
612
+ content : "\e90c";
613
+ color : #757575;
614
  }
615
 
616
  .yith-plugin-fw-banner {
617
+ width : 100%;
618
+ height : 75px;
619
+ background : url('../images/banner-premium.png');
620
  }
621
 
622
  .yith-plugin-fw-banner.yith-plugin-fw-banner-free {
623
+ height : 290px;
624
+ background : url('../images/banner-free.png') no-repeat;
625
  }
626
 
627
  .yith-plugin-fw-banner.yith-plugin-fw-banner-free h1 {
628
+ max-width : auto;
629
+ text-align : left;
630
+ padding-left : 100px;
631
+ padding-top : 15px;
632
+ padding-bottom : 8px;
633
  }
634
 
635
  .yith-plugin-fw-banner h1 {
636
+ text-transform : uppercase;
637
+ color : #0c5777;
638
+ font-size : 15px;
639
+ padding-left : 150px;
640
+ font-weight : 700;
641
+ text-align : left;
642
+ display : inline-block;
643
+ box-sizing : border-box;
644
  }
645
 
646
  .yith-plugin-fw-banner span {
647
+ font-style : italic;
648
+ display : block;
649
+ font-size : 15px;
650
+ color : #214249;
651
+ text-transform : none;
652
+ text-align : right;
653
  }
654
 
655
  .yith-plugin-fw-banner a,
656
  .yith-plugin-fw-banner a:focus {
657
+ text-decoration : none;
658
+ outline : none;
659
+ box-shadow : none;
660
  }
661
 
662
  .yith-banners ul {
663
+ list-style : none;
664
+ margin-left : 10px;
665
  }
666
 
667
  .yith-banners ul li {
668
+ display : inline-block;
669
+ margin-left : 10px;
670
  }
671
 
672
  .yith-plugin-ui a {
673
+ outline : none;
674
+ box-shadow : none;
675
  }
676
 
677
  .yith-plugin-ui {
678
+ font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
679
  }
680
 
681
  .yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
682
+ margin-top : 10px;
683
  }
684
 
685
  .yith-plugin-ui .nav-tab {
686
+ margin-left : 0px;
687
+ margin-right : 2px;
688
+ background-color : #336374;
689
+ color : #fff;
690
+ font-size : 15px;
691
+ padding : 7px 20px;
692
+ border : 0;
693
  }
694
 
695
  .yith-plugin-ui .nav-tab:first-child {
696
+ border-left : 1px solid #d9d9d9;
697
  }
698
 
699
  .yith-plugin-ui .nav-tab.yith-premium {
700
+ background-color : #be421c;
701
  }
702
 
703
  .yith-plugin-ui .nav-tab-active {
704
+ background-color : #fff;
705
+ color : #336374;
706
+ border-bottom : 1px solid #fff;
707
  }
708
 
709
  .yith-plugin-ui .nav-tab-active.yith-premium {
710
+ background-color : #fff;
711
+ color : #be421c;
712
  }
713
 
714
  .yith-plugin-ui #plugin-fw-wc {
715
+ padding-top : 0px;
716
  }
717
 
718
  .yith-plugin-ui .form-table td {
719
+ padding : 15px 20px;
720
  }
721
 
722
  .yith-plugin-ui.metaboxes-tab label {
723
+ color : #33373b;
724
+ font-size : 14px;
725
+ margin-left : -248px;
726
  }
727
 
728
  .yith-plugin-ui.metaboxes-tab .the-metabox {
729
+ margin : 40px 0 40px 290px;
730
+ margin-left : 264px;
731
  }
732
 
733
  .yith-plugin-ui.metaboxes-tab label {
734
+ width : 200px;
735
+ font-weight : 600;
736
  }
737
 
738
  .yith-plugin-ui span.description {
739
+ color : #716269;
740
+ font-size : 14px;
741
+ font-style : normal;
742
+ font-weight : 400;
743
+ margin-top : 15px;
744
+ margin-left : 0;
745
  }
746
 
747
  #wpwrap .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-ui h2.nav-tab-wrapper {
748
+ border : 0;
749
+ border-bottom : 1px solid #ccc;
750
+ margin-right : 15px;
751
+ margin-bottom : 0;
752
+ background-color : transparent;
753
+ padding-left : 0;
754
  }
755
 
756
  .yith-plugin-ui #plugin-fw-wc table.form-table,
757
  .yith-plugin-ui #yith-plugin-fw-panel table.form-table,
758
  .yith-plugin-ui table.form-table {
759
+ border : 1px solid #d8d8d8;
760
+ border-top : 0;
761
+ margin-bottom : 40px;
762
  }
763
 
764
  .yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
765
+ background-color : transparent;
766
+ border : 0;
767
+ text-transform : none;
768
+ border-bottom : 1px solid #ddd;
769
  }
770
 
771
  .yith-plugin-ui h2 {
772
+ color : #2a8db0;
773
+ font-size : 15px;
774
+ text-transform : uppercase;
775
+ border : 1px solid #d8d8d8;
776
+ border-bottom : 0;
777
+ background-color : #fff;
778
+ padding : 35px 20px;
779
+ margin : 0px;
780
  }
781
 
782
  .yith-plugin-ui .yith-plugin-fw-custom-tab h2 {
783
+ border : 0px solid #d8d8d8;
784
+ padding-left : 0;
785
  }
786
 
787
  .yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
788
+ padding : 30px 20px;
789
  }
790
  .yith-plugin-ui #plugin-fw-wc table.form-table tr.toggle-element-fixed td, #yith-plugin-fw-panel table.form-table tr.toggle-element-fixed td.forminp {
791
  padding: 0 20px 30px;
792
  }
793
  .yith-plugin-ui #plugin-fw-wc h2 + div {
794
+ background : #fff;
795
+ border-left : 1px solid #d9d9d9;
796
+ border-right : 1px solid #d9d9d9;
797
+ margin : -20px 0 0 0;
798
+ padding-left : 20px;
799
+ padding-bottom : 5px;
800
  }
801
 
802
  .yith-plugin-ui #plugin-fw-wc h2 + div p, .yith-plugin-ui p.info-box {
803
+ background : #f1f1f1;
804
+ font-size : 14px;
805
+ font-weight : 700;
806
+ width : 40%;
807
+ display : block;
808
+ padding : 15px;
809
+ margin-bottom : 0;
810
  }
811
 
812
  .yith-plugin-ui #plugin-fw-wc h2 + div p:before, .yith-plugin-ui p.info-box:before {
813
+ content : "\e90e";
814
+ font-family : yith-icon;
815
+ font-size : 30px;
816
+ font-weight : normal;
817
+ display : block;
818
+ margin-top : -5px;
819
+ float : left;
820
+ margin-right : 15px;
821
  }
822
 
823
  .yith-plugin-ui h2:first-child {
824
+ border-top : 0;
825
  }
826
 
827
  /*** Icon ***/
828
  .yith-plugin-ui span.yith-icon {
829
+ margin-left : -36px;
830
+ line-height : 36px;
831
+ font-size : 20px;
832
  }
833
 
834
  /*** General Input Style ***/
849
  .woocommerce .yith-plugin-fw table.form-table input[type=password],
850
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=number],
851
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text] {
852
+ border : 1px solid #d8d8d8;
853
+ border-radius : 8px;
854
+ padding : 8px 10px;
855
+ height : 38px;
856
+ min-width : 90px;
857
+ box-shadow : none;
858
+ color : #716269;
859
  }
860
 
861
  .yith-plugin-ui textarea,
862
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea {
863
+ height : auto;
864
  }
865
 
866
+ .yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
867
  .yith-plugin-ui table.form-table input[type=text].wp-color-picker,
868
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
869
+ border: 0;
870
+ height: 30px;
871
+ max-width: 121px;
872
+ font-size: 11px;
873
+ padding: 0;
 
874
  }
875
 
876
  .yith-plugin-ui .search-box input[name="s"] {
877
+ height : 35px;
878
  }
879
 
880
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].small-text,
881
  .yith-plugin-ui input[type=text].small-text {
882
+ width : 100px;
883
+ height : 25px;
884
+ border : 1px solid #d9d9d9;
885
  }
886
 
887
  .yith-plugin-ui textarea {
888
+ height : auto;
889
+ padding : 8px;
890
  }
891
 
892
  .yith-plugin-ui select:focus,
893
  .yith-plugin-ui input:focus {
894
+ border-color : #a7d9ec !important;
895
  }
896
 
897
  .woocommerce .yith-plugin-ui table.form-table select,
898
  .yith-plugin-ui select {
899
+ -webkit-appearance : none;
900
+ line-height : 1.2em;
901
+ min-height : 35px;
902
+ background : url("../images/arrow_down.svg") no-repeat right center;
903
+ background-size : 35px 13px;
904
+ border-radius : 8px;
905
+ padding-left : 10px;
906
  }
907
 
908
  .yith-plugin-ui .form-table th {
909
+ width : 200px;
910
+ padding-right : 50px;
911
  }
912
 
913
  /** BUTTONS **/
921
  .yith-plugin-ui .yith-plugin-fw-deselect-all,
922
  .yith-plugin-ui .yith-plugin-fw-upload-button,
923
  .yith-plugin-ui .yith-plugin-fw-upload-button-reset {
924
+ border-radius : 3px;
925
+ text-transform : uppercase;
926
+ box-shadow : none;
927
+ border : 0;
928
+ font-weight : 700;
929
+ font-size : 11px;
930
+ padding : 0px 14px;
931
+ outline : none;
932
+ height : auto;
933
+ transition : all ease 0.3s;
934
+ background-color : #d6d6d6;
935
+ color : #656565;
936
+ text-shadow : none;
937
+ vertical-align : middle;
938
+ line-height : 26px;
939
+ display : inline-block;
940
+ text-decoration : none;
941
+ cursor : pointer;
942
  }
943
 
944
  .wp-core-ui .yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button-reset,
946
  .yith-plugin-ui .yith-plugin-fw-upload-button-reset,
947
  .yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button-reset,
948
  .yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button {
949
+ height : 38px;
950
  }
951
 
952
  .wp-core-ui .yith-plugin-ui .button:focus,
956
  .yith-plugin-ui .yith-edit-button:focus,
957
  .yith-plugin-ui .yith-update-button:focus,
958
  .wp-core-ui .yith-plugin-ui .button-secondary:focus {
959
+ outline : none;
960
+ box-shadow : none;
961
  }
962
 
963
  .wp-core-ui .yith-plugin-ui .button-xl {
964
+ padding : 0px 20px;
965
+ font-size : 14px;
966
+ line-height : 38px;
967
+ display : inline-block;
968
+ font-weight : 600;
969
  }
970
 
971
  /** button with inside a span with icon class */
972
  .yith-plugin-ui .button-secondary span.yith-icon {
973
+ margin-left : 0px;
974
+ margin-right : 10px;
975
+ line-height : normal;
976
  }
977
 
978
  .yith-plugin-ui .button-secondary span.yith-icon:before {
979
+ color : #656565;
980
+ font-size : 15px;
981
  }
982
 
983
 
986
  .yith-plugin-ui .yith-save-button:hover,
987
  .wp-core-ui .yith-plugin-ui .button-secondary:hover,
988
  .yith-plugin-ui .yith-plugin-fw-upload-button-reset:hover {
989
+ background-color : #cacaca;
990
+ color : #515151;
991
  }
992
 
993
  .wp-core-ui .yith-plugin-ui .button-primary,
994
  .yith-plugin-ui .button-secondary.yith-plugin-fw-select-all,
995
  .yith-plugin-ui .button-secondary.yith-plugin-fw-upload-button {
996
+ background-color : #007694;
997
+ color : #fff;
998
  }
999
 
1000
 
1001
  .yith-plugin-ui .yith-add-button,
1002
  .wp-core-ui .yith-plugin-ui .button-primary:focus,
1003
  .wp-core-ui .yith-plugin-ui .button-primary:hover {
1004
+ background-color : #375f6b;
1005
+ color : #fff;
1006
+ cursor : pointer;
1007
  }
1008
 
1009
 
1012
  .yith-plugin-ui .button-secondary.yith-plugin-fw-select-all:hover,
1013
  .yith-plugin-ui .button-secondary.yith-plugin-fw-select-all:focus,
1014
  .yith-plugin-ui .yith-plugin-fw-upload-button:hover {
1015
+ border-color : #007694;
1016
+ background : #007694;
1017
+ color : #fff;
1018
+ line-height : 26px;
1019
+ margin-left : 0;
1020
  }
1021
 
1022
  .yith-plugin-ui .button-primary:before,
1025
  .yith-plugin-ui .yith-edit-button:before,
1026
  .yith-plugin-ui .yith-update-button:before,
1027
  .yith-plugin-ui .button-secondary:before {
1028
+ font-family : 'yith-icon';
1029
+ font-size : 10px;
1030
+ font-weight : 700;
1031
+ margin-right : 10px;
1032
+ vertical-align : bottom;
1033
+ display : inline-block;
1034
  }
1035
 
1036
  /** yith-edit-button **/
1037
  .yith-plugin-ui .yith-edit-button {
1038
+ background-color : #7f9298;
1039
+ color : #fff;
1040
  }
1041
 
1042
  .yith-plugin-ui .yith-edit-button:focus,
1043
  .yith-plugin-ui .yith-edit-button:hover {
1044
+ background-color : #718085;
1045
+ color : #fff;
1046
  }
1047
 
1048
  .yith-plugin-ui .yith-edit-button:before {
1049
+ content : "\e907";
1050
  }
1051
 
1052
  /** yith-update-button **/
1053
  .yith-plugin-ui .yith-update-button {
1054
+ background-color : #94aa09;
1055
+ color : #fff;
1056
  }
1057
 
1058
  .yith-plugin-ui .yith-update-button:focus,
1059
  .yith-plugin-ui .yith-update-button:hover {
1060
+ background-color : #7a9009;
1061
+ color : #fff;
1062
  }
1063
 
1064
  .yith-plugin-ui .yith-update-button:before {
1065
+ content : "\e90b";
1066
+ font-size : 15px;
1067
  }
1068
 
1069
  /** yith-save-button **/
1070
 
1071
  .yith-plugin-ui .yith-save-button {
1072
+ background-color : #267390;
1073
+ color : #fff;
1074
  }
1075
 
1076
  .yith-plugin-ui .yith-save-button:focus,
1077
  .yith-plugin-ui .yith-save-button:hover {
1078
+ background-color : #1c4863;
1079
+ color : #fff;
1080
  }
1081
 
1082
 
1083
  /** yith-remove-button **/
1084
 
1085
  .yith-plugin-ui .button-secondary.yith-remove-button:before {
1086
+ content : "\e90d";
1087
+ font-size : 15px;
1088
  }
1089
 
1090
 
1091
  /** yith-add-button **/
1092
  .yith-plugin-ui .yith-add-button:before {
1093
+ content : "\e90a";
1094
  }
1095
 
1096
  .yith-plugin-ui .yith-add-button.closed {
1097
+ background-color : #fff;
1098
+ color : #375f6b;
1099
+ border : 1px solid #375f6b;
1100
  }
1101
 
1102
  .yith-plugin-ui .yith-add-button.closed:before {
1103
+ content : "\e906";
1104
  }
1105
 
1106
 
1107
  /** yith-plugin-fw-upload-button **/
1108
  .yith-plugin-ui button.yith-plugin-fw-upload-button:before {
1109
+ content : "\e90c";
1110
+ font-family : 'yith-icon';
1111
+ font-size : 19px;
1112
+ font-weight : 400;
1113
+ margin-right : 10px;
1114
+ vertical-align : middle;
1115
+ display : inline-block;
1116
  }
1117
 
1118
  /** SELECT 2 **/
1119
  .yith-plugin-ui .select2-container,
1120
  .yith-plugin-ui .select2-selection--single {
1121
+ height : auto;
1122
+ padding : 2px;
1123
+ outline : none;
1124
  }
1125
 
1126
  .yith-plugin-ui .select2-selection--single {
1127
+ margin : 0;
1128
+ border : 0;
1129
  }
1130
 
1131
  /* old panel*/
1132
 
1133
+ .yith-plugin-ui span.select2.select2-container.select2-container--default,
1134
+ span.select2.select2-container.select2-container--default.yith-plugin-fw-select2-container {
1135
+ border : 1px solid #d8d8d8;
1136
+ border-radius : 8px;
1137
  }
1138
 
1139
  .yith-plugin-ui span.select2.select2-container.select2-container--default:hover,
1140
  .yith-plugin-ui span.select2.select2-container.select2-container--default:active,
1141
  .yith-plugin-ui span.select2.select2-container.select2-container--default:focus {
1142
+ border-color : #a7d9ec;
1143
  }
1144
 
1145
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
1146
+ color : #fff;
1147
  }
1148
 
1149
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].select2-search__field,
1150
  .yith-plugin-ui .yith-plugin-fw table.form-table input.select2-search__field {
1151
+ border : 0;
1152
+ padding : 0;
1153
+ height : initial;
1154
  }
1155
 
1156
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice,
1157
  .yith-plugin-ui .select2-selection__choice {
1158
+ color : #fff;
1159
+ background-color : #4e8ba2;
1160
+ border-radius : 12px;
1161
+ padding : 3px 11px;
1162
+ border-color : #4e8ba2;
1163
+ font-size : 13px;
1164
  }
1165
 
1166
  .yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow:before {
1167
+ content : "\e900";
1168
+ font-family : 'yith-icon' !important;
1169
+ line-height : 36px;
1170
+ color : #d9d9d9;
1171
  }
1172
 
1173
  .yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow b {
1174
+ display : none;
1175
  }
1176
 
1177
+ .yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--below,
1178
+ .yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--above {
1179
+ margin-top : 10px;
1180
+ border-radius : 8px;
1181
+ box-shadow : 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
 
 
1182
  }
1183
 
1184
+ .yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--above {
1185
+ margin-top : -10px;
 
1186
  }
1187
 
1188
+ .yith-plugin-fw-select2-container.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
1189
+ .yith-plugin-fw-select2-container.select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
1190
+ border-radius : 8px;
 
 
1191
  }
1192
 
1193
+ .yith-plugin-fw-select2-container .select2-results .select2-results__group, .select2-results .select2-results__option:first-child {
1194
+ border-top-left-radius : 8px;
1195
+ border-top-right-radius : 8px;
 
1196
  }
1197
+
1198
+ .yith-plugin-fw-select2-container .select2-results .select2-results__group,
1199
+ .yith-plugin-fw-select2-container .select2-results .select2-results__option:last-child {
1200
+ border-bottom-left-radius : 8px;
1201
+ border-bottom-right-radius : 8px;
1202
+ }
1203
+
1204
+ .yith-plugin-fw-select2-container .select2-dropdown {
1205
+ border : 0;
 
 
 
1206
  }
1207
 
1208
+ .yith-plugin-fw-select2-container.select2-container--default .select2-results__option[data-selected=true] {
1209
+ background-color : #fff;
1210
+ outline : none;
1211
  }
1212
+
1213
+ .yith-plugin-fw-select2-container.select2-container--default .select2-results__option--highlighted[aria-selected] {
1214
+ background-color : #e8eff1;
1215
+ color : #4e8ba2;
1216
+ outline : none;
 
 
 
 
 
 
1217
  }
1218
 
1219
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
1220
  .yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
1221
+ float : right;
1222
+ padding-left : 15px;
1223
+ text-indent : -9999px;
1224
  }
1225
 
1226
 
1227
  .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
1228
  .woocommerce .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
1229
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
1230
+ float : right;
1231
+ color : #fff;
1232
+ content : "\e906";
1233
+ font-family : 'yith-icon' !important;
1234
+ font-size : 9px;
1235
+ line-height : 21px;
1236
+ text-indent : 0;
1237
  }
1238
 
1239
  .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
1240
+ color : #000;
1241
  }
1242
 
1243
  .yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after
1244
  .yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
1245
+ color : #000;
1246
  }
1247
 
1248
  .yith-plugin-ui .select2-container .select2-selection--multiple,
1249
  .yith-plugin-ui .select2-container--default.select2-container--focus .select2-selection--multiple {
1250
+ border : 0;
1251
  }
1252
 
1253
  .yith-plugin-fw .select2-search input[type=text] {
1254
+ border : 0;
1255
+ padding : 0;
1256
+ height : auto;
1257
  }
1258
 
1259
  .yith-plugin-ui .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier,
1260
  .yith-plugin-fw-panel .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier {
1261
+ position : absolute;
1262
+ padding-top : 5px;
1263
  }
1264
 
1265
  .yith-plugin-ui input[type=text].select2-search__field {
1266
+ border : 0;
1267
+ padding : 0;
1268
+ height : 30px;
1269
  }
1270
 
1271
  .yith-plugin-ui .select2-container--default .select2-search--dropdown .select2-search__field,
1272
  .yith-plugin-fw-panel .select2-container--default .select2-search--dropdown .select2-search__field {
1273
+ border : 1px solid #d9d9d9;
1274
+ border-radius : 8px;
1275
+ box-shadow : none;
1276
  }
1277
 
1278
  .yith-plugin-ui .select2-dropdown,
1279
  .yith-plugin-fw-panel .select2-dropdown {
1280
+ border : 1px solid #d9d9d9;
1281
  }
1282
 
1283
  /** RADIO BUTTON **/
1284
  .yith-plugin-ui [type="radio"]:checked,
1285
  .yith-plugin-ui [type="radio"]:not(:checked) {
1286
+ position : absolute;
1287
+ left : -9999px;
1288
  }
1289
 
1290
  .yith-plugin-ui [type="radio"]:checked + label,
1291
  .yith-plugin-ui [type="radio"]:not(:checked) + label {
1292
+ position : relative;
1293
+ padding-left : 35px;
1294
+ cursor : pointer;
1295
+ line-height : 20px;
1296
+ display : inline-block;
1297
+ color : #716269;
1298
+ font-size : 14px;
1299
  }
1300
 
1301
  .yith-plugin-ui [type="radio"]:checked + label:before,
1302
  .yith-plugin-ui [type="radio"]:not(:checked) + label:before {
1303
+ content : '';
1304
+ position : absolute;
1305
+ left : 0;
1306
+ top : 0;
1307
+ width : 19px;
1308
+ height : 19px;
1309
+ border : 1px solid #d8d8d8;
1310
+ border-radius : 100%;
1311
+ background : #fff;
1312
  }
1313
 
1314
  .yith-plugin-ui [type="radio"]:checked + label:after,
1315
  .yith-plugin-ui [type="radio"]:not(:checked) + label:after {
1316
+ content : '';
1317
+ width : 13px;
1318
+ height : 13px;
1319
+ background : #4e8ba2;
1320
+ position : absolute;
1321
+ top : 4px;
1322
+ left : 4px;
1323
+ border-radius : 100%;
1324
+ -webkit-transition : all 0.2s ease;
1325
+ transition : all 0.2s ease;
1326
  }
1327
 
1328
  .yith-plugin-ui [type="radio"]:not(:checked) + label:after {
1329
+ opacity : 0;
1330
+ -webkit-transform : scale(0);
1331
+ transform : scale(0);
1332
  }
1333
 
1334
  .yith-plugin-ui [type="radio"]:checked + label:after {
1335
+ opacity : 1;
1336
+ -webkit-transform : scale(1);
1337
+ transform : scale(1);
1338
  }
1339
 
1340
  /** CHECKBOX **/
1341
  .yith-plugin-ui input[type="checkbox"] {
1342
+ -webkit-appearance : none;
1343
+ background-color : #fff;
1344
+ border : 1px solid #d8d8d8;
1345
+ box-shadow : none;
1346
+ width : 18px;
1347
+ height : 18px;
1348
+ border-radius : 3px;
1349
+ display : inline-block;
1350
+ position : relative;
 
1351
  }
1352
 
1353
  .yith-plugin-ui input[type="checkbox"]:checked {
1354
+ background-color : #4e8ba2;
1355
+ border-color : #488197;
1356
  }
1357
 
1358
  .yith-plugin-ui .forminp-checkbox span.description.inline {
1359
+ margin-left : 10px;
1360
  }
1361
 
1362
  .yith-plugin-ui input[type="checkbox"]:checked:before {
1363
+ display : none;
1364
  }
1365
 
1366
  .yith-plugin-ui input[type="checkbox"]:checked:after {
1367
+ content : "\e905";
1368
+ font-family : 'yith-icon';
1369
+ font-size : 15px;
1370
+ position : absolute;
1371
+ top : 8px;
1372
+ left : 1px;
1373
+ color : #fff;
1374
  }
1375
 
1376
  /** ONOFF **/
1377
  .yith-plugin-ui .yith-plugin-fw-onoff-container input[type="checkbox"] {
1378
+ display : none;
1379
  }
1380
 
1381
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
1382
+ border : 1px solid #d8d8d8;
1383
+ background-color : #fff;
1384
+ width : 60px;
1385
+ height : 24px;
1386
  }
1387
 
1388
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
1389
+ background-color : #d8d8d8;
1390
  }
1391
 
1392
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
1393
+ width : 14px;
1394
+ height : 14px;
1395
+ top : 5px;
1396
+ left : 6px;
1397
+ background-color : #d8d8d8;
1398
  }
1399
 
1400
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
1401
+ content : 'OFF';
1402
+ width : 14px;
1403
+ height : 14px;
1404
+ font-size : 13px;
1405
+ font-weight : 600;
1406
+ padding-left : 27px;
1407
+ color : #979797;
1408
+ margin-top : 5px;
1409
+ display : inline-block;
1410
+ white-space : nowrap;
1411
  }
1412
 
1413
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span,
1414
  .yith-plugin-ui .yith-plugin-fw-onoff-container input.onoffchecked + span {
1415
+ background-color : #fff;
1416
+ border-color : #98aa36;
1417
  }
1418
 
1419
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before,
1420
  .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
1421
+ background-color : #98aa36;
1422
+ left : 41px;
1423
  }
1424
 
1425
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
1426
  .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
1427
+ content : 'ON';
1428
+ color : #98aa36;
1429
+ width : 14px;
1430
+ height : 14px;
1431
+ display : inline-block;
1432
+ font-size : 13px;
1433
+ font-weight : 600;
1434
+ padding : 0 10px;
1435
+ margin-top : 5px;
1436
+ white-space : nowrap;
1437
  }
1438
 
1439
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
1440
+ text-indent : 0;
1441
  }
1442
 
1443
 
1444
  /**
1445
  DATEPICKER
1446
  */
1447
+ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1448
+ border : 0;
1449
+ box-shadow : 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
 
1450
  }
1451
 
1452
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-header.ui-widget-header {
1453
+ background : #4e8ba2;
1454
+ color : #fff;
1455
+ font-size : 11px;
1456
+ line-height : 25px;
1457
+ border : 0;
1458
+ min-height : 25px;
1459
+ }
1460
+
1461
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-title {
1462
+ line-height : 25px;
1463
+ }
1464
+
1465
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker th {
1466
+ color : #716269;
1467
+ }
1468
+
1469
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-icon,
1470
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-hover,
1471
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-prev,
1472
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
1473
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-w,
1474
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-e {
1475
+ background : none;
1476
+ content : "";
1477
+ border : 0;
1478
+ text-indent : 0;
1479
+ width : 15px;
1480
+ height : 20px;
1481
+ display : block;
1482
+ overflow : hidden;
 
 
 
 
 
 
 
 
 
1483
  }
1484
 
1485
  .yith-plugin-ui .yith-password-wrapper {
1486
+ display : inline-block;
1487
+ width : auto;
1488
+ position : relative;
1489
  }
1490
 
1491
  .yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before,
1492
  .yith-plugin-ui .yith-password-wrapper .yith-password-eye:before {
1493
+ content : '\e911';
1494
+ color : #999;
1495
+ font-family : 'yith-icon';
1496
+ font-size : 20px;
1497
+ font-weight : normal;
1498
+ width : 15px;
1499
+ display : block;
1500
+ position : absolute;
1501
+ right : 13px;
1502
+ top : 0;
1503
+ line-height : 38px;
1504
+ bottom : 0;
1505
+ cursor : pointer;
1506
  }
1507
 
1508
  .yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before {
1509
+ content : '\e912';
1510
  }
1511
 
1512
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-w:before {
1513
+ content : "\e901";
1514
+ color : #fff;
1515
+ font-family : 'yith-icon';
1516
+ font-size : 12px;
1517
+ font-weight : normal;
1518
+ width : 15px;
1519
+ display : block;
 
1520
  }
1521
 
1522
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-e:before {
1523
+ content : "\e902";
1524
+ color : #fff;
1525
+ text-indent : 0;
1526
+ font-family : 'yith-icon';
1527
+ font-size : 12px;
1528
+ font-weight : normal;
1529
+ width : 15px;
1530
+ display : block;
 
1531
  }
1532
 
1533
  /* arrow */
1534
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-prev,
1535
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
1536
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev-hover,
1537
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-next-hover {
1538
+ top : 1px;
1539
+ cursor : pointer;
1540
+ }
1541
+
1542
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev,
1543
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev-hover {
1544
+ left : 5px;
1545
+ }
1546
+
1547
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
1548
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-next.ui-datepicker-next-hover {
1549
+ right : 1px;
1550
+ }
1551
+
1552
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker table {
1553
+ font-size : 10px;
1554
+ }
1555
+
1556
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-default,
1557
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-default,
1558
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-default {
1559
+ background : #fff;
1560
+ border : 1px solid #d9d9d9;
 
 
 
 
 
 
 
 
 
 
 
 
1561
 
1562
  }
1563
 
1564
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-hover,
1565
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-hover,
1566
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div a.ui-state-default:focus,
1567
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-focus,
1568
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-focus {
1569
+ background : #ebf1f3;
1570
+ border : 1px solid #bfd5dd;
1571
+ outline : none;
1572
+ box-shadow : none;
 
 
 
 
 
1573
  }
1574
 
1575
+ #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-hover,
1576
+ .woocommerce #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-focus {
1577
+ background : none;
1578
+ border : 0;
1579
  }
1580
 
1581
  /** colorpicker **/
1582
+ .yith-plugin-ui .iris-slider-offset.ui-slider.ui-widget-content {
1583
+ background : transparent !important;
1584
+ height : auto !important;
1585
+ }
1586
+
1587
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .yith-colorpicker-group:not(:first-child) {
1588
+ margin-top : 20px;
1589
  }
1590
 
1591
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .iris-picker,
1592
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-holder {
1593
+ display : none !important;
1594
  }
1595
 
1596
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap,
1601
 
1602
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .iris-picker,
1603
  .yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .wp-picker-holder {
1604
+ display : block !important;
1605
  }
1606
 
1607
  .woocommerce .yith-plugin-ui .iris-picker {
1608
+ border : 0;
1609
+ margin-top : 20px;
1610
  }
1611
 
1612
  .yith-plugin-ui .yith-plugin-fw input[type=text].wp-color-picker {
1613
+ border : 0;
1614
+ padding : 2px 5px;
1615
+ height : 30px;
1616
  }
1617
 
1618
  .yith-plugin-ui .wp-color-result-text {
1619
+ display : none;
 
 
 
 
 
 
 
 
1620
  }
1621
 
1622
  .yith-plugin-ui .wp-picker-container .wp-color-result.button {
1623
+ width : 30px;
1624
+ height : 30px;
1625
+ box-shadow : none;
1626
+ border : 1px solid #d9d9d9;
1627
+ margin-bottom : 0;
1628
+ padding : 0;
1629
+ display : inline-block;
1630
+ vertical-align : middle;
1631
+ box-sizing : content-box;
1632
  }
1633
 
1634
  .yith-plugin-ui .wp-picker-default-custom {
1635
+ cursor : pointer;
1636
+ width : 25px;
1637
+ padding : 0 5px;
1638
+ display : inline-block;
1639
+ vertical-align : middle;
1640
+ position : relative;
1641
  }
1642
 
1643
  .yith-plugin-ui .wp-picker-default-custom input.button {
1644
+ opacity : 0;
1645
+ margin : 0;
1646
+ padding : 0;
1647
+ position : absolute;
1648
+ top : 0;
1649
+ right : 0;
1650
+ left : 0;
1651
+ bottom : 0;
1652
+ z-index : 2;
1653
  }
1654
 
1655
  .yith-plugin-ui .wp-picker-default-custom:before {
1656
  content: "\e91a";
1657
+ text-indent : 0;
1658
+ font-family : 'yith-icon';
1659
+ font-size : 20px;
1660
+ color : #d8d8d8;
1661
+ font-weight : normal;
1662
+ width : 15px;
1663
+ display : block;
1664
+ background : none;
1665
+ line-height : 20px;
1666
+ margin-left : 8px;
1667
  }
1668
 
1669
  .yith-plugin-ui .wp-picker-container {
1670
+ width : auto;
1671
+ display : inline-block;
1672
+ border : 1px solid #d9d9d9;
1673
+ border-radius : 8px;
1674
+ padding : 5px;
1675
  }
1676
 
1677
  .yith-plugin-ui .iris-picker .iris-square-inner {
1678
+ box-shadow : none;
1679
+ border : 1px solid #d9d9d9;
1680
  }
1681
 
1682
  .yith-plugin-ui .yith-single-colorpicker {
1683
+ display : inline-block;
1684
+ width : 220px;
1685
  }
1686
 
1687
  .yith-plugin-ui .yith-single-colorpicker > label {
1688
+ display : block;
1689
+ font-size : 11px;
1690
+ font-weight : 600;
1691
+ margin : 0 0 10px 0;
1692
  }
1693
 
1694
  /* RANGE SLIDER */
1695
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
1696
+ top : -45px !important;
1697
+ }
1698
+
1699
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
1700
+ position : absolute;
1701
+ top : -33px;
1702
+ left : 0;
1703
+ width : auto !important;
1704
+ height : auto !important;
1705
+ padding : 2px 8px;
1706
+ margin-left : -15px;
1707
+ font-size : 12px;
1708
+ line-height : 20px;
1709
+ color : #4e8ba2;
1710
+ text-align : center;
1711
+ background-color : #fff;
1712
+ border : 1px solid #fff;
1713
+ border-radius : 3px;
1714
+ -webkit-transition : opacity .3s ease-in-out 0s;
1715
+ transition : opacity .3s ease-in-out 0s;
1716
+ box-shadow : 0px 1px 7px 0px rgba(1, 1, 1, 0.13);
1717
+ }
1718
+
1719
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:before {
1720
+ position : absolute;
1721
+ bottom : -3px;
1722
+ left : 50%;
1723
+ display : inline-block;
1724
+ width : 6px;
1725
+ height : 6px;
1726
+ margin-left : -3px;
1727
+ content : "";
1728
+ background-color : #fff;
1729
+ -webkit-transform : rotate(-45deg);
1730
+ -ms-transform : rotate(-45deg);
1731
+ transform : rotate(-45deg);
1732
+ }
1733
+
1734
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content .ui-widget-header {
1735
+ background : #4e8ba2;
1736
+ }
1737
+
1738
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:after {
1739
+ content : '';
1740
+ width : 17px;
1741
+ height : 17px;
1742
+ display : block;
1743
+ position : absolute;
1744
+ background : #fff;
1745
+ top : 37px;
1746
+ border-radius : 50%;
1747
+ box-shadow : 0px 1px 6px 0px rgba(1, 1, 1, 0.25);
1748
+ }
1749
+
1750
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
1751
+ height : 5px !important;
1752
+ }
1753
+
1754
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider .minCaption,
1755
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider .maxCaption {
1756
+ font-weight : 700;
1757
+ font-size : 12px;
1758
  }
1759
 
1760
 
1761
  /* ADD_BOX AND TOGGLE */
1762
  .yith-plugin-ui .yith-add-box,
1763
  .yith-plugin-ui .yith-toggle-row {
1764
+ width : 70%;
1765
+ border : 1px solid #d9d9d9;
1766
+ box-shadow : none;
1767
+ border-radius : 4px;
1768
+ margin : 20px 0;
1769
+ padding : 10px;
1770
+ box-sizing : border-box;
1771
+ background : white;
1772
  }
1773
 
1774
  .yith-plugin-ui .yith-toggle-row {
1775
+ cursor : pointer;
1776
+ transition : all ease 0.5s;
1777
  }
1778
  .yith-plugin-ui .yith-toggle-row.fixed {
 
1779
  margin: 0;
1780
  }
1781
  .yith-plugin-ui .yith-toggle-row.highlight {
1782
+ transition : all ease 0.5s;
1783
  /*box-shadow: 0 0 7px rgb(81, 117, 129);*/
1784
+ box-shadow : 0 0 7px rgb(30, 140, 190);
1785
 
1786
+ display : block;
1787
  }
1788
 
1789
  .yith-plugin-ui .yith-add-box {
1790
+ padding : 25px;
1791
+ display : none;
1792
  }
1793
 
1794
  .yith-plugin-ui .yith-toggle-title {
1795
+ position : relative;
1796
  }
1797
 
1798
  .yith-plugin-ui #plugin-fw-wc .yith-toggle-title h3,
1799
+ .yith-plugin-ui.metaboxes-tab h3,
1800
  .yith-plugin-ui .yith-toggle-title h3 {
1801
+ padding : 0px 20px 0px 25px;
1802
+ margin : 3px 0;
1803
 
1804
+ display : inline-block;
1805
+ position : relative;
1806
+ min-width : 173px;
1807
+ box-sizing : border-box;
1808
+ font-weight : 600;
1809
+ font-size : 15px;
1810
+ color : #23282d;
1811
+ text-transform : inherit;
1812
  }
1813
 
1814
  .yith-plugin-ui .yith-toggle-title .subtitle {
1815
+ padding-left : 0;
1816
+ padding-top : 8px;
1817
+ font-size : 12px;
1818
  }
1819
 
1820
  .yith-plugin-ui .yith-toggle {
1821
+ position : absolute;
1822
+ width : 30px;
1823
+ cursor : pointer;
1824
+ left : 0;
1825
+ top : 0;
1826
+ bottom : 0;
1827
+ margin : auto;
1828
+ display : flex;
1829
+ align-items : center;
1830
  }
1831
 
1832
  .yith-plugin-ui .yith-toggle > span:before {
1833
+ color : #405e69;
1834
  }
1835
 
1836
  .yith-plugin-ui .yith-toggle > span {
1837
+ position : absolute;
1838
+ right : 50%;
1839
+ transition : transform .3s;
1840
+ line-height : 1;
1841
  }
1842
 
1843
 
1844
  .yith-plugin-ui .yith-toggle-row-opened .yith-toggle span {
1845
+ transform : rotateZ(90deg);
1846
  }
1847
 
1848
  .yith-plugin-ui .yith-toggle-content {
1849
+ display : none;
1850
+ position : relative;
1851
+ padding : 30px 25px;
1852
  }
1853
 
1854
  .yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content {
1857
 
1858
  .yith-plugin-ui .yith-add-box-row,
1859
  .yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row {
1860
+ display : table;
1861
+ margin-bottom : 40px;
1862
  }
1863
 
1864
  .yith-plugin-ui .yith-add-box-row label,
1865
  .yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row > label {
1866
+ display : table-cell;
1867
+ width : 200px;
1868
+ padding-right : 21px;
1869
+ color : #33373b;
1870
+ font-size : 14px;
1871
+ vertical-align : top;
1872
+ font-weight : 600;
 
 
 
1873
  }
1874
+
1875
  .yith-plugin-ui .yith-add-box-row .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper),
1876
  .yith-plugin-ui .yith-toggle-row-opened .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
1877
+ /* display: table-cell;*/
1878
+ width : auto;
1879
+ float : none;
1880
+ vertical-align : middle;
1881
+ position : relative;
1882
  }
1883
 
1884
  .yith-plugin-ui .yith-add-box-row span.yith-icon,
1885
  .yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content .yith-toggle-content-row span.yith-icon {
1886
+ position : absolute;
1887
+ right : 15px;
1888
+ top : 0;
1889
+ bottom : 0;
1890
  }
1891
 
1892
  .yith-plugin-ui .yith-add-box-buttons,
1893
  .yith-plugin-ui .yith-toggle-content-buttons {
1894
+ text-align : right;
1895
  }
1896
 
1897
  .yith-plugin-ui .yith-toggle-onoff {
1898
+ position : absolute;
1899
+ cursor : pointer;
1900
+ right : 0;
1901
  }
1902
 
1903
  .yith-plugin-ui .yith-toggle_wrapper.ui-sortable .yith-toggle-onoff {
1904
+ right : 30px;
1905
  }
1906
 
1907
  .yith-plugin-ui .yith-toggle-row .yith-icon-drag {
1908
+ position : absolute;
1909
+ right : 0;
1910
+ top : 25%;
1911
+ bottom : 0;
1912
+ line-height : 1;
1913
  }
1914
 
1915
  .yith-plugin-ui .yith-toggle-row.with-subtitle .yith-toggle-onoff {
1916
+ top : 25%;
1917
  }
1918
 
1919
  /** SPINNER **/
1920
  .yith-plugin-ui .spinner {
1921
+ vertical-align : -5px;
1922
+ float : none;
1923
  }
1924
 
1925
  .yith-plugin-ui .spinner.show {
1926
+ visibility : visible;
1927
  }
1928
 
1929
  /* LIST TABLE */
1930
  .yith-plugin-ui .form-table .list-table td {
1931
+ padding : 15px 0px;
1932
  }
1933
 
1934
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table .bulkactions select {
1935
+ border : 1px solid #d8d8d8;
1936
+ max-width : 200px;
1937
+ max-height : 30px;
1938
+ padding : 0 10px;
 
1939
  }
1940
 
1941
  .yith-plugin-ui .form-table .list-table th {
1942
+ width : initial;
1943
+ }
1944
+
1945
+ .yith-plugin-ui #plugin-fw-wc table.form-table th.check-column {
1946
+ padding-left : 3px;
1947
  }
1948
 
1949
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table tbody td {
1950
+ padding-left : 20px;
1951
  }
1952
 
1953
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table th,
1954
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table td {
1955
+ padding : 15px 20px 15px 20px;
1956
  }
1957
 
1958
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table thead td,
1959
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table thead th,
1960
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot td,
1961
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot th {
1962
+ padding : 3px 20px;
1963
  }
1964
 
1965
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table thead a,
1966
  .yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot a {
1967
+ padding-left : 0;
1968
  }
1969
 
1970
  .yith-plugin-ui .yith-plugin-fw-list-table h2 {
1971
+ border : 0;
1972
+ padding : 35px 0 15px;
1973
+ display : inline-block;
1974
+ margin-right : 10px;
1975
  }
1976
 
1977
  .yith-plugin-ui .form-table .yith-plugin-fw-list-table table th {
1978
+ vertical-align : middle;
1979
  }
1980
 
1981
  .yith-plugin-ui .yith-plugin-fw-list-table-container {
1982
+ padding : 0 20px;
1983
  }
1984
 
1985
  .yith-plugin-ui #doaction, .yith-plugin-ui #doaction2,
1986
  .yith-plugin-ui #post-query-submit,
1987
  .yith-plugin-ui #search-submit,
1988
  .yith-plugin-ui .button.filter-button {
1989
+ margin-left : 0;
1990
+ height : 33px;
1991
+ padding : 0 10px;
1992
+ line-height : 33px;
1993
  }
1994
 
1995
  .yith-plugin-ui .bulkactions {
1996
+ margin : 10px 0;
1997
  }
1998
 
1999
  .yith-plugin-ui .form-table td p.yith-section-description {
2000
+ color : #716269;
2001
+ margin-bottom : 20px;
2002
  }
2003
 
2004
  /** Time picker width*/
2005
  .yith-plugin-ui input.ui-timepicker-input {
2006
+ width : 100px !important;
2007
  }
2008
 
2009
  /** date format **/
2010
  .yith-plugin-ui .yith-plugin-fw-date-format code {
2011
+ margin-left : 30px;
2012
  }
2013
 
2014
  .yith-plugin-ui .yith-plugin-fw-date-format input[type=text].small-text {
2015
+ margin-left : 45px;
2016
  }
2017
 
2018
  /** checkbox columns **/
2019
  .yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
2020
+ width : calc(50% - 20px);
2021
+ padding-right : 20px;
2022
+ float : left;
2023
  }
2024
 
2025
  .yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
2026
+ clear : both;
2027
  }
2028
 
2029
  .yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
2030
+ width : calc(33% - 10px);
2031
+ padding-right : 10px;
2032
+ float : left;
2033
  }
2034
 
2035
  .yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
2036
+ clear : both;
2037
  }
2038
 
2039
  .yith-plugin-fw-checkbox-field-wrapper {
2040
+ display : inline-block !important;
2041
+ margin-right : 10px;
2042
  }
2043
 
2044
  .yith-plugin-fw-checkbox-field-wrapper + span.description {
2045
+ display : inline-block;
2046
+ vertical-align : middle;
2047
+ margin : 0;
2048
  }
2049
 
2050
  .yith-plugin-ui span.description {
2051
+ margin-top : 10px;
2052
+ line-height : 20px;
2053
  }
2054
 
2055
  .yith-plugin-fw-option-with-description {
2056
+ display : table-cell;
2057
+ width : auto;
2058
+ vertical-align : top;
2059
+ }
2060
+
2061
+
2062
+ /**
2063
+ * Required
2064
+ */
2065
+ .yith-plugin-fw-panel-wc-row.yith-plugin-fw--required th.titledesc > label:after,
2066
+ .yith-plugin-fw-metabox-field-row.yith-plugin-fw--required label:first-child:after,
2067
+ .yith-plugin-fw-toggle-element-field-wrapper .yith-plugin-fw--required > label:first-child:after {
2068
+ content : '*';
2069
+ color : #ea0034;
2070
+ font-weight : 800;
2071
+ margin-left : 4px;
2072
  }
2073
 
2074
  /** YITH PANEL **/
2075
  .yith-plugin-ui #yith-plugin-fw-panel {
2076
+ margin-top : -10px;
2077
  }
2078
 
2079
  .yith-plugin-ui #plugin-fw-wc, .yith-plugin-ui #yith-plugin-fw-panel {
2080
+ padding-top : 0;
2081
  }
2082
 
2083
  .yith-plugin-ui .plugin-option tr {
2084
+ border : 0;
2085
  }
2086
 
2087
  /** MULTI SELECT **/
 
 
 
 
 
 
2088
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select {
2089
+ display: inline-block;
2090
+ width: 30%;
2091
+ margin-right: 3%;
2092
+ max-width: 400px;
2093
  }
2094
  .yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select label {
2095
  display: block;
2103
  min-width: auto !important;
2104
  }
2105
 
2106
+ @media screen and (max-width : 1440px) {
2107
  .yith-plugin-ui .yith-add-box,
2108
  .yith-plugin-ui .yith-toggle-row:not(.fixed) {
2109
+ width : 80%;
2110
  }
2111
  }
2112
 
2113
+ @media screen and (max-width : 1024px) {
2114
  .yith-plugin-ui .yith-add-box,
2115
  .yith-plugin-ui .yith-toggle-row:not(.fixed) {
2116
+ width : 90%;
2117
  }
2118
 
2119
  .yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
2120
+ width : 100%;
2121
+ padding-right : 20px;
2122
+ float : left;
2123
  }
2124
 
2125
  .yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
2126
+ width : calc(50% - 10px);
2127
+ padding-right : 10px;
2128
+ float : left;
2129
  }
2130
 
2131
  .yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
2132
+ clear : both;
2133
  }
2134
 
2135
  .yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
2136
+ clear : initial;
2137
  }
2138
  }
2139
 
2140
+ @media screen and (max-width : 782px) {
2141
  .yith-plugin-fw-banner.yith-plugin-fw-banner-free {
2142
+ height : auto;
2143
+ background-color : #a9c7d3;
2144
  }
2145
 
2146
  .yith-plugin-fw-banner.yith-plugin-fw-banner-free ul {
2147
+ width : 90%;
2148
+ text-align : center;
2149
  }
2150
 
2151
  .yith-plugin-fw-banner.yith-plugin-fw-banner-free li img {
2152
+ width : 90%;
2153
+ margin : 0 auto;
2154
  }
2155
 
2156
  .yith-plugin-fw-banner h1 {
2157
+ line-height : 1.2em;
2158
  }
2159
 
2160
  .yith-plugin-ui .yith-add-box,
2161
  .yith-plugin-ui .yith-toggle-row {
2162
+ width : 100%;
2163
  }
2164
 
2165
  .yith-plugin-ui td.forminp-checkbox.two-cols fieldset,
2166
  .yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
2167
+ width : 100%;
2168
+ clear : initial;
2169
+ }
2170
+
2171
+ .yith-plugin-ui .wp-picker-container .wp-color-result.button {
2172
+ padding: 0;
2173
  }
2174
 
2175
  }
plugin-fw/assets/js/metabox.js CHANGED
@@ -6,96 +6,109 @@
6
  * It is also available through the world-wide-web at this URL:
7
  * http://www.gnu.org/licenses/gpl-3.0.txt
8
  */
9
- (function ($) {
10
 
11
- $('.metaboxes-tab').each(function () {
12
- $('.tabs-panel', this).hide();
13
 
14
- var active_tab = wpCookies.get('active_metabox_tab');
15
- if (active_tab == null) {
16
- active_tab = $('ul.metaboxes-tabs li:first-child a', this).attr('href');
17
  } else {
18
  active_tab = '#' + active_tab;
19
  }
20
 
21
- $(active_tab).show();
22
 
23
- $('.metaboxes-tabs a', this).click(function (e) {
24
- if ($(this).parent().hasClass('tabs')) {
25
  e.preventDefault();
26
  return;
27
  }
28
 
29
- var t = $(this).attr('href');
30
- $(this).parent().addClass('tabs').siblings('li').removeClass('tabs');
31
- $(this).closest('.metaboxes-tab').find('.tabs-panel').hide();
32
- $(t).show();
33
 
34
  return false;
35
- });
36
- });
37
 
38
- var act_page_option = $('#_active_page_options-container').parent().html();
39
- $('#_active_page_options-container').parent().remove();
40
- $(act_page_option).insertAfter('#yit-post-setting .handlediv');
41
- $(act_page_option).insertAfter('#yit-page-setting .handlediv');
42
 
43
 
44
- $('#_active_page_options-container').on('click', function(){
45
- if( $('#_active_page_options').is(":checked") ){
46
- $('#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab').css( { 'opacity' : 1 , 'pointer-events' : 'auto' } );
47
- }else{
48
- $('#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab').css( { 'opacity' : 0.5 , 'pointer-events' : 'none' } );
 
 
 
 
 
 
49
  }
50
- }).click();
51
 
52
 
53
  //dependencies handler
54
- $('.metaboxes-tab [data-dep-target]').each(function(){
55
- var t = $(this);
56
-
57
- var field = '#' + t.data('dep-target'),
58
- dep = '#' + t.data('dep-id'),
59
- value = t.data('dep-value'),
60
- type = t.data('dep-type');
61
 
 
 
 
 
62
 
63
- dependencies_handler( field, dep, value.toString(), type );
64
 
65
- $(dep).on('change', function(){
66
  dependencies_handler( field, dep, value.toString(), type );
67
- }).change();
68
- });
 
 
 
 
 
 
69
 
70
  //Handle dependencies.
71
- function dependencies_handler ( id, deps, values, type ) {
72
  var result = true;
73
 
74
 
75
  //Single dependency
76
- if( typeof( deps ) == 'string' ) {
77
- if( deps.substr( 0, 6 ) == ':radio' )
78
- {deps = deps + ':checked'; }
 
79
 
80
  var val = $( deps ).val();
81
 
82
- if( $(deps).attr('type') == 'checkbox'){
83
- var thisCheck = $(deps);
84
- if ( thisCheck.is ( ':checked' ) ) {
85
  val = 'yes';
86
- }
87
- else {
88
  val = 'no';
89
  }
90
  }
91
 
92
  values = values.split( ',' );
93
 
94
- for( var i = 0; i < values.length; i++ ) {
95
- if( val != values[i] )
96
- { result = false; }
97
- else
98
- { result = true; break; }
 
 
99
  }
100
  }
101
 
@@ -134,5 +147,5 @@
134
  }
135
  }
136
  }
137
-
138
- })(jQuery);
6
  * It is also available through the world-wide-web at this URL:
7
  * http://www.gnu.org/licenses/gpl-3.0.txt
8
  */
9
+ ( function ( $ ) {
10
 
11
+ $( '.metaboxes-tab' ).each( function () {
12
+ $( '.tabs-panel', this ).hide();
13
 
14
+ var active_tab = wpCookies.get( 'active_metabox_tab' );
15
+ if ( active_tab == null ) {
16
+ active_tab = $( 'ul.metaboxes-tabs li:first-child a', this ).attr( 'href' );
17
  } else {
18
  active_tab = '#' + active_tab;
19
  }
20
 
21
+ $( active_tab ).show();
22
 
23
+ $( '.metaboxes-tabs a', this ).click( function ( e ) {
24
+ if ( $( this ).parent().hasClass( 'tabs' ) ) {
25
  e.preventDefault();
26
  return;
27
  }
28
 
29
+ var t = $( this ).attr( 'href' );
30
+ $( this ).parent().addClass( 'tabs' ).siblings( 'li' ).removeClass( 'tabs' );
31
+ $( this ).closest( '.metaboxes-tab' ).find( '.tabs-panel' ).hide();
32
+ $( t ).show();
33
 
34
  return false;
35
+ } );
36
+ } );
37
 
38
+ var act_page_option = $( '#_active_page_options-container' ).parent().html();
39
+ $( '#_active_page_options-container' ).parent().remove();
40
+ $( act_page_option ).insertAfter( '#yit-post-setting .handlediv' );
41
+ $( act_page_option ).insertAfter( '#yit-page-setting .handlediv' );
42
 
43
 
44
+ $( '#_active_page_options-container' ).on( 'click', function () {
45
+ if ( $( '#_active_page_options' ).is( ":checked" ) ) {
46
+ $( '#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab' ).css( {
47
+ 'opacity' : 1,
48
+ 'pointer-events': 'auto'
49
+ } );
50
+ } else {
51
+ $( '#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab' ).css( {
52
+ 'opacity' : 0.5,
53
+ 'pointer-events': 'none'
54
+ } );
55
  }
56
+ } ).click();
57
 
58
 
59
  //dependencies handler
60
+ $( document.body ).on( 'yith-plugin-fw-metabox-init-deps', function () {
61
+ $( document.body ).trigger( 'yith-plugin-fw-init-radio' );
62
+ $( '.metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)' ).each( function () {
63
+ var t = $( this );
 
 
 
64
 
65
+ var field = '#' + t.data( 'dep-target' ),
66
+ dep = '#' + t.data( 'dep-id' ),
67
+ value = t.data( 'dep-value' ),
68
+ type = t.data( 'dep-type' );
69
 
 
70
 
 
71
  dependencies_handler( field, dep, value.toString(), type );
72
+
73
+ $( dep ).on( 'change', function () {
74
+ dependencies_handler( field, dep, value.toString(), type );
75
+ } ).change();
76
+
77
+ t.addClass( 'yith-plugin-fw-metabox-deps-initialized' );
78
+ } );
79
+ } ).trigger( 'yith-plugin-fw-metabox-init-deps' );
80
 
81
  //Handle dependencies.
82
+ function dependencies_handler( id, deps, values, type ) {
83
  var result = true;
84
 
85
 
86
  //Single dependency
87
+ if ( typeof ( deps ) == 'string' ) {
88
+ if ( deps.substr( 0, 6 ) == ':radio' ) {
89
+ deps = deps + ':checked';
90
+ }
91
 
92
  var val = $( deps ).val();
93
 
94
+ if ( $( deps ).attr( 'type' ) == 'checkbox' ) {
95
+ var thisCheck = $( deps );
96
+ if ( thisCheck.is( ':checked' ) ) {
97
  val = 'yes';
98
+ } else {
 
99
  val = 'no';
100
  }
101
  }
102
 
103
  values = values.split( ',' );
104
 
105
+ for ( var i = 0; i < values.length; i++ ) {
106
+ if ( val != values[ i ] ) {
107
+ result = false;
108
+ } else {
109
+ result = true;
110
+ break;
111
+ }
112
  }
113
  }
114
 
147
  }
148
  }
149
  }
150
+
151
+ } )( jQuery );
plugin-fw/assets/js/metabox.min.js CHANGED
@@ -4,4 +4,4 @@ $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){ret
4
  (function(a){function e(b,d,c,e){var f=!0;if("string"==typeof d){":radio"==d.substr(0,6)&&(d+=":checked");var g=a(d).val();"checkbox"==a(d).attr("type")&&(g=a(d).is(":checked")?"yes":"no");c=c.split(",");for(d=0;d<c.length;d++)if(g!=c[d])f=!1;else{f=!0;break}}c=a(b);b=a(b+"-container").parent();e=e.split("-");for(var h in e)if(g=e[h],f)switch(g){case "disable":b.removeClass("yith-disabled");c.attr("disabled",!1);break;case "hideme":c.show();break;default:b.show()}else switch(g){case "disable":b.addClass("yith-disabled");
5
  c.attr("disabled",!0);break;case "hideme":c.hide();break;default:b.hide()}}a(".metaboxes-tab").each(function(){a(".tabs-panel",this).hide();var b=wpCookies.get("active_metabox_tab");b=null==b?a("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+b;a(b).show();a(".metaboxes-tabs a",this).click(function(b){if(a(this).parent().hasClass("tabs"))b.preventDefault();else return b=a(this).attr("href"),a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),
6
  a(b).show(),!1})});var c=a("#_active_page_options-container").parent().html();a("#_active_page_options-container").parent().remove();a(c).insertAfter("#yit-post-setting .handlediv");a(c).insertAfter("#yit-page-setting .handlediv");a("#_active_page_options-container").on("click",function(){a("#_active_page_options").is(":checked")?a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,
7
- "pointer-events":"none"})}).click();a(".metaboxes-tab [data-dep-target]").each(function(){var b=a(this),c="#"+b.data("dep-target"),f="#"+b.data("dep-id"),h=b.data("dep-value"),k=b.data("dep-type");e(c,f,h.toString(),k);a(f).on("change",function(){e(c,f,h.toString(),k)}).change()})})(jQuery);
4
  (function(a){function e(b,d,c,e){var f=!0;if("string"==typeof d){":radio"==d.substr(0,6)&&(d+=":checked");var g=a(d).val();"checkbox"==a(d).attr("type")&&(g=a(d).is(":checked")?"yes":"no");c=c.split(",");for(d=0;d<c.length;d++)if(g!=c[d])f=!1;else{f=!0;break}}c=a(b);b=a(b+"-container").parent();e=e.split("-");for(var h in e)if(g=e[h],f)switch(g){case "disable":b.removeClass("yith-disabled");c.attr("disabled",!1);break;case "hideme":c.show();break;default:b.show()}else switch(g){case "disable":b.addClass("yith-disabled");
5
  c.attr("disabled",!0);break;case "hideme":c.hide();break;default:b.hide()}}a(".metaboxes-tab").each(function(){a(".tabs-panel",this).hide();var b=wpCookies.get("active_metabox_tab");b=null==b?a("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+b;a(b).show();a(".metaboxes-tabs a",this).click(function(b){if(a(this).parent().hasClass("tabs"))b.preventDefault();else return b=a(this).attr("href"),a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),
6
  a(b).show(),!1})});var c=a("#_active_page_options-container").parent().html();a("#_active_page_options-container").parent().remove();a(c).insertAfter("#yit-post-setting .handlediv");a(c).insertAfter("#yit-page-setting .handlediv");a("#_active_page_options-container").on("click",function(){a("#_active_page_options").is(":checked")?a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,
7
+ "pointer-events":"none"})}).click();a(document.body).on("yith-plugin-fw-metabox-init-deps",function(){a(document.body).trigger("yith-plugin-fw-init-radio");a(".metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)").each(function(){var b=a(this),c="#"+b.data("dep-target"),f="#"+b.data("dep-id"),h=b.data("dep-value"),k=b.data("dep-type");e(c,f,h.toString(),k);a(f).on("change",function(){e(c,f,h.toString(),k)}).change();b.addClass("yith-plugin-fw-metabox-deps-initialized")})}).trigger("yith-plugin-fw-metabox-init-deps")})(jQuery);
plugin-fw/assets/js/multisite-updater.min.js CHANGED
@@ -1 +1,8 @@
1
- !function(e){var a=e("#menu-plugins"),n=a.find(".update-plugins").find(".update-count").text(),t=plugins.registered,s=plugins.activated;if(0==n||""==n){n=0,a.find(".wp-menu-name").append('<span class="update-plugins"><span class="plugin-count"></span></span>')}function i(e,a,n){this.php_js=this.php_js||{},this.php_js.ENV=this.php_js.ENV||{};var t,s=0,i=0,r={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},l=function(e){return(e=(e=(""+e).replace(/[_\-+]/g,".")).replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".")).length?e.split("."):[-8]};for(numVersion=function(e){return e?isNaN(e)?r[e]||-7:parseInt(e,10):0},e=l(e),a=l(a),t=Math.max(e.length,a.length),s=0;s<t;s++)if(e[s]!=a[s]){if(e[s]=numVersion(e[s]),a[s]=numVersion(a[s]),e[s]<a[s]){i=-1;break}if(e[s]>a[s]){i=1;break}}if(!n)return i;switch(n){case">":case"gt":return i>0;case">=":case"ge":return i>=0;case"<=":case"le":return i<=0;case"==":case"=":case"eq":return 0===i;case"<>":case"!=":case"ne":return 0!==i;case"":case"<":case"lt":return i<0;default:return null}}!function(a,n,t,s){for(var r in a){var l=a[r];for(var p in l)if("slug"!=p&&!i(l[p].Version,l[p].Latest,"=")){t=parseInt(t)+1,e(".plugin-count").empty().html(t);var u=new RegExp(" ","g"),c=l[p],g=""+c.Name,o=g.replace(u,"-").trim(),d='*[data-slug="'+o.toLowerCase()+'"]';e(d).addClass("update");var f='<tr class="plugin-update-tr"><td colspan="3" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt">'+s.strings.new_version.replace("%plugin_name%",g)+'<a class="thickbox open-plugin-details-modal" href="'+s.details_url[r]+'">'+s.strings.latest.replace("%latest%",l[p].Latest)+"</a>";f=void 0===n[r]?f+" <em>"+s.strings.unavailable+"</em>"+s.strings.activate.replace("%activate_link%",s.licence_activation_url).replace("%plugin_name%",g):f+'. <a href="'+s.update_url[r]+'">'+s.strings.update_now+"</a>",i(l[p].Version,l[p].Latest,">")&&(f+=s.strings.version_issue.replace("%plugin_name%",g)),e(f+="</div></td></tr>").insertAfter(d)}}}(t,s,n,plugins),e("body").on("click",".yit-changelog-button",function(){e("#TB_window").remove()})}(jQuery);
 
 
 
 
 
 
 
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,g,b){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var h=a[e];if(g.call(b,h,e,a))return{i:e,v:h}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,g,b){a!=Array.prototype&&a!=Object.prototype&&(a[g]=b.value)};
2
+ $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,g,b,d){if(g){b=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in b||(b[e]={});b=b[e]}a=a[a.length-1];d=b[a];g=g(d);g!=d&&null!=g&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:g})}};
3
+ $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
4
+ (function(a){function g(a,b,d){this.php_js=this.php_js||{};this.php_js.ENV=this.php_js.ENV||{};var c=0,g=0,f=0,e={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1};c=function(a){a=(""+a).replace(/[_\-+]/g,".");a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".");return a.length?a.split("."):[-8]};numVersion=function(a){return a?isNaN(a)?e[a]||-7:parseInt(a,10):0};a=c(a);b=c(b);g=Math.max(a.length,b.length);for(c=0;c<g;c++)if(a[c]!=b[c])if(a[c]=numVersion(a[c]),b[c]=numVersion(b[c]),
5
+ a[c]<b[c]){f=-1;break}else if(a[c]>b[c]){f=1;break}if(!d)return f;switch(d){case ">":case "gt":return 0<f;case ">=":case "ge":return 0<=f;case "<=":case "le":return 0>=f;case "==":case "=":case "eq":return 0===f;case "<>":case "!=":case "ne":return 0!==f;case "":case "<":case "lt":return 0>f;default:return null}}var b=a("#menu-plugins"),d=b.find(".update-plugins").find(".update-count").text(),e=plugins.registered,h=plugins.activated;if(0==d||""==d)d=0,b.find(".wp-menu-name").append('<span class="update-plugins"><span class="plugin-count"></span></span>');
6
+ (function(b,d,e,c){for(var h in b){var f=b[h],k;for(k in f)if("slug"!=k&&!g(f[k].Version,f[k].Latest,"=")){e=parseInt(e)+1;a(".plugin-count").empty().html(e);var m=""+f[k].Name,n='*[data-slug="'+m.replace(/ /g,"-").trim().toLowerCase()+'"]';a(n).addClass("update");var l='<tr class="plugin-update-tr"><td colspan="3" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt">'+c.strings.new_version.replace("%plugin_name%",m)+'<a class="thickbox open-plugin-details-modal" href="'+
7
+ c.details_url[h]+'">'+c.strings.latest.replace("%latest%",f[k].Latest)+"</a>";l="undefined"==typeof d[h]?l+" <em>"+c.strings.unavailable+"</em>"+c.strings.activate.replace("%activate_link%",c.licence_activation_url).replace("%plugin_name%",m):l+'. <a href="'+c.update_url[h]+'">'+c.strings.update_now+"</a>";g(f[k].Version,f[k].Latest,">")&&(l+=c.strings.version_issue.replace("%plugin_name%",m));l+="</div></td></tr>";a(l).insertAfter(n)}}})(e,h,d,plugins);a("body").on("click",".yit-changelog-button",
8
+ function(){a("#TB_window").remove()})})(jQuery);
plugin-fw/assets/js/wp-pages.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This file belongs to the YIT Plugin Framework.
3
+ *
4
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
+ * that is bundled with this package in the file LICENSE.txt.
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.gnu.org/licenses/gpl-3.0.txt
8
+ */
9
+
10
+ jQuery( function ( $ ) {
11
+ var wrap = $( '.yith-plugin-fw-wp-page-wrapper' ),
12
+ notices = $( 'div.updated, div.error, div.notice' );
13
+
14
+ // prevents the WC message for changes when leaving the panel page
15
+ $( '.yith-plugin-fw-wp-page-wrapper .woo-nav-tab-wrapper' ).removeClass( 'woo-nav-tab-wrapper' ).addClass( 'yith-nav-tab-wrapper' );
16
+
17
+ // prevent moving notices withing the tab in WP Pages and move them into the wrapper
18
+ notices.addClass( 'inline' );
19
+ if ( wrap.length ) {
20
+ wrap.prepend( notices );
21
+ }
22
+
23
+ } );
plugin-fw/assets/js/wp-pages.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function(a){var b=a(".yith-plugin-fw-wp-page-wrapper"),c=a("div.updated, div.error, div.notice");a(".yith-plugin-fw-wp-page-wrapper .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper");c.addClass("inline");b.length&&b.prepend(c)});
plugin-fw/assets/js/yit-cpt-unlimited.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(c){c(".wrap h1, .wrap h2").on("click","a.multi-uploader",function(f){f.preventDefault();var a=c(this),d=!1;a.next("span.spinner").css("display","inline-block");if(!b){var b=wp.media.frames.file_frame=wp.media({title:a.data("uploader_title"),button:{text:a.data("uploader_button_text")},library:{type:"image"},multiple:!0});b.on("select",function(){var e=[];b.state().get("selection").map(function(a){a=a.toJSON();e.push({id:a.id,url:a.url,title:a.title})});c.post(ajaxurl,{images:e,post_type:typenow,
2
- action:"yit_cptu_multiuploader",_ajax_nonce:a.data("nonce")},function(a){location.reload()});a.next("span.spinner").css("display","inline-block");d=!0});b.on("close",function(){d||a.next("span.spinner").hide()})}b.open()})})(jQuery);
1
+ (function(c){c(".wrap h1, .wrap h2").on("click","a.multi-uploader",function(f){f.preventDefault();var a=c(this),d=!1;a.next("span.spinner").css("display","inline-block");if(!b){var b=wp.media.frames.file_frame=wp.media({title:a.data("uploader_title"),button:{text:a.data("uploader_button_text")},library:{type:"image"},multiple:!0});b.on("select",function(){var e=[];b.state().get("selection").map(function(a){a=a.toJSON();e.push({id:a.id,url:a.url,title:a.title})});console.log(a.data("nonce"));c.post(ajaxurl,
2
+ {images:e,post_type:typenow,action:"yit_cptu_multiuploader",_ajax_nonce:a.data("nonce")},function(a){location.reload()});a.next("span.spinner").css("display","inline-block");d=!0});b.on("close",function(){d||a.next("span.spinner").hide()})}b.open()})})(jQuery);
plugin-fw/assets/js/yith-dashboard.min.js CHANGED
@@ -1,2 +1,2 @@
1
  (function(a){a(".yith-last-changelog").click(function(b){b.preventDefault();b=a(this).data("changelogid");var c=a("#"+b);b=a(this).data("plugininfo");var d={};d[yith_dashboard.buttons.close]=function(){a(this).dialog("close")};c.dialog({title:b,dialogClass:"wp-dialog",autoOpen:!1,draggable:!1,width:"auto",modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:window},buttons:d,show:{effect:"blind",duration:1E3},open:function(){a(".ui-widget-overlay").bind("click",function(){c.dialog("close")})},
2
- create:function(){a(".ui-dialog-titlebar-close").addClass("ui-button")}});c.dialog("open")})})(jQuery);
1
  (function(a){a(".yith-last-changelog").click(function(b){b.preventDefault();b=a(this).data("changelogid");var c=a("#"+b);b=a(this).data("plugininfo");var d={};d[yith_dashboard.buttons.close]=function(){a(this).dialog("close")};c.dialog({title:b,dialogClass:"wp-dialog",autoOpen:!1,draggable:!1,width:"auto",modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:window},buttons:d,show:{effect:"blind",duration:1E3},open:function(){a(".ui-widget-overlay").bind("click",function(){c.dialog("close")})},
2
+ create:function(){a(".ui-dialog-titlebar-close").addClass("ui-button")}});c.dialog("open")})})(jQuery);
plugin-fw/assets/js/yith-enhanced-select.min.js CHANGED
@@ -1 +1,10 @@
1
- jQuery(document).ready(function(c){"use strict";c(document.body).on("yith-framework-enhanced-select-init",function(){c(".yith-post-search").filter(":not(.enhanced)").each(function(){var e={action:"yith_plugin_fw_json_search_posts",security:yith_framework_enhanced_select_params.search_posts_nonce,post_type:"post"},a=c.extend(e,c(this).data()),t={allowClear:!!c(this).data("allow_clear"),placeholder:c(this).data("placeholder"),minimumInputLength:c(this).data("minimum_input_length")?c(this).data("minimum_input_length"):"3",escapeMarkup:function(e){return e},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(e){var t={term:e.term};return c.extend(t,a)},processResults:function(e){var a=[];return e&&c.each(e,function(e,t){a.push({id:e,text:t})}),{results:a}},cache:!0}};if(c(this).select2(t).addClass("enhanced"),c(this).data("sortable")){var n=c(this),i=c(this).next(".select2-container").find("ul.select2-selection__rendered");i.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){c(i.find(".select2-selection__choice").get().reverse()).each(function(){var e=c(this).data("data").id,t=n.find('option[value="'+e+'"]')[0];n.prepend(t)})}})}}),c(".yith-customer-search").filter(":not(.enhanced)").each(function(){var e={action:"woocommerce_json_search_customers",security:yith_framework_enhanced_select_params.search_customers_nonce},a=c.extend(e,c(this).data()),t={allowClear:!!c(this).data("allow_clear"),placeholder:c(this).data("placeholder"),minimumInputLength:c(this).data("minimum_input_length")?c(this).data("minimum_input_length"):"3",escapeMarkup:function(e){return e},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(e){var t={term:e.term};return c.extend(t,a)},processResults:function(e){var a=[];return e&&c.each(e,function(e,t){a.push({id:e,text:t})}),{results:a}},cache:!0}};if(c(this).select2(t).addClass("enhanced"),c(this).data("sortable")){var n=c(this),i=c(this).next(".select2-container").find("ul.select2-selection__rendered");i.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){c(i.find(".select2-selection__choice").get().reverse()).each(function(){var e=c(this).data("data").id,t=n.find('option[value="'+e+'"]')[0];n.prepend(t)})}})}}),c(".yith-term-search").filter(":not(.enhanced)").each(function(){var e={action:"yith_plugin_fw_json_search_terms",security:yith_framework_enhanced_select_params.search_terms_nonce,taxonomy:"category"},a=c.extend(e,c(this).data()),t={allowClear:!!c(this).data("allow_clear"),placeholder:c(this).data("placeholder"),minimumInputLength:c(this).data("minimum_input_length")?c(this).data("minimum_input_length"):"3",escapeMarkup:function(e){return e},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(e){var t={term:e.term};return c.extend(t,a)},processResults:function(e){var a=[];return e&&c.each(e,function(e,t){a.push({id:e,text:t})}),{results:a}},cache:!0}};if(c(this).select2(t).addClass("enhanced"),c(this).data("sortable")){var n=c(this),i=c(this).next(".select2-container").find("ul.select2-selection__rendered");i.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){c(i.find(".select2-selection__choice").get().reverse()).each(function(){var e=c(this).data("data").id,t=n.find('option[value="'+e+'"]')[0];n.prepend(t)})}})}})}).trigger("yith-framework-enhanced-select-init")});
 
 
 
 
 
 
 
 
 
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,f,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var b=a[e];if(f.call(c,b,e,a))return{i:e,v:b}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,f,c){a!=Array.prototype&&a!=Object.prototype&&(a[f]=c.value)};
2
+ $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,f,c,d){if(f){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];f=f(d);f!=d&&null!=f&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:f})}};
3
+ $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
4
+ jQuery(document).ready(function(a){a(document.body).on("yith-framework-enhanced-select-init",function(){a(".yith-post-search").filter(":not(.enhanced)").each(function(){var f=a.extend({action:"yith_plugin_fw_json_search_posts",security:yith_framework_enhanced_select_params.search_posts_nonce,post_type:"post"},a(this).data()),c={allowClear:a(this).data("allow_clear")?!0:!1,placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):
5
+ "3",escapeMarkup:function(a){return a},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(b){return a.extend({term:b.term},f)},processResults:function(b){var c=[];b&&a.each(b,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};a(this).select2(c).addClass("enhanced");if(a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,
6
+ items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id;b=d.find('option[value="'+b+'"]')[0];d.prepend(b)})}})}});a(".yith-customer-search").filter(":not(.enhanced)").each(function(){var f=a.extend({action:"woocommerce_json_search_customers",security:yith_framework_enhanced_select_params.search_customers_nonce},a(this).data()),c={allowClear:a(this).data("allow_clear")?!0:!1,placeholder:a(this).data("placeholder"),
7
+ minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(b){return a.extend({term:b.term},f)},processResults:function(b){var c=[];b&&a.each(b,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};a(this).select2(c).addClass("enhanced");if(a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");
8
+ e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id;b=d.find('option[value="'+b+'"]')[0];d.prepend(b)})}})}});a(".yith-term-search").filter(":not(.enhanced)").each(function(){var f=a.extend({action:"yith_plugin_fw_json_search_terms",security:yith_framework_enhanced_select_params.search_terms_nonce,
9
+ taxonomy:"category"},a(this).data()),c={allowClear:a(this).data("allow_clear")?!0:!1,placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(b){return a.extend({term:b.term},f)},processResults:function(b){var c=[];b&&a.each(b,function(a,b){c.push({id:a,text:b})});return{results:c}},cache:!0}};a(this).select2(c).addClass("enhanced");
10
+ if(a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id;b=d.find('option[value="'+b+'"]')[0];d.prepend(b)})}})}})}).trigger("yith-framework-enhanced-select-init")});
plugin-fw/assets/js/yith-fields.js CHANGED
@@ -1,5 +1,4 @@
1
-
2
- jQuery( function ( $ ) {
3
 
4
  /* global yith_framework_fw_fields*/
5
 
@@ -27,6 +26,16 @@ jQuery( function ( $ ) {
27
  /* Datepicker */
28
  $datepicker.each( function () {
29
  var args = $( this ).data();
 
 
 
 
 
 
 
 
 
 
30
  $( this ).datepicker( args );
31
  } );
32
 
@@ -408,7 +417,7 @@ jQuery( function ( $ ) {
408
  $( document.body ).trigger( 'yith-framework-enhanced-select-init' );
409
  };
410
 
411
- yith_fields_init();
412
 
413
  /* on-off */
414
  $( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
@@ -438,7 +447,7 @@ jQuery( function ( $ ) {
438
  id = wrapper.attr( 'id' ),
439
  current_tab = $.urlParam( 'tab' );
440
 
441
- formdata.append( 'security', wrapper.data('nonce') );
442
 
443
  if ( typeof array_keys != 'undefined' && array_keys.length > 0 ) {
444
  formdata.append( 'yith_toggle_elements_order_keys', array_keys );
@@ -464,7 +473,7 @@ jQuery( function ( $ ) {
464
  spinner.removeClass( 'show' );
465
  }
466
 
467
- $( document ).trigger( 'yith_save_toggle_element_done', [ result, toggle ] );
468
  }
469
  } );
470
  };
@@ -523,7 +532,7 @@ jQuery( function ( $ ) {
523
  toggle_el.find( '.subtitle' ).html( subtitle );
524
  }
525
 
526
- $( document ).trigger( 'yith-toggle-element-item-title', [ toggle_el ] );
527
  };
528
 
529
  $.urlParam = function ( name ) {
@@ -553,25 +562,25 @@ jQuery( function ( $ ) {
553
  /**Add new box toggle**/
554
  $( document ).on( 'click', '.yith-add-box-button', function ( event ) {
555
  event.preventDefault();
556
- var $this = $( this ),
557
- target_id = $this.data( 'box_id' ),
558
- closed_label = $this.data('closed_label'),
559
- label = $this.data('opened_label'),
560
- id = $this.closest( '.yith-toggle_wrapper' ).attr( 'id' );
561
- template = wp.template( 'yith-toggle-element-add-box-content-' + id );
562
 
563
  if ( '' !== target_id ) {
564
  $( '#' + target_id ).html( template( { index: 'box_id' } ) ).slideToggle();
565
- if (closed_label !== '') {
566
- if ($this.html() === closed_label) {
567
- $this.html(label).removeClass('closed');
568
  } else {
569
- $this.html(closed_label).addClass('closed');
570
  }
571
  }
572
 
573
- yith_fields_init();
574
- $( document ).trigger( 'yith-add-box-button-toggle', [ $this ] );
575
  }
576
  } );
577
 
@@ -588,7 +597,7 @@ jQuery( function ( $ ) {
588
 
589
  hidden_obj.val( counter );
590
 
591
- $( document ).trigger( 'yith-toggle-change-counter', [ hidden_obj, add_box ] );
592
 
593
  counter = hidden_obj.val();
594
  var template = wp.template( 'yith-toggle-element-item-' + id ),
@@ -626,29 +635,28 @@ jQuery( function ( $ ) {
626
 
627
  $( toggle_el ).formatToggleTitle();
628
  var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
629
- $( document ).trigger( 'yith-toggle-element-item-before-add', [ add_box, toggle_el, form_is_valid ] );
630
 
631
- var delayInMilliseconds =1000; //1 second
632
- setTimeout(function() {
633
  if ( form_is_valid.val() === 'yes' ) {
634
  $( toggle_element ).find( '.yith-toggle-elements' ).append( toggle_el );
635
  $( add_box ).find( '.yith-plugin-fw-datepicker' ).datepicker( 'destroy' );
636
  $( add_box ).html( '' );
637
- $( add_box ).prev('.yith-add-box-button').trigger('click');
638
  toggle_element.saveToggleElement();
639
 
640
- var delayInMilliseconds =2000; //1 second
641
- setTimeout(function() {
642
- $( toggle_element ).find('.highlight').removeClass('highlight');
643
- }, delayInMilliseconds);
644
 
645
 
646
- yith_fields_init();
647
  }
648
  }, delayInMilliseconds );
649
 
650
 
651
-
652
  } );
653
 
654
  $( document ).on( 'click', '.yith-toggle-row .yith-save-button', function ( event ) {
@@ -656,10 +664,10 @@ jQuery( function ( $ ) {
656
  var toggle = $( this ).closest( '.toggle-element' ),
657
  toggle_row = $( this ).closest( '.yith-toggle-row' ),
658
  spinner = toggle_row.find( '.spinner' );
659
- toggle_row.formatToggleTitle();
660
 
661
  var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
662
- $( document ).trigger( 'yith-toggle-element-item-before-update', [ toggle, toggle_row, form_is_valid ] );
663
  if ( form_is_valid.val() === 'yes' ) {
664
  spinner.addClass( 'show' );
665
  toggle.saveToggleElement( spinner );
@@ -687,20 +695,32 @@ jQuery( function ( $ ) {
687
  $( this ).closest( '.yith-plugin-fw-radio' ).val( $( this ).val() ).trigger( 'change' );
688
  } );
689
 
690
- $(document).on('click', '.yith-password-eye', function () {
691
- var $this = $(this),
692
- inp = $(this).closest('.yith-password-wrapper').find('input');
693
- if (inp.attr('type') === "password") {
694
- inp.attr('type', 'text');
695
- $this.addClass('yith-password-eye-closed');
696
  } else {
697
- inp.attr('type', 'password');
698
- $this.removeClass('yith-password-eye-closed');
699
  }
700
- });
701
 
702
- $( '.yith-plugin-fw-radio' ).each( function () {
703
- $( this ).val( $( this ).attr( 'value' ) );
 
 
 
 
 
 
 
 
 
 
 
 
704
  } );
705
 
706
- } );
1
+ ( function ( $ ) {
 
2
 
3
  /* global yith_framework_fw_fields*/
4
 
26
  /* Datepicker */
27
  $datepicker.each( function () {
28
  var args = $( this ).data();
29
+
30
+ // set animation to false to prevent style 'glitches' when removing class on closing
31
+ args.showAnim = false;
32
+ args.beforeShow = function ( input, instance ) {
33
+ instance.dpDiv.addClass( 'yith-plugin-fw-datepicker-div' );
34
+ };
35
+ args.onClose = function ( selectedDate, instance ) {
36
+ instance.dpDiv.removeClass( 'yith-plugin-fw-datepicker-div' );
37
+ };
38
+
39
  $( this ).datepicker( args );
40
  } );
41
 
417
  $( document.body ).trigger( 'yith-framework-enhanced-select-init' );
418
  };
419
 
420
+ $( document ).on( 'yith_fields_init', yith_fields_init ).trigger( 'yith_fields_init' );
421
 
422
  /* on-off */
423
  $( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
447
  id = wrapper.attr( 'id' ),
448
  current_tab = $.urlParam( 'tab' );
449
 
450
+ formdata.append( 'security', wrapper.data( 'nonce' ) );
451
 
452
  if ( typeof array_keys != 'undefined' && array_keys.length > 0 ) {
453
  formdata.append( 'yith_toggle_elements_order_keys', array_keys );
473
  spinner.removeClass( 'show' );
474
  }
475
 
476
+ $( document ).trigger( 'yith_save_toggle_element_done', [result, toggle] );
477
  }
478
  } );
479
  };
532
  toggle_el.find( '.subtitle' ).html( subtitle );
533
  }
534
 
535
+ $( document ).trigger( 'yith-toggle-element-item-title', [toggle_el] );
536
  };
537
 
538
  $.urlParam = function ( name ) {
562
  /**Add new box toggle**/
563
  $( document ).on( 'click', '.yith-add-box-button', function ( event ) {
564
  event.preventDefault();
565
+ var $this = $( this ),
566
+ target_id = $this.data( 'box_id' ),
567
+ closed_label = $this.data( 'closed_label' ),
568
+ label = $this.data( 'opened_label' ),
569
+ id = $this.closest( '.yith-toggle_wrapper' ).attr( 'id' );
570
+ template = wp.template( 'yith-toggle-element-add-box-content-' + id );
571
 
572
  if ( '' !== target_id ) {
573
  $( '#' + target_id ).html( template( { index: 'box_id' } ) ).slideToggle();
574
+ if ( closed_label !== '' ) {
575
+ if ( $this.html() === closed_label ) {
576
+ $this.html( label ).removeClass( 'closed' );
577
  } else {
578
+ $this.html( closed_label ).addClass( 'closed' );
579
  }
580
  }
581
 
582
+ $( document ).trigger( 'yith_fields_init' );
583
+ $( document ).trigger( 'yith-add-box-button-toggle', [$this] );
584
  }
585
  } );
586
 
597
 
598
  hidden_obj.val( counter );
599
 
600
+ $( document ).trigger( 'yith-toggle-change-counter', [hidden_obj, add_box] );
601
 
602
  counter = hidden_obj.val();
603
  var template = wp.template( 'yith-toggle-element-item-' + id ),
635
 
636
  $( toggle_el ).formatToggleTitle();
637
  var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
638
+ $( document ).trigger( 'yith-toggle-element-item-before-add', [add_box, toggle_el, form_is_valid] );
639
 
640
+ var delayInMilliseconds = 1000; //1 second
641
+ setTimeout( function () {
642
  if ( form_is_valid.val() === 'yes' ) {
643
  $( toggle_element ).find( '.yith-toggle-elements' ).append( toggle_el );
644
  $( add_box ).find( '.yith-plugin-fw-datepicker' ).datepicker( 'destroy' );
645
  $( add_box ).html( '' );
646
+ $( add_box ).prev( '.yith-add-box-button' ).trigger( 'click' );
647
  toggle_element.saveToggleElement();
648
 
649
+ var delayInMilliseconds = 2000; //1 second
650
+ setTimeout( function () {
651
+ $( toggle_element ).find( '.highlight' ).removeClass( 'highlight' );
652
+ }, delayInMilliseconds );
653
 
654
 
655
+ $( document ).trigger( 'yith_fields_init' );
656
  }
657
  }, delayInMilliseconds );
658
 
659
 
 
660
  } );
661
 
662
  $( document ).on( 'click', '.yith-toggle-row .yith-save-button', function ( event ) {
664
  var toggle = $( this ).closest( '.toggle-element' ),
665
  toggle_row = $( this ).closest( '.yith-toggle-row' ),
666
  spinner = toggle_row.find( '.spinner' );
667
+ toggle_row.formatToggleTitle();
668
 
669
  var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
670
+ $( document ).trigger( 'yith-toggle-element-item-before-update', [toggle, toggle_row, form_is_valid] );
671
  if ( form_is_valid.val() === 'yes' ) {
672
  spinner.addClass( 'show' );
673
  toggle.saveToggleElement( spinner );
695
  $( this ).closest( '.yith-plugin-fw-radio' ).val( $( this ).val() ).trigger( 'change' );
696
  } );
697
 
698
+ $( document ).on( 'click', '.yith-password-eye', function () {
699
+ var $this = $( this ),
700
+ inp = $( this ).closest( '.yith-password-wrapper' ).find( 'input' );
701
+ if ( inp.attr( 'type' ) === "password" ) {
702
+ inp.attr( 'type', 'text' );
703
+ $this.addClass( 'yith-password-eye-closed' );
704
  } else {
705
+ inp.attr( 'type', 'password' );
706
+ $this.removeClass( 'yith-password-eye-closed' );
707
  }
708
+ } );
709
 
710
+ $( document.body ).on( 'yith-plugin-fw-init-radio', function () {
711
+ $( '.yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)' ).each( function () {
712
+ $( this ).val( $( this ).attr( 'value' ) );
713
+ $( this ).addClass( 'yith-plugin-fw-radio--initialized' );
714
+ } );
715
+ } ).trigger( 'yith-plugin-fw-init-radio' );
716
+
717
+ /**
718
+ * Select2 - add class to stylize it with the new plugin-fw style
719
+ */
720
+ $( document ).on( 'select2:open', function ( e ) {
721
+ if ( $( e.target ).closest( '.yith-plugin-ui' ).length ) {
722
+ $( '.select2-results' ).closest( '.select2-container' ).addClass( 'yith-plugin-fw-select2-container' );
723
+ }
724
  } );
725
 
726
+ } )( jQuery );
plugin-fw/assets/js/yith-fields.min.js CHANGED
@@ -1,25 +1,29 @@
1
- jQuery(function(a){var r=function(){var b=a(".yith-plugin-fw-datepicker"),c=a(".yith-plugin-fw-colorpicker"),d=a(".yith-plugin-fw-upload-img-url"),f=a(".add_media"),h=a(".yith-plugin-fw .image-gallery ul.slides-wrapper"),g=a(".yith-plugin-fw-sidebar-layout"),l=a(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),m=a(".codemirror"),n=a(".yit-icons-manager-wrapper");a(".yith-plugin-ui td.forminp-checkbox");b.each(function(){var b=a(this).data();a(this).datepicker(b)});c.wpColorPicker({palettes:!1,
2
- width:200,mode:"hsl",clear:function(){var b=a(this);b.val(b.data("default-color"));b.change()}});c.each(function(){var b=a(this).data("variations-label"),e=a(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),p=a(this).closest(".yith-single-colorpicker"),q=e.find(".wp-picker-input-wrap"),c=p.find(".wp-picker-input-wrap");q.length&&e.find("a.wp-color-result").attr("title",b);p.length&&p.find("a.wp-color-result").attr("title",b);q.find(".wp-picker-clear-custom").length||(b=a("<span/>").attr({"class":"wp-picker-default-custom"}),
3
- q.find(".wp-picker-default").wrap(b));c.find(".wp-picker-clear-custom").length||(b=a("<span/>").attr({"class":"wp-picker-default-custom"}),c.find(".wp-picker-default").wrap(b))});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&(d.change(function(){var b=a(this).val(),e=a(this).parent().find(".yith-plugin-fw-upload-img-preview").first();1>e.length&&(e=a(this).parent().parent().find(".yith-plugin-fw-upload-img-preview").first());/(http|ftp|https):\/\/[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico)/.test(b)?
4
- e.html('<img src="'+b+'" style="max-width:100px; max-height:100px;" />'):e.html("")}).trigger("change"),a(document).on("click",".yith-plugin-fw-upload-button",function(b){b.preventDefault();var e=a(this).attr("id").replace(/-button$/,"");if(!k){b=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];var k=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,
5
- states:b});k.on("select",function(){var b=k.state().get("selection").first().toJSON();a("#"+e).val(b.url);a("#"+e+"-yith-attachment-id")&&a("#"+e+"-yith-attachment-id").val(b.id);d.trigger("change")})}k.open()}),a(document).on("click",".yith-plugin-fw-upload-button-reset",function(b){var e=a(this);b=e.attr("id");e=e.attr("id").replace(/-button-reset$/,"");b=a("#"+b).data("default");a("#"+e).val(b);d.trigger("change")}));f.on("click",function(){});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&
6
- (a(document).on("click",".yith-plugin-fw .image-gallery-button",function(b){var e=a(this);b=e.closest(".image-gallery");var c=b.find(".image_gallery_ids"),k=c.val(),d=b.find("ul.slides-wrapper"),f=wp.media.frames.image_gallery=wp.media({title:e.data("choose"),button:{text:e.data("update")},states:[new wp.media.controller.Library({title:e.data("choose"),filterable:"all",multiple:!0})]});f.on("select",function(){f.state().get("selection").map(function(a){a=a.toJSON();a.id&&(k=k?k+","+a.id:a.id,d.append('<li class="image" data-attachment_id="'+
7
- a.id+'"><img src="'+a.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+e.data("delete")+'">x</a></li></ul></li>'))});c.val(k)});f.open()}),h.each(function(){var b=a(this);b.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style")},update:function(e,c){var k="";b.find("li.image").css("cursor",
8
- "default").each(function(){var b=a(this).attr("data-attachment_id");k=k+b+","});b.closest(".image-gallery").find(".image_gallery_ids").val(k)}})}),h.on("click","a.delete",function(){var b=a(this).closest(".image-gallery"),e=a(this).closest(".image-gallery ul.slides-wrapper");b=b.find(".image_gallery_ids");var c="";a(this).closest("li.image").remove();e.find("li.image").css("cursor","default").each(function(){var b=a(this).attr("data-attachment_id");c=c+b+","});b.val(c)}));g.each(function(){a(this).find("img").on("click",
9
- function(){var b=a(this).closest(".yith-plugin-fw-sidebar-layout"),e=b.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container");b=b.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container");var c=a(this).data("type");a(this).parent().children(":radio").attr("checked",!1);a(this).prev(":radio").attr("checked",!0);if("undefined"!=typeof c)switch(c){case "left":e.show();b.hide();break;case "right":b.show();e.hide();break;case "double":e.show();b.show();break;default:e.hide(),b.hide()}})});
10
- l.each(function(){var b=a(this).data("val"),e=a(this).data("min"),c=a(this).data("max"),d=a(this).data("step"),f=a(this).data("labels");a(this).slider({value:b,min:e,max:c,range:"min",step:d,create:function(){a(this).find(".ui-slider-handle").text(a(this).slider("value"))},slide:function(b,e){a(this).find("input").val(e.value);a(this).find(".ui-slider-handle").text(e.value);a(this).siblings(".feedback").find("strong").text(e.value+f)}})});m.each(function(b,e){var c=CodeMirror.fromTextArea(e,{lineNumbers:1,
11
- mode:"javascript",showCursorWhenSelecting:!0});a(e).data("codemirrorInstance",c)});a(document).on("click",".yith-plugin-fw-select-all",function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!0).trigger("change")});a(document).on("click",".yith-plugin-fw-deselect-all",function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!1).trigger("change")});n.each(function(){var b=a(this),e=b.find(".yit-icons-manager-icon-preview").first(),c=b.find(".yit-icons-manager-icon-text");
12
- b.on("click",".yit-icons-manager-list li",function(d){d=a(d.target).closest("li");var f=d.data("font"),k=d.data("icon"),h=d.data("key"),g=d.data("name");e.attr("data-font",f);e.attr("data-icon",k);e.attr("data-key",h);e.attr("data-name",g);c.val(f+":"+g);b.find(".yit-icons-manager-list li").removeClass("active");d.addClass("active")});b.on("click",".yit-icons-manager-action-set-default",function(){b.find(".yit-icons-manager-list li.default").trigger("click")})});a(document).on("click",".yith-plugin-fw-select-images__item",
13
- function(){var b=a(this),e=b.data("key"),c=b.closest(".yith-plugin-fw-select-images__wrapper"),d=c.find(".yith-plugin-fw-select-images__item");c=c.find("select").first();c.length&&(c.val(e),d.removeClass("yith-plugin-fw-select-images__item--selected"),b.addClass("yith-plugin-fw-select-images__item--selected"))});a(document.body).trigger("wc-enhanced-select-init");a(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",
14
- stop:function(b,c){var e=jQuery(".ui-sortable-handle"),d,f=[];for(d=0;d<e.length;d++)f[d]=a(e[d]).data("item_key");0<f.length&&a(this).closest(".toggle-element").saveToggleElement(null,f)}});a(document.body).trigger("yith-framework-enhanced-select-init")};r();a(document).on("click",".yith-plugin-fw-onoff-container span",function(){var b=a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");
15
- b.change()});a.fn.saveToggleElement=function(b,c){var d=a(this),f="yith_plugin_fw_save_toggle_element",h=d.serializeToggleElement(),g=d.find(".yith-toggle_wrapper"),l=g.attr("id"),m=a.urlParam("tab");h.append("security",g.data("nonce"));"undefined"!=typeof c&&0<c.length&&h.append("yith_toggle_elements_order_keys",c);d.closest(".metaboxes-tab.yith-plugin-ui").length?(f="yith_plugin_fw_save_toggle_element_metabox",post_id=a(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=a(this).closest("form#post").find("#yit_metaboxes_nonce").val(),
16
- url=yith_framework_fw_fields.ajax_url+"?action="+f+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+l):url=yith_framework_fw_fields.admin_url+"?action="+f+"&tab="+m+"&toggle_id="+l;a.ajax({type:"POST",url:url,data:h,contentType:!1,processData:!1,success:function(c){b&&b.removeClass("show");a(document).trigger("yith_save_toggle_element_done",[c,d])}})};a.fn.serializeToggleElement=function(){var b=a(this),c=new FormData;b=a(b).find(":input").serializeArray();a.each(b,function(a,
17
- b){el_name=b.name;c.append(b.name,b.value)});return c};a.fn.formatToggleTitle=function(){var b=a(this),c=b.find(":input"),d=b.find("span.title").data("title_format"),f=b.find(".subtitle").data("subtitle_format"),h=RegExp("[^%%]+(?=[%%])","g");if("undefined"!=typeof d)var g=d.match(h);if("undefined"!=typeof f)var l=f.match(h);a.each(c,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=
18
- a(c).val(),null!=g&&"undefined"!=typeof g&&-1!==g.indexOf($field_id)&&(d=d.replace("%%"+$field_id+"%%",$field_val)),null!=l&&"undefined"!=typeof l&&-1!==l.indexOf($field_id)&&(f=f.replace("%%"+$field_id+"%%",$field_val)))});""!==d&&b.find("span.title").html(d);""!==f&&b.find(".subtitle").html(f);a(document).trigger("yith-toggle-element-item-title",[b])};a.urlParam=function(a){a=(new RegExp("[?&]"+a+"=([^&#]*)")).exec(window.location.search);return null!==a?a[1]||0:!1};a(document).on("click",".yith-toggle-title",
19
- function(b){b=a(b.target);var c=b.closest(".yith-toggle-row"),d=c.find(".yith-toggle-content");if(b.hasClass("yith-plugin-fw-onoff")||b.hasClass("yith-icon-drag"))return!1;c.is(".yith-toggle-row-opened")?d.slideUp(400):d.slideDown(400);c.toggleClass("yith-toggle-row-opened")});a(document).on("click",".yith-add-box-button",function(b){b.preventDefault();b=a(this);var c=b.data("box_id"),d=b.data("closed_label"),f=b.data("opened_label"),h=b.closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+
20
- h);""!==c&&(a("#"+c).html(template({index:"box_id"})).slideToggle(),""!==d&&(b.html()===d?b.html(f).removeClass("closed"):b.html(d).addClass("closed")),r(),a(document).trigger("yith-add-box-button-toggle",[b]))});a(document).on("click",".yith-add-box-buttons .yith-save-button",function(b){b.preventDefault();var c=a(this).parents(".yith-add-box"),d=a(this).closest(".yith-toggle_wrapper").attr("id");b=c.find(".spinner");var f=a(this).parents(".toggle-element"),h=c.find(":input"),g=f.find(".yith-toggle-row").length,
21
- l=a('<input type="hidden">');l.val(g);a(document).trigger("yith-toggle-change-counter",[l,c]);g=l.val();d=wp.template("yith-toggle-element-item-"+d);var m=a(d({index:g}));b.addClass("show");a.each(h,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_val=a(c).val(),"radio"==a(c).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+
22
- g,a(c).is(":checked")&&a(m).find("#"+$field_id).prop("checked",!0),(a(c).hasClass("yith-post-search")||a(c).hasClass("yith-term-search"))&&a(m).find("#"+$field_id).html(a("#"+a(c).attr("id")).html()),a(m).find("#"+$field_id).val($field_val))});a(m).formatToggleTitle();var n=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-add",[c,m,n]);setTimeout(function(){"yes"===n.val()&&(a(f).find(".yith-toggle-elements").append(m),a(c).find(".yith-plugin-fw-datepicker").datepicker("destroy"),
23
- a(c).html(""),a(c).prev(".yith-add-box-button").trigger("click"),f.saveToggleElement(),setTimeout(function(){a(f).find(".highlight").removeClass("highlight")},2E3),r())},1E3)});a(document).on("click",".yith-toggle-row .yith-save-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");var c=a(this).closest(".yith-toggle-row"),d=c.find(".spinner");c.formatToggleTitle();var f=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-update",[b,c,f]);
24
- "yes"===f.val()&&(d.addClass("show"),b.saveToggleElement(d))});a(document).on("click",".yith-toggle-row .yith-delete-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");a(this).closest(".yith-toggle-row").remove();b.saveToggleElement()});a(document).on("click",".yith-toggle-onoff",function(b){b.preventDefault();a(this).closest(".toggle-element").saveToggleElement()});a(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){a(this).closest(".yith-plugin-fw-radio").val(a(this).val()).trigger("change")});
25
- a(document).on("click",".yith-password-eye",function(){var b=a(this),c=a(this).closest(".yith-password-wrapper").find("input");"password"===c.attr("type")?(c.attr("type","text"),b.addClass("yith-password-eye-closed")):(c.attr("type","password"),b.removeClass("yith-password-eye-closed"))});a(".yith-plugin-fw-radio").each(function(){a(this).val(a(this).attr("value"))})});
 
 
 
 
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var g=a[e];if(b.call(c,g,e,a))return{i:e,v:g}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
2
+ $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
3
+ $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
4
+ (function(a){a(document).on("yith_fields_init",function(){var b=a(".yith-plugin-fw-datepicker"),c=a(".yith-plugin-fw-colorpicker"),d=a(".yith-plugin-fw-upload-img-url"),e=a(".add_media"),g=a(".yith-plugin-fw .image-gallery ul.slides-wrapper"),h=a(".yith-plugin-fw-sidebar-layout"),k=a(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),l=a(".codemirror"),m=a(".yit-icons-manager-wrapper");a(".yith-plugin-ui td.forminp-checkbox");b.each(function(){var b=a(this).data();b.showAnim=
5
+ !1;b.beforeShow=function(a,b){b.dpDiv.addClass("yith-plugin-fw-datepicker-div")};b.onClose=function(a,b){b.dpDiv.removeClass("yith-plugin-fw-datepicker-div")};a(this).datepicker(b)});c.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var b=a(this);b.val(b.data("default-color"));b.change()}});c.each(function(){var b=a(this).data("variations-label"),f=a(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),c=a(this).closest(".yith-single-colorpicker"),d=f.find(".wp-picker-input-wrap"),
6
+ e=c.find(".wp-picker-input-wrap");d.length&&f.find("a.wp-color-result").attr("title",b);c.length&&c.find("a.wp-color-result").attr("title",b);d.find(".wp-picker-clear-custom").length||(b=a("<span/>").attr({class:"wp-picker-default-custom"}),d.find(".wp-picker-default").wrap(b));e.find(".wp-picker-clear-custom").length||(b=a("<span/>").attr({class:"wp-picker-default-custom"}),e.find(".wp-picker-default").wrap(b))});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&(d.change(function(){var b=
7
+ a(this).val(),f=a(this).parent().find(".yith-plugin-fw-upload-img-preview").first();1>f.length&&(f=a(this).parent().parent().find(".yith-plugin-fw-upload-img-preview").first());/(http|ftp|https):\/\/[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico)/.test(b)?f.html('<img src="'+b+'" style="max-width:100px; max-height:100px;" />'):f.html("")}).trigger("change"),a(document).on("click",".yith-plugin-fw-upload-button",function(b){b.preventDefault();var f=a(this).attr("id").replace(/-button$/,"");if(!c){b=
8
+ [new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];var c=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:b});c.on("select",function(){var b=c.state().get("selection").first().toJSON();a("#"+f).val(b.url);a("#"+f+"-yith-attachment-id")&&a("#"+f+"-yith-attachment-id").val(b.id);d.trigger("change")})}c.open()}),a(document).on("click",".yith-plugin-fw-upload-button-reset",
9
+ function(b){var f=a(this);b=f.attr("id");f=f.attr("id").replace(/-button-reset$/,"");b=a("#"+b).data("default");a("#"+f).val(b);d.trigger("change")}));e.on("click",function(){});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&(a(document).on("click",".yith-plugin-fw .image-gallery-button",function(b){var f=a(this);b=f.closest(".image-gallery");var c=b.find(".image_gallery_ids"),d=c.val(),e=b.find("ul.slides-wrapper"),n=wp.media.frames.image_gallery=wp.media({title:f.data("choose"),button:{text:f.data("update")},
10
+ states:[new wp.media.controller.Library({title:f.data("choose"),filterable:"all",multiple:!0})]});n.on("select",function(){n.state().get("selection").map(function(a){a=a.toJSON();a.id&&(d=d?d+","+a.id:a.id,e.append('<li class="image" data-attachment_id="'+a.id+'"><img src="'+a.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+f.data("delete")+'">x</a></li></ul></li>'))});c.val(d)});n.open()}),g.each(function(){var b=a(this);b.sortable({items:"li.image",cursor:"move",
11
+ scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style")},update:function(c,d){var f="";b.find("li.image").css("cursor","default").each(function(){var b=a(this).attr("data-attachment_id");f=f+b+","});b.closest(".image-gallery").find(".image_gallery_ids").val(f)}})}),g.on("click","a.delete",function(){var b=a(this).closest(".image-gallery"),c=a(this).closest(".image-gallery ul.slides-wrapper");
12
+ b=b.find(".image_gallery_ids");var d="";a(this).closest("li.image").remove();c.find("li.image").css("cursor","default").each(function(){var b=a(this).attr("data-attachment_id");d=d+b+","});b.val(d)}));h.each(function(){a(this).find("img").on("click",function(){var b=a(this).closest(".yith-plugin-fw-sidebar-layout"),c=b.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container");b=b.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container");var d=a(this).data("type");a(this).parent().children(":radio").attr("checked",
13
+ !1);a(this).prev(":radio").attr("checked",!0);if("undefined"!=typeof d)switch(d){case "left":c.show();b.hide();break;case "right":b.show();c.hide();break;case "double":c.show();b.show();break;default:c.hide(),b.hide()}})});k.each(function(){var b=a(this).data("val"),c=a(this).data("min"),d=a(this).data("max"),e=a(this).data("step"),g=a(this).data("labels");a(this).slider({value:b,min:c,max:d,range:"min",step:e,create:function(){a(this).find(".ui-slider-handle").text(a(this).slider("value"))},slide:function(b,
14
+ c){a(this).find("input").val(c.value);a(this).find(".ui-slider-handle").text(c.value);a(this).siblings(".feedback").find("strong").text(c.value+g)}})});l.each(function(b,c){b=CodeMirror.fromTextArea(c,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});a(c).data("codemirrorInstance",b)});a(document).on("click",".yith-plugin-fw-select-all",function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!0).trigger("change")});a(document).on("click",".yith-plugin-fw-deselect-all",
15
+ function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!1).trigger("change")});m.each(function(){var b=a(this),c=b.find(".yit-icons-manager-icon-preview").first(),d=b.find(".yit-icons-manager-icon-text");b.on("click",".yit-icons-manager-list li",function(e){e=a(e.target).closest("li");var f=e.data("font"),g=e.data("icon"),h=e.data("key"),k=e.data("name");c.attr("data-font",f);c.attr("data-icon",g);c.attr("data-key",h);c.attr("data-name",k);d.val(f+":"+k);b.find(".yit-icons-manager-list li").removeClass("active");
16
+ e.addClass("active")});b.on("click",".yit-icons-manager-action-set-default",function(){b.find(".yit-icons-manager-list li.default").trigger("click")})});a(document).on("click",".yith-plugin-fw-select-images__item",function(){var b=a(this),c=b.data("key"),d=b.closest(".yith-plugin-fw-select-images__wrapper"),e=d.find(".yith-plugin-fw-select-images__item");d=d.find("select").first();d.length&&(d.val(c),e.removeClass("yith-plugin-fw-select-images__item--selected"),b.addClass("yith-plugin-fw-select-images__item--selected"))});
17
+ a(document.body).trigger("wc-enhanced-select-init");a(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(b,c){b=jQuery(".ui-sortable-handle");var d=[];for(c=0;c<b.length;c++)d[c]=a(b[c]).data("item_key");0<d.length&&a(this).closest(".toggle-element").saveToggleElement(null,d)}});a(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init");a(document).on("click",
18
+ ".yith-plugin-fw-onoff-container span",function(){var b=a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});a.fn.saveToggleElement=function(b,c){var d=a(this),e="yith_plugin_fw_save_toggle_element",g=d.serializeToggleElement(),h=d.find(".yith-toggle_wrapper"),k=h.attr("id"),l=a.urlParam("tab");g.append("security",h.data("nonce"));"undefined"!=typeof c&&0<c.length&&
19
+ g.append("yith_toggle_elements_order_keys",c);d.closest(".metaboxes-tab.yith-plugin-ui").length?(e="yith_plugin_fw_save_toggle_element_metabox",post_id=a(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=a(this).closest("form#post").find("#yit_metaboxes_nonce").val(),url=yith_framework_fw_fields.ajax_url+"?action="+e+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+k):url=yith_framework_fw_fields.admin_url+"?action="+e+"&tab="+l+"&toggle_id="+k;a.ajax({type:"POST",
20
+ url:url,data:g,contentType:!1,processData:!1,success:function(c){b&&b.removeClass("show");a(document).trigger("yith_save_toggle_element_done",[c,d])}})};a.fn.serializeToggleElement=function(){var b=a(this),c=new FormData;b=a(b).find(":input").serializeArray();a.each(b,function(a,b){el_name=b.name;c.append(b.name,b.value)});return c};a.fn.formatToggleTitle=function(){var b=a(this),c=b.find(":input"),d=b.find("span.title").data("title_format"),e=b.find(".subtitle").data("subtitle_format"),g=/[^%%]+(?=[%%])/g;
21
+ if("undefined"!=typeof d)var h=d.match(g);if("undefined"!=typeof e)var k=e.match(g);a.each(c,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=a(c).val(),null!=h&&"undefined"!=typeof h&&-1!==h.indexOf($field_id)&&(d=d.replace("%%"+$field_id+"%%",$field_val)),null!=k&&"undefined"!=typeof k&&-1!==k.indexOf($field_id)&&(e=e.replace("%%"+$field_id+"%%",$field_val)))});""!==d&&b.find("span.title").html(d);
22
+ ""!==e&&b.find(".subtitle").html(e);a(document).trigger("yith-toggle-element-item-title",[b])};a.urlParam=function(a){a=(new RegExp("[?&]"+a+"=([^&#]*)")).exec(window.location.search);return null!==a?a[1]||0:!1};a(document).on("click",".yith-toggle-title",function(b){b=a(b.target);var c=b.closest(".yith-toggle-row"),d=c.find(".yith-toggle-content");if(b.hasClass("yith-plugin-fw-onoff")||b.hasClass("yith-icon-drag"))return!1;c.is(".yith-toggle-row-opened")?d.slideUp(400):d.slideDown(400);c.toggleClass("yith-toggle-row-opened")});
23
+ a(document).on("click",".yith-add-box-button",function(b){b.preventDefault();b=a(this);var c=b.data("box_id"),d=b.data("closed_label"),e=b.data("opened_label"),g=b.closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+g);""!==c&&(a("#"+c).html(template({index:"box_id"})).slideToggle(),""!==d&&(b.html()===d?b.html(e).removeClass("closed"):b.html(d).addClass("closed")),a(document).trigger("yith_fields_init"),a(document).trigger("yith-add-box-button-toggle",
24
+ [b]))});a(document).on("click",".yith-add-box-buttons .yith-save-button",function(b){b.preventDefault();var c=a(this).parents(".yith-add-box"),d=a(this).closest(".yith-toggle_wrapper").attr("id");b=c.find(".spinner");var e=a(this).parents(".toggle-element"),g=c.find(":input"),h=e.find(".yith-toggle-row").length,k=a('<input type="hidden">');k.val(h);a(document).trigger("yith-toggle-change-counter",[k,c]);h=k.val();d=wp.template("yith-toggle-element-item-"+d);var l=a(d({index:h}));b.addClass("show");
25
+ a.each(g,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_val=a(c).val(),"radio"==a(c).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+h,a(c).is(":checked")&&a(l).find("#"+$field_id).prop("checked",!0),(a(c).hasClass("yith-post-search")||a(c).hasClass("yith-term-search"))&&a(l).find("#"+$field_id).html(a("#"+a(c).attr("id")).html()),
26
+ a(l).find("#"+$field_id).val($field_val))});a(l).formatToggleTitle();var m=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-add",[c,l,m]);setTimeout(function(){"yes"===m.val()&&(a(e).find(".yith-toggle-elements").append(l),a(c).find(".yith-plugin-fw-datepicker").datepicker("destroy"),a(c).html(""),a(c).prev(".yith-add-box-button").trigger("click"),e.saveToggleElement(),setTimeout(function(){a(e).find(".highlight").removeClass("highlight")},2E3),a(document).trigger("yith_fields_init"))},
27
+ 1E3)});a(document).on("click",".yith-toggle-row .yith-save-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");var c=a(this).closest(".yith-toggle-row"),d=c.find(".spinner");c.formatToggleTitle();var e=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-update",[b,c,e]);"yes"===e.val()&&(d.addClass("show"),b.saveToggleElement(d))});a(document).on("click",".yith-toggle-row .yith-delete-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");
28
+ a(this).closest(".yith-toggle-row").remove();b.saveToggleElement()});a(document).on("click",".yith-toggle-onoff",function(b){b.preventDefault();a(this).closest(".toggle-element").saveToggleElement()});a(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){a(this).closest(".yith-plugin-fw-radio").val(a(this).val()).trigger("change")});a(document).on("click",".yith-password-eye",function(){var b=a(this),c=a(this).closest(".yith-password-wrapper").find("input");"password"===c.attr("type")?
29
+ (c.attr("type","text"),b.addClass("yith-password-eye-closed")):(c.attr("type","password"),b.removeClass("yith-password-eye-closed"))});a(document.body).on("yith-plugin-fw-init-radio",function(){a(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){a(this).val(a(this).attr("value"));a(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio");a(document).on("select2:open",function(b){a(b.target).closest(".yith-plugin-ui").length&&a(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")})})(jQuery);
plugin-fw/assets/js/yith-gutenberg.min.js CHANGED
@@ -3,4 +3,4 @@ method:"post",data:{action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:b},
3
  r=wp.editor.InspectorControls,n=wp.element.RawHTML,t=wp.components.SelectControl,u=wp.components.ToggleControl,v=wp.components.CheckboxControl,w=wp.components.RangeControl,x=wp.components.ColorPicker,y=wp.components.RadioControl,z=wp.components.TextControl,A=wp.components.TextareaControl,B=h("svg",{width:22,height:22},h("path",{d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));
4
  f.each(yith_gutenberg,function(e,a){q("yith/"+e,{title:a.title,description:a.description,category:a.category,attributes:a.attributes,icon:"undefined"!=typeof a.icon?a.icon:B,keywords:a.keywords,edit:function(d){var g=[];f.each(a.attributes,function(a,c){var b=null,e=c.blocktype;if("undefined"!=typeof e){switch(e){case "select":b=t;break;case "text":b=z;break;case "textarea":b=A;break;case "toggle":b=u;break;case "checkbox":b=v;break;case "number":case "range":b=w;break;case "color":case "colorpicker":b=
5
  x;break;case "radio":b=y}if(null!=b){var f=helpMessageUncheked="";"undefined"!=typeof c.helps&&"undefined"!=typeof c.helps.checked&&"undefined"!=typeof c.helps.unchecked?(f=c.helps.checked,helpMessageUncheked=c.helps.unchecked):"undefined"!=typeof c.help&&(f=helpMessageUncheked=c.help);g.push(h(b,{value:d.attributes[a],options:c.options,label:c.label,checked:d.attributes[a],selected:d.attributes[a],help:d.attributes[a]?f:helpMessageUncheked,disableAlpha:c.disableAlpha,min:c.min,max:c.max,multiple:c.multiple,
6
- onChange:function(b,c){c=void 0===c?a:c;d=m(b,c,d,e)},onChangeComplete:function(c,b){b=void 0===b?a:b;d=m(c,b,d,e)}}))}}});sc=k(d,a,"edit");return[h(p,null,h(r,null,g),sc)]},save:function(d){return k(d,a,"save")}})})})(jQuery);
3
  r=wp.editor.InspectorControls,n=wp.element.RawHTML,t=wp.components.SelectControl,u=wp.components.ToggleControl,v=wp.components.CheckboxControl,w=wp.components.RangeControl,x=wp.components.ColorPicker,y=wp.components.RadioControl,z=wp.components.TextControl,A=wp.components.TextareaControl,B=h("svg",{width:22,height:22},h("path",{d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));
4
  f.each(yith_gutenberg,function(e,a){q("yith/"+e,{title:a.title,description:a.description,category:a.category,attributes:a.attributes,icon:"undefined"!=typeof a.icon?a.icon:B,keywords:a.keywords,edit:function(d){var g=[];f.each(a.attributes,function(a,c){var b=null,e=c.blocktype;if("undefined"!=typeof e){switch(e){case "select":b=t;break;case "text":b=z;break;case "textarea":b=A;break;case "toggle":b=u;break;case "checkbox":b=v;break;case "number":case "range":b=w;break;case "color":case "colorpicker":b=
5
  x;break;case "radio":b=y}if(null!=b){var f=helpMessageUncheked="";"undefined"!=typeof c.helps&&"undefined"!=typeof c.helps.checked&&"undefined"!=typeof c.helps.unchecked?(f=c.helps.checked,helpMessageUncheked=c.helps.unchecked):"undefined"!=typeof c.help&&(f=helpMessageUncheked=c.help);g.push(h(b,{value:d.attributes[a],options:c.options,label:c.label,checked:d.attributes[a],selected:d.attributes[a],help:d.attributes[a]?f:helpMessageUncheked,disableAlpha:c.disableAlpha,min:c.min,max:c.max,multiple:c.multiple,
6
+ onChange:function(b,c){c=void 0===c?a:c;d=m(b,c,d,e)},onChangeComplete:function(c,b){b=void 0===b?a:b;d=m(c,b,d,e)}}))}}});sc=k(d,a,"edit");return[h(p,null,h(r,null,g),sc)]},save:function(d){return k(d,a,"save")}})})})(jQuery);
plugin-fw/assets/js/yith-promo.min.js CHANGED
@@ -1 +1 @@
1
- (function(c){c(document).on("click",".notice-dismiss",function(){var a=c(this).parent("div.yith-notice-is-dismissible"),b=a.attr("id");"undefined"!=typeof b&&(b="hide_"+b,a=a.data("expiry"),a=new Date(a),a.setUTCHours(23),a.setUTCMinutes(59),a.setUTCSeconds(59),document.cookie=b+"=yes;expires="+a.toUTCString()+";path=/")})})(jQuery);
1
+ (function(c){c(document).on("click",".notice-dismiss",function(){var a=c(this).parent("div.yith-notice-is-dismissible"),b=a.attr("id");"undefined"!=typeof b&&(b="hide_"+b,a=a.data("expiry"),a=new Date(a),a.setUTCHours(23),a.setUTCMinutes(59),a.setUTCSeconds(59),document.cookie=b+"=yes;expires="+a.toUTCString()+";path=/")})})(jQuery);
plugin-fw/assets/js/yith-system-info.min.js CHANGED
@@ -1,13 +1 @@
1
- (function ($) {
2
- $(document).on('click', '.notice-dismiss', function () {
3
- var t = $(this),
4
- wrapper_id = t.parent().attr('id');
5
-
6
- if (wrapper_id === 'yith-system-alert') {
7
- var cname = 'hide_yith_system_alert',
8
- cvalue = 'yes';
9
-
10
- document.cookie = cname + "=" + cvalue + ";path=/";
11
- }
12
- });
13
- })(jQuery);
1
+ (function(a){a(document).on("click",".notice-dismiss",function(){"yith-system-alert"===a(this).parent().attr("id")&&(document.cookie="hide_yith_system_alert=yes;path=/")})})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/assets/js/yith-update-plugins.min.js CHANGED
@@ -1,2 +1,2 @@
1
  (function(b){b(document).on("click","a.yith-update-link",function(e){var a=b(this),c=a.parent("p");e.preventDefault();b.ajax({type:"POST",url:yith_plugin_fw.ajaxurl,data:{action:"update-plugin",plugin:a.data("plugin"),slug:a.data("slug"),name:a.data("name"),_ajax_nonce:yith_plugin_fw.ajax_nonce},beforeSend:function(){c.text(yith_plugin_fw.l10n.updating.replace("%s",a.data("name")));c.addClass("yith-updating")},success:function(b){c.removeClass("yith-updating").addClass("yith-updated");var d=c.parent("div");
2
- d.removeClass("notice-warning");result_text="";!0===b.success?(d.addClass("notice-success updated-message").removeClass("update-message"),result_text=yith_plugin_fw.l10n.updated):(d.addClass("notice-error"),result_text=yith_plugin_fw.l10n.failed);c.text(result_text.replace("%s",a.data("name")))}})})})(jQuery);
1
  (function(b){b(document).on("click","a.yith-update-link",function(e){var a=b(this),c=a.parent("p");e.preventDefault();b.ajax({type:"POST",url:yith_plugin_fw.ajaxurl,data:{action:"update-plugin",plugin:a.data("plugin"),slug:a.data("slug"),name:a.data("name"),_ajax_nonce:yith_plugin_fw.ajax_nonce},beforeSend:function(){c.text(yith_plugin_fw.l10n.updating.replace("%s",a.data("name")));c.addClass("yith-updating")},success:function(b){c.removeClass("yith-updating").addClass("yith-updated");var d=c.parent("div");
2
+ d.removeClass("notice-warning");result_text="";!0===b.success?(d.addClass("notice-success updated-message").removeClass("update-message"),result_text=yith_plugin_fw.l10n.updated):(d.addClass("notice-error"),result_text=yith_plugin_fw.l10n.failed);c.text(result_text.replace("%s",a.data("name")))}})})})(jQuery);
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.3.15
5
  * Author: YITHEMES
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
- * @version 3.3.11
11
  */
12
  /**
13
  * This file belongs to the YIT Plugin Framework.
@@ -55,12 +55,6 @@ if ( ! function_exists ( 'yit_maybe_plugin_fw_loader' ) ) {
55
  $plugin_fw_data = array ( $framework_data[ 'Version' ] => $plugin_fw_main_file );
56
  }
57
 
58
- if ( ! defined( 'YITH_PLUGIN_FW_VERSION' ) ) {
59
- $keys = array_keys( $plugin_fw_data );
60
- $version = empty( $plugin_fw_data ) ? '1.0.0' : array_pop( $keys );
61
- define( 'YITH_PLUGIN_FW_VERSION', $version );
62
- }
63
-
64
  //Check for license & upgrade classes
65
  $upgrade_fw_init_file = $plugin_path . 'plugin-upgrade/init.php';
66
  $framework_data = file_exists( $upgrade_fw_init_file ) ? get_file_data( $upgrade_fw_init_file, $default_headers ) : $framework_data;
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.4.3
5
  * Author: YITHEMES
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
+ * @version 3.4.0
11
  */
12
  /**
13
  * This file belongs to the YIT Plugin Framework.
55
  $plugin_fw_data = array ( $framework_data[ 'Version' ] => $plugin_fw_main_file );
56
  }
57
 
 
 
 
 
 
 
58
  //Check for license & upgrade classes
59
  $upgrade_fw_init_file = $plugin_path . 'plugin-upgrade/init.php';
60
  $framework_data = file_exists( $upgrade_fw_init_file ) ? get_file_data( $upgrade_fw_init_file, $default_headers ) : $framework_data;
plugin-fw/lib/promo/yith-promo.php CHANGED
@@ -18,10 +18,25 @@ add_action( 'admin_enqueue_scripts', 'yith_plugin_fw_notice_dismiss', 20 );
18
 
19
  if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
20
  function yith_plugin_fw_promo_notices(){
21
- if( function_exists( 'current_user_can' ) && ! current_user_can( 'administrator' ) ){
 
 
 
 
 
 
 
 
 
 
 
22
  return false;
23
  }
24
 
 
 
 
 
25
  $base_url = apply_filters( 'yith_plugin_fw_promo_base_url', YIT_CORE_PLUGIN_URL . '/lib/promo/' );
26
  $xml = apply_filters( 'yith_plugin_fw_promo_xml_url', YIT_CORE_PLUGIN_PATH . '/lib/promo/yith-promo.xml' );
27
  $transient = "yith_promo_message";
@@ -196,9 +211,10 @@ if( ! function_exists( 'yith_plugin_fw_get_promo_transient_expiry_date' ) ){
196
 
197
  if( ! function_exists( 'yith_plugin_fw_regenerate_transient' ) ){
198
  function yith_plugin_fw_regenerate_transient(){
199
- if( false === get_option( 'yith_plugin_fw_promo_2019', false ) ){
 
200
  delete_site_transient( 'yith_promo_message' );
201
- update_option( 'yith_plugin_fw_promo_2019', true );
202
  }
203
  }
204
  }
18
 
19
  if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
20
  function yith_plugin_fw_promo_notices(){
21
+ global $pagenow;
22
+ $not_administrator = function_exists( 'current_user_can' ) && ! current_user_can( 'administrator' );
23
+ $is_dashboard = 'index.php' == $pagenow;
24
+ $is_wc_pages = '';
25
+ $is_plugin_page = 'plugins.php' == $pagenow || 'plugin-install.php' == $pagenow && 'plugin-editor.php' == $pagenow;
26
+ $wc_post_types = array( 'shop_order', 'shop_coupon', );
27
+ $is_wc_post_types = isset( $_GET['post_type'] ) && in_array( $_GET['post_type'], $wc_post_types );
28
+ $wc_pages = array( 'wc-reports', 'wc-settings', 'wc-status', 'wc-addons' );
29
+ $is_wc_pages = isset( $_GET['page'] ) && in_array( $_GET['page'], $wc_pages );
30
+ $is_yith_page = isset( $_GET['page'] ) && false !== strstr( $_GET['page'], 'yith' ) ;
31
+
32
+ if( $not_administrator ){
33
  return false;
34
  }
35
 
36
+ if( ! $is_plugin_page && ! $is_wc_pages && ! $is_wc_post_types && ! $is_yith_page ){
37
+ return false;
38
+ }
39
+
40
  $base_url = apply_filters( 'yith_plugin_fw_promo_base_url', YIT_CORE_PLUGIN_URL . '/lib/promo/' );
41
  $xml = apply_filters( 'yith_plugin_fw_promo_xml_url', YIT_CORE_PLUGIN_PATH . '/lib/promo/yith-promo.xml' );
42
  $transient = "yith_promo_message";
211
 
212
  if( ! function_exists( 'yith_plugin_fw_regenerate_transient' ) ){
213
  function yith_plugin_fw_regenerate_transient(){
214
+ if( false === get_option( 'yith_plugin_fw_promo_2019_bis', false ) ){
215
+ delete_option( 'yith_plugin_fw_promo_2019' );
216
  delete_site_transient( 'yith_promo_message' );
217
+ update_option( 'yith_plugin_fw_promo_2019_bis', true );
218
  }
219
  }
220
  }
plugin-fw/lib/promo/yith-promo.xml CHANGED
@@ -4,50 +4,11 @@
4
 
5
  <promotions>
6
  <expiry_date>2019-12-10</expiry_date>
7
- <promo>
8
- <promo_id>yithhalloween2019</promo_id>
9
- <banner>halloween.jpg</banner>
10
- <title><![CDATA[<strong>YITH Halloween</strong>]]></title>
11
- <description><![CDATA[
12
- Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid only on <strong>31st October</strong>.
13
- ]]></description>
14
- <link>
15
- <label>Get your deals now!</label>
16
- <url><![CDATA[https://yithemes.com]]></url>
17
- </link>
18
- <style>
19
- <image_bg_color>#005c7d</image_bg_color>
20
- <border_color>#ea5105</border_color>
21
- <background_color>#ffffff</background_color>
22
- </style>
23
- <start_date>2019-10-30 16:00:00</start_date>
24
- <end_date>2019-11-01 08:00:00</end_date>
25
- </promo>
26
- <promo>
27
- <promo_id>yithcybermonday2019</promo_id>
28
- <banner>cyber.jpg</banner>
29
- <title><![CDATA[<strong>YITH Cyber Monday</strong>]]></title>
30
- <description><![CDATA[
31
- Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid from <strong>1st December</strong> to <strong>2nd December</strong>.
32
- ]]></description>
33
- <link>
34
- <label>Get your deals now!</label>
35
- <url><![CDATA[https://yithemes.com]]></url>
36
- </link>
37
- <style>
38
- <image_bg_color>#12fdd4</image_bg_color>
39
- <border_color>#181d7b</border_color>
40
- <background_color>#ffffff</background_color>
41
- </style>
42
- <start_date>2019-12-01 00:00:00</start_date>
43
- <end_date>2019-12-03 08:00:00</end_date>
44
- </promo>
45
  <promo>
46
  <promo_id>yithblackfriday2019</promo_id>
47
- <banner>black.jpg</banner>
48
  <title><![CDATA[<strong>YITH Black Friday</strong>]]></title>
49
  <description><![CDATA[
50
- Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid from <strong>28th November</strong> to <strong>30th November</strong>.
51
  ]]></description>
52
  <link>
53
  <label>Get your deals now!</label>
@@ -59,6 +20,6 @@
59
  <background_color>#ffffff</background_color>
60
  </style>
61
  <start_date>2019-11-27 23:59:59</start_date>
62
- <end_date>2019-11-30 23:59:59</end_date>
63
  </promo>
64
  </promotions>
4
 
5
  <promotions>
6
  <expiry_date>2019-12-10</expiry_date>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  <promo>
8
  <promo_id>yithblackfriday2019</promo_id>
 
9
  <title><![CDATA[<strong>YITH Black Friday</strong>]]></title>
10
  <description><![CDATA[
11
+ Don't miss our <strong>30% discount</strong> on all our products! No coupon needed in cart. Valid from <strong>28th November</strong> to <strong>2nd December</strong>.
12
  ]]></description>
13
  <link>
14
  <label>Get your deals now!</label>
20
  <background_color>#ffffff</background_color>
21
  </style>
22
  <start_date>2019-11-27 23:59:59</start_date>
23
+ <end_date>2019-12-03 08:00:00</end_date>
24
  </promo>
25
  </promotions>
plugin-fw/lib/yit-assets.php CHANGED
@@ -37,7 +37,7 @@ if ( !class_exists( 'YIT_Assets' ) ) {
37
  * @author Leanza Francesco <leanzafrancesco@gmail.com>
38
  */
39
  private function __construct() {
40
- defined( 'YITH_PLUGIN_FW_VERSION' ) && $this->version = YITH_PLUGIN_FW_VERSION;
41
  add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_and_scripts' ) );
42
  }
43
 
@@ -51,15 +51,15 @@ if ( !class_exists( 'YIT_Assets' ) ) {
51
 
52
  //scripts
53
  wp_register_script( 'yith-colorpicker', YIT_CORE_PLUGIN_URL . '/assets/js/yith-colorpicker.min.js', array( 'jquery', 'wp-color-picker' ), $this->version, true );
 
54
 
55
- wp_register_script( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/js/yith-fields' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'yith-colorpicker', 'codemirror', 'codemirror-javascript', 'jquery-ui-slider', 'jquery-ui-sortable' ), $this->version, true );
56
-
57
- wp_register_script( 'yit-metabox', YIT_CORE_PLUGIN_URL . '/assets/js/metabox' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'yith-plugin-fw-fields' ), $this->version, true );
58
  wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'jquery-ui-sortable', 'yith-plugin-fw-fields' ), $this->version, true );
59
- wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), $this->version, true );
60
- wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), $this->version, true );
61
  wp_register_script( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/js/jquery.colorbox' . $suffix . '.js', array( 'jquery' ), '1.6.3', true );
62
  wp_register_script( 'yith_how_to', YIT_CORE_PLUGIN_URL . '/assets/js/how-to' . $suffix . '.js', array( 'jquery' ), $this->version, true );
 
63
 
64
  //styles
65
  $jquery_version = isset( $wp_scripts->registered[ 'jquery-ui-core' ]->ver ) ? $wp_scripts->registered[ 'jquery-ui-core' ]->ver : '1.9.2';
@@ -83,7 +83,7 @@ if ( !class_exists( 'YIT_Assets' ) ) {
83
  wp_register_style( 'yith-select2-no-wc', YIT_CORE_PLUGIN_URL . '/assets/css/yith-select2-no-wc.css', false, $this->version );
84
  }
85
 
86
- wp_register_script( 'yith-enhanced-select', YIT_CORE_PLUGIN_URL . '/assets/js/yith-enhanced-select' . $wc_version_suffix . $suffix . '.js', array( 'jquery', 'select2' ), '1.0.0', true );
87
  wp_localize_script( 'yith-enhanced-select', 'yith_framework_enhanced_select_params', array(
88
  'ajax_url' => admin_url( 'admin-ajax.php' ),
89
  'search_posts_nonce' => wp_create_nonce( 'search-posts' ),
37
  * @author Leanza Francesco <leanzafrancesco@gmail.com>
38
  */
39
  private function __construct() {
40
+ $this->version = yith_plugin_fw_get_version();
41
  add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_and_scripts' ) );
42
  }
43
 
51
 
52
  //scripts
53
  wp_register_script( 'yith-colorpicker', YIT_CORE_PLUGIN_URL . '/assets/js/yith-colorpicker.min.js', array( 'jquery', 'wp-color-picker' ), $this->version, true );
54
+ wp_register_script( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/js/yith-fields' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'yith-colorpicker', 'codemirror', 'codemirror-javascript', 'jquery-ui-slider', 'jquery-ui-sortable' ), $this->version, true );
55
 
56
+ wp_register_script( 'yit-metabox', YIT_CORE_PLUGIN_URL . '/assets/js/metabox' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'yith-plugin-fw-fields' ), $this->version, true );
 
 
57
  wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'jquery-ui-sortable', 'yith-plugin-fw-fields' ), $this->version, true );
58
+ wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), '3.15', true );
59
+ wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), '3.15', true );
60
  wp_register_script( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/js/jquery.colorbox' . $suffix . '.js', array( 'jquery' ), '1.6.3', true );
61
  wp_register_script( 'yith_how_to', YIT_CORE_PLUGIN_URL . '/assets/js/how-to' . $suffix . '.js', array( 'jquery' ), $this->version, true );
62
+ wp_register_script( 'yith-plugin-fw-wp-pages', YIT_CORE_PLUGIN_URL . '/assets/js/wp-pages' . $suffix . '.js', array( 'jquery' ), $this->version, false );
63
 
64
  //styles
65
  $jquery_version = isset( $wp_scripts->registered[ 'jquery-ui-core' ]->ver ) ? $wp_scripts->registered[ 'jquery-ui-core' ]->ver : '1.9.2';
83
  wp_register_style( 'yith-select2-no-wc', YIT_CORE_PLUGIN_URL . '/assets/css/yith-select2-no-wc.css', false, $this->version );
84
  }
85
 
86
+ wp_register_script( 'yith-enhanced-select', YIT_CORE_PLUGIN_URL . '/assets/js/yith-enhanced-select' . $wc_version_suffix . $suffix . '.js', array( 'jquery', 'select2' ), $this->version, true );
87
  wp_localize_script( 'yith-enhanced-select', 'yith_framework_enhanced_select_params', array(
88
  'ajax_url' => admin_url( 'admin-ajax.php' ),
89
  'search_posts_nonce' => wp_create_nonce( 'search-posts' ),
plugin-fw/lib/yit-metabox.php CHANGED
@@ -1,7 +1,6 @@
1
  <?php
2
  /**
3
  * This file belongs to the YIT Framework.
4
- *
5
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
  * that is bundled with this package in the file LICENSE.txt.
7
  * It is also available through the world-wide-web at this URL:
@@ -16,7 +15,6 @@ if ( !defined( 'ABSPATH' ) ) {
16
  if ( !class_exists( 'YIT_Metabox' ) ) {
17
  /**
18
  * YIT Metabox
19
- *
20
  * the metabox can be created using this code
21
  * <code>
22
  * $args1 = array(
@@ -37,22 +35,19 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
37
  * ),
38
  * ),
39
  * );
40
- *
41
  * $metabox1 = YIT_Metabox( 'yit-metabox-id' );
42
  * $metabox1->init( $args );
43
  * </code>
44
  *
45
- * @class YIT_Metaboxes
46
  * @package YITH
47
  * @since 1.0.0
48
  * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
49
- *
50
  */
51
  class YIT_Metabox {
52
 
53
  /**
54
  * @var string the id of metabox
55
- *
56
  * @since 1.0
57
  */
58
 
@@ -60,14 +55,12 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
60
 
61
  /**
62
  * @var array An array where are saved all metabox settings options
63
- *
64
  * @since 1.0
65
  */
66
  private $options = array();
67
 
68
  /**
69
  * @var array An array where are saved all tabs of metabox
70
- *
71
  * @since 1.0
72
  */
73
  private $tabs = array();
@@ -82,11 +75,8 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
82
  * Main Instance
83
  *
84
  * @static
85
- *
86
  * @param $id
87
- *
88
  * @return object Main instance
89
- *
90
  * @since 1.0
91
  * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
92
  */
@@ -102,7 +92,6 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
102
  * Constructor
103
  *
104
  * @param string $id
105
- *
106
  * @return \YIT_Metabox
107
  * @since 1.0
108
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -115,11 +104,9 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
115
 
116
  /**
117
  * Init
118
- *
119
  * set options and tabs, add actions to register metabox, scripts and save data
120
  *
121
  * @param array $options
122
- *
123
  * @return void
124
  * @since 1.0
125
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -130,20 +117,18 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
130
  $this->set_tabs();
131
 
132
  add_action( 'add_meta_boxes', array( $this, 'register_metabox' ), 99 );
133
- add_action( 'save_post', array( $this, 'save_postdata' ) );
134
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ), 15 );
135
 
136
  add_filter( 'yit_icons_screen_ids', array( $this, 'add_screen_ids_for_icons' ) );
137
 
138
- add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element_metabox', array( $this, 'save_toggle_element' ) );
139
- add_filter( 'admin_body_class', array( $this, 'add_body_class' ), 10, 1 );
140
  }
141
 
142
  /**
143
  * Add Screen ids to include icons
144
  *
145
  * @param $screen_ids
146
- *
147
  * @return array
148
  */
149
  public function add_screen_ids_for_icons( $screen_ids ) {
@@ -152,7 +137,6 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
152
 
153
  /**
154
  * Enqueue script and styles in admin side
155
- *
156
  * Add style and scripts to administrator
157
  *
158
  * @return void
@@ -183,11 +167,9 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
183
 
184
  /**
185
  * Set Options
186
- *
187
  * Set the variable options
188
  *
189
  * @param array $options
190
- *
191
  * @return void
192
  * @since 1.0
193
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -199,12 +181,10 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
199
 
200
  /**
201
  * Set Tabs
202
- *
203
  * Set the variable tabs
204
  *
205
- * @internal param array $tabs
206
- *
207
  * @return void
 
208
  * @since 1.0
209
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
210
  */
@@ -221,16 +201,13 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
221
 
222
  /**
223
  * Add Tab
224
- *
225
  * Add a tab inside the metabox
226
  *
227
- * @internal param array $tabs
228
- *
229
- * @param array $tab the new tab to add to the metabox
230
  * @param string $where tell where insert the tab if after or before a $refer
231
  * @param null $refer an existent tab inside metabox
232
- *
233
  * @return void
 
234
  * @since 1.0
235
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
236
  */
@@ -256,14 +233,11 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
256
 
257
  /**
258
  * Remove Tab
259
- *
260
  * Remove a tab from the tabs of metabox
261
  *
262
- * @internal param array $tabs
263
- *
264
  * @param $id_tab
265
- *
266
  * @return void
 
267
  * @since 1.0
268
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
269
  */
@@ -276,17 +250,14 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
276
 
277
  /**
278
  * Add Field
279
- *
280
  * Add a field inside a tab of metabox
281
  *
282
- * @internal param array $tabs
283
- *
284
  * @param string $tab_id the id of the tabs where add the field
285
- * @param array $args the field to add
286
- * @param string $where tell where insert the field if after or before a $refer
287
- * @param null $refer an existent field inside tab
288
- *
289
  * @return void
 
290
  * @since 1.0
291
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
292
  */
@@ -325,11 +296,9 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
325
 
326
  /**
327
  * Remove Field
328
- *
329
  * Remove a field from the metabox, search inside the tabs and remove it if exists
330
  *
331
  * @param $id_field
332
- *
333
  * @return void
334
  * @since 1.0
335
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -344,14 +313,12 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
344
 
345
  /**
346
  * Reorder tabs
347
- *
348
  * Order the tabs and fields and set id and name to each field
349
  *
350
- * @internal param $id_field
351
- *
352
  * @return void
353
- * @since 1.0
354
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
 
355
  */
356
  public function reorder_tabs() {
357
  foreach ( $this->tabs as $tab_name => $tab ) {
@@ -369,12 +336,10 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
369
 
370
  /**
371
  * Get Option Metabox ID
372
- *
373
  * return the id of the field
374
  *
375
  * @param string $id_field
376
  * @param bool $private if private add an _befor the id
377
- *
378
  * @return string
379
  * @since 1.0
380
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -389,12 +354,10 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
389
 
390
  /**
391
  * Get Option Metabox Name
392
- *
393
  * return the name of the field, this name will be used as attribute name of the input field
394
  *
395
  * @param string $id_field
396
  * @param bool $private if private add an _befor the id
397
- *
398
  * @return string
399
  * @since 1.0
400
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -415,10 +378,8 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
415
 
416
  /**
417
  * Register the metabox
418
- *
419
  * call the wp function add_metabox to add the metabox
420
  *
421
- *
422
  * @return void
423
  * @since 1.0
424
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -432,10 +393,8 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
432
 
433
  /**
434
  * Show metabox
435
- *
436
  * show the html of metabox
437
  *
438
- *
439
  * @return void
440
  * @since 1.0
441
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -443,29 +402,30 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
443
  public function show() {
444
  $this->reorder_tabs();
445
 
446
- yit_plugin_get_template( YIT_CORE_PLUGIN_PATH, 'metaboxes/tab.php', array( 'tabs' => $this->tabs ) );
 
 
 
 
 
447
  }
448
 
449
  /**
450
  * Save Post Data
451
- *
452
  * Save the post data in the database when save the post
453
  *
454
  * @param $post_id
455
- *
456
  * @return int
457
  * @since 1.0
458
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
459
  */
460
  public function save_postdata( $post_id ) {
461
-
462
-
463
  if ( !isset( $_POST[ 'yit_metaboxes_nonce' ] ) || !wp_verify_nonce( $_POST[ 'yit_metaboxes_nonce' ], 'metaboxes-fields-nonce' ) ) {
464
  return $post_id;
465
  }
466
 
467
-
468
- if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
469
  return $post_id;
470
  }
471
 
@@ -475,7 +435,7 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
475
  return $post_id;
476
  }
477
 
478
- if ( 'page' == $post_type ) {
479
  if ( !current_user_can( 'edit_page', $post_id ) ) {
480
  return $post_id;
481
  }
@@ -485,9 +445,9 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
485
  }
486
  }
487
 
488
- /*if (!in_array($post_type, (array)$this->options['pages'])) {
489
  return $post_id;
490
- }*/
491
 
492
  if ( isset( $_POST[ 'yit_metaboxes' ] ) ) {
493
  $yit_metabox_data = $_POST[ 'yit_metaboxes' ];
@@ -506,77 +466,92 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
506
 
507
  }
508
 
509
- /**
510
- * Sanitize the fields of metabox.
511
- *
512
- * @return void
513
- * @since 3.2.1
514
- * @author Emanuela Castorina
515
- */
516
- public function sanitize_fields( $post_id ) {
517
-
518
- $this->reorder_tabs();
519
-
520
- foreach ( $this->tabs as $tab ) {
521
-
522
- foreach ( $tab['fields'] as $field ) {
523
-
524
- if ( in_array( $field['type'], array( 'title' ) ) ) {
525
- continue;
526
- }
527
-
528
- if ( isset( $_POST['yit_metaboxes'][ $field['id'] ] ) ) {
529
- if ( in_array( $field['type'], array( 'onoff', 'checkbox' ) ) ) {
530
- update_post_meta( $post_id, $field['id'], '1' );
531
- }elseif( in_array( $field['type'], array( 'toggle-element' ) ) ){
532
- if ( isset( $field['elements'] ) && $field['elements'] ) {
533
- $elements_value = $_POST['yit_metaboxes'][ $field['id'] ];
534
- if ( $elements_value ) {
535
- if( isset( $elements_value['box_id'])){
536
- unset( $elements_value['box_id']);
537
- }
538
-
539
- foreach ( $field['elements'] as $element ) {
540
- foreach ( $elements_value as $key => $element_value ) {
541
- if ( isset( $field['onoff_field'] ) ) {
542
- $elements_value[ $key ][ $field['onoff_field']['id'] ] = ! isset( $element_value[ $field['onoff_field']['id'] ] ) ? 0 : $element_value[ $field['onoff_field']['id'] ];
543
- }
544
- if ( in_array( $element['type'], array( 'onoff', 'checkbox' ) ) ) {
545
- $elements_value[ $key ][ $element['id'] ] = ! isset( $element_value[ $element['id'] ] ) ? 0 : 1;
546
- }
547
-
548
- if ( ! empty( $element['yith-sanitize-callback'] ) && is_callable( $element['yith-sanitize-callback'] ) ) {
549
- $elements_value[ $key ][ $element['id'] ] = call_user_func( $element['yith-sanitize-callback'], $elements_value[ $key ][ $element['id'] ] );
550
- }
551
- }
552
- }
553
- }
554
-
555
- update_post_meta( $post_id, $field['id'], maybe_serialize( $elements_value ) );
556
- }
557
- } else {
558
- $value = $_POST['yit_metaboxes'][ $field['id'] ];
559
- if ( ! empty( $field['yith-sanitize-callback'] ) && is_callable( $field['yith-sanitize-callback'] ) ) {
560
- $value = call_user_func( $field['yith-sanitize-callback'], $value );
561
- }
562
- add_post_meta( $post_id, $field['id'], $value, true ) || update_post_meta( $post_id, $field['id'], $value );
563
- }
564
- } elseif ( in_array( $field['type'], array( 'onoff', 'checkbox' ) ) ) {
565
- update_post_meta( $post_id, $field['id'], '0' );
566
- } else {
567
- delete_post_meta( $post_id, $field['id'] );
568
- }
569
- }
570
- }
571
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
572
 
573
  /**
574
  * Remove Fields
575
- *
576
  * Remove a fields list from the metabox, search inside the tabs and remove it if exists
577
  *
578
  * @param $id_fields
579
- *
580
  * @return void
581
  * @since 2.0.0
582
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
@@ -587,64 +562,33 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
587
  }
588
  }
589
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
590
 
591
- /**
592
- * Add custom class to body
593
- *
594
- * It is necessary to add new style to the metaboxes
595
- *
596
- * @param $classes
597
- *
598
- * @return string
599
- * @author Emanuela Castorina
600
- */
601
- public function add_body_class( $classes ) {
602
- global $post;
603
-
604
- $exclude_post_types = apply_filters( 'yith_plugin_fw_exclude_post_types_to_additional_classes', array( 'product' ) );
605
-
606
- if ( $post && in_array( $post->post_type, $exclude_post_types ) ) {
607
- return $classes;
608
- }
609
-
610
- $new_class = apply_filters( 'yith_plugin_fw_metabox_class', '', $post );
611
-
612
- if ( empty( $new_class ) ) {
613
- return $classes;
614
- }
615
-
616
- $classes = yith_plugin_fw_remove_duplicate_classes( $classes. ' '. $new_class);
617
-
618
- return $classes;
619
- }
620
-
621
- /**
622
- * Save the element toggle via Ajax.
623
- *
624
- * @return void
625
- * @since 3.2.1
626
- * @author Emanuela Castorina
627
- */
628
- public function save_toggle_element() {
629
- if ( ! isset( $_REQUEST['post_ID'] ) ) {
630
- return;
631
- }
632
-
633
- if ( !isset( $_REQUEST[ 'yit_metaboxes_nonce' ] ) || !wp_verify_nonce( $_REQUEST[ 'yit_metaboxes_nonce' ], 'metaboxes-fields-nonce' ) ) {
634
- return;
635
- }
636
- $post_id = $_REQUEST['post_ID'];
637
-
638
- if ( isset( $_REQUEST['yit_metaboxes'] ) ) {
639
- $yit_metabox_data = $_REQUEST['yit_metaboxes'];
640
-
641
- if ( is_array( $yit_metabox_data ) ) {
642
- $this->sanitize_fields( $post_id );
643
- }
644
- } elseif ( ! isset( $_REQUEST['yit_metaboxes'] ) || ! isset( $_REQUEST['yit_metaboxes'][ $_REQUEST['toggle_id'] ] ) ) {
645
- delete_post_meta( $post_id, $_REQUEST['toggle_id'] );
646
- }
647
- }
648
  }
649
  }
650
 
@@ -654,7 +598,6 @@ if ( !function_exists( 'YIT_Metabox' ) ) {
654
  * Main instance of plugin
655
  *
656
  * @param $id
657
- *
658
  * @return \YIT_Metabox
659
  * @since 1.0
660
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1
  <?php
2
  /**
3
  * This file belongs to the YIT Framework.
 
4
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
  * that is bundled with this package in the file LICENSE.txt.
6
  * It is also available through the world-wide-web at this URL:
15
  if ( !class_exists( 'YIT_Metabox' ) ) {
16
  /**
17
  * YIT Metabox
 
18
  * the metabox can be created using this code
19
  * <code>
20
  * $args1 = array(
35
  * ),
36
  * ),
37
  * );
 
38
  * $metabox1 = YIT_Metabox( 'yit-metabox-id' );
39
  * $metabox1->init( $args );
40
  * </code>
41
  *
42
+ * @class YIT_Metaboxes
43
  * @package YITH
44
  * @since 1.0.0
45
  * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
 
46
  */
47
  class YIT_Metabox {
48
 
49
  /**
50
  * @var string the id of metabox
 
51
  * @since 1.0
52
  */
53
 
55
 
56
  /**
57
  * @var array An array where are saved all metabox settings options
 
58
  * @since 1.0
59
  */
60
  private $options = array();
61
 
62
  /**
63
  * @var array An array where are saved all tabs of metabox
 
64
  * @since 1.0
65
  */
66
  private $tabs = array();
75
  * Main Instance
76
  *
77
  * @static
 
78
  * @param $id
 
79
  * @return object Main instance
 
80
  * @since 1.0
81
  * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
82
  */
92
  * Constructor
93
  *
94
  * @param string $id
 
95
  * @return \YIT_Metabox
96
  * @since 1.0
97
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
104
 
105
  /**
106
  * Init
 
107
  * set options and tabs, add actions to register metabox, scripts and save data
108
  *
109
  * @param array $options
 
110
  * @return void
111
  * @since 1.0
112
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
117
  $this->set_tabs();
118
 
119
  add_action( 'add_meta_boxes', array( $this, 'register_metabox' ), 99 );
120
+ add_action( 'save_post', array( $this, 'save_postdata' ), 10, 1 );
121
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ), 15 );
122
 
123
  add_filter( 'yit_icons_screen_ids', array( $this, 'add_screen_ids_for_icons' ) );
124
 
125
+ add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element_metabox', array( $this, 'save_toggle_element' ) );
 
126
  }
127
 
128
  /**
129
  * Add Screen ids to include icons
130
  *
131
  * @param $screen_ids
 
132
  * @return array
133
  */
134
  public function add_screen_ids_for_icons( $screen_ids ) {
137
 
138
  /**
139
  * Enqueue script and styles in admin side
 
140
  * Add style and scripts to administrator
141
  *
142
  * @return void
167
 
168
  /**
169
  * Set Options
 
170
  * Set the variable options
171
  *
172
  * @param array $options
 
173
  * @return void
174
  * @since 1.0
175
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
181
 
182
  /**
183
  * Set Tabs
 
184
  * Set the variable tabs
185
  *
 
 
186
  * @return void
187
+ * @internal param array $tabs
188
  * @since 1.0
189
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
190
  */
201
 
202
  /**
203
  * Add Tab
 
204
  * Add a tab inside the metabox
205
  *
206
+ * @param array $tab the new tab to add to the metabox
 
 
207
  * @param string $where tell where insert the tab if after or before a $refer
208
  * @param null $refer an existent tab inside metabox
 
209
  * @return void
210
+ * @internal param array $tabs
211
  * @since 1.0
212
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
213
  */
233
 
234
  /**
235
  * Remove Tab
 
236
  * Remove a tab from the tabs of metabox
237
  *
 
 
238
  * @param $id_tab
 
239
  * @return void
240
+ * @internal param array $tabs
241
  * @since 1.0
242
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
243
  */
250
 
251
  /**
252
  * Add Field
 
253
  * Add a field inside a tab of metabox
254
  *
 
 
255
  * @param string $tab_id the id of the tabs where add the field
256
+ * @param array $args the field to add
257
+ * @param string $where tell where insert the field if after or before a $refer
258
+ * @param null $refer an existent field inside tab
 
259
  * @return void
260
+ * @internal param array $tabs
261
  * @since 1.0
262
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
263
  */
296
 
297
  /**
298
  * Remove Field
 
299
  * Remove a field from the metabox, search inside the tabs and remove it if exists
300
  *
301
  * @param $id_field
 
302
  * @return void
303
  * @since 1.0
304
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
313
 
314
  /**
315
  * Reorder tabs
 
316
  * Order the tabs and fields and set id and name to each field
317
  *
 
 
318
  * @return void
319
+ * @internal param $id_field
320
+ * @since 1.0
321
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
322
  */
323
  public function reorder_tabs() {
324
  foreach ( $this->tabs as $tab_name => $tab ) {
336
 
337
  /**
338
  * Get Option Metabox ID
 
339
  * return the id of the field
340
  *
341
  * @param string $id_field
342
  * @param bool $private if private add an _befor the id
 
343
  * @return string
344
  * @since 1.0
345
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
354
 
355
  /**
356
  * Get Option Metabox Name
 
357
  * return the name of the field, this name will be used as attribute name of the input field
358
  *
359
  * @param string $id_field
360
  * @param bool $private if private add an _befor the id
 
361
  * @return string
362
  * @since 1.0
363
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
378
 
379
  /**
380
  * Register the metabox
 
381
  * call the wp function add_metabox to add the metabox
382
  *
 
383
  * @return void
384
  * @since 1.0
385
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
393
 
394
  /**
395
  * Show metabox
 
396
  * show the html of metabox
397
  *
 
398
  * @return void
399
  * @since 1.0
400
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
402
  public function show() {
403
  $this->reorder_tabs();
404
 
405
+ $args = array(
406
+ 'tabs' => $this->tabs,
407
+ 'class' => isset( $this->options[ 'class' ] ) ? $this->options[ 'class' ] : '',
408
+ );
409
+
410
+ yit_plugin_get_template( YIT_CORE_PLUGIN_PATH, 'metaboxes/tab.php', $args );
411
  }
412
 
413
  /**
414
  * Save Post Data
 
415
  * Save the post data in the database when save the post
416
  *
417
  * @param $post_id
 
418
  * @return int
419
  * @since 1.0
420
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
421
  */
422
  public function save_postdata( $post_id ) {
 
 
423
  if ( !isset( $_POST[ 'yit_metaboxes_nonce' ] ) || !wp_verify_nonce( $_POST[ 'yit_metaboxes_nonce' ], 'metaboxes-fields-nonce' ) ) {
424
  return $post_id;
425
  }
426
 
427
+ $allow_ajax = isset( $_REQUEST[ 'yith_metabox_allow_ajax_saving' ] ) && $this->id === $_REQUEST[ 'yith_metabox_allow_ajax_saving' ];
428
+ if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX && !$allow_ajax ) ) {
429
  return $post_id;
430
  }
431
 
435
  return $post_id;
436
  }
437
 
438
+ if ( 'page' === $post_type ) {
439
  if ( !current_user_can( 'edit_page', $post_id ) ) {
440
  return $post_id;
441
  }
445
  }
446
  }
447
 
448
+ if ( !in_array( $post_type, (array) $this->options[ 'pages' ] ) ) {
449
  return $post_id;
450
+ }
451
 
452
  if ( isset( $_POST[ 'yit_metaboxes' ] ) ) {
453
  $yit_metabox_data = $_POST[ 'yit_metaboxes' ];
466
 
467
  }
468
 
469
+ /**
470
+ * Sanitize the fields of metabox.
471
+ *
472
+ * @return void
473
+ * @since 3.2.1
474
+ * @author Emanuela Castorina
475
+ */
476
+ public function sanitize_fields( $post_id ) {
477
+ $this->reorder_tabs();
478
+ $tabs_to_sanitize = $this->tabs;
479
+ $allow_ajax = isset( $_REQUEST[ 'yith_metabox_allow_ajax_saving' ] ) && $this->id === $_REQUEST[ 'yith_metabox_allow_ajax_saving' ];
480
+ $ajax_partial_saving_tab = isset( $_REQUEST[ 'yith_metabox_allow_ajax_partial_saving_tab' ] ) ? $_REQUEST[ 'yith_metabox_allow_ajax_partial_saving_tab' ] : false;
481
+
482
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX && !$allow_ajax ) {
483
+ return;
484
+ } elseif ( $ajax_partial_saving_tab ) {
485
+ if ( array_key_exists( $ajax_partial_saving_tab, $tabs_to_sanitize ) ) {
486
+ $tabs_to_sanitize = array( $ajax_partial_saving_tab => $tabs_to_sanitize[ $ajax_partial_saving_tab ] );
487
+ } else {
488
+ return;
489
+ }
490
+ }
491
+
492
+
493
+
494
+
495
+ foreach ( $tabs_to_sanitize as $tab ) {
496
+
497
+ foreach ( $tab[ 'fields' ] as $field ) {
498
+
499
+ if ( in_array( $field[ 'type' ], array( 'title' ) ) ) {
500
+ continue;
501
+ }
502
+
503
+ if ( isset( $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ] ) ) {
504
+ if ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
505
+ update_post_meta( $post_id, $field[ 'id' ], '1' );
506
+ } elseif ( in_array( $field[ 'type' ], array( 'toggle-element' ) ) ) {
507
+ if ( isset( $field[ 'elements' ] ) && $field[ 'elements' ] ) {
508
+ $elements_value = $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ];
509
+ if ( $elements_value ) {
510
+ if ( isset( $elements_value[ 'box_id' ] ) ) {
511
+ unset( $elements_value[ 'box_id' ] );
512
+ }
513
+
514
+ foreach ( $field[ 'elements' ] as $element ) {
515
+ foreach ( $elements_value as $key => $element_value ) {
516
+ if ( isset( $field[ 'onoff_field' ] ) ) {
517
+ $elements_value[ $key ][ $field[ 'onoff_field' ][ 'id' ] ] = !isset( $element_value[ $field[ 'onoff_field' ][ 'id' ] ] ) ? 0 : $element_value[ $field[ 'onoff_field' ][ 'id' ] ];
518
+ }
519
+ if ( in_array( $element[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
520
+ $elements_value[ $key ][ $element[ 'id' ] ] = !isset( $element_value[ $element[ 'id' ] ] ) ? 0 : 1;
521
+ }
522
+
523
+ if ( !empty( $element[ 'yith-sanitize-callback' ] ) && is_callable( $element[ 'yith-sanitize-callback' ] ) ) {
524
+ $elements_value[ $key ][ $element[ 'id' ] ] = call_user_func( $element[ 'yith-sanitize-callback' ], $elements_value[ $key ][ $element[ 'id' ] ] );
525
+ }
526
+ }
527
+ }
528
+ }
529
+
530
+ update_post_meta( $post_id, $field[ 'id' ], maybe_serialize( $elements_value ) );
531
+ }
532
+ } else {
533
+ $value = $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ];
534
+ if ( !empty( $field[ 'yith-sanitize-callback' ] ) && is_callable( $field[ 'yith-sanitize-callback' ] ) ) {
535
+ $value = call_user_func( $field[ 'yith-sanitize-callback' ], $value );
536
+ }
537
+ add_post_meta( $post_id, $field[ 'id' ], $value, true ) || update_post_meta( $post_id, $field[ 'id' ], $value );
538
+ }
539
+ } elseif ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
540
+ update_post_meta( $post_id, $field[ 'id' ], '0' );
541
+ } elseif ( in_array( $field[ 'type' ], array( 'checkbox-array' ) ) ) {
542
+ update_post_meta( $post_id, $field[ 'id' ], array() );
543
+ } else {
544
+ delete_post_meta( $post_id, $field[ 'id' ] );
545
+ }
546
+ }
547
+ }
548
+ }
549
 
550
  /**
551
  * Remove Fields
 
552
  * Remove a fields list from the metabox, search inside the tabs and remove it if exists
553
  *
554
  * @param $id_fields
 
555
  * @return void
556
  * @since 2.0.0
557
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
562
  }
563
  }
564
 
565
+ /**
566
+ * Save the element toggle via Ajax.
567
+ *
568
+ * @return void
569
+ * @since 3.2.1
570
+ * @author Emanuela Castorina
571
+ */
572
+ public function save_toggle_element() {
573
+ if ( !isset( $_REQUEST[ 'post_ID' ] ) ) {
574
+ return;
575
+ }
576
+
577
+ if ( !isset( $_REQUEST[ 'yit_metaboxes_nonce' ] ) || !wp_verify_nonce( $_REQUEST[ 'yit_metaboxes_nonce' ], 'metaboxes-fields-nonce' ) ) {
578
+ return;
579
+ }
580
+ $post_id = $_REQUEST[ 'post_ID' ];
581
 
582
+ if ( isset( $_REQUEST[ 'yit_metaboxes' ] ) ) {
583
+ $yit_metabox_data = $_REQUEST[ 'yit_metaboxes' ];
584
+
585
+ if ( is_array( $yit_metabox_data ) ) {
586
+ $this->sanitize_fields( $post_id );
587
+ }
588
+ } elseif ( !isset( $_REQUEST[ 'yit_metaboxes' ] ) || !isset( $_REQUEST[ 'yit_metaboxes' ][ $_REQUEST[ 'toggle_id' ] ] ) ) {
589
+ delete_post_meta( $post_id, $_REQUEST[ 'toggle_id' ] );
590
+ }
591
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
592
  }
593
  }
594
 
598
  * Main instance of plugin
599
  *
600
  * @param $id
 
601
  * @return \YIT_Metabox
602
  * @since 1.0
603
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
plugin-fw/lib/yit-plugin-panel-wc.php CHANGED
@@ -95,6 +95,7 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
95
  add_action( 'yith_plugin_fw_before_woocommerce_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
96
  add_action( 'admin_action_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
97
 
 
98
 
99
  // init actions once to prevent multiple actions
100
  static::_init_actions();
@@ -135,12 +136,14 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
135
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
136
  */
137
  public function yit_panel() {
 
138
  $additional_info = array(
139
- 'current_tab' => $this->get_current_tab(),
140
- 'available_tabs' => $this->settings[ 'admin-tabs' ],
141
- 'default_tab' => $this->get_available_tabs( true ), //get default tabs
142
- 'page' => $this->settings[ 'page' ],
143
- 'wrap_class' => isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '',
 
144
  );
145
 
146
 
@@ -158,7 +161,6 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
158
  * @since 1.0
159
  * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
160
  */
161
-
162
  public function yit_upload_update( $option_value ) {
163
  return $option_value;
164
  }
@@ -170,7 +172,6 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
170
  * @since 1.0
171
  * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
172
  */
173
-
174
  public function yit_upload( $args = array() ) {
175
  if ( !empty( $args ) ) {
176
  $args[ 'value' ] = ( get_option( $args[ 'id' ] ) ) ? get_option( $args[ 'id' ] ) : $args[ 'default' ];
@@ -246,16 +247,14 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
246
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
247
  */
248
  public function add_fields() {
249
-
250
-
251
  $yit_options = $this->get_main_array_options();
252
- $current_tab = $this->get_current_tab();
253
 
254
- if ( !$current_tab ) {
255
  return;
256
  }
257
 
258
- woocommerce_admin_fields( $yit_options[ $current_tab ] );
259
  }
260
 
261
  /**
@@ -270,8 +269,11 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
270
  */
271
  public function print_panel_content() {
272
  $yit_options = $this->get_main_array_options();
273
- $current_tab = $this->get_current_tab();
274
- $custom_tab_action = $this->is_custom_tab( $yit_options, $current_tab );
 
 
 
275
 
276
  if ( $custom_tab_action ) {
277
  $this->print_custom_tab( $custom_tab_action );
@@ -299,11 +301,11 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
299
  do_action( 'yit_panel_wc_before_update' );
300
 
301
  $yit_options = $this->get_main_array_options();
302
- $current_tab = $this->get_current_tab();
303
 
304
  if ( version_compare( WC()->version, '2.4.0', '>=' ) ) {
305
- if ( !empty( $yit_options[ $current_tab ] ) ) {
306
- foreach ( $yit_options[ $current_tab ] as $option ) {
307
  if ( isset( $option[ 'id' ] ) && isset( $_POST[ $option[ 'id' ] ] ) && isset( $option[ 'type' ] ) && !in_array( $option[ 'type' ], self::$wc_type ) ) {
308
  $_POST[ $option[ 'id' ] ] = maybe_serialize( $_POST[ $option[ 'id' ] ] );
309
  }
@@ -318,14 +320,14 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
318
  $is_hidden_input = ( ( $temp = strlen( $name ) - strlen( $attachment_id_needle ) ) >= 0 && strpos( $name, $attachment_id_needle, $temp ) !== false );
319
  if ( $is_hidden_input ) {
320
  // Is an input element of type "hidden" coupled with an input element for selecting an element from the media gallery
321
- $yit_options[ $current_tab ][ $name ] = array(
322
  "type" => "text",
323
  "id" => $name
324
  );
325
  }
326
  }
327
 
328
- woocommerce_update_options( $yit_options[ $current_tab ] );
329
 
330
  do_action( 'yit_panel_wc_after_update' );
331
 
@@ -336,10 +338,16 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
336
  do_action( 'yit_panel_wc_before_reset' );
337
 
338
  $yit_options = $this->get_main_array_options();
339
- $current_tab = $this->get_current_tab();
340
-
341
- foreach ( $yit_options[ $current_tab ] as $id => $option ) {
342
- if ( isset( $option[ 'default' ] ) ) {
 
 
 
 
 
 
343
  update_option( $option[ 'id' ], $option[ 'default' ] );
344
  }
345
  }
@@ -452,12 +460,12 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
452
  }
453
 
454
  /**
455
- * Add the woocommerce body class in plugin panel page
456
  *
 
 
457
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
458
  * @since 2.0
459
- * @param $classes The body classes
460
- * @return array Filtered body classes
461
  */
462
  public static function admin_body_class( $admin_body_classes ) {
463
  global $pagenow;
@@ -479,17 +487,15 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
479
  * @since 2.0
480
  */
481
  public function maybe_unserialize_panel_data( $value, $option, $raw_value ) {
482
-
483
-
484
  if ( !version_compare( WC()->version, '2.4.0', '>=' ) || !isset( $option[ 'type' ] ) || in_array( $option[ 'type' ], self::$wc_type ) ) {
485
  return $value;
486
  }
487
 
488
  $yit_options = $this->get_main_array_options();
489
- $current_tab = $this->get_current_tab();
490
 
491
- if ( !empty( $yit_options[ $current_tab ] ) ) {
492
- foreach ( $yit_options[ $current_tab ] as $option_array ) {
493
  if ( isset( $option_array[ 'id' ] ) && isset( $option[ 'id' ] ) && $option_array[ 'id' ] == $option[ 'id' ] ) {
494
  return maybe_unserialize( $value );
495
  }
@@ -522,6 +528,11 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
522
  $value = yith_plugin_fw_is_true( $raw_value ) ? 'yes' : 'no';
523
  }
524
 
 
 
 
 
 
525
  if ( isset( $option[ 'yith-type' ] ) && in_array( $option[ 'yith-type' ], array( 'textarea', 'textarea-editor', 'textarea-codemirror' ) ) ) {
526
  $value = $raw_value;
527
  }
@@ -654,5 +665,16 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
654
 
655
  return $updated;
656
  }
 
 
 
 
 
 
 
 
 
 
 
657
  }
658
  }
95
  add_action( 'yith_plugin_fw_before_woocommerce_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
96
  add_action( 'admin_action_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
97
 
98
+ add_action( 'admin_enqueue_scripts', array( $this, 'init_wp_with_tabs' ), 11 );
99
 
100
  // init actions once to prevent multiple actions
101
  static::_init_actions();
136
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
137
  */
138
  public function yit_panel() {
139
+ $this->maybe_redirect_to_proper_wp_page();
140
  $additional_info = array(
141
+ 'current_tab' => $this->get_current_tab(),
142
+ 'current_sub_tab' => $this->get_current_sub_tab(),
143
+ 'available_tabs' => $this->settings[ 'admin-tabs' ],
144
+ 'default_tab' => $this->get_available_tabs( true ), //get default tabs
145
+ 'page' => $this->settings[ 'page' ],
146
+ 'wrap_class' => isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '',
147
  );
148
 
149
 
161
  * @since 1.0
162
  * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
163
  */
 
164
  public function yit_upload_update( $option_value ) {
165
  return $option_value;
166
  }
172
  * @since 1.0
173
  * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
174
  */
 
175
  public function yit_upload( $args = array() ) {
176
  if ( !empty( $args ) ) {
177
  $args[ 'value' ] = ( get_option( $args[ 'id' ] ) ) ? get_option( $args[ 'id' ] ) : $args[ 'default' ];
247
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
248
  */
249
  public function add_fields() {
 
 
250
  $yit_options = $this->get_main_array_options();
251
+ $option_key = $this->get_current_option_key();
252
 
253
+ if ( !$option_key ) {
254
  return;
255
  }
256
 
257
+ woocommerce_admin_fields( $yit_options[ $option_key ] );
258
  }
259
 
260
  /**
269
  */
270
  public function print_panel_content() {
271
  $yit_options = $this->get_main_array_options();
272
+ $page = $this->settings[ 'page' ];
273
+ $option_key = $this->get_current_option_key();
274
+ $custom_tab_action = $this->is_custom_tab( $yit_options, $option_key );
275
+
276
+ $this->print_tabs_nav();
277
 
278
  if ( $custom_tab_action ) {
279
  $this->print_custom_tab( $custom_tab_action );
301
  do_action( 'yit_panel_wc_before_update' );
302
 
303
  $yit_options = $this->get_main_array_options();
304
+ $option_key = $this->get_current_option_key();
305
 
306
  if ( version_compare( WC()->version, '2.4.0', '>=' ) ) {
307
+ if ( !empty( $yit_options[ $option_key ] ) ) {
308
+ foreach ( $yit_options[ $option_key ] as $option ) {
309
  if ( isset( $option[ 'id' ] ) && isset( $_POST[ $option[ 'id' ] ] ) && isset( $option[ 'type' ] ) && !in_array( $option[ 'type' ], self::$wc_type ) ) {
310
  $_POST[ $option[ 'id' ] ] = maybe_serialize( $_POST[ $option[ 'id' ] ] );
311
  }
320
  $is_hidden_input = ( ( $temp = strlen( $name ) - strlen( $attachment_id_needle ) ) >= 0 && strpos( $name, $attachment_id_needle, $temp ) !== false );
321
  if ( $is_hidden_input ) {
322
  // Is an input element of type "hidden" coupled with an input element for selecting an element from the media gallery
323
+ $yit_options[ $option_key ][ $name ] = array(
324
  "type" => "text",
325
  "id" => $name
326
  );
327
  }
328
  }
329
 
330
+ woocommerce_update_options( $yit_options[ $option_key ] );
331
 
332
  do_action( 'yit_panel_wc_after_update' );
333
 
338
  do_action( 'yit_panel_wc_before_reset' );
339
 
340
  $yit_options = $this->get_main_array_options();
341
+ $option_key = $this->get_current_option_key();
342
+ foreach ( $yit_options[ $option_key ] as $id => $option ) {
343
+ if( isset( $option['yith-type'] ) && $option['yith-type'] == 'multi-colorpicker' && ! empty( $option['colorpickers'] ) ) {
344
+ $default = [];
345
+ foreach( $option['colorpickers'] as $colorpicker ) {
346
+ $default[ $colorpicker['id'] ] = isset( $colorpicker['default'] ) ? $colorpicker['default'] : '';
347
+ }
348
+ update_option( $option[ 'id' ], $default );
349
+ }
350
+ elseif ( isset( $option[ 'default' ] ) ) {
351
  update_option( $option[ 'id' ], $option[ 'default' ] );
352
  }
353
  }
460
  }
461
 
462
  /**
463
+ * Add the WooCommerce body class in plugin panel page
464
  *
465
+ * @param array $admin_body_classes The body classes
466
+ * @return array Filtered body classes
467
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
468
  * @since 2.0
 
 
469
  */
470
  public static function admin_body_class( $admin_body_classes ) {
471
  global $pagenow;
487
  * @since 2.0
488
  */
489
  public function maybe_unserialize_panel_data( $value, $option, $raw_value ) {
 
 
490
  if ( !version_compare( WC()->version, '2.4.0', '>=' ) || !isset( $option[ 'type' ] ) || in_array( $option[ 'type' ], self::$wc_type ) ) {
491
  return $value;
492
  }
493
 
494
  $yit_options = $this->get_main_array_options();
495
+ $option_key = $this->get_current_option_key();
496
 
497
+ if ( !empty( $yit_options[ $option_key ] ) ) {
498
+ foreach ( $yit_options[ $option_key ] as $option_array ) {
499
  if ( isset( $option_array[ 'id' ] ) && isset( $option[ 'id' ] ) && $option_array[ 'id' ] == $option[ 'id' ] ) {
500
  return maybe_unserialize( $value );
501
  }
528
  $value = yith_plugin_fw_is_true( $raw_value ) ? 'yes' : 'no';
529
  }
530
 
531
+ if ( isset( $option[ 'yith-type' ] ) && 'checkbox-array' === $option[ 'yith-type' ] ) {
532
+ $value = maybe_unserialize( $raw_value );
533
+ $value = !!$value && is_array( $value ) ? $value : array();
534
+ }
535
+
536
  if ( isset( $option[ 'yith-type' ] ) && in_array( $option[ 'yith-type' ], array( 'textarea', 'textarea-editor', 'textarea-codemirror' ) ) ) {
537
  $value = $raw_value;
538
  }
665
 
666
  return $updated;
667
  }
668
+
669
+ public function print_tabs_nav( $args = array() ) {
670
+ $defaults = array(
671
+ 'premium_class' => 'yith-premium',
672
+ 'parent_page' => '',
673
+ 'wrapper_class' => 'nav-tab-wrapper woo-nav-tab-wrapper'
674
+ );
675
+ $args = wp_parse_args( $args, $defaults );
676
+
677
+ parent::print_tabs_nav( $args );
678
+ }
679
  }
680
  }
plugin-fw/lib/yit-plugin-panel.php CHANGED
@@ -1,7 +1,6 @@
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
4
- *
5
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
  * that is bundled with this package in the file LICENSE.txt.
7
  * It is also available through the world-wide-web at this URL:
@@ -15,7 +14,6 @@ if ( !defined( 'ABSPATH' ) ) {
15
  if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
16
  /**
17
  * YIT Plugin Panel
18
- *
19
  * Setting Page to Manage Plugins
20
  *
21
  * @class YIT_Plugin_Panel
@@ -43,7 +41,17 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
43
  /**
44
  * @var array
45
  */
46
- private $_main_array_options = array();
 
 
 
 
 
 
 
 
 
 
47
 
48
  /**
49
  * @var array
@@ -58,10 +66,9 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
58
  /**
59
  * Constructor
60
  *
61
- * @since 1.0
62
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
63
- *
64
  * @param array $args
 
 
65
  */
66
  public function __construct( $args = array() ) {
67
 
@@ -97,18 +104,62 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
97
  add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
98
  add_action( 'admin_init', array( $this, 'add_fields' ) );
99
 
 
 
100
  // init actions once to prevent multiple actions
101
  static::_init_actions();
102
  }
103
 
104
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
105
 
106
- //yith-plugin-ui
107
- add_action('yith_plugin_fw_before_yith_panel', array($this, 'add_plugin_banner'), 10, 1 );
108
- add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
109
 
110
  }
111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  /**
113
  * Init actions once to prevent multiple actions
114
  *
@@ -128,15 +179,50 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
128
  }
129
  }
130
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  /**
132
  * Add yith-plugin-fw-panel in body classes in Panel pages
133
  *
134
  * @param $admin_body_classes
135
- *
136
- * @since 3.0.0
137
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
138
- *
139
  * @return string
 
 
140
  */
141
  public static function add_body_class( $admin_body_classes ) {
142
  global $pagenow;
@@ -171,7 +257,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
171
 
172
  /**
173
  * Remove duplicate submenu
174
- *
175
  * Submenu page hack: Remove the duplicate YIT Plugin link on subpages
176
  *
177
  * @return void
@@ -185,7 +270,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
185
 
186
  /**
187
  * Enqueue script and styles in admin side
188
- *
189
  * Add style and scripts to administrator
190
  *
191
  * @return void
@@ -226,7 +310,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
226
 
227
  /**
228
  * Register Settings
229
- *
230
  * Generate wp-admin settings pages by registering your settings and using a few callbacks to control the output
231
  *
232
  * @return void
@@ -239,18 +322,16 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
239
 
240
  /**
241
  * Options Validate
242
- *
243
  * a callback function called by Register Settings function
244
  *
245
  * @param $input
246
- *
247
  * @return array validate input fields
248
  * @since 1.0
249
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
250
  */
251
  public function options_validate( $input ) {
252
 
253
- $current_tab = !empty( $input[ 'current_tab' ] ) ? $input[ 'current_tab' ] : 'general';
254
 
255
  $yit_options = $this->get_main_array_options();
256
 
@@ -260,7 +341,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
260
  $submit = ( !empty( $input[ 'submit-general' ] ) ? true : false );
261
  $reset = ( !empty( $input[ 'reset-general' ] ) ? true : false );
262
 
263
- foreach ( $yit_options[ $current_tab ] as $section => $data ) {
264
  foreach ( $data as $option ) {
265
  if ( isset( $option[ 'sanitize_call' ] ) && isset( $option[ 'id' ] ) ) { //yiw_debug($option, false);
266
  if ( is_array( $option[ 'sanitize_call' ] ) ) :
@@ -301,7 +382,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
301
 
302
  /**
303
  * Add Setting SubPage
304
- *
305
  * add Setting SubPage to wordpress administrator
306
  *
307
  * @return array validate input fields
@@ -350,75 +430,168 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
350
  }
351
 
352
  /**
353
- * Show a tabbed panel to setting page
354
  *
355
- * a callback function called by add_setting_page => add_submenu_page
356
- *
357
- * @return void
358
- * @since 1.0
359
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
360
  */
361
- public function yit_panel() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
 
363
- $tabs = '';
364
- $current_tab = $this->get_current_tab();
365
- $yit_options = $this->get_main_array_options();
366
- $premium_class = isset( $this->settings['class'] ) ? 'yith-premium' : 'premium';
367
- $wrap_class = isset( $this->settings['class'] ) ? $this->settings['class'] : '';
368
- ?>
369
- <div class="wrap <?php echo $wrap_class?>">
370
- <?php
371
- do_action('yith_plugin_fw_before_yith_panel', $this->settings[ 'page' ] );
372
- // tabs
373
  foreach ( $this->settings[ 'admin-tabs' ] as $tab => $tab_value ) {
374
- $active_class = ( $current_tab == $tab ) ? ' nav-tab-active' : '';
375
- $active_class .= 'premium' == $tab ? ' '.$premium_class: '';
376
- $tabs .= '<a class="nav-tab' . $active_class . '" href="?' . $this->settings[ 'parent_page' ] . '&page=' . $this->settings[ 'page' ] . '&tab=' . $tab . '">' . $tab_value . '</a>';
 
 
 
 
 
377
  }
378
  ?>
379
- <div id="icon-themes" class="icon32"><br/></div>
380
- <h2 class="nav-tab-wrapper">
381
  <?php echo $tabs ?>
382
  </h2>
383
  <?php
384
- $custom_tab_action = $this->is_custom_tab( $yit_options, $current_tab );
385
- if ( $custom_tab_action ) {
386
- $this->print_custom_tab( $custom_tab_action );
387
 
388
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
389
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  ?>
391
- <?php
392
- $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
393
- ?>
394
- <div id="wrap" class="yith-plugin-fw plugin-option yit-admin-panel-container">
395
- <?php $this->message(); ?>
396
- <div class="<?php echo $panel_content_class; ?>">
397
- <h2><?php echo $this->get_tab_title() ?></h2>
398
- <?php if ( $this->is_show_form() ) : ?>
399
- <form id="yith-plugin-fw-panel" method="post" action="options.php">
400
- <?php do_settings_sections( 'yit' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
  <p>&nbsp;</p>
402
- <?php settings_fields( 'yit_' . $this->settings[ 'parent' ] . '_options' ); ?>
403
- <input type="hidden" name="<?php echo $this->get_name_field( 'current_tab' ) ?>" value="<?php echo esc_attr( $current_tab ) ?>"/>
404
- <input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>" style="float:left;margin-right:10px;"/>
405
- </form>
406
- <form method="post">
407
- <?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
408
- <input type="hidden" name="yit-action" value="reset"/>
409
- <input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset to default', 'yith-plugin-fw' ) ?>"
410
- onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
411
- </form>
412
- <p>&nbsp;</p>
413
- <?php endif ?>
414
  </div>
415
  </div>
416
- </div>
417
  <?php
418
  }
419
 
420
- public function is_custom_tab( $options, $current_tab ) {
421
- foreach ( $options[ $current_tab ] as $section => $option ) {
 
 
 
 
 
 
 
422
  if ( isset( $option[ 'type' ] ) && isset( $option[ 'action' ] ) && 'custom_tab' == $option[ 'type' ] && !empty( $option[ 'action' ] ) ) {
423
  return $option[ 'action' ];
424
  } else {
@@ -429,12 +602,30 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
429
  return false;
430
  }
431
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
  /**
433
  * Fire the action to print the custom tab
434
  *
435
- *
436
  * @param string $action Action to fire
437
- *
438
  * @return void
439
  * @since 1.0
440
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
@@ -446,7 +637,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
446
 
447
  /**
448
  * Add sections and fields to setting panel
449
- *
450
  * read all options and show sections and fields
451
  *
452
  * @return void
@@ -455,16 +645,16 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
455
  */
456
  public function add_fields() {
457
  $yit_options = $this->get_main_array_options();
458
- $current_tab = $this->get_current_tab();
459
 
460
- if ( !$current_tab ) {
461
  return;
462
  }
463
- foreach ( $yit_options[ $current_tab ] as $section => $data ) {
464
- add_settings_section( "yit_settings_{$current_tab}_{$section}", $this->get_section_title( $section ), $this->get_section_description( $section ), 'yit' );
465
  foreach ( $data as $option ) {
466
  if ( isset( $option[ 'id' ] ) && isset( $option[ 'type' ] ) && isset( $option[ 'name' ] ) ) {
467
- add_settings_field( "yit_setting_" . $option[ 'id' ], $option[ 'name' ], array( $this, 'render_field' ), 'yit', "yit_settings_{$current_tab}_{$section}", array( 'option' => $option, 'label_for' => $this->get_id_field( $option[ 'id' ] ) ) );
468
  }
469
  }
470
  }
@@ -473,7 +663,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
473
 
474
  /**
475
  * Add the tabs to admin bar menu
476
- *
477
  * set all tabs of settings page on wp admin bar
478
  *
479
  * @return void|array return void when capability is false
@@ -488,7 +677,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
488
  return;
489
  }
490
 
491
- if ( ! empty( $this->settings[ 'admin_tabs' ] ) ) {
492
  foreach ( $this->settings[ 'admin-tabs' ] as $item => $title ) {
493
 
494
  $wp_admin_bar->add_menu( array(
@@ -504,7 +693,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
504
 
505
  /**
506
  * Get current tab
507
- *
508
  * get the id of tab showed, return general is the current tab is not defined
509
  *
510
  * @return string
@@ -519,7 +707,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
519
  }
520
  if ( isset( $_REQUEST[ 'yit_tab_options' ] ) ) {
521
  return $_REQUEST[ 'yit_tab_options' ];
522
- } elseif ( isset( $_GET[ 'tab' ] ) && isset( $this->_tabs_path_files[ $_GET[ 'tab' ] ] ) ) {
523
  return $_GET[ 'tab' ];
524
  } elseif ( isset( $admin_tabs[ 0 ] ) ) {
525
  return $admin_tabs[ 0 ];
@@ -528,10 +716,51 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
528
  }
529
  }
530
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
531
 
532
  /**
533
- * Message
 
 
534
  *
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
  * define an array of message and show the content od message if
536
  * is find in the query string
537
  *
@@ -565,14 +794,12 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
565
 
566
  /**
567
  * Get Message
568
- *
569
  * return html code of message
570
  *
571
  * @param $message
572
  * @param string $type can be 'error' or 'updated'
573
  * @param bool $echo
574
- *
575
- * @return void|string
576
  * @since 1.0
577
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
578
  */
@@ -588,8 +815,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
588
 
589
  /**
590
  * Get Tab Path Files
591
- *
592
- * return an array with filenames of tabs
593
  *
594
  * @return array
595
  * @since 1.0
@@ -618,7 +844,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
618
 
619
  /**
620
  * Get main array options
621
- *
622
  * return an array with all options defined on options-files
623
  *
624
  * @return array
@@ -626,27 +851,66 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
626
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
627
  */
628
  function get_main_array_options() {
629
- if ( !empty( $this->_main_array_options ) ) {
630
- return $this->_main_array_options;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
631
  }
632
 
633
- $options_path = $this->settings[ 'options-path' ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
634
 
635
- foreach ( $this->settings[ 'admin-tabs' ] as $item => $v ) {
636
- $path = $options_path . '/' . $item . '-options.php';
637
- $path = apply_filters( 'yith_plugin_panel_item_options_path', $path, $options_path, $item, $this );
638
- if ( file_exists( $path ) ) {
639
- $this->_main_array_options = array_merge( $this->_main_array_options, include $path );
 
 
640
  }
641
  }
642
 
643
- return $this->_main_array_options;
 
 
 
 
644
  }
645
 
646
 
647
  /**
648
  * Set an array with all default options
649
- *
650
  * put default options in an array
651
  *
652
  * @return array
@@ -675,7 +939,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
675
 
676
  /**
677
  * Get the title of the tab
678
- *
679
  * return the title of tab
680
  *
681
  * @return string
@@ -693,15 +956,14 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
693
  }
694
  }
695
  }
 
696
  }
697
 
698
  /**
699
  * Get the title of the section
700
- *
701
  * return the title of section
702
  *
703
  * @param $section
704
- *
705
  * @return string
706
  * @since 1.0
707
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -715,15 +977,14 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
715
  return $option[ 'name' ];
716
  }
717
  }
 
718
  }
719
 
720
  /**
721
  * Get the description of the section
722
- *
723
  * return the description of section if is set
724
  *
725
  * @param $section
726
- *
727
  * @return string
728
  * @since 1.0
729
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -737,12 +998,12 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
737
  return '<p>' . $option[ 'desc' ] . '</p>';
738
  }
739
  }
 
740
  }
741
 
742
 
743
  /**
744
  * Show form when necessary
745
- *
746
  * return true if 'showform' is not defined
747
  *
748
  * @return bool
@@ -751,9 +1012,9 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
751
  */
752
  function is_show_form() {
753
  $yit_options = $this->get_main_array_options();
754
- $current_tab = $this->get_current_tab();
755
 
756
- foreach ( $yit_options[ $current_tab ] as $sections => $data ) {
757
  foreach ( $data as $option ) {
758
  if ( !isset( $option[ 'type' ] ) || $option[ 'type' ] != 'title' ) {
759
  continue;
@@ -769,11 +1030,9 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
769
 
770
  /**
771
  * Get name field
772
- *
773
  * return a string with the name of the input field
774
  *
775
  * @param string $name
776
- *
777
  * @return string
778
  * @since 1.0
779
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -784,11 +1043,9 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
784
 
785
  /**
786
  * Get id field
787
- *
788
  * return a string with the id of the input field
789
  *
790
  * @param string $id
791
- *
792
  * @return string
793
  * @since 1.0
794
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -800,12 +1057,10 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
800
 
801
  /**
802
  * Render the field showed in the setting page
803
- *
804
  * include the file of the option type, if file do not exists
805
  * return a text area
806
  *
807
  * @param array $param
808
- *
809
  * @return void
810
  * @since 1.0
811
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
@@ -845,7 +1100,6 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
845
 
846
  /**
847
  * Get options from db
848
- *
849
  * return the options from db, if the options aren't defined in the db,
850
  * get the default options ad add the options in the db
851
  *
@@ -865,9 +1119,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
865
  /**
866
  * Show a box panel with specific content in two columns as a new woocommerce type
867
  *
868
- *
869
  * @param array $args
870
- *
871
  * @return void
872
  * @since 1.0
873
  * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
@@ -882,11 +1134,9 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
882
  /**
883
  * Show a box panel with specific content in two columns as a new woocommerce type
884
  *
885
- * @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
886
- *
887
  * @param array $args
888
- *
889
  * @return void
 
890
  */
891
  public static function add_videobox( $args = array() ) {
892
 
@@ -895,8 +1145,8 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
895
  /**
896
  * Fire the action to print the custom tab
897
  *
898
- * @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
899
  * @return void
 
900
  */
901
  public function print_video_box() {
902
 
@@ -957,89 +1207,191 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
957
  *
958
  * @author Emanuela Castorina
959
  */
960
- function is_free() {
961
- return ( ! empty( $this->settings['admin-tabs'] ) && isset($this->settings['admin-tabs']['premium']));
962
- }
963
-
964
- /**
965
- * Add plugin banner
966
- */
967
- public function add_plugin_banner( $page ) {
968
-
969
- if ( $page != $this->settings['page'] || ! isset( $this->settings['class'] ) ) {
970
- return;
971
- }
972
-
973
- if( $this->is_free() && isset( $this->settings['plugin_slug'] ) ):
974
- $banners = apply_filters( 'yith_plugin_fw_banners_free', array(
975
- 'upgrade' => array(
976
- 'image' => YIT_CORE_PLUGIN_URL. '/assets/images/upgrade_banner.png',
977
- 'link' => 'https://yithemes.com/themes/plugins/'.$this->settings['plugin_slug'],
978
- ),
979
- 'rate' => array(
980
- 'image' => YIT_CORE_PLUGIN_URL. '/assets/images/rate_banner.png',
981
- 'link' => 'https://wordpress.org/plugins/'.$this->settings['plugin_slug'].'/reviews/#new-post',
982
- ),
983
- ), $page );
984
- ?>
985
  <h1 class="notice-container"></h1>
986
  <div class="yith-plugin-fw-banner yith-plugin-fw-banner-free">
987
- <h1><?php echo esc_html( $this->settings['page_title'] ) ?></h1>
988
- <?php if( $banners ) : ?>
989
  <div class="yith-banners">
990
  <ul>
991
- <?php foreach ( $banners as $banner ): ?>
992
- <li><a href="<?php echo esc_url( $banner['link'])?>" target="_blank"><img src="<?php echo esc_url( $banner['image'])?>"></a></li>
993
- <?php endforeach; ?>
994
  </ul>
995
  </div>
996
 
997
- <?php endif ?>
998
  </div>
999
- <?php else: ?>
1000
  <h1 class="notice-container"></h1>
1001
  <div class="yith-plugin-fw-banner">
1002
- <h1><?php echo esc_html( $this->settings['page_title'] ) ?>
1003
- <?php if ( isset( $this->settings['plugin_description'] ) ): ?>
1004
- <span><?php echo esc_html( $this->settings['plugin_description'] ) ?></span>
1005
- <?php endif ?>
1006
  </h1>
1007
  </div>
1008
 
1009
- <?php endif ?>
1010
- <?php
1011
- }
1012
-
1013
- /**
1014
- * Add additional element after print the field.
1015
- *
1016
- *@since 3.2
1017
- *@author Emanuela Castorina
1018
- */
1019
- public function add_yith_ui( $field ) {
1020
-
1021
- global $pagenow;
1022
-
1023
- if ( ! isset( $this->settings['class'] ) || empty( $this->settings['class'] ) || ! isset( $field['type'] ) ) {
1024
- return;
1025
- }
1026
- if ( 'admin.php' === $pagenow && strpos( get_current_screen()->id, $this->settings['page'] ) !== false ) {
1027
- switch ( $field['type'] ) {
1028
- case 'datepicker':
1029
- echo '<span class="yith-icon icon-calendar"></span>';
1030
- break;
1031
- default:
1032
- break;
1033
- }
1034
- }
1035
- }
1036
-
1037
- /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1038
  *
 
 
1039
  */
1040
- public function save_toggle_element_options( ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1041
  return true;
1042
- }
1043
  }
1044
 
1045
 
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
 
4
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
  * that is bundled with this package in the file LICENSE.txt.
6
  * It is also available through the world-wide-web at this URL:
14
  if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
15
  /**
16
  * YIT Plugin Panel
 
17
  * Setting Page to Manage Plugins
18
  *
19
  * @class YIT_Plugin_Panel
41
  /**
42
  * @var array
43
  */
44
+ protected $_main_array_options;
45
+
46
+ /**
47
+ * @var array
48
+ */
49
+ protected $_tabs_hierarchy;
50
+
51
+ /**
52
+ * @var array
53
+ */
54
+ protected static $_panel_tabs_in_wp_pages = array();
55
 
56
  /**
57
  * @var array
66
  /**
67
  * Constructor
68
  *
 
 
 
69
  * @param array $args
70
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
71
+ * @since 1.0
72
  */
73
  public function __construct( $args = array() ) {
74
 
104
  add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
105
  add_action( 'admin_init', array( $this, 'add_fields' ) );
106
 
107
+ add_action( 'admin_enqueue_scripts', array( $this, 'init_wp_with_tabs' ), 11 );
108
+
109
  // init actions once to prevent multiple actions
110
  static::_init_actions();
111
  }
112
 
113
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
114
 
115
+ //yith-plugin-ui
116
+ add_action( 'yith_plugin_fw_before_yith_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
117
+ add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
118
 
119
  }
120
 
121
+ /**
122
+ * Init actions to show YITH Panel tabs in WP Pages
123
+ *
124
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
125
+ * @since 3.4.0
126
+ */
127
+ public function init_wp_with_tabs() {
128
+ if ( !current_user_can( $this->settings[ 'capability' ] ) ) {
129
+ return;
130
+ }
131
+
132
+ global $pagenow, $post_type, $taxonomy;
133
+ $tabs = false;
134
+
135
+ if ( in_array( $pagenow, array( 'post.php', 'post-new.php', 'edit.php' ), true ) ) {
136
+ $tabs = $this->get_post_type_tabs( $post_type );
137
+ } else if ( in_array( $pagenow, array( 'edit-tags.php', 'term.php' ), true ) ) {
138
+ $tabs = $this->get_taxonomy_tabs( $taxonomy );
139
+ }
140
+
141
+ if ( $tabs ) {
142
+ // tabs_in_edit
143
+ $current_tab_args = array(
144
+ 'page' => $this->settings[ 'page' ],
145
+ 'current_tab' => isset( $tabs[ 'tab' ] ) ? $tabs[ 'tab' ] : '',
146
+ 'current_sub_tab' => isset( $tabs[ 'sub_tab' ] ) ? $tabs[ 'sub_tab' ] : ''
147
+ );
148
+
149
+ wp_enqueue_style( 'yit-plugin-style' );
150
+ wp_enqueue_style( 'yith-plugin-fw-fields' );
151
+ wp_enqueue_script( 'yith-plugin-fw-wp-pages' );
152
+
153
+ if ( !self::$_panel_tabs_in_wp_pages ) {
154
+ self::$_panel_tabs_in_wp_pages = $current_tab_args;
155
+ add_action( 'all_admin_notices', array( $this, 'print_panel_tabs_in_wp_pages' ) );
156
+ add_action( 'admin_footer', array( $this, 'print_panel_tabs_in_wp_pages_end' ) );
157
+ add_filter( 'parent_file', array( $this, 'set_parent_file_to_handle_menu_for_wp_pages' ) );
158
+ add_filter( 'submenu_file', array( $this, 'set_submenu_file_to_handle_menu_for_wp_pages' ), 10, 2 );
159
+ }
160
+ }
161
+ }
162
+
163
  /**
164
  * Init actions once to prevent multiple actions
165
  *
179
  }
180
  }
181
 
182
+ protected function _maybe_init_vars() {
183
+ if ( !isset( $this->_main_array_options ) && !isset( $this->_tabs_hierarchy ) ) {
184
+ $options_path = $this->settings[ 'options-path' ];
185
+ $this->_main_array_options = array();
186
+ $this->_tabs_hierarchy = array();
187
+
188
+ foreach ( $this->settings[ 'admin-tabs' ] as $item => $v ) {
189
+ $path = trailingslashit( $options_path ) . $item . '-options.php';
190
+ $path = apply_filters( 'yith_plugin_panel_item_options_path', $path, $options_path, $item, $this );
191
+ if ( file_exists( $path ) ) {
192
+ $_tab = include $path;
193
+ $this->_main_array_options = array_merge( $this->_main_array_options, $_tab );
194
+ $sub_tabs = $this->get_sub_tabs( $_tab );
195
+ $current_tab_key = array_keys( $_tab )[ 0 ];
196
+
197
+ $this->_tabs_hierarchy[ $current_tab_key ] = array_merge( array( 'parent' => '', 'has_sub_tabs' => !!$sub_tabs ), $this->get_tab_info_by_options( $_tab[ $current_tab_key ] ) );
198
+
199
+ foreach ( $sub_tabs as $sub_item => $sub_options ) {
200
+ if ( strpos( $sub_item, $item . '-' ) === 0 ) {
201
+ $sub_item = substr( $sub_item, strlen( $item ) + 1 );
202
+ }
203
+ $sub_tab_path = $options_path . '/' . $item . '/' . $sub_item . '-options.php';
204
+ $sub_tab_path = apply_filters( 'yith_plugin_panel_sub_tab_item_options_path', $sub_tab_path, $sub_tabs, $sub_item, $this );
205
+
206
+ if ( file_exists( $sub_tab_path ) ) {
207
+ $_sub_tab = include $sub_tab_path;
208
+ $this->_main_array_options = array_merge( $this->_main_array_options, $_sub_tab );
209
+
210
+ $current_sub_tab_key = array_keys( $_sub_tab )[ 0 ];
211
+ $this->_tabs_hierarchy[ $current_sub_tab_key ] = array_merge( array( 'parent' => $current_tab_key ), $this->get_tab_info_by_options( $_sub_tab[ $current_sub_tab_key ] ) );
212
+ }
213
+ }
214
+ }
215
+ }
216
+ }
217
+ }
218
+
219
  /**
220
  * Add yith-plugin-fw-panel in body classes in Panel pages
221
  *
222
  * @param $admin_body_classes
 
 
 
 
223
  * @return string
224
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
225
+ * @since 3.0.0
226
  */
227
  public static function add_body_class( $admin_body_classes ) {
228
  global $pagenow;
257
 
258
  /**
259
  * Remove duplicate submenu
 
260
  * Submenu page hack: Remove the duplicate YIT Plugin link on subpages
261
  *
262
  * @return void
270
 
271
  /**
272
  * Enqueue script and styles in admin side
 
273
  * Add style and scripts to administrator
274
  *
275
  * @return void
310
 
311
  /**
312
  * Register Settings
 
313
  * Generate wp-admin settings pages by registering your settings and using a few callbacks to control the output
314
  *
315
  * @return void
322
 
323
  /**
324
  * Options Validate
 
325
  * a callback function called by Register Settings function
326
  *
327
  * @param $input
 
328
  * @return array validate input fields
329
  * @since 1.0
330
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
331
  */
332
  public function options_validate( $input ) {
333
 
334
+ $option_key = !empty( $input[ 'option_key' ] ) ? $input[ 'option_key' ] : 'general';
335
 
336
  $yit_options = $this->get_main_array_options();
337
 
341
  $submit = ( !empty( $input[ 'submit-general' ] ) ? true : false );
342
  $reset = ( !empty( $input[ 'reset-general' ] ) ? true : false );
343
 
344
+ foreach ( $yit_options[ $option_key ] as $section => $data ) {
345
  foreach ( $data as $option ) {
346
  if ( isset( $option[ 'sanitize_call' ] ) && isset( $option[ 'id' ] ) ) { //yiw_debug($option, false);
347
  if ( is_array( $option[ 'sanitize_call' ] ) ) :
382
 
383
  /**
384
  * Add Setting SubPage
 
385
  * add Setting SubPage to wordpress administrator
386
  *
387
  * @return array validate input fields
430
  }
431
 
432
  /**
433
+ * Print the tabs navigation
434
  *
435
+ * @param array $args
436
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
437
+ * @since 3.4.0
 
 
438
  */
439
+ public function print_tabs_nav( $args = array() ) {
440
+ $defaults = array(
441
+ 'current_tab' => $this->get_current_tab(),
442
+ 'premium_class' => isset( $this->settings[ 'class' ] ) ? 'yith-premium' : 'premium',
443
+ 'page' => $this->settings[ 'page' ],
444
+ 'parent_page' => $this->settings[ 'parent_page' ],
445
+ 'wrapper_class' => 'nav-tab-wrapper'
446
+ );
447
+ $args = wp_parse_args( $args, $defaults );
448
+ /**
449
+ * @var string $current_tab
450
+ * @var string $premium_class
451
+ * @var string $page
452
+ * @var string $parent_page
453
+ * @var string $wrapper_class
454
+ */
455
+ extract( $args );
456
+
457
+ $tabs = '';
458
 
 
 
 
 
 
 
 
 
 
 
459
  foreach ( $this->settings[ 'admin-tabs' ] as $tab => $tab_value ) {
460
+ $active_class = ( $current_tab == $tab ) ? ' nav-tab-active' : '';
461
+ $active_class .= 'premium' == $tab ? ' ' . $premium_class : '';
462
+ $first_sub_tab = $this->get_first_sub_tab_key( $tab );
463
+ $sub_tab = !!$first_sub_tab ? $first_sub_tab : '';
464
+
465
+ $url = $this->get_nav_url( $page, $tab, $sub_tab, $parent_page );
466
+
467
+ $tabs .= '<a class="nav-tab' . $active_class . '" href="' . $url . '">' . $tab_value . '</a>';
468
  }
469
  ?>
470
+ <h2 class="<?php echo $wrapper_class ?>">
 
471
  <?php echo $tabs ?>
472
  </h2>
473
  <?php
474
+ $this->print_sub_tabs_nav( $args );
475
+ }
 
476
 
477
+ /**
478
+ * @param string $page
479
+ * @param string $tab
480
+ * @param string $sub_tab
481
+ * @param string $parent_page
482
+ * @return string
483
+ */
484
+ public function get_nav_url( $page, $tab, $sub_tab = '', $parent_page = '' ) {
485
+ $tab_hierarchy = $this->get_tabs_hierarchy();
486
+ $key = !!$sub_tab ? $sub_tab : $tab;
487
+
488
+ if ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ][ 'type' ], $tab_hierarchy[ $key ][ 'post_type' ] ) && 'post_type' === $tab_hierarchy[ $key ][ 'type' ] ) {
489
+ $url = admin_url( "edit.php?post_type={$tab_hierarchy[$key]['post_type']}" );
490
+ } elseif ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ][ 'type' ], $tab_hierarchy[ $key ][ 'taxonomy' ] ) && 'taxonomy' === $tab_hierarchy[ $key ][ 'type' ] ) {
491
+ $url = admin_url( "edit-tags.php?taxonomy={$tab_hierarchy[$key]['taxonomy']}" );
492
+ } else {
493
+ $url = !!$parent_page ? "?{$parent_page}&" : '?';
494
+ $url .= "page={$page}&tab={$tab}";
495
+ $url .= !!$sub_tab ? "&sub_tab={$sub_tab}" : '';
496
+ $url = admin_url( "admin.php{$url}" );
497
  }
498
+
499
+ return $url;
500
+ }
501
+
502
+ /**
503
+ * Print the Sub-tabs navigation if the current tab has sub-tabs
504
+ *
505
+ * @param array $args
506
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
507
+ * @since 3.4.0
508
+ */
509
+ public function print_sub_tabs_nav( $args = array() ) {
510
+ $defaults = array(
511
+ 'current_tab' => $this->get_current_tab(),
512
+ 'page' => $this->settings[ 'page' ],
513
+ 'current_sub_tab' => $this->get_current_sub_tab(),
514
+ );
515
+ $args = wp_parse_args( $args, $defaults );
516
+
517
+ /**
518
+ * @var string $current_tab
519
+ * @var string $page
520
+ * @var string $current_sub_tab
521
+ */
522
+ extract( $args );
523
+
524
+ $sub_tabs = $this->get_sub_tabs( $current_tab );
525
+
526
+ if ( $sub_tabs && $current_sub_tab ) {
527
+ include YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/sub-tabs-nav.php';
528
+ }
529
+ }
530
+
531
+ /**
532
+ * Show a tabbed panel to setting page
533
+ * a callback function called by add_setting_page => add_submenu_page
534
+ *
535
+ * @return void
536
+ * @since 1.0
537
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
538
+ */
539
+ public function yit_panel() {
540
+ $yit_options = $this->get_main_array_options();
541
+ $wrap_class = isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '';
542
+
543
+ $option_key = $this->get_current_option_key();
544
+ $custom_tab_action = $this->is_custom_tab( $yit_options, $option_key );
545
  ?>
546
+ <div class="wrap <?php echo $wrap_class ?>">
547
+ <div id="icon-themes" class="icon32"><br/></div>
548
+ <?php
549
+ do_action( 'yith_plugin_fw_before_yith_panel', $this->settings[ 'page' ] );
550
+
551
+ $this->print_tabs_nav();
552
+
553
+ if ( $custom_tab_action ) {
554
+ $this->print_custom_tab( $custom_tab_action );
555
+ return;
556
+ }
557
+
558
+ $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
559
+ ?>
560
+ <div id="wrap" class="yith-plugin-fw plugin-option yit-admin-panel-container">
561
+ <?php $this->message(); ?>
562
+ <div class="<?php echo $panel_content_class; ?>">
563
+ <h2><?php echo $this->get_tab_title() ?></h2>
564
+ <?php if ( $this->is_show_form() ) : ?>
565
+ <form id="yith-plugin-fw-panel" method="post" action="options.php">
566
+ <?php do_settings_sections( 'yit' ); ?>
567
+ <p>&nbsp;</p>
568
+ <?php settings_fields( 'yit_' . $this->settings[ 'parent' ] . '_options' ); ?>
569
+ <input type="hidden" name="<?php echo $this->get_name_field( 'option_key' ) ?>" value="<?php echo esc_attr( $option_key ) ?>"/>
570
+ <input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>" style="float:left;margin-right:10px;"/>
571
+ </form>
572
+ <form method="post">
573
+ <?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
574
+ <input type="hidden" name="yit-action" value="reset"/>
575
+ <input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset to default', 'yith-plugin-fw' ) ?>"
576
+ onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
577
+ </form>
578
  <p>&nbsp;</p>
579
+ <?php endif ?>
580
+ </div>
 
 
 
 
 
 
 
 
 
 
581
  </div>
582
  </div>
 
583
  <?php
584
  }
585
 
586
+ /**
587
+ * Check if is a custom tab
588
+ *
589
+ * @param array $options
590
+ * @param string $option_key
591
+ * @return bool
592
+ */
593
+ public function is_custom_tab( $options, $option_key ) {
594
+ foreach ( $options[ $option_key ] as $section => $option ) {
595
  if ( isset( $option[ 'type' ] ) && isset( $option[ 'action' ] ) && 'custom_tab' == $option[ 'type' ] && !empty( $option[ 'action' ] ) ) {
596
  return $option[ 'action' ];
597
  } else {
602
  return false;
603
  }
604
 
605
+ public function get_tab_type_by_options( $tab_options ) {
606
+ $first = !!$tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
607
+ $type = isset( $first[ 'type' ] ) ? $first[ 'type' ] : 'options';
608
+ $special_types = array( 'post_type', 'taxonomy', 'custom_tab', 'multi_tab' );
609
+ return in_array( $type, $special_types ) ? $type : 'options';
610
+ }
611
+
612
+ public function get_tab_info_by_options( $tab_options ) {
613
+ $type = $this->get_tab_type_by_options( $tab_options );
614
+ $info = array( 'type' => $type );
615
+ $first = !!$tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
616
+ if ( 'post_type' === $type ) {
617
+ $info[ 'post_type' ] = isset( $first[ 'post_type' ] ) ? $first[ 'post_type' ] : '';
618
+ } else if ( 'taxonomy' === $type ) {
619
+ $info[ 'taxonomy' ] = isset( $first[ 'taxonomy' ] ) ? $first[ 'taxonomy' ] : '';
620
+ }
621
+
622
+ return $info;
623
+ }
624
+
625
  /**
626
  * Fire the action to print the custom tab
627
  *
 
628
  * @param string $action Action to fire
 
629
  * @return void
630
  * @since 1.0
631
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
637
 
638
  /**
639
  * Add sections and fields to setting panel
 
640
  * read all options and show sections and fields
641
  *
642
  * @return void
645
  */
646
  public function add_fields() {
647
  $yit_options = $this->get_main_array_options();
648
+ $option_key = $this->get_current_option_key();
649
 
650
+ if ( !$option_key ) {
651
  return;
652
  }
653
+ foreach ( $yit_options[ $option_key ] as $section => $data ) {
654
+ add_settings_section( "yit_settings_{$option_key}_{$section}", $this->get_section_title( $section ), $this->get_section_description( $section ), 'yit' );
655
  foreach ( $data as $option ) {
656
  if ( isset( $option[ 'id' ] ) && isset( $option[ 'type' ] ) && isset( $option[ 'name' ] ) ) {
657
+ add_settings_field( "yit_setting_" . $option[ 'id' ], $option[ 'name' ], array( $this, 'render_field' ), 'yit', "yit_settings_{$option_key}_{$section}", array( 'option' => $option, 'label_for' => $this->get_id_field( $option[ 'id' ] ) ) );
658
  }
659
  }
660
  }
663
 
664
  /**
665
  * Add the tabs to admin bar menu
 
666
  * set all tabs of settings page on wp admin bar
667
  *
668
  * @return void|array return void when capability is false
677
  return;
678
  }
679
 
680
+ if ( !empty( $this->settings[ 'admin_tabs' ] ) ) {
681
  foreach ( $this->settings[ 'admin-tabs' ] as $item => $title ) {
682
 
683
  $wp_admin_bar->add_menu( array(
693
 
694
  /**
695
  * Get current tab
 
696
  * get the id of tab showed, return general is the current tab is not defined
697
  *
698
  * @return string
707
  }
708
  if ( isset( $_REQUEST[ 'yit_tab_options' ] ) ) {
709
  return $_REQUEST[ 'yit_tab_options' ];
710
+ } elseif ( isset( $_GET[ 'tab' ] ) ) {
711
  return $_GET[ 'tab' ];
712
  } elseif ( isset( $admin_tabs[ 0 ] ) ) {
713
  return $admin_tabs[ 0 ];
716
  }
717
  }
718
 
719
+ /**
720
+ * Get the current sub-tab
721
+ *
722
+ * @return string the key of the sub-tab if exists, empty string otherwise
723
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
724
+ * @since 3.4.0
725
+ */
726
+ public function get_current_sub_tab() {
727
+ $sub_tabs = $this->get_sub_tabs();
728
+ $sub_tab = isset( $_REQUEST[ 'sub_tab' ] ) ? $_REQUEST[ 'sub_tab' ] : '';
729
+
730
+ if ( $sub_tabs ) {
731
+ if ( $sub_tab && !isset( $sub_tabs[ $sub_tab ] ) || !$sub_tab ) {
732
+ $sub_tab = current( array_keys( $sub_tabs ) );
733
+ }
734
+ } else {
735
+ $sub_tab = '';
736
+ }
737
+
738
+ return $sub_tab;
739
+ }
740
 
741
  /**
742
+ * Return the option key related to the current page
743
+ * for sub-tabbed tabs, it will return the current sub-tab
744
+ * fot normal tabs, it will return the current tab
745
  *
746
+ * @return string the current sub-tab, if exists; the current tab otherwise
747
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
748
+ * @since 3.4.0
749
+ */
750
+ public function get_current_option_key() {
751
+ $current_tab = $this->get_current_tab();
752
+ $current_sub_tab = $this->get_current_sub_tab();
753
+
754
+ if ( !$current_tab ) {
755
+ return false;
756
+ }
757
+
758
+ return $current_sub_tab ? $current_sub_tab : $current_tab;
759
+ }
760
+
761
+
762
+ /**
763
+ * Message
764
  * define an array of message and show the content od message if
765
  * is find in the query string
766
  *
794
 
795
  /**
796
  * Get Message
 
797
  * return html code of message
798
  *
799
  * @param $message
800
  * @param string $type can be 'error' or 'updated'
801
  * @param bool $echo
802
+ * @return string
 
803
  * @since 1.0
804
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
805
  */
815
 
816
  /**
817
  * Get Tab Path Files
818
+ * return an array with file names of tabs
 
819
  *
820
  * @return array
821
  * @since 1.0
844
 
845
  /**
846
  * Get main array options
 
847
  * return an array with all options defined on options-files
848
  *
849
  * @return array
851
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
852
  */
853
  function get_main_array_options() {
854
+ $this->_maybe_init_vars();
855
+
856
+ return $this->_main_array_options;
857
+ }
858
+
859
+ function get_tabs_hierarchy() {
860
+ $this->_maybe_init_vars();
861
+
862
+ return $this->_tabs_hierarchy;
863
+ }
864
+
865
+ /**
866
+ * Return the sub-tabs array of a specific tab
867
+ *
868
+ * @param array|bool $_tab the tab; if not set it'll be the current tab
869
+ * @since 3.4.0
870
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
871
+ * @return array sub-tabs array
872
+ */
873
+ public function get_sub_tabs( $_tab = false ) {
874
+ if ( false === $_tab ) {
875
+ $_tab = $this->get_current_tab();
876
  }
877
 
878
+ if ( is_string( $_tab ) ) {
879
+ $main_array_options = $this->get_main_array_options();
880
+ $current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
881
+ if ( $current_tab_options ) {
882
+ $_tab = array( $_tab => $current_tab_options );
883
+ }
884
+ }
885
+
886
+ $_tab_options = !!$_tab && is_array( $_tab ) ? current( $_tab ) : false;
887
+ $_first = !!$_tab_options && is_array( $_tab_options ) ? current( $_tab_options ) : false;
888
+ if ( $_first && is_array( $_first ) && isset( $_first[ 'type' ] ) && 'multi_tab' === $_first[ 'type' ] && !empty( $_first[ 'sub-tabs' ] ) ) {
889
+ return $_first[ 'sub-tabs' ];
890
+ }
891
+ return array();
892
+ }
893
 
894
+ public function get_first_sub_tab_key( $_tab = false ) {
895
+ $key = false;
896
+ if ( is_string( $_tab ) ) {
897
+ $main_array_options = $this->get_main_array_options();
898
+ $current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
899
+ if ( $current_tab_options ) {
900
+ $_tab = array( $_tab => $current_tab_options );
901
  }
902
  }
903
 
904
+ if ( ( $sub_tabs = $this->get_sub_tabs( $_tab ) ) ) {
905
+ $key = current( array_keys( $sub_tabs ) );
906
+ }
907
+
908
+ return $key;
909
  }
910
 
911
 
912
  /**
913
  * Set an array with all default options
 
914
  * put default options in an array
915
  *
916
  * @return array
939
 
940
  /**
941
  * Get the title of the tab
 
942
  * return the title of tab
943
  *
944
  * @return string
956
  }
957
  }
958
  }
959
+ return '';
960
  }
961
 
962
  /**
963
  * Get the title of the section
 
964
  * return the title of section
965
  *
966
  * @param $section
 
967
  * @return string
968
  * @since 1.0
969
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
977
  return $option[ 'name' ];
978
  }
979
  }
980
+ return '';
981
  }
982
 
983
  /**
984
  * Get the description of the section
 
985
  * return the description of section if is set
986
  *
987
  * @param $section
 
988
  * @return string
989
  * @since 1.0
990
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
998
  return '<p>' . $option[ 'desc' ] . '</p>';
999
  }
1000
  }
1001
+ return '';
1002
  }
1003
 
1004
 
1005
  /**
1006
  * Show form when necessary
 
1007
  * return true if 'showform' is not defined
1008
  *
1009
  * @return bool
1012
  */
1013
  function is_show_form() {
1014
  $yit_options = $this->get_main_array_options();
1015
+ $option_key = $this->get_current_option_key();
1016
 
1017
+ foreach ( $yit_options[ $option_key ] as $sections => $data ) {
1018
  foreach ( $data as $option ) {
1019
  if ( !isset( $option[ 'type' ] ) || $option[ 'type' ] != 'title' ) {
1020
  continue;
1030
 
1031
  /**
1032
  * Get name field
 
1033
  * return a string with the name of the input field
1034
  *
1035
  * @param string $name
 
1036
  * @return string
1037
  * @since 1.0
1038
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1043
 
1044
  /**
1045
  * Get id field
 
1046
  * return a string with the id of the input field
1047
  *
1048
  * @param string $id
 
1049
  * @return string
1050
  * @since 1.0
1051
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1057
 
1058
  /**
1059
  * Render the field showed in the setting page
 
1060
  * include the file of the option type, if file do not exists
1061
  * return a text area
1062
  *
1063
  * @param array $param
 
1064
  * @return void
1065
  * @since 1.0
1066
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1100
 
1101
  /**
1102
  * Get options from db
 
1103
  * return the options from db, if the options aren't defined in the db,
1104
  * get the default options ad add the options in the db
1105
  *
1119
  /**
1120
  * Show a box panel with specific content in two columns as a new woocommerce type
1121
  *
 
1122
  * @param array $args
 
1123
  * @return void
1124
  * @since 1.0
1125
  * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
1134
  /**
1135
  * Show a box panel with specific content in two columns as a new woocommerce type
1136
  *
 
 
1137
  * @param array $args
 
1138
  * @return void
1139
+ * @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
1140
  */
1141
  public static function add_videobox( $args = array() ) {
1142
 
1145
  /**
1146
  * Fire the action to print the custom tab
1147
  *
 
1148
  * @return void
1149
+ * @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
1150
  */
1151
  public function print_video_box() {
1152
 
1207
  *
1208
  * @author Emanuela Castorina
1209
  */
1210
+ function is_free() {
1211
+ return ( !empty( $this->settings[ 'admin-tabs' ] ) && isset( $this->settings[ 'admin-tabs' ][ 'premium' ] ) );
1212
+ }
1213
+
1214
+ /**
1215
+ * Add plugin banner
1216
+ */
1217
+ public function add_plugin_banner( $page ) {
1218
+
1219
+ if ( $page != $this->settings[ 'page' ] || !isset( $this->settings[ 'class' ] ) ) {
1220
+ return;
1221
+ }
1222
+
1223
+ if ( $this->is_free() && isset( $this->settings[ 'plugin_slug' ] ) ):
1224
+ $banners = apply_filters( 'yith_plugin_fw_banners_free', array(
1225
+ 'upgrade' => array(
1226
+ 'image' => YIT_CORE_PLUGIN_URL . '/assets/images/upgrade_banner.png',
1227
+ 'link' => 'https://yithemes.com/themes/plugins/' . $this->settings[ 'plugin_slug' ],
1228
+ ),
1229
+ 'rate' => array(
1230
+ 'image' => YIT_CORE_PLUGIN_URL . '/assets/images/rate_banner.png',
1231
+ 'link' => 'https://wordpress.org/support/plugin/' . $this->settings[ 'plugin_slug' ] . '/reviews/?rate=5#new-post',
1232
+ ),
1233
+ ), $page );
1234
+ ?>
1235
  <h1 class="notice-container"></h1>
1236
  <div class="yith-plugin-fw-banner yith-plugin-fw-banner-free">
1237
+ <h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?></h1>
1238
+ <?php if ( $banners ) : ?>
1239
  <div class="yith-banners">
1240
  <ul>
1241
+ <?php foreach ( $banners as $banner ): ?>
1242
+ <li><a href="<?php echo esc_url( $banner[ 'link' ] ) ?>" target="_blank"><img src="<?php echo esc_url( $banner[ 'image' ] ) ?>"></a></li>
1243
+ <?php endforeach; ?>
1244
  </ul>
1245
  </div>
1246
 
1247
+ <?php endif ?>
1248
  </div>
1249
+ <?php else: ?>
1250
  <h1 class="notice-container"></h1>
1251
  <div class="yith-plugin-fw-banner">
1252
+ <h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?>
1253
+ <?php if ( isset( $this->settings[ 'plugin_description' ] ) ): ?>
1254
+ <span><?php echo esc_html( $this->settings[ 'plugin_description' ] ) ?></span>
1255
+ <?php endif ?>
1256
  </h1>
1257
  </div>
1258
 
1259
+ <?php endif ?>
1260
+ <?php
1261
+ }
1262
+
1263
+ /**
1264
+ * Add additional element after print the field.
1265
+ *
1266
+ * @since 3.2
1267
+ * @author Emanuela Castorina
1268
+ */
1269
+ public function add_yith_ui( $field ) {
1270
+ global $pagenow;
1271
+
1272
+ $screen = function_exists('get_current_screen') ? get_current_screen() : false;
1273
+
1274
+ if ( empty( $this->settings[ 'class' ] ) || !isset( $field[ 'type' ] ) ) {
1275
+ return;
1276
+ }
1277
+ if ( 'admin.php' === $pagenow && $screen && strpos( $screen->id, $this->settings[ 'page' ] ) !== false ) {
1278
+ switch ( $field[ 'type' ] ) {
1279
+ case 'datepicker':
1280
+ echo '<span class="yith-icon icon-calendar"></span>';
1281
+ break;
1282
+ default:
1283
+ break;
1284
+ }
1285
+ }
1286
+ }
1287
+
1288
+
1289
+ public function get_post_type_tabs( $post_type ) {
1290
+ $tabs = array();
1291
+
1292
+ foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
1293
+ if ( isset( $info[ 'type' ], $info[ 'post_type' ] ) && 'post_type' === $info[ 'type' ] && $post_type === $info[ 'post_type' ] ) {
1294
+ if ( !empty( $info[ 'parent' ] ) ) {
1295
+ $tabs = array( 'tab' => $info[ 'parent' ], 'sub_tab' => $key );
1296
+ } else {
1297
+ $tabs = array( 'tab' => $key );
1298
+ }
1299
+ break;
1300
+ }
1301
+ }
1302
+ return $tabs;
1303
+ }
1304
+
1305
+ public function get_taxonomy_tabs( $taxonomy ) {
1306
+ $tabs = array();
1307
+
1308
+ foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
1309
+ if ( isset( $info[ 'type' ], $info[ 'taxonomy' ] ) && 'taxonomy' === $info[ 'type' ] && $taxonomy === $info[ 'taxonomy' ] ) {
1310
+ if ( !empty( $info[ 'parent' ] ) ) {
1311
+ $tabs = array( 'tab' => $info[ 'parent' ], 'sub_tab' => $key );
1312
+ } else {
1313
+ $tabs = array( 'tab' => $key );
1314
+ }
1315
+ break;
1316
+ }
1317
+ }
1318
+ return $tabs;
1319
+ }
1320
+
1321
+
1322
+ /**
1323
+ * If the panel page is a WP Page, this will redirect you to the correct page
1324
+ * useful when a Post Type (Taxonomy) is the first tab of your panel, so when you open your panel it'll open the Post Type (Taxonomy) list
1325
+ *
1326
+ * @since 3.4.0
1327
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
1328
+ */
1329
+ public function maybe_redirect_to_proper_wp_page() {
1330
+ if ( !isset( $_REQUEST[ 'yith-plugin-fw-panel-skip-redirect' ] ) ) {
1331
+ $url = $this->get_nav_url( $this->settings[ 'page' ], $this->get_current_tab(), $this->get_current_sub_tab() );
1332
+ if ( strpos( $url, 'edit.php' ) !== false || strpos( $url, 'edit-tags.php' ) !== false ) {
1333
+ wp_safe_redirect( add_query_arg( array( 'yith-plugin-fw-panel-skip-redirect' => 1 ), $url ) );
1334
+ exit;
1335
+ }
1336
+ }
1337
+ }
1338
+
1339
+ /**
1340
+ * Print the Panel tabs and sub-tabs navigation in WP pages
1341
+ * Important: this opens a wrapper <div> that will be closed through YIT_Plugin_Panel::print_panel_tabs_in_post_edit_page_end()
1342
+ *
1343
+ * @since 3.4.0
1344
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
1345
+ */
1346
+ public function print_panel_tabs_in_wp_pages() {
1347
+ if ( self::$_panel_tabs_in_wp_pages ) {
1348
+ wp_enqueue_style( 'yit-plugin-style' );
1349
+ $wrap_class = isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '';
1350
+
1351
+ ?>
1352
+ <div class="yith-plugin-fw-wp-page-wrapper">
1353
+ <?php
1354
+ echo "<div class='{$wrap_class}'>";
1355
+ $this->add_plugin_banner( $this->settings[ 'page' ] );
1356
+ $this->print_tabs_nav( self::$_panel_tabs_in_wp_pages );
1357
+ echo "</div>";
1358
+ }
1359
+ }
1360
+
1361
+
1362
+ /**
1363
+ * Close the wrapper opened in YIT_Plugin_Panel::print_panel_tabs_in_wp_pages()
1364
  *
1365
+ * @since 3.4.0
1366
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
1367
  */
1368
+ public function print_panel_tabs_in_wp_pages_end() {
1369
+ if ( self::$_panel_tabs_in_wp_pages ) {
1370
+ echo "</div><!-- /yith-plugin-fw-wp-page-wrapper -->";
1371
+ }
1372
+ }
1373
+
1374
+ public function set_parent_file_to_handle_menu_for_wp_pages( $parent_file ) {
1375
+ if ( self::$_panel_tabs_in_wp_pages ) {
1376
+ return 'yith_plugin_panel';
1377
+ }
1378
+
1379
+ return $parent_file;
1380
+ }
1381
+
1382
+ public function set_submenu_file_to_handle_menu_for_wp_pages( $submenu_file, $parent_file ) {
1383
+ if ( self::$_panel_tabs_in_wp_pages ) {
1384
+ return $this->settings[ 'page' ];
1385
+ }
1386
+ return $submenu_file;
1387
+ }
1388
+
1389
+ /**
1390
+ *
1391
+ */
1392
+ public function save_toggle_element_options() {
1393
  return true;
1394
+ }
1395
  }
1396
 
1397
 
plugin-fw/lib/yit-plugin-subpanel.php CHANGED
@@ -36,11 +36,6 @@ if ( !class_exists( 'YIT_Plugin_SubPanel' ) ) {
36
  public $settings = array();
37
 
38
 
39
- /**
40
- * @var array
41
- */
42
- private $_main_array_options = array();
43
-
44
  /**
45
  * Constructor
46
  *
36
  public $settings = array();
37
 
38
 
 
 
 
 
 
39
  /**
40
  * Constructor
41
  *
plugin-fw/templates/fields/checkbox-array.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
+ * that is bundled with this package in the file LICENSE.txt.
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.gnu.org/licenses/gpl-3.0.txt
8
+ *
9
+ * @var array $field
10
+ */
11
+
12
+ /** @since 3.4.0 */
13
+
14
+ !defined( 'ABSPATH' ) && exit; // Exit if accessed directly
15
+
16
+ extract( $field );
17
+
18
+ $class = isset( $class ) ? $class : '';
19
+ $class = 'yith-plugin-fw-checkbox-array ' . $class;
20
+
21
+ $value = is_array( $value ) ? $value : array();
22
+ ?>
23
+ <div class="<?php echo $class ?>" id="<?php echo $id ?>"
24
+ <?php echo $custom_attributes ?>
25
+ <?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?> >
26
+ <?php foreach ( $options as $key => $label ) :
27
+ $checkbox_id = sanitize_key( $id . '-' . $key );
28
+ ?>
29
+ <div class="yith-plugin-fw-checkbox-array__row">
30
+ <input type="checkbox" id="<?php echo $checkbox_id ?>" name="<?php echo $name ?>[]" value="<?php echo esc_attr( $key ) ?>" <?php checked( in_array( $key, $value ) ); ?> />
31
+ <label for="<?php echo $checkbox_id ?>"><?php echo $label ?></label>
32
+ </div>
33
+ <?php endforeach; ?>
34
+ </div>
35
+
plugin-fw/templates/fields/country-select.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
+ * that is bundled with this package in the file LICENSE.txt.
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.gnu.org/licenses/gpl-3.0.txt
8
+ *
9
+ * @var array $field
10
+ */
11
+
12
+ !defined( 'ABSPATH' ) && exit; // Exit if accessed directly
13
+
14
+ extract( $field );
15
+ $placeholder = isset( $placeholder ) ? ' data-placeholder = "' . $placeholder . '" ' : '';
16
+
17
+
18
+ $country_setting = (string) $value;
19
+
20
+ if ( strstr( $country_setting, ':' ) ) {
21
+ $country_setting = explode( ':', $country_setting );
22
+ $selected_country = current( $country_setting );
23
+ $selected_state = end( $country_setting );
24
+ } else {
25
+ $selected_country = $country_setting;
26
+ $selected_state = '*';
27
+ }
28
+ $countries = WC()->countries->get_countries();
29
+ $class = isset( $class ) ? $class : 'yith-plugin-fw-select';
30
+ ?>
31
+ <select<?php echo $multiple_html ?>
32
+ id="<?php echo $id ?>"
33
+ name="<?php echo $name ?>" <?php echo isset( $std ) ? " data-std='{$std}'" : '' ?>
34
+ class="wc-enhanced-select <?php echo $class ?>"
35
+ <?php echo $placeholder ?>
36
+ <?php echo $custom_attributes ?>
37
+ <?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>>
38
+ <?php
39
+ if ( $countries ) {
40
+ foreach ( $countries as $key => $value ) {
41
+ $states = WC()->countries->get_states( $key );
42
+ if ( $states ) {
43
+ echo '<optgroup label="' . esc_attr( $value ) . '">';
44
+ foreach ( $states as $state_key => $state_value ) {
45
+ echo '<option value="' . esc_attr( $key ) . ':' . esc_attr( $state_key ) . '"';
46
+
47
+ if ( $selected_country === $key && $selected_state === $state_key ) {
48
+ echo ' selected="selected"';
49
+ }
50
+
51
+ echo '>' . esc_html( $value ) . ' &mdash; ' . $state_value . '</option>'; // WPCS: XSS ok.
52
+ }
53
+ echo '</optgroup>';
54
+ } else {
55
+ echo '<option';
56
+ if ( $selected_country === $key && '*' === $selected_state ) {
57
+ echo ' selected="selected"';
58
+ }
59
+ echo ' value="' . esc_attr( $key ) . '">' . $value . '</option>'; // WPCS: XSS ok.
60
+ }
61
+ }
62
+ }
63
+ ?>
64
+ </select>
plugin-fw/templates/fields/datepicker.php CHANGED
@@ -1,7 +1,6 @@
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
4
- *
5
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
  * that is bundled with this package in the file LICENSE.txt.
7
  * It is also available through the world-wide-web at this URL:
@@ -20,5 +19,6 @@ $class = !empty( $class ) ? $class : 'yith-plugin-fw-datepicker';
20
  id="<?php echo $id ?>"
21
  value="<?php echo esc_attr( $value ) ?>"
22
  class="<?php echo $class ?>"
 
23
  <?php echo $custom_attributes ?>
24
  <?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>/>
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
 
4
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
  * that is bundled with this package in the file LICENSE.txt.
6
  * It is also available through the world-wide-web at this URL:
19
  id="<?php echo $id ?>"
20
  value="<?php echo esc_attr( $value ) ?>"
21
  class="<?php echo $class ?>"
22
+ autocomplete="off"
23
  <?php echo $custom_attributes ?>
24
  <?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>/>
plugin-fw/templates/fields/onoff.php CHANGED
@@ -1,7 +1,6 @@
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
4
- *
5
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
  * that is bundled with this package in the file LICENSE.txt.
7
  * It is also available through the world-wide-web at this URL:
@@ -15,8 +14,12 @@
15
  extract( $field );
16
  ?>
17
 
18
- <div class="yith-plugin-fw-onoff-container">
19
- <input type="checkbox" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>" <?php checked( yith_plugin_fw_is_true( $value ) ) ?> class="on_off" <?php if ( isset( $std ) ) : ?>data-std="<?php echo $std ?>"<?php endif ?> />
 
 
 
 
20
  <span class="yith-plugin-fw-onoff"></span>
21
  </div>
22
  <?php
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
 
4
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
  * that is bundled with this package in the file LICENSE.txt.
6
  * It is also available through the world-wide-web at this URL:
14
  extract( $field );
15
  ?>
16
 
17
+ <div class="yith-plugin-fw-onoff-container <?php echo !empty( $class ) ? $class : ''; ?>"
18
+ <?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>>
19
+ <input type="checkbox" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>"
20
+ <?php checked( yith_plugin_fw_is_true( $value ) ) ?> class="on_off" <?php if ( isset( $std ) ) : ?>data-std="<?php echo $std ?>"<?php endif ?>
21
+ <?php echo $custom_attributes ?>
22
+ />
23
  <span class="yith-plugin-fw-onoff"></span>
24
  </div>
25
  <?php
plugin-fw/templates/fields/title.php CHANGED
@@ -13,5 +13,5 @@
13
 
14
  extract( $field );
15
  ?>
16
- <h3 class="title" <?php echo $custom_attributes ?>
17
  <?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>><?php echo $desc ?></h3>
13
 
14
  extract( $field );
15
  ?>
16
+ <h3 id="<?php echo $id ?>" class="title" <?php echo $custom_attributes ?>
17
  <?php if ( isset( $data ) ) echo yith_plugin_fw_html_data_to_string( $data ); ?>><?php echo $desc ?></h3>
plugin-fw/templates/fields/toggle-element.php CHANGED
@@ -1,53 +1,54 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit;
4
  }
5
 
6
  //delete_option('ywraq_toggle_element');
7
  $defaults = array(
8
- 'id' => '',
9
- 'add_button' => '',
10
- 'name' => '',
11
- 'class' => '',
12
- 'custom_attributes' => '',
13
- 'elements' => array(),
14
- 'title' => '',
15
- 'subtitle' => '',
16
- 'onoff_field' => array(),
17
- //is an array to print a onoff field, if need to call an ajax action, add 'ajax_action' => 'myaction' in the array args,
18
- 'sortable' => false,
19
- 'save_button' => array(),
20
- 'delete_button' => array()
21
 
22
  );
23
- $field = wp_parse_args( $field, $defaults );
24
 
25
  extract( $field );
26
 
27
- $show_add_button = isset( $add_button ) && $add_button;
28
  $add_button_closed = isset( $add_button_closed ) ? $add_button_closed : '';
29
- $values = isset( $value ) ? $value : get_option( $name, array() );
30
- $values = maybe_unserialize( $values );
31
- $sortable = isset( $sortable ) ? $sortable : false;
32
- $class_wrapper = $sortable ? 'ui-sortable' : '';
33
- $onoff_id = isset( $onoff_field['id'] ) ? $onoff_field['id'] : '';
34
  $ajax_nonce = wp_create_nonce( 'save-toggle-element' );
35
 
36
- if ( empty( $values ) && ! $show_add_button && $elements ) {
37
  $values = array();
38
- //populate a toggle element with the default
39
- foreach ( $elements as $element ) {
40
- $values[0][ $element['id'] ] = $element['default'];
41
- }
42
  }
43
 
 
44
  ?>
45
  <div class="yith-toggle_wrapper <?php echo $class_wrapper ?>" id="<?php echo $id ?>" data-nonce="<?php echo $ajax_nonce; ?>">
46
- <?php
47
 
48
- if ( $show_add_button ):
49
 
50
- ?>
51
  <button class="yith-add-button yith-add-box-button"
52
  data-box_id="<?php echo $id; ?>_add_box"
53
  data-closed_label="<?php echo esc_attr( $add_button_closed ) ?>"
@@ -55,216 +56,232 @@ if ( empty( $values ) && ! $show_add_button && $elements ) {
55
  <div id="<?php echo $id; ?>_add_box" class="yith-add-box">
56
  </div>
57
  <script type="text/template" id="tmpl-yith-toggle-element-add-box-content-<?php echo $id ?>">
58
- <?php foreach ( $elements as $element ):
59
- $element['title'] = $element['name'];
 
 
 
 
 
 
 
60
 
61
- $element['type'] = isset( $element['yith-type'] ) ? $element['yith-type'] : $element['type'];
62
- unset( $element['yith-type'] );
63
- $element['value'] = isset($element['default']) ? $element['default'] : '';
64
- $element['id'] = 'new_'.$element['id'];
65
- $element['name'] = $name. "[{{{data.index}}}][" . $element['id'] . "]";
66
- $class_element = isset( $element['class_row'] ) ? $element['class_row'] : '';
67
- ?>
68
- <div class="yith-add-box-row <?php echo $class_element ?> <?php echo '{{{data.index}}}'?>">
69
 
70
- <label for="<?php echo $element['id']; ?>"><?php echo ( $element['title'] ); ?></label>
71
  <div class="yith-plugin-fw-option-with-description">
72
- <?php
73
- echo yith_plugin_fw_get_field( $element, true ); ?>
74
- <span class="description"><?php echo ! empty( $element['desc'] ) ? $element['desc'] : ''; ?></span>
75
  </div>
76
  </div>
77
- <?php endforeach; ?>
78
 
 
79
  <div class="yith-add-box-buttons">
80
  <button class="button-primary yith-save-button">
81
- <?php echo $save_button['name'] ; ?>
82
  </button>
83
  </div>
 
84
  </script>
85
- <?php endif; ?>
86
 
87
  <div class="yith-toggle-elements">
88
- <?php
89
- if ($values ):
90
- //print toggle elements
91
- foreach ( $values as $i => $value ):
92
- $title_element = yith_format_toggle_title( $title, $value );
93
- $title_element = apply_filters( 'yith_plugin_fw_toggle_element_title_' . $id, $title_element, $elements, $value );
94
- $subtitle_element = yith_format_toggle_title( $subtitle, $value );
95
- $subtitle_element = apply_filters( 'yith_plugin_fw_toggle_element_subtitle_' . $id, $subtitle_element, $elements, $value );
96
- ?>
97
 
98
- <div id="<?php echo $id; ?>_<?php echo $i; ?>"
99
- class="yith-toggle-row <?php echo ! empty( $subtitle ) ? 'with-subtitle' : ''; ?> <?php echo $class; ?>" <?php echo $custom_attributes; ?>
100
- data-item_key="<?php echo esc_attr( $i ) ?>">
101
- <div class="yith-toggle-title">
102
- <h3>
103
  <span class="title"
104
  data-title_format="<?php echo esc_attr( $title ) ?>"><?php echo $title_element ?></span>
105
- <?php if ( ! empty( $subtitle_element ) ): ?>
106
- <div class="subtitle"
107
- data-subtitle_format="<?php echo esc_attr( $subtitle ) ?>"><?php echo $subtitle_element; ?></div>
108
- <?php endif; ?>
109
- </h3>
110
- <span class="yith-toggle">
111
  <span class="yith-icon yith-icon-arrow_right ui-sortable-handle"></span>
112
  </span>
113
- <?php
114
- if ( ! empty( $onoff_field ) && is_array( $onoff_field ) ):
115
- $action = ! empty( $onoff_field['ajax_action'] ) ? 'data-ajax_action="' . $onoff_field['ajax_action'] . '"' : '';
116
- $onoff_field['value'] = isset( $value[ $onoff_id ] ) ? $value[ $onoff_id ] : $onoff_field['default'];
117
- $onoff_field['type'] = 'onoff';
118
- $onoff_field['name'] = $name. "[$i][" . $onoff_id . "]";
119
- $onoff_field['id'] = $onoff_id.'_'.$i;
120
- unset( $onoff_field['yith-type'] );
121
- ?>
122
- <span class="yith-toggle-onoff" <?php echo $action; ?> >
123
  <?php
124
  echo yith_plugin_fw_get_field( $onoff_field, true );
125
  ?>
126
  </span>
127
 
128
- <?php if ( $sortable ): ?>
129
- <span class="yith-icon yith-icon-drag"></span>
130
- <?php endif ?>
131
 
132
- <?php endif; ?>
133
- </div>
134
- <div class="yith-toggle-content">
135
- <?php
136
- if ( $elements && count( $elements ) > 0 ) {
137
- foreach ( $elements as $element ):
138
- $element['type'] = isset( $element['yith-type'] ) ? $element['yith-type'] : $element['type'];
139
- unset( $element['yith-type'] );
140
- $element['title'] = $element['name'];
141
- $element['name'] = $name . "[$i][" . $element['id'] . "]";
142
- $element['value'] = isset( $value[ $element['id'] ] ) ? $value[ $element['id'] ] : $element['default'];
143
- $element['id'] = $element['id'].'_'.$i;
144
- $element['class_row'] = isset( $element['class_row'] ) ? $element['class_row'] : '';
145
- ?>
146
- <div class="yith-toggle-content-row <?php echo $element['class_row'].' '.$element['type'] ?>">
147
- <label for="<?php echo $element['id']; ?>"><?php echo $element['title']; ?></label>
148
- <div class="yith-plugin-fw-option-with-description">
149
- <?php echo yith_plugin_fw_get_field( $element, true ); ?>
150
- <span class="description"><?php echo ! empty( $element['desc'] ) ? $element['desc'] : ''; ?></span>
 
 
 
 
 
 
151
  </div>
152
- </div>
153
- <?php endforeach;
154
- }
155
- ?>
156
- <div class="yith-toggle-content-buttons">
157
- <div class="spinner"></div>
158
- <?php
159
- if ( $save_button && ! empty( $save_button['id'] ) ):
160
- $save_button_class = isset( $save_button['class'] ) ? $save_button['class'] : '';
161
- $save_button_name = isset( $save_button['name'] ) ? $save_button['name'] : '';
162
- ?>
163
- <button id="<?php echo $save_button['id']; ?>"
164
- class="yith-save-button <?php echo $save_button_class; ?>">
165
- <?php echo $save_button_name; ?>
166
- </button>
167
- <?php endif; ?>
168
- <?php
169
- if ( $delete_button && ! empty( $delete_button['id'] ) ):
170
- $delete_button_class = isset( $delete_button['class'] ) ? $delete_button['class'] : '';
171
- $delete_button_name = isset( $delete_button['name'] ) ? $delete_button['name'] : '';
172
- ?>
173
- <button id="<?php echo $delete_button['id']; ?>"
174
- class="button-secondary yith-delete-button <?php echo $delete_button_class; ?>">
175
- <?php echo $delete_button_name; ?>
176
- </button>
177
- <?php endif; ?>
178
  </div>
179
- </div>
180
 
181
- </div>
182
- <?php endforeach;
183
- endif;
184
- ?>
185
 
186
 
187
  </div>
188
  <!-- Schedule Item template -->
189
  <script type="text/template" id="tmpl-yith-toggle-element-item-<?php echo $id ?>">
190
  <div id="<?php echo $id; ?>_{{{data.index}}}"
191
- class="yith-toggle-row highlight <?php echo ! empty( $subtitle ) ? 'with-subtitle' : ''; ?> <?php echo $class; ?>"
192
  data-item_key="{{{data.index}}}" <?php echo $custom_attributes; ?>
193
  data-item_key="{{{data.index}}}">
194
  <div class="yith-toggle-title">
195
  <h3>
196
  <span class="title" data-title_format="<?php echo esc_attr( $title ) ?>"><?php echo $title ?></span>
197
 
198
- <div class="subtitle"
199
- data-subtitle_format="<?php echo esc_attr( $subtitle ) ?>"><?php echo $subtitle ?></div>
200
 
201
  </h3>
202
  <span class="yith-toggle">
203
  <span class="yith-icon yith-icon-arrow_right"></span>
204
  </span>
205
- <?php
206
- if ( ! empty( $onoff_field ) && is_array( $onoff_field ) ):
207
- $action = ! empty( $onoff_field['ajax_action'] ) ? 'data-ajax_action="' . $onoff_field['ajax_action'] . '"' : '';
208
- $onoff_field['value'] = $onoff_field['default'];
209
- $onoff_field['type'] = 'onoff';
210
- $onoff_field['name'] = $name . "[{{{data.index}}}][" . $onoff_id . "]";
211
- $onoff_field['id'] = $onoff_id;
212
- unset( $onoff_field['yith-type'] );
213
- ?>
214
  <span class="yith-toggle-onoff" <?php echo $action; ?> >
215
  <?php
216
  echo yith_plugin_fw_get_field( $onoff_field, true );
217
  ?>
218
  </span>
219
 
220
- <?php endif; ?>
221
- <?php if ( $sortable ): ?>
222
  <span class="yith-icon yith-icon-drag ui-sortable-handle"></span>
223
- <?php endif ?>
224
  </div>
225
  <div class="yith-toggle-content">
226
- <?php
227
- if ( $elements && count( $elements ) > 0 ) {
228
- foreach ( $elements as $element ):
229
- $element['type'] = isset( $element['yith-type'] ) ? $element['yith-type'] : $element['type'];
230
- unset( $element['yith-type'] );
231
- $element['title'] = $element['name'];
232
- $element['name'] = $name . "[{{{data.index}}}][" . $element['id'] . "]";
233
- $element['id'] = $element['id'] . '_{{{data.index}}}';
234
- $class_element = isset( $element['class_row'] ) ? $element['class_row'] : '';
235
- ?>
236
- <div class="yith-toggle-content-row <?php echo $class_element.' '.$element['type'] ?>">
237
- <label for="<?php echo $element['id']; ?>"><?php echo $element['title']; ?></label>
 
 
 
 
238
  <div class="yith-plugin-fw-option-with-description">
239
- <?php echo yith_plugin_fw_get_field( $element, true ); ?>
240
- <span class="description"><?php echo ! empty( $element['desc'] ) ? $element['desc'] : ''; ?></span>
241
  </div>
242
  </div>
243
- <?php endforeach;
244
- }
245
- ?>
246
  <div class="yith-toggle-content-buttons">
247
  <div class="spinner"></div>
248
- <?php
249
- if ( $save_button && ! empty( $save_button['id'] ) ):
250
- $save_button_class = isset( $save_button['class'] ) ? $save_button['class'] : '';
251
- $save_button_name = isset( $save_button['name'] ) ? $save_button['name'] : '';
252
- ?>
253
- <button id="<?php echo $save_button['id']; ?>"
254
  class="yith-save-button <?php echo $save_button_class; ?>">
255
- <?php echo $save_button_name; ?>
256
  </button>
257
- <?php endif; ?>
258
- <?php
259
- if ( $delete_button && ! empty( $delete_button['id'] ) ):
260
- $delete_button_class = isset( $delete_button['class'] ) ? $delete_button['class'] : '';
261
- $delete_button_name = isset( $delete_button['name'] ) ? $delete_button['name'] : '';
262
  ?>
263
- <button id="<?php echo $delete_button['id']; ?>"
264
  class="button-secondary yith-delete-button <?php echo $delete_button_class; ?>">
265
- <?php echo $delete_button_name; ?>
266
  </button>
267
- <?php endif; ?>
268
  </div>
269
  </div>
270
  </div>
1
  <?php
2
+ if ( !defined( 'ABSPATH' ) ) {
3
+ exit;
4
  }
5
 
6
  //delete_option('ywraq_toggle_element');
7
  $defaults = array(
8
+ 'id' => '',
9
+ 'add_button' => '',
10
+ 'name' => '',
11
+ 'class' => '',
12
+ 'custom_attributes' => '',
13
+ 'elements' => array(),
14
+ 'title' => '',
15
+ 'subtitle' => '',
16
+ 'onoff_field' => array(),
17
+ //is an array to print a onoff field, if need to call an ajax action, add 'ajax_action' => 'myaction' in the array args,
18
+ 'sortable' => false,
19
+ 'save_button' => array(),
20
+ 'delete_button' => array()
21
 
22
  );
23
+ $field = wp_parse_args( $field, $defaults );
24
 
25
  extract( $field );
26
 
27
+ $show_add_button = isset( $add_button ) && $add_button;
28
  $add_button_closed = isset( $add_button_closed ) ? $add_button_closed : '';
29
+ $values = isset( $value ) ? $value : get_option( $name, array() );
30
+ $values = maybe_unserialize( $values );
31
+ $sortable = isset( $sortable ) ? $sortable : false;
32
+ $class_wrapper = $sortable ? 'ui-sortable' : '';
33
+ $onoff_id = isset( $onoff_field[ 'id' ] ) ? $onoff_field[ 'id' ] : '';
34
  $ajax_nonce = wp_create_nonce( 'save-toggle-element' );
35
 
36
+ if ( empty( $values ) && !$show_add_button && $elements ) {
37
  $values = array();
38
+ //populate a toggle element with the default
39
+ foreach ( $elements as $element ) {
40
+ $values[ 0 ][ $element[ 'id' ] ] = $element[ 'default' ];
41
+ }
42
  }
43
 
44
+
45
  ?>
46
  <div class="yith-toggle_wrapper <?php echo $class_wrapper ?>" id="<?php echo $id ?>" data-nonce="<?php echo $ajax_nonce; ?>">
47
+ <?php
48
 
49
+ if ( $show_add_button ):
50
 
51
+ ?>
52
  <button class="yith-add-button yith-add-box-button"
53
  data-box_id="<?php echo $id; ?>_add_box"
54
  data-closed_label="<?php echo esc_attr( $add_button_closed ) ?>"
56
  <div id="<?php echo $id; ?>_add_box" class="yith-add-box">
57
  </div>
58
  <script type="text/template" id="tmpl-yith-toggle-element-add-box-content-<?php echo $id ?>">
59
+ <?php foreach ( $elements as $element ):
60
+ $element[ 'title' ] = $element[ 'name' ];
61
+
62
+ $element[ 'type' ] = isset( $element[ 'yith-type' ] ) ? $element[ 'yith-type' ] : $element[ 'type' ];
63
+ unset( $element[ 'yith-type' ] );
64
+ $element[ 'value' ] = isset( $element[ 'default' ] ) ? $element[ 'default' ] : '';
65
+ $element[ 'id' ] = 'new_' . $element[ 'id' ];
66
+ $element[ 'name' ] = $name . "[{{{data.index}}}][" . $element[ 'id' ] . "]";
67
+ $class_element = isset( $element[ 'class_row' ] ) ? $element[ 'class_row' ] : '';
68
 
69
+ $is_required = !empty( $element[ 'required' ] );
70
+ if ( $is_required ) {
71
+ $class_element .= ' yith-plugin-fw--required';
72
+ }
73
+ ?>
74
+ <div class="yith-add-box-row <?php echo $class_element ?> <?php echo '{{{data.index}}}' ?>">
 
 
75
 
76
+ <label for="<?php echo $element[ 'id' ]; ?>"><?php echo( $element[ 'title' ] ); ?></label>
77
  <div class="yith-plugin-fw-option-with-description">
78
+ <?php
79
+ echo yith_plugin_fw_get_field( $element, true ); ?>
80
+ <span class="description"><?php echo !empty( $element[ 'desc' ] ) ? $element[ 'desc' ] : ''; ?></span>
81
  </div>
82
  </div>
83
+ <?php endforeach; ?>
84
 
85
+ <?php if( !empty( $save_button ) ) : ?>
86
  <div class="yith-add-box-buttons">
87
  <button class="button-primary yith-save-button">
88
+ <?php echo $save_button[ 'name' ]; ?>
89
  </button>
90
  </div>
91
+ <?php endif; ?>
92
  </script>
93
+ <?php endif; ?>
94
 
95
  <div class="yith-toggle-elements">
96
+ <?php
97
+ if ( $values ):
98
+ //print toggle elements
99
+ foreach ( $values as $i => $value ):
100
+ $title_element = yith_format_toggle_title( $title, $value );
101
+ $title_element = apply_filters( 'yith_plugin_fw_toggle_element_title_' . $id, $title_element, $elements, $value );
102
+ $subtitle_element = yith_format_toggle_title( $subtitle, $value );
103
+ $subtitle_element = apply_filters( 'yith_plugin_fw_toggle_element_subtitle_' . $id, $subtitle_element, $elements, $value );
104
+ ?>
105
 
106
+ <div id="<?php echo $id; ?>_<?php echo $i; ?>"
107
+ class="yith-toggle-row <?php echo !empty( $subtitle ) ? 'with-subtitle' : ''; ?> <?php echo $class; ?>" <?php echo $custom_attributes; ?>
108
+ data-item_key="<?php echo esc_attr( $i ) ?>">
109
+ <div class="yith-toggle-title">
110
+ <h3>
111
  <span class="title"
112
  data-title_format="<?php echo esc_attr( $title ) ?>"><?php echo $title_element ?></span>
113
+ <?php if ( !empty( $subtitle_element ) ): ?>
114
+ <div class="subtitle"
115
+ data-subtitle_format="<?php echo esc_attr( $subtitle ) ?>"><?php echo $subtitle_element; ?></div>
116
+ <?php endif; ?>
117
+ </h3>
118
+ <span class="yith-toggle">
119
  <span class="yith-icon yith-icon-arrow_right ui-sortable-handle"></span>
120
  </span>
121
+ <?php
122
+ if ( !empty( $onoff_field ) && is_array( $onoff_field ) ):
123
+ $action = !empty( $onoff_field[ 'ajax_action' ] ) ? 'data-ajax_action="' . $onoff_field[ 'ajax_action' ] . '"' : '';
124
+ $onoff_field[ 'value' ] = isset( $value[ $onoff_id ] ) ? $value[ $onoff_id ] : $onoff_field[ 'default' ];
125
+ $onoff_field[ 'type' ] = 'onoff';
126
+ $onoff_field[ 'name' ] = $name . "[$i][" . $onoff_id . "]";
127
+ $onoff_field[ 'id' ] = $onoff_id . '_' . $i;
128
+ unset( $onoff_field[ 'yith-type' ] );
129
+ ?>
130
+ <span class="yith-toggle-onoff" <?php echo $action; ?> >
131
  <?php
132
  echo yith_plugin_fw_get_field( $onoff_field, true );
133
  ?>
134
  </span>
135
 
136
+ <?php if ( $sortable ): ?>
137
+ <span class="yith-icon yith-icon-drag"></span>
138
+ <?php endif ?>
139
 
140
+ <?php endif; ?>
141
+ </div>
142
+ <div class="yith-toggle-content">
143
+ <?php
144
+ if ( $elements && count( $elements ) > 0 ) {
145
+ foreach ( $elements as $element ):
146
+ $element[ 'type' ] = isset( $element[ 'yith-type' ] ) ? $element[ 'yith-type' ] : $element[ 'type' ];
147
+ unset( $element[ 'yith-type' ] );
148
+ $element[ 'title' ] = $element[ 'name' ];
149
+ $element[ 'name' ] = $name . "[$i][" . $element[ 'id' ] . "]";
150
+ $element[ 'value' ] = isset( $value[ $element[ 'id' ] ] ) ? $value[ $element[ 'id' ] ] : $element[ 'default' ];
151
+ $element[ 'id' ] = $element[ 'id' ] . '_' . $i;
152
+ $element[ 'class_row' ] = isset( $element[ 'class_row' ] ) ? $element[ 'class_row' ] : '';
153
+
154
+ $is_required = !empty( $element[ 'required' ] );
155
+ if ( $is_required ) {
156
+ $element[ 'class_row' ] .= ' yith-plugin-fw--required';
157
+ }
158
+ ?>
159
+ <div class="yith-toggle-content-row <?php echo $element[ 'class_row' ] . ' ' . $element[ 'type' ] ?>">
160
+ <label for="<?php echo $element[ 'id' ]; ?>"><?php echo $element[ 'title' ]; ?></label>
161
+ <div class="yith-plugin-fw-option-with-description">
162
+ <?php echo yith_plugin_fw_get_field( $element, true ); ?>
163
+ <span class="description"><?php echo !empty( $element[ 'desc' ] ) ? $element[ 'desc' ] : ''; ?></span>
164
+ </div>
165
  </div>
166
+ <?php endforeach;
167
+ }
168
+ ?>
169
+ <div class="yith-toggle-content-buttons">
170
+ <div class="spinner"></div>
171
+ <?php
172
+ if ( $save_button && !empty( $save_button[ 'id' ] ) ):
173
+ $save_button_class = isset( $save_button[ 'class' ] ) ? $save_button[ 'class' ] : '';
174
+ $save_button_name = isset( $save_button[ 'name' ] ) ? $save_button[ 'name' ] : '';
175
+ ?>
176
+ <button id="<?php echo $save_button[ 'id' ]; ?>"
177
+ class="yith-save-button <?php echo $save_button_class; ?>">
178
+ <?php echo $save_button_name; ?>
179
+ </button>
180
+ <?php endif; ?>
181
+ <?php
182
+ if ( $delete_button && !empty( $delete_button[ 'id' ] ) ):
183
+ $delete_button_class = isset( $delete_button[ 'class' ] ) ? $delete_button[ 'class' ] : '';
184
+ $delete_button_name = isset( $delete_button[ 'name' ] ) ? $delete_button[ 'name' ] : '';
185
+ ?>
186
+ <button id="<?php echo $delete_button[ 'id' ]; ?>"
187
+ class="button-secondary yith-delete-button <?php echo $delete_button_class; ?>">
188
+ <?php echo $delete_button_name; ?>
189
+ </button>
190
+ <?php endif; ?>
191
+ </div>
192
  </div>
 
193
 
194
+ </div>
195
+ <?php endforeach;
196
+ endif;
197
+ ?>
198
 
199
 
200
  </div>
201
  <!-- Schedule Item template -->
202
  <script type="text/template" id="tmpl-yith-toggle-element-item-<?php echo $id ?>">
203
  <div id="<?php echo $id; ?>_{{{data.index}}}"
204
+ class="yith-toggle-row highlight <?php echo !empty( $subtitle ) ? 'with-subtitle' : ''; ?> <?php echo $class; ?>"
205
  data-item_key="{{{data.index}}}" <?php echo $custom_attributes; ?>
206
  data-item_key="{{{data.index}}}">
207
  <div class="yith-toggle-title">
208
  <h3>
209
  <span class="title" data-title_format="<?php echo esc_attr( $title ) ?>"><?php echo $title ?></span>
210
 
211
+ <div class="subtitle"
212
+ data-subtitle_format="<?php echo esc_attr( $subtitle ) ?>"><?php echo $subtitle ?></div>
213
 
214
  </h3>
215
  <span class="yith-toggle">
216
  <span class="yith-icon yith-icon-arrow_right"></span>
217
  </span>
218
+ <?php
219
+ if ( !empty( $onoff_field ) && is_array( $onoff_field ) ):
220
+ $action = !empty( $onoff_field[ 'ajax_action' ] ) ? 'data-ajax_action="' . $onoff_field[ 'ajax_action' ] . '"' : '';
221
+ $onoff_field[ 'value' ] = $onoff_field[ 'default' ];
222
+ $onoff_field[ 'type' ] = 'onoff';
223
+ $onoff_field[ 'name' ] = $name . "[{{{data.index}}}][" . $onoff_id . "]";
224
+ $onoff_field[ 'id' ] = $onoff_id;
225
+ unset( $onoff_field[ 'yith-type' ] );
226
+ ?>
227
  <span class="yith-toggle-onoff" <?php echo $action; ?> >
228
  <?php
229
  echo yith_plugin_fw_get_field( $onoff_field, true );
230
  ?>
231
  </span>
232
 
233
+ <?php endif; ?>
234
+ <?php if ( $sortable ): ?>
235
  <span class="yith-icon yith-icon-drag ui-sortable-handle"></span>
236
+ <?php endif ?>
237
  </div>
238
  <div class="yith-toggle-content">
239
+ <?php
240
+ if ( $elements && count( $elements ) > 0 ) {
241
+ foreach ( $elements as $element ):
242
+ $element[ 'type' ] = isset( $element[ 'yith-type' ] ) ? $element[ 'yith-type' ] : $element[ 'type' ];
243
+ unset( $element[ 'yith-type' ] );
244
+ $element[ 'title' ] = $element[ 'name' ];
245
+ $element[ 'name' ] = $name . "[{{{data.index}}}][" . $element[ 'id' ] . "]";
246
+ $element[ 'id' ] = $element[ 'id' ] . '_{{{data.index}}}';
247
+ $class_element = isset( $element[ 'class_row' ] ) ? $element[ 'class_row' ] : '';
248
+ $is_required = !empty( $element[ 'required' ] );
249
+ if ( $is_required ) {
250
+ $class_element .= ' yith-plugin-fw--required';
251
+ }
252
+ ?>
253
+ <div class="yith-toggle-content-row <?php echo $class_element . ' ' . $element[ 'type' ] ?>">
254
+ <label for="<?php echo $element[ 'id' ]; ?>"><?php echo $element[ 'title' ]; ?></label>
255
  <div class="yith-plugin-fw-option-with-description">
256
+ <?php echo yith_plugin_fw_get_field( $element, true ); ?>
257
+ <span class="description"><?php echo !empty( $element[ 'desc' ] ) ? $element[ 'desc' ] : ''; ?></span>
258
  </div>
259
  </div>
260
+ <?php endforeach;
261
+ }
262
+ ?>
263
  <div class="yith-toggle-content-buttons">
264
  <div class="spinner"></div>
265
+ <?php
266
+ if ( $save_button && !empty( $save_button[ 'id' ] ) ):
267
+ $save_button_class = isset( $save_button[ 'class' ] ) ? $save_button[ 'class' ] : '';
268
+ $save_button_name = isset( $save_button[ 'name' ] ) ? $save_button[ 'name' ] : '';
269
+ ?>
270
+ <button id="<?php echo $save_button[ 'id' ]; ?>"
271
  class="yith-save-button <?php echo $save_button_class; ?>">
272
+ <?php echo $save_button_name; ?>
273
  </button>
274
+ <?php endif; ?>
275
+ <?php
276
+ if ( $delete_button && !empty( $delete_button[ 'id' ] ) ):
277
+ $delete_button_class = isset( $delete_button[ 'class' ] ) ? $delete_button[ 'class' ] : '';
278
+ $delete_button_name = isset( $delete_button[ 'name' ] ) ? $delete_button[ 'name' ] : '';
279
  ?>
280
+ <button id="<?php echo $delete_button[ 'id' ]; ?>"
281
  class="button-secondary yith-delete-button <?php echo $delete_button_class; ?>">
282
+ <?php echo $delete_button_name; ?>
283
  </button>
284
+ <?php endif; ?>
285
  </div>
286
  </div>
287
  </div>
plugin-fw/templates/fields/upload.php CHANGED
@@ -14,15 +14,17 @@
14
 
15
  extract( $field );
16
  ?>
17
- <div class="yith-plugin-fw-upload-img-preview" style="margin-top:10px;">
18
- <?php
19
- $file = $value;
20
- if ( preg_match( '/(jpg|jpeg|png|gif|ico)$/', $file ) ) {
21
- echo "<img src='$file' style='max-width:600px; max-height:300px;' />";
22
- }
23
- ?>
 
 
 
 
 
 
24
  </div>
25
- <input type="text" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>" <?php if ( isset( $default ) ) : ?>data-std="<?php echo $default ?>"<?php endif ?> class="yith-plugin-fw-upload-img-url"/>
26
- <button class="button-secondary yith-plugin-fw-upload-button" id="<?php echo $id ?>-button"><?php _e( 'Upload', 'yith-plugin-fw' ) ?></button>
27
- <button type="button" id="<?php echo $id ?>-button-reset" class="yith-plugin-fw-upload-button-reset button"
28
- data-default="<?php echo isset( $default ) ? $default : '' ?>"><?php _e( 'Reset', 'yith-plugin-fw' ) ?></button>
14
 
15
  extract( $field );
16
  ?>
17
+ <div class="yith-plugin-fw-upload-container <?php echo !empty( $class ) ? $class : ''; ?>">
18
+ <div class="yith-plugin-fw-upload-img-preview" style="margin-top:10px;">
19
+ <?php
20
+ $file = $value;
21
+ if ( preg_match( '/(jpg|jpeg|png|gif|ico)$/', $file ) ) {
22
+ echo "<img src='$file' style='max-width:600px; max-height:300px;' />";
23
+ }
24
+ ?>
25
+ </div>
26
+ <input type="text" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>" <?php if ( isset( $default ) ) : ?>data-std="<?php echo $default ?>"<?php endif ?> class="yith-plugin-fw-upload-img-url"/>
27
+ <button class="button-secondary yith-plugin-fw-upload-button" id="<?php echo $id ?>-button"><?php _e( 'Upload', 'yith-plugin-fw' ) ?></button>
28
+ <button type="button" id="<?php echo $id ?>-button-reset" class="yith-plugin-fw-upload-button-reset button"
29
+ data-default="<?php echo isset( $default ) ? $default : '' ?>"><?php _e( 'Reset', 'yith-plugin-fw' ) ?></button>
30
  </div>
 
 
 
 
plugin-fw/templates/metaboxes/field-row.php CHANGED
@@ -1,14 +1,12 @@
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
4
- *
5
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
  * that is bundled with this package in the file LICENSE.txt.
7
  * It is also available through the world-wide-web at this URL:
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
9
  *
10
  * @var array $field
11
- *
12
  * [Important Note] the stored value is:
13
  * - array if WooCommerce version >= 3.0.0
14
  * - string (comma-separated) otherwise
@@ -31,9 +29,15 @@ $default_field = array(
31
  $field = wp_parse_args( $field, $default_field );
32
 
33
  $display_field_only = isset( $field[ 'display-field-only' ] ) ? $field[ 'display-field-only' ] : false;
 
 
 
 
 
 
34
 
35
  ?>
36
- <div id="<?php echo $field[ 'id' ] ?>-container" <?php echo yith_field_deps_data( $field ); ?> class="yith-plugin-fw-metabox-field-row">
37
  <?php if ( $display_field_only ) :
38
  yith_plugin_fw_get_field( $field, true );
39
  else: ?>
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
 
4
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
  * that is bundled with this package in the file LICENSE.txt.
6
  * It is also available through the world-wide-web at this URL:
7
  * http://www.gnu.org/licenses/gpl-3.0.txt
8
  *
9
  * @var array $field
 
10
  * [Important Note] the stored value is:
11
  * - array if WooCommerce version >= 3.0.0
12
  * - string (comma-separated) otherwise
29
  $field = wp_parse_args( $field, $default_field );
30
 
31
  $display_field_only = isset( $field[ 'display-field-only' ] ) ? $field[ 'display-field-only' ] : false;
32
+ $is_required = !empty( $field[ 'required' ] );
33
+
34
+ $extra_row_classes = $is_required ? array( 'yith-plugin-fw--required' ) : array();
35
+ $extra_row_classes = apply_filters( 'yith_plugin_fw_metabox_extra_row_classes', $extra_row_classes, $field );
36
+ $extra_row_classes = is_array( $extra_row_classes ) ? implode( ' ', $extra_row_classes ) : '';
37
+
38
 
39
  ?>
40
+ <div id="<?php echo $field[ 'id' ] ?>-container" <?php echo yith_field_deps_data( $field ); ?> class="yith-plugin-fw-metabox-field-row <?php echo $extra_row_classes ?>">
41
  <?php if ( $display_field_only ) :
42
  yith_plugin_fw_get_field( $field, true );
43
  else: ?>
plugin-fw/templates/metaboxes/tab.php CHANGED
@@ -1,11 +1,13 @@
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
4
- *
5
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
  * that is bundled with this package in the file LICENSE.txt.
7
  * It is also available through the world-wide-web at this URL:
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
 
 
 
9
  */
10
 
11
  if ( !defined( 'ABSPATH' ) ) {
@@ -13,16 +15,16 @@ if ( !defined( 'ABSPATH' ) ) {
13
  } // Exit if accessed directly
14
 
15
  global $post;
16
- $classes = apply_filters('yith_plugin_fw_metabox_class', '', $post );
17
  $classes = yith_plugin_fw_remove_duplicate_classes( $classes );
18
 
19
  do_action( 'yit_before_metaboxes_tab' ) ?>
20
- <div class="yith-plugin-fw metaboxes-tab <?php echo esc_attr($classes )?>">
21
  <?php do_action( 'yit_before_metaboxes_labels' ) ?>
22
  <ul class="metaboxes-tabs clearfix"<?php if ( count( $tabs ) <= 1 ) : ?> style="display:none;"<?php endif; ?>>
23
  <?php
24
  $i = 0;
25
- foreach ( $tabs as $key=>$tab ) :
26
  if ( !isset( $tab[ 'fields' ] ) || empty( $tab[ 'fields' ] ) ) {
27
  continue;
28
  }
@@ -54,7 +56,7 @@ do_action( 'yit_before_metaboxes_tab' ) ?>
54
  // Use nonce for verification
55
  wp_nonce_field( 'metaboxes-fields-nonce', 'yit_metaboxes_nonce' );
56
  ?>
57
- <?php foreach ( $tabs as $key=> $tab ) :
58
 
59
  ?>
60
  <div class="tabs-panel" id="<?php echo urldecode( $key ) ?>">
@@ -71,11 +73,11 @@ do_action( 'yit_before_metaboxes_tab' ) ?>
71
  if ( $pos = strpos( $field_name, ']' ) ) {
72
  $field_name = substr_replace( $field_name, '', $pos, 1 );
73
  }
74
- $value = yit_get_post_meta( $post->ID, $field_name );
75
- $field[ 'value' ] = $value != '' ? $value : ( isset( $field[ 'std' ] ) ? $field[ 'std' ] : '' );
76
- $field[ 'checkboxgroup' ] = ( $field[ 'type' ] == 'checkbox' && isset( $field[ 'checkboxgroup' ] ) ) ? " " .$field[ 'checkboxgroup' ] : "";
77
- $container_classes = "the-metabox " . $field[ 'type' ] .$field[ 'checkboxgroup' ] . " clearfix ";
78
- $container_classes .= empty( $field[ 'label' ] ) ? 'no-label' : '';
79
 
80
  ?>
81
  <div class="<?php echo $container_classes ?>">
@@ -83,7 +85,7 @@ do_action( 'yit_before_metaboxes_tab' ) ?>
83
  if ( $field_template_path = yith_plugin_fw_get_field_template_path( $field ) ) {
84
  $display_row = 'hidden' !== $field[ 'type' ];
85
  $display_row = isset( $field[ 'yith-display-row' ] ) ? !!$field[ 'yith-display-row' ] : $display_row;
86
- $field[ 'display-field-only' ] = in_array( $field[ 'type' ], array( 'hidden', 'html', 'sep', 'simple-text', 'title') );
87
 
88
  if ( $display_row ) {
89
 
@@ -110,4 +112,6 @@ do_action( 'yit_before_metaboxes_tab' ) ?>
110
  <?php endforeach ?>
111
  </div>
112
  <?php endforeach ?>
113
- </div>
 
 
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
 
4
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
  * that is bundled with this package in the file LICENSE.txt.
6
  * It is also available through the world-wide-web at this URL:
7
  * http://www.gnu.org/licenses/gpl-3.0.txt
8
+ *
9
+ * @var array $tabs
10
+ * @var string $class
11
  */
12
 
13
  if ( !defined( 'ABSPATH' ) ) {
15
  } // Exit if accessed directly
16
 
17
  global $post;
18
+ $classes = apply_filters( 'yith_plugin_fw_metabox_class', $class, $post );
19
  $classes = yith_plugin_fw_remove_duplicate_classes( $classes );
20
 
21
  do_action( 'yit_before_metaboxes_tab' ) ?>
22
+ <div class="yith-plugin-fw metaboxes-tab <?php echo esc_attr( $classes ) ?>">
23
  <?php do_action( 'yit_before_metaboxes_labels' ) ?>
24
  <ul class="metaboxes-tabs clearfix"<?php if ( count( $tabs ) <= 1 ) : ?> style="display:none;"<?php endif; ?>>
25
  <?php
26
  $i = 0;
27
+ foreach ( $tabs as $key => $tab ) :
28
  if ( !isset( $tab[ 'fields' ] ) || empty( $tab[ 'fields' ] ) ) {
29
  continue;
30
  }
56
  // Use nonce for verification
57
  wp_nonce_field( 'metaboxes-fields-nonce', 'yit_metaboxes_nonce' );
58
  ?>
59
+ <?php foreach ( $tabs as $key => $tab ) :
60
 
61
  ?>
62
  <div class="tabs-panel" id="<?php echo urldecode( $key ) ?>">
73
  if ( $pos = strpos( $field_name, ']' ) ) {
74
  $field_name = substr_replace( $field_name, '', $pos, 1 );
75
  }
76
+ $value = yit_get_post_meta( $post->ID, $field_name );
77
+ $field[ 'value' ] = $value != '' ? $value : ( isset( $field[ 'std' ] ) ? $field[ 'std' ] : '' );
78
+ $field[ 'checkboxgroup' ] = ( $field[ 'type' ] == 'checkbox' && isset( $field[ 'checkboxgroup' ] ) ) ? " " . $field[ 'checkboxgroup' ] : "";
79
+ $container_classes = "the-metabox " . $field[ 'type' ] . $field[ 'checkboxgroup' ] . " clearfix ";
80
+ $container_classes .= empty( $field[ 'label' ] ) ? 'no-label' : '';
81
 
82
  ?>
83
  <div class="<?php echo $container_classes ?>">
85
  if ( $field_template_path = yith_plugin_fw_get_field_template_path( $field ) ) {
86
  $display_row = 'hidden' !== $field[ 'type' ];
87
  $display_row = isset( $field[ 'yith-display-row' ] ) ? !!$field[ 'yith-display-row' ] : $display_row;
88
+ $field[ 'display-field-only' ] = in_array( $field[ 'type' ], array( 'hidden', 'html', 'sep', 'simple-text', 'title', 'list-table' ) );
89
 
90
  if ( $display_row ) {
91
 
112
  <?php endforeach ?>
113
  </div>
114
  <?php endforeach ?>
115
+ </div>
116
+
117
+ <?php do_action( 'yit_after_metaboxes_tab' );
plugin-fw/templates/panel/sub-tabs-nav.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
+ * that is bundled with this package in the file LICENSE.txt.
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.gnu.org/licenses/gpl-3.0.txt
8
+ *
9
+ * @var array $sub_tabs
10
+ * @var string $current_tab
11
+ * @var string $current_sub_tab
12
+ * @var string $page
13
+ */
14
+ !defined( 'ABSPATH' ) && exit; // Exit if accessed directly
15
+
16
+ ?>
17
+ <?php if ( !empty( $sub_tabs ) ): ?>
18
+ <div class="yith-plugin-fw-sub-tabs-nav">
19
+ <h3 class="nav-tab-wrapper yith-nav-sub-tab-wrapper">
20
+ <?php foreach ( $sub_tabs as $_key => $_tab ):
21
+ $_defaults = array(
22
+ 'title' => '',
23
+ 'class' => '',
24
+ 'icon' => '',
25
+ 'url' => $this->get_nav_url( $page, $current_tab, $_key )
26
+ );
27
+ $_tab = (object) wp_parse_args( $_tab, $_defaults );
28
+
29
+ if ( is_array( $_tab->class ) ) {
30
+ $_tab->class = implode( ' ', $_tab->class );
31
+ }
32
+
33
+ if ( $current_sub_tab === $_key ) {
34
+ $_tab->class = 'nav-tab-active ' . $_tab->class;
35
+ }
36
+ ?>
37
+ <a href="<?php echo $_tab->url ?>" class="yith-nav-sub-tab nav-tab <?php echo $_tab->class ?>">
38
+ <span class="yith-nav-sub-tab__title"><?php echo $_tab->title; ?></span>
39
+ <?php if ( $_tab->icon ) : ?>
40
+ <span class="yith-nav-sub-tab__icon yith-icon-<?php echo $_tab->icon ?>"></span>
41
+ <?php endif; ?>
42
+ </a>
43
+ <?php endforeach; ?>
44
+ </h3>
45
+ </div>
46
+ <?php endif; ?>
plugin-fw/templates/panel/woocommerce/woocommerce-form.php CHANGED
@@ -1,9 +1,12 @@
1
  <?php
 
 
 
2
  $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
3
  ?>
4
 
5
- <div id="<?php echo $this->settings[ 'page' ] ?>_<?php echo $this->get_current_tab() ?>" class="yith-plugin-fw yit-admin-panel-container">
6
- <?php do_action( 'yit_framework_before_print_wc_panel_content', $current_tab ); ?>
7
  <div class="<?php echo $panel_content_class; ?>">
8
  <form id="plugin-fw-wc" method="post">
9
  <?php $this->add_fields() ?>
@@ -18,5 +21,5 @@ $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admi
18
  onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
19
  </form>
20
  </div>
21
- <?php do_action( 'yit_framework_after_print_wc_panel_content', $current_tab ); ?>
22
  </div>
1
  <?php
2
+ /**
3
+ * @var string $option_key
4
+ */
5
  $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
6
  ?>
7
 
8
+ <div id="<?php echo $this->settings[ 'page' ] ?>_<?php echo $option_key ?>" class="yith-plugin-fw yit-admin-panel-container">
9
+ <?php do_action( 'yit_framework_before_print_wc_panel_content', $option_key ); ?>
10
  <div class="<?php echo $panel_content_class; ?>">
11
  <form id="plugin-fw-wc" method="post">
12
  <?php $this->add_fields() ?>
21
  onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
22
  </form>
23
  </div>
24
+ <?php do_action( 'yit_framework_after_print_wc_panel_content', $option_key ); ?>
25
  </div>
plugin-fw/templates/panel/woocommerce/woocommerce-option-row.php CHANGED
@@ -12,8 +12,10 @@ $field = wp_parse_args( $field, $default_field );
12
 
13
  $display_row = !in_array( $field[ 'type' ], array( 'hidden', 'html', 'sep', 'simple-text', 'title', 'list-table' ) );
14
  $display_row = isset( $field[ 'yith-display-row' ] ) ? !!$field[ 'yith-display-row' ] : $display_row;
 
15
 
16
- $extra_row_classes = apply_filters( 'yith_plugin_fw_panel_wc_extra_row_classes', array(), $field );
 
17
  $extra_row_classes = is_array( $extra_row_classes ) ? implode( ' ', $extra_row_classes ) : '';
18
 
19
  ?>
12
 
13
  $display_row = !in_array( $field[ 'type' ], array( 'hidden', 'html', 'sep', 'simple-text', 'title', 'list-table' ) );
14
  $display_row = isset( $field[ 'yith-display-row' ] ) ? !!$field[ 'yith-display-row' ] : $display_row;
15
+ $is_required = !empty( $field[ 'required' ] );
16
 
17
+ $extra_row_classes = $is_required ? array( 'yith-plugin-fw--required' ) : array();
18
+ $extra_row_classes = apply_filters( 'yith_plugin_fw_panel_wc_extra_row_classes', $extra_row_classes, $field );
19
  $extra_row_classes = is_array( $extra_row_classes ) ? implode( ' ', $extra_row_classes ) : '';
20
 
21
  ?>
plugin-fw/templates/panel/woocommerce/woocommerce-panel.php CHANGED
@@ -1,16 +1,9 @@
1
- <?php add_thickbox();?>
2
- <div class="wrap <?php echo $wrap_class?>">
3
  <div id="icon-users" class="icon32"><br/></div>
4
- <?php do_action('yith_plugin_fw_before_woocommerce_panel', $page )?>
5
- <?php if( ! empty( $available_tabs ) ): ?>
6
- <h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
7
- <?php foreach( $available_tabs as $id => $label ):
8
- $active_class = ( $current_tab == $id ) ? ' nav-tab-active' : '';
9
- $active_class .= 'premium' == $id ? ' yith-premium ': '';
10
- ?>
11
- <a href="?page=<?php echo $page ?>&tab=<?php echo $id ?>" class="nav-tab <?php echo $active_class ?>"><?php echo $label ?></a>
12
- <?php endforeach; ?>
13
- </h2>
14
- <?php $this->print_panel_content() ?>
15
- <?php endif; ?>
16
  </div>
1
+ <?php add_thickbox(); ?>
2
+ <div class="wrap <?php echo $wrap_class ?>">
3
  <div id="icon-users" class="icon32"><br/></div>
4
+ <?php do_action( 'yith_plugin_fw_before_woocommerce_panel', $page ) ?>
5
+ <?php if ( !empty( $available_tabs ) ) {
6
+ $this->print_panel_content();
7
+ }
8
+ ?>
 
 
 
 
 
 
 
9
  </div>
plugin-fw/templates/sysinfo/system-information-panel.php CHANGED
@@ -10,6 +10,19 @@
10
 
11
  $system_info = get_option( 'yith_system_info' );
12
  $recommended_memory = 134217728;
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  ?>
15
  <div id="yith-sysinfo" class="wrap yith-system-info">
@@ -19,6 +32,25 @@ $recommended_memory = 134217728;
19
 
20
  <?php if ( ! isset( $_GET['yith-phpinfo'] ) || $_GET['yith-phpinfo'] != 'true' ): ?>
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  <table class="widefat striped">
23
  <?php foreach ( $system_info['system_info'] as $key => $item ): ?>
24
  <?php
10
 
11
  $system_info = get_option( 'yith_system_info' );
12
  $recommended_memory = 134217728;
13
+ $output_ip = 'n/a';
14
+
15
+ if ( function_exists( 'curl_init' ) && apply_filters( 'yith_system_status_check_ip', true ) ) {
16
+ //Get Output IP Address
17
+ $ch = curl_init();
18
+ curl_setopt( $ch, CURLOPT_URL, 'https://ifconfig.co/ip' );
19
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
20
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
21
+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
22
+ $data = curl_exec( $ch );
23
+ curl_close( $ch );
24
+ $output_ip = $data != '' ? $data : 'n/a';
25
+ }
26
 
27
  ?>
28
  <div id="yith-sysinfo" class="wrap yith-system-info">
32
 
33
  <?php if ( ! isset( $_GET['yith-phpinfo'] ) || $_GET['yith-phpinfo'] != 'true' ): ?>
34
 
35
+ <table class="widefat striped">
36
+ <tr>
37
+ <th>
38
+ <?php _e( 'Site URL', 'yith-plugin-fw' ); ?>
39
+ </th>
40
+ <td class="requirement-value">
41
+ <?php echo get_site_url() ?>
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <th>
46
+ <?php _e( 'Output IP Address', 'yith-plugin-fw' ); ?>
47
+ </th>
48
+ <td class="requirement-value">
49
+ <?php echo $output_ip ?>
50
+ </td>
51
+ </tr>
52
+ </table>
53
+
54
  <table class="widefat striped">
55
  <?php foreach ( $system_info['system_info'] as $key => $item ): ?>
56
  <?php
plugin-fw/yit-functions.php CHANGED
@@ -1,7 +1,6 @@
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
4
- *
5
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
  * that is bundled with this package in the file LICENSE.txt.
7
  * It is also available through the world-wide-web at this URL:
@@ -19,7 +18,6 @@ if ( !function_exists( 'yit_plugin_locate_template' ) ) {
19
  * @param string $plugin_basename
20
  * @param string $path
21
  * @param array $var
22
- *
23
  * @return string
24
  * @since 2.0.0
25
  */
@@ -48,7 +46,6 @@ if ( !function_exists( 'yit_plugin_get_template' ) ) {
48
  * @param string $path
49
  * @param mixed $var
50
  * @param bool $return
51
- *
52
  * @return string
53
  * @since 2.0.0
54
  */
@@ -84,7 +81,6 @@ if ( !function_exists( 'yit_plugin_content' ) ) {
84
  * @param string $more_text
85
  * @param string $split
86
  * @param string $in_paragraph
87
- *
88
  * @return string
89
  * @since 2.0.0
90
  */
@@ -189,7 +185,6 @@ if ( !function_exists( 'yit_plugin_string' ) ) {
189
  * @param string $string The main string. If it is empty or null, the functions return null.
190
  * @param string $after What there is after the main string
191
  * @param bool $echo If echo or only return it
192
- *
193
  * @return string The complete string, if the main string is not empty or null
194
  * @since 2.0.0
195
  */
@@ -211,15 +206,12 @@ if ( !function_exists( 'yit_plugin_string' ) ) {
211
  if ( !function_exists( 'yit_plugin_decode_title' ) ) {
212
  /**
213
  * Change some special characters to put easily html into a string
214
- *
215
  * E.G.
216
  * string: This is [my title] with | a new line
217
  * return: This is <span class="title-highlight">my title</span> with <br /> a new line
218
  *
219
  * @param string $title The string to convert
220
- *
221
  * @return string The html
222
- *
223
  * @since 1.0
224
  */
225
  function yit_plugin_decode_title( $title ) {
@@ -235,9 +227,7 @@ if ( !function_exists( 'yit_plugin_get_attachment_id' ) ) {
235
  * Return the ID of an attachment.
236
  *
237
  * @param string $url
238
- *
239
  * @return int
240
- *
241
  * @since 2.0.0
242
  */
243
 
@@ -297,7 +287,6 @@ if ( !function_exists( 'yit_plugin_get_attachment_id' ) ) {
297
  if ( !function_exists( 'yit_enqueue_script' ) ) {
298
  /**
299
  * Enqueues script.
300
- *
301
  * Registers the script if src provided (does NOT overwrite) and enqueues.
302
  *
303
  * @since 2.0.0
@@ -318,7 +307,6 @@ if ( !function_exists( 'yit_enqueue_script' ) ) {
318
  if ( !function_exists( 'yit_enqueue_style' ) ) {
319
  /**
320
  * Enqueues style.
321
- *
322
  * Registers the style if src provided (does NOT overwrite) and enqueues.
323
  *
324
  * @since 2.0.0
@@ -346,12 +334,10 @@ if ( !function_exists( 'yit_enqueue_style' ) ) {
346
  if ( !function_exists( 'yit_get_post_meta' ) ) {
347
  /**
348
  * Retrieve the value of a metabox.
349
- *
350
  * This function retrieve the value of a metabox attached to a post. It return either a single value or an array.
351
  *
352
  * @param int $id Post ID.
353
  * @param string $meta The meta key to retrieve.
354
- *
355
  * @return mixed Single value or array
356
  * @since 2.0.0
357
  */
@@ -382,7 +368,6 @@ if ( !function_exists( 'yit_string' ) ) {
382
  * @param string $string The main string. If it is empty or null, the functions return null.
383
  * @param string $after What there is after the main string
384
  * @param bool $echo If echo or only return it
385
- *
386
  * @return string The complete string, if the main string is not empty or null
387
  * @since 2.0.0
388
  */
@@ -407,7 +392,6 @@ if ( !function_exists( 'yit_pagination' ) ) {
407
  *
408
  * @param string $pages
409
  * @param int $range
410
- *
411
  * @return string
412
  * @since 2.0.0
413
  */
@@ -501,7 +485,6 @@ if ( !function_exists( 'yit_layout_option' ) ) {
501
  * @param bool $id
502
  * @param string $type
503
  * @param string $model
504
- *
505
  * @return array
506
  * @since 2.0.0
507
  */
@@ -550,13 +533,10 @@ if ( !function_exists( 'yit_curPageURL' ) ) {
550
 
551
  if ( !function_exists( 'yit_get_excluded_categories' ) ) {
552
  /**
553
- *
554
  * Retrieve the escluded categories, set on Theme Options
555
  *
556
  * @param int $k
557
- *
558
  * @return string String with all id categories excluded, separated by a comma
559
- *
560
  * @since 2.0.0
561
  */
562
 
@@ -604,7 +584,6 @@ if ( !function_exists( 'yit_add_extra_theme_headers' ) ) {
604
  * Check the framework core version
605
  *
606
  * @param $headers Array
607
- *
608
  * @return bool
609
  * @since 2.0.0
610
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
@@ -677,7 +656,6 @@ if ( !function_exists( 'yit_avoid_duplicate' ) ) {
677
  * @param mixed $value
678
  * @param array $array
679
  * @param string $check
680
- *
681
  * @return mixed
682
  * @since 2.0.0
683
  * @author Antonino Scarf� <antonino.scarfi@yithemes.com>
@@ -707,15 +685,12 @@ if ( !function_exists( 'yit_avoid_duplicate' ) ) {
707
  if ( !function_exists( 'yit_title_special_characters' ) ) {
708
  /**
709
  * The chars used in yit_decode_title() and yit_encode_title()
710
- *
711
  * E.G.
712
  * string: This is [my title] with | a new line
713
  * return: This is <span class="highlight">my title</span> with <br /> a new line
714
  *
715
  * @param string $title The string to convert
716
- *
717
  * @return string The html
718
- *
719
  * @since 1.0
720
  */
721
  function yit_title_special_characters( $chars ) {
@@ -731,15 +706,12 @@ if ( !function_exists( 'yit_title_special_characters' ) ) {
731
  if ( !function_exists( 'yit_decode_title' ) ) {
732
  /**
733
  * Change some special characters to put easily html into a string
734
- *
735
  * E.G.
736
  * string: This is [my title] with | a new line
737
  * return: This is <span class="title-highlight">my title</span> with <br /> a new line
738
  *
739
  * @param string $title The string to convert
740
- *
741
  * @return string The html
742
- *
743
  * @since 1.0
744
  */
745
  function yit_decode_title( $title ) {
@@ -752,15 +724,12 @@ if ( !function_exists( 'yit_decode_title' ) ) {
752
  if ( !function_exists( 'yit_encode_title' ) ) {
753
  /**
754
  * Change some special characters to put easily html into a string
755
- *
756
  * E.G.
757
  * string: This is [my title] with | a new line
758
  * return: This is <span class="title-highlight">my title</span> with <br /> a new line
759
  *
760
  * @param string $title The string to convert
761
- *
762
  * @return string The html
763
- *
764
  * @since 1.0
765
  */
766
  function yit_encode_title( $title ) {
@@ -773,15 +742,12 @@ if ( !function_exists( 'yit_encode_title' ) ) {
773
  if ( !function_exists( 'yit_remove_chars_title' ) ) {
774
  /**
775
  * Change some special characters to put easily html into a string
776
- *
777
  * E.G.
778
  * string: This is [my title] with | a new line
779
  * return: This is <span class="title-highlight">my title</span> with <br /> a new line
780
  *
781
  * @param string $title The string to convert
782
- *
783
  * @return string The html
784
- *
785
  * @since 1.0
786
  */
787
  function yit_remove_chars_title( $title ) {
@@ -814,7 +780,6 @@ if ( !function_exists( 'yit_load_js_file' ) ) {
814
  * Load .min.js file if WP_Debug is not defined
815
  *
816
  * @param string $filename The file name
817
- *
818
  * @return string The file path
819
  * @since 2.0.0
820
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
@@ -836,7 +801,6 @@ if ( !function_exists( 'yit_wpml_register_string' ) ) {
836
  * @param $contenxt context name
837
  * @param $name string name
838
  * @param $value value to translate
839
- *
840
  * @since 2.0.0
841
  * @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
842
  */
@@ -853,7 +817,6 @@ if ( !function_exists( 'yit_wpml_string_translate' ) ) {
853
  * @param $contenxt context name
854
  * @param $name string name
855
  * @param $default_value value to translate
856
- *
857
  * @return string the string translated
858
  * @since 2.0.0
859
  * @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
@@ -872,7 +835,6 @@ if ( !function_exists( 'yit_wpml_object_id' ) ) {
872
  * @param string $element_type
873
  * @param bool $return_original_if_missing
874
  * @param null|string $ulanguage_code
875
- *
876
  * @return int the translation id
877
  * @since 2.0.0
878
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
@@ -895,7 +857,6 @@ if ( !function_exists( 'yith_get_formatted_price' ) ) {
895
  *
896
  * @param float $price
897
  * @param array $args (default: array())
898
- *
899
  * @return string
900
  */
901
  function yith_get_formatted_price( $price, $args = array() ) {
@@ -928,7 +889,6 @@ if ( !function_exists( 'yith_get_terms' ) ) {
928
  * Get terms
929
  *
930
  * @param $args
931
- *
932
  * @return array|int|WP_Error
933
  */
934
  function yith_get_terms( $args ) {
@@ -964,7 +924,6 @@ if ( !function_exists( 'yith_panel_field_deps_data' ) ) {
964
  /**
965
  * @param $option
966
  * @param YIT_Plugin_Panel|YIT_Plugin_Panel_WooCommerce $panel
967
- *
968
  * @return string
969
  */
970
  function yith_panel_field_deps_data( $option, $panel ) {
@@ -986,7 +945,6 @@ if ( !function_exists( 'yith_plugin_fw_get_field' ) ) {
986
  * @param array $field
987
  * @param bool $echo
988
  * @param bool $show_container
989
- *
990
  * @return string|void
991
  */
992
  function yith_plugin_fw_get_field( $field, $echo = false, $show_container = true ) {
@@ -1167,230 +1125,224 @@ if ( !function_exists( 'yith_plugin_fw_is_panel' ) ) {
1167
  }
1168
  }
1169
 
1170
- if( ! function_exists( 'yith_plugin_fw_force_regenerate_plugin_update_transient' ) ){
1171
- /**
1172
- * Delete the update plugins transient
1173
- *
1174
- * @return void
1175
- *
1176
- * @since 1.0
1177
- * @see update_plugins transient and pre_set_site_transient_update_plugins hooks
1178
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
1179
- */
1180
- function yith_plugin_fw_force_regenerate_plugin_update_transient() {
1181
- delete_site_transient( 'update_plugins' );
1182
- }
1183
  }
1184
 
1185
  /* === Gutenberg Support === */
1186
 
1187
- if( ! function_exists( 'yith_plugin_fw_is_gutenberg_enabled' ) ){
1188
- function yith_plugin_fw_is_gutenberg_enabled(){
1189
- return function_exists( 'YITH_Gutenberg' );
1190
- }
1191
  }
1192
 
1193
- if( ! function_exists( 'yith_plugin_fw_gutenberg_add_blocks' ) ){
1194
- /**
1195
- * Add new blocks to Gutenberg
1196
- *
1197
- * @param $blocks string|array new blocks
1198
- * @return bool true if add a new blocks, false otherwise
1199
- *
1200
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
1201
- */
1202
- function yith_plugin_fw_gutenberg_add_blocks( $blocks ){
1203
- $added = false;
1204
- if( yith_plugin_fw_is_gutenberg_enabled() ) {
1205
- // ADD Blocks
1206
- $added = YITH_Gutenberg()->add_blocks( $blocks );
1207
-
1208
- //ADD Blocks arguments
1209
- if( $added ){
1210
- YITH_Gutenberg()->set_block_args( $blocks );
1211
- }
1212
- }
1213
-
1214
- return $added;
1215
- }
1216
  }
1217
 
1218
- if( ! function_exists( 'yith_plugin_fw_gutenberg_get_registered_blocks' ) ){
1219
- /**
1220
- * Return an array with the registered blocks
1221
- *
1222
- * @return array
1223
- */
1224
- function yith_plugin_fw_gutenberg_get_registered_blocks(){
1225
- return yith_plugin_fw_is_gutenberg_enabled() ? YITH_Gutenberg()->get_registered_blocks() : array();
1226
- }
1227
  }
1228
 
1229
- if( ! function_exists( 'yith_plugin_fw_gutenberg_get_to_register_blocks' ) ){
1230
- /**
1231
- * Return an array with the blocks to register
1232
- *
1233
- * @return array
1234
- */
1235
- function yith_plugin_fw_gutenberg_get_to_register_blocks(){
1236
- return yith_plugin_fw_is_gutenberg_enabled() ? YITH_Gutenberg()->get_to_register_blocks() : array();
1237
- }
1238
  }
1239
 
1240
- if( ! function_exists( 'yith_plugin_fw_get_default_logo' ) ){
1241
- /**
1242
- * Get the default SVG logo
1243
- *
1244
- * @return string default logo image url
1245
- */
1246
- function yith_plugin_fw_get_default_logo(){
1247
- return YIT_CORE_PLUGIN_URL . '/assets/images/yith-icon.svg';
1248
- }
1249
  }
1250
 
1251
- if ( ! function_exists( 'yith_set_wrapper_class' ) ) {
1252
- /**
1253
- * Return the class for the new plugin panel style.
1254
- *
1255
- * @param $class array|string the list of additional classes to add inside the panel wrapper.
1256
- *
1257
- * @return string
1258
- *
1259
- * @author Emanuela Castorina
1260
- */
1261
- function yith_set_wrapper_class( $class = '' ) {
1262
- $new_class = 'yith-plugin-ui';
1263
- $class = ( ! empty( $class ) && is_array( $class ) ) ? implode( ' ', $class ) : $class;
1264
-
1265
- return $new_class . ' ' . $class;
1266
- }
1267
  }
1268
 
1269
- if( ! function_exists('yith_get_date_format') ){
1270
- /**
1271
- * get all available date format
1272
- * @since 3.1
1273
- * @author Salvatore Strano
1274
- * @return array
1275
- */
1276
-
1277
- function yith_get_date_format( $js = true ){
1278
-
1279
- $date_formats = array(
1280
- 'F j, Y' => 'F j, Y',
1281
- 'Y-m-d' => 'Y-m-d',
1282
- 'm/d/Y' => 'm/d/Y',
1283
- 'd/m/Y' => 'd/m/Y',
1284
- );
1285
-
1286
- if( $js ){
1287
- $date_formats = array(
1288
- 'MM d, yy' => 'F j, Y',
1289
- 'yy-mm-dd' => 'Y-m-d',
1290
- 'mm/dd/yy' => 'm/d/Y',
1291
- 'dd/mm/yy' => 'd/m/Y',
1292
- );
1293
- }
1294
-
1295
- return apply_filters( 'yith_plugin_fw_date_formats', $date_formats, $js) ;
1296
- }
 
1297
  }
1298
 
1299
 
1300
- if( ! function_exists('yith_format_toggle_title') ) {
1301
- /**
1302
- * replace the placeholders with the values of the element id
1303
- * for toggle element field.
1304
- *
1305
- * @return array
1306
- * @author Salvatore Strano
1307
- * @since 3.1
1308
- */
1309
-
1310
- function yith_format_toggle_title( $title, $value ) {
1311
- preg_match_all( '/(?<=\%%).+?(?=\%%)/', $title, $matches );
1312
- if ( isset( $matches[0] ) ) {
1313
- foreach ( $matches[0] as $element_id ) {
1314
- if ( isset( $value[ $element_id ] ) ) {
1315
- $title = str_replace( '%%' . $element_id . '%%', $value[ $element_id ], $title );
1316
- }
1317
- }
1318
- }
1319
-
1320
- return $title;
1321
- }
1322
  }
1323
 
1324
- if( ! function_exists( 'yith_plugin_fw_load_update_and_licence_files' ) ){
1325
- /**
1326
- * Load premium file for license and update system
1327
- *
1328
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
1329
- *
1330
- * @return void
1331
- */
1332
- function yith_plugin_fw_load_update_and_licence_files(){
1333
- global $plugin_upgrade_fw_data;
1334
-
1335
- /**
1336
- * If the init.php was load by old plugin-fw version
1337
- * load the upgrade and license key from local folder
1338
- */
1339
- if( empty( $plugin_upgrade_fw_data ) ){
1340
- $plugin_upgrade_path = plugin_dir_path( __DIR__ ) . 'plugin-upgrade';
1341
- if( file_exists( $plugin_upgrade_path ) ){
1342
- $required_files = array(
1343
- $plugin_upgrade_path . '/lib/yit-licence.php',
1344
- $plugin_upgrade_path . '/lib/yit-plugin-licence.php',
1345
- $plugin_upgrade_path . '/lib/yit-theme-licence.php',
1346
- $plugin_upgrade_path . '/lib/yit-plugin-upgrade.php'
1347
- );
1348
-
1349
- $plugin_upgrade_fw_data = array( '1.0' => $required_files );
1350
- }
1351
- }
1352
-
1353
- if( ! empty( $plugin_upgrade_fw_data ) && is_array( $plugin_upgrade_fw_data ) ){
1354
- foreach ( $plugin_upgrade_fw_data as $fw_version=> $core_files ){
1355
- foreach ( $core_files as $core_file ){
1356
- if( file_exists( $core_file ) ){
1357
- include_once $core_file;
1358
- }
1359
- }
1360
- }
1361
- }
1362
- }
1363
  }
1364
 
1365
- if ( ! function_exists( 'yith_plugin_fw_remove_duplicate_classes' ) ) {
1366
- /**
1367
- * Remove the duplicate classes from a string.
1368
- *
1369
- * @param $classes string
1370
- *
1371
- * @return string
1372
- *
1373
- * @since 3.2.2
1374
- * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
1375
- */
1376
- function yith_plugin_fw_remove_duplicate_classes( $classes ) {
1377
- $class_array = explode( ' ', $classes );
1378
- $class_unique = array_unique( array_filter( $class_array ) );
1379
- if ( $class_unique ) {
1380
- $classes = implode( ' ', $class_unique );
1381
- }
1382
-
1383
- return $classes;
1384
- }
1385
  }
1386
 
1387
- if ( ! function_exists( 'yith_plugin_fw_add_requirements' ) ) {
1388
 
1389
- function yith_plugin_fw_add_requirements( $plugin_name, $requirements ) {
1390
- if ( ! empty( $requirements ) ) {
1391
- YITH_System_Status()->add_requirements( $plugin_name, $requirements );
1392
 
1393
 
1394
- }
1395
- }
1396
  }
1
  <?php
2
  /**
3
  * This file belongs to the YIT Plugin Framework.
 
4
  * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
  * that is bundled with this package in the file LICENSE.txt.
6
  * It is also available through the world-wide-web at this URL:
18
  * @param string $plugin_basename
19
  * @param string $path
20
  * @param array $var
 
21
  * @return string
22
  * @since 2.0.0
23
  */
46
  * @param string $path
47
  * @param mixed $var
48
  * @param bool $return
 
49
  * @return string
50
  * @since 2.0.0
51
  */
81
  * @param string $more_text
82
  * @param string $split
83
  * @param string $in_paragraph
 
84
  * @return string
85
  * @since 2.0.0
86
  */
185
  * @param string $string The main string. If it is empty or null, the functions return null.
186
  * @param string $after What there is after the main string
187
  * @param bool $echo If echo or only return it
 
188
  * @return string The complete string, if the main string is not empty or null
189
  * @since 2.0.0
190
  */
206
  if ( !function_exists( 'yit_plugin_decode_title' ) ) {
207
  /**
208
  * Change some special characters to put easily html into a string
 
209
  * E.G.
210
  * string: This is [my title] with | a new line
211
  * return: This is <span class="title-highlight">my title</span> with <br /> a new line
212
  *
213
  * @param string $title The string to convert
 
214
  * @return string The html
 
215
  * @since 1.0
216
  */
217
  function yit_plugin_decode_title( $title ) {
227
  * Return the ID of an attachment.
228
  *
229
  * @param string $url
 
230
  * @return int
 
231
  * @since 2.0.0
232
  */
233
 
287
  if ( !function_exists( 'yit_enqueue_script' ) ) {
288
  /**
289
  * Enqueues script.
 
290
  * Registers the script if src provided (does NOT overwrite) and enqueues.
291
  *
292
  * @since 2.0.0
307
  if ( !function_exists( 'yit_enqueue_style' ) ) {
308
  /**
309
  * Enqueues style.
 
310
  * Registers the style if src provided (does NOT overwrite) and enqueues.
311
  *
312
  * @since 2.0.0
334
  if ( !function_exists( 'yit_get_post_meta' ) ) {
335
  /**
336
  * Retrieve the value of a metabox.
 
337
  * This function retrieve the value of a metabox attached to a post. It return either a single value or an array.
338
  *
339
  * @param int $id Post ID.
340
  * @param string $meta The meta key to retrieve.
 
341
  * @return mixed Single value or array
342
  * @since 2.0.0
343
  */
368
  * @param string $string The main string. If it is empty or null, the functions return null.
369
  * @param string $after What there is after the main string
370
  * @param bool $echo If echo or only return it
 
371
  * @return string The complete string, if the main string is not empty or null
372
  * @since 2.0.0
373
  */
392
  *
393
  * @param string $pages
394
  * @param int $range
 
395
  * @return string
396
  * @since 2.0.0
397
  */
485
  * @param bool $id
486
  * @param string $type
487
  * @param string $model
 
488
  * @return array
489
  * @since 2.0.0
490
  */
533
 
534
  if ( !function_exists( 'yit_get_excluded_categories' ) ) {
535
  /**
 
536
  * Retrieve the escluded categories, set on Theme Options
537
  *
538
  * @param int $k
 
539
  * @return string String with all id categories excluded, separated by a comma
 
540
  * @since 2.0.0
541
  */
542
 
584
  * Check the framework core version
585
  *
586
  * @param $headers Array
 
587
  * @return bool
588
  * @since 2.0.0
589
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
656
  * @param mixed $value
657
  * @param array $array
658
  * @param string $check
 
659
  * @return mixed
660
  * @since 2.0.0
661
  * @author Antonino Scarf� <antonino.scarfi@yithemes.com>
685
  if ( !function_exists( 'yit_title_special_characters' ) ) {
686
  /**
687
  * The chars used in yit_decode_title() and yit_encode_title()
 
688
  * E.G.
689
  * string: This is [my title] with | a new line
690
  * return: This is <span class="highlight">my title</span> with <br /> a new line
691
  *
692
  * @param string $title The string to convert
 
693
  * @return string The html
 
694
  * @since 1.0
695
  */
696
  function yit_title_special_characters( $chars ) {
706
  if ( !function_exists( 'yit_decode_title' ) ) {
707
  /**
708
  * Change some special characters to put easily html into a string
 
709
  * E.G.
710
  * string: This is [my title] with | a new line
711
  * return: This is <span class="title-highlight">my title</span> with <br /> a new line
712
  *
713
  * @param string $title The string to convert
 
714
  * @return string The html
 
715
  * @since 1.0
716
  */
717
  function yit_decode_title( $title ) {
724
  if ( !function_exists( 'yit_encode_title' ) ) {
725
  /**
726
  * Change some special characters to put easily html into a string
 
727
  * E.G.
728
  * string: This is [my title] with | a new line
729
  * return: This is <span class="title-highlight">my title</span> with <br /> a new line
730
  *
731
  * @param string $title The string to convert
 
732
  * @return string The html
 
733
  * @since 1.0
734
  */
735
  function yit_encode_title( $title ) {
742
  if ( !function_exists( 'yit_remove_chars_title' ) ) {
743
  /**
744
  * Change some special characters to put easily html into a string
 
745
  * E.G.
746
  * string: This is [my title] with | a new line
747
  * return: This is <span class="title-highlight">my title</span> with <br /> a new line
748
  *
749
  * @param string $title The string to convert
 
750
  * @return string The html
 
751
  * @since 1.0
752
  */
753
  function yit_remove_chars_title( $title ) {
780
  * Load .min.js file if WP_Debug is not defined
781
  *
782
  * @param string $filename The file name
 
783
  * @return string The file path
784
  * @since 2.0.0
785
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
801
  * @param $contenxt context name
802
  * @param $name string name
803
  * @param $value value to translate
 
804
  * @since 2.0.0
805
  * @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
806
  */
817
  * @param $contenxt context name
818
  * @param $name string name
819
  * @param $default_value value to translate
 
820
  * @return string the string translated
821
  * @since 2.0.0
822
  * @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
835
  * @param string $element_type
836
  * @param bool $return_original_if_missing
837
  * @param null|string $ulanguage_code
 
838
  * @return int the translation id
839
  * @since 2.0.0
840
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
857
  *
858
  * @param float $price
859
  * @param array $args (default: array())
 
860
  * @return string
861
  */
862
  function yith_get_formatted_price( $price, $args = array() ) {
889
  * Get terms
890
  *
891
  * @param $args
 
892
  * @return array|int|WP_Error
893
  */
894
  function yith_get_terms( $args ) {
924
  /**
925
  * @param $option
926
  * @param YIT_Plugin_Panel|YIT_Plugin_Panel_WooCommerce $panel
 
927
  * @return string
928
  */
929
  function yith_panel_field_deps_data( $option, $panel ) {
945
  * @param array $field
946
  * @param bool $echo
947
  * @param bool $show_container
 
948
  * @return string|void
949
  */
950
  function yith_plugin_fw_get_field( $field, $echo = false, $show_container = true ) {
1125
  }
1126
  }
1127
 
1128
+ if ( !function_exists( 'yith_plugin_fw_force_regenerate_plugin_update_transient' ) ) {
1129
+ /**
1130
+ * Delete the update plugins transient
1131
+ *
1132
+ * @return void
1133
+ * @since 1.0
1134
+ * @see update_plugins transient and pre_set_site_transient_update_plugins hooks
1135
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
1136
+ */
1137
+ function yith_plugin_fw_force_regenerate_plugin_update_transient() {
1138
+ delete_site_transient( 'update_plugins' );
1139
+ }
 
1140
  }
1141
 
1142
  /* === Gutenberg Support === */
1143
 
1144
+ if ( !function_exists( 'yith_plugin_fw_is_gutenberg_enabled' ) ) {
1145
+ function yith_plugin_fw_is_gutenberg_enabled() {
1146
+ return function_exists( 'YITH_Gutenberg' );
1147
+ }
1148
  }
1149
 
1150
+ if ( !function_exists( 'yith_plugin_fw_gutenberg_add_blocks' ) ) {
1151
+ /**
1152
+ * Add new blocks to Gutenberg
1153
+ *
1154
+ * @param $blocks string|array new blocks
1155
+ * @return bool true if add a new blocks, false otherwise
1156
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
1157
+ */
1158
+ function yith_plugin_fw_gutenberg_add_blocks( $blocks ) {
1159
+ $added = false;
1160
+ if ( yith_plugin_fw_is_gutenberg_enabled() ) {
1161
+ // ADD Blocks
1162
+ $added = YITH_Gutenberg()->add_blocks( $blocks );
1163
+
1164
+ //ADD Blocks arguments
1165
+ if ( $added ) {
1166
+ YITH_Gutenberg()->set_block_args( $blocks );
1167
+ }
1168
+ }
1169
+
1170
+ return $added;
1171
+ }
 
1172
  }
1173
 
1174
+ if ( !function_exists( 'yith_plugin_fw_gutenberg_get_registered_blocks' ) ) {
1175
+ /**
1176
+ * Return an array with the registered blocks
1177
+ *
1178
+ * @return array
1179
+ */
1180
+ function yith_plugin_fw_gutenberg_get_registered_blocks() {
1181
+ return yith_plugin_fw_is_gutenberg_enabled() ? YITH_Gutenberg()->get_registered_blocks() : array();
1182
+ }
1183
  }
1184
 
1185
+ if ( !function_exists( 'yith_plugin_fw_gutenberg_get_to_register_blocks' ) ) {
1186
+ /**
1187
+ * Return an array with the blocks to register
1188
+ *
1189
+ * @return array
1190
+ */
1191
+ function yith_plugin_fw_gutenberg_get_to_register_blocks() {
1192
+ return yith_plugin_fw_is_gutenberg_enabled() ? YITH_Gutenberg()->get_to_register_blocks() : array();
1193
+ }
1194
  }
1195
 
1196
+ if ( !function_exists( 'yith_plugin_fw_get_default_logo' ) ) {
1197
+ /**
1198
+ * Get the default SVG logo
1199
+ *
1200
+ * @return string default logo image url
1201
+ */
1202
+ function yith_plugin_fw_get_default_logo() {
1203
+ return YIT_CORE_PLUGIN_URL . '/assets/images/yith-icon.svg';
1204
+ }
1205
  }
1206
 
1207
+ if ( !function_exists( 'yith_set_wrapper_class' ) ) {
1208
+ /**
1209
+ * Return the class for the new plugin panel style.
1210
+ *
1211
+ * @param $class array|string the list of additional classes to add inside the panel wrapper.
1212
+ * @return string
1213
+ * @author Emanuela Castorina
1214
+ */
1215
+ function yith_set_wrapper_class( $class = '' ) {
1216
+ $new_class = 'yith-plugin-ui';
1217
+ $class = ( !empty( $class ) && is_array( $class ) ) ? implode( ' ', $class ) : $class;
1218
+
1219
+ return $new_class . ' ' . $class;
1220
+ }
 
 
1221
  }
1222
 
1223
+ if ( !function_exists( 'yith_get_date_format' ) ) {
1224
+ /**
1225
+ * get all available date format
1226
+ *
1227
+ * @since 3.1
1228
+ * @author Salvatore Strano
1229
+ * @return array
1230
+ */
1231
+
1232
+ function yith_get_date_format( $js = true ) {
1233
+
1234
+ $date_formats = array(
1235
+ 'F j, Y' => 'F j, Y',
1236
+ 'Y-m-d' => 'Y-m-d',
1237
+ 'm/d/Y' => 'm/d/Y',
1238
+ 'd/m/Y' => 'd/m/Y',
1239
+ );
1240
+
1241
+ if ( $js ) {
1242
+ $date_formats = array(
1243
+ 'MM d, yy' => 'F j, Y',
1244
+ 'yy-mm-dd' => 'Y-m-d',
1245
+ 'mm/dd/yy' => 'm/d/Y',
1246
+ 'dd/mm/yy' => 'd/m/Y',
1247
+ );
1248
+ }
1249
+
1250
+ return apply_filters( 'yith_plugin_fw_date_formats', $date_formats, $js );
1251
+ }
1252
  }
1253
 
1254
 
1255
+ if ( !function_exists( 'yith_format_toggle_title' ) ) {
1256
+ /**
1257
+ * replace the placeholders with the values of the element id
1258
+ * for toggle element field.
1259
+ *
1260
+ * @return array
1261
+ * @author Salvatore Strano
1262
+ * @since 3.1
1263
+ */
1264
+
1265
+ function yith_format_toggle_title( $title, $value ) {
1266
+ preg_match_all( '/(?<=\%%).+?(?=\%%)/', $title, $matches );
1267
+ if ( isset( $matches[ 0 ] ) ) {
1268
+ foreach ( $matches[ 0 ] as $element_id ) {
1269
+ if ( isset( $value[ $element_id ] ) ) {
1270
+ $title = str_replace( '%%' . $element_id . '%%', $value[ $element_id ], $title );
1271
+ }
1272
+ }
1273
+ }
1274
+
1275
+ return $title;
1276
+ }
1277
  }
1278
 
1279
+ if ( !function_exists( 'yith_plugin_fw_load_update_and_licence_files' ) ) {
1280
+ /**
1281
+ * Load premium file for license and update system
1282
+ *
1283
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
1284
+ * @return void
1285
+ */
1286
+ function yith_plugin_fw_load_update_and_licence_files() {
1287
+ global $plugin_upgrade_fw_data;
1288
+
1289
+ /**
1290
+ * If the init.php was load by old plugin-fw version
1291
+ * load the upgrade and license key from local folder
1292
+ */
1293
+ if ( empty( $plugin_upgrade_fw_data ) ) {
1294
+ $plugin_upgrade_path = plugin_dir_path( __DIR__ ) . 'plugin-upgrade';
1295
+ if ( file_exists( $plugin_upgrade_path ) ) {
1296
+ $required_files = array(
1297
+ $plugin_upgrade_path . '/lib/yit-licence.php',
1298
+ $plugin_upgrade_path . '/lib/yit-plugin-licence.php',
1299
+ $plugin_upgrade_path . '/lib/yit-theme-licence.php',
1300
+ $plugin_upgrade_path . '/lib/yit-plugin-upgrade.php'
1301
+ );
1302
+
1303
+ $plugin_upgrade_fw_data = array( '1.0' => $required_files );
1304
+ }
1305
+ }
1306
+
1307
+ if ( !empty( $plugin_upgrade_fw_data ) && is_array( $plugin_upgrade_fw_data ) ) {
1308
+ foreach ( $plugin_upgrade_fw_data as $fw_version => $core_files ) {
1309
+ foreach ( $core_files as $core_file ) {
1310
+ if ( file_exists( $core_file ) ) {
1311
+ include_once $core_file;
1312
+ }
1313
+ }
1314
+ }
1315
+ }
1316
+ }
 
1317
  }
1318
 
1319
+ if ( !function_exists( 'yith_plugin_fw_remove_duplicate_classes' ) ) {
1320
+ /**
1321
+ * Remove the duplicate classes from a string.
1322
+ *
1323
+ * @param $classes string
1324
+ * @return string
1325
+ * @since 3.2.2
1326
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
1327
+ */
1328
+ function yith_plugin_fw_remove_duplicate_classes( $classes ) {
1329
+ $class_array = explode( ' ', $classes );
1330
+ $class_unique = array_unique( array_filter( $class_array ) );
1331
+ if ( $class_unique ) {
1332
+ $classes = implode( ' ', $class_unique );
1333
+ }
1334
+
1335
+ return $classes;
1336
+ }
 
 
1337
  }
1338
 
1339
+ if ( !function_exists( 'yith_plugin_fw_add_requirements' ) ) {
1340
 
1341
+ function yith_plugin_fw_add_requirements( $plugin_name, $requirements ) {
1342
+ if ( !empty( $requirements ) ) {
1343
+ YITH_System_Status()->add_requirements( $plugin_name, $requirements );
1344
 
1345
 
1346
+ }
1347
+ }
1348
  }