YITH WooCommerce Compare - Version 2.3.18

Version Description

Released on 21 December 2019

  • New: Support for WooCommerce 3.9
  • New: Support for WordPress 5.3.2
  • Update: Plugin framework
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Compare
Version 2.3.18
Comparing to
See all releases

Code changes from version 2.3.17 to 2.3.18

README.txt CHANGED
@@ -4,12 +4,12 @@ Contributors: yithemes
4
  Tags: yith, woocommerce compare, compare products, product compare, product comparison
5
  Requires at least: 4.0
6
  Tested up to: 5.3
7
- Stable tag: 2.3.17
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  YITH WooCommerce Compare allows you to compare more products of your shop in one complete table.
12
- WooCommerce Compatible up to 3.8
13
 
14
  == Description ==
15
 
@@ -66,6 +66,12 @@ yith-woocommerce-compare-<WORDPRESS LOCALE >.mo
66
 
67
  == Changelog ==
68
 
 
 
 
 
 
 
69
  = 2.3.17 = Released on 29 November 2019
70
 
71
  * Update: Plugin framework
@@ -369,6 +375,8 @@ Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woo
369
 
370
  == Upgrade notice ==
371
 
372
- = 2.3.17 = Released on 29 November 2019
373
 
 
 
374
  * Update: Plugin framework
4
  Tags: yith, woocommerce compare, compare products, product compare, product comparison
5
  Requires at least: 4.0
6
  Tested up to: 5.3
7
+ Stable tag: 2.3.18
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  YITH WooCommerce Compare allows you to compare more products of your shop in one complete table.
12
+ WooCommerce Compatible up to 3.9
13
 
14
  == Description ==
15
 
66
 
67
  == Changelog ==
68
 
69
+ = 2.3.18 = Released on 21 December 2019
70
+
71
+ * New: Support for WooCommerce 3.9
72
+ * New: Support for WordPress 5.3.2
73
+ * Update: Plugin framework
74
+
75
  = 2.3.17 = Released on 29 November 2019
76
 
77
  * Update: Plugin framework
375
 
376
  == Upgrade notice ==
377
 
378
+ = 2.3.18 = Released on 21 December 2019
379
 
380
+ * New: Support for WooCommerce 3.9
381
+ * New: Support for WordPress 5.3.2
382
  * Update: Plugin framework
