YITH WooCommerce Quick View - Version 1.5.0

Version Description

Released 02 March 2021

  • New: Support for WordPress 5.7
  • New: support for WooCommerce 5.0
  • Update: YITH plugin framework
  • Fix: issue with YITH Proteo and button "add to cart" position on image hover
Download this release

Release Info

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

Code changes from version 1.4.9 to 1.5.0

Files changed (62) hide show
  1. README.txt +13 -4
  2. includes/class.yith-wcqv-admin.php +1 -3
  3. includes/class.yith-wcqv-frontend.php +33 -7
  4. includes/class.yith-wcqv.php +1 -3
  5. init.php +4 -4
  6. plugin-fw/assets/css/elementor.css +36 -0
  7. plugin-fw/assets/css/metaboxes.css +1 -0
  8. plugin-fw/assets/css/yith-fields.css +15 -209
  9. plugin-fw/assets/css/yith-icon-font.css +167 -0
  10. plugin-fw/assets/fonts/yith-icon.eot +0 -0
  11. plugin-fw/assets/fonts/yith-icon.svg +1 -0
  12. plugin-fw/assets/fonts/yith-icon.ttf +0 -0
  13. plugin-fw/assets/fonts/yith-icon.woff +0 -0
  14. plugin-fw/assets/images/yith-icon.svg +14 -1
  15. plugin-fw/assets/js/yith-fields.js +12 -7
  16. plugin-fw/assets/js/yith-fields.min.js +1 -1
  17. plugin-fw/assets/js/yith-gutenberg.js +0 -212
  18. plugin-fw/assets/js/yith-gutenberg.min.js +0 -1
  19. plugin-fw/dist/gutenberg/index.asset.php +1 -0
  20. plugin-fw/dist/gutenberg/index.js +1 -0
  21. plugin-fw/dist/gutenberg/style-index.css +2 -0
  22. plugin-fw/includes/builders/elementor/class-yith-elementor-widget.php +464 -0
  23. plugin-fw/includes/builders/elementor/class-yith-elementor.php +123 -0
  24. plugin-fw/includes/{class-yith-gutenberg.php → builders/gutenberg/class-yith-gutenberg.php} +39 -22
  25. plugin-fw/includes/builders/gutenberg/src/.jshintrc +24 -0
  26. plugin-fw/includes/builders/gutenberg/src/common/actions-to-jquery-events.js +26 -0
  27. plugin-fw/includes/builders/gutenberg/src/common/ajaxFetch.js +42 -0
  28. plugin-fw/includes/builders/gutenberg/src/common/checkForDeps.js +21 -0
  29. plugin-fw/includes/builders/gutenberg/src/common/generateShortcode.js +42 -0
  30. plugin-fw/includes/builders/gutenberg/src/common/icons.js +12 -0
  31. plugin-fw/includes/builders/gutenberg/src/common/index.js +4 -0
  32. plugin-fw/includes/builders/gutenberg/src/components/color-palette-control/index.js +96 -0
  33. plugin-fw/includes/builders/gutenberg/src/components/color-palette-control/style.scss +9 -0
  34. plugin-fw/includes/builders/gutenberg/src/components/color-picker-control/index.js +53 -0
  35. plugin-fw/includes/builders/gutenberg/src/components/shortcode/index.js +149 -0
  36. plugin-fw/includes/builders/gutenberg/src/components/shortcode/style.scss +56 -0
  37. plugin-fw/includes/builders/gutenberg/src/edit.js +233 -0
  38. plugin-fw/includes/builders/gutenberg/src/index.js +53 -0
  39. plugin-fw/includes/class-yit-assets.php +13 -1
  40. plugin-fw/includes/class-yit-plugin-panel-woocommerce.php +53 -48
  41. plugin-fw/includes/class-yit-plugin-panel.php +1 -1
  42. plugin-fw/includes/class-yit-pointers.php +2 -2
  43. plugin-fw/includes/class-yith-system-status.php +2 -2
  44. plugin-fw/init.php +2 -2
  45. plugin-fw/languages/yith-plugin-fw-el.mo +0 -0
  46. plugin-fw/languages/yith-plugin-fw-el.po +47 -38
  47. plugin-fw/languages/yith-plugin-fw-es_ES.mo +0 -0
  48. plugin-fw/languages/yith-plugin-fw-es_ES.po +56 -39
  49. plugin-fw/languages/yith-plugin-fw-it_IT.mo +0 -0
  50. plugin-fw/languages/yith-plugin-fw-it_IT.po +56 -38
  51. plugin-fw/languages/yith-plugin-fw-nl_NL.mo +0 -0
  52. plugin-fw/languages/yith-plugin-fw-nl_NL.po +47 -38
  53. plugin-fw/languages/yith-plugin-fw.pot +31 -26
  54. plugin-fw/lib/yith-gutenberg.php +1 -1
  55. plugin-fw/templates/fields/dimensions.php +14 -3
  56. plugin-fw/yit-functions.php +34 -0
  57. plugin-fw/yit-plugin.php +4 -1
  58. plugin-options/premium-options.php +10 -1
  59. plugin-options/settings-options.php +18 -9
  60. templates/admin/premium.php +1 -12
  61. templates/yith-quick-view-content.php +1 -12
  62. templates/yith-quick-view.php +1 -12
README.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: yithemes
3
  Tags: woocommerce, quick view, woocommerce quick view, products quick view
4
  Requires at least: 5.3
