YITH WooCommerce Compare - Version 2.6.0

Version Description

Released on 09 Sep 2021

  • New: support for WooCommerce 5.7
  • Update: YITH plugin framework
  • Fix: compare button preview on Elementor editor
Download this release

Release Info

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

Code changes from version 2.5.4.1 to 2.6.0

assets/js/woocompare.js CHANGED
@@ -1,5 +1,10 @@
1
  jQuery(document).ready(function($) {
2
 
 
 
 
 
 
3
  // add into table
4
  $(document).on( 'click', '.product a.compare:not(.added)', function(e){
5
  e.preventDefault();
1
  jQuery(document).ready(function($) {
2
 
3
+ // Exit if is elementor editor.
4
+ if ( $( document.body ).hasClass( 'elementor-editor-active') ) {
5
+ return false;
6
+ }
7
+
8
  // add into table
9
  $(document).on( 'click', '.product a.compare:not(.added)', function(e){
10
  e.preventDefault();
assets/js/woocompare.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(o){function e(o,e){o=escape(o),e=escape(e);var t=document.location.search,a=o+"="+e,r=new RegExp("(&|\\?)"+o+"=[^&]*");return t=t.replace(r,"$1"+a),RegExp.$1||(t+=(t.length>0?"&":"?")+a),t}o(document).on("click",".product a.compare:not(.added)",function(e){e.preventDefault();var t=o(this),a={action:yith_woocompare.actionadd,id:t.data("product_id"),context:"frontend"},r=o(".yith-woocompare-widget ul.products-list");void 0!==o.fn.block&&(t.block({message:null,overlayCSS:{background:"#fff url("+yith_woocompare.loader+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}}),r.block({message:null,overlayCSS:{background:"#fff url("+yith_woocompare.loader+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}})),o.ajax({type:"post",url:yith_woocompare.ajaxurl.toString().replace("%%endpoint%%",yith_woocompare.actionadd),data:a,dataType:"json",success:function(e){void 0!==o.fn.block&&(t.unblock(),r.unblock()),t.addClass("added").attr("href",e.table_url).text(yith_woocompare.added_label),r.html(e.widget_table),"yes"==yith_woocompare.auto_open&&o("body").trigger("yith_woocompare_open_popup",{response:e.table_url,button:t})}})}),o(document).on("click",".product a.compare.added",function(e){e.preventDefault();var t=this.href;void 0!==t&&o("body").trigger("yith_woocompare_open_popup",{response:t,button:o(this)})}),o("body").on("yith_woocompare_open_popup",function(e,t){var a=t.response;if(o(window).width()>=768)o.colorbox({href:a,iframe:!0,width:"90%",height:"90%",className:"yith_woocompare_colorbox",close:yith_woocompare.close_label,onClosed:function(){var e=o(".yith-woocompare-widget ul.products-list"),t={action:yith_woocompare.actionreload,context:"frontend"};void 0!==o.fn.block&&e.block({message:null,overlayCSS:{background:"#fff url("+yith_woocompare.loader+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}}),o.ajax({type:"post",url:yith_woocompare.ajaxurl.toString().replace("%%endpoint%%",yith_woocompare.actionreload),data:t,success:function(t){void 0!==o.fn.block&&e.unblock().html(t),e.html(t)}})}}),o(window).resize(function(){o.colorbox.resize({width:"90%",height:"90%"})});else{var r=a.split("?");if(r.length>=2){for(var c=encodeURIComponent("iframe")+"=",n=r[1].split(/[&;]/g),i=n.length;i-- >0;)-1!==n[i].lastIndexOf(c,0)&&n.splice(i,1);a=r[0]+"?"+n.join("&")}window.open(a,yith_woocompare.table_title)}}),o(document).on("click",".remove a",function(e){e.preventDefault();var t=o(this),a={action:yith_woocompare.actionremove,id:t.data("product_id"),context:"frontend"};o("td.product_"+a.id+", th.product_"+a.id);void 0!==o.fn.block&&t.block({message:null,overlayCSS:{background:"#fff url("+yith_woocompare.loader+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}}),o.ajax({type:"post",url:yith_woocompare.ajaxurl.toString().replace("%%endpoint%%",yith_woocompare.actionremove),data:a,dataType:"html",success:function(e){var a=o(e).filter("#yith-woocompare");o("#yith-woocompare").replaceWith(a),o('.compare[data-product_id="'+t.data("product_id")+'"]',window.parent.document).removeClass("added").html(yith_woocompare.button_text),o(document).trigger("yith_woocompare_product_removed")}})}),o(".yith-woocompare-open a, a.yith-woocompare-open").on("click",function(t){t.preventDefault(),o("body").trigger("yith_woocompare_open_popup",{response:e("action",yith_woocompare.actionview)+"&iframe=true"})}),o(".yith-woocompare-widget").on("click","a.compare",function(e){e.preventDefault(),o("body").trigger("yith_woocompare_open_popup",{response:o(this).attr("href")})}).on("click","li a.remove, a.clear-all",function(e){e.preventDefault();var t=o(".yith-woocompare-widget .products-list").data("lang"),a=o(this),r=a.data("product_id"),c={action:yith_woocompare.actionremove,id:r,context:"frontend",responseType:"product_list",lang:t},n=a.parents(".yith-woocompare-widget").find("ul.products-list");void 0!==o.fn.block&&n.block({message:null,overlayCSS:{background:"#fff url("+yith_woocompare.loader+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}}),o.ajax({type:"post",url:yith_woocompare.ajaxurl.toString().replace("%%endpoint%%",yith_woocompare.actionremove),data:c,dataType:"html",success:function(e){"all"==r?o(".compare.added").removeClass("added").html(yith_woocompare.button_text):o('.compare[data-product_id="'+r+'"]').removeClass("added").html(yith_woocompare.button_text),n.html(e),void 0!==o.fn.block&&n.unblock()}})}),o("body").on("added_to_cart",function(e,t,a,r){o(r).closest("table.compare-list").length&&r.hide()})});
1
+ jQuery(document).ready(function(o){if(o(document.body).hasClass("elementor-editor-active"))return!1;function e(o,e){o=escape(o),e=escape(e);var t=document.location.search,a=o+"="+e,r=new RegExp("(&|\\?)"+o+"=[^&]*");return t=t.replace(r,"$1"+a),RegExp.$1||(t+=(t.length>0?"&":"?")+a),t}o(document).on("click",".product a.compare:not(.added)",function(e){e.preventDefault();var t=o(this),a={action:yith_woocompare.actionadd,id:t.data("product_id"),context:"frontend"},r=o(".yith-woocompare-widget ul.products-list");void 0!==o.fn.block&&(t.block({message:null,overlayCSS:{background:"#fff url("+yith_woocompare.loader+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}}),r.block({message:null,overlayCSS:{background:"#fff url("+yith_woocompare.loader+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}})),o.ajax({type:"post",url:yith_woocompare.ajaxurl.toString().replace("%%endpoint%%",yith_woocompare.actionadd),data:a,dataType:"json",success:function(e){void 0!==o.fn.block&&(t.unblock(),r.unblock()),t.addClass("added").attr("href",e.table_url).text(yith_woocompare.added_label),r.html(e.widget_table),"yes"==yith_woocompare.auto_open&&o("body").trigger("yith_woocompare_open_popup",{response:e.table_url,button:t})}})}),o(document).on("click",".product a.compare.added",function(e){e.preventDefault();var t=this.href;void 0!==t&&o("body").trigger("yith_woocompare_open_popup",{response:t,button:o(this)})}),o("body").on("yith_woocompare_open_popup",function(e,t){var a=t.response;if(o(window).width()>=768)o.colorbox({href:a,iframe:!0,width:"90%",height:"90%",className:"yith_woocompare_colorbox",close:yith_woocompare.close_label,onClosed:function(){var e=o(".yith-woocompare-widget ul.products-list"),t={action:yith_woocompare.actionreload,context:"frontend"};void 0!==o.fn.block&&e.block({message:null,overlayCSS:{background:"#fff url("+yith_woocompare.loader+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}}),o.ajax({type:"post",url:yith_woocompare.ajaxurl.toString().replace("%%endpoint%%",yith_woocompare.actionreload),data:t,success:function(t){void 0!==o.fn.block&&e.unblock().html(t),e.html(t)}})}}),o(window).resize(function(){o.colorbox.resize({width:"90%",height:"90%"})});else{var r=a.split("?");if(r.length>=2){for(var c=encodeURIComponent("iframe")+"=",n=r[1].split(/[&;]/g),i=n.length;i-- >0;)-1!==n[i].lastIndexOf(c,0)&&n.splice(i,1);a=r[0]+"?"+n.join("&")}window.open(a,yith_woocompare.table_title)}}),o(document).on("click",".remove a",function(e){e.preventDefault();var t=o(this),a={action:yith_woocompare.actionremove,id:t.data("product_id"),context:"frontend"};o("td.product_"+a.id+", th.product_"+a.id);void 0!==o.fn.block&&t.block({message:null,overlayCSS:{background:"#fff url("+yith_woocompare.loader+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}}),o.ajax({type:"post",url:yith_woocompare.ajaxurl.toString().replace("%%endpoint%%",yith_woocompare.actionremove),data:a,dataType:"html",success:function(e){var a=o(e).filter("#yith-woocompare");o("#yith-woocompare").replaceWith(a),o('.compare[data-product_id="'+t.data("product_id")+'"]',window.parent.document).removeClass("added").html(yith_woocompare.button_text),o(document).trigger("yith_woocompare_product_removed")}})}),o(".yith-woocompare-open a, a.yith-woocompare-open").on("click",function(t){t.preventDefault(),o("body").trigger("yith_woocompare_open_popup",{response:e("action",yith_woocompare.actionview)+"&iframe=true"})}),o(".yith-woocompare-widget").on("click","a.compare",function(e){e.preventDefault(),o("body").trigger("yith_woocompare_open_popup",{response:o(this).attr("href")})}).on("click","li a.remove, a.clear-all",function(e){e.preventDefault();var t=o(".yith-woocompare-widget .products-list").data("lang"),a=o(this),r=a.data("product_id"),c={action:yith_woocompare.actionremove,id:r,context:"frontend",responseType:"product_list",lang:t},n=a.parents(".yith-woocompare-widget").find("ul.products-list");void 0!==o.fn.block&&n.block({message:null,overlayCSS:{background:"#fff url("+yith_woocompare.loader+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}}),o.ajax({type:"post",url:yith_woocompare.ajaxurl.toString().replace("%%endpoint%%",yith_woocompare.actionremove),data:c,dataType:"html",success:function(e){"all"==r?o(".compare.added").removeClass("added").html(yith_woocompare.button_text):o('.compare[data-product_id="'+r+'"]').removeClass("added").html(yith_woocompare.button_text),n.html(e),void 0!==o.fn.block&&n.unblock()}})}),o("body").on("added_to_cart",function(e,t,a,r){o(r).closest("table.compare-list").length&&r.hide()})});
includes/class.yith-woocompare-frontend.php CHANGED
@@ -833,7 +833,7 @@ if ( ! class_exists( 'YITH_Woocompare_Frontend' ) ) {
833
  */
834
  if ( ! $atts['product'] ) {
835
  global $product;
836
- $product_id = $product->get_id();
837
  } else {
838
  global $wpdb;
839
  $product = $wpdb->get_row( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE ID = %d OR post_name = %s OR post_title = %s LIMIT 1", $atts['product'], $atts['product'], $atts['product'] ) ); // phpcs:ignore
@@ -847,6 +847,16 @@ if ( ! class_exists( 'YITH_Woocompare_Frontend' ) ) {
847
  $product_id = wpml_object_id_filter( $product_id, 'product', false );
848
  }
849
 
 
 
 
 
 
 
 
 
 
 
850
  // If product ID is 0, maybe the product doesn't exists or is wrong.. in this case, doesn't show the button.
851
  if ( empty( $product_id ) ) {
852
  return '';
833
  */
834
  if ( ! $atts['product'] ) {
835
  global $product;
836
+ $product_id = $product instanceof WC_Product ? $product->get_id() : 0;
837
  } else {
838
  global $wpdb;
839
  $product = $wpdb->get_row( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE ID = %d OR post_name = %s OR post_title = %s LIMIT 1", $atts['product'], $atts['product'], $atts['product'] ) ); // phpcs:ignore
847
  $product_id = wpml_object_id_filter( $product_id, 'product', false );
848
  }
849
 
850
+ if ( YITH_Woocompare_Helper::is_elementor_editor() ) {
851
+ $products = wc_get_products(
852
+ array(
853
+ 'limit' => 1,
854
+ 'return' => 'ids',
855
+ )
856
+ );
857
+ $product_id = ! empty( $products ) ? array_shift( $products ) : 0;
858
+ }
859
+
860
  // If product ID is 0, maybe the product doesn't exists or is wrong.. in this case, doesn't show the button.
861
  if ( empty( $product_id ) ) {
862
  return '';
includes/class.yith-woocompare-helper.php CHANGED
@@ -84,6 +84,20 @@ if ( ! class_exists( 'YITH_Woocompare_Helper' ) ) {
84
  return $attributes;
85
  }
86
 
 
 
 
 
 
 
 
 
87
 
 
 
 
 
 
 
88
  }
89
  }
84
  return $attributes;
85
  }
86
 
87
+ /**
88
+ * Check if current screen is elementor editor
89
+ *
90
+ * @since 2.6.0
91
+ * @author Francesco Licandro
92
+ * @return boolean
93
+ */
94
+ public static function is_elementor_editor() {
95
 
96
+ if ( did_action( 'admin_action_elementor' ) ) {
97
+ return \Elementor\Plugin::$instance->editor->is_edit_mode();
98
+ }
99
+
100
+ return is_admin() && isset( $_REQUEST['action'] ) && in_array( sanitize_text_field( wp_unslash( $_REQUEST['action'] ) ), array( 'elementor', 'elementor_ajax' ), true ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
101
+ }
102
  }
103
  }
includes/class.yith-woocompare.php CHANGED
@@ -74,11 +74,10 @@ if ( ! class_exists( 'YITH_Woocompare' ) ) {
74
  */
75
  public function is_frontend() {
76
  $is_ajax = ( defined( 'DOING_AJAX' ) && DOING_AJAX );
77
- $context_check = isset( $_REQUEST['context'] ) && sanitize_text_field( wp_unslash( $_REQUEST['context'] ) ) === 'frontend'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
78
- $actions_to_check = apply_filters( 'yith_woocompare_actions_to_check_frontend', array( 'woof_draw_products' ) );
79
  $action_check = isset( $_REQUEST['action'] ) && in_array( sanitize_text_field( wp_unslash( $_REQUEST['action'] ) ), $actions_to_check, true ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
80
-
81
- return (bool) ( ! is_admin() || ( $is_ajax && ( $context_check || $action_check ) ) );
82
  }
83
 
84
  /**
74
  */
75
  public function is_frontend() {
76
  $is_ajax = ( defined( 'DOING_AJAX' ) && DOING_AJAX );
77
+ $context_check = isset( $_REQUEST['context'] ) && 'frontend' === sanitize_text_field( wp_unslash( $_REQUEST['context'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
78
+ $actions_to_check = apply_filters( 'yith_woocompare_actions_to_check_frontend', array( 'woof_draw_products', 'prdctfltr_respond_550', 'wbmz_get_products', 'jet_smart_filters' ) );
79
  $action_check = isset( $_REQUEST['action'] ) && in_array( sanitize_text_field( wp_unslash( $_REQUEST['action'] ) ), $actions_to_check, true ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
80
+ return (bool) YITH_Woocompare_Helper::is_elementor_editor() || ( ! is_admin() || ( $is_ajax && ( $context_check || $action_check ) ) );
 
81
  }
82
 
83
  /**
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.5.4.1
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-compare
10
  * Domain Path: /languages/
11
  * WC requires at least: 5.3
12
- * WC tested up to: 5.6
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Compare
16
- * @version 2.5.4.1
17
  */
18
 
19
  /*
@@ -75,7 +75,7 @@ if ( ! function_exists( 'yith_plugin_registration_hook' ) ) {
75
  register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
76
 
77
  if ( ! defined( 'YITH_WOOCOMPARE_VERSION' ) ) {
78
- define( 'YITH_WOOCOMPARE_VERSION', '2.5.4.1' );
79
  }
80
  if ( ! defined( 'YITH_WOOCOMPARE_FREE_INIT' ) ) {
81
  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.6.0
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-compare
10
  * Domain Path: /languages/
11
  * WC requires at least: 5.3
12
+ * WC tested up to: 5.7
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Compare
16
+ * @version 2.6.0
17
  */
18
 
19
  /*
75
  register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
76
 
77
  if ( ! defined( 'YITH_WOOCOMPARE_VERSION' ) ) {
78
+ define( 'YITH_WOOCOMPARE_VERSION', '2.6.0' );
79
  }
80
  if ( ! defined( 'YITH_WOOCOMPARE_FREE_INIT' ) ) {
81
  define( 'YITH_WOOCOMPARE_FREE_INIT', plugin_basename( __FILE__ ) );
plugin-fw/assets/css/metaboxes.css CHANGED
@@ -176,10 +176,10 @@
176
  }
177
 
178
  .metaboxes-tab span.description.inline {
179
- display : inline-block;
180
- line-height : 23px;
181
- width : auto;
182
- margin : 0;
183
  }
184
 
185
  .metaboxes-tab .slider label {
@@ -254,8 +254,8 @@
254
  }
255
 
256
  .metaboxes-tab.yith-plugin-ui input[type=number] {
257
- width : auto;
258
- min-width : 90px;
259
  }
260
 
261
  .metaboxes-tab.yith-plugin-ui p {
176
  }
177
 
178
  .metaboxes-tab span.description.inline {
179
+ display : inline-block;
180
+ line-height : 23px;
181
+ width : auto;
182
+ margin : 0;
183
  }
184
 
185
  .metaboxes-tab .slider label {
254
  }
255
 
256
  .metaboxes-tab.yith-plugin-ui input[type=number] {
257
+ width : 70px;
258
+ min-width : 70px;
259
  }
260
 
261
  .metaboxes-tab.yith-plugin-ui p {
plugin-fw/assets/css/scss/yith-plugin-ui/_variables.scss CHANGED
@@ -13,7 +13,7 @@ $primary_text: #ffffff; // Text on primary color bg
13
  $delete: #c41d04; // color for delete buttons
14
  $delete_hover: lighten($delete, 5%); // color for delete buttons - hover
15
  $delete_text: #ffffff; // Text on delete buttons
16
- $delete_focus: #f0d2cd; // Text on delete buttons
17
 
18
  // Outline is used to stylize Secondary buttons.
19
  $outline_text: #0087b3; // outline button - text color
@@ -23,6 +23,13 @@ $outline_bg_hover: rgba(157, 198, 205, .2); // outline button - background color
23
  $outline_border_hover: #007ba3; // outline button - border color on hover
24
  $outline_focus: #dfeef2; // Outline focus color, for buttons
25
 
 
 
 
 
 
 
 
26
  $update: #94aa09; // Update button - background
27
  $update_hover: darken($update, 5%); // Update button - hover
28
  $update_text: #ffffff; // Text on update button background
@@ -84,6 +91,13 @@ $wp_top_bar_mobile_size: 46px;
84
  --yith-outline-border-hover: #{$outline_border_hover};
85
  --yith-outline-focus: #{$outline_focus};
86
 
 
 
 
 
 
 
 
87
  --yith-accent: #{$accent};
88
 
89
  --yith-light-bg: #{$light_bg};
13
  $delete: #c41d04; // color for delete buttons
14
  $delete_hover: lighten($delete, 5%); // color for delete buttons - hover
15
  $delete_text: #ffffff; // Text on delete buttons
16
+ $delete_focus: #f0d2cd; // Delete focus color, for buttons
17
 
18
  // Outline is used to stylize Secondary buttons.
19
  $outline_text: #0087b3; // outline button - text color
23
  $outline_border_hover: #007ba3; // outline button - border color on hover
24
  $outline_focus: #dfeef2; // Outline focus color, for buttons
25
 
26
+ $delete_outline_text: $delete; // Delete-outline button - text color
27
+ $delete_outline_border: $delete; // Delete-outline button - border color
28
+ $delete_outline_bg: rgba(205, 157, 157, 0); // Delete-outline button - background color
29
+ $delete_outline_bg_hover: rgba(232, 184, 184, 0.15); // Delete-outline button - background color on hover
30
+ $delete_outline_border_hover: #db2b11; // Delete-outline button - border color on hover
31
+ $delete_outline_focus: #ffe9e7; // Delete-outline focus color, for buttons
32
+
33
  $update: #94aa09; // Update button - background
34
  $update_hover: darken($update, 5%); // Update button - hover
35
  $update_text: #ffffff; // Text on update button background
91
  --yith-outline-border-hover: #{$outline_border_hover};
92
  --yith-outline-focus: #{$outline_focus};
93
 
94
+ --yith-delete-outline-text: #{$delete_outline_text};
95
+ --yith-delete-outline-border: #{$delete_outline_border};
96
+ --yith-delete-outline-bg: #{$delete_outline_bg};
97
+ --yith-delete-outline-bg-hover: #{$delete_outline_bg_hover};
98
+ --yith-delete-outline-border-hover: #{$delete_outline_border_hover};
99
+ --yith-delete-outline-focus: #{$delete_outline_focus};
100
+
101
  --yith-accent: #{$accent};
102
 
103
  --yith-light-bg: #{$light_bg};
plugin-fw/assets/css/scss/yith-plugin-ui/components/_buttons.scss CHANGED
@@ -2,203 +2,211 @@
2
 
3
  .yith-plugin-ui, .wp-core-ui .yith-plugin-ui {
4
 
5
- // WordPress Buttons.
6
- .button-primary, .button-secondary {
7
- border-radius: 3px;
8
- text-transform: none;
9
- box-shadow: none;
10
- border: 1px solid;
11
- font-weight: 600;
12
- padding: 0 12px;
13
- outline: none;
14
- height: auto;
15
- transition: all ease 0.3s;
16
- text-shadow: none;
17
- display: inline-block;
18
- text-decoration: none;
19
- cursor: pointer;
20
- white-space: nowrap;
21
-
22
- &:focus {
23
- outline: none;
24
- box-shadow: none;
25
- }
26
-
27
- &.button-small {
28
- padding: 0 8px;
29
- }
30
- }
31
-
32
- .button-secondary {
33
- @include button-secondary;
34
- }
35
-
36
- .button-primary {
37
- @include button-primary;
38
- }
39
-
40
- .button.action,
41
- #doaction,
42
- #doaction2,
43
- #post-query-submit,
44
- #search-submit,
45
- .button.filter-button {
46
- @include button-secondary;
47
- height: auto;
48
- line-height: 33px;
49
- border-radius: 8px;
50
- padding: 0 15px;
51
- font-weight: 600;
52
- }
53
-
54
- .tablenav .tablenav-pages .button,
55
- .tablenav .tablenav-pages .tablenav-pages-navspan {
56
- @include button-secondary;
57
- }
58
-
59
- @media screen and (max-width: 782px) {
60
- .tablenav .tablenav-pages .button, .tablenav .tablenav-pages .tablenav-pages-navspan {
61
- min-width: 44px;
62
- padding: 12px 8px;
63
- font-size: 18px;
64
- line-height: 1;
65
- }
66
- }
67
-
68
- // YITH Buttons.
69
- .yith-plugin-fw__button, [class^="yith-plugin-fw__button--"], [class*=" yith-plugin-fw__button--"],
70
- .yith-add-button, .yith-edit-button, .yith-update-button, .yith-remove-button, .yith-plugin-fw-upload-button, .yith-save-button, .yith-plugin-fw-select-all, .yith-plugin-fw-deselect-all, .yith-plugin-fw-upload-button-reset // Old buttons.
71
- {
72
- @include button;
73
- }
74
-
75
- .yith-plugin-fw__button--primary {
76
- @include button-primary;
77
- }
78
-
79
- .yith-plugin-fw__button--secondary {
80
- @include button-secondary;
81
- }
82
-
83
- .yith-plugin-fw__button--delete {
84
- @include button-delete;
85
- }
86
-
87
- .yith-plugin-fw__button--add, .yith-add-button {
88
- @include button-primary;
89
-
90
- @include button-with-icon("\e90a");
91
-
92
- &.closed {
93
- @include button-secondary;
94
-
95
- @include button-with-icon("\e906");
96
- }
97
- }
98
-
99
- .yith-plugin-fw__button--close {
100
- @include button-secondary;
101
-
102
- @include button-with-icon("\e906");
103
- }
104
-
105
- .yith-plugin-fw__button--edit, .yith-edit-button {
106
- @include button-secondary;
107
-
108
- @include button-with-icon("\e907");
109
- }
110
 
111
- .yith-plugin-fw__button--update, .yith-update-button {
112
- @include button-update;
 
 
113
 
114
- @include button-with-icon("\e90b");
115
- }
 
 
 
 
 
 
116
 
117
- .yith-plugin-fw__button--trash, .yith-remove-button {
118
- @include button-delete;
 
 
 
 
119
 
120
- @include button-with-icon("\e90d");
121
- }
 
122
 
123
- .yith-plugin-fw__button--upload, .yith-plugin-fw-upload-button {
124
- @include button-primary;
 
125
 
126
- @include button-with-icon("\e90c");
127
- }
 
128
 
129
- // Old buttons.
130
- .yith-save-button {
131
- @include button-primary;
132
- }
133
 
134
- .yith-plugin-fw-select-all,
135
- .yith-plugin-fw-deselect-all,
136
- .yith-plugin-fw-upload-button-reset {
137
- @include button-secondary;
138
- }
139
 
140
- // with icons.
141
- .button-secondary span.yith-icon {
142
- margin-left: 0;
143
- margin-right: 10px;
144
- line-height: normal;
145
 
146
- &:before {
147
- color: inherit;
148
- font-size: 15px;
149
- font-weight: 400;
150
  }
151
- }
152
 
153
- // With icon
154
- .yith-plugin-fw__button--with-icon {
155
- position: relative;
156
- padding-left: 30px;
157
 
158
- i {
159
- position: absolute;
160
- top: 50%;
161
- left: 10px;
162
- transform: translateY(-50%);
163
- font-size: 1.15em;
164
- font-weight: 400;
165
  }
166
- }
167
 
 
 
 
 
 
168
 
169
- // Button Sizes
170
- .yith-plugin-fw__button--xl, .button-xl {
171
- padding: 0 20px;
172
- font-size: 14px;
173
- line-height: 38px;
174
 
175
- &::before {
176
- margin: 0 10px 0 -5px;
177
  }
178
 
179
- &.yith-plugin-fw__button--with-icon {
180
- padding-left: 40px;
181
- i {
182
- left: 14px;
183
- }
184
  }
185
- }
186
 
187
- .yith-plugin-fw__button--xxl {
188
- padding: 0 28px;
189
- font-size: 16px;
190
- line-height: 45px;
191
 
192
- &::before {
193
- margin: 0 15px 0 -10px;
194
  }
195
 
196
- &.yith-plugin-fw__button--with-icon {
197
- padding-left: 45px;
198
- i {
199
- left: 15px;
200
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  }
202
- }
203
  }
204
 
2
 
3
  .yith-plugin-ui, .wp-core-ui .yith-plugin-ui {
4
 
5
+ // WordPress Buttons.
6
+ .button-primary, .button-secondary {
7
+ border-radius : 3px;
8
+ text-transform : none;
9
+ box-shadow : none;
10
+ border : 1px solid;
11
+ font-weight : 600;
12
+ padding : 0 12px;
13
+ outline : none;
14
+ height : auto;
15
+ transition : all ease 0.3s;
16
+ text-shadow : none;
17
+ display : inline-block;
18
+ text-decoration : none;
19
+ cursor : pointer;
20
+ white-space : nowrap;
21
+
22
+ &:focus {
23
+ outline : none;
24
+ box-shadow : none;
25
+ }
26
+
27
+ &.button-small {
28
+ padding : 0 8px;
29
+ }
30
+ }
31
+
32
+ .button-secondary {
33
+ @include button-secondary;
34
+ }
35
+
36
+ .button-primary {
37
+ @include button-primary;
38
+ }
39
+
40
+ .button.action,
41
+ #doaction,
42
+ #doaction2,
43
+ #post-query-submit,
44
+ #posts-filter #delete_all,
45
+ #search-submit,
46
+ .button.filter-button {
47
+ @include button;
48
+ @include button-secondary;
49
+ height : auto;
50
+ line-height : 33px;
51
+ border-radius : 8px;
52
+ padding : 0 15px;
53
+ font-weight : 600;
54
+ }
55
+
56
+ #posts-filter #delete_all {
57
+ @include button-delete-outline;
58
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
+ .tablenav .tablenav-pages .button,
61
+ .tablenav .tablenav-pages .tablenav-pages-navspan {
62
+ @include button-secondary;
63
+ }
64
 
65
+ @media screen and (max-width : 782px) {
66
+ .tablenav .tablenav-pages .button, .tablenav .tablenav-pages .tablenav-pages-navspan {
67
+ min-width : 44px;
68
+ padding : 12px 8px;
69
+ font-size : 18px;
70
+ line-height : 1;
71
+ }
72
+ }
73
 
74
+ // YITH Buttons.
75
+ .yith-plugin-fw__button, [class^="yith-plugin-fw__button--"], [class*=" yith-plugin-fw__button--"],
76
+ .yith-add-button, .yith-edit-button, .yith-update-button, .yith-remove-button, .yith-plugin-fw-upload-button, .yith-save-button, .yith-plugin-fw-select-all, .yith-plugin-fw-deselect-all, .yith-plugin-fw-upload-button-reset // Old buttons.
77
+ {
78
+ @include button;
79
+ }
80
 
81
+ .yith-plugin-fw__button--primary {
82
+ @include button-primary;
83
+ }
84
 
85
+ .yith-plugin-fw__button--secondary {
86
+ @include button-secondary;
87
+ }
88
 
89
+ .yith-plugin-fw__button--delete {
90
+ @include button-delete;
91
+ }
92
 
93
+ .yith-plugin-fw__button--add, .yith-add-button {
94
+ @include button-primary;
 
 
95
 
96
+ @include button-with-icon("\e90a");
 
 
 
 
97
 
98
+ &.closed {
99
+ @include button-secondary;
 
 
 
100
 
101
+ @include button-with-icon("\e906");
102
+ }
 
 
103
  }
 
104
 
105
+ .yith-plugin-fw__button--close {
106
+ @include button-secondary;
 
 
107
 
108
+ @include button-with-icon("\e906");
 
 
 
 
 
 
109
  }
 
110
 
111
+ .yith-plugin-fw__button--edit, .yith-edit-button {
112
+ @include button-secondary;
113
+
114
+ @include button-with-icon("\e907");
115
+ }
116
 
117
+ .yith-plugin-fw__button--update, .yith-update-button {
118
+ @include button-update;
 
 
 
119
 
120
+ @include button-with-icon("\e90b");
 
121
  }
122
 
123
+ .yith-plugin-fw__button--trash, .yith-remove-button {
124
+ @include button-delete;
125
+
126
+ @include button-with-icon("\e90d");
 
127
  }
 
128
 
129
+ .yith-plugin-fw__button--upload, .yith-plugin-fw-upload-button {
130
+ @include button-primary;
 
 
131
 
132
+ @include button-with-icon("\e90c");
 
133
  }
134
 
135
+ // Old buttons.
136
+ .yith-save-button {
137
+ @include button-primary;
138
+ }
139
+
140
+ .yith-plugin-fw-select-all,
141
+ .yith-plugin-fw-deselect-all,
142
+ .yith-plugin-fw-upload-button-reset {
143
+ @include button-secondary;
144
+ }
145
+
146
+ // with icons.
147
+ .button-secondary span.yith-icon {
148
+ margin-left : 0;
149
+ margin-right : 10px;
150
+ line-height : normal;
151
+
152
+ &:before {
153
+ color : inherit;
154
+ font-size : 15px;
155
+ font-weight : 400;
156
+ }
157
+ }
158
+
159
+ // With icon
160
+ .yith-plugin-fw__button--with-icon {
161
+ position : relative;
162
+ padding-left : 30px;
163
+
164
+ i {
165
+ position : absolute;
166
+ top : 50%;
167
+ left : 10px;
168
+ transform : translateY(-50%);
169
+ font-size : 1.15em;
170
+ font-weight : 400;
171
+ }
172
+ }
173
+
174
+
175
+ // Button Sizes
176
+ .yith-plugin-fw__button--xl, .button-xl {
177
+ padding : 0 20px;
178
+ font-size : 14px;
179
+ line-height : 38px;
180
+
181
+ &::before {
182
+ margin : 0 10px 0 -5px;
183
+ }
184
+
185
+ &.yith-plugin-fw__button--with-icon {
186
+ padding-left : 40px;
187
+
188
+ i {
189
+ left : 14px;
190
+ }
191
+ }
192
+ }
193
+
194
+ .yith-plugin-fw__button--xxl {
195
+ padding : 0 28px;
196
+ font-size : 16px;
197
+ line-height : 45px;
198
+
199
+ &::before {
200
+ margin : 0 15px 0 -10px;
201
+ }
202
+
203
+ &.yith-plugin-fw__button--with-icon {
204
+ padding-left : 45px;
205
+
206
+ i {
207
+ left : 15px;
208
+ }
209
+ }
210
  }
 
211
  }
212
 
plugin-fw/assets/css/scss/yith-plugin-ui/mixins/_buttons.scss CHANGED
@@ -73,7 +73,6 @@
73
  }
74
  }
75
 
76
-
77
  @mixin button-delete {
78
  background: var(--yith-delete);
79
  color: var(--yith-delete-text);
@@ -93,6 +92,25 @@
93
  }
94
  }
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  @mixin button-with-icon($icon) {
97
 
98
  &:before {
73
  }
74
  }
75
 
 
76
  @mixin button-delete {
77
  background: var(--yith-delete);
78
  color: var(--yith-delete-text);
92
  }
93
  }
94
 
95
+ @mixin button-delete-outline {
96
+ background: var(--yith-delete-outline-bg);
97
+ border: 1px solid var(--yith-delete-outline-border);
98
+ color: var(--yith-delete-outline-text);
99
+
100
+ &:focus {
101
+ background: var(--yith-delete-outline-bg);
102
+ border: 1px solid var(--yith-delete-outline-border);
103
+ color: var(--yith-delete-outline-text);
104
+ box-shadow: 0 0 0 3px var(--yith-delete-outline-focus);
105
+ }
106
+
107
+ &:hover, &:active {
108
+ background: var(--yith-delete-outline-bg-hover);
109
+ border-color: var(--yith-delete-outline-border-hover);
110
+ color: var(--yith-delete-outline-text);
111
+ }
112
+ }
113
+
114
  @mixin button-with-icon($icon) {
115
 
116
  &:before {
plugin-fw/assets/css/scss/yith-plugin-ui/mixins/_tables.scss CHANGED
@@ -156,38 +156,4 @@
156
  tbody tr:hover {
157
  background: var(--yith-table-row-highlight);
158
  }
159
- }
160
-
161
- @mixin wp-list-buttons {
162
- .button.action,
163
- #doaction,
164
- #doaction2,
165
- #post-query-submit,
166
- #search-submit,
167
- .button.filter-button {
168
- height: auto;
169
- line-height: 33px;
170
- background: var(--yith-outline-bg);
171
- border: 1px solid var(--yith-outline-border);
172
- color: var(--yith-outline-text);
173
- border-radius: 8px;
174
- padding: 0 15px;
175
- font-weight: 600;
176
- }
177
-
178
- .tablenav .tablenav-pages .button,
179
- .tablenav .tablenav-pages .tablenav-pages-navspan {
180
- background: var(--yith-outline-bg);
181
- border: 1px solid var(--yith-outline-border);
182
- color: var(--yith-outline-text);
183
- }
184
-
185
- @media screen and (max-width: 782px) {
186
- .tablenav .tablenav-pages .button, .tablenav .tablenav-pages .tablenav-pages-navspan {
187
- min-width: 44px;
188
- padding: 12px 8px;
189
- font-size: 18px;
190
- line-height: 1;
191
- }
192
- }
193
  }
156
  tbody tr:hover {
157
  background: var(--yith-table-row-highlight);
158
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  }
plugin-fw/assets/css/yith-fields.css CHANGED
@@ -71,6 +71,12 @@
71
  line-height : 1;
72
  }
73
 
 
 
 
 
 
 
74
  .woocommerce .yith-plugin-fw table.form-table input[type=text].wp-color-picker,
75
  .woocommerce .yith-plugin-fw table.form-table input[type=text].yith-plugin-fw-colorpicker,
76
  .yith-plugin-fw input[type=text].wp-color-picker,
@@ -730,6 +736,10 @@ YITH UI
730
  color : #716269;
731
  }
732
 
 
 
 
 
733
  .yith-plugin-ui textarea:not(.wp-editor-area),
734
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea:not(.wp-editor-area) {
735
  height : auto;
71
  line-height : 1;
72
  }
73
 
74
+ .yith-plugin-fw input[type=number],
75
+ .woocommerce .yith-plugin-fw table.form-table input[type=number]{
76
+ width: 70px;
77
+ min-width: 70px;
78
+ }
79
+
80
  .woocommerce .yith-plugin-fw table.form-table input[type=text].wp-color-picker,
81
  .woocommerce .yith-plugin-fw table.form-table input[type=text].yith-plugin-fw-colorpicker,
82
  .yith-plugin-fw input[type=text].wp-color-picker,
736
  color : #716269;
737
  }
738
 
739
+ .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=number]{
740
+ min-width: 70px;
741
+ }
742
+
743
  .yith-plugin-ui textarea:not(.wp-editor-area),
744
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea:not(.wp-editor-area) {
745
  height : auto;
plugin-fw/assets/css/yith-plugin-ui.css CHANGED
@@ -29,6 +29,12 @@
29
  --yith-outline-bg-hover: rgba(157, 198, 205, 0.2);
30
  --yith-outline-border-hover: #007ba3;
31
  --yith-outline-focus: #dfeef2;
 
 
 
 
 
 
32
  --yith-accent: #98aa36;
33
  --yith-light-bg: #f0f6fb;
34
  --yith-light-border-color: #d7e3e7;
@@ -322,13 +328,25 @@
322
  .yith-plugin-ui #doaction,
323
  .yith-plugin-ui #doaction2,
324
  .yith-plugin-ui #post-query-submit,
 
325
  .yith-plugin-ui #search-submit,
326
  .yith-plugin-ui .button.filter-button, .wp-core-ui .yith-plugin-ui .button.action,
327
  .wp-core-ui .yith-plugin-ui #doaction,
328
  .wp-core-ui .yith-plugin-ui #doaction2,
329
  .wp-core-ui .yith-plugin-ui #post-query-submit,
 
330
  .wp-core-ui .yith-plugin-ui #search-submit,
331
  .wp-core-ui .yith-plugin-ui .button.filter-button {
 
 
 
 
 
 
 
 
 
 
332
  background: var(--yith-outline-bg);
333
  border: 1px solid var(--yith-outline-border);
334
  color: var(--yith-outline-text);
@@ -343,11 +361,30 @@
343
  .yith-plugin-ui #doaction:focus,
344
  .yith-plugin-ui #doaction2:focus,
345
  .yith-plugin-ui #post-query-submit:focus,
 
346
  .yith-plugin-ui #search-submit:focus,
347
  .yith-plugin-ui .button.filter-button:focus, .wp-core-ui .yith-plugin-ui .button.action:focus,
348
  .wp-core-ui .yith-plugin-ui #doaction:focus,
349
  .wp-core-ui .yith-plugin-ui #doaction2:focus,
350
  .wp-core-ui .yith-plugin-ui #post-query-submit:focus,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  .wp-core-ui .yith-plugin-ui #search-submit:focus,
352
  .wp-core-ui .yith-plugin-ui .button.filter-button:focus {
353
  background: var(--yith-outline-bg);
@@ -363,6 +400,8 @@
363
  .yith-plugin-ui #doaction2:active,
364
  .yith-plugin-ui #post-query-submit:hover,
365
  .yith-plugin-ui #post-query-submit:active,
 
 
366
  .yith-plugin-ui #search-submit:hover,
367
  .yith-plugin-ui #search-submit:active,
368
  .yith-plugin-ui .button.filter-button:hover,
@@ -373,6 +412,8 @@
373
  .wp-core-ui .yith-plugin-ui #doaction2:active,
374
  .wp-core-ui .yith-plugin-ui #post-query-submit:hover,
375
  .wp-core-ui .yith-plugin-ui #post-query-submit:active,
 
 
376
  .wp-core-ui .yith-plugin-ui #search-submit:hover,
377
  .wp-core-ui .yith-plugin-ui #search-submit:active,
378
  .wp-core-ui .yith-plugin-ui .button.filter-button:hover,
@@ -382,6 +423,25 @@
382
  color: var(--yith-outline-text);
383
  }
384
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
385
  .yith-plugin-ui .tablenav .tablenav-pages .button,
386
  .yith-plugin-ui .tablenav .tablenav-pages .tablenav-pages-navspan, .wp-core-ui .yith-plugin-ui .tablenav .tablenav-pages .button,
387
  .wp-core-ui .yith-plugin-ui .tablenav .tablenav-pages .tablenav-pages-navspan {
29
  --yith-outline-bg-hover: rgba(157, 198, 205, 0.2);
30
  --yith-outline-border-hover: #007ba3;
31
  --yith-outline-focus: #dfeef2;
32
+ --yith-delete-outline-text: #c41d04;
33
+ --yith-delete-outline-border: #c41d04;
34
+ --yith-delete-outline-bg: rgba(205, 157, 157, 0);
35
+ --yith-delete-outline-bg-hover: rgba(232, 184, 184, 0.15);
36
+ --yith-delete-outline-border-hover: #db2b11;
37
+ --yith-delete-outline-focus: #ffe9e7;
38
  --yith-accent: #98aa36;
39
  --yith-light-bg: #f0f6fb;
40
  --yith-light-border-color: #d7e3e7;
328
  .yith-plugin-ui #doaction,
329
  .yith-plugin-ui #doaction2,
330
  .yith-plugin-ui #post-query-submit,
331
+ .yith-plugin-ui #posts-filter #delete_all,
332
  .yith-plugin-ui #search-submit,
333
  .yith-plugin-ui .button.filter-button, .wp-core-ui .yith-plugin-ui .button.action,
334
  .wp-core-ui .yith-plugin-ui #doaction,
335
  .wp-core-ui .yith-plugin-ui #doaction2,
336
  .wp-core-ui .yith-plugin-ui #post-query-submit,
337
+ .wp-core-ui .yith-plugin-ui #posts-filter #delete_all,
338
  .wp-core-ui .yith-plugin-ui #search-submit,
339
  .wp-core-ui .yith-plugin-ui .button.filter-button {
340
+ display: inline-block;
341
+ height: auto;
342
+ line-height: 30px;
343
+ border-radius: 4px;
344
+ padding: 0 17px;
345
+ font-weight: 600;
346
+ cursor: pointer;
347
+ transition: all .3s ease-in-out;
348
+ text-decoration: none;
349
+ white-space: nowrap;
350
  background: var(--yith-outline-bg);
351
  border: 1px solid var(--yith-outline-border);
352
  color: var(--yith-outline-text);
361
  .yith-plugin-ui #doaction:focus,
362
  .yith-plugin-ui #doaction2:focus,
363
  .yith-plugin-ui #post-query-submit:focus,
364
+ .yith-plugin-ui #posts-filter #delete_all:focus,
365
  .yith-plugin-ui #search-submit:focus,
366
  .yith-plugin-ui .button.filter-button:focus, .wp-core-ui .yith-plugin-ui .button.action:focus,
367
  .wp-core-ui .yith-plugin-ui #doaction:focus,
368
  .wp-core-ui .yith-plugin-ui #doaction2:focus,
369
  .wp-core-ui .yith-plugin-ui #post-query-submit:focus,
370
+ .wp-core-ui .yith-plugin-ui #posts-filter #delete_all:focus,
371
+ .wp-core-ui .yith-plugin-ui #search-submit:focus,
372
+ .wp-core-ui .yith-plugin-ui .button.filter-button:focus {
373
+ outline: none;
374
+ box-shadow: none;
375
+ }
376
+
377
+ .yith-plugin-ui .button.action:focus,
378
+ .yith-plugin-ui #doaction:focus,
379
+ .yith-plugin-ui #doaction2:focus,
380
+ .yith-plugin-ui #post-query-submit:focus,
381
+ .yith-plugin-ui #posts-filter #delete_all:focus,
382
+ .yith-plugin-ui #search-submit:focus,
383
+ .yith-plugin-ui .button.filter-button:focus, .wp-core-ui .yith-plugin-ui .button.action:focus,
384
+ .wp-core-ui .yith-plugin-ui #doaction:focus,
385
+ .wp-core-ui .yith-plugin-ui #doaction2:focus,
386
+ .wp-core-ui .yith-plugin-ui #post-query-submit:focus,
387
+ .wp-core-ui .yith-plugin-ui #posts-filter #delete_all:focus,
388
  .wp-core-ui .yith-plugin-ui #search-submit:focus,
389
  .wp-core-ui .yith-plugin-ui .button.filter-button:focus {
390
  background: var(--yith-outline-bg);
400
  .yith-plugin-ui #doaction2:active,
401
  .yith-plugin-ui #post-query-submit:hover,
402
  .yith-plugin-ui #post-query-submit:active,
403
+ .yith-plugin-ui #posts-filter #delete_all:hover,
404
+ .yith-plugin-ui #posts-filter #delete_all:active,
405
  .yith-plugin-ui #search-submit:hover,
406
  .yith-plugin-ui #search-submit:active,
407
  .yith-plugin-ui .button.filter-button:hover,
412
  .wp-core-ui .yith-plugin-ui #doaction2:active,
413
  .wp-core-ui .yith-plugin-ui #post-query-submit:hover,
414
  .wp-core-ui .yith-plugin-ui #post-query-submit:active,
415
+ .wp-core-ui .yith-plugin-ui #posts-filter #delete_all:hover,
416
+ .wp-core-ui .yith-plugin-ui #posts-filter #delete_all:active,
417
  .wp-core-ui .yith-plugin-ui #search-submit:hover,
418
  .wp-core-ui .yith-plugin-ui #search-submit:active,
419
  .wp-core-ui .yith-plugin-ui .button.filter-button:hover,
423
  color: var(--yith-outline-text);
424
  }
425
 
426
+ .yith-plugin-ui #posts-filter #delete_all, .wp-core-ui .yith-plugin-ui #posts-filter #delete_all {
427
+ background: var(--yith-delete-outline-bg);
428
+ border: 1px solid var(--yith-delete-outline-border);
429
+ color: var(--yith-delete-outline-text);
430
+ }
431
+
432
+ .yith-plugin-ui #posts-filter #delete_all:focus, .wp-core-ui .yith-plugin-ui #posts-filter #delete_all:focus {
433
+ background: var(--yith-delete-outline-bg);
434
+ border: 1px solid var(--yith-delete-outline-border);
435
+ color: var(--yith-delete-outline-text);
436
+ box-shadow: 0 0 0 3px var(--yith-delete-outline-focus);
437
+ }
438
+
439
+ .yith-plugin-ui #posts-filter #delete_all:hover, .yith-plugin-ui #posts-filter #delete_all:active, .wp-core-ui .yith-plugin-ui #posts-filter #delete_all:hover, .wp-core-ui .yith-plugin-ui #posts-filter #delete_all:active {
440
+ background: var(--yith-delete-outline-bg-hover);
441
+ border-color: var(--yith-delete-outline-border-hover);
442
+ color: var(--yith-delete-outline-text);
443
+ }
444
+
445
  .yith-plugin-ui .tablenav .tablenav-pages .button,
446
  .yith-plugin-ui .tablenav .tablenav-pages .tablenav-pages-navspan, .wp-core-ui .yith-plugin-ui .tablenav .tablenav-pages .button,
447
  .wp-core-ui .yith-plugin-ui .tablenav .tablenav-pages .tablenav-pages-navspan {
plugin-fw/assets/js/yith-fields.js CHANGED
@@ -483,7 +483,6 @@
483
  } else {
484
  $( this ).attr( 'value', 'no' ).removeClass( 'onoffchecked' );
485
  }
486
- $( this ).trigger( 'change' );
487
  } );
488
 
489
 
483
  } else {
484
  $( this ).attr( 'value', 'no' ).removeClass( 'onoffchecked' );
485
  }
 
486
  } );
487
 
488
 
plugin-fw/assets/js/yith-fields.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={selectors:{imgPreview:".yith-plugin-fw-upload-img-preview",uploadButton:".yith-plugin-fw-upload-button",imgUrl:".yith-plugin-fw-upload-img-url",resetButton:".yith-plugin-fw-upload-button-reset"},onImageChange:function(){var i=e(this).val(),n=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)"),a=e(this).parent().find(t.selectors.imgPreview).first();a.length<1&&(a=e(this).parent().parent().find(t.selectors.imgPreview).first()),n.test(i)?a.html('<img src="'+i+'" style="max-width:100px; max-height:100px;" />'):a.html("")},onButtonClick:function(i){i.preventDefault();var n,a=e(this).attr("id").replace(/-button$/,"").replace(/(\[|\])/g,"\\$1");if(n)n.open();else{var l=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(n=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:l})).on("select",function(){var i=n.state().get("selection").first().toJSON(),l=e("#"+a+"-yith-attachment-id");e("#"+a).val(i.url),l.length&&l.val(i.id),t.triggerImageChange()}),n.open()}},onResetClick:function(){var i=e(this),n=i.attr("id").replace(/(\[|\])/g,"\\$1"),a=i.attr("id").replace(/-button-reset$/,"").replace(/(\[|\])/g,"\\$1"),l=e("#"+n).data("default");e("#"+a).val(l),t.triggerImageChange()},triggerImageChange:function(){e(t.selectors.imgUrl).trigger("change")},initOnce:function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("change",t.selectors.imgUrl,t.onImageChange),e(document).on("click",t.selectors.uploadButton,t.onButtonClick),e(document).on("click",t.selectors.resetButton,t.onResetClick))}};t.initOnce();var i={selectors:{gallery:".yith-plugin-fw-image-gallery",notInitGallery:".yith-plugin-fw-image-gallery:not(.yith-plugin-fw-image-gallery--initialized)",button:".yith-plugin-fw-image-gallery .image-gallery-button",slideWrapper:"ul.slides-wrapper"},initOnce:function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&e(document).on("click",i.selectors.button,function(t){var n=e(this),a=n.closest(i.selectors.gallery),l=a.find(".image_gallery_ids"),o=l.val(),s=a.find("ul.slides-wrapper"),r=wp.media.frames.image_gallery=wp.media({title:n.data("choose"),button:{text:n.data("update")},states:[new wp.media.controller.Library({title:n.data("choose"),filterable:"all",multiple:!0})]});r.on("select",function(){r.state().get("selection").map(function(e){(e=e.toJSON()).id&&(o=o?o+","+e.id:e.id,s.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+n.data("delete")+'">x</a></li></ul></li>'))}),l.val(o),l.trigger("change")}),r.open()})},init:function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&e(i.selectors.notInitGallery).each(function(){e(this).addClass("yith-plugin-fw-image-gallery--initialized");var t=e(this).find(i.selectors.slideWrapper);t.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(n,a){var l="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");l=l+t+","}),t.closest(i.selectors.gallery).find(".image_gallery_ids").val(l)}})}),t.on("click","a.delete",function(t){t.preventDefault();var n=e(this).closest(i.selectors.gallery),a=n.find("ul.slides-wrapper"),l=n.find(".image_gallery_ids"),o="";e(this).closest("li.image").remove(),a.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");o=o+t+","}),l.val(o)})})}};i.initOnce(),e(function(){e(document).on("yith-plugin-fw-codemirror-init",function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.codeEditor&&e(".codemirror:not(.codemirror--initialized)").each(function(){var t=e(this).data("settings"),i=wp.codeEditor.initialize(e(this),t);e(this).addClass("codemirror--initialized"),e(this).data("codemirrorInstance",i)})}).trigger("yith-plugin-fw-codemirror-init")});e(document).on("yith_fields_init",function(){var n=e(".yith-plugin-fw-datepicker:not(.yith-plugin-fw-datepicker--initialized)"),a=e(".yith-plugin-fw-colorpicker:not(.yith-plugin-fw-colorpicker--initialized)"),l=e(".yith-plugin-fw-sidebar-layout:not(.yith-plugin-fw-sidebar-layout--initialized)"),o=e(".yith-plugin-fw-slider-container:not(.yith-plugin-fw-slider-container--initialized)"),s=e(".yit-icons-manager-wrapper:not(.yit-icons-manager-wrapper--initialized)");n.each(function(){e(this).addClass("yith-plugin-fw-datepicker--initialized");var t=e(this),i=t.data(),n=t.next(".yith-icon-calendar");i.showAnim=!1,i.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},i.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},t.datepicker(i),n&&n.on("click",function(){t.datepicker("show")})}),a.each(function(){e(this).addClass("yith-plugin-fw-colorpicker--initialized"),e(this).wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.trigger("change")}});var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),n=e(this).closest(".yith-single-colorpicker"),a=i.find(".wp-picker-input-wrap"),l=n.find(".wp-picker-input-wrap");if(a.length&&i.find("a.wp-color-result").attr("title",t),n.length&&n.find("a.wp-color-result").attr("title",t),!a.find(".wp-picker-default-custom").length){var o=e("<span/>").attr({"class":"wp-picker-default-custom"});a.find(".wp-picker-default").wrap(o)}l.find(".wp-picker-default-custom").length||(o=e("<span/>").attr({"class":"wp-picker-default-custom"}),l.find(".wp-picker-default").wrap(o))}),l.each(function(){e(this).addClass("yith-plugin-fw-sidebar-layout--initialized"),e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),n=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),a=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==a)switch(a){case"left":i.show(),n.hide();break;case"right":n.show(),i.hide();break;case"double":i.show(),n.show();break;default:i.hide(),n.hide()}})}),o.each(function(){e(this).addClass("yith-plugin-fw-slider-container--initialized");var t=e(this).find(".ui-slider-horizontal"),i=t.data("val"),n=t.data("min"),a=t.data("max"),l=t.data("step"),o=t.data("labels");t.slider({value:i,min:n,max:a,range:"min",step:l,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value).trigger("change"),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+o)}})}),s.each(function(){e(this).addClass("yit-icons-manager-wrapper--initialized");var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),n=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(a){var l=e(a.target).closest("li"),o=l.data("font"),s=l.data("icon"),r=l.data("key"),c=l.data("name");i.attr("data-font",o),i.attr("data-icon",s),i.attr("data-key",r),i.attr("data-name",c),n.val(o+":"+c),t.find(".yit-icons-manager-list li").removeClass("active"),l.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var n=jQuery(".ui-sortable-handle"),a=0,l=new Array;for(a=0;a<n.length;a++)l[a]=e(n[a]).data("item_key");l.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,l)}}),e(document.body).trigger("wc-enhanced-select-init"),e(document.body).trigger("yith-framework-enhanced-select-init"),e(document).trigger("yith-plugin-fw-codemirror-init"),t.triggerImageChange(),i.init()}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),n=t.closest(".yith-plugin-fw-select-images__wrapper"),a=n.find(".yith-plugin-fw-select-images__item"),l=n.find("select").first();l.length&&(l.val(i).trigger("yith_select_images_value_changed").trigger("change"),a.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input");t.prop("disabled")||t.trigger("click")}),e(document).on("click",".yith-plugin-fw-onoff-container input",function(t){e(this).is(":checked")?e(this).attr("value","yes").addClass("onoffchecked"):e(this).attr("value","no").removeClass("onoffchecked"),e(this).trigger("change")}),e.fn.saveToggleElement=function(t,i){var n=e(this),a="yith_plugin_fw_save_toggle_element",l=n.serializeToggleElement(),o=n.find(".yith-toggle_wrapper"),s=o.attr("id"),r=e.urlParam("tab");l.append("security",o.data("nonce")),void 0!==i&&i.length>0&&l.append("yith_toggle_elements_order_keys",i),n.closest(".metaboxes-tab.yith-plugin-ui").length?(a="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+a+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+s+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+a+"&tab="+r+"&toggle_id="+s,e.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,n])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,n=e(t).find(":input").serializeArray();return e.each(n,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),n=t.find("span.title").data("title_format"),a=t.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==n)var o=n.match(l);if(void 0!==a)var s=a.match(l);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(n=n.replace("%%"+$field_id+"%%",$field_val)),null!=s&&void 0!==s&&-1!==s.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)))}),""!==n&&t.find("span.title").html(n),""!==a&&t.find(".subtitle").html(a),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),n=i.closest(".yith-toggle-row"),a=n.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;n.is(".yith-toggle-row-opened")?a.slideUp(400):a.slideDown(400),n.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),n=i.data("box_id"),a=i.data("closed_label"),l=i.data("opened_label"),o=i.closest(".yith-toggle_wrapper").attr("id"),s=wp.template("yith-toggle-element-add-box-content-"+o);""!==n&&(e("#"+n).html(s({index:"box_id"})).slideToggle(),""!==a&&(i.html()===a?i.html(l).removeClass("closed"):i.html(a).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),n=e(this).closest(".yith-toggle_wrapper").attr("id"),a=i.find(".spinner"),l=e(this).parents(".toggle-element"),o=i.find(":input"),s=0,r=e('<input type="hidden">');l.find(".yith-toggle-row").each(function(){var t=parseInt(e(this).data("item_key"));s<=t&&(s=t+1)}),r.val(s),e(document).trigger("yith-toggle-change-counter",[r,i]),s=r.val();var c=wp.template("yith-toggle-element-item-"+n),d=e(c({index:s}));a.addClass("show"),e.each(o,function(t,i){if(void 0!==e(i).attr("id")){var n=e(i).attr("id"),a=e(i).val();n="radio"===e(i).attr("type")?(n=(n=e(i).closest(".yith-plugin-fw-radio").attr("id")).replace("new_","")+"_"+s)+"-"+a:n.replace("new_","")+"_"+s,e(i).is(":checked")&&e(d).find("#"+n).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(d).find("#"+n).html(e("#"+e(i).attr("id")).html()),e(d).find("#"+n).val(a)}}),e(d).formatToggleTitle();var u=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,d,u]);setTimeout(function(){if("yes"===u.val()){e(l).find(".yith-toggle-elements").append(d),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),l.saveToggleElement();setTimeout(function(){e(l).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),n=e(this).closest(".yith-toggle-row"),a=n.find(".spinner");n.formatToggleTitle();var l=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,n,l]),"yes"===l.val()&&(a.addClass("show"),i.saveToggleElement(a))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){var t=e(this).closest(".yith-plugin-fw-radio"),i=e(this).val();t.val(i).data("value",i).trigger("change")}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).find('input[type="radio"]').filter('[value="'+e(this).data("value")+'"]').click(),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")});var n={selectors:{wrapper:".yith-plugin-fw-dimensions",units:{wrapper:".yith-plugin-fw-dimensions__units",single:".yith-plugin-fw-dimensions__unit",value:".yith-plugin-fw-dimensions__unit__value",selectedClass:"yith-plugin-fw-dimensions__unit--selected"},linked:{button:".yith-plugin-fw-dimensions__linked",value:".yith-plugin-fw-dimensions__linked__value",wrapperActiveClass:"yith-plugin-fw-dimensions--linked-active"},dimensions:{number:".yith-plugin-fw-dimensions__dimension__number"}},init:function(){var t=n;e(document).on("click",t.selectors.units.single,t.unitChange),e(document).on("click",t.selectors.linked.button,t.linkedChange),e(document).on("change keyup",t.selectors.dimensions.number,t.numberChange)},unitChange:function(t){var i=e(this).closest(n.selectors.units.single),a=i.closest(n.selectors.units.wrapper),l=a.find(n.selectors.units.single),o=a.find(n.selectors.units.value).first(),s=i.data("value");l.removeClass(n.selectors.units.selectedClass),i.addClass(n.selectors.units.selectedClass),o.val(s).trigger("change")},linkedChange:function(){var t=e(this).closest(n.selectors.linked.button),i=t.closest(n.selectors.wrapper),a=t.find(n.selectors.linked.value);"yes"===a.val()?(i.removeClass(n.selectors.linked.wrapperActiveClass),a.val("no")):(i.addClass(n.selectors.linked.wrapperActiveClass),a.val("yes"),i.find(n.selectors.dimensions.number).first().trigger("change"))},numberChange:function(t){var i=e(this).closest(n.selectors.dimensions.number),a=i.closest(n.selectors.wrapper);a.hasClass(n.selectors.linked.wrapperActiveClass)&&a.find(n.selectors.dimensions.number).val(i.val())}};n.init();e(document).on("click",".yith-plugin-fw-copy-to-clipboard__copy",function(){var t,i=e(this).closest(".yith-plugin-fw-copy-to-clipboard"),n=i.find(".yith-plugin-fw-copy-to-clipboard__field"),a=i.find(".yith-plugin-fw-copy-to-clipboard__tip"),l=i.data("tip-timeout");l&&clearTimeout(l),n.select(),document.execCommand("copy"),(t="getSelection"in window&&window.getSelection())?"empty"in t?t.empty():"removeAllRanges"in t&&t.removeAllRanges():"selection"in document&&document.selection.empty(),a.fadeIn(400),l=setTimeout(function(){a.fadeOut(400)},1500),i.data("tip-timeout",l)});var a={init:function(){e(document).on("click",".yith-plugin-fw__action-button--has-menu",a.open),e(document).on("click",".yith-plugin-fw__action-button__menu",a.stopPropagation),e(document).on("click",a.closeAll)},closeAll:function(){e(".yith-plugin-fw__action-button--opened").removeClass("yith-plugin-fw__action-button--opened")},open:function(t){var i=e(this).closest(".yith-plugin-fw__action-button"),n=i.hasClass("yith-plugin-fw__action-button--opened");t.preventDefault(),t.stopPropagation(),a.closeAll(),n||i.addClass("yith-plugin-fw__action-button--opened")},stopPropagation:function(e){e.stopPropagation()}};a.init(),e(document).on("click","a.yith-plugin-fw__require-confirmation-link",function(t){var i=e(this).closest("a.yith-plugin-fw__require-confirmation-link"),n=i.attr("href");if(n&&"#"!==n&&(t.preventDefault(),t.stopPropagation(),"yith"in window&&"ui"in yith)){var a,l=["title","message","confirmButtonType","cancelButton","confirmButton"],o={};for(a in l){var s=l[a],r=i.data(s);void 0!==r&&(o[s]=r)}o.onConfirm=function(){window.location.href=n},o.closeAfterConfirm=!1,yith.ui.confirm(o)}}),e(document).on("yith-plugin-fw-tips-init",function(){e(".yith-plugin-fw__tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}).trigger("yith-plugin-fw-tips-init")}(jQuery);
1
+ !function(e){var t={selectors:{imgPreview:".yith-plugin-fw-upload-img-preview",uploadButton:".yith-plugin-fw-upload-button",imgUrl:".yith-plugin-fw-upload-img-url",resetButton:".yith-plugin-fw-upload-button-reset"},onImageChange:function(){var i=e(this).val(),n=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)"),a=e(this).parent().find(t.selectors.imgPreview).first();a.length<1&&(a=e(this).parent().parent().find(t.selectors.imgPreview).first()),n.test(i)?a.html('<img src="'+i+'" style="max-width:100px; max-height:100px;" />'):a.html("")},onButtonClick:function(i){i.preventDefault();var n,a=e(this).attr("id").replace(/-button$/,"").replace(/(\[|\])/g,"\\$1");if(n)n.open();else{var l=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(n=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:l})).on("select",function(){var i=n.state().get("selection").first().toJSON(),l=e("#"+a+"-yith-attachment-id");e("#"+a).val(i.url),l.length&&l.val(i.id),t.triggerImageChange()}),n.open()}},onResetClick:function(){var i=e(this),n=i.attr("id").replace(/(\[|\])/g,"\\$1"),a=i.attr("id").replace(/-button-reset$/,"").replace(/(\[|\])/g,"\\$1"),l=e("#"+n).data("default");e("#"+a).val(l),t.triggerImageChange()},triggerImageChange:function(){e(t.selectors.imgUrl).trigger("change")},initOnce:function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("change",t.selectors.imgUrl,t.onImageChange),e(document).on("click",t.selectors.uploadButton,t.onButtonClick),e(document).on("click",t.selectors.resetButton,t.onResetClick))}};t.initOnce();var i={selectors:{gallery:".yith-plugin-fw-image-gallery",notInitGallery:".yith-plugin-fw-image-gallery:not(.yith-plugin-fw-image-gallery--initialized)",button:".yith-plugin-fw-image-gallery .image-gallery-button",slideWrapper:"ul.slides-wrapper"},initOnce:function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&e(document).on("click",i.selectors.button,function(t){var n=e(this),a=n.closest(i.selectors.gallery),l=a.find(".image_gallery_ids"),o=l.val(),s=a.find("ul.slides-wrapper"),r=wp.media.frames.image_gallery=wp.media({title:n.data("choose"),button:{text:n.data("update")},states:[new wp.media.controller.Library({title:n.data("choose"),filterable:"all",multiple:!0})]});r.on("select",function(){r.state().get("selection").map(function(e){(e=e.toJSON()).id&&(o=o?o+","+e.id:e.id,s.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+n.data("delete")+'">x</a></li></ul></li>'))}),l.val(o),l.trigger("change")}),r.open()})},init:function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&e(i.selectors.notInitGallery).each(function(){e(this).addClass("yith-plugin-fw-image-gallery--initialized");var t=e(this).find(i.selectors.slideWrapper);t.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(n,a){var l="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");l=l+t+","}),t.closest(i.selectors.gallery).find(".image_gallery_ids").val(l)}})}),t.on("click","a.delete",function(t){t.preventDefault();var n=e(this).closest(i.selectors.gallery),a=n.find("ul.slides-wrapper"),l=n.find(".image_gallery_ids"),o="";e(this).closest("li.image").remove(),a.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");o=o+t+","}),l.val(o)})})}};i.initOnce(),e(function(){e(document).on("yith-plugin-fw-codemirror-init",function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.codeEditor&&e(".codemirror:not(.codemirror--initialized)").each(function(){var t=e(this).data("settings"),i=wp.codeEditor.initialize(e(this),t);e(this).addClass("codemirror--initialized"),e(this).data("codemirrorInstance",i)})}).trigger("yith-plugin-fw-codemirror-init")});e(document).on("yith_fields_init",function(){var n=e(".yith-plugin-fw-datepicker:not(.yith-plugin-fw-datepicker--initialized)"),a=e(".yith-plugin-fw-colorpicker:not(.yith-plugin-fw-colorpicker--initialized)"),l=e(".yith-plugin-fw-sidebar-layout:not(.yith-plugin-fw-sidebar-layout--initialized)"),o=e(".yith-plugin-fw-slider-container:not(.yith-plugin-fw-slider-container--initialized)"),s=e(".yit-icons-manager-wrapper:not(.yit-icons-manager-wrapper--initialized)");n.each(function(){e(this).addClass("yith-plugin-fw-datepicker--initialized");var t=e(this),i=t.data(),n=t.next(".yith-icon-calendar");i.showAnim=!1,i.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},i.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},t.datepicker(i),n&&n.on("click",function(){t.datepicker("show")})}),a.each(function(){e(this).addClass("yith-plugin-fw-colorpicker--initialized"),e(this).wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.trigger("change")}});var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),n=e(this).closest(".yith-single-colorpicker"),a=i.find(".wp-picker-input-wrap"),l=n.find(".wp-picker-input-wrap");if(a.length&&i.find("a.wp-color-result").attr("title",t),n.length&&n.find("a.wp-color-result").attr("title",t),!a.find(".wp-picker-default-custom").length){var o=e("<span/>").attr({"class":"wp-picker-default-custom"});a.find(".wp-picker-default").wrap(o)}l.find(".wp-picker-default-custom").length||(o=e("<span/>").attr({"class":"wp-picker-default-custom"}),l.find(".wp-picker-default").wrap(o))}),l.each(function(){e(this).addClass("yith-plugin-fw-sidebar-layout--initialized"),e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),n=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),a=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==a)switch(a){case"left":i.show(),n.hide();break;case"right":n.show(),i.hide();break;case"double":i.show(),n.show();break;default:i.hide(),n.hide()}})}),o.each(function(){e(this).addClass("yith-plugin-fw-slider-container--initialized");var t=e(this).find(".ui-slider-horizontal"),i=t.data("val"),n=t.data("min"),a=t.data("max"),l=t.data("step"),o=t.data("labels");t.slider({value:i,min:n,max:a,range:"min",step:l,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value).trigger("change"),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+o)}})}),s.each(function(){e(this).addClass("yit-icons-manager-wrapper--initialized");var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),n=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(a){var l=e(a.target).closest("li"),o=l.data("font"),s=l.data("icon"),r=l.data("key"),c=l.data("name");i.attr("data-font",o),i.attr("data-icon",s),i.attr("data-key",r),i.attr("data-name",c),n.val(o+":"+c),t.find(".yit-icons-manager-list li").removeClass("active"),l.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var n=jQuery(".ui-sortable-handle"),a=0,l=new Array;for(a=0;a<n.length;a++)l[a]=e(n[a]).data("item_key");l.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,l)}}),e(document.body).trigger("wc-enhanced-select-init"),e(document.body).trigger("yith-framework-enhanced-select-init"),e(document).trigger("yith-plugin-fw-codemirror-init"),t.triggerImageChange(),i.init()}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),n=t.closest(".yith-plugin-fw-select-images__wrapper"),a=n.find(".yith-plugin-fw-select-images__item"),l=n.find("select").first();l.length&&(l.val(i).trigger("yith_select_images_value_changed").trigger("change"),a.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input");t.prop("disabled")||t.trigger("click")}),e(document).on("click",".yith-plugin-fw-onoff-container input",function(t){e(this).is(":checked")?e(this).attr("value","yes").addClass("onoffchecked"):e(this).attr("value","no").removeClass("onoffchecked")}),e.fn.saveToggleElement=function(t,i){var n=e(this),a="yith_plugin_fw_save_toggle_element",l=n.serializeToggleElement(),o=n.find(".yith-toggle_wrapper"),s=o.attr("id"),r=e.urlParam("tab");l.append("security",o.data("nonce")),void 0!==i&&i.length>0&&l.append("yith_toggle_elements_order_keys",i),n.closest(".metaboxes-tab.yith-plugin-ui").length?(a="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+a+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+s+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+a+"&tab="+r+"&toggle_id="+s,e.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,n])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,n=e(t).find(":input").serializeArray();return e.each(n,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),n=t.find("span.title").data("title_format"),a=t.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==n)var o=n.match(l);if(void 0!==a)var s=a.match(l);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(n=n.replace("%%"+$field_id+"%%",$field_val)),null!=s&&void 0!==s&&-1!==s.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)))}),""!==n&&t.find("span.title").html(n),""!==a&&t.find(".subtitle").html(a),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),n=i.closest(".yith-toggle-row"),a=n.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;n.is(".yith-toggle-row-opened")?a.slideUp(400):a.slideDown(400),n.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),n=i.data("box_id"),a=i.data("closed_label"),l=i.data("opened_label"),o=i.closest(".yith-toggle_wrapper").attr("id"),s=wp.template("yith-toggle-element-add-box-content-"+o);""!==n&&(e("#"+n).html(s({index:"box_id"})).slideToggle(),""!==a&&(i.html()===a?i.html(l).removeClass("closed"):i.html(a).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),n=e(this).closest(".yith-toggle_wrapper").attr("id"),a=i.find(".spinner"),l=e(this).parents(".toggle-element"),o=i.find(":input"),s=0,r=e('<input type="hidden">');l.find(".yith-toggle-row").each(function(){var t=parseInt(e(this).data("item_key"));s<=t&&(s=t+1)}),r.val(s),e(document).trigger("yith-toggle-change-counter",[r,i]),s=r.val();var c=wp.template("yith-toggle-element-item-"+n),d=e(c({index:s}));a.addClass("show"),e.each(o,function(t,i){if(void 0!==e(i).attr("id")){var n=e(i).attr("id"),a=e(i).val();n="radio"===e(i).attr("type")?(n=(n=e(i).closest(".yith-plugin-fw-radio").attr("id")).replace("new_","")+"_"+s)+"-"+a:n.replace("new_","")+"_"+s,e(i).is(":checked")&&e(d).find("#"+n).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(d).find("#"+n).html(e("#"+e(i).attr("id")).html()),e(d).find("#"+n).val(a)}}),e(d).formatToggleTitle();var u=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,d,u]);setTimeout(function(){if("yes"===u.val()){e(l).find(".yith-toggle-elements").append(d),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),l.saveToggleElement();setTimeout(function(){e(l).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),n=e(this).closest(".yith-toggle-row"),a=n.find(".spinner");n.formatToggleTitle();var l=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,n,l]),"yes"===l.val()&&(a.addClass("show"),i.saveToggleElement(a))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){var t=e(this).closest(".yith-plugin-fw-radio"),i=e(this).val();t.val(i).data("value",i).trigger("change")}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).find('input[type="radio"]').filter('[value="'+e(this).data("value")+'"]').click(),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")});var n={selectors:{wrapper:".yith-plugin-fw-dimensions",units:{wrapper:".yith-plugin-fw-dimensions__units",single:".yith-plugin-fw-dimensions__unit",value:".yith-plugin-fw-dimensions__unit__value",selectedClass:"yith-plugin-fw-dimensions__unit--selected"},linked:{button:".yith-plugin-fw-dimensions__linked",value:".yith-plugin-fw-dimensions__linked__value",wrapperActiveClass:"yith-plugin-fw-dimensions--linked-active"},dimensions:{number:".yith-plugin-fw-dimensions__dimension__number"}},init:function(){var t=n;e(document).on("click",t.selectors.units.single,t.unitChange),e(document).on("click",t.selectors.linked.button,t.linkedChange),e(document).on("change keyup",t.selectors.dimensions.number,t.numberChange)},unitChange:function(t){var i=e(this).closest(n.selectors.units.single),a=i.closest(n.selectors.units.wrapper),l=a.find(n.selectors.units.single),o=a.find(n.selectors.units.value).first(),s=i.data("value");l.removeClass(n.selectors.units.selectedClass),i.addClass(n.selectors.units.selectedClass),o.val(s).trigger("change")},linkedChange:function(){var t=e(this).closest(n.selectors.linked.button),i=t.closest(n.selectors.wrapper),a=t.find(n.selectors.linked.value);"yes"===a.val()?(i.removeClass(n.selectors.linked.wrapperActiveClass),a.val("no")):(i.addClass(n.selectors.linked.wrapperActiveClass),a.val("yes"),i.find(n.selectors.dimensions.number).first().trigger("change"))},numberChange:function(t){var i=e(this).closest(n.selectors.dimensions.number),a=i.closest(n.selectors.wrapper);a.hasClass(n.selectors.linked.wrapperActiveClass)&&a.find(n.selectors.dimensions.number).val(i.val())}};n.init();e(document).on("click",".yith-plugin-fw-copy-to-clipboard__copy",function(){var t,i=e(this).closest(".yith-plugin-fw-copy-to-clipboard"),n=i.find(".yith-plugin-fw-copy-to-clipboard__field"),a=i.find(".yith-plugin-fw-copy-to-clipboard__tip"),l=i.data("tip-timeout");l&&clearTimeout(l),n.select(),document.execCommand("copy"),(t="getSelection"in window&&window.getSelection())?"empty"in t?t.empty():"removeAllRanges"in t&&t.removeAllRanges():"selection"in document&&document.selection.empty(),a.fadeIn(400),l=setTimeout(function(){a.fadeOut(400)},1500),i.data("tip-timeout",l)});var a={init:function(){e(document).on("click",".yith-plugin-fw__action-button--has-menu",a.open),e(document).on("click",".yith-plugin-fw__action-button__menu",a.stopPropagation),e(document).on("click",a.closeAll)},closeAll:function(){e(".yith-plugin-fw__action-button--opened").removeClass("yith-plugin-fw__action-button--opened")},open:function(t){var i=e(this).closest(".yith-plugin-fw__action-button"),n=i.hasClass("yith-plugin-fw__action-button--opened");t.preventDefault(),t.stopPropagation(),a.closeAll(),n||i.addClass("yith-plugin-fw__action-button--opened")},stopPropagation:function(e){e.stopPropagation()}};a.init(),e(document).on("click","a.yith-plugin-fw__require-confirmation-link",function(t){var i=e(this).closest("a.yith-plugin-fw__require-confirmation-link"),n=i.attr("href");if(n&&"#"!==n&&(t.preventDefault(),t.stopPropagation(),"yith"in window&&"ui"in yith)){var a,l=["title","message","confirmButtonType","cancelButton","confirmButton"],o={};for(a in l){var s=l[a],r=i.data(s);void 0!==r&&(o[s]=r)}o.onConfirm=function(){window.location.href=n},o.closeAfterConfirm=!1,yith.ui.confirm(o)}}),e(document).on("yith-plugin-fw-tips-init",function(){e(".yith-plugin-fw__tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}).trigger("yith-plugin-fw-tips-init")}(jQuery);
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.7.4
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author YITH
10
- * @version 3.7.4
11
  * @package YITH\PluginFramework
12
  */
13
 
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.7.5
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author YITH
10
+ * @version 3.7.5
11
  * @package YITH\PluginFramework
12
  */
13
 
plugin-fw/yit-plugin.php CHANGED
@@ -114,6 +114,8 @@ if ( ! function_exists( 'yit_plugin_fw_row_meta' ) ) {
114
  $fields = isset( $new_row_meta_args['to_show'] ) ? $new_row_meta_args['to_show'] : array();
115
  $slug = isset( $new_row_meta_args['slug'] ) ? $new_row_meta_args['slug'] : '';
116
  $is_premium = isset( $new_row_meta_args['is_premium'] ) ? $new_row_meta_args['is_premium'] : '';
 
 
117
 
118
  if ( ! ! $is_premium ) {
119
  $to_remove = array_search( 'premium_version', $fields, true );
@@ -162,18 +164,18 @@ if ( ! function_exists( 'yit_plugin_fw_row_meta' ) ) {
162
  }
163
 
164
  if ( ! empty( $url ) && ! empty( $label ) ) {
165
- $url = yith_plugin_fw_add_utm_data( $url, $slug, 'plugin-version-author-uri', 'wp-dashboard' );
166
  $plugin_meta[] = sprintf( '<a href="%s" target="_blank"><span class="%s"></span>%s</a>', $url, $icon, $label );
167
  }
168
  }
169
 
170
  if ( isset( $plugin_meta[1] ) ) {
171
- $utm_author_uri = yith_plugin_fw_add_utm_data( $plugin_data['AuthorURI'], $slug, 'plugin-version-author-uri', 'wp-dashboard' );
172
  $plugin_meta[1] = str_replace( $plugin_data['AuthorURI'], $utm_author_uri, $plugin_meta[1] );
173
  }
174
 
175
  if ( isset( $plugin_meta[2] ) ) {
176
- $utm_plugin_uri = yith_plugin_fw_add_utm_data( $plugin_data['PluginURI'], $slug, 'plugin-version-author-uri', 'wp-dashboard' );
177
  $plugin_meta[2] = str_replace( $plugin_data['PluginURI'], $utm_plugin_uri, $plugin_meta[2] );
178
  }
179
 
114
  $fields = isset( $new_row_meta_args['to_show'] ) ? $new_row_meta_args['to_show'] : array();
115
  $slug = isset( $new_row_meta_args['slug'] ) ? $new_row_meta_args['slug'] : '';
116
  $is_premium = isset( $new_row_meta_args['is_premium'] ) ? $new_row_meta_args['is_premium'] : '';
117
+ $utm_campaign = 'plugin-version-author-uri';
118
+ $utm_source = $is_premium ? 'wp-premium-dashboard' : 'wp-free-dashboard';
119
 
120
  if ( ! ! $is_premium ) {
121
  $to_remove = array_search( 'premium_version', $fields, true );
164
  }
165
 
166
  if ( ! empty( $url ) && ! empty( $label ) ) {
167
+ $url = yith_plugin_fw_add_utm_data( $url, $slug, $utm_campaign, $utm_source );
168
  $plugin_meta[] = sprintf( '<a href="%s" target="_blank"><span class="%s"></span>%s</a>', $url, $icon, $label );
169
  }
170
  }
171
 
172
  if ( isset( $plugin_meta[1] ) ) {
173
+ $utm_author_uri = yith_plugin_fw_add_utm_data( $plugin_data['AuthorURI'], $slug, $utm_campaign, $utm_source );
174
  $plugin_meta[1] = str_replace( $plugin_data['AuthorURI'], $utm_author_uri, $plugin_meta[1] );
175
  }
176
 
177
  if ( isset( $plugin_meta[2] ) ) {
178
+ $utm_plugin_uri = yith_plugin_fw_add_utm_data( $plugin_data['PluginURI'], $slug, $utm_campaign, $utm_source );
179
  $plugin_meta[2] = str_replace( $plugin_data['PluginURI'], $utm_plugin_uri, $plugin_meta[2] );
180
  }
181
 
readme.txt CHANGED
@@ -4,12 +4,12 @@ Contributors: yithemes
4
  Tags: yith, woocommerce compare, compare products, product compare, product comparison
5
  Requires at least: 5.6
6
  Tested up to: 5.8
7
- Stable tag: 2.5.4.1
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 5.5
13
 
14
  == Description ==
15
 
@@ -66,6 +66,12 @@ yith-woocommerce-compare-<WORDPRESS LOCALE >.mo
66
 
67
  == Changelog ==
68
 
 
 
 
 
 
 
69
  = 2.5.4.1 = Released on 24 Aug 2021
70
 
71
  * Fix: fatal error "Call to undefined method YITH_Woocompare_Admin::list_products_html()"
@@ -478,7 +484,8 @@ Full documentation is available [here](https://docs.yithemes.com/yith-woocommerc
478
 
479
  == Upgrade notice ==
480
 
481
- = 2.5.4 = Released on 13 Aug 2021
482
 
483
- * New: support for WooCommerce 5.6
484
- * Update: YITH plugin framework
 
4
  Tags: yith, woocommerce compare, compare products, product compare, product comparison
5
  Requires at least: 5.6
6
  Tested up to: 5.8
7
+ Stable tag: 2.6.0
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 5.7
13
 
14
  == Description ==
15
 
66
 
67
  == Changelog ==
68
 
69
+ = 2.6.0 = Released on 09 Sep 2021
70
+
71
+ * New: support for WooCommerce 5.7
72
+ * Update: YITH plugin framework
73
+ * Fix: compare button preview on Elementor editor
74
+
75
  = 2.5.4.1 = Released on 24 Aug 2021
76
 
77
  * Fix: fatal error "Call to undefined method YITH_Woocompare_Admin::list_products_html()"
484
 
485
  == Upgrade notice ==
486
 
487
+ = 2.6.0 = Released on 09 Sep 2021
488
 
489
+ * New: support for WooCommerce 5.7
490
+ * Update: YITH plugin framework
491
+ * Fix: compare button preview on Elementor editor