includes/class.yith-woocompare-admin.php CHANGED
@@ -150,7 +150,7 @@ if ( ! class_exists( 'YITH_Woocompare_Admin' ) ) {
150
  $args = array(
151
  'create_menu_page' => true,
152
  'parent_slug' => '',
153
- 'page_title' => _x( 'YITH WooCommerce Compare', 'Admin Plugin Name', 'yith-woocommerce-compare' ),
154
  'menu_title' => _x( 'Compare', 'Admin Plugin Name', 'yith-woocommerce-compare' ),
155
  'capability' => 'manage_options',
156
  'parent' => '',
150
  $args = array(
151
  'create_menu_page' => true,
152
  'parent_slug' => '',
153
+ 'page_title' => _x( 'WooCommerce Compare', 'Admin Plugin Name', 'yith-woocommerce-compare' ),
154
  'menu_title' => _x( 'Compare', 'Admin Plugin Name', 'yith-woocommerce-compare' ),
155
  'capability' => 'manage_options',
156
  'parent' => '',
init.php CHANGED
@@ -3,17 +3,17 @@
3
  * Plugin Name: YITH WooCommerce Compare
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-compare/
5
  * Description: The <code><strong>YITH WooCommerce Compare</strong></code> plugin allow you to compare in a simple and efficient way products on sale in your shop and analyze their main features in a single table. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
- * Version: 2.3.17
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-compare
10
  * Domain Path: /languages/
11
- * WC requires at least: 3.6
12
- * WC tested up to: 3.8
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Compare
16
- * @version 2.3.17
17
  */
18
  /* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
19
 
@@ -58,7 +58,7 @@ if ( ! function_exists( 'yith_plugin_registration_hook' ) ) {
58
  register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
59
 
60
  if ( ! defined( 'YITH_WOOCOMPARE_VERSION' ) ){
61
- define( 'YITH_WOOCOMPARE_VERSION', '2.3.17' );
62
  }
63
  if ( ! defined( 'YITH_WOOCOMPARE_FREE_INIT' ) ) {
64
  define( 'YITH_WOOCOMPARE_FREE_INIT', plugin_basename( __FILE__ ) );
3
  * Plugin Name: YITH WooCommerce Compare
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-compare/
5
  * Description: The <code><strong>YITH WooCommerce Compare</strong></code> plugin allow you to compare in a simple and efficient way products on sale in your shop and analyze their main features in a single table. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
+ * Version: 2.3.18
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-compare
10
  * Domain Path: /languages/
11
+ * WC requires at least: 3.7
12
+ * WC tested up to: 3.9
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Compare
16
+ * @version 2.3.18
17
  */
18
  /* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
19
 
58
  register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
59
 
60
  if ( ! defined( 'YITH_WOOCOMPARE_VERSION' ) ){
61
+ define( 'YITH_WOOCOMPARE_VERSION', '2.3.18' );
62
  }
63
  if ( ! defined( 'YITH_WOOCOMPARE_FREE_INIT' ) ) {
64
  define( 'YITH_WOOCOMPARE_FREE_INIT', plugin_basename( __FILE__ ) );
plugin-fw/assets/css/yith-fields.css CHANGED
@@ -73,7 +73,7 @@
73
  }
74
 
75
  .wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button{
76
- border-color: #7e8993;
77
  }
78
 
79
  .woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
@@ -442,12 +442,12 @@ ul.yit-icons-manager-list li.active {
442
  WordPress 5.3 with old panel fixes
443
  ****************/
444
  .yith-plugin-fw-field-wrapper .select2-container .select2-selection--single {
445
- height: auto;
446
- line-height: 1;
447
  }
448
 
449
  .yith-plugin-fw-field-wrapper .select2-container .select2-selection--single .select2-selection__arrow{
450
- height: 100%;
451
  }
452
 
453
  /****************
@@ -615,28 +615,18 @@ YITH UI
615
 
616
  .yith-plugin-fw-banner {
617
  width : 100%;
618
- height : 75px;
619
  background : url('../images/banner-premium.png');
620
- }
621
-
622
- .yith-plugin-fw-banner.yith-plugin-fw-banner-free {
623
- height : 290px;
624
- background : url('../images/banner-free.png') no-repeat;
625
- }
626
-
627
- .yith-plugin-fw-banner.yith-plugin-fw-banner-free h1 {
628
- max-width : auto;
629
- text-align : left;
630
- padding-left : 100px;
631
- padding-top : 15px;
632
- padding-bottom : 8px;
633
  }
634
 
635
  .yith-plugin-fw-banner h1 {
636
  text-transform : uppercase;
637
  color : #0c5777;
638
  font-size : 15px;
639
- padding-left : 150px;
640
  font-weight : 700;
641
  text-align : left;
642
  display : inline-block;
@@ -659,16 +649,19 @@ YITH UI
659
  box-shadow : none;
660
  }
661
 
662
- .yith-banners ul {
663
- list-style : none;
664
- margin-left : 10px;
665
  }
666
 
667
- .yith-banners ul li {
668
- display : inline-block;
669
- margin-left : 10px;
 
670
  }
671
 
 
 
 
672
  .yith-plugin-ui a {
673
  outline : none;
674
  box-shadow : none;
@@ -866,11 +859,11 @@ YITH UI
866
  .yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
867
  .yith-plugin-ui table.form-table input[type=text].wp-color-picker,
868
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
869
- border: 0;
870
- height: 30px;
871
- max-width: 121px;
872
- font-size: 11px;
873
- padding: 0;
874
  }
875
 
876
  .yith-plugin-ui .search-box input[name="s"] {
@@ -1123,9 +1116,19 @@ YITH UI
1123
  outline : none;
1124
  }
1125
 
1126
- .yith-plugin-ui .select2-selection--single {
1127
- margin : 0;
1128
- border : 0;
 
 
 
 
 
 
 
 
 
 
1129
  }
1130
 
1131
  /* old panel*/
@@ -1745,6 +1748,11 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1745
  top : 37px;
1746
  border-radius : 50%;
1747
  box-shadow : 0px 1px 6px 0px rgba(1, 1, 1, 0.25);
 
 
 
 
 
1748
  }
1749
 
1750
  .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
@@ -2103,6 +2111,14 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2103
  min-width: auto !important;
2104
  }
2105
 
 
 
 
 
 
 
 
 
2106
  @media screen and (max-width : 1440px) {
2107
  .yith-plugin-ui .yith-add-box,
2108
  .yith-plugin-ui .yith-toggle-row:not(.fixed) {
@@ -2138,25 +2154,13 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2138
  }
2139
 
2140
  @media screen and (max-width : 782px) {
2141
- .yith-plugin-fw-banner.yith-plugin-fw-banner-free {
2142
- height : auto;
2143
- background-color : #a9c7d3;
2144
- }
2145
-
2146
- .yith-plugin-fw-banner.yith-plugin-fw-banner-free ul {
2147
- width : 90%;
2148
- text-align : center;
2149
- }
2150
-
2151
- .yith-plugin-fw-banner.yith-plugin-fw-banner-free li img {
2152
- width : 90%;
2153
- margin : 0 auto;
2154
- }
2155
-
2156
  .yith-plugin-fw-banner h1 {
2157
  line-height : 1.2em;
2158
  }
2159
-
 
 
 
2160
  .yith-plugin-ui .yith-add-box,
2161
  .yith-plugin-ui .yith-toggle-row {
2162
  width : 100%;
73
  }
74
 
75
  .wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button{
76
+ border-color: #7e8993;
77
  }
78
 
79
  .woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
442
  WordPress 5.3 with old panel fixes
443
  ****************/
444
  .yith-plugin-fw-field-wrapper .select2-container .select2-selection--single {
445
+ height: auto;
446
+ line-height: 1;
447
  }
448
 
449
  .yith-plugin-fw-field-wrapper .select2-container .select2-selection--single .select2-selection__arrow{
450
+ height: 100%;
451
  }
452
 
453
  /****************
615
 
616
  .yith-plugin-fw-banner {
617
  width : 100%;
618
+ height: 45px;
619
  background : url('../images/banner-premium.png');
620
+ display: flex;
621
+ align-items: center;
622
+ padding-right: -23px;
 
 
 
 
 
 
 
 
 
 
623
  }
624
 
625
  .yith-plugin-fw-banner h1 {
626
  text-transform : uppercase;
627
  color : #0c5777;
628
  font-size : 15px;
629
+ padding: 0 0 0 110px;
630
  font-weight : 700;
631
  text-align : left;
632
  display : inline-block;
649
  box-shadow : none;
650
  }
651
 
652
+ .yith-plugin-fw-rate{
653
+ margin: 20px 0;
 
654
  }
655
 
656
+ .yith-plugin-fw-rate .dashicons-star-filled{
657
+ font-size: 12px;
658
+ margin: 4px -4px;
659
+ color: #0c5777;
660
  }
661
 
662
+ .yith-plugin-fw-rate a{
663
+ text-decoration: none;
664
+ }
665
  .yith-plugin-ui a {
666
  outline : none;
667
  box-shadow : none;
859
  .yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
860
  .yith-plugin-ui table.form-table input[type=text].wp-color-picker,
861
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
862
+ border: 0;
863
+ height: 30px;
864
+ max-width: 121px;
865
+ font-size: 11px;
866
+ padding: 0;
867
  }
868
 
869
  .yith-plugin-ui .search-box input[name="s"] {
1116
  outline : none;
1117
  }
1118
 
1119
+ .yith-plugin-ui .select2-container .select2-selection--single,
1120
+ .yith-plugin-ui .select2-container .select2-selection--multiple,
1121
+ .yith-plugin-ui .select2-container.select2-container--focus .select2-selection--single,
1122
+ .yith-plugin-ui .select2-container.select2-container--focus .select2-selection--multiple,
1123
+ .yith-plugin-ui .select2-container.select2-container--open .select2-selection--single,
1124
+ .yith-plugin-ui .select2-container.select2-container--open .select2-selection--multiple{
1125
+ margin : 0;
1126
+ border : 0;
1127
+ box-shadow : none;
1128
+ }
1129
+
1130
+ .yith-plugin-ui .select2-container .select2-selection--single .select2-selection__arrow{
1131
+ background: none;
1132
  }
1133
 
1134
  /* old panel*/
1748
  top : 37px;
1749
  border-radius : 50%;
1750
  box-shadow : 0px 1px 6px 0px rgba(1, 1, 1, 0.25);
1751
+ cursor : grab;
1752
+ }
1753
+
1754
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:active:after{
1755
+ cursor : grabbing;
1756
  }
1757
 
1758
  .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
2111
  min-width: auto !important;
2112
  }
2113
 
2114
+ /** OVERRIDE WOOCOMMERCE CLASSES FOR 5.3 */
2115
+ .branch-5-3 .yith-plugin-fw .select2-container .select2-selection--single .select2-selection__arrow{
2116
+ background:none;
2117
+ }
2118
+ .branch-5-3 .yith-plugin-fw .select2-container.select2-container--focus .select2-selection--single, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--multiple, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--single{
2119
+ box-shadow: none;
2120
+ }
2121
+
2122
  @media screen and (max-width : 1440px) {
2123
  .yith-plugin-ui .yith-add-box,
2124
  .yith-plugin-ui .yith-toggle-row:not(.fixed) {
2154
  }
2155
 
2156
  @media screen and (max-width : 782px) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2157
  .yith-plugin-fw-banner h1 {
2158
  line-height : 1.2em;
2159
  }
2160
+ .yith-plugin-fw-banner h1{
2161
+ font-size: 12px;
2162
+ padding-right: 10px;
2163
+ }
2164
  .yith-plugin-ui .yith-add-box,
2165
  .yith-plugin-ui .yith-toggle-row {
2166
  width : 100%;
plugin-fw/assets/images/banner-free.png DELETED
Binary file
plugin-fw/assets/images/banner-premium.png CHANGED
Binary file
plugin-fw/assets/images/rate_banner.png DELETED
Binary file
plugin-fw/assets/images/upgrade_banner.png DELETED
Binary file
plugin-fw/assets/js/metabox.js CHANGED
@@ -129,7 +129,14 @@
129
  $current_field.hide();
130
  break;
131
  default:
132
- $current_container.hide();
 
 
 
 
 
 
 
133
  }
134
 
135
  } else {
@@ -143,6 +150,7 @@
143
  break;
144
  default:
145
  $current_container.show();
 
146
  }
147
  }
148
  }
129
  $current_field.hide();
130
  break;
131
  default:
132
+ if( ! $current_container.hasClass('fade-in')){
133
+ $current_container.hide();
134
+ $current_container.css({'opacity':'0'});
135
+ }else{
136
+ $current_container.fadeTo("slow" , 0, function(){
137
+ $(this).hide().removeClass('fade-in');
138
+ });
139
+ }
140
  }
141
 
142
  } else {
150
  break;
151
  default:
152
  $current_container.show();
153
+ $current_container.fadeTo("slow" , 1).addClass('fade-in');
154
  }
155
  }
156
  }