5
- Tested up to: 5.6
6
- Stable tag: 1.4.9
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -40,6 +40,13 @@ Full documentation is available [here](https://docs.yithemes.com/yith-woocommerc
40
 
41
  == Changelog ==
42
 
 
 
 
 
 
 
 
43
  = 1.4.9 = Released 04 February 2021
44
 
45
  * New: support for WooCommerce 5.0
@@ -317,7 +324,9 @@ Or, if you have created your own language pack, or have an update for an existin
317
 
318
  == Upgrade notice ==
319
 
320
- = 1.4.9 = Released 04 February 2021
321
 
 
322
  * New: support for WooCommerce 5.0
323
- * Update: YITH plugin framework
 
2
  Contributors: yithemes
3
  Tags: woocommerce, quick view, woocommerce quick view, products quick view
4
  Requires at least: 5.3
5
+ Tested up to: 5.7
6
+ Stable tag: 1.5.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
40
 
41
  == Changelog ==
42
 
43
+ = 1.5.0 = Released 02 March 2021
44
+
45
+ * New: Support for WordPress 5.7
46
+ * New: support for WooCommerce 5.0
47
+ * Update: YITH plugin framework
48
+ * Fix: issue with YITH Proteo and button "add to cart" position on image hover
49
+
50
  = 1.4.9 = Released 04 February 2021
51
 
52
  * New: support for WooCommerce 5.0
324
 
325
  == Upgrade notice ==
326
 
327
+ = 1.5.0 = Released 02 March 2021
328
 
329
+ * New: Support for WordPress 5.7
330
  * New: support for WooCommerce 5.0
331
+ * Update: YITH plugin framework
332
+ * Fix: issue with YITH Proteo and button "add to cart" position on image hover
includes/class.yith-wcqv-admin.php CHANGED
@@ -7,9 +7,7 @@
7
  * @version 1.1.1
8
  */
9
 
10
- if ( ! defined( 'YITH_WCQV' ) ) {
11
- exit;
12
- } // Exit if accessed directly.
13
 
14
  if ( ! class_exists( 'YITH_WCQV_Admin' ) ) {
15
  /**
7
  * @version 1.1.1
8
  */
9
 
10
+ defined( 'YITH_WCQV' ) || exit; // Exit if accessed directly.
 
 
11
 
12
  if ( ! class_exists( 'YITH_WCQV_Admin' ) ) {
13
  /**
includes/class.yith-wcqv-frontend.php CHANGED
@@ -7,9 +7,7 @@
7
  * @version 1.1.1
8
  */
9
 
10
- if ( ! defined( 'YITH_WCQV' ) ) {
11
- exit;
12
- } // Exit if accessed directly
13
 
14
  if ( ! class_exists( 'YITH_WCQV_Frontend' ) ) {
15
  /**
@@ -69,14 +67,13 @@ if ( ! class_exists( 'YITH_WCQV_Frontend' ) ) {
69
  add_action( 'wp_ajax_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
70
  add_action( 'wp_ajax_nopriv_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
71
 
72
- add_action( 'woocommerce_after_shop_loop_item', array( $this, 'yith_add_quick_view_button' ), 15 );
73
- add_action( 'yith_wcwl_table_after_product_name', array( $this, 'yith_add_quick_view_button' ), 15, 0 );
74
-
75
  // Load modal template.
76
  add_action( 'wp_footer', array( $this, 'yith_quick_view' ) );
77
 
78
  // Load action for product template.
79
  $this->yith_quick_view_action_template();
 
 
80
 
81
  add_shortcode( 'yith_quick_view', array( $this, 'quick_view_shortcode' ) );
82
  add_filter( 'woocommerce_add_to_cart_form_action', array( $this, 'avoid_redirect_to_single_page' ), 10, 1 );
@@ -141,6 +138,35 @@ if ( ! class_exists( 'YITH_WCQV_Frontend' ) ) {
141
  }
142
  }
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  /**
145
  * Add quick view button in wc product loop
146
  *
@@ -341,7 +367,7 @@ if ( ! class_exists( 'YITH_WCQV_Frontend' ) ) {
341
  $atts
342
  );
343
 
344
- extract( $atts );
345
 
346
  return $this->yith_add_quick_view_button( intval( $product_id ), $label, true );
347
  }
7
  * @version 1.1.1
8
  */
9
 
10
+ defined( 'YITH_WCQV' ) || exit; // Exit if accessed directly.
 
 
11
 
12
  if ( ! class_exists( 'YITH_WCQV_Frontend' ) ) {
13
  /**
67
  add_action( 'wp_ajax_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
68
  add_action( 'wp_ajax_nopriv_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
69
 
 
 
 
70
  // Load modal template.
71
  add_action( 'wp_footer', array( $this, 'yith_quick_view' ) );
72
 
73
  // Load action for product template.
74
  $this->yith_quick_view_action_template();
75
+ // Add quick view button.
76
+ add_action( 'init', array( $this, 'add_button' ) );
77
 
78
  add_shortcode( 'yith_quick_view', array( $this, 'quick_view_shortcode' ) );
79
  add_filter( 'woocommerce_add_to_cart_form_action', array( $this, 'avoid_redirect_to_single_page' ), 10, 1 );
138
  }
139
  }
140
 
141
+ /**
142
+ * Add quick view button hooks
143
+ *
144
+ * @since 1.5.0
145
+ * @author Francesco Licandro
146
+ * @return void
147
+ */
148
+ public function add_button() {
149
+ if ( $this->is_proteo_add_to_cart_hover() ) {
150
+ add_action( 'yith_proteo_products_loop_add_to_cart_actions', array( $this, 'yith_add_quick_view_button' ), 55 );
151
+ } else {
152
+ add_action( 'woocommerce_after_shop_loop_item', array( $this, 'yith_add_quick_view_button' ), 15 );
153
+ }
154
+
155
+ add_action( 'yith_wcwl_table_after_product_name', array( $this, 'yith_add_quick_view_button' ), 15 );
156
+ }
157
+
158
+
159
+ /**
160
+ * Check if current theme is YITH Proteo and if the add to cart button is visible on image hover
161
+ *
162
+ * @since 1.6.7
163
+ * @author Francesco Licandro
164
+ * @return boolean
165
+ */
166
+ public function is_proteo_add_to_cart_hover() {
167
+ return defined( 'YITH_PROTEO_VERSION' ) && 'hover' === get_theme_mod( 'yith_proteo_products_loop_add_to_cart_position', 'classic' );
168
+ }
169
+
170
  /**
171
  * Add quick view button in wc product loop
172
  *
367
  $atts
368
  );
369
 
370
+ extract( $atts ); // phpcs:ignore
371
 
372
  return $this->yith_add_quick_view_button( intval( $product_id ), $label, true );
373
  }
includes/class.yith-wcqv.php CHANGED
@@ -7,9 +7,7 @@
7
  * @version 1.0.0
8
  */
9
 
10
- if ( ! defined( 'YITH_WCQV' ) ) {
11
- exit;
12
- } // Exit if accessed directly.
13
 
14
  if ( ! class_exists( 'YITH_WCQV' ) ) {
15
  /**
7
  * @version 1.0.0
8
  */
9
 
10
+ defined( 'YITH_WCQV' ) || exit; // Exit if accessed directly.
 
 
11
 
12
  if ( ! class_exists( 'YITH_WCQV' ) ) {
13
  /**
init.php CHANGED
@@ -3,17 +3,17 @@
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.4.9
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-quick-view
10
  * Domain Path: /languages/
11
  * WC requires at least: 3.7
12
- * WC tested up to: 5.0
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Quick View
16
- * @version 1.4.9
17
  */
18
  /** Copyright 2015-2021 - YITH (email : plugins@yithemes.com)
19
  *
@@ -62,7 +62,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
62
 
63
 
64
  if ( ! defined( 'YITH_WCQV_VERSION' ) ) {
65
- define( 'YITH_WCQV_VERSION', '1.4.9' );
66
  }
67
 
68
  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.5.0
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-quick-view
10
  * Domain Path: /languages/
11
  * WC requires at least: 3.7
12
+ * WC tested up to: 5.1
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Quick View
16
+ * @version 1.5.0
17
  */
18
  /** Copyright 2015-2021 - YITH (email : plugins@yithemes.com)
19
  *
62
 
63
 
64
  if ( ! defined( 'YITH_WCQV_VERSION' ) ) {
65
+ define( 'YITH_WCQV_VERSION', '1.5.0' );
66
  }
67
 
68
  if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
plugin-fw/assets/css/elementor.css ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Style for Elementor Editor customization
3
+ */
4
+
5
+ .yith-plugin-fw-elementor-widget-description {
6
+ margin-bottom : 10px;
7
+ font-style : italic;
8
+ }
9
+
10
+ .yith-plugin-fw-elementor-shortcode-widget--shortcode,
11
+ .yith-plugin-fw-elementor-shortcode-widget--empty-html {
12
+ font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
13
+ padding : 1em 1em 1.2em;
14
+ border : 1px solid #1e1e1e;
15
+ border-radius : 4px;
16
+ }
17
+
18
+ .yith-plugin-fw-elementor-shortcode-widget__title {
19
+ font-size : 15px;
20
+ font-weight : 700;
21
+ margin-bottom : 10px;
22
+ }
23
+
24
+ .yith-plugin-fw-elementor-shortcode-widget__message {
25
+ font-style : italic;
26
+ font-size : 13px;
27
+ }
28
+
29
+ .yith-plugin-fw-elementor-shortcode-widget--shortcode .yith-plugin-fw-elementor-shortcode-widget__content {
30
+ font-family : Menlo, Consolas, monaco, monospace;
31
+ color : #1e1e1e;
32
+ font-size : 13px;
33
+ padding : 0.8em 1em;
34
+ border : 1px solid #ddd;
35
+ border-radius : 4px;
36
+ }
plugin-fw/assets/css/metaboxes.css CHANGED
@@ -126,6 +126,7 @@
126
  width : auto !important;
127
  display : inline-block;
128
  font-weight : normal;
 
129
  }
130
 
131
  .metaboxes-tab input[type="checkbox"] {
126
  width : auto !important;
127
  display : inline-block;
128
  font-weight : normal;
129
+ float : none;
130
  }
131
 
132
  .metaboxes-tab input[type="checkbox"] {
plugin-fw/assets/css/yith-fields.css CHANGED
@@ -466,205 +466,6 @@ WordPress 5.3 with old panel fixes
466
  /****************
467
  YITH UI
468
  ****************/
469
- @font-face {
470
- font-family : 'yith-icon';
471
- src : url('../fonts/yith-icon.eot?g6bfgy');
472
- src : url('../fonts/yith-icon.eot?g6bfgy#iefix') format('embedded-opentype'),
473
- url('../fonts/yith-icon.ttf?g6bfgy') format('truetype'),
474
- url('../fonts/yith-icon.woff?g6bfgy') format('woff'),
475
- url('../fonts/yith-icon.svg?g6bfgy#yith-icon') format('svg');
476
- font-weight : normal;
477
- font-style : normal;
478
- }
479
-
480
- [class^="icon-"], [class*=" icon-"][class^="yith-icon-"], [class*=" yith-icon-"] {
481
- /* use !important to prevent issues with browser extensions that change fonts */
482
- font-family : 'yith-icon' !important;
483
- speak : none;
484
- font-style : normal;
485
- font-weight : normal;
486
- font-variant : normal;
487
- text-transform : none;
488
- line-height : 1;
489
-
490
- /* Better Font Rendering =========== */
491
- -webkit-font-smoothing : antialiased;
492
- -moz-osx-font-smoothing : grayscale;
493
- }
494
-
495
- .yith-icon-paypal-svgrepo-com:before {
496
- content : "\e91b";
497
- }
498
-
499
- .yith-icon-check-circle:before {
500
- content : "\e921";
501
- color : #757575;
502
- }
503
-
504
- .yith-icon-info-squared:before {
505
- content : "\e922";
506
- color : #757575;
507
- }
508
-
509
- .yith-icon-warning-triangle:before {
510
- content : "\e923";
511
- color : #757575;
512
- }
513
-
514
- .yith-icon-bank:before {
515
- content : "\e91c";
516
- }
517
-
518
- .yith-icon-accounting:before {
519
- content : "\e91d";
520
- }
521
-
522
- .yith-icon-bank-check:before {
523
- content : "\e91e";
524
- }
525
-
526
- .yith-icon-cash:before {
527
- content : "\e91f";
528
- }
529
-
530
- .yith-icon-credit-card:before {
531
- content : "\e920";
532
- }
533
-
534
- .yith-icon-calendar_add:before {
535
- content : "\e913";
536
- color : #757575;
537
- }
538
-
539
- .yith-icon-calendar_money:before {
540
- content : "\e914";
541
- color : #757575;
542
- }
543
-
544
- .yith-icon-calendar2:before {
545
- content : "\e915";
546
- color : #757575;
547
- }
548
-
549
- .yith-icon-people:before {
550
- content : "\e916";
551
- color : #757575;
552
- }
553
-
554
- .yith-icon-shield_money:before {
555
- content : "\e917";
556
- color : #757575;
557
- }
558
-
559
- .yith-icon-time_check:before {
560
- content : "\e918";
561
- color : #757575;
562
- }
563
-
564
- .yith-icon-world_settings:before {
565
- content : "\e919";
566
- color : #757575;
567
- }
568
-
569
- .yith-icon-arrow_eye_closed:before {
570
- content : "\e912";
571
- color : #757575;
572
- }
573
-
574
- .yith-icon-arrow_eye:before {
575
- content : "\e911";
576
- color : #757575;
577
- }
578
-
579
- .yith-icon-reset:before {
580
- content : "\e910";
581
- color : #757575;
582
- }
583
-
584
- .yith-icon-drag:before {
585
- content : "\e90f";
586
- color : #757575;
587
- }
588
-
589
- .yith-icon-trash:before {
590
- content : "\e90d";
591
- color : #757575;
592
- }
593
-
594
- .yith-icon-info:before {
595
- content : "\e90e";
596
- color : #757575;
597
- }
598
-
599
- .yith-icon-arrow_down:before {
600
- content : "\e900";
601
- color : #757575;
602
- }
603
-
604
- .yith-icon-arrow_left:before {
605
- content : "\e901";
606
- color : #757575;
607
- }
608
-
609
- .yith-icon-arrow_right:before {
610
- content : "\e902";
611
- color : #757575;
612
- }
613
-
614
- .yith-icon-arrow_up:before {
615
- content : "\e903";
616
- color : #757575;
617
- }
618
-
619
- .yith-icon-calendar:before {
620
- content : "\e904";
621
- color : #757575;
622
- }
623
-
624
- .yith-icon-check:before {
625
- content : "\e905";
626
- color : #757575;
627
- }
628
-
629
- .yith-icon-close:before {
630
- content : "\e906";
631
- color : #757575;
632
- }
633
-
634
- .yith-icon-edit:before {
635
- content : "\e907";
636
- color : #757575;
637
- }
638
-
639
- .yith-icon-magnifier:before {
640
- content : "\e908";
641
- color : #757575;
642
- }
643
-
644
- .yith-icon-pencil:before {
645
- content : "\e909";
646
- color : #757575;
647
- }
648
-
649
- .yith-icon-plus:before {
650
- content : "\e90a";
651
- color : #757575;
652
- }
653
-
654
- .yith-icon-update:before {
655
- content : "\e90b";
656
- color : #757575;
657
- }
658
-
659
- .yith-icon-upload:before {
660
- content : "\e90c";
661
- color : #757575;
662
- }
663
-
664
- .yith-icon-reply:before {
665
- content : "\e91a";
666
- }
667
-
668
  .yith-plugin-fw-banner {
669
  width : 100%;
670
  height : 45px;
@@ -1480,16 +1281,16 @@ span.select2.select2-container.select2-container--default.yith-plugin-fw-select2
1480
 
1481
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
1482
  .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
1483
- content : attr(data-text-on);
1484
- color : #98aa36;
1485
- height : 14px;
1486
- font-size : 12px;
1487
- font-weight : 600;
1488
- padding-left : 0;
1489
- padding-right: 18px;
1490
- display : block;
1491
- white-space : nowrap;
1492
- text-align : center;
1493
  }
1494
 
1495
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
@@ -2212,6 +2013,11 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2212
  color : #007694;
2213
  }
2214
 
 
 
 
 
 
2215
  .yith-plugin-fw-dimensions__dimensions {
2216
  display : flex;
2217
  margin : 0;
466
  /****************
467
  YITH UI
468
  ****************/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
469
  .yith-plugin-fw-banner {
470
  width : 100%;
471
  height : 45px;
1281
 
1282
  .yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
1283
  .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
1284
+ content : attr(data-text-on);
1285
+ color : #98aa36;
1286
+ height : 14px;
1287
+ font-size : 12px;
1288
+ font-weight : 600;
1289
+ padding-left : 0;
1290
+ padding-right : 18px;
1291
+ display : block;
1292
+ white-space : nowrap;
1293
+ text-align : center;
1294
  }
1295
 
1296
  .yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
2013
  color : #007694;
2014
  }
2015
 
2016
+ .yith-plugin-fw-dimensions__unit--unique {
2017
+ text-decoration : none;
2018
+ cursor : default;
2019
+ }
2020
+
2021
  .yith-plugin-fw-dimensions__dimensions {
2022
  display : flex;
2023
  margin : 0;
plugin-fw/assets/css/yith-icon-font.css ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face {
2
+ font-family: 'yith-icon';
3
+ src: url('../fonts/yith-icon.eot?tkn99p');
4
+ src: url('../fonts/yith-icon.eot?tkn99p#iefix') format('embedded-opentype'),
5
+ url('../fonts/yith-icon.ttf?tkn99p') format('truetype'),
6
+ url('../fonts/yith-icon.woff?tkn99p') format('woff'),
7
+ url('../fonts/yith-icon.svg?tkn99p#yith-icon') format('svg');
8
+ font-weight: normal;
9
+ font-style: normal;
10
+ font-display: block;
11
+ }
12
+
13
+ [class^="yith-icon-"], [class*=" yith-icon-"] {
14
+ /* use !important to prevent issues with browser extensions that change fonts */
15
+ font-family: 'yith-icon' !important;
16
+ speak: never;
17
+ font-style: normal;
18
+ font-weight: normal;
19
+ font-variant: normal;
20
+ text-transform: none;
21
+ line-height: 1;
22
+
23
+ /* Better Font Rendering =========== */
24
+ -webkit-font-smoothing: antialiased;
25
+ -moz-osx-font-smoothing: grayscale;
26
+ }
27
+
28
+ .yith-icon-paypal-svgrepo-com:before {
29
+ content: "\e91b";
30
+ }
31
+ .yith-icon-check-circle:before {
32
+ content: "\e921";
33
+ color: #757575;
34
+ }
35
+ .yith-icon-info-squared:before {
36
+ content: "\e922";
37
+ color: #757575;
38
+ }
39
+ .yith-icon-warning-triangle:before {
40
+ content: "\e923";
41
+ color: #757575;
42
+ }
43
+ .yith-icon-bank:before {
44
+ content: "\e91c";
45
+ }
46
+ .yith-icon-accounting:before {
47
+ content: "\e91d";
48
+ }
49
+ .yith-icon-bank-check:before {
50
+ content: "\e91e";
51
+ }
52
+ .yith-icon-cash:before {
53
+ content: "\e91f";
54
+ }
55
+ .yith-icon-credit-card:before {
56
+ content: "\e920";
57
+ }
58
+ .yith-icon-yith:before {
59
+ content: "\e924";
60
+ }
61
+ .yith-icon-calendar_add:before {
62
+ content: "\e913";
63
+ color: #757575;
64
+ }
65
+ .yith-icon-calendar_money:before {
66
+ content: "\e914";
67
+ color: #757575;
68
+ }
69
+ .yith-icon-calendar2:before {
70
+ content: "\e915";
71
+ color: #757575;
72
+ }
73
+ .yith-icon-people:before {
74
+ content: "\e916";
75
+ color: #757575;
76
+ }
77
+ .yith-icon-shield_money:before {
78
+ content: "\e917";
79
+ color: #757575;
80
+ }
81
+ .yith-icon-time_check:before {
82
+ content: "\e918";
83
+ color: #757575;
84
+ }
85
+ .yith-icon-world_settings:before {
86
+ content: "\e919";
87
+ color: #757575;
88
+ }
89
+ .yith-icon-arrow_eye_closed:before {
90
+ content: "\e912";
91
+ color: #757575;
92
+ }
93
+ .yith-icon-arrow_eye:before {
94
+ content: "\e911";
95
+ color: #757575;
96
+ }
97
+ .yith-icon-reset:before {
98
+ content: "\e910";
99
+ color: #757575;
100
+ }
101
+ .yith-icon-drag:before {
102
+ content: "\e90f";
103
+ color: #757575;
104
+ }
105
+ .yith-icon-trash:before {
106
+ content: "\e90d";
107
+ color: #757575;
108
+ }
109
+ .yith-icon-info:before {
110
+ content: "\e90e";
111
+ color: #757575;
112
+ }
113
+ .yith-icon-arrow_down:before {
114
+ content: "\e900";
115
+ color: #757575;
116
+ }
117
+ .yith-icon-arrow_left:before {
118
+ content: "\e901";
119
+ color: #757575;
120
+ }
121
+ .yith-icon-arrow_right:before {
122
+ content: "\e902";
123
+ color: #757575;
124
+ }
125
+ .yith-icon-arrow_up:before {
126
+ content: "\e903";
127
+ color: #757575;
128
+ }
129
+ .yith-icon-calendar:before {
130
+ content: "\e904";
131
+ color: #757575;
132
+ }
133
+ .yith-icon-check:before {
134
+ content: "\e905";
135
+ color: #757575;
136
+ }
137
+ .yith-icon-close:before {
138
+ content: "\e906";
139
+ color: #757575;
140
+ }
141
+ .yith-icon-edit:before {
142
+ content: "\e907";
143
+ color: #757575;
144
+ }
145
+ .yith-icon-magnifier:before {
146
+ content: "\e908";
147
+ color: #757575;
148
+ }
149
+ .yith-icon-pencil:before {
150
+ content: "\e909";
151
+ color: #757575;
152
+ }
153
+ .yith-icon-plus:before {
154
+ content: "\e90a";
155
+ color: #757575;
156
+ }
157
+ .yith-icon-update:before {
158
+ content: "\e90b";
159
+ color: #757575;
160
+ }
161
+ .yith-icon-upload:before {
162
+ content: "\e90c";
163
+ color: #757575;
164
+ }
165
+ .yith-icon-reply:before {
166
+ content: "\e91a";
167
+ }
plugin-fw/assets/fonts/yith-icon.eot CHANGED
Binary file
plugin-fw/assets/fonts/yith-icon.svg CHANGED
@@ -43,4 +43,5 @@
43
  <glyph unicode="&#xe921;" glyph-name="check-circle" d="M483.499 298.667c-7.509 0-14.848 3.072-20.139 8.363l-99.499 99.669c-11.093 11.093-11.093 29.184 0 40.277s29.184 11.093 40.277 0l77.141-77.141 179.2 224.085c9.728 12.288 27.648 14.336 39.936 4.437 12.288-9.728 14.336-27.648 4.437-39.936l-199.168-249.173c-5.12-6.315-12.629-10.24-20.651-10.581-0.512 0-1.024 0-1.536 0zM512 35.499c-227.499 0-412.501 185.003-412.501 412.501s185.003 412.501 412.501 412.501 412.501-185.003 412.501-412.501-185.003-412.501-412.501-412.501zM512 803.499c-196.096 0-355.499-159.403-355.499-355.499s159.403-355.499 355.499-355.499 355.499 159.573 355.499 355.499-159.403 355.499-355.499 355.499z" />
44
  <glyph unicode="&#xe922;" glyph-name="info-squared" d="M853.333 35.499h-682.667c-39.253 0-71.168 31.915-71.168 71.168v682.667c0 39.253 31.915 71.168 71.168 71.168h682.667c39.253 0 71.168-31.915 71.168-71.168v-682.667c0-39.253-31.915-71.168-71.168-71.168zM170.667 803.499c-7.851 0-14.165-6.315-14.165-14.165v-682.667c0-7.851 6.315-14.165 14.165-14.165h682.667c7.851 0 14.165 6.315 14.165 14.165v682.667c0 7.851-6.315 14.165-14.165 14.165h-682.667zM504.832 561.835c-19.627 0-35.499 15.872-35.499 35.499s15.872 35.499 35.499 35.499 35.499-15.872 35.499-35.499-15.872-35.499-35.499-35.499zM568.832 291.499h-28.501v199.168c0 15.701-12.8 28.501-28.501 28.501h-28.501c-15.701 0-28.501-12.8-28.501-28.501s12.8-28.501 28.501-28.501v-170.667h-28.501c-15.701 0-28.501-12.8-28.501-28.501s12.8-28.501 28.501-28.501h113.835c15.701 0 28.501 12.8 28.501 28.501s-12.629 28.501-28.331 28.501z" />
45
  <glyph unicode="&#xe923;" glyph-name="warning-triangle" d="M504.832 789.333l384-682.667h-768l384 682.667zM504.832 846.165v0c-20.48 0-39.424-11.093-49.664-29.013l-384-682.667c-9.899-17.579-9.728-39.083 0.512-56.661 10.24-17.408 28.843-28.16 49.152-28.16h768c20.139 0 38.912 10.752 49.152 28.16s10.411 39.083 0.512 56.661l-384 682.667c-10.069 17.92-29.013 29.013-49.664 29.013v0zM504.832 276.48c23.552 0 42.667-19.115 42.667-42.667s-19.115-42.667-42.667-42.667-42.667 19.115-42.667 42.667 19.115 42.667 42.667 42.667zM497.835 334.165c-15.701 0-28.501 12.8-28.501 28.501v227.499c0 15.701 12.8 28.501 28.501 28.501s28.501-12.8 28.501-28.501v-227.499c-0.171-15.701-12.8-28.501-28.501-28.501z" />
 
46
  </font></defs></svg>
43
  <glyph unicode="&#xe921;" glyph-name="check-circle" d="M483.499 298.667c-7.509 0-14.848 3.072-20.139 8.363l-99.499 99.669c-11.093 11.093-11.093 29.184 0 40.277s29.184 11.093 40.277 0l77.141-77.141 179.2 224.085c9.728 12.288 27.648 14.336 39.936 4.437 12.288-9.728 14.336-27.648 4.437-39.936l-199.168-249.173c-5.12-6.315-12.629-10.24-20.651-10.581-0.512 0-1.024 0-1.536 0zM512 35.499c-227.499 0-412.501 185.003-412.501 412.501s185.003 412.501 412.501 412.501 412.501-185.003 412.501-412.501-185.003-412.501-412.501-412.501zM512 803.499c-196.096 0-355.499-159.403-355.499-355.499s159.403-355.499 355.499-355.499 355.499 159.573 355.499 355.499-159.403 355.499-355.499 355.499z" />
44
  <glyph unicode="&#xe922;" glyph-name="info-squared" d="M853.333 35.499h-682.667c-39.253 0-71.168 31.915-71.168 71.168v682.667c0 39.253 31.915 71.168 71.168 71.168h682.667c39.253 0 71.168-31.915 71.168-71.168v-682.667c0-39.253-31.915-71.168-71.168-71.168zM170.667 803.499c-7.851 0-14.165-6.315-14.165-14.165v-682.667c0-7.851 6.315-14.165 14.165-14.165h682.667c7.851 0 14.165 6.315 14.165 14.165v682.667c0 7.851-6.315 14.165-14.165 14.165h-682.667zM504.832 561.835c-19.627 0-35.499 15.872-35.499 35.499s15.872 35.499 35.499 35.499 35.499-15.872 35.499-35.499-15.872-35.499-35.499-35.499zM568.832 291.499h-28.501v199.168c0 15.701-12.8 28.501-28.501 28.501h-28.501c-15.701 0-28.501-12.8-28.501-28.501s12.8-28.501 28.501-28.501v-170.667h-28.501c-15.701 0-28.501-12.8-28.501-28.501s12.8-28.501 28.501-28.501h113.835c15.701 0 28.501 12.8 28.501 28.501s-12.629 28.501-28.331 28.501z" />
45
  <glyph unicode="&#xe923;" glyph-name="warning-triangle" d="M504.832 789.333l384-682.667h-768l384 682.667zM504.832 846.165v0c-20.48 0-39.424-11.093-49.664-29.013l-384-682.667c-9.899-17.579-9.728-39.083 0.512-56.661 10.24-17.408 28.843-28.16 49.152-28.16h768c20.139 0 38.912 10.752 49.152 28.16s10.411 39.083 0.512 56.661l-384 682.667c-10.069 17.92-29.013 29.013-49.664 29.013v0zM504.832 276.48c23.552 0 42.667-19.115 42.667-42.667s-19.115-42.667-42.667-42.667-42.667 19.115-42.667 42.667 19.115 42.667 42.667 42.667zM497.835 334.165c-15.701 0-28.501 12.8-28.501 28.501v227.499c0 15.701 12.8 28.501 28.501 28.501s28.501-12.8 28.501-28.501v-227.499c-0.171-15.701-12.8-28.501-28.501-28.501z" />
46
+ <glyph unicode="&#xe924;" glyph-name="yith" horiz-adv-x="1025" d="M912.045 578.581c-47.452-32.802-108.205-67.153-182.659-103.005 37.852 125.106 58.903 241.862 63.103 350.217 3.15 87.254-35.802 131.956-116.756 134.057-97.805 3.15-161.958-51.503-192.459-164.058 17.101 7.35 34.702 11.051 52.903 11.051 14.901 0 27.201-6.050 36.802-18.151s13.851-26.051 12.801-41.802c-1-41.002-21.951-84.954-62.753-131.706-40.802-46.852-77.104-70.203-108.905-70.203-22.251 0-32.852 18.901-31.802 56.753 1.050 20.001 7.9 60.503 20.501 121.506 11.551 57.803 17.351 96.705 17.351 116.706 0 34.702-8.95 62.853-26.801 84.404-17.901 21.551-43.652 30.752-77.304 27.601-23.151-2.1-57.303-23.151-102.555-63.053-33.702-30.651-67.353-61.103-101.005-91.604l36.302-42.602c29.401 22.101 47.302 33.152 53.603 33.152 20.001 0 29.451-13.701 28.451-41.002 0-2.15-9.5-35.252-28.401-99.405s-28.901-112.005-30.001-143.557c-2.1-43.152 5.8-76.254 23.751-99.355 22.151-28.401 59.103-40.502 110.905-36.302 61.203 4.2 122.456 26.851 183.709 67.803 25.351 16.851 49.602 36.302 72.854 58.403-8.4-42.102-18.401-77.854-30.001-107.305-113.556-51.503-195.56-95.655-246.062-132.506-71.553-51.503-109.905-106.705-115.156-165.608-9.5-102.005 42.052-153.007 154.608-153.007 75.704 0 148.807 46.252 219.261 138.807 59.953 78.854 112.005 184.059 156.158 315.465 76.454 37.952 141.057 75.104 193.959 111.505-1.7-12.251 19.551 92.805 15.601 76.804zM369.668 155.211c-16.851 0-24.751 7.4-23.701 22.101 2.1 27.351 49.452 63.653 142.007 108.855-48.402-87.254-87.854-130.956-118.306-130.956z" />
47
  </font></defs></svg>
plugin-fw/assets/fonts/yith-icon.ttf CHANGED
Binary file
plugin-fw/assets/fonts/yith-icon.woff CHANGED
Binary file
plugin-fw/assets/images/yith-icon.svg CHANGED
@@ -1 +1,14 @@
1
- <?xml version="1.0" standalone="no"?><!-- Generator: Gravit.io --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 20.5 20.479" width="20.5" height="20.479"><defs><clipPath id="_clipPath_BBRuGaomYLKjPKjOOHpnNdPxBnLPFPyk"><rect width="20.5" height="20.479"/></clipPath></defs><g clip-path="url(#_clipPath_BBRuGaomYLKjPKjOOHpnNdPxBnLPFPyk)"><g><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 " fill="rgb(255,255,255)"/></g></g></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?><!-- Generator: Gravit.io -->
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 20.5 20.479" width="20.5" height="20.479">
3
+ <defs>
4
+ <clipPath id="_clipPath_BBRuGaomYLKjPKjOOHpnNdPxBnLPFPyk">
5
+ <rect width="20.5" height="20.479"/>
6
+ </clipPath>
7
+ </defs>
8
+ <g clip-path="url(#_clipPath_BBRuGaomYLKjPKjOOHpnNdPxBnLPFPyk)">
9
+ <g>
10
+ <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 "
11
+ fill="rgb(255,255,255)"/>
12
+ </g>
13
+ </g>
14
+ </svg>
plugin-fw/assets/js/yith-fields.js CHANGED
@@ -203,8 +203,8 @@
203
  } );
204
 
205
  $image_gallery_ids.val( attachment_ids );
206
- $image_gallery_ids.trigger( 'change' );
207
- } );
208
 
209
  image_gallery_frame.open();
210
 
@@ -426,8 +426,13 @@
426
 
427
  /* on-off */
428
  $( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
429
- var input = $( this ).prev( 'input' ),
430
- checked = input.prop( 'checked' );
 
 
 
 
 
431
 
432
  if ( checked ) {
433
  input.prop( 'checked', false ).attr( 'value', 'no' ).removeClass( 'onoffchecked' );
@@ -605,12 +610,12 @@
605
  counter = 0,
606
  hidden_obj = $( '<input type="hidden">' );
607
 
608
- toggle_element.find( '.yith-toggle-row' ).each( function() {
609
  var key = parseInt( $( this ).data( 'item_key' ) );
610
- if( counter <= key ) {
611
  counter = key + 1;
612
  }
613
- });
614
 
615
  hidden_obj.val( counter );
616
 
203
  } );
204
 
205
  $image_gallery_ids.val( attachment_ids );
206
+ $image_gallery_ids.trigger( 'change' );
207
+ } );
208
 
209
  image_gallery_frame.open();
210
 
426
 
427
  /* on-off */
428
  $( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
429
+ var input = $( this ).prev( 'input' ),
430
+ checked = input.prop( 'checked' ),
431
+ disabled = input.prop( 'disabled' );
432
+
433
+ if ( disabled ) {
434
+ return;
435
+ }
436
 
437
  if ( checked ) {
438
  input.prop( 'checked', false ).attr( 'value', 'no' ).removeClass( 'onoffchecked' );
610
  counter = 0,
611
  hidden_obj = $( '<input type="hidden">' );
612
 
613
+ toggle_element.find( '.yith-toggle-row' ).each( function () {
614
  var key = parseInt( $( this ).data( 'item_key' ) );
615
+ if ( counter <= key ) {
616
  counter = key + 1;
617
  }
618
+ } );
619
 
620
  hidden_obj.val( counter );
621
 
plugin-fw/assets/js/yith-fields.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e(document).on("yith_fields_init",function(){var t=e(".yith-plugin-fw-datepicker"),i=e(".yith-plugin-fw-colorpicker"),n={imgPreviewHandler:".yith-plugin-fw-upload-img-preview",uploadButtonHandler:".yith-plugin-fw-upload-button",imgUrlHandler:".yith-plugin-fw-upload-img-url",resetButtonHandler:".yith-plugin-fw-upload-button-reset",imgUrl:e(".yith-plugin-fw-upload-img-url")},a=e(".add_media"),l={rootSelector:".yith-plugin-fw-image-gallery",buttonSelector:".yith-plugin-fw-image-gallery .image-gallery-button",sliderWrapper:e(".yith-plugin-fw-image-gallery ul.slides-wrapper")},o=e(".yith-plugin-fw-sidebar-layout"),s=e(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),r=e(".yit-icons-manager-wrapper");e(".yith-plugin-ui td.forminp-checkbox");t.each(function(){var t=e(this).data();t.showAnim=!1,t.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},t.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},e(this).datepicker(t)}),i.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.change()}}),i.each(function(){var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),n=e(this).closest(".yith-single-colorpicker"),a=i.find(".wp-picker-input-wrap"),l=n.find(".wp-picker-input-wrap");if(a.length&&i.find("a.wp-color-result").attr("title",t),n.length&&n.find("a.wp-color-result").attr("title",t),!a.find(".wp-picker-default-custom").length){var o=e("<span/>").attr({"class":"wp-picker-default-custom"});a.find(".wp-picker-default").wrap(o)}l.find(".wp-picker-default-custom").length||(o=e("<span/>").attr({"class":"wp-picker-default-custom"}),l.find(".wp-picker-default").wrap(o))}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(n.imgUrl.change(function(){var t=e(this).val(),i=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)"),a=e(this).parent().find(n.imgPreviewHandler).first();a.length<1&&(a=e(this).parent().parent().find(n.imgPreviewHandler).first()),i.test(t)?a.html('<img src="'+t+'" style="max-width:100px; max-height:100px;" />'):a.html("")}).trigger("change"),e(document).on("click",n.uploadButtonHandler,function(t){t.preventDefault();var i,a=e(this).attr("id").replace(/-button$/,"").replace(/(\[|\])/g,"\\$1");if(i)i.open();else{var l=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(i=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:l})).on("select",function(){var t=i.state().get("selection").first().toJSON();e("#"+a).val(t.url),e("#"+a+"-yith-attachment-id")&&e("#"+a+"-yith-attachment-id").val(t.id),n.imgUrl.trigger("change")}),i.open()}}),e(document).on("click",n.resetButtonHandler,function(t){var i=e(this),a=i.attr("id").replace(/(\[|\])/g,"\\$1"),l=i.attr("id").replace(/-button-reset$/,"").replace(/(\[|\])/g,"\\$1"),o=e("#"+a).data("default");e("#"+l).val(o),n.imgUrl.trigger("change")}));a.on("click",function(){}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("click",l.buttonSelector,function(t){var i=e(this),n=i.closest(l.rootSelector),a=n.find(".image_gallery_ids"),o=a.val(),s=n.find("ul.slides-wrapper"),r=wp.media.frames.image_gallery=wp.media({title:i.data("choose"),button:{text:i.data("update")},states:[new wp.media.controller.Library({title:i.data("choose"),filterable:"all",multiple:!0})]});r.on("select",function(){r.state().get("selection").map(function(e){(e=e.toJSON()).id&&(o=o?o+","+e.id:e.id,s.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+i.data("delete")+'">x</a></li></ul></li>'))}),a.val(o),a.trigger("change")}),r.open()}),l.sliderWrapper.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(i,n){var a="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");a=a+t+","}),t.closest(l.rootSelector).find(".image_gallery_ids").val(a)}})}),l.sliderWrapper.on("click","a.delete",function(t){t.preventDefault();var i=e(this).closest(l.rootSelector),n=i.find("ul.slides-wrapper"),a=i.find(".image_gallery_ids"),o="";e(this).closest("li.image").remove(),n.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");o=o+t+","}),a.val(o)})),o.each(function(){e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),n=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),a=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==a)switch(a){case"left":i.show(),n.hide();break;case"right":n.show(),i.hide();break;case"double":i.show(),n.show();break;default:i.hide(),n.hide()}})}),s.each(function(){var t=e(this).data("val"),i=e(this).data("min"),n=e(this).data("max"),a=e(this).data("step"),l=e(this).data("labels");e(this).slider({value:t,min:i,max:n,range:"min",step:a,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+l)}})}),e(function(){e(document).on("yith-plugin-fw-codemirror-init",function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.codeEditor&&e(".codemirror:not(.codemirror--initialized)").each(function(){var t=e(this).data("settings"),i=wp.codeEditor.initialize(e(this),t);e(this).addClass("codemirror--initialized"),e(this).data("codemirrorInstance",i)})}).trigger("yith-plugin-fw-codemirror-init")}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),r.each(function(){var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),n=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(a){var l=e(a.target).closest("li"),o=l.data("font"),s=l.data("icon"),r=l.data("key"),d=l.data("name");i.attr("data-font",o),i.attr("data-icon",s),i.attr("data-key",r),i.attr("data-name",d),n.val(o+":"+d),t.find(".yit-icons-manager-list li").removeClass("active"),l.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),n=t.closest(".yith-plugin-fw-select-images__wrapper"),a=n.find(".yith-plugin-fw-select-images__item"),l=n.find("select").first();l.length&&(l.val(i).trigger("yith_select_images_value_changed"),a.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document.body).trigger("wc-enhanced-select-init"),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var n=jQuery(".ui-sortable-handle"),a=0,l=new Array;for(a=0;a<n.length;a++)l[a]=e(n[a]).data("item_key");l.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,l)}}),e(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input");t.prop("checked")?t.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):t.prop("checked",!0).attr("value","yes").addClass("onoffchecked"),t.change()}),e.fn.saveToggleElement=function(t,i){var n=e(this),a="yith_plugin_fw_save_toggle_element",l=n.serializeToggleElement(),o=n.find(".yith-toggle_wrapper"),s=o.attr("id"),r=e.urlParam("tab");l.append("security",o.data("nonce")),void 0!==i&&i.length>0&&l.append("yith_toggle_elements_order_keys",i),n.closest(".metaboxes-tab.yith-plugin-ui").length?(a="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+a+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+s+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+a+"&tab="+r+"&toggle_id="+s,e.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,n])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,n=e(t).find(":input").serializeArray();return e.each(n,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),n=t.find("span.title").data("title_format"),a=t.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==n)var o=n.match(l);if(void 0!==a)var s=a.match(l);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(n=n.replace("%%"+$field_id+"%%",$field_val)),null!=s&&void 0!==s&&-1!==s.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)))}),""!==n&&t.find("span.title").html(n),""!==a&&t.find(".subtitle").html(a),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),n=i.closest(".yith-toggle-row"),a=n.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;n.is(".yith-toggle-row-opened")?a.slideUp(400):a.slideDown(400),n.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),n=i.data("box_id"),a=i.data("closed_label"),l=i.data("opened_label"),o=i.closest(".yith-toggle_wrapper").attr("id"),s=wp.template("yith-toggle-element-add-box-content-"+o);""!==n&&(e("#"+n).html(s({index:"box_id"})).slideToggle(),""!==a&&(i.html()===a?i.html(l).removeClass("closed"):i.html(a).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),n=e(this).closest(".yith-toggle_wrapper").attr("id"),a=i.find(".spinner"),l=e(this).parents(".toggle-element"),o=i.find(":input"),s=0,r=e('<input type="hidden">');l.find(".yith-toggle-row").each(function(){var t=parseInt(e(this).data("item_key"));s<=t&&(s=t+1)}),r.val(s),e(document).trigger("yith-toggle-change-counter",[r,i]),s=r.val();var d=wp.template("yith-toggle-element-item-"+n),c=e(d({index:s}));a.addClass("show"),e.each(o,function(t,i){if(void 0!==e(i).attr("id")){var n=e(i).attr("id"),a=e(i).val();n="radio"===e(i).attr("type")?(n=(n=e(i).closest(".yith-plugin-fw-radio").attr("id")).replace("new_","")+"_"+s)+"-"+a:n.replace("new_","")+"_"+s,e(i).is(":checked")&&e(c).find("#"+n).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(c).find("#"+n).html(e("#"+e(i).attr("id")).html()),e(c).find("#"+n).val(a)}}),e(c).formatToggleTitle();var u=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,c,u]);setTimeout(function(){if("yes"===u.val()){e(l).find(".yith-toggle-elements").append(c),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),l.saveToggleElement();setTimeout(function(){e(l).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),n=e(this).closest(".yith-toggle-row"),a=n.find(".spinner");n.formatToggleTitle();var l=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,n,l]),"yes"===l.val()&&(a.addClass("show"),i.saveToggleElement(a))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){var t=e(this).closest(".yith-plugin-fw-radio"),i=e(this).val();t.val(i).data("value",i).trigger("change")}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).val(e(this).data("value")),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")});var t={selectors:{wrapper:".yith-plugin-fw-dimensions",units:{wrapper:".yith-plugin-fw-dimensions__units",single:".yith-plugin-fw-dimensions__unit",value:".yith-plugin-fw-dimensions__unit__value",selectedClass:"yith-plugin-fw-dimensions__unit--selected"},linked:{button:".yith-plugin-fw-dimensions__linked",value:".yith-plugin-fw-dimensions__linked__value",wrapperActiveClass:"yith-plugin-fw-dimensions--linked-active"},dimensions:{number:".yith-plugin-fw-dimensions__dimension__number"}},init:function(){var i=t;e(document).on("click",i.selectors.units.single,i.unitChange),e(document).on("click",i.selectors.linked.button,i.linkedChange),e(document).on("change keyup",i.selectors.dimensions.number,i.numberChange)},unitChange:function(i){var n=e(this).closest(t.selectors.units.single),a=n.closest(t.selectors.units.wrapper),l=a.find(t.selectors.units.single),o=a.find(t.selectors.units.value).first(),s=n.data("value");l.removeClass(t.selectors.units.selectedClass),n.addClass(t.selectors.units.selectedClass),o.val(s)},linkedChange:function(){var i=e(this).closest(t.selectors.linked.button),n=i.closest(t.selectors.wrapper),a=i.find(t.selectors.linked.value);"yes"===a.val()?(n.removeClass(t.selectors.linked.wrapperActiveClass),a.val("no")):(n.addClass(t.selectors.linked.wrapperActiveClass),a.val("yes"),n.find(t.selectors.dimensions.number).first().trigger("change"))},numberChange:function(i){var n=e(this).closest(t.selectors.dimensions.number),a=n.closest(t.selectors.wrapper);a.hasClass(t.selectors.linked.wrapperActiveClass)&&a.find(t.selectors.dimensions.number).val(n.val())}};t.init()}(jQuery);
1
+ !function(e){e(document).on("yith_fields_init",function(){var t=e(".yith-plugin-fw-datepicker"),i=e(".yith-plugin-fw-colorpicker"),n={imgPreviewHandler:".yith-plugin-fw-upload-img-preview",uploadButtonHandler:".yith-plugin-fw-upload-button",imgUrlHandler:".yith-plugin-fw-upload-img-url",resetButtonHandler:".yith-plugin-fw-upload-button-reset",imgUrl:e(".yith-plugin-fw-upload-img-url")},a=e(".add_media"),l={rootSelector:".yith-plugin-fw-image-gallery",buttonSelector:".yith-plugin-fw-image-gallery .image-gallery-button",sliderWrapper:e(".yith-plugin-fw-image-gallery ul.slides-wrapper")},o=e(".yith-plugin-fw-sidebar-layout"),s=e(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),r=e(".yit-icons-manager-wrapper");e(".yith-plugin-ui td.forminp-checkbox");t.each(function(){var t=e(this).data();t.showAnim=!1,t.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},t.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},e(this).datepicker(t)}),i.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.change()}}),i.each(function(){var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),n=e(this).closest(".yith-single-colorpicker"),a=i.find(".wp-picker-input-wrap"),l=n.find(".wp-picker-input-wrap");if(a.length&&i.find("a.wp-color-result").attr("title",t),n.length&&n.find("a.wp-color-result").attr("title",t),!a.find(".wp-picker-default-custom").length){var o=e("<span/>").attr({"class":"wp-picker-default-custom"});a.find(".wp-picker-default").wrap(o)}l.find(".wp-picker-default-custom").length||(o=e("<span/>").attr({"class":"wp-picker-default-custom"}),l.find(".wp-picker-default").wrap(o))}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(n.imgUrl.change(function(){var t=e(this).val(),i=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)"),a=e(this).parent().find(n.imgPreviewHandler).first();a.length<1&&(a=e(this).parent().parent().find(n.imgPreviewHandler).first()),i.test(t)?a.html('<img src="'+t+'" style="max-width:100px; max-height:100px;" />'):a.html("")}).trigger("change"),e(document).on("click",n.uploadButtonHandler,function(t){t.preventDefault();var i,a=e(this).attr("id").replace(/-button$/,"").replace(/(\[|\])/g,"\\$1");if(i)i.open();else{var l=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(i=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:l})).on("select",function(){var t=i.state().get("selection").first().toJSON();e("#"+a).val(t.url),e("#"+a+"-yith-attachment-id")&&e("#"+a+"-yith-attachment-id").val(t.id),n.imgUrl.trigger("change")}),i.open()}}),e(document).on("click",n.resetButtonHandler,function(t){var i=e(this),a=i.attr("id").replace(/(\[|\])/g,"\\$1"),l=i.attr("id").replace(/-button-reset$/,"").replace(/(\[|\])/g,"\\$1"),o=e("#"+a).data("default");e("#"+l).val(o),n.imgUrl.trigger("change")}));a.on("click",function(){}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("click",l.buttonSelector,function(t){var i=e(this),n=i.closest(l.rootSelector),a=n.find(".image_gallery_ids"),o=a.val(),s=n.find("ul.slides-wrapper"),r=wp.media.frames.image_gallery=wp.media({title:i.data("choose"),button:{text:i.data("update")},states:[new wp.media.controller.Library({title:i.data("choose"),filterable:"all",multiple:!0})]});r.on("select",function(){r.state().get("selection").map(function(e){(e=e.toJSON()).id&&(o=o?o+","+e.id:e.id,s.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+i.data("delete")+'">x</a></li></ul></li>'))}),a.val(o),a.trigger("change")}),r.open()}),l.sliderWrapper.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(i,n){var a="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");a=a+t+","}),t.closest(l.rootSelector).find(".image_gallery_ids").val(a)}})}),l.sliderWrapper.on("click","a.delete",function(t){t.preventDefault();var i=e(this).closest(l.rootSelector),n=i.find("ul.slides-wrapper"),a=i.find(".image_gallery_ids"),o="";e(this).closest("li.image").remove(),n.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");o=o+t+","}),a.val(o)})),o.each(function(){e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),n=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),a=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==a)switch(a){case"left":i.show(),n.hide();break;case"right":n.show(),i.hide();break;case"double":i.show(),n.show();break;default:i.hide(),n.hide()}})}),s.each(function(){var t=e(this).data("val"),i=e(this).data("min"),n=e(this).data("max"),a=e(this).data("step"),l=e(this).data("labels");e(this).slider({value:t,min:i,max:n,range:"min",step:a,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+l)}})}),e(function(){e(document).on("yith-plugin-fw-codemirror-init",function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.codeEditor&&e(".codemirror:not(.codemirror--initialized)").each(function(){var t=e(this).data("settings"),i=wp.codeEditor.initialize(e(this),t);e(this).addClass("codemirror--initialized"),e(this).data("codemirrorInstance",i)})}).trigger("yith-plugin-fw-codemirror-init")}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),r.each(function(){var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),n=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(a){var l=e(a.target).closest("li"),o=l.data("font"),s=l.data("icon"),r=l.data("key"),d=l.data("name");i.attr("data-font",o),i.attr("data-icon",s),i.attr("data-key",r),i.attr("data-name",d),n.val(o+":"+d),t.find(".yit-icons-manager-list li").removeClass("active"),l.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),n=t.closest(".yith-plugin-fw-select-images__wrapper"),a=n.find(".yith-plugin-fw-select-images__item"),l=n.find("select").first();l.length&&(l.val(i).trigger("yith_select_images_value_changed"),a.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document.body).trigger("wc-enhanced-select-init"),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var n=jQuery(".ui-sortable-handle"),a=0,l=new Array;for(a=0;a<n.length;a++)l[a]=e(n[a]).data("item_key");l.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,l)}}),e(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input"),i=t.prop("checked");t.prop("disabled")||(i?t.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):t.prop("checked",!0).attr("value","yes").addClass("onoffchecked"),t.change())}),e.fn.saveToggleElement=function(t,i){var n=e(this),a="yith_plugin_fw_save_toggle_element",l=n.serializeToggleElement(),o=n.find(".yith-toggle_wrapper"),s=o.attr("id"),r=e.urlParam("tab");l.append("security",o.data("nonce")),void 0!==i&&i.length>0&&l.append("yith_toggle_elements_order_keys",i),n.closest(".metaboxes-tab.yith-plugin-ui").length?(a="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+a+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+s+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+a+"&tab="+r+"&toggle_id="+s,e.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,n])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,n=e(t).find(":input").serializeArray();return e.each(n,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),n=t.find("span.title").data("title_format"),a=t.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==n)var o=n.match(l);if(void 0!==a)var s=a.match(l);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(n=n.replace("%%"+$field_id+"%%",$field_val)),null!=s&&void 0!==s&&-1!==s.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)))}),""!==n&&t.find("span.title").html(n),""!==a&&t.find(".subtitle").html(a),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),n=i.closest(".yith-toggle-row"),a=n.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;n.is(".yith-toggle-row-opened")?a.slideUp(400):a.slideDown(400),n.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),n=i.data("box_id"),a=i.data("closed_label"),l=i.data("opened_label"),o=i.closest(".yith-toggle_wrapper").attr("id"),s=wp.template("yith-toggle-element-add-box-content-"+o);""!==n&&(e("#"+n).html(s({index:"box_id"})).slideToggle(),""!==a&&(i.html()===a?i.html(l).removeClass("closed"):i.html(a).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),n=e(this).closest(".yith-toggle_wrapper").attr("id"),a=i.find(".spinner"),l=e(this).parents(".toggle-element"),o=i.find(":input"),s=0,r=e('<input type="hidden">');l.find(".yith-toggle-row").each(function(){var t=parseInt(e(this).data("item_key"));s<=t&&(s=t+1)}),r.val(s),e(document).trigger("yith-toggle-change-counter",[r,i]),s=r.val();var d=wp.template("yith-toggle-element-item-"+n),c=e(d({index:s}));a.addClass("show"),e.each(o,function(t,i){if(void 0!==e(i).attr("id")){var n=e(i).attr("id"),a=e(i).val();n="radio"===e(i).attr("type")?(n=(n=e(i).closest(".yith-plugin-fw-radio").attr("id")).replace("new_","")+"_"+s)+"-"+a:n.replace("new_","")+"_"+s,e(i).is(":checked")&&e(c).find("#"+n).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(c).find("#"+n).html(e("#"+e(i).attr("id")).html()),e(c).find("#"+n).val(a)}}),e(c).formatToggleTitle();var u=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,c,u]);setTimeout(function(){if("yes"===u.val()){e(l).find(".yith-toggle-elements").append(c),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),l.saveToggleElement();setTimeout(function(){e(l).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),n=e(this).closest(".yith-toggle-row"),a=n.find(".spinner");n.formatToggleTitle();var l=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,n,l]),"yes"===l.val()&&(a.addClass("show"),i.saveToggleElement(a))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){var t=e(this).closest(".yith-plugin-fw-radio"),i=e(this).val();t.val(i).data("value",i).trigger("change")}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).val(e(this).data("value")),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")});var t={selectors:{wrapper:".yith-plugin-fw-dimensions",units:{wrapper:".yith-plugin-fw-dimensions__units",single:".yith-plugin-fw-dimensions__unit",value:".yith-plugin-fw-dimensions__unit__value",selectedClass:"yith-plugin-fw-dimensions__unit--selected"},linked:{button:".yith-plugin-fw-dimensions__linked",value:".yith-plugin-fw-dimensions__linked__value",wrapperActiveClass:"yith-plugin-fw-dimensions--linked-active"},dimensions:{number:".yith-plugin-fw-dimensions__dimension__number"}},init:function(){var i=t;e(document).on("click",i.selectors.units.single,i.unitChange),e(document).on("click",i.selectors.linked.button,i.linkedChange),e(document).on("change keyup",i.selectors.dimensions.number,i.numberChange)},unitChange:function(i){var n=e(this).closest(t.selectors.units.single),a=n.closest(t.selectors.units.wrapper),l=a.find(t.selectors.units.single),o=a.find(t.selectors.units.value).first(),s=n.data("value");l.removeClass(t.selectors.units.selectedClass),n.addClass(t.selectors.units.selectedClass),o.val(s)},linkedChange:function(){var i=e(this).closest(t.selectors.linked.button),n=i.closest(t.selectors.wrapper),a=i.find(t.selectors.linked.value);"yes"===a.val()?(n.removeClass(t.selectors.linked.wrapperActiveClass),a.val("no")):(n.addClass(t.selectors.linked.wrapperActiveClass),a.val("yes"),n.find(t.selectors.dimensions.number).first().trigger("change"))},numberChange:function(i){var n=e(this).closest(t.selectors.dimensions.number),a=n.closest(t.selectors.wrapper);a.hasClass(t.selectors.linked.wrapperActiveClass)&&a.find(t.selectors.dimensions.number).val(n.val())}};t.init()}(jQuery);
plugin-fw/assets/js/yith-gutenberg.js DELETED
@@ -1,212 +0,0 @@
1
- (function ($) {
2
- // Get registerBlockType() from wp.blocks in the global scope
3
- var __ = wp.i18n.__,
4
- el = wp.element.createElement,
5
- Fragment = wp.element.Fragment,
6
- PanelBody = wp.components.PanelBody,
7
- registerBlockType = wp.blocks.registerBlockType,
8
- RichText = wp.editor.RichText,
9
- BlockControls = wp.editor.BlockControls,
10
- InspectorControls = wp.editor.InspectorControls,
11
- AlignmentToolbar = wp.editor.AlignmentToolbar,
12
- Components = wp.components,
13
- RawHTML = wp.element.RawHTML,
14
- SelectControl = wp.components.SelectControl,
15
- ToggleControl = wp.components.ToggleControl,
16
- CheckboxControl = wp.components.CheckboxControl,
17
- RangeControl = wp.components.RangeControl,
18
- ColorPicker = wp.components.ColorPicker,
19
- RadioControl = wp.components.RadioControl,
20
- TextControl = wp.components.TextControl,
21
- TextareaControl = wp.components.TextareaControl;
22
-
23
- const yith_icon = el('svg', {width: 22, height: 22},
24
- el('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"})
25
- );
26
-
27
- function create_shortcode(sc_args, props, callback) {
28
- var gt_block = '',
29
- gutenberg_preview = '';
30
-
31
- if (typeof props.callback != 'undefined' && typeof $[props.callback] == 'function') {
32
- gt_block = $[props.callback](sc_args, props);
33
- }
34
-
35
- else {
36
- var sc_name = props.shortcode_name,
37
- sc = '[' + sc_name,
38
- do_shortcode = null;
39
-
40
-
41
- $.each(sc_args.attributes, function ($v, $k) {
42
- if ( typeof props.attributes != 'undefined' && typeof props.attributes[$v] != 'undefined' ) {
43
- sc += ' ' + $v + '=';
44
- var arg = props.attributes[$v],
45
- remove_quotes = arg.remove_quotes;
46
-
47
- if( remove_quotes == true ){
48
- sc += $k;
49
- }
50
-
51
- else {
52
- sc += '"' + $k + '"';
53
- }
54
- }
55
- });
56
-
57
- sc += ']';
58
-
59
- var block_id = md5(sc);
60
-
61
- gutenberg_preview = '<span class="yith_block_' + block_id + '">' + sc + '</span>';
62
-
63
- if (callback == 'edit' && props.do_shortcode != false) {
64
- do_shortcode = (function (block_id) {
65
- var ajax_call_date = null;
66
- $(document).trigger( 'yith_plugin_fw_gutenberg_before_do_shortcode', [sc, block_id] );
67
- $.ajax({
68
- async: true,
69
- url: yith_gutenberg_ajax.ajaxurl,
70
- method: 'post',
71
- data: {action: 'yith_plugin_fw_gutenberg_do_shortcode', shortcode: sc},
72
- success: function (data) {
73
- ajax_call_date = data;
74
- if (ajax_call_date != '') {
75
- $('.yith_block_' + block_id).html(ajax_call_date);
76
- $(document).trigger( 'yith_plugin_fw_gutenberg_success_do_shortcode', [sc, block_id, ajax_call_date] );
77
- }
78
- }
79
- });
80
- $(document).trigger( 'yith_plugin_fw_gutenberg_after_do_shortcode', [sc, block_id, ajax_call_date] );
81
- return ajax_call_date;
82
- })(block_id);
83
- }
84
-
85
- gt_block = el(RawHTML, null, gutenberg_preview);
86
- }
87
-
88
- return gt_block;
89
- }
90
-
91
- function onChangeEvent(new_value, attribute_name, args, block_type) {
92
- var attributes = {};
93
-
94
- if (block_type == 'colorpicker' || block_type == 'color') {
95
- new_value = new_value.hex;
96
- }
97
-
98
- attributes[attribute_name] = new_value;
99
- args.setAttributes(attributes);
100
- return args;
101
- }
102
-
103
- $.each(yith_gutenberg, function ($block, $props) {
104
- registerBlockType("yith/" + $block, {
105
- title: $props.title,
106
- description: $props.description,
107
- category: $props.category,
108
- attributes: $props.attributes,
109
- icon: typeof $props.icon != 'undefined' ? $props.icon : yith_icon,
110
- keywords: $props.keywords,
111
- edit: function edit(args) {
112
- var elements = new Array();
113
-
114
- $.each($props.attributes, function ($attribute_name, $attribute_args) {
115
- var ComponentControl = null,
116
- block_type = $attribute_args.blocktype,
117
- name = $attribute_name;
118
- if (typeof block_type != 'undefined') {
119
- switch (block_type) {
120
- case 'select':
121
- ComponentControl = SelectControl;
122
- break;
123
-
124
- case 'text':
125
- ComponentControl = TextControl;
126
- break;
127
-
128
- case 'textarea':
129
- ComponentControl = TextareaControl;
130
- break;
131
-
132
- case 'toggle':
133
- ComponentControl = ToggleControl;
134
- break;
135
-
136
- case 'checkbox':
137
- ComponentControl = CheckboxControl;
138
- break;
139
-
140
- case 'number':
141
- case 'range':
142
- ComponentControl = RangeControl;
143
- break;
144
-
145
- case 'color':
146
- case 'colorpicker':
147
- ComponentControl = ColorPicker;
148
- break;
149
-
150
- case 'radio':
151
- ComponentControl = RadioControl;
152
- break;
153
- }
154
-
155
- if (ComponentControl != null) {
156
- var helpMessageChecked = helpMessageUncheked = '';
157
- if (typeof $attribute_args.helps != 'undefined' && typeof $attribute_args.helps.checked != 'undefined' && typeof $attribute_args.helps.unchecked != 'undefined') {
158
- helpMessageChecked = $attribute_args.helps.checked;
159
- helpMessageUncheked = $attribute_args.helps.unchecked;
160
- }
161
-
162
- else if (typeof $attribute_args.help != 'undefined') {
163
- helpMessageChecked = helpMessageUncheked = $attribute_args.help;
164
- }
165
-
166
- elements.push(
167
- el(
168
- ComponentControl,
169
- {
170
- value: args.attributes[$attribute_name],
171
- options: $attribute_args.options,
172
- label: $attribute_args.label,
173
- checked: args.attributes[$attribute_name],
174
- selected: args.attributes[$attribute_name],
175
- help: args.attributes[$attribute_name] ? helpMessageChecked : helpMessageUncheked,
176
- disableAlpha: $attribute_args.disableAlpha,
177
- min: $attribute_args.min,
178
- max: $attribute_args.max,
179
- multiple: $attribute_args.multiple,
180
- onChange: function (new_value) {
181
- args = onChangeEvent(new_value, name, args, block_type);
182
- },
183
- onChangeComplete: function (new_value) {
184
- args = onChangeEvent(new_value, name, args, block_type);
185
- },
186
- },
187
- )
188
- );
189
- }
190
- }
191
- });
192
-
193
- sc = create_shortcode(args, $props, 'edit');
194
-
195
- return [
196
- el(
197
- Fragment,
198
- null,
199
- el(
200
- InspectorControls,
201
- null,
202
- elements,
203
- ),
204
- sc,
205
- )];
206
- },
207
- save: function save(args) {
208
- return create_shortcode(args, $props, 'save');
209
- }
210
- });
211
- });
212
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/assets/js/yith-gutenberg.min.js DELETED
@@ -1 +0,0 @@
1
- !function(e){wp.i18n.__;var t=wp.element.createElement,o=wp.element.Fragment,n=(wp.components.PanelBody,wp.blocks.registerBlockType),c=(wp.editor.RichText,wp.editor.BlockControls,wp.editor.InspectorControls),r=(wp.editor.AlignmentToolbar,wp.components,wp.element.RawHTML),a=wp.components.SelectControl,i=wp.components.ToggleControl,s=wp.components.CheckboxControl,l=wp.components.RangeControl,p=wp.components.ColorPicker,u=wp.components.RadioControl,d=wp.components.TextControl,h=wp.components.TextareaControl;const C=t("svg",{width:22,height:22},t("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"}));function b(o,n,c){var a="",i="";if("undefined"!=typeof n.callback&&"function"==typeof e[n.callback])a=e[n.callback](o,n);else{var s="["+n.shortcode_name;e.each(o.attributes,function(e,t){if("undefined"!=typeof n.attributes&&"undefined"!=typeof n.attributes[e]){s+=" "+e+"=";var o=n.attributes[e].remove_quotes;s+=1==o?t:'"'+t+'"'}}),s+="]";var l=md5(s);i='<span class="yith_block_'+l+'">'+s+"</span>","edit"==c&&0!=n.do_shortcode&&function(t){var o=null;return e(document).trigger("yith_plugin_fw_gutenberg_before_do_shortcode",[s,t]),e.ajax({async:!0,url:yith_gutenberg_ajax.ajaxurl,method:"post",data:{action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:s},success:function(n){""!=(o=n)&&(e(".yith_block_"+t).html(o),e(document).trigger("yith_plugin_fw_gutenberg_success_do_shortcode",[s,t,o]))}}),e(document).trigger("yith_plugin_fw_gutenberg_after_do_shortcode",[s,t,o]),o}(l),a=t(r,null,i)}return a}function g(e,t,o,n){var c={};return"colorpicker"!=n&&"color"!=n||(e=e.hex),c[t]=e,o.setAttributes(c),o}e.each(yith_gutenberg,function(r,f){n("yith/"+r,{title:f.title,description:f.description,category:f.category,attributes:f.attributes,icon:"undefined"!=typeof f.icon?f.icon:C,keywords:f.keywords,edit:function(n){var r=new Array;return e.each(f.attributes,function(e,o){var c=null,C=o.blocktype,b=e;if(void 0!==C){switch(C){case"select":c=a;break;case"text":c=d;break;case"textarea":c=h;break;case"toggle":c=i;break;case"checkbox":c=s;break;case"number":case"range":c=l;break;case"color":case"colorpicker":c=p;break;case"radio":c=u}if(null!=c){var f=helpMessageUncheked="";"undefined"!=typeof o.helps&&"undefined"!=typeof o.helps.checked&&"undefined"!=typeof o.helps.unchecked?(f=o.helps.checked,helpMessageUncheked=o.helps.unchecked):"undefined"!=typeof o.help&&(f=helpMessageUncheked=o.help),r.push(t(c,{value:n.attributes[e],options:o.options,label:o.label,checked:n.attributes[e],selected:n.attributes[e],help:n.attributes[e]?f:helpMessageUncheked,disableAlpha:o.disableAlpha,min:o.min,max:o.max,multiple:o.multiple,onChange:function(e){n=g(e,b,n,C)},onChangeComplete:function(e){n=g(e,b,n,C)}}))}}}),sc=b(n,f,"edit"),[t(o,null,t(c,null,r),sc)]},save:function(e){return b(e,f,"save")}})})}(jQuery);
 
plugin-fw/dist/gutenberg/index.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-url'), 'version' => '78c76690eb3cb207e0c4cd2d0a155af6');
plugin-fw/dist/gutenberg/index.js ADDED
@@ -0,0 +1 @@
 
1
+ (window.webpackJsonp_yith_plugin_framewowrk=window.webpackJsonp_yith_plugin_framewowrk||[]).push([[1],{27:function(e,t,n){},28:function(e,t,n){}}]),function(e){function t(t){for(var r,a,l=t[0],i=t[1],s=t[2],f=0,p=[];f<l.length;f++)a=l[f],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&p.push(o[a][0]),o[a]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);for(u&&u(t);p.length;)p.shift()();return c.push.apply(c,s||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,l=1;l<n.length;l++){var i=n[l];0!==o[i]&&(r=!1)}r&&(c.splice(t--,1),e=a(a.s=n[0]))}return e}var r={},o={0:0},c=[];function a(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var l=window.webpackJsonp_yith_plugin_framewowrk=window.webpackJsonp_yith_plugin_framewowrk||[],i=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=i;c.push([29,1]),n()}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.React},function(e,t,n){var r=n(17),o=n(18),c=n(19),a=n(21);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||a()}},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r,o,c,a,l;r=n(22),o=n(9).utf8,c=n(23),a=n(9).bin,(l=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):o.stringToBytes(e):c(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),i=8*e.length,s=1732584193,u=-271733879,f=-1732584194,p=271733878,h=0;h<n.length;h++)n[h]=16711935&(n[h]<<8|n[h]>>>24)|4278255360&(n[h]<<24|n[h]>>>8);n[i>>>5]|=128<<i%32,n[14+(i+64>>>9<<4)]=i;var b=l._ff,d=l._gg,y=l._hh,g=l._ii;for(h=0;h<n.length;h+=16){var m=s,v=u,_=f,w=p;s=b(s,u,f,p,n[h+0],7,-680876936),p=b(p,s,u,f,n[h+1],12,-389564586),f=b(f,p,s,u,n[h+2],17,606105819),u=b(u,f,p,s,n[h+3],22,-1044525330),s=b(s,u,f,p,n[h+4],7,-176418897),p=b(p,s,u,f,n[h+5],12,1200080426),f=b(f,p,s,u,n[h+6],17,-1473231341),u=b(u,f,p,s,n[h+7],22,-45705983),s=b(s,u,f,p,n[h+8],7,1770035416),p=b(p,s,u,f,n[h+9],12,-1958414417),f=b(f,p,s,u,n[h+10],17,-42063),u=b(u,f,p,s,n[h+11],22,-1990404162),s=b(s,u,f,p,n[h+12],7,1804603682),p=b(p,s,u,f,n[h+13],12,-40341101),f=b(f,p,s,u,n[h+14],17,-1502002290),s=d(s,u=b(u,f,p,s,n[h+15],22,1236535329),f,p,n[h+1],5,-165796510),p=d(p,s,u,f,n[h+6],9,-1069501632),f=d(f,p,s,u,n[h+11],14,643717713),u=d(u,f,p,s,n[h+0],20,-373897302),s=d(s,u,f,p,n[h+5],5,-701558691),p=d(p,s,u,f,n[h+10],9,38016083),f=d(f,p,s,u,n[h+15],14,-660478335),u=d(u,f,p,s,n[h+4],20,-405537848),s=d(s,u,f,p,n[h+9],5,568446438),p=d(p,s,u,f,n[h+14],9,-1019803690),f=d(f,p,s,u,n[h+3],14,-187363961),u=d(u,f,p,s,n[h+8],20,1163531501),s=d(s,u,f,p,n[h+13],5,-1444681467),p=d(p,s,u,f,n[h+2],9,-51403784),f=d(f,p,s,u,n[h+7],14,1735328473),s=y(s,u=d(u,f,p,s,n[h+12],20,-1926607734),f,p,n[h+5],4,-378558),p=y(p,s,u,f,n[h+8],11,-2022574463),f=y(f,p,s,u,n[h+11],16,1839030562),u=y(u,f,p,s,n[h+14],23,-35309556),s=y(s,u,f,p,n[h+1],4,-1530992060),p=y(p,s,u,f,n[h+4],11,1272893353),f=y(f,p,s,u,n[h+7],16,-155497632),u=y(u,f,p,s,n[h+10],23,-1094730640),s=y(s,u,f,p,n[h+13],4,681279174),p=y(p,s,u,f,n[h+0],11,-358537222),f=y(f,p,s,u,n[h+3],16,-722521979),u=y(u,f,p,s,n[h+6],23,76029189),s=y(s,u,f,p,n[h+9],4,-640364487),p=y(p,s,u,f,n[h+12],11,-421815835),f=y(f,p,s,u,n[h+15],16,530742520),s=g(s,u=y(u,f,p,s,n[h+2],23,-995338651),f,p,n[h+0],6,-198630844),p=g(p,s,u,f,n[h+7],10,1126891415),f=g(f,p,s,u,n[h+14],15,-1416354905),u=g(u,f,p,s,n[h+5],21,-57434055),s=g(s,u,f,p,n[h+12],6,1700485571),p=g(p,s,u,f,n[h+3],10,-1894986606),f=g(f,p,s,u,n[h+10],15,-1051523),u=g(u,f,p,s,n[h+1],21,-2054922799),s=g(s,u,f,p,n[h+8],6,1873313359),p=g(p,s,u,f,n[h+15],10,-30611744),f=g(f,p,s,u,n[h+6],15,-1560198380),u=g(u,f,p,s,n[h+13],21,1309151649),s=g(s,u,f,p,n[h+4],6,-145523070),p=g(p,s,u,f,n[h+11],10,-1120210379),f=g(f,p,s,u,n[h+2],15,718787259),u=g(u,f,p,s,n[h+9],21,-343485551),s=s+m>>>0,u=u+v>>>0,f=f+_>>>0,p=p+w>>>0}return r.endian([s,u,f,p])})._ff=function(e,t,n,r,o,c,a){var l=e+(t&n|~t&r)+(o>>>0)+a;return(l<<c|l>>>32-c)+t},l._gg=function(e,t,n,r,o,c,a){var l=e+(t&r|n&~r)+(o>>>0)+a;return(l<<c|l>>>32-c)+t},l._hh=function(e,t,n,r,o,c,a){var l=e+(t^n^r)+(o>>>0)+a;return(l<<c|l>>>32-c)+t},l._ii=function(e,t,n,r,o,c,a){var l=e+(n^(t|~r))+(o>>>0)+a;return(l<<c|l>>>32-c)+t},l._blocksize=16,l._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(l(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):r.bytesToHex(n)}},function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.compose},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=n},function(e,t){e.exports=window.wp.blocks},function(e,t){e.exports=window.wp.url},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(24);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(25),o=n(26);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){e.exports=window.lodash},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw c}}return n}}},function(e,t,n){var r=n(20);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],r=0;r<e.length;r+=3)for(var o=e[r]<<16|e[r+1]<<8|e[r+2],c=0;c<4;c++)8*r+6*c<=8*e.length?t.push(n.charAt(o>>>6*(3-c)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,o=0;r<e.length;o=++r%4)0!=o&&t.push((n.indexOf(e.charAt(r-1))&Math.pow(2,-2*o+8)-1)<<2*o|n.indexOf(e.charAt(r))>>>6-2*o);return t}},e.exports=r},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},,,function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r),c=n(0),a=n(2),l=n(5),i=n.n(l),s=n(10),u=n(11);function f(e){if(e.status>=200&&e.status<300)return e;throw e}function p(e){return e.json?e.json():e.text()}var h=Object(c.createElement)("svg",{viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",role:"img","aria-hidden":"true",focusable:"false"},Object(c.createElement)("path",{width:"22",height:"22",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"})),b=function(e,t){var n=e.controlType,r=!0;if(e.deps&&e.deps.id&&"value"in e.deps){var o=e.deps.value;"toggle"!==n&&"checkbox"!==n||(o=!0===o||"yes"===o||1===o),r=void 0!==t[e.deps.id]&&o===t[e.deps.id]}return r},d=function(e,t){var n="",r=!1;if(void 0!==e.callback&&(jQuery&&e.callback in jQuery.fn?r=jQuery.fn[e.callback]:e.callback in window&&(r=window[e.callback])),"function"==typeof r)n=r(t,e);else{var c=e.attributes?Object.entries(e.attributes).map((function(e){var n=o()(e,2),r=n[0],c=n[1],a=b(c,t),l=t[r];if(a&&void 0!==l)return r+"="+(c.remove_quotes?l:'"'.concat(l,'"'))})):[],a=c.length?" "+c.join(" "):"";n="[".concat(e.shortcode_name).concat(a,"]")}return n},y=n(1),g=n(6),m=n(12),v=n.n(m),_=n(13),w=n.n(_),j=n(14),x=n.n(j),O=n(15),C=n.n(O),k=n(8),E=n.n(k),S=n(16),T=n(4);n(27);var A=function(e){x()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=E()(t);if(n){var o=E()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return C()(this,e)});function o(){var e;return v()(this,o),(e=r.apply(this,arguments)).state={html:"",shortcode:"",shortcodeHash:"",ajaxUpdated:!1,ajaxSuccess:!1,ajaxResponse:!1,loading:!1},e.ajaxTimeout=!1,e}return w()(o,[{key:"componentDidMount",value:function(){this.updateShortcode()}},{key:"componentDidUpdate",value:function(e,t,n){var r=this.state,o=r.shortcode,c=r.shortcodeHash,a=r.ajaxSuccess,l=r.ajaxResponse,i=r.ajaxUpdated;Object(S.isEqual)(e,this.props)||this.updateShortcode(),this.props.blockArgs.do_shortcode&&i&&(a&&Object(T.doAction)("yith_plugin_fw_gutenberg_success_do_shortcode",o,c,l),Object(T.doAction)("yith_plugin_fw_gutenberg_after_do_shortcode",o,c,l),this.setState({ajaxUpdated:!1}))}},{key:"updateShortcode",value:function(){var e=this,t=this.props,n=t.attributes,r=t.blockArgs;this.setState({loading:!0,ajaxSuccess:!1,ajaxResponse:!1});var o=d(r,n),c=i()(o);r.do_shortcode?(this.ajaxTimeout&&clearTimeout(this.ajaxTimeout),Object(T.doAction)("yith_plugin_fw_gutenberg_before_do_shortcode",o,c),this.ajaxTimeout=setTimeout((function(){(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yithGutenberg.ajaxurl;return t=Object(u.addQueryArgs)(t,e),fetch(t).then(f).then(p)})({action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:o}).then((function(t){e.setState({loading:!1,html:t.html,shortcode:o,shortcodeHash:c,ajaxSuccess:!0,ajaxUpdated:!0,ajaxResponse:t})})).catch((function(e){console.log({error:e})}))}),300)):this.setState({loading:!1,html:o,shortcode:o,shortcodeHash:c})}},{key:"render",value:function(){var e=this.state,t=e.html,n=e.loading,r=e.shortcode,o=e.shortcodeHash,a=this.props.blockArgs,l=a.do_shortcode,i=a.title,s=a.empty_message,u="block-editor-yith-plugin-fw-shortcode-block",f=[u],p=l?"html":"shortcode",b=t,d="";l&&!t&&(p="empty-html",b=r,s&&(d=s));var g=["shortcode","empty-html"].includes(p),m="empty-html"!==p,v=!!d;return f.push("".concat(u,"--").concat(p)),f.push("".concat(u,v?"--has-message":"--no-message")),f.push("yith_block_".concat(o)),Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:f.join(" ")},n?Object(c.createElement)("div",{className:"".concat(u,"__spinner-wrap")},Object(c.createElement)(y.Spinner,null)):"",g&&Object(c.createElement)("div",{className:"".concat(u,"__title components-placeholder__label")},h,i),v&&Object(c.createElement)(c.RawHTML,{className:"".concat(u,"__message")},d),m&&Object(c.createElement)(c.RawHTML,{className:"".concat(u,"__content")},b)))}}]),o}(a.Component),B=n(7);function N(e){var t=e.className,n=e.label,r=e.onChange,o=e.value,a=e.help,l=e.disableAlpha,i=Object(B.useInstanceId)(N),s="inspector-yith-color-picker-control-".concat(i);return Object(c.createElement)(y.BaseControl,{id:s,label:n,className:"block-editor-yith-color-control ".concat(t),help:a},Object(c.createElement)(y.ColorPicker,{color:o,disableAlpha:l,onChangeComplete:r}))}function R(e){var t=e.label,n=e.colorValue;return Object(c.createElement)(c.Fragment,null,t,!!n&&Object(c.createElement)(y.ColorIndicator,{colorValue:n}))}function P(e){var t=e.className,n=e.label,r=e.onChange,o=e.value,a=e.help,l=e.palette,i=e.clearable;l=l||Object(g.__experimentalUseEditorFeature)("color.palette");var s=Object(B.useInstanceId)(P),u="inspector-yith-color-palette-control-".concat(s);return Object(c.createElement)(y.BaseControl,{id:u,className:"block-editor-yith-color-palette-control ".concat(t),help:a},Object(c.createElement)("fieldset",null,Object(c.createElement)("legend",null,Object(c.createElement)("div",{className:"block-editor-yith-color-palette-control__color-indicator"},Object(c.createElement)(y.BaseControl.VisualLabel,null,Object(c.createElement)(R,{colorValue:o,label:n})))),Object(c.createElement)(y.ColorPalette,{value:o,onChange:r,colors:l,clearable:i})))}n(28);for(var M=function(e,t){return function(n){var r=n.attributes,a=(n.className,n.setAttributes),l=function(e,t,n){["colorpicker","color"].includes(n)&&(e=e.color.getAlpha()<1?e.color.toRgbString():e.color.toHexString());var r={};r[t]=e,a(r)};return Object(c.createElement)(c.Fragment,null,!!t.attributes&&Object(c.createElement)(g.InspectorControls,null,Object(c.createElement)(y.PanelBody,null,Object.entries(t.attributes).map((function(t){var n=o()(t,2),a=function(t,n){var o=n.controlType,a=r[t],i=function(e,t){var n="";return e.helps&&e.helps.checked&&e.helps.unchecked?n=t?e.helps.checked:e.helps.unchecked:e.help&&(n=e.help),n}(n,a),s="".concat(e,"__").concat(t,"-field-wrapper"),u=b(n,r);n.wrapper_class&&(s+=" "+n.wrapper_class);var f=!1;if(u)switch(o){case"select":f=Object(c.createElement)(y.SelectControl,{className:s,key:t,value:a,label:n.label,options:n.options,selected:a,help:i,multiple:!!n.multiple,onChange:function(e){l(e,t,o)}});break;case"text":f=Object(c.createElement)(y.TextControl,{className:s,key:t,value:a,label:n.label,help:i,onChange:function(e){l(e,t,o)}});break;case"textarea":f=Object(c.createElement)(y.TextareaControl,{className:s,key:t,value:a,label:n.label,help:i,onChange:function(e){l(e,t,o)}});break;case"toggle":f=Object(c.createElement)(y.ToggleControl,{className:s,key:t,value:a,label:n.label,help:i,checked:a,onChange:function(e){l(e,t,o)}});break;case"checkbox":f=Object(c.createElement)(y.CheckboxControl,{className:s,key:t,value:a,label:n.label,help:i,checked:a,onChange:function(e){l(e,t,o)}});break;case"number":case"range":f=Object(c.createElement)(y.RangeControl,{className:s,key:t,value:a,label:n.label,help:i,min:n.min,max:n.max,onChange:function(e){l(e,t,o)}});break;case"color":case"colorpicker":f=Object(c.createElement)(N,{className:s,key:t,label:n.label,help:i,value:a,disableAlpha:n.disableAlpha,onChange:function(e){l(e,t,o)}});break;case"color-palette":f=Object(c.createElement)(P,{className:s,key:t,label:n.label,help:i,value:a,clearable:n.clearable||!1,onChange:function(e){l(e,t,o)}});break;case"radio":f=Object(c.createElement)(y.RadioControl,{key:t,value:a,label:n.label,options:n.options,selected:a,checked:a,help:i,onChange:function(e){l(e,t,o)}});break;default:f=!1}return f}(n[0],n[1]);if(a)return a})))),Object(c.createElement)(A,{attributes:r,blockArgs:t}))}},I=function(){var e=U[H];Object(T.addAction)(e,"yith-plugin-fw/jquery-events",(function(){if("jQuery"in window){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];jQuery(document).trigger(e,Object.values(n))}}))},H=0,U=["yith_plugin_fw_gutenberg_before_do_shortcode","yith_plugin_fw_gutenberg_success_do_shortcode","yith_plugin_fw_gutenberg_after_do_shortcode"];H<U.length;H++)I();for(var L=function(){var e=o()(F[Q],2),t=e[0],n=e[1];Object(s.registerBlockType)("yith/"+t,{title:n.title,description:n.description,category:n.category,attributes:n.attributes,icon:void 0!==n.icon?n.icon:h,keywords:n.keywords,edit:M(t,n),save:function(e){var t=e.attributes;return d(n,t)},deprecated:[{attributes:n.attributes,save:function(e){var t=e.attributes,r=d(n,t),o='<span class="yith_block_'+i()(r)+'">'+r+"</span>";return Object(c.createElement)(c.RawHTML,null,o)}}]})},Q=0,F=Object.entries(yithGutenbergBlocks);Q<F.length;Q++)L()}]);
plugin-fw/dist/gutenberg/style-index.css ADDED
@@ -0,0 +1,2 @@
 
 
1
+ .block-editor-yith-plugin-fw-shortcode-block.block-editor-yith-plugin-fw-shortcode-block--empty-html,.block-editor-yith-plugin-fw-shortcode-block.block-editor-yith-plugin-fw-shortcode-block--shortcode{padding:1em 1em 1.2em;border:1px solid #1e1e1e;border-radius:4px}.block-editor-yith-plugin-fw-shortcode-block.block-editor-yith-plugin-fw-shortcode-block--shortcode .block-editor-yith-plugin-fw-shortcode-block__content{font-family:Menlo,Consolas,monaco,monospace;color:#1e1e1e;font-size:13px;padding:.8em 1em;border:1px solid #ddd;border-radius:4px}.block-editor-yith-plugin-fw-shortcode-block{position:relative;min-height:30px}.block-editor-yith-plugin-fw-shortcode-block .block-editor-yith-plugin-fw-shortcode-block__spinner-wrap{position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%)}.block-editor-yith-plugin-fw-shortcode-block.block-editor-yith-plugin-fw-shortcode-block--empty-html.block-editor-yith-plugin-fw-shortcode-block--no-message .block-editor-yith-plugin-fw-shortcode-block__title{margin-bottom:0}.block-editor-yith-plugin-fw-shortcode-block.block-editor-yith-plugin-fw-shortcode-block--empty-html .block-editor-yith-plugin-fw-shortcode-block__message{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-style:italic;font-size:13px}.block-editor-yith-plugin-fw-shortcode-block.block-editor-yith-plugin-fw-shortcode-block--empty-html .block-editor-yith-plugin-fw-shortcode-block__content{display:none}
2
+ .block-editor-yith-color-palette-control .block-editor-yith-color-palette-control__color-indicator{margin-bottom:12px}.block-editor-yith-color-palette-control .component-color-indicator{vertical-align:text-bottom}
plugin-fw/includes/builders/elementor/class-yith-elementor-widget.php ADDED
@@ -0,0 +1,464 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Elementor Widget Skeleton Class.
4
+ *
5
+ * @class YITH_Elementor_Widget
6
+ * @package YITH\PluginFramework\Classes
7
+ * @since 3.6.0
8
+ */
9
+
10
+ use Elementor\Controls_Manager;
11
+ use Elementor\Plugin;
12
+ use Elementor\Widget_Base;
13
+
14
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
15
+
16
+ if ( ! class_exists( 'YITH_Elementor_Widget' ) ) {
17
+ /**
18
+ * YITH_Elementor_Widget class.
19
+ *
20
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
21
+ */
22
+ class YITH_Elementor_Widget extends Widget_Base {
23
+
24
+ /**
25
+ * YITH Data.
26
+ *
27
+ * @var array
28
+ */
29
+ protected $yith_data = array();
30
+
31
+ /**
32
+ * Widget constructor.
33
+ *
34
+ * @param array $data Widget data. Default is an empty array.
35
+ * @param array|null $args Optional. Widget default arguments. Default is null.
36
+ *
37
+ * @throws Exception If arguments are missing when initializing a full widget instance.
38
+ */
39
+ public function __construct( $data = array(), $args = null ) {
40
+ $this->yith_data = $args['yith_data'];
41
+ $this->init_yith_data();
42
+
43
+ parent::__construct( $data, $args );
44
+ }
45
+
46
+ /**
47
+ * Retrieve an YITH prop.
48
+ *
49
+ * @param string $prop The prop.
50
+ * @param bool|string|array $default Default value.
51
+ *
52
+ * @return mixed|string
53
+ */
54
+ public function get_yith_prop( $prop, $default = null ) {
55
+ if ( is_null( $default ) ) {
56
+ $defaults = $this->get_yith_data_defaults();
57
+ $default = array_key_exists( $prop, $defaults ) ? $defaults[ $prop ] : false;
58
+ }
59
+
60
+ return array_key_exists( $prop, $this->yith_data ) ? $this->yith_data[ $prop ] : $default;
61
+ }
62
+
63
+ /**
64
+ * Get element name.
65
+ *
66
+ * @return string
67
+ */
68
+ public function get_name() {
69
+ return $this->get_yith_prop( 'name', '' );
70
+ }
71
+
72
+ /**
73
+ * Get the element title.
74
+ *
75
+ * @return string
76
+ */
77
+ public function get_title() {
78
+ return $this->get_yith_prop( 'title', '' );
79
+ }
80
+
81
+ /**
82
+ * Get the element icon.
83
+ *
84
+ * @return string
85
+ */
86
+ public function get_icon() {
87
+ return $this->get_yith_prop( 'icon', 'yith-icon yith-icon-yith' );
88
+ }
89
+
90
+ /**
91
+ * Get widget categories.
92
+ *
93
+ * @return array Widget categories.
94
+ */
95
+ public function get_categories() {
96
+ return array( 'yith' ) + (array) $this->get_yith_prop( 'categories', array() );
97
+ }
98
+
99
+ /**
100
+ * Register the widget controls.
101
+ */
102
+ public function _register_controls() { // phpcs:ignore
103
+ $options = $this->get_yith_prop( 'options' );
104
+ $description = $this->get_yith_prop( 'description' );
105
+
106
+ if ( $options ) {
107
+ $this->start_controls_section(
108
+ 'options',
109
+ array(
110
+ 'label' => $this->get_yith_prop( 'section_title' ),
111
+ 'tab' => Controls_Manager::TAB_CONTENT,
112
+ )
113
+ );
114
+
115
+ if ( $description ) {
116
+ $this->add_control(
117
+ 'description',
118
+ array(
119
+ 'type' => Controls_Manager::RAW_HTML,
120
+ 'raw' => $description,
121
+ 'content_classes' => 'yith-plugin-fw-elementor-widget-description',
122
+ )
123
+ );
124
+ }
125
+
126
+ foreach ( $options as $option ) {
127
+ if ( ! isset( $option['type'] ) ) {
128
+ continue;
129
+ }
130
+
131
+ $this->add_control( $option['yith_key'], $option );
132
+ }
133
+
134
+ $this->end_controls_section();
135
+ } elseif ( $description ) {
136
+ $this->start_controls_section(
137
+ 'options',
138
+ array(
139
+ 'label' => $this->get_title(),
140
+ 'tab' => Controls_Manager::TAB_CONTENT,
141
+ )
142
+ );
143
+ $this->add_control(
144
+ 'description',
145
+ array(
146
+ 'type' => Controls_Manager::RAW_HTML,
147
+ 'raw' => $description,
148
+ 'content_classes' => 'yith-plugin-fw-elementor-widget-description',
149
+ )
150
+ );
151
+
152
+ $this->end_controls_section();
153
+ }
154
+ }
155
+
156
+ /**
157
+ * Render the content of the widget
158
+ */
159
+ protected function render() {
160
+ $settings = $this->get_settings_for_display();
161
+ $option_values = $this->get_yith_option_values();
162
+ $options = $this->get_yith_prop( 'options' );
163
+ $shortcode_name = $this->get_yith_prop( 'shortcode_name' );
164
+ $do_shortcode = ! ! $this->get_yith_prop( 'do_shortcode' );
165
+ $render_cb = $this->get_yith_prop( 'render_cb' );
166
+ $editor_render_cb = $this->get_yith_prop( 'editor_render_cb' );
167
+ $empty_message = $this->get_yith_prop( 'empty_message', '' );
168
+
169
+ if ( Plugin::$instance->editor->is_edit_mode() && $editor_render_cb && is_callable( $editor_render_cb ) ) {
170
+ echo call_user_func( $editor_render_cb, $option_values ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
171
+ } elseif ( $render_cb && is_callable( $render_cb ) ) {
172
+ echo call_user_func( $render_cb, $option_values ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
173
+ } else {
174
+ $shortcode_attrs = array();
175
+
176
+ foreach ( $options as $option ) {
177
+ $display_key = $option['yith_display_key'];
178
+ $value = isset( $option_values[ $display_key ] ) ? $option_values[ $display_key ] : null;
179
+ $show = $this->is_control_visible( $option, $settings );
180
+
181
+ if ( $show && ! is_null( $value ) && '' !== $value ) {
182
+ $value = is_array( $value ) ? implode( ',', $value ) : $value;
183
+ $shortcode_value = ! empty( $option['remove_quotes'] ) ? $value : ( '"' . $value . '"' );
184
+ $shortcode_attrs[] = $display_key . '=' . $shortcode_value;
185
+ }
186
+ }
187
+
188
+ $shortcode_attrs = implode( ' ', $shortcode_attrs );
189
+ $shortcode = "[{$shortcode_name} {$shortcode_attrs}]";
190
+
191
+ if ( Plugin::$instance->editor->is_edit_mode() ) {
192
+ $html = esc_html( $shortcode );
193
+ if ( $do_shortcode ) {
194
+ do_action( 'yith_plugin_fw_elementor_editor_before_do_shortcode', $shortcode, $this );
195
+ $html = do_shortcode( apply_filters( 'yith_plugin_fw_elementor_editor_shortcode', $shortcode, $this ) );
196
+ do_action( 'yith_plugin_fw_elementor_editor_after_do_shortcode', $shortcode, $this );
197
+ }
198
+ $type = $do_shortcode ? 'html' : 'shortcode';
199
+ $html_to_show = $html;
200
+ $message = '';
201
+
202
+ if ( $do_shortcode && $empty_message && ! $html ) {
203
+ $type = 'empty-html';
204
+ $html_to_show = esc_html( $shortcode );
205
+ $message = $empty_message;
206
+ }
207
+
208
+ $show_title = in_array( $type, array( 'shortcode', 'empty-html' ), true );
209
+ $show_content = 'empty-html' !== $type;
210
+ ?>
211
+ <div class="yith-plugin-fw-elementor-shortcode-widget yith-plugin-fw-elementor-shortcode-widget--<?php echo esc_attr( $type ); ?>">
212
+ <?php if ( $show_title ) : ?>
213
+ <div class="yith-plugin-fw-elementor-shortcode-widget__title">
214
+ <?php echo esc_html( $this->get_title() ); ?>
215
+ </div>
216
+ <?php endif; ?>
217
+ <?php if ( $message ) : ?>
218
+ <div class="yith-plugin-fw-elementor-shortcode-widget__message">
219
+ <?php echo wp_kses_post( $message ); ?>
220
+ </div>
221
+ <?php endif; ?>
222
+ <?php if ( $show_content ) : ?>
223
+ <div class="yith-plugin-fw-elementor-shortcode-widget__content">
224
+ <?php echo $html_to_show; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
225
+ </div>
226
+ <?php endif; ?>
227
+ </div>
228
+ <?php
229
+ } else {
230
+ do_action( 'yith_plugin_fw_elementor_before_do_shortcode', $shortcode, $this );
231
+ echo do_shortcode( apply_filters( 'yith_plugin_fw_elementor_shortcode', $shortcode, $this ) );
232
+ do_action( 'yith_plugin_fw_elementor_after_do_shortcode', $shortcode, $this );
233
+ }
234
+ }
235
+ }
236
+
237
+ /**
238
+ * Retrieve the YITH Data defaults.
239
+ *
240
+ * @return array
241
+ */
242
+ public function get_yith_data_defaults() {
243
+ return array(
244
+ 'map_from_gutenberg' => false,
245
+ 'shortcode_name' => '',
246
+ 'do_shortcode' => true,
247
+ 'render_cb' => false,
248
+ 'editor_render_cb' => false,
249
+ 'options' => array(),
250
+ 'section_title' => sprintf(
251
+ // translators: %s it the Elementor Widget title.
252
+ _x( '%s - Options', 'Elementor Widget - section title', 'yith-plugin-fw' ),
253
+ $this->get_title()
254
+ ),
255
+ );
256
+ }
257
+
258
+ /**
259
+ * Retrieve YITH options with their values.
260
+ */
261
+ protected function get_yith_option_values() {
262
+ $settings = $this->get_settings_for_display();
263
+ $map_from_gutenberg = $this->get_yith_prop( 'map_from_gutenberg' );
264
+ $options = $this->get_yith_prop( 'options' );
265
+ $option_values = array();
266
+
267
+ foreach ( $options as $option ) {
268
+ $value = isset( $option['default'] ) ? $option['default'] : null;
269
+ $key = $option['yith_key'];
270
+ $display_key = $option['yith_display_key'];
271
+
272
+ if ( isset( $settings[ $key ] ) ) {
273
+ $value = $settings[ $key ];
274
+ }
275
+
276
+ if ( isset( $option['type'] ) && Controls_Manager::SWITCHER === $option['type'] ) {
277
+ $yes_no_values = isset( $option['yes_no_values'] ) ? $option['yes_no_values'] : ! $map_from_gutenberg;
278
+ if ( false === $yes_no_values ) {
279
+ $yes_no_values = array( 'true', 'false' );
280
+ } elseif ( ! is_array( $yes_no_values ) || 2 !== count( $yes_no_values ) ) {
281
+ $yes_no_values = array( 'yes', 'no' );
282
+ }
283
+
284
+ $value = 'yes' === $value ? $yes_no_values[0] : $yes_no_values[1];
285
+ }
286
+
287
+ $option_values[ $display_key ] = $value;
288
+ }
289
+
290
+ return $option_values;
291
+ }
292
+
293
+ /**
294
+ * YITH Data Initialization.
295
+ */
296
+ protected function init_yith_data() {
297
+ $data = wp_parse_args( $this->yith_data, $this->get_yith_data_defaults() );
298
+
299
+ if ( ! ! $data['map_from_gutenberg'] ) {
300
+ $data = $this->override_elementor_specific_data( $data );
301
+
302
+ if ( ! $data['options'] && ! empty( $data['attributes'] ) && is_array( $data['attributes'] ) ) {
303
+ $data['options'] = $data['attributes'];
304
+ unset( $data['attributes'] );
305
+ }
306
+
307
+ if ( $data['options'] ) {
308
+ $data['options'] = array_map( array( $this, 'map_option_from_gutenberg' ), $data['options'] );
309
+ }
310
+ }
311
+
312
+ $data['options'] = $this->validate_yith_options( $data['options'] );
313
+
314
+ $this->yith_data = $data;
315
+ }
316
+
317
+ /**
318
+ * Validate field types
319
+ *
320
+ * @param array $options The options.
321
+ *
322
+ * @return array|false The validate option array; false if the type is not set.
323
+ */
324
+ protected function validate_yith_options( $options ) {
325
+ foreach ( $options as $key => &$option ) {
326
+ if ( ! isset( $option['type'] ) ) {
327
+ unset( $options[ $key ] );
328
+ continue;
329
+ }
330
+
331
+ // Let's fix the option type.
332
+ if ( in_array( $option['type'], array( 'toggle', 'onoff', 'checkbox' ), true ) ) {
333
+ $option['type'] = Controls_Manager::SWITCHER;
334
+
335
+ if ( isset( $option['default'] ) && is_bool( $option['default'] ) ) {
336
+ $option['default'] = yith_plugin_fw_is_true( $option['default'] ) ? 'yes' : 'no';
337
+ }
338
+ } elseif ( in_array( $option['type'], array( 'radio' ), true ) ) {
339
+ $option['type'] = Controls_Manager::SELECT;
340
+ } elseif ( in_array( $option['type'], array( 'color', 'colorpicker', 'color-palette' ), true ) ) {
341
+ $option['type'] = Controls_Manager::COLOR;
342
+ } elseif ( in_array( $option['type'], array( 'select' ), true ) && ! empty( $option['multiple'] ) ) {
343
+ $option['type'] = Controls_Manager::SELECT2;
344
+ }
345
+
346
+ // Set the key, used to store the option, and the display_key, used in the render method.
347
+ $option['yith_key'] = $this->maybe_prefix_yith_key( $key );
348
+ if ( ! isset( $option['yith_display_key'] ) ) {
349
+ $option['yith_display_key'] = $key;
350
+ }
351
+
352
+ // Auto-set the block_label to display label in a separate line.
353
+ if ( ! isset( $option['label_block'] ) ) {
354
+ $option['label_block'] = true;
355
+ }
356
+ }
357
+
358
+ return $options;
359
+ }
360
+
361
+ /**
362
+ * Override Elementor specific data if exists.
363
+ * This allows setting/overriding specific values for Elementor.
364
+ *
365
+ * @param array $data The data array.
366
+ *
367
+ * @return array
368
+ */
369
+ protected function override_elementor_specific_data( $data ) {
370
+ $elementor_data = array_filter(
371
+ $data,
372
+ function ( $key ) {
373
+ return 'elementor_' === substr( $key, 0, 10 );
374
+ },
375
+ ARRAY_FILTER_USE_KEY
376
+ );
377
+
378
+ $elementor_data = array_combine(
379
+ array_map(
380
+ function ( $key ) {
381
+ return substr( $key, 10 );
382
+ },
383
+ array_keys( $elementor_data )
384
+ ),
385
+ array_values( $elementor_data )
386
+ );
387
+
388
+ $data = array_merge( $data, $elementor_data );
389
+
390
+ return $data;
391
+ }
392
+
393
+ /**
394
+ * Map an option from Gutenberg
395
+ *
396
+ * @param array $option The option array.
397
+ *
398
+ * @return array
399
+ */
400
+ protected function map_option_from_gutenberg( $option ) {
401
+ $option = $this->override_elementor_specific_data( $option );
402
+ $type = isset( $option['type'] ) ? $option['type'] : false;
403
+
404
+ if ( isset( $option['deps'], $option['deps']['id'], $option['deps']['value'] ) && ! isset( $option['condition'] ) ) {
405
+
406
+ $value = $option['deps']['value'];
407
+ if ( in_array( $type, array( 'toggle', 'onoff', 'checkbox' ), true ) ) {
408
+ $value = yith_plugin_fw_is_true( $value ) ? 'yes' : 'no';
409
+ }
410
+ $option['condition'] = array(
411
+ $option['deps']['id'] => $value,
412
+ );
413
+ unset( $option['deps'] );
414
+ }
415
+
416
+ switch ( $type ) {
417
+ case 'color':
418
+ case 'colorpicker':
419
+ if ( ! isset( $option['alpha'] ) ) {
420
+ $option['alpha'] = isset( $option['disableAlpha'] ) ? ! $option['disableAlpha'] : false;
421
+ }
422
+
423
+ break;
424
+ case 'color-palette':
425
+ $option['alpha'] = false;
426
+ break;
427
+ }
428
+
429
+ if ( isset( $option['help'] ) && ! isset( $option['description'] ) ) {
430
+ $option['description'] = $option['help'];
431
+ unset( $option['help'] );
432
+ }
433
+
434
+ return $option;
435
+ }
436
+
437
+ /**
438
+ * Return the YITH key prefix.
439
+ *
440
+ * @return string
441
+ */
442
+ public function get_yith_key_prefix() {
443
+ return '_yith_';
444
+ }
445
+
446
+ /**
447
+ * Add YITH prefix to a specific key.
448
+ *
449
+ * @param string $key The key to be prefixed.
450
+ *
451
+ * @return string
452
+ */
453
+ public function maybe_prefix_yith_key( $key ) {
454
+ $reserved_keys = array( 'id', 'elType', 'settings', 'elements', 'isInner' );
455
+ if ( in_array( $key, $reserved_keys, true ) ) {
456
+ $prefix = $this->get_yith_key_prefix();
457
+
458
+ $key = substr( $key, 0, strlen( $prefix ) ) === $prefix ? $key : ( $prefix . $key );
459
+ }
460
+
461
+ return $key;
462
+ }
463
+ }
464
+ }
plugin-fw/includes/builders/elementor/class-yith-elementor.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Elementor Class.
4
+ *
5
+ * @class YITH_Elementor
6
+ * @package YITH\PluginFramework\Classes
7
+ * @since 3.6.0
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
11
+
12
+ if ( ! class_exists( 'YITH_Elementor' ) ) {
13
+ /**
14
+ * YITH_Elementor class.
15
+ *
16
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
17
+ */
18
+ class YITH_Elementor {
19
+
20
+ /**
21
+ * The single instance of the class.
22
+ *
23
+ * @var YITH_Elementor
24
+ */
25
+ private static $instance;
26
+
27
+ /**
28
+ * The registered widgets.
29
+ *
30
+ * @var array
31
+ */
32
+ private $widgets;
33
+
34
+ /**
35
+ * Singleton implementation.
36
+ *
37
+ * @return YITH_Elementor
38
+ */
39
+ public static function instance() {
40
+ return ! is_null( self::$instance ) ? self::$instance : self::$instance = new self();
41
+ }
42
+
43
+ /**
44
+ * YITH_Elementor constructor.
45
+ */
46
+ private function __construct() {
47
+ if ( defined( 'ELEMENTOR_VERSION' ) && version_compare( ELEMENTOR_VERSION, '3.0.0', '>=' ) ) {
48
+ add_action( 'init', array( $this, 'init' ), 20 );
49
+ }
50
+ }
51
+
52
+ /**
53
+ * Register Elementor widget
54
+ *
55
+ * @param string $widget_name The widget name.
56
+ * @param array $widget_options The widget options.
57
+ */
58
+ public function register_widget( $widget_name, $widget_options ) {
59
+ if ( ! isset( $widget_options['name'] ) ) {
60
+ $widget_options['name'] = $widget_name;
61
+ }
62
+ $this->widgets[ $widget_name ] = $widget_options;
63
+ }
64
+
65
+ /**
66
+ * Let's start with Elementor
67
+ */
68
+ public function init() {
69
+ if ( $this->widgets ) {
70
+ $this->load_files();
71
+ add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_widgets' ) );
72
+ add_action( 'elementor/elements/categories_registered', array( $this, 'add_yith_category' ) );
73
+
74
+ add_action( 'elementor/editor/after_enqueue_styles', array( $this, 'enqueue_styles' ) );
75
+ add_action( 'elementor/frontend/after_enqueue_styles', array( $this, 'enqueue_styles' ) );
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Load files
81
+ */
82
+ private function load_files() {
83
+ require_once 'class-yith-elementor-widget.php';
84
+ }
85
+
86
+ /**
87
+ * Register Elementor Widgets
88
+ */
89
+ public function register_widgets() {
90
+ foreach ( $this->widgets as $widget ) {
91
+ \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new YITH_Elementor_Widget( array(), array( 'yith_data' => $widget ) ) );
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Add "YITH" group for Elementor widgets
97
+ *
98
+ * @param Elementor\Elements_Manager $elements_manager Elements Manager.
99
+ */
100
+ public function add_yith_category( $elements_manager ) {
101
+ $elements_manager->add_category(
102
+ 'yith',
103
+ array(
104
+ 'title' => 'YITH',
105
+ 'icon' => 'fa fa-plug',
106
+ 'active' => false,
107
+ )
108
+ );
109
+ }
110
+
111
+ /**
112
+ * Enqueue styles in elementor
113
+ */
114
+ public function enqueue_styles() {
115
+ if ( \Elementor\Plugin::$instance->preview->is_preview_mode() || \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
116
+ wp_enqueue_style( 'yith-plugin-fw-icon-font' );
117
+ wp_enqueue_style( 'yith-plugin-fw-elementor' );
118
+ }
119
+ }
120
+ }
121
+ }
122
+
123
+ YITH_Elementor::instance();
plugin-fw/includes/{class-yith-gutenberg.php → builders/gutenberg/class-yith-gutenberg.php} RENAMED
@@ -64,30 +64,46 @@ if ( ! class_exists( 'YITH_Gutenberg' ) ) {
64
  * YITH_Gutenberg constructor.
65
  */
66
  private function __construct() {
 
67
  add_action( 'init', array( $this, 'register_blocks' ), 30 );
68
  add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ) );
69
  add_action( 'wp_ajax_yith_plugin_fw_gutenberg_do_shortcode', array( $this, 'do_shortcode' ) );
70
  add_action( 'wc_ajax_yith_plugin_fw_gutenberg_do_shortcode', array( $this, 'do_shortcode' ) );
71
  }
72
 
 
 
 
 
 
 
 
73
  /**
74
  * Enqueue scripts for gutenberg
75
  */
76
  public function enqueue_block_editor_assets() {
77
- $ajax_url = function_exists( 'WC' ) ? add_query_arg( 'wc-ajax', 'yith_plugin_fw_gutenberg_do_shortcode', trailingslashit( site_url() ) ) : admin_url( 'admin-ajax.php' );
78
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
79
- $deps = apply_filters(
80
- 'yith_plugin_fw_gutenberg_script_deps',
81
- array(
82
- 'wp-blocks',
83
- 'wp-element',
84
- 'yith-js-md5',
85
- )
 
 
 
86
  );
87
- wp_register_script( 'yith-js-md5', YIT_CORE_PLUGIN_URL . '/assets/js/javascript-md5/md5.min.js', array(), '2.10.0', true );
88
- wp_enqueue_script( 'yith-gutenberg', YIT_CORE_PLUGIN_URL . '/assets/js/yith-gutenberg' . $suffix . '.js', $deps, yith_plugin_fw_get_version(), true );
89
- wp_localize_script( 'yith-gutenberg', 'yith_gutenberg', $this->blocks_args );
90
- wp_localize_script( 'yith-gutenberg', 'yith_gutenberg_ajax', array( 'ajaxurl' => $ajax_url ) );
 
 
 
 
 
91
  }
92
 
93
  /**
@@ -224,12 +240,10 @@ if ( ! class_exists( 'YITH_Gutenberg' ) ) {
224
  $args[ $block ]['category'] = $this->get_default_blocks_category_slug();
225
  }
226
 
 
 
227
  if ( isset( $block_args['attributes'] ) ) {
228
  foreach ( $block_args['attributes'] as $attr_name => $attributes ) {
229
- // Set the do_shortcode args.
230
- if ( ! empty( $attributes['do_shortcode'] ) ) {
231
- $args[ $block ]['attributes'][ $attr_name ] = true;
232
- }
233
 
234
  if ( ! empty( $attributes['options'] ) && is_array( $attributes['options'] ) ) {
235
  $options = array();
@@ -249,8 +263,8 @@ if ( ! class_exists( 'YITH_Gutenberg' ) ) {
249
 
250
  // Special Requirements for Block Type.
251
  if ( ! empty( $attributes['type'] ) ) {
252
- $args[ $block ]['attributes'][ $attr_name ]['blocktype'] = $attributes['type'];
253
- $args[ $block ]['attributes'][ $attr_name ]['type'] = 'string';
254
 
255
  switch ( $attributes['type'] ) {
256
  case 'select':
@@ -293,20 +307,23 @@ if ( ! class_exists( 'YITH_Gutenberg' ) ) {
293
  * Get a do_shortcode in ajax call to show block preview
294
  **/
295
  public function do_shortcode() {
296
- // phpcs:disable WordPress.Security.NonceVerification.Missing
297
  $current_action = current_action();
298
- $shortcode = ! empty( $_POST['shortcode'] ) ? wp_unslash( $_POST['shortcode'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
299
 
300
  if ( ! apply_filters( 'yith_plugin_fw_gutenberg_skip_shortcode_sanitize', false ) ) {
301
  $shortcode = sanitize_text_field( stripslashes( $shortcode ) );
302
  }
303
 
 
 
304
  do_action( 'yith_plugin_fw_gutenberg_before_do_shortcode', $shortcode, $current_action );
305
  echo do_shortcode( apply_filters( 'yith_plugin_fw_gutenberg_shortcode', $shortcode, $current_action ) );
306
  do_action( 'yith_plugin_fw_gutenberg_after_do_shortcode', $shortcode, $current_action );
307
 
 
308
  if ( is_ajax() ) {
309
- die();
310
  }
311
 
312
  // phpcs:enable
64
  * YITH_Gutenberg constructor.
65
  */
66
  private function __construct() {
67
+ add_action( 'init', array( $this, 'init' ) );
68
  add_action( 'init', array( $this, 'register_blocks' ), 30 );
69
  add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ) );
70
  add_action( 'wp_ajax_yith_plugin_fw_gutenberg_do_shortcode', array( $this, 'do_shortcode' ) );
71
  add_action( 'wc_ajax_yith_plugin_fw_gutenberg_do_shortcode', array( $this, 'do_shortcode' ) );
72
  }
73
 
74
+ /**
75
+ * Initialization
76
+ */
77
+ public function init() {
78
+
79
+ }
80
+
81
  /**
82
  * Enqueue scripts for gutenberg
83
  */
84
  public function enqueue_block_editor_assets() {
85
+ $ajax_url = function_exists( 'WC' ) ? add_query_arg( 'wc-ajax', 'yith_plugin_fw_gutenberg_do_shortcode', trailingslashit( site_url() ) ) : admin_url( 'admin-ajax.php' );
86
+ $gutenberg = array( 'ajaxurl' => $ajax_url );
87
+ $asset_file = include YIT_CORE_PLUGIN_PATH . '/dist/gutenberg/index.asset.php';
88
+
89
+ $gutenberg_assets_url = YIT_CORE_PLUGIN_URL . '/dist/gutenberg';
90
+
91
+ wp_register_script(
92
+ 'yith-gutenberg',
93
+ $gutenberg_assets_url . '/index.js',
94
+ $asset_file['dependencies'],
95
+ $asset_file['version'],
96
+ true
97
  );
98
+
99
+ wp_localize_script( 'yith-gutenberg', 'yith_gutenberg_ajax', $gutenberg ); // Deprecated! Kept for backward compatibility.
100
+ wp_localize_script( 'yith-gutenberg', 'yith_gutenberg', $this->blocks_args ); // Deprecated! Kept for backward compatibility.
101
+
102
+ wp_localize_script( 'yith-gutenberg', 'yithGutenberg', $gutenberg );
103
+ wp_localize_script( 'yith-gutenberg', 'yithGutenbergBlocks', $this->blocks_args );
104
+
105
+ wp_enqueue_script( 'yith-gutenberg' );
106
+ wp_enqueue_style( 'yith-gutenberg', $gutenberg_assets_url . '/style-index.css', array(), yith_plugin_fw_get_version() );
107
  }
108
 
109
  /**
240
  $args[ $block ]['category'] = $this->get_default_blocks_category_slug();
241
  }
242
 
243
+ $args[ $block ]['do_shortcode'] = isset( $block_args['do_shortcode'] ) ? ! ! $block_args['do_shortcode'] : true;
244
+
245
  if ( isset( $block_args['attributes'] ) ) {
246
  foreach ( $block_args['attributes'] as $attr_name => $attributes ) {
 
 
 
 
247
 
248
  if ( ! empty( $attributes['options'] ) && is_array( $attributes['options'] ) ) {
249
  $options = array();
263
 
264
  // Special Requirements for Block Type.
265
  if ( ! empty( $attributes['type'] ) ) {
266
+ $args[ $block ]['attributes'][ $attr_name ]['controlType'] = $attributes['type'];
267
+ $args[ $block ]['attributes'][ $attr_name ]['type'] = 'string';
268
 
269
  switch ( $attributes['type'] ) {
270
  case 'select':
307
  * Get a do_shortcode in ajax call to show block preview
308
  **/
309
  public function do_shortcode() {
310
+ // phpcs:disable WordPress.Security.NonceVerification
311
  $current_action = current_action();
312
+ $shortcode = ! empty( $_REQUEST['shortcode'] ) ? wp_unslash( $_REQUEST['shortcode'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
313
 
314
  if ( ! apply_filters( 'yith_plugin_fw_gutenberg_skip_shortcode_sanitize', false ) ) {
315
  $shortcode = sanitize_text_field( stripslashes( $shortcode ) );
316
  }
317
 
318
+ ob_start();
319
+
320
  do_action( 'yith_plugin_fw_gutenberg_before_do_shortcode', $shortcode, $current_action );
321
  echo do_shortcode( apply_filters( 'yith_plugin_fw_gutenberg_shortcode', $shortcode, $current_action ) );
322
  do_action( 'yith_plugin_fw_gutenberg_after_do_shortcode', $shortcode, $current_action );
323
 
324
+ $html = ob_get_clean();
325
  if ( is_ajax() ) {
326
+ wp_send_json( array( 'html' => $html ) );
327
  }
328
 
329
  // phpcs:enable
plugin-fw/includes/builders/gutenberg/src/.jshintrc ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "boss": true,
3
+ "curly": true,
4
+ "eqeqeq": true,
5
+ "eqnull": true,
6
+ "esversion": 6,
7
+ "expr": true,
8
+ "immed": true,
9
+ "noarg": true,
10
+ "onevar": true,
11
+ "trailing": true,
12
+ "undef": true,
13
+ "unused": true,
14
+ "browser": true,
15
+ "globals": {
16
+ "_": false,
17
+ "Backbone": false,
18
+ "jQuery": true,
19
+ "console": true,
20
+ "alert": true,
21
+ "JSON": false,
22
+ "wp": false
23
+ }
24
+ }
plugin-fw/includes/builders/gutenberg/src/common/actions-to-jquery-events.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Actions to jQuery events
3
+ */
4
+
5
+ /**
6
+ * WordPress dependencies
7
+ */
8
+ import { addAction } from '@wordpress/hooks';
9
+
10
+ const actions = [
11
+ 'yith_plugin_fw_gutenberg_before_do_shortcode',
12
+ 'yith_plugin_fw_gutenberg_success_do_shortcode',
13
+ 'yith_plugin_fw_gutenberg_after_do_shortcode'
14
+ ];
15
+
16
+ for ( const action of actions ) {
17
+ addAction(
18
+ action,
19
+ 'yith-plugin-fw/jquery-events',
20
+ ( ...params ) => {
21
+ if ( 'jQuery' in window ) {
22
+ jQuery( document ).trigger( action, Object.values( params ) );
23
+ }
24
+ }
25
+ );
26
+ }
plugin-fw/includes/builders/gutenberg/src/common/ajaxFetch.js ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Ajax Fetch
3
+ */
4
+
5
+ /**
6
+ * WordPress dependencies
7
+ */
8
+ import { addQueryArgs } from '@wordpress/url';
9
+
10
+ /**
11
+ * Check status of ajax call
12
+ * @param response
13
+ * @returns {*}
14
+ */
15
+ function ajaxCheckStatus( response ) {
16
+ if ( response.status >= 200 && response.status < 300 ) {
17
+ return response;
18
+ }
19
+
20
+ throw response;
21
+ }
22
+
23
+ /**
24
+ * Parse the response of the ajax call
25
+ * @param response
26
+ * @returns {*}
27
+ */
28
+ function parseResponse( response ) {
29
+ return response.json ? response.json() : response.text();
30
+ }
31
+
32
+ /**
33
+ * Fetch using WordPress Ajax
34
+ *
35
+ * @param {object} data The data to use in the ajax call.
36
+ * @param {string} url The ajax URL.
37
+ * @returns {Promise<Response>}
38
+ */
39
+ export const ajaxFetch = ( data, url = yithGutenberg.ajaxurl ) => {
40
+ url = addQueryArgs( url, data );
41
+ return fetch( url ).then( ajaxCheckStatus ).then( parseResponse );
42
+ };
plugin-fw/includes/builders/gutenberg/src/common/checkForDeps.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Check for dependencies
3
+ *
4
+ * @param {object} attributeArgs Attribute arguments.
5
+ * @param {object} attributes The attributes.
6
+ * @returns {boolean}
7
+ */
8
+ export const checkForDeps = ( attributeArgs, attributes ) => {
9
+ const { controlType } = attributeArgs;
10
+ let show = true;
11
+
12
+ if ( attributeArgs.deps && attributeArgs.deps.id && 'value' in attributeArgs.deps ) {
13
+ let depsValue = attributeArgs.deps.value;
14
+ if ( 'toggle' === controlType || 'checkbox' === controlType ) {
15
+ depsValue = true === depsValue || 'yes' === depsValue || 1 === depsValue;
16
+ }
17
+ show = typeof attributes[ attributeArgs.deps.id ] !== 'undefined' && depsValue === attributes[ attributeArgs.deps.id ];
18
+ }
19
+
20
+ return show;
21
+ };
plugin-fw/includes/builders/gutenberg/src/common/generateShortcode.js ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import { checkForDeps } from './checkForDeps';
5
+
6
+ /**
7
+ * Generate the shortcode
8
+ *
9
+ * @param {object} blockArgs The block arguments.
10
+ * @param {object} attributes The attributes
11
+ * @returns {string}
12
+ */
13
+ export const generateShortcode = ( blockArgs, attributes ) => {
14
+ let theShortcode = '';
15
+ let callback = false;
16
+
17
+ if ( typeof blockArgs.callback !== 'undefined' ) {
18
+ if ( jQuery && blockArgs.callback in jQuery.fn ) {
19
+ callback = jQuery.fn[ blockArgs.callback ];
20
+ } else if ( blockArgs.callback in window ) {
21
+ callback = window[ blockArgs.callback ];
22
+ }
23
+ }
24
+
25
+ if ( typeof callback === 'function' ) {
26
+ theShortcode = callback( attributes, blockArgs );
27
+ } else {
28
+ const shortcodeAttrs = blockArgs.attributes ? Object.entries( blockArgs.attributes ).map( ( [attributeName, attributeArgs] ) => {
29
+ const show = checkForDeps( attributeArgs, attributes );
30
+ const value = attributes[ attributeName ];
31
+
32
+ if ( show && typeof value !== 'undefined' ) {
33
+ const shortcodeValue = !!attributeArgs.remove_quotes ? value : `"${value}"`;
34
+ return attributeName + '=' + shortcodeValue;
35
+ }
36
+ } ) : [];
37
+
38
+ const shortcodeAttrsText = shortcodeAttrs.length ? ( ' ' + shortcodeAttrs.join( ' ' ) ) : '';
39
+ theShortcode = `[${blockArgs.shortcode_name}${shortcodeAttrsText}]`;
40
+ }
41
+ return theShortcode;
42
+ };
plugin-fw/includes/builders/gutenberg/src/common/icons.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * SVG Icons
3
+ */
4
+
5
+ /**
6
+ * The YITH Logo Icon
7
+ * @type {JSX.Element}
8
+ */
9
+ export const yith_icon = <svg viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg" width="22" height="22" role="img" aria-hidden="true" focusable="false">
10
+ <path width="22" height="22"
11
+ 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"/>
12
+ </svg>;
plugin-fw/includes/builders/gutenberg/src/common/index.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ export * from './ajaxFetch';
2
+ export * from './icons';
3
+ export * from './generateShortcode';
4
+ export * from './checkForDeps';
plugin-fw/includes/builders/gutenberg/src/components/color-palette-control/index.js ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Color Palette Component
3
+ */
4
+
5
+ /**
6
+ * External dependencies
7
+ */
8
+ import React from 'react';
9
+
10
+ /**
11
+ * WordPress dependencies
12
+ */
13
+ import { BaseControl, ColorIndicator, ColorPalette } from '@wordpress/components';
14
+ import { __experimentalUseEditorFeature as useEditorFeature } from '@wordpress/block-editor';
15
+ import { useInstanceId } from '@wordpress/compose';
16
+
17
+ /**
18
+ * Internal dependencies
19
+ */
20
+ import './style.scss';
21
+
22
+ /**
23
+ * Visual Label Element
24
+ *
25
+ * @param {string} label The label.
26
+ * @param {string} colorValue The color.
27
+ * @returns {JSX.Element}
28
+ * @constructor
29
+ */
30
+ function VisualLabel( {
31
+ label,
32
+ colorValue
33
+ } ) {
34
+
35
+ return (
36
+ <>
37
+ {label}
38
+ {!!colorValue && (
39
+ <ColorIndicator colorValue={colorValue}/>
40
+ )}
41
+ </>
42
+ );
43
+ }
44
+
45
+ /**
46
+ * Color Palette Control
47
+ *
48
+ * @param {string} className The CSS class name.
49
+ * @param {string} label The label.
50
+ * @param {function} onChange The function callback fired on value change.
51
+ * @param {string} value The initial value.
52
+ * @param {string} help The help message.
53
+ * @param {array} palette Array of palette colors.
54
+ * @param {bool} clearable Set true to allow clear.
55
+ * @returns {JSX.Element}
56
+ * @constructor
57
+ */
58
+ export default function ColorPaletteControl( {
59
+ className,
60
+ label,
61
+ onChange,
62
+ value,
63
+ help,
64
+ palette,
65
+ clearable
66
+ } ) {
67
+
68
+ palette = !!palette ? palette : useEditorFeature( 'color.palette' );
69
+
70
+ const instanceId = useInstanceId( ColorPaletteControl );
71
+ const id = `inspector-yith-color-palette-control-${instanceId}`;
72
+
73
+ return (
74
+ <BaseControl
75
+ id={id}
76
+ className={`block-editor-yith-color-palette-control ${className}`}
77
+ help={help}
78
+ >
79
+ <fieldset>
80
+ <legend>
81
+ <div className="block-editor-yith-color-palette-control__color-indicator">
82
+ <BaseControl.VisualLabel>
83
+ <VisualLabel colorValue={value} label={label}/>
84
+ </BaseControl.VisualLabel>
85
+ </div>
86
+ </legend>
87
+
88
+ <ColorPalette
89
+ value={value}
90
+ onChange={onChange}
91
+ colors={palette}
92
+ clearable={clearable}
93
+ />
94
+ </fieldset>
95
+ </BaseControl> );
96
+ }
plugin-fw/includes/builders/gutenberg/src/components/color-palette-control/style.scss ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ .block-editor-yith-color-palette-control {
2
+ .block-editor-yith-color-palette-control__color-indicator {
3
+ margin-bottom: 12px;
4
+ }
5
+
6
+ .component-color-indicator{
7
+ vertical-align: text-bottom;
8
+ }
9
+ }
plugin-fw/includes/builders/gutenberg/src/components/color-picker-control/index.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Color Picker Component
3
+ */
4
+
5
+ /**
6
+ * External dependencies
7
+ */
8
+ import React from 'react';
9
+
10
+ /**
11
+ * WordPress dependencies
12
+ */
13
+ import { BaseControl, ColorPicker } from '@wordpress/components';
14
+ import { useInstanceId } from '@wordpress/compose';
15
+
16
+ /**
17
+ * Color Picker Control
18
+ *
19
+ * @param {string} className The CSS class name.
20
+ * @param {string} label The label.
21
+ * @param {function} onChange The function callback fired on value change.
22
+ * @param {string} value The initial value.
23
+ * @param {string} help The help message.
24
+ * @param {bool} disableAlpha Set true to disable the alpha
25
+ * @returns {ColorPickerControl}
26
+ * @constructor
27
+ */
28
+ export default function ColorPickerControl( {
29
+ className,
30
+ label,
31
+ onChange,
32
+ value,
33
+ help,
34
+ disableAlpha,
35
+ } ) {
36
+
37
+ const instanceId = useInstanceId( ColorPickerControl );
38
+ const id = `inspector-yith-color-picker-control-${instanceId}`;
39
+
40
+ return (
41
+ <BaseControl
42
+ id={id}
43
+ label={label}
44
+ className={`block-editor-yith-color-control ${className}`}
45
+ help={help}
46
+ >
47
+ <ColorPicker
48
+ color={value}
49
+ disableAlpha={disableAlpha}
50
+ onChangeComplete={onChange}
51
+ />
52
+ </BaseControl> );
53
+ }
plugin-fw/includes/builders/gutenberg/src/components/shortcode/index.js ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Shortcode Component
3
+ */
4
+
5
+ /**
6
+ * External dependencies
7
+ */
8
+ import React, { Component } from 'react';
9
+ import { isEqual } from 'lodash';
10
+
11
+ /**
12
+ * WordPress dependencies
13
+ */
14
+ import { RawHTML } from '@wordpress/element';
15
+ import { Spinner } from '@wordpress/components';
16
+ import { doAction, addAction } from '@wordpress/hooks';
17
+
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+ import { ajaxFetch, generateShortcode, yith_icon } from '../../common';
22
+ import md5 from 'md5';
23
+ import './style.scss';
24
+
25
+ const BEFORE_DO_SHORTCODE_ACTION = 'yith_plugin_fw_gutenberg_before_do_shortcode';
26
+ const SUCCESS_DO_SHORTCODE_ACTION = 'yith_plugin_fw_gutenberg_success_do_shortcode';
27
+ const AFTER_DO_SHORTCODE_ACTION = 'yith_plugin_fw_gutenberg_after_do_shortcode';
28
+
29
+ /**
30
+ * Shortcode Component
31
+ */
32
+ export class Shortcode extends Component {
33
+ constructor() {
34
+ super( ...arguments );
35
+
36
+ this.state = {
37
+ html : '',
38
+ shortcode : '',
39
+ shortcodeHash: '',
40
+ ajaxUpdated : false,
41
+ ajaxSuccess : false,
42
+ ajaxResponse : false,
43
+ loading : false
44
+ };
45
+
46
+ this.ajaxTimeout = false;
47
+ }
48
+
49
+ componentDidMount() {
50
+ this.updateShortcode();
51
+ }
52
+
53
+ componentDidUpdate( prevProps, prevState, snapshot ) {
54
+ const { shortcode, shortcodeHash, ajaxSuccess, ajaxResponse, ajaxUpdated } = this.state;
55
+
56
+ if ( !isEqual( prevProps, this.props ) ) {
57
+ this.updateShortcode();
58
+ }
59
+
60
+
61
+ if ( this.props.blockArgs.do_shortcode && ajaxUpdated ) {
62
+
63
+ if ( ajaxSuccess ) {
64
+ doAction( SUCCESS_DO_SHORTCODE_ACTION, shortcode, shortcodeHash, ajaxResponse );
65
+ }
66
+
67
+ doAction( AFTER_DO_SHORTCODE_ACTION, shortcode, shortcodeHash, ajaxResponse );
68
+
69
+ this.setState( { ajaxUpdated: false } );
70
+ }
71
+ }
72
+
73
+ updateShortcode() {
74
+ const { attributes, blockArgs } = this.props;
75
+
76
+ this.setState( { loading: true, ajaxSuccess: false, ajaxResponse: false } );
77
+
78
+ const shortcode = generateShortcode( blockArgs, attributes );
79
+ const shortcodeHash = md5( shortcode );
80
+
81
+ if ( blockArgs.do_shortcode ) {
82
+ !!this.ajaxTimeout && clearTimeout( this.ajaxTimeout );
83
+
84
+ doAction( BEFORE_DO_SHORTCODE_ACTION, shortcode, shortcodeHash );
85
+
86
+ this.ajaxTimeout = setTimeout( () => {
87
+ const ajaxData = {
88
+ action : 'yith_plugin_fw_gutenberg_do_shortcode',
89
+ shortcode: shortcode
90
+ };
91
+
92
+ ajaxFetch( ajaxData ).then( response => {
93
+ this.setState( { loading: false, html: response.html, shortcode, shortcodeHash, ajaxSuccess: true, ajaxUpdated: true, ajaxResponse: response } );
94
+ } )
95
+ .catch( error => {
96
+ console.log( { error } );
97
+ } );
98
+ }, 300 );
99
+ } else {
100
+ this.setState( { loading: false, html: shortcode, shortcode, shortcodeHash } );
101
+ }
102
+ }
103
+
104
+ render() {
105
+ const { html, loading, shortcode, shortcodeHash } = this.state;
106
+ const { blockArgs } = this.props;
107
+ const { do_shortcode, title, empty_message } = blockArgs;
108
+
109
+ const mainClass = 'block-editor-yith-plugin-fw-shortcode-block';
110
+
111
+ let wrapperClasses = [mainClass];
112
+ let type = do_shortcode ? 'html' : 'shortcode';
113
+ let htmlToShow = html;
114
+ let message = '';
115
+
116
+ if ( do_shortcode && !html ) {
117
+ type = 'empty-html';
118
+ htmlToShow = shortcode;
119
+ if ( empty_message ) {
120
+ message = empty_message;
121
+ }
122
+ }
123
+
124
+ const showTitle = ['shortcode', 'empty-html'].includes( type );
125
+ const showContent = 'empty-html' !== type;
126
+ const showMessage = !!message;
127
+
128
+ wrapperClasses.push( `${mainClass}--${type}` );
129
+ wrapperClasses.push( showMessage ? `${mainClass}--has-message` : `${mainClass}--no-message` );
130
+ wrapperClasses.push( `yith_block_${shortcodeHash}` );
131
+
132
+ return (
133
+ <>
134
+ <div className={wrapperClasses.join( ' ' )}>
135
+ {!!loading ? <div className={`${mainClass}__spinner-wrap`}><Spinner/></div> : ''}
136
+ {showTitle &&
137
+ <div className={`${mainClass}__title components-placeholder__label`}>{yith_icon}{title}</div>
138
+ }
139
+ {showMessage &&
140
+ <RawHTML className={`${mainClass}__message`}>{message}</RawHTML>
141
+ }
142
+ {showContent &&
143
+ <RawHTML className={`${mainClass}__content`}>{htmlToShow}</RawHTML>
144
+ }
145
+ </div>
146
+ </>
147
+ )
148
+ }
149
+ }
plugin-fw/includes/builders/gutenberg/src/components/shortcode/style.scss ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %bordered-block {
2
+ padding: 1em 1em 1.2em;
3
+ border: 1px solid #1e1e1e;
4
+ border-radius: 4px;
5
+ }
6
+
7
+ %shortcode-box {
8
+ font-family: Menlo, Consolas, monaco, monospace;
9
+ color: #1e1e1e;
10
+ font-size: 13px;
11
+ padding: 0.8em 1em;
12
+ border: 1px solid #ddd;
13
+ border-radius: 4px;
14
+ }
15
+
16
+ .block-editor-yith-plugin-fw-shortcode-block {
17
+ position: relative;
18
+ min-height: 30px;
19
+
20
+ .block-editor-yith-plugin-fw-shortcode-block__spinner-wrap {
21
+ position: absolute;
22
+ top: 50%;
23
+ left: 50%;
24
+ transform: translateX(-50%) translateY(-50%);
25
+ }
26
+
27
+ &.block-editor-yith-plugin-fw-shortcode-block--shortcode {
28
+
29
+ @extend %bordered-block;
30
+
31
+ .block-editor-yith-plugin-fw-shortcode-block__content {
32
+ @extend %shortcode-box;
33
+ }
34
+ }
35
+
36
+ &.block-editor-yith-plugin-fw-shortcode-block--empty-html {
37
+
38
+ @extend %bordered-block;
39
+
40
+ &.block-editor-yith-plugin-fw-shortcode-block--no-message {
41
+ .block-editor-yith-plugin-fw-shortcode-block__title {
42
+ margin-bottom: 0;
43
+ }
44
+ }
45
+
46
+ .block-editor-yith-plugin-fw-shortcode-block__message {
47
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
48
+ font-style: italic;
49
+ font-size: 13px;
50
+ }
51
+
52
+ .block-editor-yith-plugin-fw-shortcode-block__content {
53
+ display: none;
54
+ }
55
+ }
56
+ }
plugin-fw/includes/builders/gutenberg/src/edit.js ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Handle YITH Gutenberg Blocks Edit
3
+ *
4
+ * @var {Object} yithGutenbergBlocks The Gutenberg blocks object.
5
+ */
6
+
7
+ /**
8
+ * External dependencies
9
+ */
10
+ import React from 'react';
11
+
12
+ /**
13
+ * WordPress dependencies
14
+ */
15
+ import { PanelBody, BaseControl, ToggleControl, SelectControl, TextControl, TextareaControl, CheckboxControl, RangeControl, RadioControl } from '@wordpress/components';
16
+ import { InspectorControls } from '@wordpress/block-editor';
17
+
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+ import { Shortcode } from './components/shortcode';
22
+ import { checkForDeps } from './common';
23
+ import ColorPickerControl from './components/color-picker-control';
24
+ import ColorPaletteControl from './components/color-palette-control';
25
+
26
+ /**
27
+ * Retrieve an help message from arguments.
28
+ *
29
+ * @param {Object} args The arguments.
30
+ * @param {bool} value The value.
31
+ * @returns {string}
32
+ */
33
+ const getHelpMessage = ( args, value ) => {
34
+ let helpMessage = '';
35
+ if ( args.helps && args.helps.checked && args.helps.unchecked ) {
36
+ helpMessage = !!value ? args.helps.checked : args.helps.unchecked;
37
+ } else if ( args.help ) {
38
+ helpMessage = args.help;
39
+ }
40
+ return helpMessage;
41
+ }
42
+
43
+ /**
44
+ * Create edit function.
45
+ *
46
+ * @param {string} blockName The block name.
47
+ * @param {Object} blockArgs The block arguments.
48
+ * @returns {function({attributes?: *, className: *, setAttributes: *})}
49
+ */
50
+ export const createEditFunction = ( blockName, blockArgs ) => {
51
+ return function ( { attributes, className, setAttributes } ) {
52
+
53
+ const onChangeHandler = ( new_value, attribute_name, controlType ) => {
54
+ if ( ['colorpicker', 'color'].includes( controlType ) ) {
55
+ new_value = new_value.color.getAlpha() < 1 ? new_value.color.toRgbString() : new_value.color.toHexString();
56
+ }
57
+
58
+ let updatedAttributes = {};
59
+ updatedAttributes[ attribute_name ] = new_value;
60
+ setAttributes( updatedAttributes );
61
+ }
62
+
63
+ const getComponentControl = ( attributeName, attributeArgs ) => {
64
+ const { controlType } = attributeArgs;
65
+ const value = attributes[ attributeName ];
66
+ const helpMessage = getHelpMessage( attributeArgs, value );
67
+ let wrapperClassName = `${blockName}__${attributeName}-field-wrapper`;
68
+ const show = checkForDeps( attributeArgs, attributes );
69
+
70
+ if ( attributeArgs.wrapper_class ) {
71
+ wrapperClassName += ' ' + attributeArgs.wrapper_class;
72
+ }
73
+
74
+
75
+ let componentControl = false;
76
+ if ( show ) {
77
+ switch ( controlType ) {
78
+ case 'select':
79
+ componentControl = <SelectControl
80
+ className={wrapperClassName}
81
+ key={attributeName}
82
+ value={value}
83
+ label={attributeArgs.label}
84
+ options={attributeArgs.options}
85
+ selected={value}
86
+ help={helpMessage}
87
+ multiple={!!attributeArgs.multiple}
88
+ onChange={( newValue ) => {
89
+ onChangeHandler( newValue, attributeName, controlType )
90
+ }}
91
+ />;
92
+ break;
93
+
94
+ case 'text':
95
+ componentControl = <TextControl
96
+ className={wrapperClassName}
97
+ key={attributeName}
98
+ value={value}
99
+ label={attributeArgs.label}
100
+ help={helpMessage}
101
+ onChange={( newValue ) => {
102
+ onChangeHandler( newValue, attributeName, controlType )
103
+ }}
104
+ />;
105
+ break;
106
+
107
+ case 'textarea':
108
+ componentControl = <TextareaControl
109
+ className={wrapperClassName}
110
+ key={attributeName}
111
+ value={value}
112
+ label={attributeArgs.label}
113
+ help={helpMessage}
114
+ onChange={( newValue ) => {
115
+ onChangeHandler( newValue, attributeName, controlType )
116
+ }}
117
+ />;
118
+ break;
119
+
120
+ case 'toggle':
121
+ componentControl = <ToggleControl
122
+ className={wrapperClassName}
123
+ key={attributeName}
124
+ value={value}
125
+ label={attributeArgs.label}
126
+ help={helpMessage}
127
+ checked={value}
128
+ onChange={( newValue ) => {
129
+ onChangeHandler( newValue, attributeName, controlType )
130
+ }}
131
+ />;
132
+ break;
133
+
134
+ case 'checkbox':
135
+ componentControl = <CheckboxControl
136
+ className={wrapperClassName}
137
+ key={attributeName}
138
+ value={value}
139
+ label={attributeArgs.label}
140
+ help={helpMessage}
141
+ checked={value}
142
+ onChange={( newValue ) => {
143
+ onChangeHandler( newValue, attributeName, controlType )
144
+ }}
145
+ />;
146
+ break;
147
+
148
+ case 'number':
149
+ case 'range':
150
+ componentControl = <RangeControl
151
+ className={wrapperClassName}
152
+ key={attributeName}
153
+ value={value}
154
+ label={attributeArgs.label}
155
+ help={helpMessage}
156
+ min={attributeArgs.min}
157
+ max={attributeArgs.max}
158
+ onChange={( newValue ) => {
159
+ onChangeHandler( newValue, attributeName, controlType )
160
+ }}
161
+ />;
162
+ break;
163
+
164
+ case 'color':
165
+ case 'colorpicker':
166
+ componentControl = <ColorPickerControl
167
+ className={wrapperClassName}
168
+ key={attributeName}
169
+ label={attributeArgs.label}
170
+ help={helpMessage}
171
+ value={value}
172
+ disableAlpha={attributeArgs.disableAlpha}
173
+ onChange={( newValue ) => {
174
+ onChangeHandler( newValue, attributeName, controlType )
175
+ }}/>;
176
+ break;
177
+
178
+ case 'color-palette':
179
+ componentControl = <ColorPaletteControl
180
+ className={wrapperClassName}
181
+ key={attributeName}
182
+ label={attributeArgs.label}
183
+ help={helpMessage}
184
+ value={value}
185
+ clearable={attributeArgs.clearable || false}
186
+ onChange={( newValue ) => {
187
+ onChangeHandler( newValue, attributeName, controlType )
188
+ }}/>;
189
+ break;
190
+
191
+ case 'radio':
192
+ componentControl = <RadioControl
193
+ key={attributeName}
194
+ value={value}
195
+ label={attributeArgs.label}
196
+ options={attributeArgs.options}
197
+ selected={value}
198
+ checked={value}
199
+ help={helpMessage}
200
+ onChange={( newValue ) => {
201
+ onChangeHandler( newValue, attributeName, controlType )
202
+ }}
203
+ />;
204
+ break;
205
+ default:
206
+ componentControl = false;
207
+ }
208
+ }
209
+ return componentControl;
210
+ }
211
+
212
+ return (
213
+ <>
214
+ {!!blockArgs.attributes &&
215
+ <InspectorControls>
216
+ <PanelBody>
217
+ {Object.entries( blockArgs.attributes ).map( ( [attributeName, attributeArgs] ) => {
218
+ const ComponentControl = getComponentControl( attributeName, attributeArgs );
219
+
220
+ if ( ComponentControl ) {
221
+ return ( ComponentControl );
222
+ }
223
+ } )}
224
+ </PanelBody>
225
+ </InspectorControls>
226
+ }
227
+ {
228
+ <Shortcode attributes={attributes} blockArgs={blockArgs}/>
229
+ }
230
+ </>
231
+ );
232
+ }
233
+ }
plugin-fw/includes/builders/gutenberg/src/index.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Handle YITH Gutenberg Blocks
3
+ *
4
+ * @var {Object} yithGutenbergBlocks The Gutenberg blocks object.
5
+ */
6
+
7
+ /**
8
+ * External dependencies
9
+ */
10
+ import React from 'react';
11
+ import md5 from 'md5';
12
+
13
+ /**
14
+ * WordPress dependencies
15
+ */
16
+ import { registerBlockType } from '@wordpress/blocks';
17
+ import { RawHTML } from '@wordpress/element';
18
+
19
+ /**
20
+ * Internal dependencies
21
+ */
22
+ import { yith_icon, generateShortcode } from './common';
23
+ import { createEditFunction } from './edit';
24
+ import './common/actions-to-jquery-events';
25
+
26
+ for ( const [blockName, blockArgs] of Object.entries( yithGutenbergBlocks ) ) {
27
+ registerBlockType( 'yith/' + blockName, {
28
+ title : blockArgs.title,
29
+ description: blockArgs.description,
30
+ category : blockArgs.category,
31
+ attributes : blockArgs.attributes,
32
+ icon : typeof blockArgs.icon !== 'undefined' ? blockArgs.icon : yith_icon,
33
+ keywords : blockArgs.keywords,
34
+ edit : createEditFunction( blockName, blockArgs ),
35
+ save : ( { attributes } ) => {
36
+ return generateShortcode( blockArgs, attributes );
37
+ },
38
+ deprecated : [
39
+ {
40
+ attributes: blockArgs.attributes,
41
+ save : ( { attributes } ) => {
42
+ const shortcode = generateShortcode( blockArgs, attributes );
43
+ const blockHash = md5( shortcode );
44
+ const shortcodeSpan = '<span class="yith_block_' + blockHash + '">' + shortcode + '</span>';
45
+
46
+ return (
47
+ <RawHTML>{shortcodeSpan}</RawHTML>
48
+ )
49
+ }
50
+ }
51
+ ]
52
+ } );
53
+ }
plugin-fw/includes/class-yit-assets.php CHANGED
@@ -44,9 +44,21 @@ if ( ! class_exists( 'YIT_Assets' ) ) {
44
  */
45
  private function __construct() {
46
  $this->version = yith_plugin_fw_get_version();
 
 
 
 
47
  add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_and_scripts' ) );
48
  }
49
 
 
 
 
 
 
 
 
 
50
  /**
51
  * Register styles and scripts
52
  */
@@ -72,7 +84,7 @@ if ( ! class_exists( 'YIT_Assets' ) ) {
72
  wp_register_style( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/css/colorbox.css', array(), $this->version );
73
  wp_register_style( 'yit-upgrade-to-pro', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrade-to-pro.css', array( 'colorbox' ), $this->version );
74
  wp_register_style( 'yit-plugin-metaboxes', YIT_CORE_PLUGIN_URL . '/assets/css/metaboxes.css', array(), $this->version );
75
- wp_register_style( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/css/yith-fields.css', false, $this->version );
76
 
77
  wp_register_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700,800,900', array(), $this->version );
78
 
44
  */
45
  private function __construct() {
46
  $this->version = yith_plugin_fw_get_version();
47
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_common_scripts' ) );
48
+ add_action( 'wp_enqueue_scripts', array( $this, 'register_common_scripts' ) );
49
+ add_action( 'elementor/editor/before_enqueue_styles', array( $this, 'register_common_scripts' ) );
50
+
51
  add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_and_scripts' ) );
52
  }
53
 
54
+ /**
55
+ * Register common scripts
56
+ */
57
+ public function register_common_scripts() {
58
+ wp_register_style( 'yith-plugin-fw-icon-font', YIT_CORE_PLUGIN_URL . '/assets/css/yith-icon-font.css', array(), $this->version );
59
+ wp_register_style( 'yith-plugin-fw-elementor', YIT_CORE_PLUGIN_URL . '/assets/css/elementor.css', array(), $this->version );
60
+ }
61
+
62
  /**
63
  * Register styles and scripts
64
  */
84
  wp_register_style( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/css/colorbox.css', array(), $this->version );
85
  wp_register_style( 'yit-upgrade-to-pro', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrade-to-pro.css', array( 'colorbox' ), $this->version );
86
  wp_register_style( 'yit-plugin-metaboxes', YIT_CORE_PLUGIN_URL . '/assets/css/metaboxes.css', array(), $this->version );
87
+ wp_register_style( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/css/yith-fields.css', array( 'yith-plugin-fw-icon-font' ), $this->version );
88
 
89
  wp_register_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700,800,900', array(), $this->version );
90
 
plugin-fw/includes/class-yit-plugin-panel-woocommerce.php CHANGED
@@ -304,7 +304,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
304
  if ( version_compare( WC()->version, '2.4.0', '>=' ) ) {
305
  if ( ! empty( $yit_options[ $option_key ] ) ) {
306
  foreach ( $yit_options[ $option_key ] as $option ) {
307
- if ( isset( $option['id'] ) && isset( $_POST[ $option['id'] ], $option['type'] ) && ! in_array( $option['type'], self::$wc_type, true ) ) {
308
  $_POST[ $option['id'] ] = maybe_serialize( $_POST[ $option['id'] ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
309
  }
310
  }
@@ -511,7 +511,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
511
  * @since 2.0
512
  */
513
  public function maybe_unserialize_panel_data( $value, $option, $raw_value ) {
514
- if ( ! version_compare( WC()->version, '2.4.0', '>=' ) || ! isset( $option['type'] ) || in_array( $option['type'], self::$wc_type, true ) ) {
515
  return $value;
516
  }
517
 
@@ -532,9 +532,9 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
532
  /**
533
  * Sanitize Option
534
  *
535
- * @param mixed $value Option value.
536
- * @param mixed $option Option settings array.
537
- * @param string $raw_value Raw option value.
538
  *
539
  * @return mixed Filtered return value
540
  * @author Leanza Francesco <leanzafrancesco@gmail.com>
@@ -542,55 +542,58 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
542
  */
543
  public static function sanitize_option( $value, $option, $raw_value ) {
544
  if ( isset( $option['type'] ) && 'yith-field' === $option['type'] ) {
545
- if ( ! empty( $option['multiple'] ) && is_null( $value ) ) {
546
- $value = array();
547
- }
548
-
549
- // Sanitize the option for the checkbox field: 'yes' or 'no'.
550
- if ( isset( $option['yith-type'] ) && in_array( $option['yith-type'], array( 'checkbox', 'onoff' ), true ) ) {
551
- $value = yith_plugin_fw_is_true( $raw_value ) ? 'yes' : 'no';
552
- }
553
-
554
- if ( isset( $option['yith-type'] ) && 'checkbox-array' === $option['yith-type'] ) {
555
- $value = maybe_unserialize( $raw_value );
556
- $value = ! ! $value && is_array( $value ) ? $value : array();
557
- }
558
-
559
- if ( isset( $option['yith-type'] ) && in_array( $option['yith-type'], array( 'textarea', 'textarea-editor', 'textarea-codemirror' ), true ) ) {
560
- $value = $raw_value;
561
- }
562
-
563
- // Sanitize the option date-format when the user choose the custom option.
564
- if ( isset( $option['yith-type'] ) && in_array( $option['yith-type'], array( 'date-format' ), true ) && '\c\u\s\t\o\m' === $raw_value ) {
565
- $custom = isset( $_REQUEST[ $option['id'] . '_text' ] ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $option['id'] . '_text' ] ) ) : $option['default']; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
566
- $value = $custom;
567
- }
568
-
569
- if ( isset( $option['yith-type'] ) && in_array( $option['yith-type'], array( 'toggle-element' ), true ) ) {
570
- if ( $value && isset( $option['elements'] ) && ! empty( $option['elements'] ) ) {
571
- $value = maybe_unserialize( $value );
572
-
573
- if ( isset( $value['box_id'] ) ) {
574
- unset( $value['box_id'] );
575
  }
 
 
 
576
 
577
- foreach ( $value as $index => $single_toggle ) {
 
 
578
 
579
- if ( $value && isset( $option['onoff_field'] ) && ! empty( $option['onoff_field'] ) ) {
580
- $onoff = $option['onoff_field'];
581
- $onoff['type'] = 'yith-field';
582
- $onoff['yith-type'] = 'onoff';
583
- $onoff_id = $onoff['id'];
584
 
585
- $value[ $index ][ $onoff_id ] = isset( $single_toggle[ $onoff_id ] ) ? self::sanitize_option( $single_toggle[ $onoff_id ], $onoff, $single_toggle[ $onoff_id ] ) : 'no';
586
- }
 
 
 
 
 
 
587
 
588
- foreach ( $option['elements'] as $element ) {
589
- $element_value = isset( $value[ $index ][ $element['id'] ] ) ? $value[ $index ][ $element['id'] ] : false;
590
- $value[ $index ][ $element['id'] ] = self::sanitize_option( $element_value, $element, $element_value );
 
 
591
  }
592
  }
593
- }
 
 
 
 
594
  }
595
 
596
  if ( ! empty( $option['yith-sanitize-callback'] ) && is_callable( $option['yith-sanitize-callback'] ) ) {
@@ -598,7 +601,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
598
  }
599
  }
600
 
601
- return $value;
602
  }
603
 
604
  /**
@@ -683,6 +686,8 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
683
 
684
  $value = $new_value;
685
  }
 
 
686
  $value = self::sanitize_option( $value, $option_array[ $option_id ], $value );
687
  $updated = update_option( $option_id, $value );
688
  }
304
  if ( version_compare( WC()->version, '2.4.0', '>=' ) ) {
305
  if ( ! empty( $yit_options[ $option_key ] ) ) {
306
  foreach ( $yit_options[ $option_key ] as $option ) {
307
+ if ( isset( $option['id'] ) && isset( $_POST[ $option['id'] ], $option['type'] ) && ! in_array( $option['type'], self::$wc_type, true ) && 'yith-field' !== $option['type'] ) {
308
  $_POST[ $option['id'] ] = maybe_serialize( $_POST[ $option['id'] ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
309
  }
310
  }
511
  * @since 2.0
512
  */
513
  public function maybe_unserialize_panel_data( $value, $option, $raw_value ) {
514
+ if ( ! version_compare( WC()->version, '2.4.0', '>=' ) || ! isset( $option['type'] ) || in_array( $option['type'], self::$wc_type, true ) || 'yith-field' === $option['type'] ) {
515
  return $value;
516
  }
517
 
532
  /**
533
  * Sanitize Option
534
  *
535
+ * @param mixed $value Option value.
536
+ * @param mixed $option Option settings array.
537
+ * @param mixed $raw_value Raw option value.
538
  *
539
  * @return mixed Filtered return value
540
  * @author Leanza Francesco <leanzafrancesco@gmail.com>
542
  */
543
  public static function sanitize_option( $value, $option, $raw_value ) {
544
  if ( isset( $option['type'] ) && 'yith-field' === $option['type'] ) {
545
+ $value = $raw_value; // We need the raw value to avoid the wc_clean. Note: the raw_value is already un-slashed.
546
+ $type = isset( $option['yith-type'] ) ? $option['yith-type'] : false;
547
+ $multiple = ! empty( $option['multiple'] );
548
+
549
+ switch ( $type ) {
550
+ case 'checkbox':
551
+ case 'onoff':
552
+ $value = yith_plugin_fw_is_true( $value ) ? 'yes' : 'no';
553
+ break;
554
+ case 'checkbox-array':
555
+ $value = ! ! $value && is_array( $value ) ? $value : array();
556
+ break;
557
+ case 'select-buttons':
558
+ $value = ! empty( $value ) ? $value : array();
559
+ break;
560
+ case 'date-format':
561
+ if ( '\c\u\s\t\o\m' === $value ) {
562
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended
563
+ $custom = isset( $_REQUEST[ $option['id'] . '_text' ] ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $option['id'] . '_text' ] ) ) : $option['default'];
564
+ $value = $custom;
 
 
 
 
 
 
 
 
 
 
565
  }
566
+ break;
567
+ case 'toggle-element':
568
+ if ( $value && isset( $option['elements'] ) && ! empty( $option['elements'] ) ) {
569
 
570
+ if ( isset( $value['box_id'] ) ) {
571
+ unset( $value['box_id'] );
572
+ }
573
 
574
+ foreach ( $value as $index => $single_toggle ) {
 
 
 
 
575
 
576
+ if ( $value && isset( $option['onoff_field'] ) && ! empty( $option['onoff_field'] ) ) {
577
+ $on_off = $option['onoff_field'];
578
+ $on_off['type'] = 'yith-field';
579
+ $on_off['yith-type'] = 'onoff';
580
+ $on_off_id = $on_off['id'];
581
+
582
+ $value[ $index ][ $on_off_id ] = isset( $single_toggle[ $on_off_id ] ) ? self::sanitize_option( $single_toggle[ $on_off_id ], $on_off, $single_toggle[ $on_off_id ] ) : 'no';
583
+ }
584
 
585
+ foreach ( $option['elements'] as $element ) {
586
+ $element_value = isset( $value[ $index ][ $element['id'] ] ) ? $value[ $index ][ $element['id'] ] : false;
587
+ // We don't need to un-slash the value, since it's already un-slashed.
588
+ $value[ $index ][ $element['id'] ] = self::sanitize_option( $element_value, $element, $element_value );
589
+ }
590
  }
591
  }
592
+ break;
593
+ }
594
+
595
+ if ( $multiple && empty( $value ) ) {
596
+ $value = array();
597
  }
598
 
599
  if ( ! empty( $option['yith-sanitize-callback'] ) && is_callable( $option['yith-sanitize-callback'] ) ) {
601
  }
602
  }
603
 
604
+ return apply_filters( 'yith_plugin_fw_wc_panel_sanitize_option', $value, $option, $raw_value );
605
  }
606
 
607
  /**
686
 
687
  $value = $new_value;
688
  }
689
+
690
+ $value = wp_unslash( $value ); // The value must be un-slashed before using it in self::sanitize_option.
691
  $value = self::sanitize_option( $value, $option_array[ $option_id ], $value );
692
  $updated = update_option( $option_id, $value );
693
  }
plugin-fw/includes/class-yit-plugin-panel.php CHANGED
@@ -1330,7 +1330,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
1330
  ?>
1331
  <?php if ( $this->is_free() && isset( $this->settings['plugin_slug'] ) ) : ?>
1332
  <?php
1333
- $rate_link = apply_filters( 'yith_plugin_fw_rate_url', 'https://wordpress.org/support/plugin/' . $this->settings['plugin_slug'] . '/reviews/?rate=5#new-post' );
1334
  ?>
1335
  <h1 class="notice-container"></h1>
1336
  <div class="yith-plugin-fw-banner">
1330
  ?>
1331
  <?php if ( $this->is_free() && isset( $this->settings['plugin_slug'] ) ) : ?>
1332
  <?php
1333
+ $rate_link = apply_filters( 'yith_plugin_fw_rate_url', 'https://wordpress.org/support/plugin/' . $this->settings['plugin_slug'] . '/reviews/#new-post' );
1334
  ?>
1335
  <h1 class="notice-container"></h1>
1336
  <div class="yith-plugin-fw-banner">
plugin-fw/includes/class-yit-pointers.php CHANGED
@@ -78,7 +78,7 @@ if ( ! class_exists( 'YIT_Pointers' ) ) {
78
  private function __construct() {
79
 
80
  $title = __( 'Plugins Activated', 'yith-plugin-fw' );
81
- $message = __( 'From now on, you can find all plugin options in YITH Plugins menu. Plugin customization settings will be available as a new entry in YITH Plugins menu.', 'yith-plugin-fw' );
82
  $discover_message = sprintf(
83
  // translators: 1. YITH site link; 2. WordPress site link.
84
  __( 'Discover all our plugins available on: %1$s and %2$s', 'yith-plugin-fw' ),
@@ -94,7 +94,7 @@ if ( ! class_exists( 'YIT_Pointers' ) ) {
94
  );
95
 
96
  $title = __( 'Plugins Upgraded', 'yith-plugin-fw' );
97
- $message = __( 'From now on, you can find the option panel of YITH plugins in YITH Plugins menu. Every time one of our plugins is added, a new entry will be added to this menu. For example, after the update, plugin options (such as for YITH WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from previous location to YITH Plugins tab.', 'yith-plugin-fw' );
98
  $discover_message = sprintf(
99
  // translators: 1. YITH site link; 2. WordPress site link.
100
  __( 'Discover all our plugins available on: %1$s and %2$s', 'yith-plugin-fw' ),
78
  private function __construct() {
79
 
80
  $title = __( 'Plugins Activated', 'yith-plugin-fw' );
81
+ $message = __( 'From now on, you can find all plugin options in YITH menu. Plugin customization settings will be available as a new entry in YITH menu.', 'yith-plugin-fw' );
82
  $discover_message = sprintf(
83
  // translators: 1. YITH site link; 2. WordPress site link.
84
  __( 'Discover all our plugins available on: %1$s and %2$s', 'yith-plugin-fw' ),
94
  );
95
 
96
  $title = __( 'Plugins Upgraded', 'yith-plugin-fw' );
97
+ $message = __( 'From now on, you can find the option panel of YITH plugins in YITH menu. Every time one of our plugins is added, a new entry will be added to this menu. For example, after the update, plugin options (such as for YITH WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from previous location to YITH menu.', 'yith-plugin-fw' );
98
  $discover_message = sprintf(
99
  // translators: 1. YITH site link; 2. WordPress site link.
100
  __( 'Discover all our plugins available on: %1$s and %2$s', 'yith-plugin-fw' ),
plugin-fw/includes/class-yith-system-status.php CHANGED
@@ -182,8 +182,8 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
182
  $this->add_requirements(
183
  esc_html__( 'YITH Plugins', 'yith-plugin-fw' ),
184
  array(
185
- 'min_wp_version' => '5.3',
186
- 'min_wc_version' => '4.2',
187
  'min_php_version' => '5.6.20',
188
  )
189
  );
182
  $this->add_requirements(
183
  esc_html__( 'YITH Plugins', 'yith-plugin-fw' ),
184
  array(
185
+ 'min_wp_version' => '5.4',
186
+ 'min_wc_version' => '4.5',
187
  'min_php_version' => '5.6.20',
188
  )
189
  );
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.5.4
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author YITH
10
- * @version 3.5.4
11
  * @package YITH\PluginFramework
12
  */
13
 
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.6.0
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author YITH
10
+ * @version 3.6.0
11
  * @package YITH\PluginFramework
12
  */
13
 
plugin-fw/languages/yith-plugin-fw-el.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-el.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2021-02-03 16:08:01+00:00\n"
8
- "PO-Revision-Date: 2020-09-25 09:16:07+0000\n"
9
  "Language: el_GR\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -13,27 +13,27 @@ msgstr ""
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
- #: includes/class-yit-assets.php:117
17
  msgid "Clear"
18
  msgstr "Καθαρισμός"
19
 
20
- #: includes/class-yit-assets.php:118
21
  msgid "Clear color"
22
  msgstr "Καθαρισμός χρώματος"
23
 
24
- #: includes/class-yit-assets.php:119
25
  msgid "Default"
26
  msgstr "Προεπιλεγμένο"
27
 
28
- #: includes/class-yit-assets.php:120
29
  msgid "Select default color"
30
  msgstr "Επιλογή προεπιλεγμένου χρώματος"
31
 
32
- #: includes/class-yit-assets.php:121
33
  msgid "Select Color"
34
  msgstr "Επιλογή Χρώματος"
35
 
36
- #: includes/class-yit-assets.php:122
37
  msgid "Color value"
38
  msgstr "Αξία χρώματος"
39
 
@@ -146,14 +146,14 @@ msgstr "Ενεργοποιημένα Πρόσθετα"
146
 
147
  #: includes/class-yit-pointers.php:81
148
  msgid ""
149
- "From now on, you can find all plugin options in YITH Plugins menu. Plugin "
150
- "customization settings will be available as a new entry in YITH Plugins menu."
151
  msgstr ""
152
 
153
  #. translators: 1. YITH site link; 2. WordPress site link.
154
  #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
155
  msgid "Discover all our plugins available on: %1$s and %2$s"
156
- msgstr ""
157
 
158
  #: includes/class-yit-pointers.php:96
159
  msgid "Plugins Upgraded"
@@ -161,11 +161,11 @@ msgstr "Αναβαθμισμένα Πρόσθετα"
161
 
162
  #: includes/class-yit-pointers.php:97
163
  msgid ""
164
- "From now on, you can find the option panel of YITH plugins in YITH Plugins "
165
- "menu. Every time one of our plugins is added, a new entry will be added to "
166
- "this menu. For example, after the update, plugin options (such as for YITH "
167
  "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
168
- "previous location to YITH Plugins tab."
169
  msgstr ""
170
 
171
  #: includes/class-yith-dashboard.php:35
@@ -419,7 +419,7 @@ msgstr "Προσαρμογή:"
419
 
420
  #: templates/fields/date-format.php:70
421
  msgid "Preview:"
422
- msgstr ""
423
 
424
  #: templates/fields/icons.php:63
425
  msgid "Set Default"
@@ -492,12 +492,12 @@ msgstr "Επαναφορά Προεπιλεγμένων"
492
 
493
  #: templates/sysinfo/system-information-panel.php:12
494
  msgid "PHPInfo"
495
- msgstr ""
496
 
497
  #: templates/sysinfo/system-information-panel.php:13
498
  #: templates/sysinfo/tabs/error-log.php:25
499
  msgid "Log Files"
500
- msgstr ""
501
 
502
  #: templates/sysinfo/system-information-panel.php:22
503
  msgid "YITH System Information"
@@ -513,11 +513,12 @@ msgstr "Αρχείο PHP error_log"
513
 
514
  #: templates/sysinfo/tabs/error-log.php:60
515
  msgid "Download"
516
- msgstr ""
517
 
518
  #: templates/sysinfo/tabs/error-log.php:72
519
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
520
  msgstr ""
 
521
 
522
  #. translators: %s file name.
523
  #: templates/sysinfo/tabs/error-log.php:96
@@ -525,18 +526,20 @@ msgid ""
525
  "No Log file available. Enable the WordPress debug by adding this in the %s "
526
  "file of your installation"
527
  msgstr ""
 
 
528
 
529
  #: templates/sysinfo/tabs/error-log.php:105
530
  msgid "Copied!"
531
- msgstr ""
532
 
533
  #: templates/sysinfo/tabs/error-log.php:105
534
  msgid "Copy Code"
535
- msgstr ""
536
 
537
  #: templates/sysinfo/tabs/main.php:15
538
  msgid "Site Info"
539
- msgstr ""
540
 
541
  #: templates/sysinfo/tabs/main.php:20
542
  msgid "Site URL"
@@ -560,13 +563,13 @@ msgstr "Όχι"
560
 
561
  #: templates/sysinfo/tabs/main.php:45
562
  msgid "External object cache"
563
- msgstr ""
564
 
565
  #: templates/sysinfo/tabs/main.php:54
566
  msgid "Plugins Requirements"
567
- msgstr ""
568
 
569
- #: yit-plugin.php:187
570
  msgid "License"
571
  msgstr "Άδεια χρήσης προϊόντος"
572
 
@@ -574,6 +577,17 @@ msgstr "Άδεια χρήσης προϊόντος"
574
  msgid "YITH"
575
  msgstr "YITH"
576
 
 
 
 
 
 
 
 
 
 
 
 
577
  #: includes/class-yith-dashboard.php:96
578
  msgctxt "Plugin FW"
579
  msgid "View Changelog"
@@ -589,11 +603,6 @@ msgctxt "Button label"
589
  msgid "Close"
590
  msgstr "Απενεργοποίηση"
591
 
592
- #: includes/class-yith-gutenberg.php:131
593
- msgctxt "[gutenberg]: Category Name"
594
- msgid "YITH"
595
- msgstr "YITH"
596
-
597
  #: includes/privacy/class-yith-privacy.php:61
598
  msgctxt "Privacy Policy Guide Title"
599
  msgid "YITH Plugins"
@@ -658,7 +667,7 @@ msgctxt "Position in the \"Dimensions\" field"
658
  msgid "Left"
659
  msgstr "Αριστερά"
660
 
661
- #: templates/fields/dimensions.php:88
662
  msgctxt "Tooltip in the \"Dimensions\" field"
663
  msgid "Link values together"
664
  msgstr "Συνδέστε αξίες"
@@ -666,34 +675,34 @@ msgstr "Συνδέστε αξίες"
666
  #: templates/fields/onoff.php:28
667
  msgctxt "YES/NO button: use MAX 4 characters!"
668
  msgid "YES"
669
- msgstr ""
670
 
671
  #: templates/fields/onoff.php:29
672
  msgctxt "YES/NO button: use MAX 4 characters!"
673
  msgid "NO"
674
- msgstr ""
675
 
676
- #: yit-plugin.php:75
677
  msgctxt "Plugin Row Meta"
678
  msgid "Live Demo"
679
  msgstr "Live Demo"
680
 
681
- #: yit-plugin.php:79
682
  msgctxt "Plugin Row Meta"
683
  msgid "Documentation"
684
  msgstr "Εγχειρίδιο χρήσης"
685
 
686
- #: yit-plugin.php:83
687
  msgctxt "Plugin Row Meta"
688
  msgid "Support"
689
  msgstr "Υποστήριξη"
690
 
691
- #: yit-plugin.php:87
692
  msgctxt "Plugin Row Meta"
693
  msgid "Premium version"
694
  msgstr "Premium έκδοση"
695
 
696
- #: yit-plugin.php:183
697
  msgctxt "Action links"
698
  msgid "Settings"
699
  msgstr "Ρυθμίσεις"
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2021-02-23 14:12:38+00:00\n"
8
+ "PO-Revision-Date: 2021-02-11 18:07:46+0000\n"
9
  "Language: el_GR\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
+ #: includes/class-yit-assets.php:129
17
  msgid "Clear"
18
  msgstr "Καθαρισμός"
19
 
20
+ #: includes/class-yit-assets.php:130
21
  msgid "Clear color"
22
  msgstr "Καθαρισμός χρώματος"
23
 
24
+ #: includes/class-yit-assets.php:131
25
  msgid "Default"
26
  msgstr "Προεπιλεγμένο"
27
 
28
+ #: includes/class-yit-assets.php:132
29
  msgid "Select default color"
30
  msgstr "Επιλογή προεπιλεγμένου χρώματος"
31
 
32
+ #: includes/class-yit-assets.php:133
33
  msgid "Select Color"
34
  msgstr "Επιλογή Χρώματος"
35
 
36
+ #: includes/class-yit-assets.php:134
37
  msgid "Color value"
38
  msgstr "Αξία χρώματος"
39
 
146
 
147
  #: includes/class-yit-pointers.php:81
148
  msgid ""
149
+ "From now on, you can find all plugin options in YITH menu. Plugin "
150
+ "customization settings will be available as a new entry in YITH menu."
151
  msgstr ""
152
 
153
  #. translators: 1. YITH site link; 2. WordPress site link.
154
  #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
155
  msgid "Discover all our plugins available on: %1$s and %2$s"
156
+ msgstr "Ανακαλύψτε όλα τα διαθέσιμά μας πρόσθετα στο: %1$s και %2$s"
157
 
158
  #: includes/class-yit-pointers.php:96
159
  msgid "Plugins Upgraded"
161
 
162
  #: includes/class-yit-pointers.php:97
163
  msgid ""
164
+ "From now on, you can find the option panel of YITH plugins in YITH menu. "
165
+ "Every time one of our plugins is added, a new entry will be added to this "
166
+ "menu. For example, after the update, plugin options (such as for YITH "
167
  "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
168
+ "previous location to YITH menu."
169
  msgstr ""
170
 
171
  #: includes/class-yith-dashboard.php:35
419
 
420
  #: templates/fields/date-format.php:70
421
  msgid "Preview:"
422
+ msgstr "Προεπισκόπηση:"
423
 
424
  #: templates/fields/icons.php:63
425
  msgid "Set Default"
492
 
493
  #: templates/sysinfo/system-information-panel.php:12
494
  msgid "PHPInfo"
495
+ msgstr "PHPInfo"
496
 
497
  #: templates/sysinfo/system-information-panel.php:13
498
  #: templates/sysinfo/tabs/error-log.php:25
499
  msgid "Log Files"
500
+ msgstr "Αρχεία Καταγραφής"
501
 
502
  #: templates/sysinfo/system-information-panel.php:22
503
  msgid "YITH System Information"
513
 
514
  #: templates/sysinfo/tabs/error-log.php:60
515
  msgid "Download"
516
+ msgstr "Κατέβασμα"
517
 
518
  #: templates/sysinfo/tabs/error-log.php:72
519
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
520
  msgstr ""
521
+ "Το μέγεθος αρχείου υπερβαίνει τα 8 megabytes οπότε θα πρέπει να το κατεβάσετε"
522
 
523
  #. translators: %s file name.
524
  #: templates/sysinfo/tabs/error-log.php:96
526
  "No Log file available. Enable the WordPress debug by adding this in the %s "
527
  "file of your installation"
528
  msgstr ""
529
+ "Δεν υπάρχει διαθέσιμο αρχείο Καταγραφής. Ενεργοποιήστε την αποσφαλμάτωση "
530
+ "WordPress προσθέτοντάς το στο αρχείο %s της εγκατάστασής σας"
531
 
532
  #: templates/sysinfo/tabs/error-log.php:105
533
  msgid "Copied!"
534
+ msgstr "Έγινε αντιγραφή!"
535
 
536
  #: templates/sysinfo/tabs/error-log.php:105
537
  msgid "Copy Code"
538
+ msgstr "Αντιγραφή Κώδικα"
539
 
540
  #: templates/sysinfo/tabs/main.php:15
541
  msgid "Site Info"
542
+ msgstr "Στοιχεία Ιστότοπου"
543
 
544
  #: templates/sysinfo/tabs/main.php:20
545
  msgid "Site URL"
563
 
564
  #: templates/sysinfo/tabs/main.php:45
565
  msgid "External object cache"
566
+ msgstr "Cache εξωτερικού αντικειμένου"
567
 
568
  #: templates/sysinfo/tabs/main.php:54
569
  msgid "Plugins Requirements"
570
+ msgstr "Προϋποθέσεις Πρόσθετων"
571
 
572
+ #: yit-plugin.php:190
573
  msgid "License"
574
  msgstr "Άδεια χρήσης προϊόντος"
575
 
577
  msgid "YITH"
578
  msgstr "YITH"
579
 
580
+ #. translators: %s it the Elementor Widget title.
581
+ #: includes/builders/elementor/class-yith-elementor-widget.php:252
582
+ msgctxt "Elementor Widget - section title"
583
+ msgid "%s - Options"
584
+ msgstr ""
585
+
586
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:147
587
+ msgctxt "[gutenberg]: Category Name"
588
+ msgid "YITH"
589
+ msgstr "YITH"
590
+
591
  #: includes/class-yith-dashboard.php:96
592
  msgctxt "Plugin FW"
593
  msgid "View Changelog"
603
  msgid "Close"
604
  msgstr "Απενεργοποίηση"
605
 
 
 
 
 
 
606
  #: includes/privacy/class-yith-privacy.php:61
607
  msgctxt "Privacy Policy Guide Title"
608
  msgid "YITH Plugins"
667
  msgid "Left"
668
  msgstr "Αριστερά"
669
 
670
+ #: templates/fields/dimensions.php:94
671
  msgctxt "Tooltip in the \"Dimensions\" field"
672
  msgid "Link values together"
673
  msgstr "Συνδέστε αξίες"
675
  #: templates/fields/onoff.php:28
676
  msgctxt "YES/NO button: use MAX 4 characters!"
677
  msgid "YES"
678
+ msgstr "ΝΑΙ"
679
 
680
  #: templates/fields/onoff.php:29
681
  msgctxt "YES/NO button: use MAX 4 characters!"
682
  msgid "NO"
683
+ msgstr "ΟΧΙ"
684
 
685
+ #: yit-plugin.php:78
686
  msgctxt "Plugin Row Meta"
687
  msgid "Live Demo"
688
  msgstr "Live Demo"
689
 
690
+ #: yit-plugin.php:82
691
  msgctxt "Plugin Row Meta"
692
  msgid "Documentation"
693
  msgstr "Εγχειρίδιο χρήσης"
694
 
695
+ #: yit-plugin.php:86
696
  msgctxt "Plugin Row Meta"
697
  msgid "Support"
698
  msgstr "Υποστήριξη"
699
 
700
+ #: yit-plugin.php:90
701
  msgctxt "Plugin Row Meta"
702
  msgid "Premium version"
703
  msgstr "Premium έκδοση"
704
 
705
+ #: yit-plugin.php:186
706
  msgctxt "Action links"
707
  msgid "Settings"
708
  msgstr "Ρυθμίσεις"
plugin-fw/languages/yith-plugin-fw-es_ES.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-es_ES.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2021-02-03 16:08:01+00:00\n"
8
- "PO-Revision-Date: 2021-01-19 14:22:57+0000\n"
9
  "Language: es\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -13,27 +13,27 @@ msgstr ""
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
- #: includes/class-yit-assets.php:117
17
  msgid "Clear"
18
  msgstr "Borrar"
19
 
20
- #: includes/class-yit-assets.php:118
21
  msgid "Clear color"
22
  msgstr "Borrar color"
23
 
24
- #: includes/class-yit-assets.php:119
25
  msgid "Default"
26
  msgstr "Predeterminado"
27
 
28
- #: includes/class-yit-assets.php:120
29
  msgid "Select default color"
30
  msgstr "Seleccionar color predeterminado"
31
 
32
- #: includes/class-yit-assets.php:121
33
  msgid "Select Color"
34
  msgstr "Seleccionar color"
35
 
36
- #: includes/class-yit-assets.php:122
37
  msgid "Color value"
38
  msgstr "Valor del color"
39
 
@@ -146,14 +146,17 @@ msgstr "Plugins activados"
146
 
147
  #: includes/class-yit-pointers.php:81
148
  msgid ""
149
- "From now on, you can find all plugin options in YITH Plugins menu. Plugin "
150
- "customization settings will be available as a new entry in YITH Plugins menu."
151
  msgstr ""
 
 
 
152
 
153
  #. translators: 1. YITH site link; 2. WordPress site link.
154
  #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
155
  msgid "Discover all our plugins available on: %1$s and %2$s"
156
- msgstr ""
157
 
158
  #: includes/class-yit-pointers.php:96
159
  msgid "Plugins Upgraded"
@@ -161,12 +164,18 @@ msgstr "Plugins mejorados"
161
 
162
  #: includes/class-yit-pointers.php:97
163
  msgid ""
164
- "From now on, you can find the option panel of YITH plugins in YITH Plugins "
165
- "menu. Every time one of our plugins is added, a new entry will be added to "
166
- "this menu. For example, after the update, plugin options (such as for YITH "
167
  "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
168
- "previous location to YITH Plugins tab."
169
  msgstr ""
 
 
 
 
 
 
170
 
171
  #: includes/class-yith-dashboard.php:35
172
  msgid "YITH Latest Updates"
@@ -417,7 +426,7 @@ msgstr "Personalizado:"
417
 
418
  #: templates/fields/date-format.php:70
419
  msgid "Preview:"
420
- msgstr ""
421
 
422
  #: templates/fields/icons.php:63
423
  msgid "Set Default"
@@ -490,12 +499,12 @@ msgstr "Restablecer valores predeterminados"
490
 
491
  #: templates/sysinfo/system-information-panel.php:12
492
  msgid "PHPInfo"
493
- msgstr ""
494
 
495
  #: templates/sysinfo/system-information-panel.php:13
496
  #: templates/sysinfo/tabs/error-log.php:25
497
  msgid "Log Files"
498
- msgstr ""
499
 
500
  #: templates/sysinfo/system-information-panel.php:22
501
  msgid "YITH System Information"
@@ -511,11 +520,11 @@ msgstr "Archivo PHP error_log"
511
 
512
  #: templates/sysinfo/tabs/error-log.php:60
513
  msgid "Download"
514
- msgstr ""
515
 
516
  #: templates/sysinfo/tabs/error-log.php:72
517
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
518
- msgstr ""
519
 
520
  #. translators: %s file name.
521
  #: templates/sysinfo/tabs/error-log.php:96
@@ -523,18 +532,20 @@ msgid ""
523
  "No Log file available. Enable the WordPress debug by adding this in the %s "
524
  "file of your installation"
525
  msgstr ""
 
 
526
 
527
  #: templates/sysinfo/tabs/error-log.php:105
528
  msgid "Copied!"
529
- msgstr ""
530
 
531
  #: templates/sysinfo/tabs/error-log.php:105
532
  msgid "Copy Code"
533
- msgstr ""
534
 
535
  #: templates/sysinfo/tabs/main.php:15
536
  msgid "Site Info"
537
- msgstr ""
538
 
539
  #: templates/sysinfo/tabs/main.php:20
540
  msgid "Site URL"
@@ -558,13 +569,13 @@ msgstr "No"
558
 
559
  #: templates/sysinfo/tabs/main.php:45
560
  msgid "External object cache"
561
- msgstr ""
562
 
563
  #: templates/sysinfo/tabs/main.php:54
564
  msgid "Plugins Requirements"
565
- msgstr ""
566
 
567
- #: yit-plugin.php:187
568
  msgid "License"
569
  msgstr "Licencia"
570
 
@@ -572,6 +583,17 @@ msgstr "Licencia"
572
  msgid "YITH"
573
  msgstr "YITH"
574
 
 
 
 
 
 
 
 
 
 
 
 
575
  #: includes/class-yith-dashboard.php:96
576
  msgctxt "Plugin FW"
577
  msgid "View Changelog"
@@ -587,11 +609,6 @@ msgctxt "Button label"
587
  msgid "Close"
588
  msgstr "Cerrar"
589
 
590
- #: includes/class-yith-gutenberg.php:131
591
- msgctxt "[gutenberg]: Category Name"
592
- msgid "YITH"
593
- msgstr "YITH"
594
-
595
  #: includes/privacy/class-yith-privacy.php:61
596
  msgctxt "Privacy Policy Guide Title"
597
  msgid "YITH Plugins"
@@ -654,7 +671,7 @@ msgctxt "Position in the \"Dimensions\" field"
654
  msgid "Left"
655
  msgstr "Izquierda"
656
 
657
- #: templates/fields/dimensions.php:88
658
  msgctxt "Tooltip in the \"Dimensions\" field"
659
  msgid "Link values together"
660
  msgstr "Enlazar valores juntos"
@@ -662,34 +679,34 @@ msgstr "Enlazar valores juntos"
662
  #: templates/fields/onoff.php:28
663
  msgctxt "YES/NO button: use MAX 4 characters!"
664
  msgid "YES"
665
- msgstr ""
666
 
667
  #: templates/fields/onoff.php:29
668
  msgctxt "YES/NO button: use MAX 4 characters!"
669
  msgid "NO"
670
- msgstr ""
671
 
672
- #: yit-plugin.php:75
673
  msgctxt "Plugin Row Meta"
674
  msgid "Live Demo"
675
  msgstr "Demostración en vivo"
676
 
677
- #: yit-plugin.php:79
678
  msgctxt "Plugin Row Meta"
679
  msgid "Documentation"
680
  msgstr "Documentación"
681
 
682
- #: yit-plugin.php:83
683
  msgctxt "Plugin Row Meta"
684
  msgid "Support"
685
  msgstr "Soporte"
686
 
687
- #: yit-plugin.php:87
688
  msgctxt "Plugin Row Meta"
689
  msgid "Premium version"
690
  msgstr "Versión premium"
691
 
692
- #: yit-plugin.php:183
693
  msgctxt "Action links"
694
  msgid "Settings"
695
  msgstr "Ajustes"
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2021-02-23 14:12:38+00:00\n"
8
+ "PO-Revision-Date: 2021-02-15 20:26:24+0000\n"
9
  "Language: es\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
+ #: includes/class-yit-assets.php:129
17
  msgid "Clear"
18
  msgstr "Borrar"
19
 
20
+ #: includes/class-yit-assets.php:130
21
  msgid "Clear color"
22
  msgstr "Borrar color"
23
 
24
+ #: includes/class-yit-assets.php:131
25
  msgid "Default"
26
  msgstr "Predeterminado"
27
 
28
+ #: includes/class-yit-assets.php:132
29
  msgid "Select default color"
30
  msgstr "Seleccionar color predeterminado"
31
 
32
+ #: includes/class-yit-assets.php:133
33
  msgid "Select Color"
34
  msgstr "Seleccionar color"
35
 
36
+ #: includes/class-yit-assets.php:134
37
  msgid "Color value"
38
  msgstr "Valor del color"
39
 
146
 
147
  #: includes/class-yit-pointers.php:81
148
  msgid ""
149
+ "From now on, you can find all plugin options in YITH menu. Plugin "
150
+ "customization settings will be available as a new entry in YITH menu."
151
  msgstr ""
152
+ "Desde ahora, puedes encontrar todas las opciones de los plugins en el menú "
153
+ "YITH plugins. La personalización de los ajustes del plugins estará "
154
+ "disponible como una nueva entrada en el menú YITH plugins."
155
 
156
  #. translators: 1. YITH site link; 2. WordPress site link.
157
  #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
158
  msgid "Discover all our plugins available on: %1$s and %2$s"
159
+ msgstr "Descubre todos nuestros plugins disponibles en: %1$s y %2$s"
160
 
161
  #: includes/class-yit-pointers.php:96
162
  msgid "Plugins Upgraded"
164
 
165
  #: includes/class-yit-pointers.php:97
166
  msgid ""
167
+ "From now on, you can find the option panel of YITH plugins in YITH menu. "
168
+ "Every time one of our plugins is added, a new entry will be added to this "
169
+ "menu. For example, after the update, plugin options (such as for YITH "
170
  "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
171
+ "previous location to YITH menu."
172
  msgstr ""
173
+ "Desde ahora puedes encontrar la opción en el panel de Plugins de YITH en el "
174
+ "menú YITH plugins. Cada vez que uno de nuestros plugins es añadido, una "
175
+ "nueva entrada será añadida a este menú. Por ejemplo, tras la actualización, "
176
+ "las opciones de los plugins (tales como YITH WooCommerce Wishlist, YITH "
177
+ "WooCommerce Ajax Search, etc.) serán movidos de la ubicación previa a la "
178
+ "pestaña de YITH plugins."
179
 
180
  #: includes/class-yith-dashboard.php:35
181
  msgid "YITH Latest Updates"
426
 
427
  #: templates/fields/date-format.php:70
428
  msgid "Preview:"
429
+ msgstr "Vista previa:"
430
 
431
  #: templates/fields/icons.php:63
432
  msgid "Set Default"
499
 
500
  #: templates/sysinfo/system-information-panel.php:12
501
  msgid "PHPInfo"
502
+ msgstr "Información PHP"
503
 
504
  #: templates/sysinfo/system-information-panel.php:13
505
  #: templates/sysinfo/tabs/error-log.php:25
506
  msgid "Log Files"
507
+ msgstr "Archivos de registro"
508
 
509
  #: templates/sysinfo/system-information-panel.php:22
510
  msgid "YITH System Information"
520
 
521
  #: templates/sysinfo/tabs/error-log.php:60
522
  msgid "Download"
523
+ msgstr "Descargar"
524
 
525
  #: templates/sysinfo/tabs/error-log.php:72
526
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
527
+ msgstr "El archivo excede los 8 megabytes por lo que debe ser descargado"
528
 
529
  #. translators: %s file name.
530
  #: templates/sysinfo/tabs/error-log.php:96
532
  "No Log file available. Enable the WordPress debug by adding this in the %s "
533
  "file of your installation"
534
  msgstr ""
535
+ "No hay archivo de registro disponible. Activa la depuración de WordPress "
536
+ "añadiendo esto en el archivo %s de tu instalación"
537
 
538
  #: templates/sysinfo/tabs/error-log.php:105
539
  msgid "Copied!"
540
+ msgstr "¡Copiado!"
541
 
542
  #: templates/sysinfo/tabs/error-log.php:105
543
  msgid "Copy Code"
544
+ msgstr "Copiar código"
545
 
546
  #: templates/sysinfo/tabs/main.php:15
547
  msgid "Site Info"
548
+ msgstr "Información del sitio"
549
 
550
  #: templates/sysinfo/tabs/main.php:20
551
  msgid "Site URL"
569
 
570
  #: templates/sysinfo/tabs/main.php:45
571
  msgid "External object cache"
572
+ msgstr "Caché objeto externo"
573
 
574
  #: templates/sysinfo/tabs/main.php:54
575
  msgid "Plugins Requirements"
576
+ msgstr "Requerimientos de los plugins"
577
 
578
+ #: yit-plugin.php:190
579
  msgid "License"
580
  msgstr "Licencia"
581
 
583
  msgid "YITH"
584
  msgstr "YITH"
585
 
586
+ #. translators: %s it the Elementor Widget title.
587
+ #: includes/builders/elementor/class-yith-elementor-widget.php:252
588
+ msgctxt "Elementor Widget - section title"
589
+ msgid "%s - Options"
590
+ msgstr ""
591
+
592
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:147
593
+ msgctxt "[gutenberg]: Category Name"
594
+ msgid "YITH"
595
+ msgstr "YITH"
596
+
597
  #: includes/class-yith-dashboard.php:96
598
  msgctxt "Plugin FW"
599
  msgid "View Changelog"
609
  msgid "Close"
610
  msgstr "Cerrar"
611
 
 
 
 
 
 
612
  #: includes/privacy/class-yith-privacy.php:61
613
  msgctxt "Privacy Policy Guide Title"
614
  msgid "YITH Plugins"
671
  msgid "Left"
672
  msgstr "Izquierda"
673
 
674
+ #: templates/fields/dimensions.php:94
675
  msgctxt "Tooltip in the \"Dimensions\" field"
676
  msgid "Link values together"
677
  msgstr "Enlazar valores juntos"
679
  #: templates/fields/onoff.php:28
680
  msgctxt "YES/NO button: use MAX 4 characters!"
681
  msgid "YES"
682
+ msgstr ""
683
 
684
  #: templates/fields/onoff.php:29
685
  msgctxt "YES/NO button: use MAX 4 characters!"
686
  msgid "NO"
687
+ msgstr "NO"
688
 
689
+ #: yit-plugin.php:78
690
  msgctxt "Plugin Row Meta"
691
  msgid "Live Demo"
692
  msgstr "Demostración en vivo"
693
 
694
+ #: yit-plugin.php:82
695
  msgctxt "Plugin Row Meta"
696
  msgid "Documentation"
697
  msgstr "Documentación"
698
 
699
+ #: yit-plugin.php:86
700
  msgctxt "Plugin Row Meta"
701
  msgid "Support"
702
  msgstr "Soporte"
703
 
704
+ #: yit-plugin.php:90
705
  msgctxt "Plugin Row Meta"
706
  msgid "Premium version"
707
  msgstr "Versión premium"
708
 
709
+ #: yit-plugin.php:186
710
  msgctxt "Action links"
711
  msgid "Settings"
712
  msgstr "Ajustes"
plugin-fw/languages/yith-plugin-fw-it_IT.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-it_IT.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2021-02-03 16:08:01+00:00\n"
8
- "PO-Revision-Date: 2020-09-24 14:56:37+0000\n"
9
  "Language: it\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -13,27 +13,27 @@ msgstr ""
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
- #: includes/class-yit-assets.php:117
17
  msgid "Clear"
18
  msgstr "Rimuovi"
19
 
20
- #: includes/class-yit-assets.php:118
21
  msgid "Clear color"
22
  msgstr "Rimuovi colore"
23
 
24
- #: includes/class-yit-assets.php:119
25
  msgid "Default"
26
  msgstr "Predefinito"
27
 
28
- #: includes/class-yit-assets.php:120
29
  msgid "Select default color"
30
  msgstr "Seleziona il colore predefinito"
31
 
32
- #: includes/class-yit-assets.php:121
33
  msgid "Select Color"
34
  msgstr "Seleziona il colore"
35
 
36
- #: includes/class-yit-assets.php:122
37
  msgid "Color value"
38
  msgstr "Valore del colore"
39
 
@@ -144,14 +144,17 @@ msgstr "Plugin attivati"
144
 
145
  #: includes/class-yit-pointers.php:81
146
  msgid ""
147
- "From now on, you can find all plugin options in YITH Plugins menu. Plugin "
148
- "customization settings will be available as a new entry in YITH Plugins menu."
149
  msgstr ""
 
 
 
150
 
151
  #. translators: 1. YITH site link; 2. WordPress site link.
152
  #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
153
  msgid "Discover all our plugins available on: %1$s and %2$s"
154
- msgstr ""
155
 
156
  #: includes/class-yit-pointers.php:96
157
  msgid "Plugins Upgraded"
@@ -159,12 +162,17 @@ msgstr "Plugin aggiornati"
159
 
160
  #: includes/class-yit-pointers.php:97
161
  msgid ""
162
- "From now on, you can find the option panel of YITH plugins in YITH Plugins "
163
- "menu. Every time one of our plugins is added, a new entry will be added to "
164
- "this menu. For example, after the update, plugin options (such as for YITH "
165
  "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
166
- "previous location to YITH Plugins tab."
167
  msgstr ""
 
 
 
 
 
168
 
169
  #: includes/class-yith-dashboard.php:35
170
  msgid "YITH Latest Updates"
@@ -416,7 +424,7 @@ msgstr "Personalizzato:"
416
 
417
  #: templates/fields/date-format.php:70
418
  msgid "Preview:"
419
- msgstr ""
420
 
421
  #: templates/fields/icons.php:63
422
  msgid "Set Default"
@@ -489,12 +497,12 @@ msgstr "Ripristina impostazioni iniziali"
489
 
490
  #: templates/sysinfo/system-information-panel.php:12
491
  msgid "PHPInfo"
492
- msgstr ""
493
 
494
  #: templates/sysinfo/system-information-panel.php:13
495
  #: templates/sysinfo/tabs/error-log.php:25
496
  msgid "Log Files"
497
- msgstr ""
498
 
499
  #: templates/sysinfo/system-information-panel.php:22
500
  msgid "YITH System Information"
@@ -510,11 +518,13 @@ msgstr "PHP error_log file"
510
 
511
  #: templates/sysinfo/tabs/error-log.php:60
512
  msgid "Download"
513
- msgstr ""
514
 
515
  #: templates/sysinfo/tabs/error-log.php:72
516
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
517
  msgstr ""
 
 
518
 
519
  #. translators: %s file name.
520
  #: templates/sysinfo/tabs/error-log.php:96
@@ -522,18 +532,20 @@ msgid ""
522
  "No Log file available. Enable the WordPress debug by adding this in the %s "
523
  "file of your installation"
524
  msgstr ""
 
 
525
 
526
  #: templates/sysinfo/tabs/error-log.php:105
527
  msgid "Copied!"
528
- msgstr ""
529
 
530
  #: templates/sysinfo/tabs/error-log.php:105
531
  msgid "Copy Code"
532
- msgstr ""
533
 
534
  #: templates/sysinfo/tabs/main.php:15
535
  msgid "Site Info"
536
- msgstr ""
537
 
538
  #: templates/sysinfo/tabs/main.php:20
539
  msgid "Site URL"
@@ -557,13 +569,13 @@ msgstr "No"
557
 
558
  #: templates/sysinfo/tabs/main.php:45
559
  msgid "External object cache"
560
- msgstr ""
561
 
562
  #: templates/sysinfo/tabs/main.php:54
563
  msgid "Plugins Requirements"
564
- msgstr ""
565
 
566
- #: yit-plugin.php:187
567
  msgid "License"
568
  msgstr "Chiave di licenza"
569
 
@@ -571,6 +583,17 @@ msgstr "Chiave di licenza"
571
  msgid "YITH"
572
  msgstr "YITH"
573
 
 
 
 
 
 
 
 
 
 
 
 
574
  #: includes/class-yith-dashboard.php:96
575
  msgctxt "Plugin FW"
576
  msgid "View Changelog"
@@ -586,11 +609,6 @@ msgctxt "Button label"
586
  msgid "Close"
587
  msgstr "Chiudi"
588
 
589
- #: includes/class-yith-gutenberg.php:131
590
- msgctxt "[gutenberg]: Category Name"
591
- msgid "YITH"
592
- msgstr "YITH"
593
-
594
  #: includes/privacy/class-yith-privacy.php:61
595
  msgctxt "Privacy Policy Guide Title"
596
  msgid "YITH Plugins"
@@ -654,7 +672,7 @@ msgctxt "Position in the \"Dimensions\" field"
654
  msgid "Left"
655
  msgstr "A sinistra"
656
 
657
- #: templates/fields/dimensions.php:88
658
  msgctxt "Tooltip in the \"Dimensions\" field"
659
  msgid "Link values together"
660
  msgstr "Collega i valori"
@@ -662,34 +680,34 @@ msgstr "Collega i valori"
662
  #: templates/fields/onoff.php:28
663
  msgctxt "YES/NO button: use MAX 4 characters!"
664
  msgid "YES"
665
- msgstr ""
666
 
667
  #: templates/fields/onoff.php:29
668
  msgctxt "YES/NO button: use MAX 4 characters!"
669
  msgid "NO"
670
- msgstr ""
671
 
672
- #: yit-plugin.php:75
673
  msgctxt "Plugin Row Meta"
674
  msgid "Live Demo"
675
  msgstr "Live Demo"
676
 
677
- #: yit-plugin.php:79
678
  msgctxt "Plugin Row Meta"
679
  msgid "Documentation"
680
  msgstr "Documentazione"
681
 
682
- #: yit-plugin.php:83
683
  msgctxt "Plugin Row Meta"
684
  msgid "Support"
685
  msgstr "Assistenza"
686
 
687
- #: yit-plugin.php:87
688
  msgctxt "Plugin Row Meta"
689
  msgid "Premium version"
690
  msgstr "Versione premium"
691
 
692
- #: yit-plugin.php:183
693
  msgctxt "Action links"
694
  msgid "Settings"
695
  msgstr "Impostazioni"
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2021-02-23 14:12:38+00:00\n"
8
+ "PO-Revision-Date: 2021-02-15 14:59:29+0000\n"
9
  "Language: it\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
+ #: includes/class-yit-assets.php:129
17
  msgid "Clear"
18
  msgstr "Rimuovi"
19
 
20
+ #: includes/class-yit-assets.php:130
21
  msgid "Clear color"
22
  msgstr "Rimuovi colore"
23
 
24
+ #: includes/class-yit-assets.php:131
25
  msgid "Default"
26
  msgstr "Predefinito"
27
 
28
+ #: includes/class-yit-assets.php:132
29
  msgid "Select default color"
30
  msgstr "Seleziona il colore predefinito"
31
 
32
+ #: includes/class-yit-assets.php:133
33
  msgid "Select Color"
34
  msgstr "Seleziona il colore"
35
 
36
+ #: includes/class-yit-assets.php:134
37
  msgid "Color value"
38
  msgstr "Valore del colore"
39
 
144
 
145
  #: includes/class-yit-pointers.php:81
146
  msgid ""
147
+ "From now on, you can find all plugin options in YITH menu. Plugin "
148
+ "customization settings will be available as a new entry in YITH menu."
149
  msgstr ""
150
+ "D'ora in poi puoi trovare tutte le opzioni dei plugin nel menù YITH. Le "
151
+ "impostazioni di personalizzazione saranno disponibili come una nuova voce in "
152
+ "YITH."
153
 
154
  #. translators: 1. YITH site link; 2. WordPress site link.
155
  #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
156
  msgid "Discover all our plugins available on: %1$s and %2$s"
157
+ msgstr "Scopri tutti i nostri plugin disponibili su: %1$s and %2$s"
158
 
159
  #: includes/class-yit-pointers.php:96
160
  msgid "Plugins Upgraded"
162
 
163
  #: includes/class-yit-pointers.php:97
164
  msgid ""
165
+ "From now on, you can find the option panel of YITH plugins in YITH menu. "
166
+ "Every time one of our plugins is added, a new entry will be added to this "
167
+ "menu. For example, after the update, plugin options (such as for YITH "
168
  "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
169
+ "previous location to YITH menu."
170
  msgstr ""
171
+ "D'ora in poi puoi trovare il pannello opzioni dei plugin YITH nel menù YITH. "
172
+ "Ogni volta che viene aggiunto uno dei nostri plugin comparirà una nuova voce "
173
+ "in questo menù. Ad esempio, dopo l'aggiornamento, le opzioni del plugin "
174
+ "(come per YITH WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) "
175
+ "saranno spostate dalla posizione precedente al menù YITH."
176
 
177
  #: includes/class-yith-dashboard.php:35
178
  msgid "YITH Latest Updates"
424
 
425
  #: templates/fields/date-format.php:70
426
  msgid "Preview:"
427
+ msgstr "Anteprima"
428
 
429
  #: templates/fields/icons.php:63
430
  msgid "Set Default"
497
 
498
  #: templates/sysinfo/system-information-panel.php:12
499
  msgid "PHPInfo"
500
+ msgstr "PHPInfo"
501
 
502
  #: templates/sysinfo/system-information-panel.php:13
503
  #: templates/sysinfo/tabs/error-log.php:25
504
  msgid "Log Files"
505
+ msgstr "File log"
506
 
507
  #: templates/sysinfo/system-information-panel.php:22
508
  msgid "YITH System Information"
518
 
519
  #: templates/sysinfo/tabs/error-log.php:60
520
  msgid "Download"
521
+ msgstr "Scarica"
522
 
523
  #: templates/sysinfo/tabs/error-log.php:72
524
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
525
  msgstr ""
526
+ "La dimensione del file supera gli 8 megabyte ed è quindi necessario "
527
+ "scaricarlo"
528
 
529
  #. translators: %s file name.
530
  #: templates/sysinfo/tabs/error-log.php:96
532
  "No Log file available. Enable the WordPress debug by adding this in the %s "
533
  "file of your installation"
534
  msgstr ""
535
+ "Nessun file log disponibile. Abilita il debug WordPress aggiungendo questo "
536
+ "nel file %s della tua installazione"
537
 
538
  #: templates/sysinfo/tabs/error-log.php:105
539
  msgid "Copied!"
540
+ msgstr "Copiato!"
541
 
542
  #: templates/sysinfo/tabs/error-log.php:105
543
  msgid "Copy Code"
544
+ msgstr "Copia codice"
545
 
546
  #: templates/sysinfo/tabs/main.php:15
547
  msgid "Site Info"
548
+ msgstr "Info sito"
549
 
550
  #: templates/sysinfo/tabs/main.php:20
551
  msgid "Site URL"
569
 
570
  #: templates/sysinfo/tabs/main.php:45
571
  msgid "External object cache"
572
+ msgstr "External object cache"
573
 
574
  #: templates/sysinfo/tabs/main.php:54
575
  msgid "Plugins Requirements"
576
+ msgstr "Requisiti plugin"
577
 
578
+ #: yit-plugin.php:190
579
  msgid "License"
580
  msgstr "Chiave di licenza"
581
 
583
  msgid "YITH"
584
  msgstr "YITH"
585
 
586
+ #. translators: %s it the Elementor Widget title.
587
+ #: includes/builders/elementor/class-yith-elementor-widget.php:252
588
+ msgctxt "Elementor Widget - section title"
589
+ msgid "%s - Options"
590
+ msgstr ""
591
+
592
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:147
593
+ msgctxt "[gutenberg]: Category Name"
594
+ msgid "YITH"
595
+ msgstr "YITH"
596
+
597
  #: includes/class-yith-dashboard.php:96
598
  msgctxt "Plugin FW"
599
  msgid "View Changelog"
609
  msgid "Close"
610
  msgstr "Chiudi"
611
 
 
 
 
 
 
612
  #: includes/privacy/class-yith-privacy.php:61
613
  msgctxt "Privacy Policy Guide Title"
614
  msgid "YITH Plugins"
672
  msgid "Left"
673
  msgstr "A sinistra"
674
 
675
+ #: templates/fields/dimensions.php:94
676
  msgctxt "Tooltip in the \"Dimensions\" field"
677
  msgid "Link values together"
678
  msgstr "Collega i valori"
680
  #: templates/fields/onoff.php:28
681
  msgctxt "YES/NO button: use MAX 4 characters!"
682
  msgid "YES"
683
+ msgstr ""
684
 
685
  #: templates/fields/onoff.php:29
686
  msgctxt "YES/NO button: use MAX 4 characters!"
687
  msgid "NO"
688
+ msgstr "NO"
689
 
690
+ #: yit-plugin.php:78
691
  msgctxt "Plugin Row Meta"
692
  msgid "Live Demo"
693
  msgstr "Live Demo"
694
 
695
+ #: yit-plugin.php:82
696
  msgctxt "Plugin Row Meta"
697
  msgid "Documentation"
698
  msgstr "Documentazione"
699
 
700
+ #: yit-plugin.php:86
701
  msgctxt "Plugin Row Meta"
702
  msgid "Support"
703
  msgstr "Assistenza"
704
 
705
+ #: yit-plugin.php:90
706
  msgctxt "Plugin Row Meta"
707
  msgid "Premium version"
708
  msgstr "Versione premium"
709
 
710
+ #: yit-plugin.php:186
711
  msgctxt "Action links"
712
  msgid "Settings"
713
  msgstr "Impostazioni"
plugin-fw/languages/yith-plugin-fw-nl_NL.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-nl_NL.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2021-02-03 16:08:01+00:00\n"
8
- "PO-Revision-Date: 2020-09-24 14:36:33+0000\n"
9
  "Language: nl\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -13,27 +13,27 @@ msgstr ""
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
- #: includes/class-yit-assets.php:117
17
  msgid "Clear"
18
  msgstr "Wissen"
19
 
20
- #: includes/class-yit-assets.php:118
21
  msgid "Clear color"
22
  msgstr "Kleur wissen"
23
 
24
- #: includes/class-yit-assets.php:119
25
  msgid "Default"
26
  msgstr "Standaard"
27
 
28
- #: includes/class-yit-assets.php:120
29
  msgid "Select default color"
30
  msgstr "Standaardkleur selecteren"
31
 
32
- #: includes/class-yit-assets.php:121
33
  msgid "Select Color"
34
  msgstr "Kleur selecteren"
35
 
36
- #: includes/class-yit-assets.php:122
37
  msgid "Color value"
38
  msgstr "Kleurwaarde"
39
 
@@ -143,14 +143,14 @@ msgstr "Plugins geactiveerd"
143
 
144
  #: includes/class-yit-pointers.php:81
145
  msgid ""
146
- "From now on, you can find all plugin options in YITH Plugins menu. Plugin "
147
- "customization settings will be available as a new entry in YITH Plugins menu."
148
  msgstr ""
149
 
150
  #. translators: 1. YITH site link; 2. WordPress site link.
151
  #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
152
  msgid "Discover all our plugins available on: %1$s and %2$s"
153
- msgstr ""
154
 
155
  #: includes/class-yit-pointers.php:96
156
  msgid "Plugins Upgraded"
@@ -158,11 +158,11 @@ msgstr "Plugins Upgraded"
158
 
159
  #: includes/class-yit-pointers.php:97
160
  msgid ""
161
- "From now on, you can find the option panel of YITH plugins in YITH Plugins "
162
- "menu. Every time one of our plugins is added, a new entry will be added to "
163
- "this menu. For example, after the update, plugin options (such as for YITH "
164
  "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
165
- "previous location to YITH Plugins tab."
166
  msgstr ""
167
 
168
  #: includes/class-yith-dashboard.php:35
@@ -414,7 +414,7 @@ msgstr "Aangepast:"
414
 
415
  #: templates/fields/date-format.php:70
416
  msgid "Preview:"
417
- msgstr ""
418
 
419
  #: templates/fields/icons.php:63
420
  msgid "Set Default"
@@ -487,12 +487,12 @@ msgstr "Reset Standaard instellingen"
487
 
488
  #: templates/sysinfo/system-information-panel.php:12
489
  msgid "PHPInfo"
490
- msgstr ""
491
 
492
  #: templates/sysinfo/system-information-panel.php:13
493
  #: templates/sysinfo/tabs/error-log.php:25
494
  msgid "Log Files"
495
- msgstr ""
496
 
497
  #: templates/sysinfo/system-information-panel.php:22
498
  msgid "YITH System Information"
@@ -508,11 +508,12 @@ msgstr "PHP error_log bestand"
508
 
509
  #: templates/sysinfo/tabs/error-log.php:60
510
  msgid "Download"
511
- msgstr ""
512
 
513
  #: templates/sysinfo/tabs/error-log.php:72
514
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
515
  msgstr ""
 
516
 
517
  #. translators: %s file name.
518
  #: templates/sysinfo/tabs/error-log.php:96
@@ -520,18 +521,20 @@ msgid ""
520
  "No Log file available. Enable the WordPress debug by adding this in the %s "
521
  "file of your installation"
522
  msgstr ""
 
 
523
 
524
  #: templates/sysinfo/tabs/error-log.php:105
525
  msgid "Copied!"
526
- msgstr ""
527
 
528
  #: templates/sysinfo/tabs/error-log.php:105
529
  msgid "Copy Code"
530
- msgstr ""
531
 
532
  #: templates/sysinfo/tabs/main.php:15
533
  msgid "Site Info"
534
- msgstr ""
535
 
536
  #: templates/sysinfo/tabs/main.php:20
537
  msgid "Site URL"
@@ -555,13 +558,13 @@ msgstr "Nee"
555
 
556
  #: templates/sysinfo/tabs/main.php:45
557
  msgid "External object cache"
558
- msgstr ""
559
 
560
  #: templates/sysinfo/tabs/main.php:54
561
  msgid "Plugins Requirements"
562
- msgstr ""
563
 
564
- #: yit-plugin.php:187
565
  msgid "License"
566
  msgstr "Licentie"
567
 
@@ -569,6 +572,17 @@ msgstr "Licentie"
569
  msgid "YITH"
570
  msgstr "YITH"
571
 
 
 
 
 
 
 
 
 
 
 
 
572
  #: includes/class-yith-dashboard.php:96
573
  msgctxt "Plugin FW"
574
  msgid "View Changelog"
@@ -584,11 +598,6 @@ msgctxt "Button label"
584
  msgid "Close"
585
  msgstr "Sluiten"
586
 
587
- #: includes/class-yith-gutenberg.php:131
588
- msgctxt "[gutenberg]: Category Name"
589
- msgid "YITH"
590
- msgstr "YITH"
591
-
592
  #: includes/privacy/class-yith-privacy.php:61
593
  msgctxt "Privacy Policy Guide Title"
594
  msgid "YITH Plugins"
@@ -651,7 +660,7 @@ msgctxt "Position in the \"Dimensions\" field"
651
  msgid "Left"
652
  msgstr "Links"
653
 
654
- #: templates/fields/dimensions.php:88
655
  msgctxt "Tooltip in the \"Dimensions\" field"
656
  msgid "Link values together"
657
  msgstr "Waarden aan elkaar koppelen"
@@ -659,34 +668,34 @@ msgstr "Waarden aan elkaar koppelen"
659
  #: templates/fields/onoff.php:28
660
  msgctxt "YES/NO button: use MAX 4 characters!"
661
  msgid "YES"
662
- msgstr ""
663
 
664
  #: templates/fields/onoff.php:29
665
  msgctxt "YES/NO button: use MAX 4 characters!"
666
  msgid "NO"
667
- msgstr ""
668
 
669
- #: yit-plugin.php:75
670
  msgctxt "Plugin Row Meta"
671
  msgid "Live Demo"
672
  msgstr "Live Demo"
673
 
674
- #: yit-plugin.php:79
675
  msgctxt "Plugin Row Meta"
676
  msgid "Documentation"
677
  msgstr "Documentatie"
678
 
679
- #: yit-plugin.php:83
680
  msgctxt "Plugin Row Meta"
681
  msgid "Support"
682
  msgstr "Ondersteuning"
683
 
684
- #: yit-plugin.php:87
685
  msgctxt "Plugin Row Meta"
686
  msgid "Premium version"
687
  msgstr "Premium versie"
688
 
689
- #: yit-plugin.php:183
690
  msgctxt "Action links"
691
  msgid "Settings"
692
  msgstr "Instellingen"
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2021-02-23 14:12:38+00:00\n"
8
+ "PO-Revision-Date: 2021-02-05 09:20:16+0000\n"
9
  "Language: nl\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
+ #: includes/class-yit-assets.php:129
17
  msgid "Clear"
18
  msgstr "Wissen"
19
 
20
+ #: includes/class-yit-assets.php:130
21
  msgid "Clear color"
22
  msgstr "Kleur wissen"
23
 
24
+ #: includes/class-yit-assets.php:131
25
  msgid "Default"
26
  msgstr "Standaard"
27
 
28
+ #: includes/class-yit-assets.php:132
29
  msgid "Select default color"
30
  msgstr "Standaardkleur selecteren"
31
 
32
+ #: includes/class-yit-assets.php:133
33
  msgid "Select Color"
34
  msgstr "Kleur selecteren"
35
 
36
+ #: includes/class-yit-assets.php:134
37
  msgid "Color value"
38
  msgstr "Kleurwaarde"
39
 
143
 
144
  #: includes/class-yit-pointers.php:81
145
  msgid ""
146
+ "From now on, you can find all plugin options in YITH menu. Plugin "
147
+ "customization settings will be available as a new entry in YITH menu."
148
  msgstr ""
149
 
150
  #. translators: 1. YITH site link; 2. WordPress site link.
151
  #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
152
  msgid "Discover all our plugins available on: %1$s and %2$s"
153
+ msgstr "Ontdek al onze beschikbare plugins op: %1$s and %2$s"
154
 
155
  #: includes/class-yit-pointers.php:96
156
  msgid "Plugins Upgraded"
158
 
159
  #: includes/class-yit-pointers.php:97
160
  msgid ""
161
+ "From now on, you can find the option panel of YITH plugins in YITH menu. "
162
+ "Every time one of our plugins is added, a new entry will be added to this "
163
+ "menu. For example, after the update, plugin options (such as for YITH "
164
  "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
165
+ "previous location to YITH menu."
166
  msgstr ""
167
 
168
  #: includes/class-yith-dashboard.php:35
414
 
415
  #: templates/fields/date-format.php:70
416
  msgid "Preview:"
417
+ msgstr "Voorbeeld:"
418
 
419
  #: templates/fields/icons.php:63
420
  msgid "Set Default"
487
 
488
  #: templates/sysinfo/system-information-panel.php:12
489
  msgid "PHPInfo"
490
+ msgstr "PHPInfo"
491
 
492
  #: templates/sysinfo/system-information-panel.php:13
493
  #: templates/sysinfo/tabs/error-log.php:25
494
  msgid "Log Files"
495
+ msgstr "Log bestanden"
496
 
497
  #: templates/sysinfo/system-information-panel.php:22
498
  msgid "YITH System Information"
508
 
509
  #: templates/sysinfo/tabs/error-log.php:60
510
  msgid "Download"
511
+ msgstr "Download"
512
 
513
  #: templates/sysinfo/tabs/error-log.php:72
514
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
515
  msgstr ""
516
+ "De bestandsgrootte overschrijd 8 megabytes, dus het moet worden gedownload "
517
 
518
  #. translators: %s file name.
519
  #: templates/sysinfo/tabs/error-log.php:96
521
  "No Log file available. Enable the WordPress debug by adding this in the %s "
522
  "file of your installation"
523
  msgstr ""
524
+ "Geen log bestand beschikbaar. WordPress debug inschakelen door dit bestand "
525
+ "toe te voegen aan het %s bestand van je installatie "
526
 
527
  #: templates/sysinfo/tabs/error-log.php:105
528
  msgid "Copied!"
529
+ msgstr "Gekopieerd!"
530
 
531
  #: templates/sysinfo/tabs/error-log.php:105
532
  msgid "Copy Code"
533
+ msgstr "Code kopiëren"
534
 
535
  #: templates/sysinfo/tabs/main.php:15
536
  msgid "Site Info"
537
+ msgstr "Site informatie"
538
 
539
  #: templates/sysinfo/tabs/main.php:20
540
  msgid "Site URL"
558
 
559
  #: templates/sysinfo/tabs/main.php:45
560
  msgid "External object cache"
561
+ msgstr "Externe object cache"
562
 
563
  #: templates/sysinfo/tabs/main.php:54
564
  msgid "Plugins Requirements"
565
+ msgstr "Plugin benodigdheden"
566
 
567
+ #: yit-plugin.php:190
568
  msgid "License"
569
  msgstr "Licentie"
570
 
572
  msgid "YITH"
573
  msgstr "YITH"
574
 
575
+ #. translators: %s it the Elementor Widget title.
576
+ #: includes/builders/elementor/class-yith-elementor-widget.php:252
577
+ msgctxt "Elementor Widget - section title"
578
+ msgid "%s - Options"
579
+ msgstr ""
580
+
581
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:147
582
+ msgctxt "[gutenberg]: Category Name"
583
+ msgid "YITH"
584
+ msgstr "YITH"
585
+
586
  #: includes/class-yith-dashboard.php:96
587
  msgctxt "Plugin FW"
588
  msgid "View Changelog"
598
  msgid "Close"
599
  msgstr "Sluiten"
600
 
 
 
 
 
 
601
  #: includes/privacy/class-yith-privacy.php:61
602
  msgctxt "Privacy Policy Guide Title"
603
  msgid "YITH Plugins"
660
  msgid "Left"
661
  msgstr "Links"
662
 
663
+ #: templates/fields/dimensions.php:94
664
  msgctxt "Tooltip in the \"Dimensions\" field"
665
  msgid "Link values together"
666
  msgstr "Waarden aan elkaar koppelen"
668
  #: templates/fields/onoff.php:28
669
  msgctxt "YES/NO button: use MAX 4 characters!"
670
  msgid "YES"
671
+ msgstr "JA"
672
 
673
  #: templates/fields/onoff.php:29
674
  msgctxt "YES/NO button: use MAX 4 characters!"
675
  msgid "NO"
676
+ msgstr "NEE"
677
 
678
+ #: yit-plugin.php:78
679
  msgctxt "Plugin Row Meta"
680
  msgid "Live Demo"
681
  msgstr "Live Demo"
682
 
683
+ #: yit-plugin.php:82
684
  msgctxt "Plugin Row Meta"
685
  msgid "Documentation"
686
  msgstr "Documentatie"
687
 
688
+ #: yit-plugin.php:86
689
  msgctxt "Plugin Row Meta"
690
  msgid "Support"
691
  msgstr "Ondersteuning"
692
 
693
+ #: yit-plugin.php:90
694
  msgctxt "Plugin Row Meta"
695
  msgid "Premium version"
696
  msgstr "Premium versie"
697
 
698
+ #: yit-plugin.php:186
699
  msgctxt "Action links"
700
  msgid "Settings"
701
  msgstr "Instellingen"
plugin-fw/languages/yith-plugin-fw.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2021-02-03 16:08:01+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -24,27 +24,27 @@ msgstr ""
24
  "X-Textdomain-Support: yes\n"
25
  "X-Generator: grunt-wp-i18n 1.0.3\n"
26
 
27
- #: includes/class-yit-assets.php:117
28
  msgid "Clear"
29
  msgstr ""
30
 
31
- #: includes/class-yit-assets.php:118
32
  msgid "Clear color"
33
  msgstr ""
34
 
35
- #: includes/class-yit-assets.php:119
36
  msgid "Default"
37
  msgstr ""
38
 
39
- #: includes/class-yit-assets.php:120
40
  msgid "Select default color"
41
  msgstr ""
42
 
43
- #: includes/class-yit-assets.php:121
44
  msgid "Select Color"
45
  msgstr ""
46
 
47
- #: includes/class-yit-assets.php:122
48
  msgid "Color value"
49
  msgstr ""
50
 
@@ -151,9 +151,8 @@ msgstr ""
151
 
152
  #: includes/class-yit-pointers.php:81
153
  msgid ""
154
- "From now on, you can find all plugin options in YITH Plugins menu. Plugin "
155
- "customization settings will be available as a new entry in YITH Plugins "
156
- "menu."
157
  msgstr ""
158
 
159
  #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
@@ -167,11 +166,11 @@ msgstr ""
167
 
168
  #: includes/class-yit-pointers.php:97
169
  msgid ""
170
- "From now on, you can find the option panel of YITH plugins in YITH Plugins "
171
- "menu. Every time one of our plugins is added, a new entry will be added to "
172
- "this menu. For example, after the update, plugin options (such as for YITH "
173
  "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved "
174
- "from previous location to YITH Plugins tab."
175
  msgstr ""
176
 
177
  #: includes/class-yith-dashboard.php:35
@@ -556,7 +555,7 @@ msgstr ""
556
  msgid "Plugins Requirements"
557
  msgstr ""
558
 
559
- #: yit-plugin.php:187
560
  msgid "License"
561
  msgstr ""
562
 
@@ -564,6 +563,17 @@ msgstr ""
564
  msgid "YITH"
565
  msgstr ""
566
 
 
 
 
 
 
 
 
 
 
 
 
567
  #: includes/class-yith-dashboard.php:96
568
  msgctxt "Plugin FW"
569
  msgid "View Changelog"
@@ -579,11 +589,6 @@ msgctxt "Button label"
579
  msgid "Close"
580
  msgstr ""
581
 
582
- #: includes/class-yith-gutenberg.php:131
583
- msgctxt "[gutenberg]: Category Name"
584
- msgid "YITH"
585
- msgstr ""
586
-
587
  #: includes/privacy/class-yith-privacy.php:61
588
  msgctxt "Privacy Policy Guide Title"
589
  msgid "YITH Plugins"
@@ -640,7 +645,7 @@ msgctxt "Position in the \"Dimensions\" field"
640
  msgid "Left"
641
  msgstr ""
642
 
643
- #: templates/fields/dimensions.php:88
644
  msgctxt "Tooltip in the \"Dimensions\" field"
645
  msgid "Link values together"
646
  msgstr ""
@@ -655,27 +660,27 @@ msgctxt "YES/NO button: use MAX 4 characters!"
655
  msgid "NO"
656
  msgstr ""
657
 
658
- #: yit-plugin.php:75
659
  msgctxt "Plugin Row Meta"
660
  msgid "Live Demo"
661
  msgstr ""
662
 
663
- #: yit-plugin.php:79
664
  msgctxt "Plugin Row Meta"
665
  msgid "Documentation"
666
  msgstr ""
667
 
668
- #: yit-plugin.php:83
669
  msgctxt "Plugin Row Meta"
670
  msgid "Support"
671
  msgstr ""
672
 
673
- #: yit-plugin.php:87
674
  msgctxt "Plugin Row Meta"
675
  msgid "Premium version"
676
  msgstr ""
677
 
678
- #: yit-plugin.php:183
679
  msgctxt "Action links"
680
  msgid "Settings"
681
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2021-02-23 14:12:38+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
24
  "X-Textdomain-Support: yes\n"
25
  "X-Generator: grunt-wp-i18n 1.0.3\n"
26
 
27
+ #: includes/class-yit-assets.php:129
28
  msgid "Clear"
29
  msgstr ""
30
 
31
+ #: includes/class-yit-assets.php:130
32
  msgid "Clear color"
33
  msgstr ""
34
 
35
+ #: includes/class-yit-assets.php:131
36
  msgid "Default"
37
  msgstr ""
38
 
39
+ #: includes/class-yit-assets.php:132
40
  msgid "Select default color"
41
  msgstr ""
42
 
43
+ #: includes/class-yit-assets.php:133
44
  msgid "Select Color"
45
  msgstr ""
46
 
47
+ #: includes/class-yit-assets.php:134
48
  msgid "Color value"
49
  msgstr ""
50
 
151
 
152
  #: includes/class-yit-pointers.php:81
153
  msgid ""
154
+ "From now on, you can find all plugin options in YITH menu. Plugin "
155
+ "customization settings will be available as a new entry in YITH menu."
 
156
  msgstr ""
157
 
158
  #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
166
 
167
  #: includes/class-yit-pointers.php:97
168
  msgid ""
169
+ "From now on, you can find the option panel of YITH plugins in YITH menu. "
170
+ "Every time one of our plugins is added, a new entry will be added to this "
171
+ "menu. For example, after the update, plugin options (such as for YITH "
172
  "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved "
173
+ "from previous location to YITH menu."
174
  msgstr ""
175
 
176
  #: includes/class-yith-dashboard.php:35
555
  msgid "Plugins Requirements"
556
  msgstr ""
557
 
558
+ #: yit-plugin.php:190
559
  msgid "License"
560
  msgstr ""
561
 
563
  msgid "YITH"
564
  msgstr ""
565
 
566
+ #: includes/builders/elementor/class-yith-elementor-widget.php:252
567
+ #. translators: %s it the Elementor Widget title.
568
+ msgctxt "Elementor Widget - section title"
569
+ msgid "%s - Options"
570
+ msgstr ""
571
+
572
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:147
573
+ msgctxt "[gutenberg]: Category Name"
574
+ msgid "YITH"
575
+ msgstr ""
576
+
577
  #: includes/class-yith-dashboard.php:96
578
  msgctxt "Plugin FW"
579
  msgid "View Changelog"
589
  msgid "Close"
590
  msgstr ""
591
 
 
 
 
 
 
592
  #: includes/privacy/class-yith-privacy.php:61
593
  msgctxt "Privacy Policy Guide Title"
594
  msgid "YITH Plugins"
645
  msgid "Left"
646
  msgstr ""
647
 
648
+ #: templates/fields/dimensions.php:94
649
  msgctxt "Tooltip in the \"Dimensions\" field"
650
  msgid "Link values together"
651
  msgstr ""
660
  msgid "NO"
661
  msgstr ""
662
 
663
+ #: yit-plugin.php:78
664
  msgctxt "Plugin Row Meta"
665
  msgid "Live Demo"
666
  msgstr ""
667
 
668
+ #: yit-plugin.php:82
669
  msgctxt "Plugin Row Meta"
670
  msgid "Documentation"
671
  msgstr ""
672
 
673
+ #: yit-plugin.php:86
674
  msgctxt "Plugin Row Meta"
675
  msgid "Support"
676
  msgstr ""
677
 
678
+ #: yit-plugin.php:90
679
  msgctxt "Plugin Row Meta"
680
  msgid "Premium version"
681
  msgstr ""
682
 
683
+ #: yit-plugin.php:186
684
  msgctxt "Action links"
685
  msgid "Settings"
686
  msgstr ""
plugin-fw/lib/yith-gutenberg.php CHANGED
@@ -8,4 +8,4 @@
8
  /**
9
  * Require the correct file
10
  */
11
- require_once __DIR__ . '/../includes/class-yith-gutenberg.php';
8
  /**
9
  * Require the correct file
10
  */
11
+ require_once __DIR__ . '/../includes/builders/gutenberg/class-yith-gutenberg.php';
plugin-fw/templates/fields/dimensions.php CHANGED
@@ -67,11 +67,11 @@ if ( $allow_linked && 'yes' === $linked ) {
67
  }
68
 
69
  if ( false !== $d_max ) {
70
- $d_attributes = " max='{$d_max}' . $d_attributes";
71
  }
72
 
73
  if ( false !== $d_min ) {
74
- $d_attributes = " min='{$d_min}' " . $d_attributes;
75
  }
76
 
77
  ?>
@@ -79,7 +79,13 @@ if ( $allow_linked && 'yes' === $linked ) {
79
  <label for="<?php echo esc_attr( $d_id ); ?>" class="yith-plugin-fw-dimensions__dimension__label"><?php echo esc_html( $d_label ); ?></label>
80
  <input id="<?php echo esc_attr( $d_id ); ?>" class="yith-plugin-fw-dimensions__dimension__number"
81
  type="number" name="<?php echo esc_attr( $d_name ); ?>" value="<?php echo esc_attr( $d_value ); ?>"
82
- <?php echo esc_html( $d_attributes ); ?>
 
 
 
 
 
 
83
  >
84
  </div>
85
  <?php endforeach ?>
@@ -103,6 +109,11 @@ if ( $allow_linked && 'yes' === $linked ) {
103
  if ( $unit_value === $key ) {
104
  $classes[] = 'yith-plugin-fw-dimensions__unit--selected';
105
  }
 
 
 
 
 
106
  $classes = implode( ' ', $classes );
107
  ?>
108
  <span class="<?php echo esc_attr( $classes ); ?>" data-value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $label ); ?></span>
67
  }
68
 
69
  if ( false !== $d_max ) {
70
+ $d_attributes = " max={$d_max} " . $d_attributes;
71
  }
72
 
73
  if ( false !== $d_min ) {
74
+ $d_attributes = " min={$d_min} " . $d_attributes;
75
  }
76
 
77
  ?>
79
  <label for="<?php echo esc_attr( $d_id ); ?>" class="yith-plugin-fw-dimensions__dimension__label"><?php echo esc_html( $d_label ); ?></label>
80
  <input id="<?php echo esc_attr( $d_id ); ?>" class="yith-plugin-fw-dimensions__dimension__number"
81
  type="number" name="<?php echo esc_attr( $d_name ); ?>" value="<?php echo esc_attr( $d_value ); ?>"
82
+ <?php if ( false !== $d_max ) : ?>
83
+ max="<?php echo esc_attr( $d_max ); ?>"
84
+ <?php endif; ?>
85
+ <?php if ( false !== $d_min ) : ?>
86
+ min="<?php echo esc_attr( $d_min ); ?>"
87
+ <?php endif; ?>
88
+ <?php echo $d_attributes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
89
  >
90
  </div>
91
  <?php endforeach ?>
109
  if ( $unit_value === $key ) {
110
  $classes[] = 'yith-plugin-fw-dimensions__unit--selected';
111
  }
112
+
113
+ if ( count( $units ) < 2 ) {
114
+ $classes[] = 'yith-plugin-fw-dimensions__unit--unique';
115
+ }
116
+
117
  $classes = implode( ' ', $classes );
118
  ?>
119
  <span class="<?php echo esc_attr( $classes ); ?>" data-value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $label ); ?></span>
plugin-fw/yit-functions.php CHANGED
@@ -1600,3 +1600,37 @@ if ( ! function_exists( 'yith_plugin_fw_extract' ) ) {
1600
  );
1601
  }
1602
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1600
  );
1601
  }
1602
  }
1603
+
1604
+
1605
+ if ( ! function_exists( 'yith_plugin_fw_register_elementor_widget' ) ) {
1606
+ /**
1607
+ * Register Elementor widget
1608
+ *
1609
+ * @param string $widget_name The widget name.
1610
+ * @param array $widget_options The widget options.
1611
+ *
1612
+ * @since 3.6.0
1613
+ */
1614
+ function yith_plugin_fw_register_elementor_widget( $widget_name, $widget_options ) {
1615
+ YITH_Elementor::instance()->register_widget( $widget_name, $widget_options );
1616
+ }
1617
+ }
1618
+
1619
+ if ( ! function_exists( 'yith_plugin_fw_register_elementor_widgets' ) ) {
1620
+ /**
1621
+ * Register Elementor widgets
1622
+ *
1623
+ * @param array $widgets The widgets.
1624
+ * @param bool $map_from_gutenberg Set to true if you need to map options from Gutenberg blocks array.
1625
+ *
1626
+ * @since 3.6.0
1627
+ */
1628
+ function yith_plugin_fw_register_elementor_widgets( $widgets, $map_from_gutenberg = false ) {
1629
+ foreach ( $widgets as $widget_name => $widget_options ) {
1630
+ if ( $map_from_gutenberg ) {
1631
+ $widget_options = array_merge( array( 'map_from_gutenberg' => true ), $widget_options );
1632
+ }
1633
+ yith_plugin_fw_register_elementor_widget( $widget_name, $widget_options );
1634
+ }
1635
+ }
1636
+ }
plugin-fw/yit-plugin.php CHANGED
@@ -39,8 +39,11 @@ require_once 'includes/class-yith-system-status.php';
39
 
40
  // Gutenberg Support.
41
  if ( class_exists( 'WP_Block_Type_Registry' ) ) {
42
- require_once 'includes/class-yith-gutenberg.php';
43
  }
 
 
 
44
  // load from theme folder...
45
  load_textdomain( 'yith-plugin-fw', get_template_directory() . '/core/plugin-fw/yith-plugin-fw-' . apply_filters( 'plugin_locale', get_locale(), 'yith-plugin-fw' ) . '.mo' ) ||
46
  // ...or from plugin folder.
39
 
40
  // Gutenberg Support.
41
  if ( class_exists( 'WP_Block_Type_Registry' ) ) {
42
+ require_once 'includes/builders/gutenberg/class-yith-gutenberg.php';
43
  }
44
+
45
+ require_once 'includes/builders/elementor/class-yith-elementor.php';
46
+
47
  // load from theme folder...
48
  load_textdomain( 'yith-plugin-fw', get_template_directory() . '/core/plugin-fw/yith-plugin-fw-' . apply_filters( 'plugin_locale', get_locale(), 'yith-plugin-fw' ) . '.mo' ) ||
49
  // ...or from plugin folder.
plugin-options/premium-options.php CHANGED
@@ -1,4 +1,13 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
  return array(
4
  'premium' => array(
@@ -7,4 +16,4 @@ return array(
7
  'action' => 'yith_quick_view_premium',
8
  ),
9
  ),
10
- );
1
  <?php
2
+ /**
3
+ * Premium tab array
4
+ *
5
+ * @author YITH
6
+ * @package YITH WooCommerce Quick View
7
+ * @version 1.1.1
8
+ */
9
+
10
+ defined( 'YITH_WCQV' ) || exit; // Exit if accessed directly.
11
 
12
  return array(
13
  'premium' => array(
16
  'action' => 'yith_quick_view_premium',
17
  ),
18
  ),
19
+ );
plugin-options/settings-options.php CHANGED
@@ -1,17 +1,26 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
  $settings = array(
4
 
5
  'settings' => array(
6
 
7
- 'general-options' => array(
8
  'title' => __( 'General Options', 'yith-woocommerce-quick-view' ),
9
  'type' => 'title',
10
  'desc' => '',
11
  'id' => 'yith-wcqv-general-options',
12
  ),
13
 
14
- 'enable-quick-view' => array(
15
  'id' => 'yith-wcqv-enable',
16
  'name' => __( 'Enable Quick View', 'yith-woocommerce-quick-view' ),
17
  'type' => 'yith-field',
@@ -28,7 +37,7 @@ $settings = array(
28
  'default' => 'yes',
29
  ),
30
 
31
- 'quick-view-label' => array(
32
  'id' => 'yith-wcqv-button-label',
33
  'name' => __( 'Quick View Button Label', 'yith-woocommerce-quick-view' ),
34
  'desc' => __( 'Label for the quick view button in the WooCommerce loop.', 'yith-woocommerce-quick-view' ),
@@ -37,19 +46,19 @@ $settings = array(
37
  'default' => __( 'Quick View', 'yith-woocommerce-quick-view' ),
38
  ),
39
 
40
- 'general-options-end' => array(
41
  'type' => 'sectionend',
42
  'id' => 'yith-wcqv-general-options',
43
  ),
44
 
45
- 'style-options' => array(
46
  'title' => __( 'Style Options', 'yith-woocommerce-quick-view' ),
47
  'desc' => '',
48
  'type' => 'title',
49
  'id' => 'yith-wcqv-style-options',
50
  ),
51
 
52
- 'background-color-modal' => array(
53
  'name' => __( 'Modal Window Background Color', 'yith-woocommerce-quick-view' ),
54
  'type' => 'yith-field',
55
  'yith-type' => 'colorpicker',
@@ -58,7 +67,7 @@ $settings = array(
58
  'default' => '#ffffff',
59
  ),
60
 
61
- 'close-button-color' => array(
62
  'name' => __( 'Closing Button Color', 'yith-woocommerce-quick-view' ),
63
  'type' => 'yith-field',
64
  'yith-type' => 'colorpicker',
@@ -76,7 +85,7 @@ $settings = array(
76
  'default' => '#ff0000',
77
  ),
78
 
79
- 'style-options-end' => array(
80
  'type' => 'sectionend',
81
  'id' => 'yith-wcqv-style-options',
82
  ),
@@ -85,4 +94,4 @@ $settings = array(
85
  ),
86
  );
87
 
88
- return apply_filters( 'yith_wcqv_panel_settings_options', $settings );
1
  <?php
2
+ /**
3
+ * Settings tab array
4
+ *
5
+ * @author YITH
6
+ * @package YITH WooCommerce Quick View
7
+ * @version 1.1.1
8
+ */
9
+
10
+ defined( 'YITH_WCQV' ) || exit; // Exit if accessed directly.
11
 
12
  $settings = array(
13
 
14
  'settings' => array(
15
 
16
+ 'general-options' => array(
17
  'title' => __( 'General Options', 'yith-woocommerce-quick-view' ),
18
  'type' => 'title',
19
  'desc' => '',
20
  'id' => 'yith-wcqv-general-options',
21
  ),
22
 
23
+ 'enable-quick-view' => array(
24
  'id' => 'yith-wcqv-enable',
25
  'name' => __( 'Enable Quick View', 'yith-woocommerce-quick-view' ),
26
  'type' => 'yith-field',
37
  'default' => 'yes',
38
  ),
39
 
40
+ 'quick-view-label' => array(
41
  'id' => 'yith-wcqv-button-label',
42
  'name' => __( 'Quick View Button Label', 'yith-woocommerce-quick-view' ),
43
  'desc' => __( 'Label for the quick view button in the WooCommerce loop.', 'yith-woocommerce-quick-view' ),
46
  'default' => __( 'Quick View', 'yith-woocommerce-quick-view' ),
47
  ),
48
 
49
+ 'general-options-end' => array(
50
  'type' => 'sectionend',
51
  'id' => 'yith-wcqv-general-options',
52
  ),
53
 
54
+ 'style-options' => array(
55
  'title' => __( 'Style Options', 'yith-woocommerce-quick-view' ),
56
  'desc' => '',
57
  'type' => 'title',
58
  'id' => 'yith-wcqv-style-options',
59
  ),
60
 
61
+ 'background-color-modal' => array(
62
  'name' => __( 'Modal Window Background Color', 'yith-woocommerce-quick-view' ),
63
  'type' => 'yith-field',
64
  'yith-type' => 'colorpicker',
67
  'default' => '#ffffff',
68
  ),
69
 
70
+ 'close-button-color' => array(
71
  'name' => __( 'Closing Button Color', 'yith-woocommerce-quick-view' ),
72
  'type' => 'yith-field',
73
  'yith-type' => 'colorpicker',
85
  'default' => '#ff0000',
86
  ),
87
 
88
+ 'style-options-end' => array(
89
  'type' => 'sectionend',
90
  'id' => 'yith-wcqv-style-options',
91
  ),
94
  ),
95
  );
96
 
97
+ return apply_filters( 'yith_wcqv_panel_settings_options', $settings );
templates/admin/premium.php CHANGED
@@ -7,18 +7,7 @@
7
  * @version 1.0.0
8
  */
9
 
10
- /**
11
- * This file belongs to the YIT Framework.
12
- *
13
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
14
- * that is bundled with this package in the file LICENSE.txt.
15
- * It is also available through the world-wide-web at this URL:
16
- * http://www.gnu.org/licenses/gpl-3.0.txt
17
- */
18
-
19
- if ( ! defined( 'YITH_WCQV' ) ) {
20
- exit;
21
- } // Exit if accessed directly.
22
 
23
  ?>
24
  <style>
7
  * @version 1.0.0
8
  */
9
 
10
+ defined( 'YITH_WCQV' ) || exit; // Exit if accessed directly.
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  ?>
13
  <style>
templates/yith-quick-view-content.php CHANGED
@@ -7,18 +7,7 @@
7
  * @version 1.0.0
8
  */
9
 
10
- /**
11
- * This file belongs to the YIT Framework.
12
- *
13
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
14
- * that is bundled with this package in the file LICENSE.txt.
15
- * It is also available through the world-wide-web at this URL:
16
- * http://www.gnu.org/licenses/gpl-3.0.txt
17
- */
18
-
19
- if ( ! defined( 'ABSPATH' ) ) {
20
- exit; // Exit if accessed directly.
21
- }
22
 
23
  while ( have_posts() ) :
24
  the_post();
7
  * @version 1.0.0
8
  */
9
 
10
+ defined( 'YITH_WCQV' ) || exit; // Exit if accessed directly.
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  while ( have_posts() ) :
13
  the_post();
templates/yith-quick-view.php CHANGED
@@ -7,18 +7,7 @@
7
  * @version 1.0.0
8
  */
9
 
10
- /**
11
- * This file belongs to the YIT Framework.
12
- *
13
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
14
- * that is bundled with this package in the file LICENSE.txt.
15
- * It is also available through the world-wide-web at this URL:
16
- * http://www.gnu.org/licenses/gpl-3.0.txt
17
- */
18
-
19
- if ( ! defined( 'ABSPATH' ) ) {
20
- exit; // Exit if accessed directly.
21
- }
22
 
23
  ?>
24
 
7
  * @version 1.0.0
8
  */
9
 
10
+ defined( 'YITH_WCQV' ) || exit; // Exit if accessed directly.
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  ?>
13