YITH WooCommerce Quick View - Version 1.3.6

Version Description

Released Dec 06 - 2018

  • New: Support to WooCommerce 3.5.2.
  • New: Support to WordPress 5.0.0.
  • Update: Plugin Core.
Download this release

Release Info

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

Code changes from version 1.3.5 to 1.3.6

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: 4.0
5
- Tested up to: 4.9
6
- Stable tag: 1.3.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -42,6 +42,12 @@ Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woo
42
 
43
  == Changelog ==
44
 
 
 
 
 
 
 
45
  = 1.3.5 = Released Oct 24 - 2018
46
 
47
  * New: Support to WooCommerce 3.5.0.
@@ -192,7 +198,8 @@ Or, if you have created your own language pack, or have an update for an existin
192
 
193
  == Upgrade notice ==
194
 
195
- = 1.3.5 = Released Oct 24 - 2018
196
 
197
- * New: Support to WooCommerce 3.5.0.
 
198
  * Update: Plugin Core.
2
  Contributors: yithemes
3
  Tags: woocommerce, quick view, woocommerce quick view, products quick view
4
  Requires at least: 4.0
5
+ Tested up to: 5.0
6
+ Stable tag: 1.3.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
42
 
43
  == Changelog ==
44
 
45
+ = 1.3.6 = Released Dec 06 - 2018
46
+
47
+ * New: Support to WooCommerce 3.5.2.
48
+ * New: Support to WordPress 5.0.0.
49
+ * Update: Plugin Core.
50
+
51
  = 1.3.5 = Released Oct 24 - 2018
52
 
53
  * New: Support to WooCommerce 3.5.0.
198
 
199
  == Upgrade notice ==
200
 
201
+ = 1.3.6 = Released Dec 06 - 2018
202
 
203
+ * New: Support to WooCommerce 3.5.2.
204
+ * New: Support to WordPress 5.0.0.
205
  * Update: Plugin Core.
init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Quick View
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
5
  * Description: The <code><strong>YITH WooCommerce Quick View</strong></code> plugin allows your customers to have a quick look about products. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
- * Version: 1.3.5
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-quick-view
@@ -13,7 +13,7 @@
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Quick View
16
- * @version 1.3.5
17
  */
18
  /* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
19
 
@@ -61,7 +61,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
61
 
62
 
63
  if ( ! defined( 'YITH_WCQV_VERSION' ) ){
64
- define( 'YITH_WCQV_VERSION', '1.3.5' );
65
  }
66
 
67
  if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
3
  * Plugin Name: YITH WooCommerce Quick View
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
5
  * Description: The <code><strong>YITH WooCommerce Quick View</strong></code> plugin allows your customers to have a quick look about products. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
+ * Version: 1.3.6
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-quick-view
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Quick View
16
+ * @version 1.3.6
17
  */
18
  /* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
19
 
61
 
62
 
63
  if ( ! defined( 'YITH_WCQV_VERSION' ) ){
64
+ define( 'YITH_WCQV_VERSION', '1.3.6' );
65
  }
66
 
67
  if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
plugin-fw/assets/css/admin.css CHANGED
@@ -34,6 +34,7 @@
34
  }
35
 
36
  .notice-yith{
 
37
  border-left-color: #acc327;
38
  }
39
 
@@ -41,9 +42,15 @@
41
  background-color: #ecf7ed;
42
  }
43
 
 
 
 
 
 
44
  .yith-promo-banner-image{
45
  max-width: 100%;
46
- padding-bottom: 15px;
 
47
  }
48
 
49
  /*-----------------------
34
  }
35
 
36
  .notice-yith{
37
+ margin-left: 0;
38
  border-left-color: #acc327;
39
  }
40
 
42
  background-color: #ecf7ed;
43
  }
44
 
45
+ .yith-promo-banner-image-link{
46
+ display: block;
47
+ margin-bottom: 15px;
48
+ }
49
+
50
  .yith-promo-banner-image{
51
  max-width: 100%;
52
+ margin: 0 auto;
53
+ display: block;
54
  }
55
 
56
  /*-----------------------
plugin-fw/assets/css/metaboxes.css CHANGED
@@ -631,7 +631,23 @@
631
  float : right;
632
  margin-right : 20px;
633
  margin-top : 5px;
634
- z-index: 9999 !important;
635
- position: absolute;
636
- right: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
637
  }
631
  float : right;
632
  margin-right : 20px;
633
  margin-top : 5px;
634
+ z-index : 9999 !important;
635
+ position : absolute;
636
+ right : 0;
637
+ }
638
+
639
+ /*-----------------------
640
+ * Colorpicker - fix issues in combination with third-party themes or plugin (Basel, VC Addons, ...)
641
+ */
642
+ .metaboxes-tab .the-metabox.colorpicker {
643
+ display : block;
644
+ width : auto;
645
+ height : auto;
646
+ overflow : visible;
647
+ top : auto;
648
+ left : auto;
649
+ background : transparent;
650
+ position : static;
651
+ z-index : 1;
652
+ font-family : inherit;
653
  }