plugin-fw/assets/js/metabox.min.js CHANGED
@@ -1,7 +1 @@
1
- var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,e,c){a instanceof String&&(a=String(a));for(var b=a.length,d=0;d<b;d++){var f=a[d];if(e.call(c,f,d,a))return{i:d,v:f}}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,e,c){a!=Array.prototype&&a!=Object.prototype&&(a[e]=c.value)};
2
- $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,e,c,b){if(e){c=$jscomp.global;a=a.split(".");for(b=0;b<a.length-1;b++){var d=a[b];d in c||(c[d]={});c=c[d]}a=a[a.length-1];b=c[a];e=e(b);e!=b&&null!=e&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:e})}};
3
- $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
4
- (function(a){function e(b,d,c,e){var f=!0;if("string"==typeof d){":radio"==d.substr(0,6)&&(d+=":checked");var g=a(d).val();"checkbox"==a(d).attr("type")&&(g=a(d).is(":checked")?"yes":"no");c=c.split(",");for(d=0;d<c.length;d++)if(g!=c[d])f=!1;else{f=!0;break}}c=a(b);b=a(b+"-container").parent();e=e.split("-");for(var h in e)if(g=e[h],f)switch(g){case "disable":b.removeClass("yith-disabled");c.attr("disabled",!1);break;case "hideme":c.show();break;default:b.show()}else switch(g){case "disable":b.addClass("yith-disabled");
5
- c.attr("disabled",!0);break;case "hideme":c.hide();break;default:b.hide()}}a(".metaboxes-tab").each(function(){a(".tabs-panel",this).hide();var b=wpCookies.get("active_metabox_tab");b=null==b?a("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+b;a(b).show();a(".metaboxes-tabs a",this).click(function(b){if(a(this).parent().hasClass("tabs"))b.preventDefault();else return b=a(this).attr("href"),a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),
6
- a(b).show(),!1})});var c=a("#_active_page_options-container").parent().html();a("#_active_page_options-container").parent().remove();a(c).insertAfter("#yit-post-setting .handlediv");a(c).insertAfter("#yit-page-setting .handlediv");a("#_active_page_options-container").on("click",function(){a("#_active_page_options").is(":checked")?a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):a("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,
7
- "pointer-events":"none"})}).click();a(document.body).on("yith-plugin-fw-metabox-init-deps",function(){a(document.body).trigger("yith-plugin-fw-init-radio");a(".metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)").each(function(){var b=a(this),c="#"+b.data("dep-target"),f="#"+b.data("dep-id"),h=b.data("dep-value"),k=b.data("dep-type");e(c,f,h.toString(),k);a(f).on("change",function(){e(c,f,h.toString(),k)}).change();b.addClass("yith-plugin-fw-metabox-deps-initialized")})}).trigger("yith-plugin-fw-metabox-init-deps")})(jQuery);
1
+ !function(h){h(".metaboxes-tab").each(function(){h(".tabs-panel",this).hide();var t=wpCookies.get("active_metabox_tab");t=null==t?h("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+t,h(t).show(),h(".metaboxes-tabs a",this).click(function(t){if(!h(this).parent().hasClass("tabs")){var e=h(this).attr("href");return h(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),h(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),h(e).show(),!1}t.preventDefault()})});var t=h("#_active_page_options-container").parent().html();function n(t,e,a,i){var s=!0;if("string"==typeof e){":radio"==e.substr(0,6)&&(e+=":checked");var n=h(e).val();if("checkbox"==h(e).attr("type"))n=h(e).is(":checked")?"yes":"no";a=a.split(",");for(var o=0;o<a.length;o++){if(n==a[o]){s=!0;break}s=!1}}var d,r=h(t),c=h(t+"-container").parent(),l=i.split("-");for(d in l){var p=l[d];if(s)switch(p){case"disable":c.removeClass("yith-disabled"),r.attr("disabled",!1);break;case"hideme":r.show();break;default:c.show(),c.fadeTo("slow",1).addClass("fade-in")}else switch(p){case"disable":c.addClass("yith-disabled"),r.attr("disabled",!0);break;case"hideme":r.hide();break;default:c.hasClass("fade-in")?c.fadeTo("slow",0,function(){h(this).hide().removeClass("fade-in")}):(c.hide(),c.css({opacity:"0"}))}}}h("#_active_page_options-container").parent().remove(),h(t).insertAfter("#yit-post-setting .handlediv"),h(t).insertAfter("#yit-page-setting .handlediv"),h("#_active_page_options-container").on("click",function(){h("#_active_page_options").is(":checked")?h("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):h("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,"pointer-events":"none"})}).click(),h(document.body).on("yith-plugin-fw-metabox-init-deps",function(){h(document.body).trigger("yith-plugin-fw-init-radio"),h(".metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)").each(function(){var t=h(this),e="#"+t.data("dep-target"),a="#"+t.data("dep-id"),i=t.data("dep-value"),s=t.data("dep-type");n(e,a,i.toString(),s),h(a).on("change",function(){n(e,a,i.toString(),s)}).change(),t.addClass("yith-plugin-fw-metabox-deps-initialized")})}).trigger("yith-plugin-fw-metabox-init-deps")}(jQuery);
 
 
 
 
 
 
plugin-fw/assets/js/yit-plugin-panel.js CHANGED
@@ -27,7 +27,6 @@ jQuery( function ( $ ) {
27
  //Handle dependencies.
28
  function dependencies_handler( id, deps, values, type ) {
29
  var result = true;
30
-
31
  //Single dependency
32
  if ( typeof( deps ) == 'string' ) {
33
  if ( deps.substr( 0, 6 ) == ':radio' ) {
@@ -81,7 +80,15 @@ jQuery( function ( $ ) {
81
  $current_field.hide();
82
  break;
83
  default:
84
- $current_container.hide();
 
 
 
 
 
 
 
 
85
  }
86
 
87
  } else {
@@ -95,6 +102,7 @@ jQuery( function ( $ ) {
95
  break;
96
  default:
97
  $current_container.show();
 
98
  }
99
  }
100
  }
27
  //Handle dependencies.
28
  function dependencies_handler( id, deps, values, type ) {
29
  var result = true;
 
30
  //Single dependency
31
  if ( typeof( deps ) == 'string' ) {
32
  if ( deps.substr( 0, 6 ) == ':radio' ) {
80
  $current_field.hide();
81
  break;
82
  default:
83
+ if( ! $current_container.hasClass('fade-in')){
84
+ $current_container.hide();
85
+ $current_container.css({'opacity':'0'});
86
+ }else{
87
+ $current_container.fadeTo("slow" , 0, function(){
88
+ $(this).hide().removeClass('fade-in');
89
+ });
90
+ }
91
+
92
  }
93
 
94
  } else {
102
  break;
103
  default:
104
  $current_container.show();
105
+ $current_container.fadeTo("slow" , 1).addClass('fade-in');
106
  }
107
  }
108
  }
plugin-fw/assets/js/yit-plugin-panel.min.js CHANGED
@@ -1,7 +1 @@
1
- var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,e,b){a instanceof String&&(a=String(a));for(var c=a.length,d=0;d<c;d++){var g=a[d];if(e.call(b,g,d,a))return{i:d,v:g}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,e,b){a!=Array.prototype&&a!=Object.prototype&&(a[e]=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,e,b,c){if(e){b=$jscomp.global;a=a.split(".");for(c=0;c<a.length-1;c++){var d=a[c];d in b||(b[d]={});b=b[d]}a=a[a.length-1];c=b[a];e=e(c);e!=c&&null!=e&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:e})}};
3
- $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
4
- jQuery(function(a){function e(b,c,d,e){var f=!0;if("string"==typeof c){":radio"==c.substr(0,6)&&(c+=":checked");var h=a(c).val();"checkbox"==a(c).attr("type")&&(h=a(c).is(":checked")?"yes":"no");d=d.split(",");for(c=0;c<d.length;c++)if(h!=d[c])f=!1;else{f=!0;break}}d=a(b);b=a(b+"-container").closest("tr");1>b.length&&(b=d.closest(".yith-plugin-fw-panel-wc-row"));e=e.split("-");for(var g in e)if(h=e[g],f)switch(h){case "disable":b.removeClass("yith-disabled");d.attr("disabled",!1);break;case "hideme":d.show();
5
- break;default:b.show()}else switch(h){case "disable":b.addClass("yith-disabled");d.attr("disabled",!0);break;case "hideme":d.hide();break;default:b.hide()}}a("[data-dep-target]").each(function(){var b=a(this),c="#"+b.data("dep-target"),d="#"+b.data("dep-id"),g=b.data("dep-value"),f=b.data("dep-type");e(c,d,g.toString(),f);a(d).on("change",function(){e(c,d,g.toString(),f)}).change()});a(".rm_connectedlist").each(function(){var b=a(this).find("ul"),c=a(this).find(":hidden");b.sortable({connectWith:b,
6
- update:function(d,e){var f={};b.each(function(){var b={};a(this).children().each(function(){b[a(this).data("option")]=a(this).text()});f[a(this).data("list")]=b});c.val(JSON.stringify(f).replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0"))}}).disableSelection()});a(document).ready(function(){a(".google-analytic-generate").click(function(){var b=a("#"+a(this).data("textarea")).data("codemirrorInstance"),c=a("#"+a(this).data("input")).val(),d=a(this).data("basename");b.replaceRange("(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\nm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n"+
7
- ("ga('create', '"+c+"', '"+d+"');\n")+"ga('send', 'pageview');\n",b.getCursor("start"),b.getCursor("end"))})});a(".yith-plugin-fw-panel .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper")});
1
+ jQuery(function(f){function s(a,e,t,i){var n=!0;if("string"==typeof e){":radio"==e.substr(0,6)&&(e+=":checked");var s=f(e).val();if("checkbox"==f(e).attr("type"))s=f(e).is(":checked")?"yes":"no";t=t.split(",");for(var r=0;r<t.length;r++){if(s==t[r]){n=!0;break}n=!1}}var o=f(a),d=f(a+"-container").closest("tr");d.length<1&&(d=o.closest(".yith-plugin-fw-panel-wc-row"));var c,l=i.split("-");for(c in l){var h=l[c];if(n)switch(h){case"disable":d.removeClass("yith-disabled"),o.attr("disabled",!1);break;case"hideme":o.show();break;default:d.show(),d.fadeTo("slow",1).addClass("fade-in")}else switch(h){case"disable":d.addClass("yith-disabled"),o.attr("disabled",!0);break;case"hideme":o.hide();break;default:d.hasClass("fade-in")?d.fadeTo("slow",0,function(){f(this).hide().removeClass("fade-in")}):(d.hide(),d.css({opacity:"0"}))}}}f("[data-dep-target]").each(function(){var a=f(this),e="#"+a.data("dep-target"),t="#"+a.data("dep-id"),i=a.data("dep-value"),n=a.data("dep-type");s(e,t,i.toString(),n),f(t).on("change",function(){s(e,t,i.toString(),n)}).change()}),f(".rm_connectedlist").each(function(){var i=f(this).find("ul"),n=f(this).find(":hidden");i.sortable({connectWith:i,update:function(a,e){var t={};i.each(function(){var a={};f(this).children().each(function(){a[f(this).data("option")]=f(this).text()}),t[f(this).data("list")]=a}),n.val(JSON.stringify(t).replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0"))}}).disableSelection()}),f(document).ready(function(){f(".google-analytic-generate").click(function(){var a=f("#"+f(this).data("textarea")).data("codemirrorInstance"),e="(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n";e+="(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\n",e+="m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n",e+="})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n",e+="ga('create', '"+f("#"+f(this).data("input")).val()+"', '"+f(this).data("basename")+"');\n",e+="ga('send', 'pageview');\n",a.replaceRange(e,a.getCursor("start"),a.getCursor("end"))})}),f(".yith-plugin-fw-panel .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper")});
 
 
 
 
 
 
plugin-fw/assets/js/yith-fields.js CHANGED
@@ -457,7 +457,13 @@
457
  action = 'yith_plugin_fw_save_toggle_element_metabox';
458
  post_id = $( this ).closest( 'form#post' ).find( '#post_ID' ).val();
459
  yit_metaboxes_nonce = $( this ).closest( 'form#post' ).find( '#yit_metaboxes_nonce' ).val();
460
- url = yith_framework_fw_fields.ajax_url + '?action=' + action + "&post_ID=" + post_id + '&yit_metaboxes_nonce=' + yit_metaboxes_nonce + "&toggle_id=" + id;
 
 
 
 
 
 
461
  } else {
462
  url = yith_framework_fw_fields.admin_url + '?action=' + action + '&tab=' + current_tab + "&toggle_id=" + id;
463
  }
457
  action = 'yith_plugin_fw_save_toggle_element_metabox';
458
  post_id = $( this ).closest( 'form#post' ).find( '#post_ID' ).val();
459
  yit_metaboxes_nonce = $( this ).closest( 'form#post' ).find( '#yit_metaboxes_nonce' ).val();
460
+ metabox_tab = $( this ).closest( '.tabs-panel' ).attr( 'id' );
461
+ url = yith_framework_fw_fields.ajax_url +
462
+ '?action=' + action +
463
+ "&post_ID=" + post_id +
464
+ '&yit_metaboxes_nonce=' + yit_metaboxes_nonce +
465
+ "&toggle_id=" + id +
466
+ "&metabox_tab=" + metabox_tab;
467
  } else {
468
  url = yith_framework_fw_fields.admin_url + '?action=' + action + '&tab=' + current_tab + "&toggle_id=" + id;
469
  }
plugin-fw/assets/js/yith-fields.min.js CHANGED
@@ -16,14 +16,15 @@ function(){a("#"+a(this).data("select-id")).find("option").prop("selected",!1).t
16
  e.addClass("active")});b.on("click",".yit-icons-manager-action-set-default",function(){b.find(".yit-icons-manager-list li.default").trigger("click")})});a(document).on("click",".yith-plugin-fw-select-images__item",function(){var b=a(this),c=b.data("key"),d=b.closest(".yith-plugin-fw-select-images__wrapper"),e=d.find(".yith-plugin-fw-select-images__item");d=d.find("select").first();d.length&&(d.val(c),e.removeClass("yith-plugin-fw-select-images__item--selected"),b.addClass("yith-plugin-fw-select-images__item--selected"))});
17
  a(document.body).trigger("wc-enhanced-select-init");a(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(b,c){b=jQuery(".ui-sortable-handle");var d=[];for(c=0;c<b.length;c++)d[c]=a(b[c]).data("item_key");0<d.length&&a(this).closest(".toggle-element").saveToggleElement(null,d)}});a(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init");a(document).on("click",
18
  ".yith-plugin-fw-onoff-container span",function(){var b=a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});a.fn.saveToggleElement=function(b,c){var d=a(this),e="yith_plugin_fw_save_toggle_element",g=d.serializeToggleElement(),h=d.find(".yith-toggle_wrapper"),k=h.attr("id"),l=a.urlParam("tab");g.append("security",h.data("nonce"));"undefined"!=typeof c&&0<c.length&&
19
- g.append("yith_toggle_elements_order_keys",c);d.closest(".metaboxes-tab.yith-plugin-ui").length?(e="yith_plugin_fw_save_toggle_element_metabox",post_id=a(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=a(this).closest("form#post").find("#yit_metaboxes_nonce").val(),url=yith_framework_fw_fields.ajax_url+"?action="+e+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+k):url=yith_framework_fw_fields.admin_url+"?action="+e+"&tab="+l+"&toggle_id="+k;a.ajax({type:"POST",
20
- url:url,data:g,contentType:!1,processData:!1,success:function(c){b&&b.removeClass("show");a(document).trigger("yith_save_toggle_element_done",[c,d])}})};a.fn.serializeToggleElement=function(){var b=a(this),c=new FormData;b=a(b).find(":input").serializeArray();a.each(b,function(a,b){el_name=b.name;c.append(b.name,b.value)});return c};a.fn.formatToggleTitle=function(){var b=a(this),c=b.find(":input"),d=b.find("span.title").data("title_format"),e=b.find(".subtitle").data("subtitle_format"),g=/[^%%]+(?=[%%])/g;
21
- if("undefined"!=typeof d)var h=d.match(g);if("undefined"!=typeof e)var k=e.match(g);a.each(c,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=a(c).val(),null!=h&&"undefined"!=typeof h&&-1!==h.indexOf($field_id)&&(d=d.replace("%%"+$field_id+"%%",$field_val)),null!=k&&"undefined"!=typeof k&&-1!==k.indexOf($field_id)&&(e=e.replace("%%"+$field_id+"%%",$field_val)))});""!==d&&b.find("span.title").html(d);
22
- ""!==e&&b.find(".subtitle").html(e);a(document).trigger("yith-toggle-element-item-title",[b])};a.urlParam=function(a){a=(new RegExp("[?&]"+a+"=([^&#]*)")).exec(window.location.search);return null!==a?a[1]||0:!1};a(document).on("click",".yith-toggle-title",function(b){b=a(b.target);var c=b.closest(".yith-toggle-row"),d=c.find(".yith-toggle-content");if(b.hasClass("yith-plugin-fw-onoff")||b.hasClass("yith-icon-drag"))return!1;c.is(".yith-toggle-row-opened")?d.slideUp(400):d.slideDown(400);c.toggleClass("yith-toggle-row-opened")});
23
- a(document).on("click",".yith-add-box-button",function(b){b.preventDefault();b=a(this);var c=b.data("box_id"),d=b.data("closed_label"),e=b.data("opened_label"),g=b.closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+g);""!==c&&(a("#"+c).html(template({index:"box_id"})).slideToggle(),""!==d&&(b.html()===d?b.html(e).removeClass("closed"):b.html(d).addClass("closed")),a(document).trigger("yith_fields_init"),a(document).trigger("yith-add-box-button-toggle",
24
- [b]))});a(document).on("click",".yith-add-box-buttons .yith-save-button",function(b){b.preventDefault();var c=a(this).parents(".yith-add-box"),d=a(this).closest(".yith-toggle_wrapper").attr("id");b=c.find(".spinner");var e=a(this).parents(".toggle-element"),g=c.find(":input"),h=e.find(".yith-toggle-row").length,k=a('<input type="hidden">');k.val(h);a(document).trigger("yith-toggle-change-counter",[k,c]);h=k.val();d=wp.template("yith-toggle-element-item-"+d);var l=a(d({index:h}));b.addClass("show");
25
- a.each(g,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_val=a(c).val(),"radio"==a(c).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+h,a(c).is(":checked")&&a(l).find("#"+$field_id).prop("checked",!0),(a(c).hasClass("yith-post-search")||a(c).hasClass("yith-term-search"))&&a(l).find("#"+$field_id).html(a("#"+a(c).attr("id")).html()),
26
- a(l).find("#"+$field_id).val($field_val))});a(l).formatToggleTitle();var m=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-add",[c,l,m]);setTimeout(function(){"yes"===m.val()&&(a(e).find(".yith-toggle-elements").append(l),a(c).find(".yith-plugin-fw-datepicker").datepicker("destroy"),a(c).html(""),a(c).prev(".yith-add-box-button").trigger("click"),e.saveToggleElement(),setTimeout(function(){a(e).find(".highlight").removeClass("highlight")},2E3),a(document).trigger("yith_fields_init"))},
27
- 1E3)});a(document).on("click",".yith-toggle-row .yith-save-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");var c=a(this).closest(".yith-toggle-row"),d=c.find(".spinner");c.formatToggleTitle();var e=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-update",[b,c,e]);"yes"===e.val()&&(d.addClass("show"),b.saveToggleElement(d))});a(document).on("click",".yith-toggle-row .yith-delete-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");
28
- a(this).closest(".yith-toggle-row").remove();b.saveToggleElement()});a(document).on("click",".yith-toggle-onoff",function(b){b.preventDefault();a(this).closest(".toggle-element").saveToggleElement()});a(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){a(this).closest(".yith-plugin-fw-radio").val(a(this).val()).trigger("change")});a(document).on("click",".yith-password-eye",function(){var b=a(this),c=a(this).closest(".yith-password-wrapper").find("input");"password"===c.attr("type")?
29
- (c.attr("type","text"),b.addClass("yith-password-eye-closed")):(c.attr("type","password"),b.removeClass("yith-password-eye-closed"))});a(document.body).on("yith-plugin-fw-init-radio",function(){a(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){a(this).val(a(this).attr("value"));a(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio");a(document).on("select2:open",function(b){a(b.target).closest(".yith-plugin-ui").length&&a(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")})})(jQuery);
 
16
  e.addClass("active")});b.on("click",".yit-icons-manager-action-set-default",function(){b.find(".yit-icons-manager-list li.default").trigger("click")})});a(document).on("click",".yith-plugin-fw-select-images__item",function(){var b=a(this),c=b.data("key"),d=b.closest(".yith-plugin-fw-select-images__wrapper"),e=d.find(".yith-plugin-fw-select-images__item");d=d.find("select").first();d.length&&(d.val(c),e.removeClass("yith-plugin-fw-select-images__item--selected"),b.addClass("yith-plugin-fw-select-images__item--selected"))});