plugin-fw/assets/images/yith-icon.svg ADDED
@@ -0,0 +1 @@
 
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>
plugin-fw/assets/js/javascript-md5/md5.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ !function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<<t|n>>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<<r%32,n[14+(r+64>>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e<n.length;e+=16)i=l,a=g,d=v,h=m,g=f(g=f(g=f(g=f(g=c(g=c(g=c(g=c(g=u(g=u(g=u(g=u(g=o(g=o(g=o(g=o(g,v=o(v,m=o(m,l=o(l,g,v,m,n[e],7,-680876936),g,v,n[e+1],12,-389564586),l,g,n[e+2],17,606105819),m,l,n[e+3],22,-1044525330),v=o(v,m=o(m,l=o(l,g,v,m,n[e+4],7,-176418897),g,v,n[e+5],12,1200080426),l,g,n[e+6],17,-1473231341),m,l,n[e+7],22,-45705983),v=o(v,m=o(m,l=o(l,g,v,m,n[e+8],7,1770035416),g,v,n[e+9],12,-1958414417),l,g,n[e+10],17,-42063),m,l,n[e+11],22,-1990404162),v=o(v,m=o(m,l=o(l,g,v,m,n[e+12],7,1804603682),g,v,n[e+13],12,-40341101),l,g,n[e+14],17,-1502002290),m,l,n[e+15],22,1236535329),v=u(v,m=u(m,l=u(l,g,v,m,n[e+1],5,-165796510),g,v,n[e+6],9,-1069501632),l,g,n[e+11],14,643717713),m,l,n[e],20,-373897302),v=u(v,m=u(m,l=u(l,g,v,m,n[e+5],5,-701558691),g,v,n[e+10],9,38016083),l,g,n[e+15],14,-660478335),m,l,n[e+4],20,-405537848),v=u(v,m=u(m,l=u(l,g,v,m,n[e+9],5,568446438),g,v,n[e+14],9,-1019803690),l,g,n[e+3],14,-187363961),m,l,n[e+8],20,1163531501),v=u(v,m=u(m,l=u(l,g,v,m,n[e+13],5,-1444681467),g,v,n[e+2],9,-51403784),l,g,n[e+7],14,1735328473),m,l,n[e+12],20,-1926607734),v=c(v,m=c(m,l=c(l,g,v,m,n[e+5],4,-378558),g,v,n[e+8],11,-2022574463),l,g,n[e+11],16,1839030562),m,l,n[e+14],23,-35309556),v=c(v,m=c(m,l=c(l,g,v,m,n[e+1],4,-1530992060),g,v,n[e+4],11,1272893353),l,g,n[e+7],16,-155497632),m,l,n[e+10],23,-1094730640),v=c(v,m=c(m,l=c(l,g,v,m,n[e+13],4,681279174),g,v,n[e],11,-358537222),l,g,n[e+3],16,-722521979),m,l,n[e+6],23,76029189),v=c(v,m=c(m,l=c(l,g,v,m,n[e+9],4,-640364487),g,v,n[e+12],11,-421815835),l,g,n[e+15],16,530742520),m,l,n[e+2],23,-995338651),v=f(v,m=f(m,l=f(l,g,v,m,n[e],6,-198630844),g,v,n[e+7],10,1126891415),l,g,n[e+14],15,-1416354905),m,l,n[e+5],21,-57434055),v=f(v,m=f(m,l=f(l,g,v,m,n[e+12],6,1700485571),g,v,n[e+3],10,-1894986606),l,g,n[e+10],15,-1051523),m,l,n[e+1],21,-2054922799),v=f(v,m=f(m,l=f(l,g,v,m,n[e+8],6,1873313359),g,v,n[e+15],10,-30611744),l,g,n[e+6],15,-1560198380),m,l,n[e+13],21,1309151649),v=f(v,m=f(m,l=f(l,g,v,m,n[e+4],6,-145523070),g,v,n[e+11],10,-1120210379),l,g,n[e+2],15,718787259),m,l,n[e+9],21,-343485551),l=t(l,i),g=t(g,a),v=t(v,d),m=t(m,h);return[l,g,v,m]}function a(n){var t,r="",e=32*n.length;for(t=0;t<e;t+=8)r+=String.fromCharCode(n[t>>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t<r.length;t+=1)r[t]=0;var e=8*n.length;for(t=0;t<e;t+=8)r[t>>5]|=(255&n.charCodeAt(t/8))<<t%32;return r}function h(n){return a(i(d(n),8*n.length))}function l(n,t){var r,e,o=d(n),u=[],c=[];for(u[15]=c[15]=void 0,o.length>16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r<n.length;r+=1)t=n.charCodeAt(r),e+="0123456789abcdef".charAt(t>>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}"function"==typeof define&&define.amd?define(function(){return A}):"object"==typeof module&&module.exports?module.exports=A:n.md5=A}(this);
2
+ //# sourceMappingURL=md5.min.js.map
plugin-fw/assets/js/yith-gutenberg.js ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ registerBlockType = wp.blocks.registerBlockType,
7
+ RichText = wp.editor.RichText,
8
+ BlockControls = wp.editor.BlockControls,
9
+ InspectorControls = wp.editor.InspectorControls,
10
+ AlignmentToolbar = wp.editor.AlignmentToolbar,
11
+ Components = wp.components,
12
+ RawHTML = wp.element.RawHTML,
13
+ SelectControl = wp.components.SelectControl,
14
+ ToggleControl = wp.components.ToggleControl,
15
+ CheckboxControl = wp.components.CheckboxControl,
16
+ RangeControl = wp.components.RangeControl,
17
+ ColorPicker = wp.components.ColorPicker,
18
+ RadioControl = wp.components.RadioControl,
19
+ TextControl = wp.components.TextControl,
20
+ TextareaControl = wp.components.TextareaControl;
21
+
22
+ const yith_icon = el('svg', {width: 22, height: 22},
23
+ 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"})
24
+ );
25
+
26
+ function create_shortcode(sc_args, props, callback) {
27
+ var gt_block = '',
28
+ gutenberg_preview = '';
29
+
30
+ if (typeof props.callback != 'undefined' && typeof $[props.callback] == 'function') {
31
+ gt_block = $[props.callback](sc_args, props);
32
+ }
33
+
34
+ else {
35
+ var sc_name = props.shortcode_name,
36
+ sc = '[' + sc_name,
37
+ do_shortcode = null;
38
+
39
+
40
+ $.each(sc_args.attributes, function ($v, $k) {
41
+ if ($v != 'className') {
42
+ sc += ' ' + $v + '=';
43
+ var arg = props.attributes[$v],
44
+ remove_quotes = arg.remove_quotes;
45
+
46
+ if( remove_quotes == true ){
47
+ sc += $k;
48
+ }
49
+
50
+ else {
51
+ sc += '"' + $k + '"';
52
+ }
53
+ }
54
+ });
55
+
56
+ sc += ']';
57
+
58
+ var block_id = md5(sc);
59
+
60
+ gutenberg_preview = '<span class="yith_block_' + block_id + '">' + sc + '</span>';
61
+
62
+ if (callback == 'edit' && props.do_shortcode != false) {
63
+ do_shortcode = (function (block_id) {
64
+ var ajax_call_date = null;
65
+ $.ajax({
66
+ async: true,
67
+ url: yith_gutenberg_ajax.ajaxurl,
68
+ method: 'post',
69
+ data: {action: 'yith_plugin_fw_gutenberg_do_shortcode', shortcode: sc},
70
+ success: function (data) {
71
+ ajax_call_date = data;
72
+
73
+ if (ajax_call_date != '') {
74
+ $('.yith_block_' + block_id).html(ajax_call_date);
75
+ }
76
+ }
77
+ });
78
+ return ajax_call_date;
79
+ })(block_id);
80
+ }
81
+
82
+ gt_block = el(RawHTML, null, gutenberg_preview);
83
+ }
84
+
85
+ return gt_block;
86
+ }
87
+
88
+ function onChangeEvent(new_value, attribute_name, args, block_type) {
89
+ var attributes = {};
90
+
91
+ if (block_type == 'colorpicker' || block_type == 'color') {
92
+ new_value = new_value.hex;
93
+ }
94
+
95
+ attributes[attribute_name] = new_value;
96
+ args.setAttributes(attributes);
97
+ return args;
98
+ }
99
+
100
+ $.each(yith_gutenberg, function ($block, $props) {
101
+ registerBlockType("yith/" + $block, {
102
+ title: $props.title,
103
+ description: $props.description,
104
+ category: $props.category,
105
+ attributes: $props.attributes,
106
+ icon: typeof $props.icon != 'undefined' ? $props.icon : yith_icon,
107
+ keywords: $props.keywords,
108
+ edit: function edit(args) {
109
+ var elements = new Array();
110
+
111
+ $.each($props.attributes, function ($attribute_name, $attribute_args) {
112
+ var ComponentControl = null,
113
+ block_type = $attribute_args.blocktype;
114
+ if (typeof block_type != 'undefined') {
115
+ switch (block_type) {
116
+ case 'select':
117
+ ComponentControl = SelectControl;
118
+ break;
119
+
120
+ case 'text':
121
+ ComponentControl = TextControl;
122
+ break;
123
+
124
+ case 'textarea':
125
+ ComponentControl = TextareaControl;
126
+ break;
127
+
128
+ case 'toggle':
129
+ ComponentControl = ToggleControl;
130
+ break;
131
+
132
+ case 'checkbox':
133
+ ComponentControl = CheckboxControl;
134
+ break;
135
+
136
+ case 'number':
137
+ case 'range':
138
+ ComponentControl = RangeControl;
139
+ break;
140
+
141
+ case 'color':
142
+ case 'colorpicker':
143
+ ComponentControl = ColorPicker;
144
+ break;
145
+
146
+ case 'radio':
147
+ ComponentControl = RadioControl;
148
+ break;
149
+ }
150
+
151
+ if (ComponentControl != null) {
152
+ var helpMessageChecked = helpMessageUncheked = '';
153
+ if (typeof $attribute_args.helps != 'undefined' && typeof $attribute_args.helps.checked != 'undefined' && typeof $attribute_args.helps.unchecked != 'undefined') {
154
+ helpMessageChecked = $attribute_args.helps.checked;
155
+ helpMessageUncheked = $attribute_args.helps.unchecked;
156
+ }
157
+
158
+ else if (typeof $attribute_args.help != 'undefined') {
159
+ helpMessageChecked = helpMessageUncheked = $attribute_args.help;
160
+ }
161
+
162
+ elements.push(
163
+ el(
164
+ ComponentControl,
165
+ {
166
+ value: args.attributes[$attribute_name],
167
+ options: $attribute_args.options,
168
+ label: $attribute_args.label,
169
+ checked: args.attributes[$attribute_name],
170
+ selected: args.attributes[$attribute_name],
171
+ help: args.attributes[$attribute_name] ? helpMessageChecked : helpMessageUncheked,
172
+ disableAlpha: $attribute_args.disableAlpha,
173
+ min: $attribute_args.min,
174
+ max: $attribute_args.max,
175
+ multiple: $attribute_args.multiple,
176
+ onChange: function (new_value, attribute_name = $attribute_name) {
177
+ args = onChangeEvent(new_value, attribute_name, args, block_type);
178
+ },
179
+ onChangeComplete: function (new_value, attribute_name = $attribute_name) {
180
+ args = onChangeEvent(new_value, attribute_name, args, block_type);
181
+ },
182
+ },
183
+ )
184
+ );
185
+ }
186
+ }
187
+ });
188
+
189
+ sc = create_shortcode(args, $props, 'edit');
190
+
191
+ return [
192
+ el(
193
+ Fragment,
194
+ null,
195
+ el(
196
+ InspectorControls,
197
+ null,
198
+ elements,
199
+ ),
200
+ sc,
201
+ )];
202
+ },
203
+ save: function save(args) {
204
+ return create_shortcode(args, $props, 'save');
205
+ }
206
+ });
207
+ });
208
+ })(jQuery);
plugin-fw/assets/js/yith-gutenberg.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ (function(g){function k(d,c,e){var f="";f="";if("undefined"!=typeof c.callback&&"function"==typeof g[c.callback])f=g[c.callback](d,c);else{var a="["+c.shortcode_name;g.each(d.attributes,function(b,l){"className"!=b&&(a+=" "+b+"=",a=1==c.attributes[b].remove_quotes?a+l:a+('"'+l+'"'))});a+="]";d=md5(a);f='<span class="yith_block_'+d+'">'+a+"</span>";"edit"==e&&0!=c.do_shortcode&&function(c){var b=null;g.ajax({async:!0,url:yith_gutenberg_ajax.ajaxurl,method:"post",data:{action:"yith_plugin_fw_gutenberg_do_shortcode",
2
+ shortcode:a},success:function(a){b=a;""!=b&&g(".yith_block_"+c).html(b)}});return b}(d);f=h(n,null,f)}return f}function m(d,c,e,f){var a={};if("colorpicker"==f||"color"==f)d=d.hex;a[c]=d;e.setAttributes(a);return e}var h=wp.element.createElement,p=wp.element.Fragment,q=wp.blocks.registerBlockType,r=wp.editor.InspectorControls,n=wp.element.RawHTML,t=wp.components.SelectControl,u=wp.components.ToggleControl,v=wp.components.CheckboxControl,w=wp.components.RangeControl,x=wp.components.ColorPicker,y=wp.components.RadioControl,
3
+ z=wp.components.TextControl,A=wp.components.TextareaControl,B=h("svg",{width:22,height:22},h("path",{d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));
4
+ g.each(yith_gutenberg,function(d,c){q("yith/"+d,{title:c.title,description:c.description,category:c.category,attributes:c.attributes,icon:"undefined"!=typeof c.icon?c.icon:B,keywords:c.keywords,edit:function(e){var f=[];g.each(c.attributes,function(c,b){var a=null,d=b.blocktype;if("undefined"!=typeof d){switch(d){case "select":a=t;break;case "text":a=z;break;case "textarea":a=A;break;case "toggle":a=u;break;case "checkbox":a=v;break;case "number":case "range":a=w;break;case "color":case "colorpicker":a=
5
+ x;break;case "radio":a=y}if(null!=a){var g=helpMessageUncheked="";"undefined"!=typeof b.helps&&"undefined"!=typeof b.helps.checked&&"undefined"!=typeof b.helps.unchecked?(g=b.helps.checked,helpMessageUncheked=b.helps.unchecked):"undefined"!=typeof b.help&&(g=helpMessageUncheked=b.help);f.push(h(a,{value:e.attributes[c],options:b.options,label:b.label,checked:e.attributes[c],selected:e.attributes[c],help:e.attributes[c]?g:helpMessageUncheked,disableAlpha:b.disableAlpha,min:b.min,max:b.max,multiple:b.multiple,
6
+ onChange:function(a,b){b=void 0===b?c:b;e=m(a,b,e,d)},onChangeComplete:function(b,a){a=void 0===a?c:a;e=m(b,a,e,d)}}))}}});sc=k(e,c,"edit");return[h(p,null,h(r,null,f),sc)]},save:function(d){return k(d,c,"save")}})})})(jQuery);
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.0.29
5
  * Author: YITHEMES
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
- * @version 3.0.24
11
  */
12
  /**
13
  * This file belongs to the YIT Plugin Framework.
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.1.5
5
  * Author: YITHEMES
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
+ * @version 3.1.5
11
  */
12
  /**
13
  * This file belongs to the YIT Plugin Framework.
plugin-fw/languages/yith-plugin-fw-es_ES.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-es_ES.po CHANGED
@@ -4,15 +4,15 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: Your Inspiration Themes <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2018-08-02 16:02+0200\n"
8
- "PO-Revision-Date: 2018-08-02 16:02+0200\n"
9
  "Last-Translator: \n"
10
  "Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
11
  "Language: es_ES\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Poedit 2.0.8\n"
16
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
  "esc_html_x:1,2c\n"
@@ -264,7 +264,7 @@ msgstr "Añadir %s desde imágenes"
264
  msgid "Upload multiple files"
265
  msgstr "Cargar archivos múltiples"
266
 
267
- #: lib/yit-plugin-panel-wc.php:382
268
  msgid "The changes you have made will be lost if you leave this page."
269
  msgstr "Los cambios que has hecho se perderán si sales de esta página."
270
 
@@ -272,71 +272,71 @@ msgstr "Los cambios que has hecho se perderán si sales de esta página."
272
  msgid "Plugin Settings"
273
  msgstr "Ajustes del plugin"
274
 
275
- #: lib/yit-plugin-panel.php:330 lib/yit-plugin-panel.php:333
276
  msgid "How to install premium version"
277
  msgstr "Cómo instalar la versión premium"
278
 
279
- #: lib/yit-plugin-panel.php:384 lib/yit-plugin-subpanel.php:155
280
  #: templates/panel/woocommerce/woocommerce-form.php:11
281
  msgid "Save Changes"
282
  msgstr "Guardar cambios"
283
 
284
- #: lib/yit-plugin-panel.php:387 lib/yit-plugin-subpanel.php:158
285
  #: templates/panel/woocommerce/woocommerce-form.php:14
286
  msgid ""
287
  "If you continue with this action, you will reset all options in this page."
288
  msgstr ""
289
  "Si sigues con esta acción, se reiniciarán todas las opciones en esta página."
290
 
291
- #: lib/yit-plugin-panel.php:389 lib/yit-plugin-subpanel.php:160
292
  msgid "Reset to default"
293
  msgstr "Reiniciar a predeterminado"
294
 
295
- #: lib/yit-plugin-panel.php:390 lib/yit-plugin-subpanel.php:161
296
  #: templates/panel/woocommerce/woocommerce-form.php:18
297
  msgid "Are you sure?"
298
  msgstr "¿Estás seguro/a?"
299
 
300
- #: lib/yit-plugin-panel.php:524
301
  msgid ""
302
  "The element you have entered already exists. Please, enter another name."
303
  msgstr ""
304
  "El elemento que has introducido ya existe. Por favor, introduce otro nombre."
305
 
306
- #: lib/yit-plugin-panel.php:525
307
  msgid "Settings saved"
308
  msgstr "Ajustes guardados"
309
 
310
- #: lib/yit-plugin-panel.php:526
311
  msgid "Settings reset"
312
  msgstr "Ajustes reiniciados"
313
 
314
- #: lib/yit-plugin-panel.php:527
315
  msgid "Element deleted correctly."
316
  msgstr "Elemento borrado correctamente."
317
 
318
- #: lib/yit-plugin-panel.php:528 lib/yit-plugin-panel.php:529
319
  msgid "Element updated correctly."
320
  msgstr "Elemento actualizado correctamente."
321
 
322
- #: lib/yit-plugin-panel.php:530
323
  msgid "Database imported correctly."
324
  msgstr "Base de datos importada correctamente."
325
 
326
- #: lib/yit-plugin-panel.php:531
327
  msgid "An error has occurred during import. Please try again."
328
  msgstr ""
329
  "Ha ocurrido un error durante la importación. Por favor, inténtalo de nuevo."
330
 
331
- #: lib/yit-plugin-panel.php:532
332
  msgid "The added file is not valid."
333
  msgstr "El archivo añadido no es válido."
334
 
335
- #: lib/yit-plugin-panel.php:533
336
  msgid "Sorry, import is disabled."
337
  msgstr "Lo sentimos, la importación está deshabilitada."
338
 
339
- #: lib/yit-plugin-panel.php:534
340
  msgid "Sorting successful."
341
  msgstr "Clasificación fue realizada con éxito."
342
 
@@ -407,7 +407,7 @@ msgstr ""
407
  " se moverán de su posición anterior a la "
408
  "pestaña YIT Plugin."
409
 
410
- #: lib/yit-upgrade.php:89
411
  #, fuzzy
412
  #| msgid "Unable to contact the remote server, please try again later. Thanks!"
413
  msgid "An unexpected error occurred, please try again later. Thanks!"
@@ -415,43 +415,47 @@ msgstr ""
415
  "No fue posible contactar con el servidor remoto, por favor, inténtalo de "
416
  "nuevo más tarde. ¡Gracias!"
417
 
418
- #: lib/yit-upgrade.php:184
419
  msgid "There is a new version of %plugin_name% available."
420
  msgstr "Hay una nueva versión de %plugin_name% disponible."
421
 
422
- #: lib/yit-upgrade.php:185
423
  msgid "View version %latest% details."
424
  msgstr "Ver detalles de la %latest% versión"
425
 
426
- #: lib/yit-upgrade.php:186
427
  msgid "Automatic update is unavailable for this plugin,"
428
  msgstr "Las actualizaciones automáticas no están disponibles para este plugin,"
429
 
430
- #: lib/yit-upgrade.php:187
431
  msgid ""
432
  "please <a href=\"%activate_link%\">activate</a> your copy of %plugin_name%."
433
  msgstr ""
434
  "por favor, <a href=\"%activate_link%\">activa</a> tu copia de %plugin_name%."
435
 
436
- #: lib/yit-upgrade.php:188
437
  msgid "Update now."
438
  msgstr "Actualiza ahora."
439
 
440
- #: lib/yit-upgrade.php:288
 
 
 
 
441
  #, fuzzy
442
  #| msgid "YIThemes Repository"
443
  msgid "YITH Repository"
444
  msgstr "Repositorio YIThemes"
445
 
446
- #: lib/yit-upgrade.php:322
447
  msgid "Invalid URL Provided."
448
  msgstr "La URL proporcionada no es válida."
449
 
450
- #: lib/yit-upgrade.php:335
451
  msgid "Could not create Temporary file."
452
  msgstr "No se pudo crear un archivo temporal."
453
 
454
- #: lib/yit-upgrade.php:495
455
  #, fuzzy, php-format
456
  #| msgid ""
457
  #| "There is a new version of %1$s available. <a href=\"%2$s\" class="
@@ -465,7 +469,7 @@ msgstr ""
465
  "Hay una nueva versión de %1$s disponible. <a href=\"%2$s\" class=\"thickbox "
466
  "yit-changelog-button\" title=\"%3$s\">Ver detalles de la versión %4$s</a>."
467
 
468
- #: lib/yit-upgrade.php:497
469
  #, fuzzy, php-format
470
  #| msgid ""
471
  #| "There is a new version of %1$s available. <a href=\"%2$s\" class="
@@ -483,7 +487,7 @@ msgstr ""
483
  "<em>Tienes que activar el plugin en un único sitio web desdela red para "
484
  "beneficiarte de las actualizaciones automáticas.</em>"
485
 
486
- #: lib/yit-upgrade.php:499
487
  #, fuzzy, php-format
488
  #| msgid ""
489
  #| "There is a new version of %1$s available. <a href=\"%2$s\" class="
@@ -504,7 +508,7 @@ msgstr ""
504
  "por favor <a href=\"%5$s\" title=\"License activation\">activa</a> tu copia "
505
  "de %6s.</em>"
506
 
507
- #: lib/yit-upgrade.php:501
508
  #, fuzzy, php-format
509
  #| msgid ""
510
  #| "There is a new version of %1$s available. <a href=\"%2$s\" class="
@@ -519,104 +523,100 @@ msgstr ""
519
  "yit-changelog-button\" title=\"%3$s\">Ver detalles de la versión %4$s</a> o "
520
  "<a href=\"%5$s\">actualizar ahora</a>."
521
 
522
- #: lib/yit-upgrade.php:574
523
  msgid "You can't update the plugins for this site."
524
  msgstr "No puedes actualizar los plugins para este sitio web."
525
 
526
- #: lib/yit-upgrade.php:578
527
  msgid ""
528
  "You do not have sufficient permissions to update the plugins for this site."
529
  msgstr ""
530
  "No tienes suficientes permisos para actualizar los plugins para este sitio "
531
  "web."
532
 
533
- #: lib/yit-upgrade.php:585
534
  msgid "Update Plugin"
535
  msgstr "Actualizar Plugin"
536
 
537
- #: licence/lib/yit-licence.php:187
538
  #, php-format
539
  msgctxt "%s = field name"
540
- msgid "%s field cannot be empty"
541
- msgstr "%s el campo no puede estar vacío"
542
 
543
- #: licence/lib/yit-licence.php:188
544
  #, php-format
545
- msgid "%s and %s fields cannot be empty"
546
- msgstr "Los campos %s y %s no pueden estar vacíos"
547
 
548
- #: licence/lib/yit-licence.php:189
549
  msgid "Unable to contact the remote server, please try again later. Thanks!"
550
  msgstr ""
551
  "No fue posible contactar con el servidor remoto, por favor, inténtalo de "
552
  "nuevo más tarde. ¡Gracias!"
553
 
554
- #: licence/lib/yit-licence.php:190
555
- #: licence/templates/panel/activation/activation-panel.php:88
556
- #: licence/templates/panel/activation/activation-panel.php:166
557
- #: licence/templates/panel/activation/activation-panel.php:197
558
- msgid "Email"
559
- msgstr "Email"
560
 
561
- #: licence/lib/yit-licence.php:191
562
- #: licence/templates/panel/activation/activation-panel.php:89
563
- #: licence/templates/panel/activation/activation-panel.php:167
564
- #: licence/templates/panel/activation/activation-panel.php:198
565
- msgid "License Key"
566
  msgstr "Clave de Licencia"
567
 
568
- #: licence/lib/yit-licence.php:192
569
  msgid "Are you sure you want to deactivate the license for current site?"
570
  msgstr ""
571
  "¿Estás seguro/a de que quieres desactivar la licencia para el sitio web "
572
  "actual?"
573
 
574
- #: licence/lib/yit-licence.php:678
575
  msgid "Invalid Request"
576
  msgstr "Solicitud inválida"
577
 
578
- #: licence/lib/yit-licence.php:679
579
  msgid "Invalid license key"
580
  msgstr "Clave de solicitud inválida"
581
 
582
- #: licence/lib/yit-licence.php:680
583
  msgid "Software has been deactivated"
584
  msgstr "El software ha sido desactivado"
585
 
586
- #: licence/lib/yit-licence.php:681
587
  msgid "Maximum number of activations exceeded"
588
  msgstr "Se ha excedido el número máximo de solicitudes"
589
 
590
- #: licence/lib/yit-licence.php:682
591
  msgid "Invalid instance ID"
592
  msgstr "Instancia ID inválida"
593
 
594
- #: licence/lib/yit-licence.php:683
595
  msgid "Invalid security key"
596
  msgstr "Clave de seguridad inválida"
597
 
598
- #: licence/lib/yit-licence.php:684
599
  msgid "License key has expired"
600
  msgstr "La clave de licencia ha caducado"
601
 
602
- #: licence/lib/yit-licence.php:685
603
  msgid "License key has been banned"
604
  msgstr "La clave de licencia ha sido bloqueada"
605
 
606
- #: licence/lib/yit-licence.php:686
607
  msgid "Current product is not included in your YITH Club Subscription key"
608
  msgstr ""
609
  "Producto actual no está incluido en la clave de suscripción de Club de YITH"
610
 
611
- #: licence/lib/yit-licence.php:687
612
  msgid "Great"
613
  msgstr "Excelente"
614
 
615
- #: licence/lib/yit-licence.php:687
616
  msgid "License successfully activated"
617
  msgstr "Licencia activada con éxito"
618
 
619
- #: licence/lib/yit-licence.php:688
620
  msgid "License key deactivated for website"
621
  msgstr "Clave de licencia desactivada para nuestro sitio web"
622
 
@@ -676,86 +676,98 @@ msgstr ""
676
  " se te proporcionará y que podrás encontrar en tu cuenta "
677
  "YIThemes, en la sección \"My licenses\"."
678
 
679
- #: licence/templates/panel/activation/activation-panel.php:23
680
  #, fuzzy
681
  #| msgid "License Activation"
682
  msgid "YITH License Activation"
683
  msgstr "Activación de la Licencia"
684
 
685
- #: licence/templates/panel/activation/activation-panel.php:27
686
  msgid ""
687
  "Have you updated your licenses? Have you asked for an extension? Update "
688
  "information concerning your products."
689
  msgstr "¿Has actualizado tus licencias? ¿Has pedido una extensión? Actualiza"
690
 
691
- #: licence/templates/panel/activation/activation-panel.php:29
692
  msgid "Update license information"
693
  msgstr "Actualizar la información de la licencia"
694
 
695
- #: licence/templates/panel/activation/activation-panel.php:42
696
  msgid "Product to activate"
697
  msgid_plural "Products to activate"
698
  msgstr[0] "Producto que activar"
699
  msgstr[1] "Productos que activar"
700
 
701
- #: licence/templates/panel/activation/activation-panel.php:61
702
  msgid "Activate"
703
  msgstr "Activar"
704
 
705
- #: licence/templates/panel/activation/activation-panel.php:80
706
  msgid "Activated"
707
  msgstr "Activado/a"
708
 
709
- #: licence/templates/panel/activation/activation-panel.php:86
710
- #: licence/templates/panel/activation/activation-panel.php:164
711
- #: licence/templates/panel/activation/activation-panel.php:194
712
  msgid "Product Name"
713
  msgstr "Nombre de Producto"
714
 
715
  #: licence/templates/panel/activation/activation-panel.php:92
 
716
  #: licence/templates/panel/activation/activation-panel.php:201
 
 
 
 
 
 
 
 
 
 
 
717
  msgid "Expires"
718
  msgstr "Caduca"
719
 
720
- #: licence/templates/panel/activation/activation-panel.php:95
721
  msgid "Remaining"
722
  msgstr "Queda"
723
 
724
- #: licence/templates/panel/activation/activation-panel.php:97
725
  msgid "Club Subscription"
726
  msgstr "Suscripción a Club"
727
 
728
- #: licence/templates/panel/activation/activation-panel.php:101
729
  msgid "License Actions"
730
  msgstr "Acciones de Licencia"
731
 
732
- #: licence/templates/panel/activation/activation-panel.php:126
733
  #, php-format
734
  msgid "%1s out of %2s"
735
  msgstr "%1s de %2s"
736
 
737
- #: licence/templates/panel/activation/activation-panel.php:142
738
  msgid "Deactivate"
739
  msgstr "Desactivar"
740
 
741
- #: licence/templates/panel/activation/activation-panel.php:147
742
- #: licence/templates/panel/activation/activation-panel.php:204
743
  msgid "Renew"
744
  msgstr "Renovado"
745
 
746
- #: licence/templates/panel/activation/activation-panel.php:160
747
  msgid "Banned"
748
  msgstr "Bloqueado"
749
 
750
- #: licence/templates/panel/activation/activation-panel.php:190
751
  msgid "Expired"
752
  msgstr "Caducado"
753
 
754
- #: licence/templates/panel/activation/activation-panel.php:226
755
  msgid "Order again"
756
  msgstr "Comprar de nuevo"
757
 
758
- #: licence/templates/panel/activation/activation-panel.php:228
759
  msgid "Renew license"
760
  msgstr "Renovar licencia"
761
 
@@ -886,41 +898,48 @@ msgstr "(Por defecto: <i %s></i> )"
886
  msgid "Reset Defaults"
887
  msgstr "Ajustes predeterminados"
888
 
889
- #: yit-plugin.php:76
890
  msgctxt "Plugin Row Meta"
891
  msgid "Live Demo"
892
  msgstr ""
893
 
894
- #: yit-plugin.php:81
895
  msgctxt "Plugin Row Meta"
896
  msgid "Documentation"
897
  msgstr ""
898
 
899
- #: yit-plugin.php:86
900
  msgctxt "Plugin Row Meta"
901
  msgid "Support"
902
  msgstr ""
903
 
904
- #: yit-plugin.php:91
905
  #, fuzzy
906
  #| msgid "Premium version upgrade"
907
  msgctxt "Plugin Row Meta"
908
  msgid "Premium version"
909
  msgstr "Actualiza a la versión premium"
910
 
911
- #: yit-plugin.php:186
912
  #, fuzzy
913
  #| msgid "Settings"
914
  msgctxt "Action links"
915
  msgid "Settings"
916
  msgstr "Ajustes"
917
 
918
- #: yit-plugin.php:190
919
  #, fuzzy
920
  #| msgid "License Key"
921
  msgid "License"
922
  msgstr "Clave de Licencia"
923
 
 
 
 
 
 
 
 
924
  #~ msgid "Hide sidebar"
925
  #~ msgstr "Ocultar barra lateral"
926
 
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: Your Inspiration Themes <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2018-10-26 12:43+0200\n"
8
+ "PO-Revision-Date: 2018-10-26 12:43+0200\n"
9
  "Last-Translator: \n"
10
  "Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
11
  "Language: es_ES\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 2.2\n"
16
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
  "esc_html_x:1,2c\n"
264
  msgid "Upload multiple files"
265
  msgstr "Cargar archivos múltiples"
266
 
267
+ #: lib/yit-plugin-panel-wc.php:384
268
  msgid "The changes you have made will be lost if you leave this page."
269
  msgstr "Los cambios que has hecho se perderán si sales de esta página."
270
 
272
  msgid "Plugin Settings"
273
  msgstr "Ajustes del plugin"
274
 
275
+ #: lib/yit-plugin-panel.php:335 lib/yit-plugin-panel.php:338
276
  msgid "How to install premium version"
277
  msgstr "Cómo instalar la versión premium"
278
 
279
+ #: lib/yit-plugin-panel.php:389 lib/yit-plugin-subpanel.php:156
280
  #: templates/panel/woocommerce/woocommerce-form.php:11
281
  msgid "Save Changes"
282
  msgstr "Guardar cambios"
283
 
284
+ #: lib/yit-plugin-panel.php:392 lib/yit-plugin-subpanel.php:159
285
  #: templates/panel/woocommerce/woocommerce-form.php:14
286
  msgid ""
287
  "If you continue with this action, you will reset all options in this page."
288
  msgstr ""
289
  "Si sigues con esta acción, se reiniciarán todas las opciones en esta página."
290
 
291
+ #: lib/yit-plugin-panel.php:394 lib/yit-plugin-subpanel.php:161
292
  msgid "Reset to default"
293
  msgstr "Reiniciar a predeterminado"
294
 
295
+ #: lib/yit-plugin-panel.php:395 lib/yit-plugin-subpanel.php:162
296
  #: templates/panel/woocommerce/woocommerce-form.php:18
297
  msgid "Are you sure?"
298
  msgstr "¿Estás seguro/a?"
299
 
300
+ #: lib/yit-plugin-panel.php:529
301
  msgid ""
302
  "The element you have entered already exists. Please, enter another name."
303
  msgstr ""
304
  "El elemento que has introducido ya existe. Por favor, introduce otro nombre."
305
 
306
+ #: lib/yit-plugin-panel.php:530
307
  msgid "Settings saved"
308
  msgstr "Ajustes guardados"
309
 
310
+ #: lib/yit-plugin-panel.php:531
311
  msgid "Settings reset"
312
  msgstr "Ajustes reiniciados"
313
 
314
+ #: lib/yit-plugin-panel.php:532
315
  msgid "Element deleted correctly."
316
  msgstr "Elemento borrado correctamente."
317
 
318
+ #: lib/yit-plugin-panel.php:533 lib/yit-plugin-panel.php:534
319
  msgid "Element updated correctly."
320
  msgstr "Elemento actualizado correctamente."
321
 
322
+ #: lib/yit-plugin-panel.php:535
323
  msgid "Database imported correctly."
324
  msgstr "Base de datos importada correctamente."
325
 
326
+ #: lib/yit-plugin-panel.php:536
327
  msgid "An error has occurred during import. Please try again."
328
  msgstr ""
329
  "Ha ocurrido un error durante la importación. Por favor, inténtalo de nuevo."
330
 
331
+ #: lib/yit-plugin-panel.php:537
332
  msgid "The added file is not valid."
333
  msgstr "El archivo añadido no es válido."
334
 
335
+ #: lib/yit-plugin-panel.php:538
336
  msgid "Sorry, import is disabled."
337
  msgstr "Lo sentimos, la importación está deshabilitada."
338
 
339
+ #: lib/yit-plugin-panel.php:539
340
  msgid "Sorting successful."
341
  msgstr "Clasificación fue realizada con éxito."
342
 
407
  " se moverán de su posición anterior a la "
408
  "pestaña YIT Plugin."
409
 
410
+ #: lib/yit-upgrade.php:95
411
  #, fuzzy
412
  #| msgid "Unable to contact the remote server, please try again later. Thanks!"
413
  msgid "An unexpected error occurred, please try again later. Thanks!"
415
  "No fue posible contactar con el servidor remoto, por favor, inténtalo de "
416
  "nuevo más tarde. ¡Gracias!"
417
 
418
+ #: lib/yit-upgrade.php:190
419
  msgid "There is a new version of %plugin_name% available."
420
  msgstr "Hay una nueva versión de %plugin_name% disponible."
421
 
422
+ #: lib/yit-upgrade.php:191
423
  msgid "View version %latest% details."
424
  msgstr "Ver detalles de la %latest% versión"
425
 
426
+ #: lib/yit-upgrade.php:192
427
  msgid "Automatic update is unavailable for this plugin,"
428
  msgstr "Las actualizaciones automáticas no están disponibles para este plugin,"
429
 
430
+ #: lib/yit-upgrade.php:193
431
  msgid ""
432
  "please <a href=\"%activate_link%\">activate</a> your copy of %plugin_name%."
433
  msgstr ""
434
  "por favor, <a href=\"%activate_link%\">activa</a> tu copia de %plugin_name%."
435
 
436
+ #: lib/yit-upgrade.php:194
437
  msgid "Update now."
438
  msgstr "Actualiza ahora."
439
 
440
+ #: lib/yit-upgrade.php:289
441
+ msgid "You have to activate the plugin to benefit from automatic updates."
442
+ msgstr ""
443
+
444
+ #: lib/yit-upgrade.php:311
445
  #, fuzzy
446
  #| msgid "YIThemes Repository"
447
  msgid "YITH Repository"
448
  msgstr "Repositorio YIThemes"
449
 
450
+ #: lib/yit-upgrade.php:345
451
  msgid "Invalid URL Provided."
452
  msgstr "La URL proporcionada no es válida."
453
 
454
+ #: lib/yit-upgrade.php:358
455
  msgid "Could not create Temporary file."
456
  msgstr "No se pudo crear un archivo temporal."
457
 
458
+ #: lib/yit-upgrade.php:531
459
  #, fuzzy, php-format
460
  #| msgid ""
461
  #| "There is a new version of %1$s available. <a href=\"%2$s\" class="
469
  "Hay una nueva versión de %1$s disponible. <a href=\"%2$s\" class=\"thickbox "
470
  "yit-changelog-button\" title=\"%3$s\">Ver detalles de la versión %4$s</a>."
471
 
472
+ #: lib/yit-upgrade.php:533
473
  #, fuzzy, php-format
474
  #| msgid ""
475
  #| "There is a new version of %1$s available. <a href=\"%2$s\" class="
487
  "<em>Tienes que activar el plugin en un único sitio web desdela red para "
488
  "beneficiarte de las actualizaciones automáticas.</em>"
489
 
490
+ #: lib/yit-upgrade.php:535
491
  #, fuzzy, php-format
492
  #| msgid ""
493
  #| "There is a new version of %1$s available. <a href=\"%2$s\" class="
508
  "por favor <a href=\"%5$s\" title=\"License activation\">activa</a> tu copia "
509
  "de %6s.</em>"
510
 
511
+ #: lib/yit-upgrade.php:537
512
  #, fuzzy, php-format
513
  #| msgid ""
514
  #| "There is a new version of %1$s available. <a href=\"%2$s\" class="
523
  "yit-changelog-button\" title=\"%3$s\">Ver detalles de la versión %4$s</a> o "
524
  "<a href=\"%5$s\">actualizar ahora</a>."
525
 
526
+ #: lib/yit-upgrade.php:610
527
  msgid "You can't update the plugins for this site."
528
  msgstr "No puedes actualizar los plugins para este sitio web."
529
 
530
+ #: lib/yit-upgrade.php:614
531
  msgid ""
532
  "You do not have sufficient permissions to update the plugins for this site."
533
  msgstr ""
534
  "No tienes suficientes permisos para actualizar los plugins para este sitio "
535
  "web."
536
 
537
+ #: lib/yit-upgrade.php:621
538
  msgid "Update Plugin"
539
  msgstr "Actualizar Plugin"
540
 
541
+ #: licence/lib/yit-licence.php:186
542
  #, php-format
543
  msgctxt "%s = field name"
544
+ msgid "Please, insert a valid %s"
545
+ msgstr ""
546
 
547
+ #: licence/lib/yit-licence.php:187
548
  #, php-format
549
+ msgid "Please, insert a valid %s and a valid %s"
550
+ msgstr ""
551
 
552
+ #: licence/lib/yit-licence.php:188
553
  msgid "Unable to contact the remote server, please try again later. Thanks!"
554
  msgstr ""
555
  "No fue posible contactar con el servidor remoto, por favor, inténtalo de "
556
  "nuevo más tarde. ¡Gracias!"
557
 
558
+ #: licence/lib/yit-licence.php:189
559
+ msgid "email address"
560
+ msgstr ""
 
 
 
561
 
562
+ #: licence/lib/yit-licence.php:190
563
+ #, fuzzy
564
+ #| msgid "License Key"
565
+ msgid "license key"
 
566
  msgstr "Clave de Licencia"
567
 
568
+ #: licence/lib/yit-licence.php:191
569
  msgid "Are you sure you want to deactivate the license for current site?"
570
  msgstr ""
571
  "¿Estás seguro/a de que quieres desactivar la licencia para el sitio web "
572
  "actual?"
573
 
574
+ #: licence/lib/yit-licence.php:734
575
  msgid "Invalid Request"
576
  msgstr "Solicitud inválida"
577
 
578
+ #: licence/lib/yit-licence.php:735
579
  msgid "Invalid license key"
580
  msgstr "Clave de solicitud inválida"
581
 
582
+ #: licence/lib/yit-licence.php:736
583
  msgid "Software has been deactivated"
584
  msgstr "El software ha sido desactivado"
585
 
586
+ #: licence/lib/yit-licence.php:737
587
  msgid "Maximum number of activations exceeded"
588
  msgstr "Se ha excedido el número máximo de solicitudes"
589
 
590
+ #: licence/lib/yit-licence.php:738
591
  msgid "Invalid instance ID"
592
  msgstr "Instancia ID inválida"
593
 
594
+ #: licence/lib/yit-licence.php:739
595
  msgid "Invalid security key"
596
  msgstr "Clave de seguridad inválida"
597
 
598
+ #: licence/lib/yit-licence.php:740
599
  msgid "License key has expired"
600
  msgstr "La clave de licencia ha caducado"
601
 
602
+ #: licence/lib/yit-licence.php:741
603
  msgid "License key has been banned"
604
  msgstr "La clave de licencia ha sido bloqueada"
605
 
606
+ #: licence/lib/yit-licence.php:742
607
  msgid "Current product is not included in your YITH Club Subscription key"
608
  msgstr ""
609
  "Producto actual no está incluido en la clave de suscripción de Club de YITH"
610
 
611
+ #: licence/lib/yit-licence.php:743
612
  msgid "Great"
613
  msgstr "Excelente"
614
 
615
+ #: licence/lib/yit-licence.php:743
616
  msgid "License successfully activated"
617
  msgstr "Licencia activada con éxito"
618
 
619
+ #: licence/lib/yit-licence.php:744
620
  msgid "License key deactivated for website"
621
  msgstr "Clave de licencia desactivada para nuestro sitio web"
622
 
676
  " se te proporcionará y que podrás encontrar en tu cuenta "
677
  "YIThemes, en la sección \"My licenses\"."
678
 
679
+ #: licence/templates/panel/activation/activation-panel.php:24
680
  #, fuzzy
681
  #| msgid "License Activation"
682
  msgid "YITH License Activation"
683
  msgstr "Activación de la Licencia"
684
 
685
+ #: licence/templates/panel/activation/activation-panel.php:28
686
  msgid ""
687
  "Have you updated your licenses? Have you asked for an extension? Update "
688
  "information concerning your products."
689
  msgstr "¿Has actualizado tus licencias? ¿Has pedido una extensión? Actualiza"
690
 
691
+ #: licence/templates/panel/activation/activation-panel.php:30
692
  msgid "Update license information"
693
  msgstr "Actualizar la información de la licencia"
694
 
695
+ #: licence/templates/panel/activation/activation-panel.php:43
696
  msgid "Product to activate"
697
  msgid_plural "Products to activate"
698
  msgstr[0] "Producto que activar"
699
  msgstr[1] "Productos que activar"
700
 
701
+ #: licence/templates/panel/activation/activation-panel.php:65
702
  msgid "Activate"
703
  msgstr "Activar"
704
 
705
+ #: licence/templates/panel/activation/activation-panel.php:84
706
  msgid "Activated"
707
  msgstr "Activado/a"
708
 
709
+ #: licence/templates/panel/activation/activation-panel.php:90
710
+ #: licence/templates/panel/activation/activation-panel.php:168
711
+ #: licence/templates/panel/activation/activation-panel.php:198
712
  msgid "Product Name"
713
  msgstr "Nombre de Producto"
714
 
715
  #: licence/templates/panel/activation/activation-panel.php:92
716
+ #: licence/templates/panel/activation/activation-panel.php:170
717
  #: licence/templates/panel/activation/activation-panel.php:201
718
+ msgid "Email"
719
+ msgstr "Email"
720
+
721
+ #: licence/templates/panel/activation/activation-panel.php:93
722
+ #: licence/templates/panel/activation/activation-panel.php:171
723
+ #: licence/templates/panel/activation/activation-panel.php:202
724
+ msgid "License Key"
725
+ msgstr "Clave de Licencia"
726
+
727
+ #: licence/templates/panel/activation/activation-panel.php:96
728
+ #: licence/templates/panel/activation/activation-panel.php:205
729
  msgid "Expires"
730
  msgstr "Caduca"
731
 
732
+ #: licence/templates/panel/activation/activation-panel.php:99
733
  msgid "Remaining"
734
  msgstr "Queda"
735
 
736
+ #: licence/templates/panel/activation/activation-panel.php:101
737
  msgid "Club Subscription"
738
  msgstr "Suscripción a Club"
739
 
740
+ #: licence/templates/panel/activation/activation-panel.php:105
741
  msgid "License Actions"
742
  msgstr "Acciones de Licencia"
743
 
744
+ #: licence/templates/panel/activation/activation-panel.php:130
745
  #, php-format
746
  msgid "%1s out of %2s"
747
  msgstr "%1s de %2s"
748
 
749
+ #: licence/templates/panel/activation/activation-panel.php:146
750
  msgid "Deactivate"
751
  msgstr "Desactivar"
752
 
753
+ #: licence/templates/panel/activation/activation-panel.php:151
754
+ #: licence/templates/panel/activation/activation-panel.php:208
755
  msgid "Renew"
756
  msgstr "Renovado"
757
 
758
+ #: licence/templates/panel/activation/activation-panel.php:164
759
  msgid "Banned"
760
  msgstr "Bloqueado"
761
 
762
+ #: licence/templates/panel/activation/activation-panel.php:194
763
  msgid "Expired"
764
  msgstr "Caducado"
765
 
766
+ #: licence/templates/panel/activation/activation-panel.php:230
767
  msgid "Order again"
768
  msgstr "Comprar de nuevo"
769
 
770
+ #: licence/templates/panel/activation/activation-panel.php:232
771
  msgid "Renew license"
772
  msgstr "Renovar licencia"
773
 
898
  msgid "Reset Defaults"
899
  msgstr "Ajustes predeterminados"
900
 
901
+ #: yit-plugin.php:77
902
  msgctxt "Plugin Row Meta"
903
  msgid "Live Demo"
904
  msgstr ""
905
 
906
+ #: yit-plugin.php:82
907
  msgctxt "Plugin Row Meta"
908
  msgid "Documentation"
909
  msgstr ""
910
 
911
+ #: yit-plugin.php:87
912
  msgctxt "Plugin Row Meta"
913
  msgid "Support"
914
  msgstr ""
915
 
916
+ #: yit-plugin.php:92
917
  #, fuzzy
918
  #| msgid "Premium version upgrade"
919
  msgctxt "Plugin Row Meta"
920
  msgid "Premium version"
921
  msgstr "Actualiza a la versión premium"
922
 
923
+ #: yit-plugin.php:187
924
  #, fuzzy
925
  #| msgid "Settings"
926
  msgctxt "Action links"
927
  msgid "Settings"
928
  msgstr "Ajustes"
929
 
930
+ #: yit-plugin.php:191
931
  #, fuzzy
932
  #| msgid "License Key"
933
  msgid "License"
934
  msgstr "Clave de Licencia"
935
 
936
+ #~ msgctxt "%s = field name"
937
+ #~ msgid "%s field cannot be empty"
938
+ #~ msgstr "%s el campo no puede estar vacío"
939
+
940
+ #~ msgid "%s and %s fields cannot be empty"
941
+ #~ msgstr "Los campos %s y %s no pueden estar vacíos"
942
+
943
  #~ msgid "Hide sidebar"
944
  #~ msgstr "Ocultar barra lateral"
945
 
plugin-fw/languages/yith-plugin-fw-it_IT.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-it_IT.po CHANGED
@@ -4,15 +4,15 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: Your Inspiration Themes <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2018-10-23 15:44+0200\n"
8
- "PO-Revision-Date: 2018-10-24 13:28+0200\n"
9
  "Last-Translator: \n"
10
  "Language-Team: YIThemes <plugins@yithemes.com>\n"
11
  "Language: it_IT\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Poedit 2.0.8\n"
16
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
  "esc_html_x:1,2c\n"
@@ -418,19 +418,23 @@ msgstr ""
418
  msgid "Update now."
419
  msgstr "Aggiorna adesso."
420
 
421
- #: lib/yit-upgrade.php:295
 
 
 
 
422
  msgid "YITH Repository"
423
  msgstr "Repository YITH"
424
 
425
- #: lib/yit-upgrade.php:329
426
  msgid "Invalid URL Provided."
427
  msgstr "L'URL inserito non è valido."
428
 
429
- #: lib/yit-upgrade.php:342
430
  msgid "Could not create Temporary file."
431
  msgstr "Non è stato possibile creare il file temporaneo."
432
 
433
- #: lib/yit-upgrade.php:502
434
  #, php-format
435
  msgid ""
436
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox "
@@ -441,7 +445,7 @@ msgstr ""
441
  "yit-changelog-button\" title=\"%3$s\">Visualizza i dettagli della versione "
442
  "%4$s</a>."
443
 
444
- #: lib/yit-upgrade.php:504
445
  #, php-format
446
  msgid ""
447
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox "
@@ -454,7 +458,7 @@ msgstr ""
454
  "%4$s</a>. <em>Per poter usufruire degli aggiornamenti automatici è "
455
  "necessario attivare il plugin su un solo sito.</em>"
456
 
457
- #: lib/yit-upgrade.php:506
458
  #, php-format
459
  msgid ""
460
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox "
@@ -469,7 +473,7 @@ msgstr ""
469
  "plugin, per piacere <a href=\"%5$s\" title=\"License activation\">attiva</a> "
470
  "la tua copia di %6s.</em>"
471
 
472
- #: lib/yit-upgrade.php:508
473
  #, php-format
474
  msgid ""
475
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox "
@@ -480,99 +484,93 @@ msgstr ""
480
  "yit-changelog-button\" title=\"%3$s\">Visualizza i dettagli della versione "
481
  "%4$s</a> oppure <a href=\"%5$s\">aggiorna adesso</a>."
482
 
483
- #: lib/yit-upgrade.php:581
484
  msgid "You can't update the plugins for this site."
485
  msgstr "Non è possibile aggiornare i plugin per questo sito."
486
 
487
- #: lib/yit-upgrade.php:585
488
  msgid ""
489
  "You do not have sufficient permissions to update the plugins for this site."
490
  msgstr ""
491
  "Non sei in possesso delle autorizzazioni necessarie per aggiornare i plugin "
492
  "in questo sito."
493
 
494
- #: lib/yit-upgrade.php:592
495
  msgid "Update Plugin"
496
  msgstr "Aggiorna plugin"
497
 
498
  #: licence/lib/yit-licence.php:186
499
  #, php-format
500
  msgctxt "%s = field name"
501
- msgid "%s field cannot be empty"
502
- msgstr "Il campo %s non può essere vuoto"
503
 
504
  #: licence/lib/yit-licence.php:187
505
  #, php-format
506
- msgid "%s and %s fields cannot be empty"
507
- msgstr "I campi %s e %s non possono essere vuoti"
508
 
509
  #: licence/lib/yit-licence.php:188
510
  msgid "Unable to contact the remote server, please try again later. Thanks!"
511
  msgstr "Impossibile contattare il server remoto, prova più tardi. Grazie!"
512
 
513
  #: licence/lib/yit-licence.php:189
514
- #: licence/templates/panel/activation/activation-panel.php:92
515
- #: licence/templates/panel/activation/activation-panel.php:170
516
- #: licence/templates/panel/activation/activation-panel.php:201
517
- msgid "Email"
518
- msgstr "Email"
519
 
520
  #: licence/lib/yit-licence.php:190
521
- #: licence/templates/panel/activation/activation-panel.php:93
522
- #: licence/templates/panel/activation/activation-panel.php:171
523
- #: licence/templates/panel/activation/activation-panel.php:202
524
- msgid "License Key"
525
- msgstr "Chiave di licenza"
526
 
527
  #: licence/lib/yit-licence.php:191
528
  msgid "Are you sure you want to deactivate the license for current site?"
529
  msgstr "Sei sicuro di voler disattivare la licenza per questo sito?"
530
 
531
- #: licence/lib/yit-licence.php:685
532
  msgid "Invalid Request"
533
  msgstr "Richiesta non valida"
534
 
535
- #: licence/lib/yit-licence.php:686
536
  msgid "Invalid license key"
537
  msgstr "Chiave di licenza non valida"
538
 
539
- #: licence/lib/yit-licence.php:687
540
  msgid "Software has been deactivated"
541
  msgstr "Il software è stato disattivato"
542
 
543
- #: licence/lib/yit-licence.php:688
544
  msgid "Maximum number of activations exceeded"
545
  msgstr "Hai raggiunto il numero massimo di attivazioni"
546
 
547
- #: licence/lib/yit-licence.php:689
548
  msgid "Invalid instance ID"
549
  msgstr "Istanza ID non valida"
550
 
551
- #: licence/lib/yit-licence.php:690
552
  msgid "Invalid security key"
553
  msgstr "Chiave di sicurezza non valida"
554
 
555
- #: licence/lib/yit-licence.php:691
556
  msgid "License key has expired"
557
  msgstr "La chiave di licenza è scaduta"
558
 
559
- #: licence/lib/yit-licence.php:692
560
  msgid "License key has been banned"
561
  msgstr "La chiave di licenza è stata bloccata"
562
 
563
- #: licence/lib/yit-licence.php:693
564
  msgid "Current product is not included in your YITH Club Subscription key"
565
  msgstr "Questo prodotto non è incluso nella tua licenze YITH Club Subscription"
566
 
567
- #: licence/lib/yit-licence.php:694
568
  msgid "Great"
569
  msgstr "Grande!"
570
 
571
- #: licence/lib/yit-licence.php:694
572
  msgid "License successfully activated"
573
  msgstr "Licenza attivata con successo"
574
 
575
- #: licence/lib/yit-licence.php:695
576
  msgid "License key deactivated for website"
577
  msgstr "Chiave di licenza disattivata per il sito web"
578
 
@@ -655,6 +653,18 @@ msgstr "Attivato"
655
  msgid "Product Name"
656
  msgstr "Nome prodotto"
657
 
 
 
 
 
 
 
 
 
 
 
 
 
658
  #: licence/templates/panel/activation/activation-panel.php:96
659
  #: licence/templates/panel/activation/activation-panel.php:205
660
  msgid "Expires"
@@ -850,6 +860,13 @@ msgstr "Impostazioni"
850
  msgid "License"
851
  msgstr "Chiave di licenza"
852
 
 
 
 
 
 
 
 
853
  #~ msgid "Hide sidebar"
854
  #~ msgstr "Nascondi barra laterale"
855
 
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: Your Inspiration Themes <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2018-10-26 12:43+0200\n"
8
+ "PO-Revision-Date: 2018-10-26 12:49+0200\n"
9
  "Last-Translator: \n"
10
  "Language-Team: YIThemes <plugins@yithemes.com>\n"
11
  "Language: it_IT\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 2.2\n"
16
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
  "esc_html_x:1,2c\n"
418
  msgid "Update now."
419
  msgstr "Aggiorna adesso."
420
 
421
+ #: lib/yit-upgrade.php:289
422
+ msgid "You have to activate the plugin to benefit from automatic updates."
423
+ msgstr "Devi attivare il plugin per usufruire degli update automatici."
424
+
425
+ #: lib/yit-upgrade.php:311
426
  msgid "YITH Repository"
427
  msgstr "Repository YITH"
428
 
429
+ #: lib/yit-upgrade.php:345
430
  msgid "Invalid URL Provided."
431
  msgstr "L'URL inserito non è valido."
432
 
433
+ #: lib/yit-upgrade.php:358
434
  msgid "Could not create Temporary file."
435
  msgstr "Non è stato possibile creare il file temporaneo."
436
 
437
+ #: lib/yit-upgrade.php:531
438
  #, php-format
439
  msgid ""
440
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox "
445
  "yit-changelog-button\" title=\"%3$s\">Visualizza i dettagli della versione "
446
  "%4$s</a>."
447
 
448
+ #: lib/yit-upgrade.php:533
449
  #, php-format
450
  msgid ""
451
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox "
458
  "%4$s</a>. <em>Per poter usufruire degli aggiornamenti automatici è "
459
  "necessario attivare il plugin su un solo sito.</em>"
460
 
461
+ #: lib/yit-upgrade.php:535
462
  #, php-format
463
  msgid ""
464
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox "
473
  "plugin, per piacere <a href=\"%5$s\" title=\"License activation\">attiva</a> "
474
  "la tua copia di %6s.</em>"
475
 
476
+ #: lib/yit-upgrade.php:537
477
  #, php-format
478
  msgid ""
479
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox "
484
  "yit-changelog-button\" title=\"%3$s\">Visualizza i dettagli della versione "
485
  "%4$s</a> oppure <a href=\"%5$s\">aggiorna adesso</a>."
486
 
487
+ #: lib/yit-upgrade.php:610
488
  msgid "You can't update the plugins for this site."
489
  msgstr "Non è possibile aggiornare i plugin per questo sito."
490
 
491
+ #: lib/yit-upgrade.php:614
492
  msgid ""
493
  "You do not have sufficient permissions to update the plugins for this site."
494
  msgstr ""
495
  "Non sei in possesso delle autorizzazioni necessarie per aggiornare i plugin "
496
  "in questo sito."
497
 
498
+ #: lib/yit-upgrade.php:621
499
  msgid "Update Plugin"
500
  msgstr "Aggiorna plugin"
501
 
502
  #: licence/lib/yit-licence.php:186
503
  #, php-format
504
  msgctxt "%s = field name"
505
+ msgid "Please, insert a valid %s"
506
+ msgstr "Per favore, inserisci una %s valida"
507
 
508
  #: licence/lib/yit-licence.php:187
509
  #, php-format
510
+ msgid "Please, insert a valid %s and a valid %s"
511
+ msgstr "Per favore, inserire una %s valida ed una %s valida"
512
 
513
  #: licence/lib/yit-licence.php:188
514
  msgid "Unable to contact the remote server, please try again later. Thanks!"
515
  msgstr "Impossibile contattare il server remoto, prova più tardi. Grazie!"
516
 
517
  #: licence/lib/yit-licence.php:189
518
+ msgid "email address"
519
+ msgstr "email"
 
 
 
520
 
521
  #: licence/lib/yit-licence.php:190
522
+ msgid "license key"
523
+ msgstr "chiave di licenza"
 
 
 
524
 
525
  #: licence/lib/yit-licence.php:191
526
  msgid "Are you sure you want to deactivate the license for current site?"
527
  msgstr "Sei sicuro di voler disattivare la licenza per questo sito?"
528
 
529
+ #: licence/lib/yit-licence.php:734
530
  msgid "Invalid Request"
531
  msgstr "Richiesta non valida"
532
 
533
+ #: licence/lib/yit-licence.php:735
534
  msgid "Invalid license key"
535
  msgstr "Chiave di licenza non valida"
536
 
537
+ #: licence/lib/yit-licence.php:736
538
  msgid "Software has been deactivated"
539
  msgstr "Il software è stato disattivato"
540
 
541
+ #: licence/lib/yit-licence.php:737
542
  msgid "Maximum number of activations exceeded"
543
  msgstr "Hai raggiunto il numero massimo di attivazioni"
544
 
545
+ #: licence/lib/yit-licence.php:738
546
  msgid "Invalid instance ID"
547
  msgstr "Istanza ID non valida"
548
 
549
+ #: licence/lib/yit-licence.php:739
550
  msgid "Invalid security key"
551
  msgstr "Chiave di sicurezza non valida"
552
 
553
+ #: licence/lib/yit-licence.php:740
554
  msgid "License key has expired"
555
  msgstr "La chiave di licenza è scaduta"
556
 
557
+ #: licence/lib/yit-licence.php:741
558
  msgid "License key has been banned"
559
  msgstr "La chiave di licenza è stata bloccata"
560
 
561
+ #: licence/lib/yit-licence.php:742
562
  msgid "Current product is not included in your YITH Club Subscription key"
563
  msgstr "Questo prodotto non è incluso nella tua licenze YITH Club Subscription"
564
 
565
+ #: licence/lib/yit-licence.php:743
566
  msgid "Great"
567
  msgstr "Grande!"
568
 
569
+ #: licence/lib/yit-licence.php:743
570
  msgid "License successfully activated"
571
  msgstr "Licenza attivata con successo"
572
 
573
+ #: licence/lib/yit-licence.php:744
574
  msgid "License key deactivated for website"
575
  msgstr "Chiave di licenza disattivata per il sito web"
576
 
653
  msgid "Product Name"
654
  msgstr "Nome prodotto"
655
 
656
+ #: licence/templates/panel/activation/activation-panel.php:92
657
+ #: licence/templates/panel/activation/activation-panel.php:170
658
+ #: licence/templates/panel/activation/activation-panel.php:201
659
+ msgid "Email"
660
+ msgstr "Email"
661
+
662
+ #: licence/templates/panel/activation/activation-panel.php:93
663
+ #: licence/templates/panel/activation/activation-panel.php:171
664
+ #: licence/templates/panel/activation/activation-panel.php:202
665
+ msgid "License Key"
666
+ msgstr "Chiave di licenza"
667
+
668
  #: licence/templates/panel/activation/activation-panel.php:96
669
  #: licence/templates/panel/activation/activation-panel.php:205
670
  msgid "Expires"
860
  msgid "License"
861
  msgstr "Chiave di licenza"
862
 
863
+ #~ msgctxt "%s = field name"
864
+ #~ msgid "%s field cannot be empty"
865
+ #~ msgstr "Il campo %s non può essere vuoto"
866
+
867
+ #~ msgid "%s and %s fields cannot be empty"
868
+ #~ msgstr "I campi %s e %s non possono essere vuoti"
869
+
870
  #~ msgid "Hide sidebar"
871
  #~ msgstr "Nascondi barra laterale"
872
 
plugin-fw/languages/yith-plugin-fw.pot CHANGED
@@ -5,7 +5,7 @@ msgid ""
5
  msgstr ""
6
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
7
  "Report-Msgid-Bugs-To: Your Inspiration Themes <plugins@yithemes.com>\n"
8
- "POT-Creation-Date: 2018-08-02 16:02+0200\n"
9
  "PO-Revision-Date: 2015-05-05 10:38+0100\n"
10
  "Last-Translator: \n"
11
  "Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
@@ -13,7 +13,7 @@ msgstr ""
13
  "MIME-Version: 1.0\n"
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
- "X-Generator: Poedit 2.0.8\n"
17
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
18
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
19
  "esc_html_x:1,2c;_x;_ex\n"
@@ -255,7 +255,7 @@ msgstr ""
255
  msgid "Upload multiple files"
256
  msgstr ""
257
 
258
- #: lib/yit-plugin-panel-wc.php:382
259
  msgid "The changes you have made will be lost if you leave this page."
260
  msgstr ""
261
 
@@ -263,66 +263,66 @@ msgstr ""
263
  msgid "Plugin Settings"
264
  msgstr ""
265
 
266
- #: lib/yit-plugin-panel.php:330 lib/yit-plugin-panel.php:333
267
  msgid "How to install premium version"
268
  msgstr ""
269
 
270
- #: lib/yit-plugin-panel.php:384 lib/yit-plugin-subpanel.php:155
271
  #: templates/panel/woocommerce/woocommerce-form.php:11
272
  msgid "Save Changes"
273
  msgstr ""
274
 
275
- #: lib/yit-plugin-panel.php:387 lib/yit-plugin-subpanel.php:158
276
  #: templates/panel/woocommerce/woocommerce-form.php:14
277
  msgid "If you continue with this action, you will reset all options in this page."
278
  msgstr ""
279
 
280
- #: lib/yit-plugin-panel.php:389 lib/yit-plugin-subpanel.php:160
281
  msgid "Reset to default"
282
  msgstr ""
283
 
284
- #: lib/yit-plugin-panel.php:390 lib/yit-plugin-subpanel.php:161
285
  #: templates/panel/woocommerce/woocommerce-form.php:18
286
  msgid "Are you sure?"
287
  msgstr ""
288
 
289
- #: lib/yit-plugin-panel.php:524
290
  msgid "The element you have entered already exists. Please, enter another name."
291
  msgstr ""
292
 
293
- #: lib/yit-plugin-panel.php:525
294
  msgid "Settings saved"
295
  msgstr ""
296
 
297
- #: lib/yit-plugin-panel.php:526
298
  msgid "Settings reset"
299
  msgstr ""
300
 
301
- #: lib/yit-plugin-panel.php:527
302
  msgid "Element deleted correctly."
303
  msgstr ""
304
 
305
- #: lib/yit-plugin-panel.php:528 lib/yit-plugin-panel.php:529
306
  msgid "Element updated correctly."
307
  msgstr ""
308
 
309
- #: lib/yit-plugin-panel.php:530
310
  msgid "Database imported correctly."
311
  msgstr ""
312
 
313
- #: lib/yit-plugin-panel.php:531
314
  msgid "An error has occurred during import. Please try again."
315
  msgstr ""
316
 
317
- #: lib/yit-plugin-panel.php:532
318
  msgid "The added file is not valid."
319
  msgstr ""
320
 
321
- #: lib/yit-plugin-panel.php:533
322
  msgid "Sorry, import is disabled."
323
  msgstr ""
324
 
325
- #: lib/yit-plugin-panel.php:534
326
  msgid "Sorting successful."
327
  msgstr ""
328
 
@@ -360,43 +360,47 @@ msgid ""
360
  "Plugins tab."
361
  msgstr ""
362
 
363
- #: lib/yit-upgrade.php:89
364
  msgid "An unexpected error occurred, please try again later. Thanks!"
365
  msgstr ""
366
 
367
- #: lib/yit-upgrade.php:184
368
  msgid "There is a new version of %plugin_name% available."
369
  msgstr ""
370
 
371
- #: lib/yit-upgrade.php:185
372
  msgid "View version %latest% details."
373
  msgstr ""
374
 
375
- #: lib/yit-upgrade.php:186
376
  msgid "Automatic update is unavailable for this plugin,"
377
  msgstr ""
378
 
379
- #: lib/yit-upgrade.php:187
380
  msgid "please <a href=\"%activate_link%\">activate</a> your copy of %plugin_name%."
381
  msgstr ""
382
 
383
- #: lib/yit-upgrade.php:188
384
  msgid "Update now."
385
  msgstr ""
386
 
387
- #: lib/yit-upgrade.php:288
 
 
 
 
388
  msgid "YITH Repository"
389
  msgstr ""
390
 
391
- #: lib/yit-upgrade.php:322
392
  msgid "Invalid URL Provided."
393
  msgstr ""
394
 
395
- #: lib/yit-upgrade.php:335
396
  msgid "Could not create Temporary file."
397
  msgstr ""
398
 
399
- #: lib/yit-upgrade.php:495
400
  #, php-format
401
  msgid ""
402
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox yit-"
@@ -404,7 +408,7 @@ msgid ""
404
  "details</a>."
405
  msgstr ""
406
 
407
- #: lib/yit-upgrade.php:497
408
  #, php-format
409
  msgid ""
410
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox yit-"
@@ -413,7 +417,7 @@ msgid ""
413
  "to benefit from automatic updates.</em>"
414
  msgstr ""
415
 
416
- #: lib/yit-upgrade.php:499
417
  #, php-format
418
  msgid ""
419
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox yit-"
@@ -422,7 +426,7 @@ msgid ""
422
  "\"%5$s\" title=\"License activation\">activate</a> your copy of %6s.</em>"
423
  msgstr ""
424
 
425
- #: lib/yit-upgrade.php:501
426
  #, php-format
427
  msgid ""
428
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox yit-"
@@ -430,96 +434,90 @@ msgid ""
430
  "details</a> or <a href=\"%5$s\">update now</a>."
431
  msgstr ""
432
 
433
- #: lib/yit-upgrade.php:574
434
  msgid "You can't update the plugins for this site."
435
  msgstr ""
436
 
437
- #: lib/yit-upgrade.php:578
438
  msgid "You do not have sufficient permissions to update the plugins for this site."
439
  msgstr ""
440
 
441
- #: lib/yit-upgrade.php:585
442
  msgid "Update Plugin"
443
  msgstr ""
444
 
445
- #: licence/lib/yit-licence.php:187
446
  #, php-format
447
  msgctxt "%s = field name"
448
- msgid "%s field cannot be empty"
449
  msgstr ""
450
 
451
- #: licence/lib/yit-licence.php:188
452
  #, php-format
453
- msgid "%s and %s fields cannot be empty"
454
  msgstr ""
455
 
456
- #: licence/lib/yit-licence.php:189
457
  msgid "Unable to contact the remote server, please try again later. Thanks!"
458
  msgstr ""
459
 
460
- #: licence/lib/yit-licence.php:190
461
- #: licence/templates/panel/activation/activation-panel.php:88
462
- #: licence/templates/panel/activation/activation-panel.php:166
463
- #: licence/templates/panel/activation/activation-panel.php:197
464
- msgid "Email"
465
  msgstr ""
466
 
467
- #: licence/lib/yit-licence.php:191
468
- #: licence/templates/panel/activation/activation-panel.php:89
469
- #: licence/templates/panel/activation/activation-panel.php:167
470
- #: licence/templates/panel/activation/activation-panel.php:198
471
- msgid "License Key"
472
  msgstr ""
473
 
474
- #: licence/lib/yit-licence.php:192
475
  msgid "Are you sure you want to deactivate the license for current site?"
476
  msgstr ""
477
 
478
- #: licence/lib/yit-licence.php:678
479
  msgid "Invalid Request"
480
  msgstr ""
481
 
482
- #: licence/lib/yit-licence.php:679
483
  msgid "Invalid license key"
484
  msgstr ""
485
 
486
- #: licence/lib/yit-licence.php:680
487
  msgid "Software has been deactivated"
488
  msgstr ""
489
 
490
- #: licence/lib/yit-licence.php:681
491
  msgid "Maximum number of activations exceeded"
492
  msgstr ""
493
 
494
- #: licence/lib/yit-licence.php:682
495
  msgid "Invalid instance ID"
496
  msgstr ""
497
 
498
- #: licence/lib/yit-licence.php:683
499
  msgid "Invalid security key"
500
  msgstr ""
501
 
502
- #: licence/lib/yit-licence.php:684
503
  msgid "License key has expired"
504
  msgstr ""
505
 
506
- #: licence/lib/yit-licence.php:685
507
  msgid "License key has been banned"
508
  msgstr ""
509
 
510
- #: licence/lib/yit-licence.php:686
511
  msgid "Current product is not included in your YITH Club Subscription key"
512
  msgstr ""
513
 
514
- #: licence/lib/yit-licence.php:687
515
  msgid "Great"
516
  msgstr ""
517
 
518
- #: licence/lib/yit-licence.php:687
519
  msgid "License successfully activated"
520
  msgstr ""
521
 
522
- #: licence/lib/yit-licence.php:688
523
  msgid "License key deactivated for website"
524
  msgstr ""
525
 
@@ -554,84 +552,96 @@ msgid ""
554
  "section \"My licenses\"."
555
  msgstr ""
556
 
557
- #: licence/templates/panel/activation/activation-panel.php:23
558
  msgid "YITH License Activation"
559
  msgstr ""
560
 
561
- #: licence/templates/panel/activation/activation-panel.php:27
562
  msgid ""
563
  "Have you updated your licenses? Have you asked for an extension? Update "
564
  "information concerning your products."
565
  msgstr ""
566
 
567
- #: licence/templates/panel/activation/activation-panel.php:29
568
  msgid "Update license information"
569
  msgstr ""
570
 
571
- #: licence/templates/panel/activation/activation-panel.php:42
572
  msgid "Product to activate"
573
  msgid_plural "Products to activate"
574
  msgstr[0] ""
575
  msgstr[1] ""
576
 
577
- #: licence/templates/panel/activation/activation-panel.php:61
578
  msgid "Activate"
579
  msgstr ""
580
 
581
- #: licence/templates/panel/activation/activation-panel.php:80
582
  msgid "Activated"
583
  msgstr ""
584
 
585
- #: licence/templates/panel/activation/activation-panel.php:86
586
- #: licence/templates/panel/activation/activation-panel.php:164
587
- #: licence/templates/panel/activation/activation-panel.php:194
588
  msgid "Product Name"
589
  msgstr ""
590
 
591
  #: licence/templates/panel/activation/activation-panel.php:92
 
592
  #: licence/templates/panel/activation/activation-panel.php:201
 
 
 
 
 
 
 
 
 
 
 
593
  msgid "Expires"
594
  msgstr ""
595
 
596
- #: licence/templates/panel/activation/activation-panel.php:95
597
  msgid "Remaining"
598
  msgstr ""
599
 
600
- #: licence/templates/panel/activation/activation-panel.php:97
601
  msgid "Club Subscription"
602
  msgstr ""
603
 
604
- #: licence/templates/panel/activation/activation-panel.php:101
605
  msgid "License Actions"
606
  msgstr ""
607
 
608
- #: licence/templates/panel/activation/activation-panel.php:126
609
  #, php-format
610
  msgid "%1s out of %2s"
611
  msgstr ""
612
 
613
- #: licence/templates/panel/activation/activation-panel.php:142
614
  msgid "Deactivate"
615
  msgstr ""
616
 
617
- #: licence/templates/panel/activation/activation-panel.php:147
618
- #: licence/templates/panel/activation/activation-panel.php:204
619
  msgid "Renew"
620
  msgstr ""
621
 
622
- #: licence/templates/panel/activation/activation-panel.php:160
623
  msgid "Banned"
624
  msgstr ""
625
 
626
- #: licence/templates/panel/activation/activation-panel.php:190
627
  msgid "Expired"
628
  msgstr ""
629
 
630
- #: licence/templates/panel/activation/activation-panel.php:226
631
  msgid "Order again"
632
  msgstr ""
633
 
634
- #: licence/templates/panel/activation/activation-panel.php:228
635
  msgid "Renew license"
636
  msgstr ""
637
 
@@ -754,31 +764,31 @@ msgstr ""
754
  msgid "Reset Defaults"
755
  msgstr ""
756
 
757
- #: yit-plugin.php:76
758
  msgctxt "Plugin Row Meta"
759
  msgid "Live Demo"
760
  msgstr ""
761
 
762
- #: yit-plugin.php:81
763
  msgctxt "Plugin Row Meta"
764
  msgid "Documentation"
765
  msgstr ""
766
 
767
- #: yit-plugin.php:86
768
  msgctxt "Plugin Row Meta"
769
  msgid "Support"
770
  msgstr ""
771
 
772
- #: yit-plugin.php:91
773
  msgctxt "Plugin Row Meta"
774
  msgid "Premium version"
775
  msgstr ""
776
 
777
- #: yit-plugin.php:186
778
  msgctxt "Action links"
779
  msgid "Settings"
780
  msgstr ""
781
 
782
- #: yit-plugin.php:190
783
  msgid "License"
784
  msgstr ""
5
  msgstr ""
6
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
7
  "Report-Msgid-Bugs-To: Your Inspiration Themes <plugins@yithemes.com>\n"
8
+ "POT-Creation-Date: 2018-10-26 12:43+0200\n"
9
  "PO-Revision-Date: 2015-05-05 10:38+0100\n"
10
  "Last-Translator: \n"
11
  "Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
13
  "MIME-Version: 1.0\n"
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Generator: Poedit 2.2\n"
17
  "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
18
  "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
19
  "esc_html_x:1,2c;_x;_ex\n"
255
  msgid "Upload multiple files"
256
  msgstr ""
257
 
258
+ #: lib/yit-plugin-panel-wc.php:384
259
  msgid "The changes you have made will be lost if you leave this page."
260
  msgstr ""
261
 
263
  msgid "Plugin Settings"
264
  msgstr ""
265
 
266
+ #: lib/yit-plugin-panel.php:335 lib/yit-plugin-panel.php:338
267
  msgid "How to install premium version"
268
  msgstr ""
269
 
270
+ #: lib/yit-plugin-panel.php:389 lib/yit-plugin-subpanel.php:156
271
  #: templates/panel/woocommerce/woocommerce-form.php:11
272
  msgid "Save Changes"
273
  msgstr ""
274
 
275
+ #: lib/yit-plugin-panel.php:392 lib/yit-plugin-subpanel.php:159
276
  #: templates/panel/woocommerce/woocommerce-form.php:14
277
  msgid "If you continue with this action, you will reset all options in this page."
278
  msgstr ""
279
 
280
+ #: lib/yit-plugin-panel.php:394 lib/yit-plugin-subpanel.php:161
281
  msgid "Reset to default"
282
  msgstr ""
283
 
284
+ #: lib/yit-plugin-panel.php:395 lib/yit-plugin-subpanel.php:162
285
  #: templates/panel/woocommerce/woocommerce-form.php:18
286
  msgid "Are you sure?"
287
  msgstr ""
288
 
289
+ #: lib/yit-plugin-panel.php:529
290
  msgid "The element you have entered already exists. Please, enter another name."
291
  msgstr ""
292
 
293
+ #: lib/yit-plugin-panel.php:530
294
  msgid "Settings saved"
295
  msgstr ""
296
 
297
+ #: lib/yit-plugin-panel.php:531
298
  msgid "Settings reset"
299
  msgstr ""
300
 
301
+ #: lib/yit-plugin-panel.php:532
302
  msgid "Element deleted correctly."
303
  msgstr ""
304
 
305
+ #: lib/yit-plugin-panel.php:533 lib/yit-plugin-panel.php:534
306
  msgid "Element updated correctly."
307
  msgstr ""
308
 
309
+ #: lib/yit-plugin-panel.php:535
310
  msgid "Database imported correctly."
311
  msgstr ""
312
 
313
+ #: lib/yit-plugin-panel.php:536
314
  msgid "An error has occurred during import. Please try again."
315
  msgstr ""
316
 
317
+ #: lib/yit-plugin-panel.php:537
318
  msgid "The added file is not valid."
319
  msgstr ""
320
 
321
+ #: lib/yit-plugin-panel.php:538
322
  msgid "Sorry, import is disabled."
323
  msgstr ""
324
 
325
+ #: lib/yit-plugin-panel.php:539
326
  msgid "Sorting successful."
327
  msgstr ""
328
 
360
  "Plugins tab."
361
  msgstr ""
362
 
363
+ #: lib/yit-upgrade.php:95
364
  msgid "An unexpected error occurred, please try again later. Thanks!"
365
  msgstr ""
366
 
367
+ #: lib/yit-upgrade.php:190
368
  msgid "There is a new version of %plugin_name% available."
369
  msgstr ""
370
 
371
+ #: lib/yit-upgrade.php:191
372
  msgid "View version %latest% details."
373
  msgstr ""
374
 
375
+ #: lib/yit-upgrade.php:192
376
  msgid "Automatic update is unavailable for this plugin,"
377
  msgstr ""
378
 
379
+ #: lib/yit-upgrade.php:193
380
  msgid "please <a href=\"%activate_link%\">activate</a> your copy of %plugin_name%."
381
  msgstr ""
382
 
383
+ #: lib/yit-upgrade.php:194
384
  msgid "Update now."
385
  msgstr ""
386
 
387
+ #: lib/yit-upgrade.php:289
388
+ msgid "You have to activate the plugin to benefit from automatic updates."
389
+ msgstr ""
390
+
391
+ #: lib/yit-upgrade.php:311
392
  msgid "YITH Repository"
393
  msgstr ""
394
 
395
+ #: lib/yit-upgrade.php:345
396
  msgid "Invalid URL Provided."
397
  msgstr ""
398
 
399
+ #: lib/yit-upgrade.php:358
400
  msgid "Could not create Temporary file."
401
  msgstr ""
402
 
403
+ #: lib/yit-upgrade.php:531
404
  #, php-format
405
  msgid ""
406
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox yit-"
408
  "details</a>."
409
  msgstr ""
410
 
411
+ #: lib/yit-upgrade.php:533
412
  #, php-format
413
  msgid ""
414
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox yit-"
417
  "to benefit from automatic updates.</em>"
418
  msgstr ""
419
 
420
+ #: lib/yit-upgrade.php:535
421
  #, php-format
422
  msgid ""
423
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox yit-"
426
  "\"%5$s\" title=\"License activation\">activate</a> your copy of %6s.</em>"
427
  msgstr ""
428
 
429
+ #: lib/yit-upgrade.php:537
430
  #, php-format
431
  msgid ""
432
  "There is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox yit-"
434
  "details</a> or <a href=\"%5$s\">update now</a>."
435
  msgstr ""
436
 
437
+ #: lib/yit-upgrade.php:610
438
  msgid "You can't update the plugins for this site."
439
  msgstr ""
440
 
441
+ #: lib/yit-upgrade.php:614
442
  msgid "You do not have sufficient permissions to update the plugins for this site."
443
  msgstr ""
444
 
445
+ #: lib/yit-upgrade.php:621
446
  msgid "Update Plugin"
447
  msgstr ""
448
 
449
+ #: licence/lib/yit-licence.php:186
450
  #, php-format
451
  msgctxt "%s = field name"
452
+ msgid "Please, insert a valid %s"
453
  msgstr ""
454
 
455
+ #: licence/lib/yit-licence.php:187
456
  #, php-format
457
+ msgid "Please, insert a valid %s and a valid %s"
458
  msgstr ""
459
 
460
+ #: licence/lib/yit-licence.php:188
461
  msgid "Unable to contact the remote server, please try again later. Thanks!"
462
  msgstr ""
463
 
464
+ #: licence/lib/yit-licence.php:189
465
+ msgid "email address"
 
 
 
466
  msgstr ""
467
 
468
+ #: licence/lib/yit-licence.php:190
469
+ msgid "license key"
 
 
 
470
  msgstr ""
471
 
472
+ #: licence/lib/yit-licence.php:191
473
  msgid "Are you sure you want to deactivate the license for current site?"
474
  msgstr ""
475
 
476
+ #: licence/lib/yit-licence.php:734
477
  msgid "Invalid Request"
478
  msgstr ""
479
 
480
+ #: licence/lib/yit-licence.php:735
481
  msgid "Invalid license key"
482
  msgstr ""
483
 
484
+ #: licence/lib/yit-licence.php:736
485
  msgid "Software has been deactivated"
486
  msgstr ""
487
 
488
+ #: licence/lib/yit-licence.php:737
489
  msgid "Maximum number of activations exceeded"
490
  msgstr ""
491
 
492
+ #: licence/lib/yit-licence.php:738
493
  msgid "Invalid instance ID"
494
  msgstr ""
495
 
496
+ #: licence/lib/yit-licence.php:739
497
  msgid "Invalid security key"
498
  msgstr ""
499
 
500
+ #: licence/lib/yit-licence.php:740
501
  msgid "License key has expired"
502
  msgstr ""
503
 
504
+ #: licence/lib/yit-licence.php:741
505
  msgid "License key has been banned"
506
  msgstr ""
507
 
508
+ #: licence/lib/yit-licence.php:742
509
  msgid "Current product is not included in your YITH Club Subscription key"
510
  msgstr ""
511
 
512
+ #: licence/lib/yit-licence.php:743
513
  msgid "Great"
514
  msgstr ""
515
 
516
+ #: licence/lib/yit-licence.php:743
517
  msgid "License successfully activated"
518
  msgstr ""
519
 
520
+ #: licence/lib/yit-licence.php:744
521
  msgid "License key deactivated for website"
522
  msgstr ""
523
 
552
  "section \"My licenses\"."
553
  msgstr ""
554
 
555
+ #: licence/templates/panel/activation/activation-panel.php:24
556
  msgid "YITH License Activation"
557
  msgstr ""
558
 
559
+ #: licence/templates/panel/activation/activation-panel.php:28
560
  msgid ""
561
  "Have you updated your licenses? Have you asked for an extension? Update "
562
  "information concerning your products."
563
  msgstr ""
564
 
565
+ #: licence/templates/panel/activation/activation-panel.php:30
566
  msgid "Update license information"
567
  msgstr ""
568
 
569
+ #: licence/templates/panel/activation/activation-panel.php:43
570
  msgid "Product to activate"
571
  msgid_plural "Products to activate"
572
  msgstr[0] ""
573
  msgstr[1] ""
574
 
575
+ #: licence/templates/panel/activation/activation-panel.php:65
576
  msgid "Activate"
577
  msgstr ""
578
 
579
+ #: licence/templates/panel/activation/activation-panel.php:84
580
  msgid "Activated"
581
  msgstr ""
582
 
583
+ #: licence/templates/panel/activation/activation-panel.php:90
584
+ #: licence/templates/panel/activation/activation-panel.php:168
585
+ #: licence/templates/panel/activation/activation-panel.php:198
586
  msgid "Product Name"
587
  msgstr ""
588
 
589
  #: licence/templates/panel/activation/activation-panel.php:92
590
+ #: licence/templates/panel/activation/activation-panel.php:170
591
  #: licence/templates/panel/activation/activation-panel.php:201
592
+ msgid "Email"
593
+ msgstr ""
594
+
595
+ #: licence/templates/panel/activation/activation-panel.php:93
596
+ #: licence/templates/panel/activation/activation-panel.php:171
597
+ #: licence/templates/panel/activation/activation-panel.php:202
598
+ msgid "License Key"
599
+ msgstr ""
600
+
601
+ #: licence/templates/panel/activation/activation-panel.php:96
602
+ #: licence/templates/panel/activation/activation-panel.php:205
603
  msgid "Expires"
604
  msgstr ""
605
 
606
+ #: licence/templates/panel/activation/activation-panel.php:99
607
  msgid "Remaining"
608
  msgstr ""
609
 
610
+ #: licence/templates/panel/activation/activation-panel.php:101
611
  msgid "Club Subscription"
612
  msgstr ""
613
 
614
+ #: licence/templates/panel/activation/activation-panel.php:105
615
  msgid "License Actions"
616
  msgstr ""
617
 
618
+ #: licence/templates/panel/activation/activation-panel.php:130
619
  #, php-format
620
  msgid "%1s out of %2s"
621
  msgstr ""
622
 
623
+ #: licence/templates/panel/activation/activation-panel.php:146
624
  msgid "Deactivate"
625
  msgstr ""
626
 
627
+ #: licence/templates/panel/activation/activation-panel.php:151
628
+ #: licence/templates/panel/activation/activation-panel.php:208
629
  msgid "Renew"
630
  msgstr ""
631
 
632
+ #: licence/templates/panel/activation/activation-panel.php:164
633
  msgid "Banned"
634
  msgstr ""
635
 
636
+ #: licence/templates/panel/activation/activation-panel.php:194
637
  msgid "Expired"
638
  msgstr ""
639
 
640
+ #: licence/templates/panel/activation/activation-panel.php:230
641
  msgid "Order again"
642
  msgstr ""
643
 
644
+ #: licence/templates/panel/activation/activation-panel.php:232
645
  msgid "Renew license"
646
  msgstr ""
647
 
764
  msgid "Reset Defaults"
765
  msgstr ""
766
 
767
+ #: yit-plugin.php:77
768
  msgctxt "Plugin Row Meta"
769
  msgid "Live Demo"
770
  msgstr ""
771
 
772
+ #: yit-plugin.php:82
773
  msgctxt "Plugin Row Meta"
774
  msgid "Documentation"
775
  msgstr ""
776
 
777
+ #: yit-plugin.php:87
778
  msgctxt "Plugin Row Meta"
779
  msgid "Support"
780
  msgstr ""
781
 
782
+ #: yit-plugin.php:92
783
  msgctxt "Plugin Row Meta"
784
  msgid "Premium version"
785
  msgstr ""
786
 
787
+ #: yit-plugin.php:187
788
  msgctxt "Action links"
789
  msgid "Settings"
790
  msgstr ""
791
 
792
+ #: yit-plugin.php:191
793
  msgid "License"
794
  msgstr ""
plugin-fw/lib/promo/yith-promo.php CHANGED
@@ -8,134 +8,160 @@
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
- if( apply_filters( 'yith_plugin_fw_notice', true ) ){
12
- add_action( 'admin_notices', 'yith_plugin_fw_promo_notices', 15 );
13
- add_action( 'admin_enqueue_scripts', 'yith_plugin_fw_notice_dismiss', 20 );
14
-
15
- if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
16
- function yith_plugin_fw_promo_notices(){
17
- $base_url = apply_filters( 'yith_plugin_fw_promo_base_url', 'https://update.yithemes.com/promo/' );;
18
- $xml = apply_filters( 'yith_plugin_fw_promo_xml_url', $base_url . 'yith-promo.xml' );
19
- $transient = "yith_promo_message";
20
- $remote_data = get_site_transient( $transient );
21
- $regenerate_promo_transient = isset( $_GET['yith_regenerate_promo_transient'] ) && 'yes' == $_GET['yith_regenerate_promo_transient'] ? $_GET['yith_regenerate_promo_transient'] : '';
22
- $promo_data = false;
23
- $create_transient = false;
24
-
25
- if( false === $remote_data || apply_filters( 'yith_plugin_fw_force_regenerate_promo_transient', false ) || 'yes' == $regenerate_promo_transient ){
26
- $remote_data = wp_remote_get( $xml );
27
- $create_transient = true;
28
- }
29
-
30
- if ( ! is_wp_error( $remote_data ) && isset( $remote_data['response']['code'] ) && '200' == $remote_data['response']['code'] ) {
31
- $promo_data = @simplexml_load_string( $remote_data['body'] );
32
-
33
- if( true === $create_transient ){
34
- $xml_expiry_date = ! empty( $promo_data->expiry_date ) ? $promo_data->expiry_date : '';
35
- //Set Site Transient
36
- set_site_transient( $transient, $remote_data, yith_plugin_fw_get_promo_transient_expiry_date( $xml_expiry_date ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  }
38
 
39
- if ( $promo_data && ! empty( $promo_data->promo ) ) {
40
- $now = strtotime( current_time( 'Y-m-d' ), 1 );
41
- foreach ($promo_data as $promo ){
42
- $start_date = isset( $promo->start_date ) ? $promo->start_date : '';
43
- $end_date = isset( $promo->end_date ) ? $promo->end_date : '';
44
-
45
- if( ! empty( $start_date ) && ! empty( $end_date ) ){
46
- $start_date = strtotime( $start_date );
47
- $end_date = strtotime( $end_date );
48
-
49
- if( $end_date >= $start_date && $now >= $start_date && $now <= $end_date ){
50
- //is valid promo
51
- $title = isset( $promo->title ) ? $promo->title : '';
52
- $description = isset( $promo->description ) ? $promo->description : '';
53
- $url = isset( $promo->link->url ) ? $promo->link->url : '';
54
- $url_label = isset( $promo->link->label ) ? $promo->link->label : '';
55
- $border_color = isset( $promo->style->border_color ) ? $promo->style->border_color : '';
56
- $background_color = isset( $promo->style->background_color ) ? $promo->style->background_color : '';
57
- $promo_id = isset( $promo->promo_id ) ? $promo->promo_id : '';
58
- $banner = isset( $promo->banner ) ? $promo->banner : '';
59
- $style = $link = '';
60
- $show_notice = false;
61
-
62
- if( ! empty( $border_color ) ){
63
- $style .= "border-left-color: {$border_color};";
64
- }
65
-
66
- if( ! empty( $background_color ) ){
67
- $style .= "background-color: {$background_color};";
68
- }
69
-
70
- if( ! empty( $title ) ) {
71
- $promo_id .= $title;
72
- $title = sprintf( '<strong>%s</strong>: ', $title );
73
- $show_notice = true;
74
- }
75
-
76
- if( ! empty( $description ) ) {
77
- $promo_id .= $description;
78
- $description = sprintf( '%s', $description );
79
- $show_notice = true;
80
- }
81
-
82
- if( ! empty( $url ) && ! empty( $url_label )) {
83
- $promo_id .= $url . $url_label;
84
- $link = sprintf( '<a href="%s" target="_blank">%s</a>', $url, $url_label );
85
- $show_notice = true;
86
- }
87
-
88
- if( ! empty( $banner ) ){
89
- $banner = sprintf( '<img src="%s" class="yith-promo-banner-image">', $base_url . $banner );
90
-
91
- if( ! empty( $url ) ){
92
- $banner = sprintf( '<a href="%s" target="_blank">%s</a>', $url, $banner);
93
- }
94
- }
95
-
96
- $unique_promo_id = "yith-notice-" . md5 ( $promo_id );
97
-
98
- if( ! empty( $_COOKIE[ 'hide_' . $unique_promo_id ] ) && 'yes' == $_COOKIE[ 'hide_' . $unique_promo_id ] ){
99
- $show_notice = false;
100
- }
101
-
102
- if ( true === $show_notice ) :
103
- ?>
104
- <div id="<?php echo $unique_promo_id; ?>" class="yith-notice-is-dismissible notice notice-yith notice-alt is-dismissible" style="<?php echo $style; ?>" data-expiry= <?php echo $promo->end_date; ?>>
105
- <p>
106
- <?php if( ! empty( $banner ) ) { printf( '%s', $banner ); } ?>
107
- <?php printf( "%s %s %s", $title, $description, $link ); ?>
108
- </p>
109
- </div>
110
- <?php endif;
111
- }
112
- }
113
- }
114
  }
115
- }
116
- }
117
- }
118
 
119
- if( ! function_exists( 'yith_plugin_fw_notice_dismiss' ) ){
120
- function yith_plugin_fw_notice_dismiss(){
121
- $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
122
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
123
- wp_register_script( 'yith-promo', $script_path . '/assets/js/yith-promo' . $suffix . '.js', array( 'jquery' ), '1.0.0', true );
124
- wp_enqueue_script( 'yith-promo' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  }
126
  }
 
127
 
128
- if( ! function_exists( 'yith_plugin_fw_get_promo_transient_expiry_date' ) ){
129
- function yith_plugin_fw_get_promo_transient_expiry_date( $expiry_date ) {
130
- $xml_expiry_date = ! empty( $expiry_date ) ? $expiry_date : '+6 hours';
131
- $current = strtotime( current_time( 'Y-m-d H:i:s', 1 ) );
132
- $expiry_date = strtotime( $xml_expiry_date, $current );
 
 
133
 
134
- if( $expiry_date <= $current ){
135
- $expiry_date = strtotime( '+24 hours', $current );
136
- }
 
 
137
 
138
- return $expiry_date;
 
139
  }
140
- }
 
 
141
  }
8
  * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
+ if( ! function_exists( 'simplexml_load_string' ) ){
12
+ return false;
13
+ }
14
+
15
+ add_action( 'admin_notices', 'yith_plugin_fw_promo_notices', 15 );
16
+ add_action( 'admin_enqueue_scripts', 'yith_plugin_fw_notice_dismiss', 20 );
17
+
18
+ if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
19
+ function yith_plugin_fw_promo_notices(){
20
+ $base_url = apply_filters( 'yith_plugin_fw_promo_base_url', 'https://update.yithemes.com/promo/hotlink-ok' );
21
+ $xml = apply_filters( 'yith_plugin_fw_promo_xml_url', $base_url . 'yith-promo.xml' );
22
+ $transient = "yith_promo_message";
23
+ $remote_data = get_site_transient( $transient );
24
+ $regenerate_promo_transient = isset( $_GET['yith_regenerate_promo_transient'] ) && 'yes' == $_GET['yith_regenerate_promo_transient'] ? $_GET['yith_regenerate_promo_transient'] : '';
25
+ $promo_data = false;
26
+ $create_transient = false;
27
+
28
+ if( false === $remote_data || apply_filters( 'yith_plugin_fw_force_regenerate_promo_transient', false ) || 'yes' == $regenerate_promo_transient ){
29
+ $remote_data = wp_remote_get( $xml );
30
+ $create_transient = true;
31
+ }
32
+
33
+ if ( ! is_wp_error( $remote_data ) && isset( $remote_data['response']['code'] ) && '200' == $remote_data['response']['code'] ) {
34
+ $promo_data = @simplexml_load_string( $remote_data['body'] );
35
+
36
+ if( true === $create_transient ){
37
+ $is_membership_user = false;
38
+ $license = YIT_Plugin_Licence()->get_licence();
39
+ $xml_expiry_date = '';
40
+
41
+ if( is_array( $license ) ){
42
+ foreach( $license as $plugin => $data ){
43
+ if( ! empty( $data['is_membership'] ) ){
44
+ $is_membership_user = true;
45
+ $xml_expiry_date = $data['licence_expires'];
46
+ $remote_data = $promo_data = array();
47
+ break;
48
+ }
49
+ }
50
  }
51
 
52
+ if( empty( $is_membership_user ) && ! empty( $promo_data->expiry_date ) ){
53
+ $xml_expiry_date = $promo_data->expiry_date;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  }
 
 
 
55
 
56
+ //Set Site Transient
57
+ set_site_transient( $transient, $remote_data, yith_plugin_fw_get_promo_transient_expiry_date( $xml_expiry_date ) );
58
+ }
59
+
60
+ if ( $promo_data && ! empty( $promo_data->promo ) ) {
61
+ $now = strtotime( current_time( 'mysql' ) );
62
+
63
+ foreach ($promo_data->promo as $promo ){
64
+ $start_date = isset( $promo->start_date ) ? $promo->start_date : '';
65
+ $end_date = isset( $promo->end_date ) ? $promo->end_date : '';
66
+
67
+ if( ! empty( $start_date ) && ! empty( $end_date ) ){
68
+ $start_date = strtotime( $start_date );
69
+ $end_date = strtotime( $end_date );
70
+
71
+ if( $end_date >= $start_date && $now >= $start_date && $now <= $end_date ){
72
+ //is valid promo
73
+ $title = isset( $promo->title ) ? $promo->title : '';
74
+ $description = isset( $promo->description ) ? $promo->description : '';
75
+ $url = isset( $promo->link->url ) ? $promo->link->url : '';
76
+ $url_label = isset( $promo->link->label ) ? $promo->link->label : '';
77
+ $image_bg_color = isset( $promo->style->image_bg_color ) ? $promo->style->image_bg_color : '';
78
+ $border_color = isset( $promo->style->border_color ) ? $promo->style->border_color : '';
79
+ $background_color = isset( $promo->style->background_color ) ? $promo->style->background_color : '';
80
+ $promo_id = isset( $promo->promo_id ) ? $promo->promo_id : '';
81
+ $banner = isset( $promo->banner ) ? $promo->banner : '';
82
+ $style = $link = '';
83
+ $show_notice = false;
84
+
85
+ if( ! empty( $border_color ) ){
86
+ $style .= "border-left-color: {$border_color};";
87
+ }
88
+
89
+ if( ! empty( $background_color ) ){
90
+ $style .= "background-color: {$background_color};";
91
+ }
92
+
93
+ if( ! empty( $image_bg_color ) ){
94
+ $image_bg_color = "background-color: {$image_bg_color};";
95
+ }
96
+
97
+ if( ! empty( $title ) ) {
98
+ $promo_id .= $title;
99
+ $title = sprintf( '<strong>%s</strong>: ', $title );
100
+ $show_notice = true;
101
+ }
102
+
103
+ if( ! empty( $description ) ) {
104
+ $promo_id .= $description;
105
+ $description = sprintf( '%s', $description );
106
+ $show_notice = true;
107
+ }
108
+
109
+ if( ! empty( $url ) && ! empty( $url_label )) {
110
+ $promo_id .= $url . $url_label;
111
+ $link = sprintf( '<a href="%s" target="_blank">%s</a>', $url, $url_label );
112
+ $show_notice = true;
113
+ }
114
+
115
+ if( ! empty( $banner ) ){
116
+ $banner = sprintf( '<img src="%s" class="yith-promo-banner-image">', $base_url . $banner );
117
+
118
+ if( ! empty( $url ) ){
119
+ $banner = sprintf( '<a class="yith-promo-banner-image-link" href="%s" target="_blank" style="%s">%s</a>', $url, $image_bg_color, $banner);
120
+ }
121
+ }
122
+
123
+ $unique_promo_id = "yith-notice-" . md5 ( $promo_id );
124
+
125
+ if( ! empty( $_COOKIE[ 'hide_' . $unique_promo_id ] ) && 'yes' == $_COOKIE[ 'hide_' . $unique_promo_id ] ){
126
+ $show_notice = false;
127
+ }
128
+
129
+ if ( true === $show_notice ) :
130
+ wp_enqueue_script( 'yith-promo' );
131
+ ?>
132
+ <div id="<?php echo $unique_promo_id; ?>" class="yith-notice-is-dismissible notice notice-yith notice-alt is-dismissible" style="<?php echo $style; ?>" data-expiry= <?php echo $promo->end_date; ?>>
133
+ <p>
134
+ <?php if( ! empty( $banner ) ) { printf( '%s', $banner ); } ?>
135
+ <?php printf( "%s %s %s", $title, $description, $link ); ?>
136
+ </p>
137
+ </div>
138
+ <?php endif;
139
+ }
140
+ }
141
+ }
142
+ }
143
  }
144
  }
145
+ }
146
 
147
+ if( ! function_exists( 'yith_plugin_fw_notice_dismiss' ) ){
148
+ function yith_plugin_fw_notice_dismiss(){
149
+ $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
150
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
151
+ wp_register_script( 'yith-promo', $script_path . '/assets/js/yith-promo' . $suffix . '.js', array( 'jquery' ), '1.0.0', true );
152
+ }
153
+ }
154
 
155
+ if( ! function_exists( 'yith_plugin_fw_get_promo_transient_expiry_date' ) ){
156
+ function yith_plugin_fw_get_promo_transient_expiry_date( $expiry_date ) {
157
+ $xml_expiry_date = ! empty( $expiry_date ) ? $expiry_date : '+24 hours';
158
+ $current = strtotime( current_time( 'Y-m-d H:i:s' ) );
159
+ $expiry_date = strtotime( $xml_expiry_date, $current );
160
 
161
+ if( $expiry_date <= $current ){
162
+ $expiry_date = strtotime( '+24 hours', $current );
163
  }
164
+
165
+ return $expiry_date;
166
+ }
167
  }
plugin-fw/lib/yit-plugin-panel-wc.php CHANGED
@@ -325,7 +325,7 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
325
  do_action( 'yit_panel_wc_after_update' );
326
 
327
  } elseif ( isset( $_REQUEST[ 'yit-action' ] ) && $_REQUEST[ 'yit-action' ] == 'wc-options-reset'
328
- && isset( $_POST[ 'yith_wc_reset_options_nonce' ] ) && wp_verify_nonce( $_POST[ 'yith_wc_reset_options_nonce' ], 'yith_wc_reset_options_' . $this->settings[ 'page' ] )
329
  ) {
330
 
331
  do_action( 'yit_panel_wc_before_reset' );
@@ -551,7 +551,12 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
551
  $field[ 'id' ] = isset( $field[ 'id' ] ) ? $field[ 'id' ] : '';
552
  $field[ 'name' ] = $field[ 'id' ];
553
  $field[ 'default' ] = isset( $field[ 'default' ] ) ? $field[ 'default' ] : '';
554
- $field[ 'value' ] = WC_Admin_Settings::get_option( $field[ 'id' ], $field[ 'default' ] );
 
 
 
 
 
555
 
556
  require( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/woocommerce/woocommerce-option-row.php' );
557
  }
325
  do_action( 'yit_panel_wc_after_update' );
326
 
327
  } elseif ( isset( $_REQUEST[ 'yit-action' ] ) && $_REQUEST[ 'yit-action' ] == 'wc-options-reset'
328
+ && isset( $_POST[ 'yith_wc_reset_options_nonce' ] ) && wp_verify_nonce( $_POST[ 'yith_wc_reset_options_nonce' ], 'yith_wc_reset_options_' . $this->settings[ 'page' ] )
329
  ) {
330
 
331
  do_action( 'yit_panel_wc_before_reset' );
551
  $field[ 'id' ] = isset( $field[ 'id' ] ) ? $field[ 'id' ] : '';
552
  $field[ 'name' ] = $field[ 'id' ];
553
  $field[ 'default' ] = isset( $field[ 'default' ] ) ? $field[ 'default' ] : '';
554
+
555
+ $value = apply_filters( 'yith_plugin_fw_wc_panel_pre_field_value', null, $field );
556
+ if ( is_null( $value ) ) {
557
+ $value = WC_Admin_Settings::get_option( $field[ 'id' ], $field[ 'default' ] );
558
+ }
559
+ $field[ 'value' ] = $value;
560
 
561
  require( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/woocommerce/woocommerce-option-row.php' );
562
  }
plugin-fw/lib/yit-plugin-panel.php CHANGED
@@ -158,7 +158,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
158
 
159
  // YITH text must not be translated
160
  if ( !!$show ) {
161
- add_menu_page( 'yith_plugin_panel', 'YITH', $capability, 'yith_plugin_panel', null, YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png', $position );
162
  $admin_page_hooks[ 'yith_plugin_panel' ] = 'yith-plugins'; // prevent issues for backward compatibility
163
  }
164
  }
@@ -337,6 +337,13 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
337
  '//support.yithemes.com/hc/en-us/articles/217840988',
338
  __( 'How to install premium version', 'yith-plugin-fw' ),
339
  );
 
 
 
 
 
 
 
340
  }
341
  }
342
 
158
 
159
  // YITH text must not be translated
160
  if ( !!$show ) {
161
+ add_menu_page( 'yith_plugin_panel', 'YITH', $capability, 'yith_plugin_panel', null, yith_plugin_fw_get_default_logo(), $position );
162
  $admin_page_hooks[ 'yith_plugin_panel' ] = 'yith-plugins'; // prevent issues for backward compatibility
163
  }
164
  }
337
  '//support.yithemes.com/hc/en-us/articles/217840988',
338
  __( 'How to install premium version', 'yith-plugin-fw' ),
339
  );
340
+
341
+ $submenu[ 'yith_plugin_panel' ][ 'frequently_license_issues' ] = array(
342
+ sprintf( '%s%s%s', '<span id="yith-license-issues-premium">', __( 'Frequently license issues', 'yith-plugin-fw' ), '</span>' ),
343
+ 'install_plugins',
344
+ '//support.yithemes.com/hc/en-us/articles/360012568594-License-activation-issues',
345
+ __( 'Frequently license issues', 'yith-plugin-fw' ),
346
+ );
347
  }
348
  }
349
 
plugin-fw/lib/yit-plugin-subpanel.php CHANGED
@@ -88,7 +88,7 @@ if ( !class_exists( 'YIT_Plugin_SubPanel' ) ) {
88
  */
89
  public function add_setting_page() {
90
  global $admin_page_hooks;
91
- $logo = YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png';
92
 
93
  $admin_logo = function_exists( 'yit_get_option' ) ? yit_get_option( 'admin-logo-menu' ) : '';
94
 
88
  */
89
  public function add_setting_page() {
90
  global $admin_page_hooks;
91
+ $logo = yith_plugin_fw_get_default_logo();
92
 
93
  $admin_logo = function_exists( 'yit_get_option' ) ? yit_get_option( 'admin-logo-menu' ) : '';
94
 
plugin-fw/lib/yit-upgrade.php CHANGED
@@ -236,12 +236,23 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
236
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
237
  */
238
  public function upgrader_pre_download( $reply, $package, $upgrader ) {
239
- $plugin = false;
240
- $is_bulk = $upgrader->skin instanceof Bulk_Plugin_Upgrader_Skin;
 
241
 
242
- if ( ! $is_bulk ) {
 
243
  $plugin = isset( $upgrader->skin->plugin ) ? $upgrader->skin->plugin : false;
244
- } else {
 
 
 
 
 
 
 
 
 
245
  //Bulk action upgrade
246
  $action_url = parse_url( $upgrader->skin->options['url'] );
247
  parse_str( rawurldecode( htmlspecialchars_decode( $action_url['query'] ) ), $output );
@@ -273,6 +284,11 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
273
 
274
  $licence = YIT_Plugin_Licence()->get_licence();
275
  $product_id = $plugin_info['product_id'];
 
 
 
 
 
276
  $args = array(
277
  'email' => $licence[ $product_id ]['email'],
278
  'licence_key' => $licence[ $product_id ]['licence_key'],
@@ -326,7 +342,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
326
 
327
  //WARNING: The file is not automatically deleted, The script must unlink() the file.
328
  if ( ! $url ) {
329
- return new WP_Error( 'http_no_url', __( 'Invalid URL Provided.', 'yit' ) );
330
  }
331
 
332
  $tmpfname = wp_tempnam( $url );
@@ -339,7 +355,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
339
  );
340
 
341
  if ( ! $tmpfname ) {
342
- return new WP_Error( 'http_no_file', __( 'Could not create Temporary file.', 'yit' ) );
343
  }
344
 
345
  $response = wp_safe_remote_post( $url, $args );
236
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
237
  */
238
  public function upgrader_pre_download( $reply, $package, $upgrader ) {
239
+ $plugin = false;
240
+ $is_bulk = $upgrader->skin instanceof Bulk_Plugin_Upgrader_Skin;
241
+ $is_bulk_ajax = $upgrader->skin instanceof WP_Ajax_Upgrader_Skin;
242
 
243
+ if ( ! $is_bulk && ! $is_bulk_ajax ) {
244
+ //Bulk Action: Support for old WordPress Version
245
  $plugin = isset( $upgrader->skin->plugin ) ? $upgrader->skin->plugin : false;
246
+ }
247
+
248
+ elseif( $is_bulk_ajax ){
249
+ //Bulk Update for WordPress 4.9 or greater
250
+ if( ! empty( $_POST['plugin'] ) ){
251
+ $plugin = plugin_basename( sanitize_text_field( wp_unslash( $_POST['plugin'] ) ) );
252
+ }
253
+ }
254
+
255
+ else {
256
  //Bulk action upgrade
257
  $action_url = parse_url( $upgrader->skin->options['url'] );
258
  parse_str( rawurldecode( htmlspecialchars_decode( $action_url['query'] ) ), $output );
284
 
285
  $licence = YIT_Plugin_Licence()->get_licence();
286
  $product_id = $plugin_info['product_id'];
287
+
288
+ if( empty( $licence[ $product_id ] ) ){
289
+ return new WP_Error( 'license_not_valid', __( 'You have to activate the plugin to benefit from automatic updates.', '[Update Plugin Message: License not enabled]', 'yith-plugin-fw' ) );
290
+ }
291
+
292
  $args = array(
293
  'email' => $licence[ $product_id ]['email'],
294
  'licence_key' => $licence[ $product_id ]['licence_key'],
342
 
343
  //WARNING: The file is not automatically deleted, The script must unlink() the file.
344
  if ( ! $url ) {
345
+ return new WP_Error( 'http_no_url', __( 'Invalid URL Provided.', 'yith-plugin-fw' ) );
346
  }
347
 
348
  $tmpfname = wp_tempnam( $url );
355
  );
356
 
357
  if ( ! $tmpfname ) {
358
+ return new WP_Error( 'http_no_file', __( 'Could not create Temporary file.', 'yith-plugin-fw' ) );
359
  }
360
 
361
  $response = wp_safe_remote_post( $url, $args );
plugin-fw/lib/yith-gutenberg.php ADDED
@@ -0,0 +1,321 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Framework.
4
+ *
5
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.txt
9
+ */
10
+
11
+ /**
12
+ * Text Domain: yith-plugin-fw
13
+ */
14
+
15
+ if ( ! defined( 'ABSPATH' ) ) {
16
+ exit;
17
+ } // Exit if accessed directly
18
+
19
+ if( ! class_exists( 'YITH_Gutenberg' ) ){
20
+
21
+ class YITH_Gutenberg{
22
+ /**
23
+ * @var array Registered blocks
24
+ */
25
+ private $_registered_blocks = array();
26
+
27
+ /**
28
+ * @var array Blocks to register
29
+ */
30
+ private $_to_register_blocks = array();
31
+
32
+ /**
33
+ * @var array Blocks args
34
+ */
35
+ private $_blocks_args = array();
36
+
37
+ /**
38
+ * @var string Block category slug
39
+ */
40
+ private $_category_slug = 'yith-blocks';
41
+
42
+ /**
43
+ * @var YIT_Upgrade The main instance
44
+ */
45
+ protected static $_instance;
46
+
47
+ /**
48
+ * Main plugin Instance
49
+ *
50
+ * @static
51
+ * @return object Main instance
52
+ *
53
+ * @since 1.0
54
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
55
+ */
56
+ public static function instance() {
57
+ if ( is_null( self::$_instance ) ) {
58
+ self::$_instance = new self();
59
+ }
60
+
61
+ return self::$_instance;
62
+ }
63
+
64
+ /**
65
+ * YITH_Gutenberg constructor.
66
+ */
67
+ private function __construct() {
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
+ * Enqueue scripts for gutenberg
76
+ */
77
+ public function enqueue_block_editor_assets() {
78
+ $ajax_url = function_exists( 'WC' ) ? add_query_arg( 'wc-ajax', 'yith_plugin_fw_gutenberg_do_shortcode', trailingslashit( site_url() ) ) : admin_url( 'admin-ajax.php' );
79
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
80
+ $deps = apply_filters( 'yith_plugin_fw_gutenberg_script_deps', array(
81
+ 'wp-blocks',
82
+ 'wp-element',
83
+ 'yith-js-md5'
84
+ ) );
85
+ wp_register_script( 'yith-js-md5', YIT_CORE_PLUGIN_URL . '/assets/js/javascript-md5/md5.min.js', array(), '2.10.0', true );
86
+ wp_enqueue_script( 'yith-gutenberg', YIT_CORE_PLUGIN_URL . '/assets/js/yith-gutenberg' . $suffix . '.js', $deps, yith_plugin_fw_get_version(), true );
87
+ wp_localize_script( 'yith-gutenberg', 'yith_gutenberg', $this->_blocks_args );
88
+ wp_localize_script( 'yith-gutenberg', 'yith_gutenberg_ajax', array( 'ajaxurl' => $ajax_url ) );
89
+ }
90
+
91
+ /**
92
+ * Add blocks to gutenberg editor
93
+ *
94
+ * @return void
95
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
96
+ */
97
+ public function register_blocks(){
98
+ foreach ( $this->_to_register_blocks as $block => $args ){
99
+ $block_style = isset( $args['style'] ) ? array( 'style' => $args['style'] ) : array();
100
+ if( register_block_type( "yith/{$block}", $block_style ) ){
101
+ $this->_registered_blocks[] = $block;
102
+ }
103
+ }
104
+
105
+ if( ! empty( $this->_registered_blocks ) ){
106
+ add_filter( 'block_categories', array( $this, 'block_category' ), 10, 2 );
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Add block category
112
+ *
113
+ * @param $categories array block categories array
114
+ * @param $post WP_Post current post
115
+ *
116
+ * @return array block categories
117
+ *
118
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
119
+ */
120
+ public function block_category( $categories, $post ){
121
+ return array_merge(
122
+ $categories,
123
+ array(
124
+ array(
125
+ 'slug' => 'yith-blocks',
126
+ 'title' => _x( 'YITH', '[gutenberg]: Category Name', 'yith-plugin-fw' ),
127
+ ),
128
+ )
129
+ );
130
+ }
131
+
132
+ /**
133
+ * Add new blocks to Gutenberg
134
+ *
135
+ * @param $blocks string|array new blocks
136
+ * @return bool true if add a new blocks, false otherwise
137
+ *
138
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
139
+ */
140
+ public function add_blocks( $blocks ){
141
+ $added = false;
142
+ if( ! empty( $blocks ) ){
143
+ $added = true;
144
+ if( is_array( $blocks ) ){
145
+ $this->_to_register_blocks = array_merge( $this->_to_register_blocks, $blocks );
146
+ }
147
+
148
+ else {
149
+ $this->_to_register_blocks[] = $blocks;
150
+ }
151
+ }
152
+
153
+ return $added;
154
+ }
155
+
156
+ /**
157
+ * Return an array with the registered blocks
158
+ *
159
+ * @return array
160
+ */
161
+ public function get_registered_blocks(){
162
+ return $this->_registered_blocks;
163
+ }
164
+
165
+ /**
166
+ * Return an array with the blocks to register
167
+ *
168
+ * @return array
169
+ */
170
+ public function get_to_register_blocks(){
171
+ return $this->_to_register_blocks;
172
+ }
173
+
174
+ /**
175
+ * Return an array with the block(s) arguments
176
+ *
177
+ * @return array
178
+ */
179
+ public function get_block_args( $block = 'all' ){
180
+ if( 'all' == $block ){
181
+ return $this->_blocks_args;
182
+ }
183
+
184
+ elseif( isset( $this->_blocks_args[ $block ] ) ){
185
+ return $this->_blocks_args[ $block ];
186
+ }
187
+
188
+ return false;
189
+ }
190
+
191
+ /**
192
+ * @return string Default block cateogyr slug
193
+ */
194
+ public function get_default_blocks_category_slug(){
195
+ return $this->_category_slug;
196
+ }
197
+
198
+ /**
199
+ * Set the block arguments
200
+ *
201
+ * @param $args array The block argument
202
+ */
203
+ public function set_block_args( $args ){
204
+ foreach( $args as $block => $block_args ){
205
+
206
+ /* === Add Default Keywords === */
207
+ $default_keywords = array( 'yith' );
208
+ if( ! empty( $block_args['shortcode_name'] ) ){
209
+ $default_keywords[] = $block_args['shortcode_name'];
210
+ }
211
+
212
+ $args[ $block ]['keywords'] = ! empty( $args[ $block ]['keywords'] ) ? array_merge( $args[ $block ]['keywords'], $default_keywords ) : $default_keywords;
213
+
214
+ if( count( $args[ $block ]['keywords'] ) > 3 ){
215
+ $args[ $block ]['keywords'] = array_slice($args[ $block ]['keywords'], 0, 3);
216
+ }
217
+
218
+ if( empty( $block_args['category'] ) ){
219
+ //Add YITH block category
220
+ $args[ $block ]['category'] = $this->get_default_blocks_category_slug();
221
+ }
222
+
223
+ if( isset( $block_args['attributes'] ) ){
224
+ foreach( $block_args['attributes'] as $attr_name => $attributes ){
225
+ // Set the do_shortcode args
226
+ if( ! empty( $attributes['do_shortcode'] ) ){
227
+ $args[ $block ]['attributes'][ $attr_name ] = true;
228
+ }
229
+
230
+ if( ! empty( $attributes['options'] ) && is_array( $attributes['options'] ) ){
231
+ $options = array();
232
+ foreach( $attributes['options'] AS $v => $l ){
233
+ //Prepare options array for react component
234
+ $options[] = array(
235
+ 'label' => $l,
236
+ 'value' => $v,
237
+ );
238
+ }
239
+ $args[ $block ]['attributes'][ $attr_name ]['options'] = $options;
240
+ }
241
+
242
+ if( empty( $attributes['remove_quotes'] ) ){
243
+ $args[ $block ]['attributes'][ $attr_name ]['remove_quotes'] = false;
244
+ }
245
+
246
+ /* === Special Requirements for Block Type === */
247
+ if( ! empty( $attributes['type'] ) ) {
248
+ $args[ $block ]['attributes'][ $attr_name ]['blocktype'] = $attributes['type'];
249
+ $args[ $block ]['attributes'][ $attr_name ]['type'] = 'string';
250
+
251
+ switch( $attributes['type'] ){
252
+ case 'select':
253
+ //Add default value for multiple
254
+ if( ! isset( $attributes['multiple'] ) ) {
255
+ $args[ $block ]['attributes'][ $attr_name ]['multiple'] = false;
256
+ }
257
+ break;
258
+
259
+ case 'color':
260
+ case 'colorpicker':
261
+ if( ! isset( $attributes['disableAlpha'] ) ){
262
+ //Disable alpha gradient for color picker
263
+ $args[ $block ]['attributes'][ $attr_name ]['disableAlpha'] = true;
264
+ }
265
+ break;
266
+
267
+ case 'number':
268
+ $args[ $block ]['attributes'][ $attr_name ]['type'] = 'integer';
269
+ break;
270
+
271
+ case 'toggle':
272
+ case 'checkbox':
273
+ $args[ $block ]['attributes'][ $attr_name ]['type'] = 'boolean';
274
+ break;
275
+ }
276
+ }
277
+ }
278
+ }
279
+ }
280
+
281
+ $this->_blocks_args = array_merge( $this->_blocks_args, $args );
282
+ }
283
+
284
+ /**
285
+ * Get a do_shortcode in ajax call to show block preview
286
+ *
287
+ * @param $args array The block argument
288
+ */
289
+ public function do_shortcode(){
290
+ $current_action = current_action();
291
+ $sc = ! empty( $_POST['shortcode'] ) ? $_POST['shortcode'] : '';
292
+
293
+ if( ! apply_filters( 'yith_plugin_fw_gutenberg_skip_shortcode_sanitize', false ) ){
294
+ $sc = sanitize_text_field( stripslashes( $sc ) );
295
+ }
296
+
297
+ do_action( 'yith_plugin_fw_gutenberg_before_do_shortcode', $sc, $current_action );
298
+ echo do_shortcode( apply_filters( 'yith_plugin_fw_gutenberg_shortcode', $sc, $current_action ) );
299
+ do_action( 'yith_plugin_fw_gutenberg_after_do_shortcode', $sc, $current_action );
300
+
301
+ if( is_ajax() ){
302
+ die();
303
+ }
304
+ }
305
+ }
306
+ }
307
+
308
+ if ( ! function_exists( 'YITH_Gutenberg' ) ) {
309
+ /**
310
+ * Main instance of plugin
311
+ *
312
+ * @return YITH_Gutenberg
313
+ * @since 1.0
314
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
315
+ */
316
+ function YITH_Gutenberg() {
317
+ return YITH_Gutenberg::instance();
318
+ }
319
+ }
320
+
321
+ YITH_Gutenberg();
plugin-fw/licence/assets/js/yit-licence.js CHANGED
@@ -30,7 +30,12 @@
30
  error_fields = new Array(),
31
  product_row = form.find( '.product-row' ),
32
  licence_activation = $( '.licence-activation' ),
33
- spinner = $( '#products-to-active' ).find( '.spinner' );
 
 
 
 
 
34
 
35
  /* Init Input Fields */
36
  message.empty();
@@ -41,10 +46,18 @@
41
  spinner.addClass( 'show' );
42
  t.add( licence_activation ).prop( "disabled", true ).addClass( 'clicked' );
43
 
44
- if ( '' === email_val ) {
45
  error = true;
46
- error_fields[ error_fields.length ] = licence_message.email;
47
  email.addClass( 'require' );
 
 
 
 
 
 
 
 
 
48
  }
49
 
50
  if ( '' === licence_key_val ) {
@@ -157,23 +170,25 @@
157
  },
158
  success: function ( response ) {
159
  message.css( 'maxWidth', activated_table.width() );
160
- if ( false == response.activated && typeof response.error == 'undefined' ) {
161
- $( '.product-licence-activation' ).empty().replaceWith( response.template );
162
- licence_api();
163
- }
164
-
165
- if ( false == response.activated && typeof response.error != 'undefined' ) {
166
- message.find( 'p.yith-licence-notice-message' ).html( response.error );
167
  message.removeClass( 'notice-success' ).addClass( 'notice-error visible' );
168
  t.add( renew ).add( deactive ).add( renew ).prop( "disabled", false ).removeClass( 'clicked' );
169
  $( '#activated-products' ).find( '.spinner' ).removeClass( 'show' );
170
  }
171
 
172
- else if ( false == response ) {
173
- message.find( 'p.yith-licence-notice-message' ).html( licence_message.server );
174
- message.removeClass( 'notice-success' ).addClass( 'notice-error visible' );
175
- t.add( renew ).add( deactive ).add( renew ).prop( "disabled", false ).removeClass( 'clicked' );
176
- $( '#activated-products' ).find( '.spinner' ).removeClass( 'show' );
 
 
 
 
 
 
 
177
  }
178
  }
179
  } );
30
  error_fields = new Array(),
31
  product_row = form.find( '.product-row' ),
32
  licence_activation = $( '.licence-activation' ),
33
+ spinner = $( '#products-to-active' ).find( '.spinner' ),
34
+ is_mail = function( val ){
35
+ /* https://stackoverflow.com/questions/2855865/jquery-validate-e-mail-address-regex */
36
+ var re = new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);
37
+ return re.test( val );
38
+ };
39
 
40
  /* Init Input Fields */
41
  message.empty();
46
  spinner.addClass( 'show' );
47
  t.add( licence_activation ).prop( "disabled", true ).addClass( 'clicked' );
48
 
49
+ if ( '' === email_val || ! is_mail( email_val ) ) {
50
  error = true;
 
51
  email.addClass( 'require' );
52
+
53
+ if( '' === email_val ){
54
+ error_fields[ error_fields.length ] = licence_message.email;
55
+ }
56
+
57
+ else {
58
+ error_fields[ error_fields.length ] = licence_message.email;
59
+ }
60
+
61
  }
62
 
63
  if ( '' === licence_key_val ) {
170
  },
171
  success: function ( response ) {
172
  message.css( 'maxWidth', activated_table.width() );
173
+ if ( false == response ) {
174
+ message.find( 'p.yith-licence-notice-message' ).html( licence_message.server );
 
 
 
 
 
175
  message.removeClass( 'notice-success' ).addClass( 'notice-error visible' );
176
  t.add( renew ).add( deactive ).add( renew ).prop( "disabled", false ).removeClass( 'clicked' );
177
  $( '#activated-products' ).find( '.spinner' ).removeClass( 'show' );
178
  }
179
 
180
+ else {
181
+ if ( false == response.activated ) {
182
+ $( '.product-licence-activation' ).empty().replaceWith( response.template );
183
+ licence_api();
184
+ }
185
+
186
+ if ( typeof response.error != 'undefined' ) {
187
+ message.find( 'p.yith-licence-notice-message' ).html( response.error );
188
+ message.removeClass( 'notice-success' ).addClass( 'notice-error visible' );
189
+ t.add( renew ).add( deactive ).add( renew ).prop( "disabled", false ).removeClass( 'clicked' );
190
+ $( '#activated-products' ).find( '.spinner' ).removeClass( 'show' );
191
+ }
192
  }
193
  }
194
  } );
plugin-fw/licence/assets/js/yit-licence.min.js CHANGED
@@ -1,10 +1 @@
1
- var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,d,b){a instanceof String&&(a=String(a));for(var e=a.length,f=0;f<e;f++){var k=a[f];if(d.call(b,k,f,a))return{i:f,v:k}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,d,b){a!=Array.prototype&&a!=Object.prototype&&(a[d]=b.value)};
2
- $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,d,b,e){if(d){b=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var f=a[e];f in b||(b[f]={});b=b[f]}a=a[a.length-1];e=b[a];d=d(e);d!=e&&null!=d&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:d})}};
3
- $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
4
- (function(a){var d=function(b){b.on("click",function(g,c){g.preventDefault();var b=a(this);g=b.data("formid");c=a("#"+g);var d=c.serialize(),e=a(c).find(".message"),h=a(c).find(".message-wrapper"),k=c.find(".user-email"),l=c.find(".licence-key"),m=c.find(".user-email").val(),t=c.find(".licence-key").val(),n=!1;g=[];var p=c.find(".product-row"),q=a(".licence-activation"),r=a("#products-to-active").find(".spinner");e.empty();h.removeClass("visible");k.removeClass("require");l.removeClass("require");
5
- p.removeClass("error");r.addClass("show");b.add(q).prop("disabled",!0).addClass("clicked");""===m&&(n=!0,g[g.length]=licence_message.email,k.addClass("require"));""===t&&(n=!0,g[g.length]=licence_message.license_key,l.addClass("require"));if(!1===n)jQuery.ajax({type:"POST",url:ajaxurl,data:d,success:function(c){r.removeClass("show");b.add(q).prop("disabled",!1).removeClass("clicked");!0===c.activated?(a(".product-licence-activation").empty().replaceWith(c.template),f()):(!1!==c&&"undefined"!==typeof c.error?
6
- e.text(c.error):e.text(licence_message.server),h.addClass("visible"),p.addClass("error"));"undefined"!==typeof c.debug&&console.log(c.debug)}});else{if(1==g.length)e.text(licence_message.error.replace("%field%",g[0]));else{c=licence_message.errors;for(d=0;d<g.length;d++)c=c.replace("%field_"+(d+1)+"%",g[d]),h.addClass("visible");e.text(c)}h.addClass("visible");p.addClass("error");r.removeClass("show");b.add(q).prop("disabled",!1).removeClass("clicked")}})},b=function(b){b.on("click",function(b){b.preventDefault();
7
- b=a(this);var c=a("#licence-check-update"),d=c.serialize();b.prop("disabled",!0).addClass("clicked");c.find("div.spinner").addClass("show");jQuery.ajax({type:"POST",url:ajaxurl,data:d,success:function(c){a(".product-licence-activation").empty().replaceWith(c.template);f()}})})},e=function(b){b.on("click",function(b){b.preventDefault();if(1==(1==script_info.is_debug?!0:confirm(licence_message.are_you_sure))){var c=a(this);b=c.data("licence-key");var d=c.data("licence-email"),e=c.data("product-init"),
8
- g=c.data("action"),h=a(".licence-renew"),k=a(".licence-deactive"),l=a("#yith-licence-notice"),m=a(".activated-table");c.add(h).add(k).prop("disabled",!0).addClass("clicked");a("#activated-products").find(".spinner").addClass("show");jQuery.ajax({type:"POST",url:ajaxurl,data:{action:g,licence_key:b,email:d,product_init:e},success:function(b){l.css("maxWidth",m.width());0==b.activated&&"undefined"==typeof b.error&&(a(".product-licence-activation").empty().replaceWith(b.template),f());0==b.activated&&
9
- "undefined"!=typeof b.error?(l.find("p.yith-licence-notice-message").html(b.error),l.removeClass("notice-success").addClass("notice-error visible"),c.add(h).add(k).add(h).prop("disabled",!1).removeClass("clicked"),a("#activated-products").find(".spinner").removeClass("show")):0==b&&(l.find("p.yith-licence-notice-message").html(licence_message.server),l.removeClass("notice-success").addClass("notice-error visible"),c.add(h).add(k).add(h).prop("disabled",!1).removeClass("clicked"),a("#activated-products").find(".spinner").removeClass("show"))}})}})},
10
- f=function(){var f=a(".licence-activation"),g=a(".licence-check"),c=a(".licence-deactive");d(f);b(g);e(c)};f();a("body").on("click",".yit-changelog-button",function(b){a("#TB_window").remove()})})(jQuery);
1
+ !function(e){var a=function(){var i=e(".licence-activation"),s=e(".licence-check"),d=e(".licence-deactive");i.on("click",function(i,s){i.preventDefault();var d,c=e(this),r=c.data("formid"),l=e("#"+r),u=l.serialize(),F=e(l).find(".message"),t=e(l).find(".message-wrapper"),n=l.find(".user-email"),o=l.find(".licence-key"),p=l.find(".user-email").val(),v=l.find(".licence-key").val(),C=!1,x=new Array,m=l.find(".product-row"),D=e(".licence-activation"),f=e("#products-to-active").find(".spinner");if(F.empty(),t.removeClass("visible"),n.removeClass("require"),o.removeClass("require"),m.removeClass("error"),f.addClass("show"),c.add(D).prop("disabled",!0).addClass("clicked"),""!==p&&(d=p,new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(d))||(C=!0,n.addClass("require"),x[x.length]=licence_message.email),""===v&&(C=!0,x[x.length]=licence_message.license_key,o.addClass("require")),!1===C)jQuery.ajax({type:"POST",url:ajaxurl,data:u,success:function(i){f.removeClass("show"),c.add(D).prop("disabled",!1).removeClass("clicked"),!0===i.activated?(e(".product-licence-activation").empty().replaceWith(i.template),a()):!1!==i&&void 0!==i.error?(F.text(i.error),t.addClass("visible"),m.addClass("error")):(F.text(licence_message.server),t.addClass("visible"),m.addClass("error")),void 0!==i.debug&&console.log(i.debug)}});else{if(1==x.length)F.text(licence_message.error.replace("%field%",x[0])),t.addClass("visible"),m.addClass("error");else{for(var h=licence_message.errors,b=0;b<x.length;b++)h=h.replace("%field_"+(b+1)+"%",x[b]),t.addClass("visible");F.text(h),t.addClass("visible"),m.addClass("error")}f.removeClass("show"),c.add(D).prop("disabled",!1).removeClass("clicked")}}),s.on("click",function(i){i.preventDefault();var s=e(this),d=e("#licence-check-update"),c=d.serialize();s.prop("disabled",!0).addClass("clicked"),d.find("div.spinner").addClass("show"),jQuery.ajax({type:"POST",url:ajaxurl,data:c,success:function(i){e(".product-licence-activation").empty().replaceWith(i.template),a()}})}),d.on("click",function(i){if(i.preventDefault(),1==(1==script_info.is_debug||confirm(licence_message.are_you_sure))){var s=e(this),d=s.data("licence-key"),c=s.data("licence-email"),r=s.data("product-init"),l=s.data("action"),u=e(".licence-renew"),F=e(".licence-deactive"),t=e("#yith-licence-notice"),n=e(".activated-table");s.add(u).add(F).prop("disabled",!0).addClass("clicked"),e("#activated-products").find(".spinner").addClass("show"),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:l,licence_key:d,email:c,product_init:r},success:function(i){t.css("maxWidth",n.width()),0==i?(t.find("p.yith-licence-notice-message").html(licence_message.server),t.removeClass("notice-success").addClass("notice-error visible"),s.add(u).add(F).add(u).prop("disabled",!1).removeClass("clicked"),e("#activated-products").find(".spinner").removeClass("show")):(0==i.activated&&(e(".product-licence-activation").empty().replaceWith(i.template),a()),void 0!==i.error&&(t.find("p.yith-licence-notice-message").html(i.error),t.removeClass("notice-success").addClass("notice-error visible"),s.add(u).add(F).add(u).prop("disabled",!1).removeClass("clicked"),e("#activated-products").find(".spinner").removeClass("show")))}})}})};a(),e("body").on("click",".yit-changelog-button",function(a){e("#TB_window").remove()})}(jQuery);
 
 
 
 
 
 
 
 
 
plugin-fw/licence/lib/yit-licence.php CHANGED
@@ -183,11 +183,11 @@ if ( !class_exists( 'YIT_Licence' ) ) {
183
 
184
  /* Localize Scripts */
185
  wp_localize_script( 'yit-licence', 'licence_message', array(
186
- 'error' => sprintf( _x( '%s field cannot be empty', '%s = field name', 'yith-plugin-fw' ), '%field%' ), // sprintf must be used to avoid errors with '%field%' string in translation in .po file
187
- 'errors' => sprintf( __( '%s and %s fields cannot be empty', 'yith-plugin-fw' ), '%field_1%', '%field_2%' ),
188
  'server' => __( 'Unable to contact the remote server, please try again later. Thanks!', 'yith-plugin-fw' ),
189
- 'email' => __( 'Email', 'yith-plugin-fw' ),
190
- 'license_key' => __( 'License Key', 'yith-plugin-fw' ),
191
  'are_you_sure' => __( 'Are you sure you want to deactivate the license for current site?', 'yith-plugin-fw' )
192
  )
193
  );
@@ -309,32 +309,84 @@ if ( !class_exists( 'YIT_Licence' ) ) {
309
  $body = is_object( $body ) ? get_object_vars( $body ) : false;
310
  }
311
 
312
- if ( $body && is_array( $body ) && isset( $body[ 'activated' ] ) && !$body[ 'activated' ] && !isset( $body[ 'error' ] ) ) {
313
-
314
- $option[ $product[ 'product_id' ] ] = array(
315
- 'activated' => false,
316
- 'email' => urldecode( $args[ 'email' ] ),
317
- 'licence_key' => $args[ 'licence_key' ],
318
- 'licence_expires' => $body[ 'licence_expires' ],
319
- 'message' => $body[ 'message' ],
320
- 'activation_limit' => $body[ 'activation_limit' ],
321
- 'activation_remaining' => $body[ 'activation_remaining' ],
322
- 'is_membership' => isset( $body[ 'is_membership' ] ) ? $body[ 'is_membership' ] : false,
323
- );
324
-
325
- /* === Check for other plugins activation === */
326
- $options = $this->get_licence();
327
- $options[ $product[ 'product_id' ] ] = $option[ $product[ 'product_id' ] ];
328
-
329
- update_option( $this->_licence_option, $options );
330
-
331
- /* === Update Plugin Licence Information === */
332
- YIT_Upgrade()->force_regenerate_update_transient();
333
-
334
- /* === Licence Activation Template === */
335
- $body[ 'template' ] = $this->show_activation_panel( $this->get_response_code_message( 'deactivated', array( 'instance' => $body[ 'instance' ] ) ) );
336
- } else {
337
- $body[ 'error' ] = $this->get_response_code_message( $body[ 'code' ] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  }
339
 
340
  wp_send_json( $body );
@@ -376,13 +428,13 @@ if ( !class_exists( 'YIT_Licence' ) ) {
376
  $timeout = apply_filters( 'yith_plugin_fw_licence_timeout', 30, __FUNCTION__ );
377
  $response = wp_remote_get( $api_uri, array( 'timeout' => $timeout ) );
378
 
379
- if ( !is_wp_error( $response ) ) {
380
  $body = json_decode( $response[ 'body' ] );
381
  $body = is_object( $body ) ? get_object_vars( $body ) : false;
382
  }
383
 
384
- if ( $body && is_array( $body ) && isset( $body[ 'success' ] ) ) {
385
- if ( $body[ 'success' ] ) {
386
 
387
  /**
388
  * Code 200 -> Licence key is valid
@@ -417,6 +469,7 @@ if ( !class_exists( 'YIT_Licence' ) ) {
417
 
418
  case '101':
419
  case '102':
 
420
  unset( $licence[ $product_id ] );
421
  break;
422
 
@@ -425,14 +478,12 @@ if ( !class_exists( 'YIT_Licence' ) ) {
425
  $licence[ $product_id ][ 'message' ] = $body[ 'error' ];
426
  $licence[ $product_id ][ 'status_code' ] = $body[ 'code' ];
427
  $licence[ $product_id ][ 'licence_expires' ] = $body[ 'licence_expires' ];
428
- //$licence[ $product_id ]['is_membership'] = isset( $body['is_membership'] ) ? $body['is_membership'] : false;
429
  break;
430
 
431
  case '107':
432
  $licence[ $product_id ][ 'activated' ] = false;
433
  $licence[ $product_id ][ 'message' ] = $body[ 'error' ];
434
  $licence[ $product_id ][ 'status_code' ] = $body[ 'code' ];
435
- //$licence[ $product_id ]['is_membership'] = isset( $body['is_membership'] ) ? $body['is_membership'] : false;
436
  break;
437
  }
438
  }
183
 
184
  /* Localize Scripts */
185
  wp_localize_script( 'yit-licence', 'licence_message', array(
186
+ 'error' => sprintf( _x( 'Please, insert a valid %s', '%s = field name', 'yith-plugin-fw' ), '%field%' ), // sprintf must be used to avoid errors with '%field%' string in translation in .po file
187
+ 'errors' => sprintf( __( 'Please, insert a valid %s and a valid %s', 'yith-plugin-fw' ), '%field_1%', '%field_2%' ),
188
  'server' => __( 'Unable to contact the remote server, please try again later. Thanks!', 'yith-plugin-fw' ),
189
+ 'email' => __( 'email address', 'yith-plugin-fw' ),
190
+ 'license_key' => __( 'license key', 'yith-plugin-fw' ),
191
  'are_you_sure' => __( 'Are you sure you want to deactivate the license for current site?', 'yith-plugin-fw' )
192
  )
193
  );
309
  $body = is_object( $body ) ? get_object_vars( $body ) : false;
310
  }
311
 
312
+ if ( $body && is_array( $body ) ) {
313
+ /* === Get License === */
314
+ $options = $this->get_licence();
315
+ if( isset( $body[ 'activated' ] ) && ! $body[ 'activated' ] && ! isset( $body[ 'error' ] ) ){
316
+ $option[ $product[ 'product_id' ] ] = array(
317
+ 'activated' => false,
318
+ 'email' => urldecode( $args[ 'email' ] ),
319
+ 'licence_key' => $args[ 'licence_key' ],
320
+ 'licence_expires' => $body[ 'licence_expires' ],
321
+ 'message' => $body[ 'message' ],
322
+ 'activation_limit' => $body[ 'activation_limit' ],
323
+ 'activation_remaining' => $body[ 'activation_remaining' ],
324
+ 'is_membership' => isset( $body[ 'is_membership' ] ) ? $body[ 'is_membership' ] : false,
325
+ );
326
+
327
+ /* === Check for other plugins activation === */
328
+ $options[ $product[ 'product_id' ] ] = $option[ $product[ 'product_id' ] ];
329
+
330
+ /* === Update Plugin Licence Information === */
331
+ YIT_Upgrade()->force_regenerate_update_transient();
332
+
333
+ update_option( $this->_licence_option, $options );
334
+
335
+ /* === Licence Activation Template === */
336
+ $body[ 'template' ] = $this->show_activation_panel( $this->get_response_code_message( 'deactivated', array( 'instance' => $body[ 'instance' ] ) ) );
337
+ }
338
+
339
+ else {
340
+ $body[ 'error' ] = $this->get_response_code_message( $body[ 'code' ] );
341
+
342
+ switch ( $body[ 'code' ] ) {
343
+
344
+ /**
345
+ * Error Code List:
346
+ *
347
+ * 100 -> Invalid Request
348
+ * 101 -> Invalid licence key
349
+ * 102 -> Software has been deactivate
350
+ * 103 -> Exceeded maximum number of activations
351
+ * 104 -> Invalid instance ID
352
+ * 105 -> Invalid security key
353
+ * 106 -> Licence key has expired
354
+ * 107 -> Licence key has be banned
355
+ *
356
+ * Only code 101, 106 and 107 have effect on DB during activation
357
+ * All error code have effect on DB during deactivation
358
+ *
359
+ */
360
+
361
+ case '101':
362
+ case '102':
363
+ case '104':
364
+ unset( $options[ $product[ 'product_id' ] ] );
365
+ break;
366
+
367
+ case '106':
368
+ $options[ $product[ 'product_id' ] ][ 'activated' ] = false;
369
+ $options[ $product[ 'product_id' ] ][ 'message' ] = $body[ 'error' ];
370
+ $options[ $product[ 'product_id' ] ][ 'status_code' ] = $body[ 'code' ];
371
+ $options[ $product[ 'product_id' ] ][ 'licence_expires' ] = $body[ 'licence_expires' ];
372
+ break;
373
+
374
+ case '107':
375
+ $options[ $product[ 'product_id' ] ][ 'activated' ] = false;
376
+ $options[ $product[ 'product_id' ] ][ 'message' ] = $body[ 'error' ];
377
+ $options[ $product[ 'product_id' ] ][ 'status_code' ] = $body[ 'code' ];
378
+ break;
379
+ }
380
+
381
+ update_option( $this->_licence_option, $options );
382
+
383
+ /* === Licence Activation Template === */
384
+ $deactivate_message = $this->get_response_code_message( 'deactivated' );
385
+ $error_code_message = $this->get_response_code_message( $body['code'] );
386
+ $message = sprintf( "<strong>%s</strong>: %s", $deactivate_message, $error_code_message );
387
+ $body['template'] = $this->show_activation_panel( $message );
388
+ $body['activated'] = false;
389
+ }
390
  }
391
 
392
  wp_send_json( $body );
428
  $timeout = apply_filters( 'yith_plugin_fw_licence_timeout', 30, __FUNCTION__ );
429
  $response = wp_remote_get( $api_uri, array( 'timeout' => $timeout ) );
430
 
431
+ if ( ! is_wp_error( $response ) ) {
432
  $body = json_decode( $response[ 'body' ] );
433
  $body = is_object( $body ) ? get_object_vars( $body ) : false;
434
  }
435
 
436
+ if ( $body && is_array( $body ) ) {
437
+ if ( isset( $body[ 'success' ] ) && $body[ 'success' ] == true ) {
438
 
439
  /**
440
  * Code 200 -> Licence key is valid
469
 
470
  case '101':
471
  case '102':
472
+ case '104':
473
  unset( $licence[ $product_id ] );
474
  break;
475
 
478
  $licence[ $product_id ][ 'message' ] = $body[ 'error' ];
479
  $licence[ $product_id ][ 'status_code' ] = $body[ 'code' ];
480
  $licence[ $product_id ][ 'licence_expires' ] = $body[ 'licence_expires' ];
 
481
  break;
482
 
483
  case '107':
484
  $licence[ $product_id ][ 'activated' ] = false;
485
  $licence[ $product_id ][ 'message' ] = $body[ 'error' ];
486
  $licence[ $product_id ][ 'status_code' ] = $body[ 'code' ];
 
487
  break;
488
  }
489
  }
plugin-fw/licence/lib/yit-plugin-licence.php CHANGED
@@ -77,13 +77,22 @@ if ( !class_exists( 'YIT_Plugin_Licence' ) ) {
77
  add_action( 'yit_licence_after_check', array( $this, 'licence_after_check' ) );
78
 
79
  /** @since 3.0.0 */
80
- add_action( 'admin_notices', function () {
81
- $this->activate_license_notice();
82
- }, 15 );
 
 
 
 
 
 
83
  }
84
 
85
  private function _show_activate_license_notice() {
86
- $show_license_notice = current_user_can( 'update_plugins' ) && ( !isset( $_GET[ 'page' ] ) || 'yith_plugins_activation' !== $_GET[ 'page' ] );
 
 
 
87
  global $wp_filter;
88
 
89
  if ( isset( $wp_filter[ 'yith_plugin_fw_show_activate_license_notice' ] ) ) {
@@ -221,7 +230,7 @@ if ( !class_exists( 'YIT_Plugin_Licence' ) ) {
221
  /**
222
  * Main instance of plugin
223
  *
224
- * @return object
225
  * @since 1.0
226
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
227
  */
77
  add_action( 'yit_licence_after_check', array( $this, 'licence_after_check' ) );
78
 
79
  /** @since 3.0.0 */
80
+ if( version_compare( PHP_VERSION, '7.0', '>=' ) ) {
81
+ add_action( 'admin_notices', function () {
82
+ $this->activate_license_notice();
83
+ }, 15 );
84
+ }
85
+
86
+ else {
87
+ add_action( 'admin_notices', array( $this, 'activate_license_notice' ), 15 );
88
+ }
89
  }
90
 
91
  private function _show_activate_license_notice() {
92
+ $current_screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
93
+ $show_license_notice = current_user_can( 'update_plugins' ) &&
94
+ ( !isset( $_GET[ 'page' ] ) || 'yith_plugins_activation' !== $_GET[ 'page' ] ) &&
95
+ !( $current_screen && method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() );
96
  global $wp_filter;
97
 
98
  if ( isset( $wp_filter[ 'yith_plugin_fw_show_activate_license_notice' ] ) ) {
230
  /**
231
  * Main instance of plugin
232
  *
233
+ * @return YIT_Plugin_Licence object of license class
234
  * @since 1.0
235
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
236
  */
plugin-fw/licence/templates/panel/activation/activation-panel.php CHANGED
@@ -56,7 +56,7 @@ $debug = isset( $_REQUEST[ 'yith-license-debug' ] ) ? $_
56
  <?php echo $this->display_product_name( $info[ 'Name' ] ) ?>
57
  </td>
58
  <td>
59
- <input type="email" name="email" placeholder="Your email on yithemes.com" value="" class="user-email"/>
60
  </td>
61
  <td>
62
  <input type="text" name="licence_key" placeholder="License Key" value="" class="licence-key"/>
56
  <?php echo $this->display_product_name( $info[ 'Name' ] ) ?>
57
  </td>
58
  <td>
59
+ <input type="text" name="email" placeholder="Your email on yithemes.com" value="" class="user-email"/>
60
  </td>
61
  <td>
62
  <input type="text" name="licence_key" placeholder="License Key" value="" class="licence-key"/>
plugin-fw/yit-functions.php CHANGED
@@ -1160,4 +1160,70 @@ if ( !function_exists( 'yith_plugin_fw_is_panel' ) ) {
1160
 
1161
  return $screen instanceof WP_Screen && strpos( $screen->id, $panel_screen_id ) !== false;
1162
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1163
  }
1160
 
1161
  return $screen instanceof WP_Screen && strpos( $screen->id, $panel_screen_id ) !== false;
1162
  }
1163
+ }
1164
+
1165
+ /* === Gutenberg Support === */
1166
+
1167
+ if( ! function_exists( 'yith_plugin_fw_is_gutenberg_enabled' ) ){
1168
+ function yith_plugin_fw_is_gutenberg_enabled(){
1169
+ return function_exists( 'YITH_Gutenberg' );
1170
+ }
1171
+ }
1172
+
1173
+ if( ! function_exists( 'yith_plugin_fw_gutenberg_add_block' ) ){
1174
+ /**
1175
+ * Add new blocks to Gutenberg
1176
+ *
1177
+ * @param $blocks string|array new blocks
1178
+ * @return bool true if add a new blocks, false otherwise
1179
+ *
1180
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
1181
+ */
1182
+ function yith_plugin_fw_gutenberg_add_blocks( $blocks ){
1183
+ $added = false;
1184
+ if( yith_plugin_fw_is_gutenberg_enabled() ) {
1185
+ // ADD Blocks
1186
+ $added = YITH_Gutenberg()->add_blocks( $blocks );
1187
+
1188
+ //ADD Blocks arguments
1189
+ if( $added ){
1190
+ YITH_Gutenberg()->set_block_args( $blocks );
1191
+ }
1192
+ }
1193
+
1194
+ return $added;
1195
+ }
1196
+ }
1197
+
1198
+ if( ! function_exists( 'yith_plugin_fw_gutenberg_get_registered_blocks' ) ){
1199
+ /**
1200
+ * Return an array with the registered blocks
1201
+ *
1202
+ * @return array
1203
+ */
1204
+ function yith_plugin_fw_gutenberg_get_registered_blocks(){
1205
+ return yith_plugin_fw_is_gutenberg_enabled() ? YITH_Gutenberg()->get_registered_blocks() : array();
1206
+ }
1207
+ }
1208
+
1209
+ if( ! function_exists( 'yith_plugin_fw_gutenberg_get_to_register_blocks' ) ){
1210
+ /**
1211
+ * Return an array with the blocks to register
1212
+ *
1213
+ * @return array
1214
+ */
1215
+ function yith_plugin_fw_gutenberg_get_to_register_blocks(){
1216
+ return yith_plugin_fw_is_gutenberg_enabled() ? YITH_Gutenberg()->get_to_register_blocks() : array();
1217
+ }
1218
+ }
1219
+
1220
+ if( ! function_exists( 'yith_plugin_fw_get_default_logo' ) ){
1221
+ /**
1222
+ * Get the default SVG logo
1223
+ *
1224
+ * @return string default logo image url
1225
+ */
1226
+ function yith_plugin_fw_get_default_logo(){
1227
+ return YIT_CORE_PLUGIN_URL . '/assets/images/yith-icon.svg';
1228
+ }
1229
  }
plugin-fw/yit-plugin.php CHANGED
@@ -39,7 +39,12 @@ include_once( 'lib/yit-assets.php');
39
  include_once( 'lib/yit-debug.php');
40
  include_once( 'lib/privacy/yit-privacy.php' );
41
  include_once( 'lib/privacy/yit-privacy-plugin-abstract.php' );
42
- include_once ( 'lib/promo/yith-promo.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' )
39
  include_once( 'lib/yit-debug.php');
40
  include_once( 'lib/privacy/yit-privacy.php' );
41
  include_once( 'lib/privacy/yit-privacy-plugin-abstract.php' );
42
+ include_once( 'lib/promo/yith-promo.php' );
43
+
44
+ /* === Gutenberg Support === */
45
+ if( class_exists( 'WP_Block_Type_Registry' ) ){
46
+ include_once( 'lib/yith-gutenberg.php' );
47
+ }
48
 
49
  // load from theme folder...
50
  load_textdomain( 'yith-plugin-fw', get_template_directory() . '/core/plugin-fw/yith-plugin-fw-' . apply_filters( 'plugin_locale', get_locale(), 'yith-plugin-fw' ) . '.mo' )