17
  a(document.body).trigger("wc-enhanced-select-init");a(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(b,c){b=jQuery(".ui-sortable-handle");var d=[];for(c=0;c<b.length;c++)d[c]=a(b[c]).data("item_key");0<d.length&&a(this).closest(".toggle-element").saveToggleElement(null,d)}});a(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init");a(document).on("click",
18
  ".yith-plugin-fw-onoff-container span",function(){var b=a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});a.fn.saveToggleElement=function(b,c){var d=a(this),e="yith_plugin_fw_save_toggle_element",g=d.serializeToggleElement(),h=d.find(".yith-toggle_wrapper"),k=h.attr("id"),l=a.urlParam("tab");g.append("security",h.data("nonce"));"undefined"!=typeof c&&0<c.length&&
19
+ g.append("yith_toggle_elements_order_keys",c);d.closest(".metaboxes-tab.yith-plugin-ui").length?(e="yith_plugin_fw_save_toggle_element_metabox",post_id=a(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=a(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=a(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+e+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+k+"&metabox_tab="+metabox_tab):
20
+ url=yith_framework_fw_fields.admin_url+"?action="+e+"&tab="+l+"&toggle_id="+k;a.ajax({type:"POST",url:url,data:g,contentType:!1,processData:!1,success:function(c){b&&b.removeClass("show");a(document).trigger("yith_save_toggle_element_done",[c,d])}})};a.fn.serializeToggleElement=function(){var b=a(this),c=new FormData;b=a(b).find(":input").serializeArray();a.each(b,function(a,b){el_name=b.name;c.append(b.name,b.value)});return c};a.fn.formatToggleTitle=function(){var b=a(this),c=b.find(":input"),d=
21
+ b.find("span.title").data("title_format"),e=b.find(".subtitle").data("subtitle_format"),g=/[^%%]+(?=[%%])/g;if("undefined"!=typeof d)var h=d.match(g);if("undefined"!=typeof e)var k=e.match(g);a.each(c,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=a(c).val(),null!=h&&"undefined"!=typeof h&&-1!==h.indexOf($field_id)&&(d=d.replace("%%"+$field_id+"%%",$field_val)),null!=k&&
22
+ "undefined"!=typeof k&&-1!==k.indexOf($field_id)&&(e=e.replace("%%"+$field_id+"%%",$field_val)))});""!==d&&b.find("span.title").html(d);""!==e&&b.find(".subtitle").html(e);a(document).trigger("yith-toggle-element-item-title",[b])};a.urlParam=function(a){a=(new RegExp("[?&]"+a+"=([^&#]*)")).exec(window.location.search);return null!==a?a[1]||0:!1};a(document).on("click",".yith-toggle-title",function(b){b=a(b.target);var c=b.closest(".yith-toggle-row"),d=c.find(".yith-toggle-content");if(b.hasClass("yith-plugin-fw-onoff")||
23
+ b.hasClass("yith-icon-drag"))return!1;c.is(".yith-toggle-row-opened")?d.slideUp(400):d.slideDown(400);c.toggleClass("yith-toggle-row-opened")});a(document).on("click",".yith-add-box-button",function(b){b.preventDefault();b=a(this);var c=b.data("box_id"),d=b.data("closed_label"),e=b.data("opened_label"),g=b.closest(".yith-toggle_wrapper").attr("id");template=wp.template("yith-toggle-element-add-box-content-"+g);""!==c&&(a("#"+c).html(template({index:"box_id"})).slideToggle(),""!==d&&(b.html()===d?
24
+ b.html(e).removeClass("closed"):b.html(d).addClass("closed")),a(document).trigger("yith_fields_init"),a(document).trigger("yith-add-box-button-toggle",[b]))});a(document).on("click",".yith-add-box-buttons .yith-save-button",function(b){b.preventDefault();var c=a(this).parents(".yith-add-box"),d=a(this).closest(".yith-toggle_wrapper").attr("id");b=c.find(".spinner");var e=a(this).parents(".toggle-element"),g=c.find(":input"),h=e.find(".yith-toggle-row").length,k=a('<input type="hidden">');k.val(h);
25
+ a(document).trigger("yith-toggle-change-counter",[k,c]);h=k.val();d=wp.template("yith-toggle-element-item-"+d);var l=a(d({index:h}));b.addClass("show");a.each(g,function(b,c){"undefined"!=typeof a(c).attr("id")&&($field_id=a(c).attr("id"),$field_val=a(c).val(),"radio"==a(c).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+h,a(c).is(":checked")&&a(l).find("#"+
26
+ $field_id).prop("checked",!0),(a(c).hasClass("yith-post-search")||a(c).hasClass("yith-term-search"))&&a(l).find("#"+$field_id).html(a("#"+a(c).attr("id")).html()),a(l).find("#"+$field_id).val($field_val))});a(l).formatToggleTitle();var m=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-add",[c,l,m]);setTimeout(function(){"yes"===m.val()&&(a(e).find(".yith-toggle-elements").append(l),a(c).find(".yith-plugin-fw-datepicker").datepicker("destroy"),a(c).html(""),
27
+ a(c).prev(".yith-add-box-button").trigger("click"),e.saveToggleElement(),setTimeout(function(){a(e).find(".highlight").removeClass("highlight")},2E3),a(document).trigger("yith_fields_init"))},1E3)});a(document).on("click",".yith-toggle-row .yith-save-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");var c=a(this).closest(".yith-toggle-row"),d=c.find(".spinner");c.formatToggleTitle();var e=a('<input type="hidden">').val("yes");a(document).trigger("yith-toggle-element-item-before-update",
28
+ [b,c,e]);"yes"===e.val()&&(d.addClass("show"),b.saveToggleElement(d))});a(document).on("click",".yith-toggle-row .yith-delete-button",function(b){b.preventDefault();b=a(this).closest(".toggle-element");a(this).closest(".yith-toggle-row").remove();b.saveToggleElement()});a(document).on("click",".yith-toggle-onoff",function(b){b.preventDefault();a(this).closest(".toggle-element").saveToggleElement()});a(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){a(this).closest(".yith-plugin-fw-radio").val(a(this).val()).trigger("change")});
29
+ a(document).on("click",".yith-password-eye",function(){var b=a(this),c=a(this).closest(".yith-password-wrapper").find("input");"password"===c.attr("type")?(c.attr("type","text"),b.addClass("yith-password-eye-closed")):(c.attr("type","password"),b.removeClass("yith-password-eye-closed"))});a(document.body).on("yith-plugin-fw-init-radio",function(){a(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){a(this).val(a(this).attr("value"));a(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio");
30
+ a(document).on("select2:open",function(b){a(b.target).closest(".yith-plugin-ui").length&&a(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")})})(jQuery);
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.4.2
5
  * Author: YITHEMES
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
- * @version 3.4.0
11
  */
12
  /**
13
  * This file belongs to the YIT Plugin Framework.
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.4.8
5
  * Author: YITHEMES
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author Your Inspiration Themes
10
+ * @version 3.4.8
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
@@ -5,14 +5,14 @@ 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: 2019-02-04 16:04+0100\n"
8
- "PO-Revision-Date: 2019-02-04 16:05+0100\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.1\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"
@@ -921,7 +921,7 @@ msgstr "Barra lateral derecha"
921
  #: templates/fields/upload.php:18 templates/metaboxes/types/icon-list.php:70
922
  #: templates/panel/woocommerce/woocommerce-upload.php:40
923
  msgid "Upload"
924
- msgstr "Actualiza"
925
 
926
  #: templates/fields/upload.php:19
927
  msgid "Reset"
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: 2019-02-04 16:04+0100\n"
8
+ "PO-Revision-Date: 2019-12-02 10:38+0000\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 1.8.12\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"
921
  #: templates/fields/upload.php:18 templates/metaboxes/types/icon-list.php:70
922
  #: templates/panel/woocommerce/woocommerce-upload.php:40
923
  msgid "Upload"
924
+ msgstr "Subir"
925
 
926
  #: templates/fields/upload.php:19
927
  msgid "Reset"
plugin-fw/lib/promo/yith-promo.php CHANGED
@@ -21,11 +21,22 @@ if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
21
  global $pagenow;
22
  $not_administrator = function_exists( 'current_user_can' ) && ! current_user_can( 'administrator' );
23
  $is_dashboard = 'index.php' == $pagenow;
24
-
25
- if( $not_administrator || $is_dashboard ){
 
 
 
 
 
 
 
26
  return false;
27
  }
28
 
 
 
 
 
29
  $base_url = apply_filters( 'yith_plugin_fw_promo_base_url', YIT_CORE_PLUGIN_URL . '/lib/promo/' );
30
  $xml = apply_filters( 'yith_plugin_fw_promo_xml_url', YIT_CORE_PLUGIN_PATH . '/lib/promo/yith-promo.xml' );
31
  $transient = "yith_promo_message";
21
  global $pagenow;
22
  $not_administrator = function_exists( 'current_user_can' ) && ! current_user_can( 'administrator' );
23
  $is_dashboard = 'index.php' == $pagenow;
24
+ $is_wc_pages = '';
25
+ $is_plugin_page = 'plugins.php' == $pagenow || 'plugin-install.php' == $pagenow && 'plugin-editor.php' == $pagenow;
26
+ $wc_post_types = array( 'shop_order', 'shop_coupon', );
27
+ $is_wc_post_types = isset( $_GET['post_type'] ) && in_array( $_GET['post_type'], $wc_post_types );
28
+ $wc_pages = array( 'wc-reports', 'wc-settings', 'wc-status', 'wc-addons' );
29
+ $is_wc_pages = isset( $_GET['page'] ) && in_array( $_GET['page'], $wc_pages );
30
+ $is_yith_page = isset( $_GET['page'] ) && false !== strstr( $_GET['page'], 'yith' ) ;
31
+
32
+ if( $not_administrator ){
33
  return false;
34
  }
35
 
36
+ if( ! $is_plugin_page && ! $is_wc_pages && ! $is_wc_post_types && ! $is_yith_page ){
37
+ return false;
38
+ }
39
+
40
  $base_url = apply_filters( 'yith_plugin_fw_promo_base_url', YIT_CORE_PLUGIN_URL . '/lib/promo/' );
41
  $xml = apply_filters( 'yith_plugin_fw_promo_xml_url', YIT_CORE_PLUGIN_PATH . '/lib/promo/yith-promo.xml' );
42
  $transient = "yith_promo_message";
plugin-fw/lib/yit-cpt-unlimited.php CHANGED
@@ -138,8 +138,10 @@ class YIT_CPT_Unlimited {
138
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_assets' ) );
139
 
140
  // metaboxes
141
- add_action( 'add_meta_boxes', array( $this, 'add_metabox_cptu' ), 2 );
142
- add_action( 'add_meta_boxes', array( $this, 'add_metabox_item_fields' ), 2 );
 
 
143
 
144
  // multiuploader
145
  if ( $this->_args['add_multiuploader'] ) {
138
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_assets' ) );
139
 
140
  // metaboxes
141
+ if ( is_admin() ) {
142
+ add_action( 'init', array( $this, 'add_metabox_cptu' ) );
143
+ add_action( 'init', array( $this, 'add_metabox_item_fields' ) );
144
+ }
145
 
146
  // multiuploader
147
  if ( $this->_args['add_multiuploader'] ) {
plugin-fw/lib/yit-metabox.php CHANGED
@@ -461,19 +461,27 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
461
  }
462
  }
463
 
464
- $this->sanitize_fields( $post_id );
465
 
 
 
466
 
 
 
 
 
 
 
 
467
  }
468
 
469
  /**
470
- * Sanitize the fields of metabox.
471
  *
472
  * @return void
473
- * @since 3.2.1
474
- * @author Emanuela Castorina
475
  */
476
- public function sanitize_fields( $post_id ) {
477
  $this->reorder_tabs();
478
  $tabs_to_sanitize = $this->tabs;
479
  $allow_ajax = isset( $_REQUEST[ 'yith_metabox_allow_ajax_saving' ] ) && $this->id === $_REQUEST[ 'yith_metabox_allow_ajax_saving' ];
@@ -489,61 +497,67 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
489
  }
490
  }
491
 
492
-
493
-
494
-
495
  foreach ( $tabs_to_sanitize as $tab ) {
496
-
497
  foreach ( $tab[ 'fields' ] as $field ) {
 
 
 
 
498
 
499
- if ( in_array( $field[ 'type' ], array( 'title' ) ) ) {
500
- continue;
501
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
502
 
503
- if ( isset( $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ] ) ) {
504
- if ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
505
- update_post_meta( $post_id, $field[ 'id' ], '1' );
506
- } elseif ( in_array( $field[ 'type' ], array( 'toggle-element' ) ) ) {
507
- if ( isset( $field[ 'elements' ] ) && $field[ 'elements' ] ) {
508
- $elements_value = $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ];
509
- if ( $elements_value ) {
510
- if ( isset( $elements_value[ 'box_id' ] ) ) {
511
- unset( $elements_value[ 'box_id' ] );
512
  }
513
 
514
- foreach ( $field[ 'elements' ] as $element ) {
515
- foreach ( $elements_value as $key => $element_value ) {
516
- if ( isset( $field[ 'onoff_field' ] ) ) {
517
- $elements_value[ $key ][ $field[ 'onoff_field' ][ 'id' ] ] = !isset( $element_value[ $field[ 'onoff_field' ][ 'id' ] ] ) ? 0 : $element_value[ $field[ 'onoff_field' ][ 'id' ] ];
518
- }
519
- if ( in_array( $element[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
520
- $elements_value[ $key ][ $element[ 'id' ] ] = !isset( $element_value[ $element[ 'id' ] ] ) ? 0 : 1;
521
- }
522
-
523
- if ( !empty( $element[ 'yith-sanitize-callback' ] ) && is_callable( $element[ 'yith-sanitize-callback' ] ) ) {
524
- $elements_value[ $key ][ $element[ 'id' ] ] = call_user_func( $element[ 'yith-sanitize-callback' ], $elements_value[ $key ][ $element[ 'id' ] ] );
525
- }
526
- }
527
  }
528
  }
529
-
530
- update_post_meta( $post_id, $field[ 'id' ], maybe_serialize( $elements_value ) );
531
  }
532
- } else {
533
- $value = $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ];
534
- if ( !empty( $field[ 'yith-sanitize-callback' ] ) && is_callable( $field[ 'yith-sanitize-callback' ] ) ) {
535
- $value = call_user_func( $field[ 'yith-sanitize-callback' ], $value );
536
- }
537
- add_post_meta( $post_id, $field[ 'id' ], $value, true ) || update_post_meta( $post_id, $field[ 'id' ], $value );
538
  }
539
- } elseif ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
540
- update_post_meta( $post_id, $field[ 'id' ], '0' );
541
- } elseif ( in_array( $field[ 'type' ], array( 'checkbox-array' ) ) ) {
542
- update_post_meta( $post_id, $field[ 'id' ], array() );
543
- } else {
544
- delete_post_meta( $post_id, $field[ 'id' ] );
 
545
  }
 
546
  }
 
 
 
 
 
 
547
  }
548
  }
549
 
@@ -579,13 +593,26 @@ if ( !class_exists( 'YIT_Metabox' ) ) {
579
  }
580
  $post_id = $_REQUEST[ 'post_ID' ];
581
 
582
- if ( isset( $_REQUEST[ 'yit_metaboxes' ] ) ) {
583
  $yit_metabox_data = $_REQUEST[ 'yit_metaboxes' ];
 
 
 
 
 
584
 
585
  if ( is_array( $yit_metabox_data ) ) {
586
- $this->sanitize_fields( $post_id );
 
 
 
 
 
 
 
 
587
  }
588
- } elseif ( !isset( $_REQUEST[ 'yit_metaboxes' ] ) || !isset( $_REQUEST[ 'yit_metaboxes' ][ $_REQUEST[ 'toggle_id' ] ] ) ) {
589
  delete_post_meta( $post_id, $_REQUEST[ 'toggle_id' ] );
590
  }
591
  }
461
  }
462
  }
463
 
464
+ $this->sanitize_and_save_fields( $post_id );
465
 
466
+ return $post_id;
467
+ }
468
 
469
+ /**
470
+ * @param $post_id
471
+ * @since 3.2.1
472
+ * @deprecated since 3.4.8
473
+ */
474
+ public function sanitize_fields( $post_id ) {
475
+ $this->sanitize_and_save_fields( $post_id );
476
  }
477
 
478
  /**
479
+ * Sanitize and save fields of the Metabox.
480
  *
481
  * @return void
482
+ * @since 3.4.8
 
483
  */
484
+ public function sanitize_and_save_fields( $post_id ) {
485
  $this->reorder_tabs();
486
  $tabs_to_sanitize = $this->tabs;
487
  $allow_ajax = isset( $_REQUEST[ 'yith_metabox_allow_ajax_saving' ] ) && $this->id === $_REQUEST[ 'yith_metabox_allow_ajax_saving' ];
497
  }
498
  }
499
 
 
 
 
500
  foreach ( $tabs_to_sanitize as $tab ) {
 
501
  foreach ( $tab[ 'fields' ] as $field ) {
502
+ $this->sanitize_and_save_field( $field, $post_id );
503
+ }
504
+ }
505
+ }
506
 
507
+ /**
508
+ * Sanitize and save a single field
509
+ *
510
+ * @param array $field
511
+ * @param int $post_id
512
+ * @since 3.4.8
513
+ */
514
+ public function sanitize_and_save_field( $field, $post_id ) {
515
+ if ( in_array( $field[ 'type' ], array( 'title' ) ) ) {
516
+ return;
517
+ }
518
+
519
+ if ( isset( $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ] ) ) {
520
+ if ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
521
+ update_post_meta( $post_id, $field[ 'id' ], '1' );
522
+ } elseif ( in_array( $field[ 'type' ], array( 'toggle-element' ) ) ) {
523
+ if ( isset( $field[ 'elements' ] ) && $field[ 'elements' ] ) {
524
+ $elements_value = $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ];
525
+ if ( $elements_value ) {
526
+ if ( isset( $elements_value[ 'box_id' ] ) ) {
527
+ unset( $elements_value[ 'box_id' ] );
528
+ }
529
 
530
+ foreach ( $field[ 'elements' ] as $element ) {
531
+ foreach ( $elements_value as $key => $element_value ) {
532
+ if ( isset( $field[ 'onoff_field' ] ) ) {
533
+ $elements_value[ $key ][ $field[ 'onoff_field' ][ 'id' ] ] = !isset( $element_value[ $field[ 'onoff_field' ][ 'id' ] ] ) ? 0 : $element_value[ $field[ 'onoff_field' ][ 'id' ] ];
534
+ }
535
+ if ( in_array( $element[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
536
+ $elements_value[ $key ][ $element[ 'id' ] ] = !isset( $element_value[ $element[ 'id' ] ] ) ? 0 : 1;
 
 
537
  }
538
 
539
+ if ( !empty( $element[ 'yith-sanitize-callback' ] ) && is_callable( $element[ 'yith-sanitize-callback' ] ) ) {
540
+ $elements_value[ $key ][ $element[ 'id' ] ] = call_user_func( $element[ 'yith-sanitize-callback' ], $elements_value[ $key ][ $element[ 'id' ] ] );
 
 
 
 
 
 
 
 
 
 
 
541
  }
542
  }
 
 
543
  }
 
 
 
 
 
 
544
  }
545
+
546
+ update_post_meta( $post_id, $field[ 'id' ], maybe_serialize( $elements_value ) );
547
+ }
548
+ } else {
549
+ $value = $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ];
550
+ if ( !empty( $field[ 'yith-sanitize-callback' ] ) && is_callable( $field[ 'yith-sanitize-callback' ] ) ) {
551
+ $value = call_user_func( $field[ 'yith-sanitize-callback' ], $value );
552
  }
553
+ add_post_meta( $post_id, $field[ 'id' ], $value, true ) || update_post_meta( $post_id, $field[ 'id' ], $value );
554
  }
555
+ } elseif ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
556
+ update_post_meta( $post_id, $field[ 'id' ], '0' );
557
+ } elseif ( in_array( $field[ 'type' ], array( 'checkbox-array' ) ) ) {
558
+ update_post_meta( $post_id, $field[ 'id' ], array() );
559
+ } else {
560
+ delete_post_meta( $post_id, $field[ 'id' ] );
561
  }
562
  }
563
 
593
  }
594
  $post_id = $_REQUEST[ 'post_ID' ];
595
 
596
+ if ( isset( $_REQUEST[ 'yit_metaboxes' ], $_REQUEST[ 'toggle_id' ], $_REQUEST[ 'metabox_tab' ], $_REQUEST[ 'yit_metaboxes' ][ $_REQUEST[ 'toggle_id' ] ] ) ) {
597
  $yit_metabox_data = $_REQUEST[ 'yit_metaboxes' ];
598
+ $metabox_tab = $_REQUEST[ 'metabox_tab' ];
599
+ $field_id = $_REQUEST[ 'toggle_id' ];
600
+ if ( strpos( $field_id, '_' ) === 0 ) {
601
+ $field_id = substr( $field_id, 1 );
602
+ }
603
 
604
  if ( is_array( $yit_metabox_data ) ) {
605
+ $this->reorder_tabs();
606
+ $tabs = $this->tabs;
607
+
608
+ if ( isset( $tabs[ $metabox_tab ], $tabs[ $metabox_tab ][ 'fields' ] ) && isset( $tabs[ $metabox_tab ][ 'fields' ][ $field_id ] ) ) {
609
+ $field = $tabs[ $metabox_tab ][ 'fields' ][ $field_id ];
610
+ if ( $field ) {
611
+ $this->sanitize_and_save_field( $field, $post_id );
612
+ }
613
+ }
614
  }
615
+ } elseif ( isset( $_REQUEST[ 'toggle_id' ] ) ) {
616
  delete_post_meta( $post_id, $_REQUEST[ 'toggle_id' ] );
617
  }
618
  }
plugin-fw/lib/yit-plugin-panel-wc.php CHANGED
@@ -549,6 +549,12 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
549
 
550
  if ( $value && isset( $option[ 'elements' ] ) && !empty( $option[ 'elements' ] ) ) {
551
 
 
 
 
 
 
 
552
  foreach ( $value as $index => $single_toggle ) {
553
 
554
  if ( $value && isset( $option[ 'onoff_field' ] ) && !empty( $option[ 'onoff_field' ] ) ) {
@@ -561,7 +567,8 @@ if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
561
  }
562
 
563
  foreach ( $option[ 'elements' ] as $element ) {
564
- $value[ $index ][ $element[ 'id' ] ] = self::sanitize_option( $value[ $index ][ $element[ 'id' ] ], $element, $value[ $index ][ $element[ 'id' ] ] );
 
565
  }
566
  }
567
  }
549
 
550
  if ( $value && isset( $option[ 'elements' ] ) && !empty( $option[ 'elements' ] ) ) {
551
 
552
+ $value = maybe_unserialize( $value );
553
+
554
+ if( isset( $value['box_id'] ) ){
555
+ unset( $value['box_id'] );
556
+ }
557
+
558
  foreach ( $value as $index => $single_toggle ) {
559
 
560
  if ( $value && isset( $option[ 'onoff_field' ] ) && !empty( $option[ 'onoff_field' ] ) ) {
567
  }
568
 
569
  foreach ( $option[ 'elements' ] as $element ) {
570
+ $element_value = isset( $value[ $index ][ $element[ 'id' ] ] ) ? $value[ $index ][ $element[ 'id' ] ] : false;
571
+ $value[ $index ][ $element[ 'id' ] ] = self::sanitize_option( $element_value, $element, $element_value );
572
  }
573
  }
574
  }
plugin-fw/lib/yit-plugin-panel.php CHANGED
@@ -496,7 +496,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
496
  $url = admin_url( "admin.php{$url}" );
497
  }
498
 
499
- return $url;
500
  }
501
 
502
  /**
@@ -537,6 +537,7 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
537
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
538
  */
539
  public function yit_panel() {
 
540
  $yit_options = $this->get_main_array_options();
541
  $wrap_class = isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '';
542
 
@@ -1221,41 +1222,25 @@ if ( !class_exists( 'YIT_Plugin_Panel' ) ) {
1221
  }
1222
 
1223
  if ( $this->is_free() && isset( $this->settings[ 'plugin_slug' ] ) ):
1224
- $banners = apply_filters( 'yith_plugin_fw_banners_free', array(
1225
- 'upgrade' => array(
1226
- 'image' => YIT_CORE_PLUGIN_URL . '/assets/images/upgrade_banner.png',
1227
- 'link' => 'https://yithemes.com/themes/plugins/' . $this->settings[ 'plugin_slug' ],
1228
- ),
1229
- 'rate' => array(
1230
- 'image' => YIT_CORE_PLUGIN_URL . '/assets/images/rate_banner.png',
1231
- 'link' => 'https://wordpress.org/support/plugin/' . $this->settings[ 'plugin_slug' ] . '/reviews/?rate=5#new-post',
1232
- ),
1233
- ), $page );
1234
  ?>
1235
  <h1 class="notice-container"></h1>
1236
- <div class="yith-plugin-fw-banner yith-plugin-fw-banner-free">
1237
  <h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?></h1>
1238
- <?php if ( $banners ) : ?>
1239
- <div class="yith-banners">
1240
- <ul>
1241
- <?php foreach ( $banners as $banner ): ?>
1242
- <li><a href="<?php echo esc_url( $banner[ 'link' ] ) ?>" target="_blank"><img src="<?php echo esc_url( $banner[ 'image' ] ) ?>"></a></li>
1243
- <?php endforeach; ?>
1244
- </ul>
1245
- </div>
1246
-
1247
- <?php endif ?>
1248
  </div>
 
 
 
 
 
 
 
 
1249
  <?php else: ?>
1250
  <h1 class="notice-container"></h1>
1251
  <div class="yith-plugin-fw-banner">
1252
- <h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?>
1253
- <?php if ( isset( $this->settings[ 'plugin_description' ] ) ): ?>
1254
- <span><?php echo esc_html( $this->settings[ 'plugin_description' ] ) ?></span>
1255
- <?php endif ?>
1256
- </h1>
1257
  </div>
1258
-
1259
  <?php endif ?>
1260
  <?php
1261
  }
496
  $url = admin_url( "admin.php{$url}" );
497
  }
498
 
499
+ return apply_filters( 'yith_plugin_fw_panel_url', $url, $page, $tab, $sub_tab, $parent_page );
500
  }
501
 
502
  /**
537
  * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
538
  */
539
  public function yit_panel() {
540
+ $this->maybe_redirect_to_proper_wp_page();
541
  $yit_options = $this->get_main_array_options();
542
  $wrap_class = isset( $this->settings[ 'class' ] ) ? $this->settings[ 'class' ] : '';
543
 
1222
  }
1223
 
1224
  if ( $this->is_free() && isset( $this->settings[ 'plugin_slug' ] ) ):
1225
+ $rate_link = apply_filters( 'yith_plugin_fw_rate_url', 'https://wordpress.org/support/plugin/' . $this->settings[ 'plugin_slug' ] . '/reviews/?rate=5#new-post' );
 
 
 
 
 
 
 
 
 
1226
  ?>
1227
  <h1 class="notice-container"></h1>
1228
+ <div class="yith-plugin-fw-banner">
1229
  <h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?></h1>
 
 
 
 
 
 
 
 
 
 
1230
  </div>
1231
+ <div class="yith-plugin-fw-rate">
1232
+ <?php printf('<strong>%s</strong> %s <a href="%s" target="_blank"><u>%s</u> <span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a> %s',
1233
+ __('We need your support','yith-plugin-fw'),
1234
+ __('to keep updating and improving the plugin. Please,','yith-plugin-fw'),
1235
+ $rate_link,
1236
+ __('help us by leaving a five-star rating','yith-plugin-fw' ),
1237
+ __(':) Thanks!','yith-plugin-fw' ) )?>
1238
+ </div>
1239
  <?php else: ?>
1240
  <h1 class="notice-container"></h1>
1241
  <div class="yith-plugin-fw-banner">
1242
+ <h1><?php echo esc_html( $this->settings[ 'page_title' ] ) ?></h1>
 
 
 
 
1243
  </div>
 
1244
  <?php endif ?>
1245
  <?php
1246
  }
plugin-fw/yit-plugin.php CHANGED
@@ -158,7 +158,8 @@ if( ! function_exists( 'yit_plugin_fw_row_meta' ) ){
158
  }
159
 
160
  if( ! empty( $url ) && ! empty( $label ) ){
161
- $plugin_meta[] = sprintf( '<a href="%s" target="_blank"><span class="%s"></span>%s</a>', $url, $icon, $label );
 
162
  }
163
  }
164
 
158
  }
159
 
160
  if( ! empty( $url ) && ! empty( $label ) ){
161
+ $url = trailingslashit( $url );
162
+ $plugin_meta[] = sprintf( '<a href="%s" target="_blank"><span class="%s"></span>%s</a>', $url, $icon, $label );
163
  }
164
  }
165
 
templates/admin/premium.php CHANGED
@@ -46,6 +46,7 @@
46
  display: table-cell;
47
  vertical-align: middle;
48
  line-height: 25px;
 
49
  }
50
 
51
  .section-title{
46
  display: table-cell;
47
  vertical-align: middle;
48
  line-height: 25px;
49
+ border: none;
50
  }
51
 
52
  .section-title{