YITH WooCommerce Ajax Product Filter - Version 3.0.12

Version Description

  • Released: 23 November, 2016 =

  • Fixed: Url management with query type set to OR

  • Fixed: Close dropdown widget before open another dropdown

  • Fixed: Layout issue with color style

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Ajax Product Filter
Version 3.0.12
Comparing to
See all releases

Code changes from version 3.0.11 to 3.0.12

README.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
  Requires at least: 4.0
6
  Tested up to: 4.6.1
7
- Stable tag: 3.0.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -159,6 +159,12 @@ If you want to see a demonstration version of the premium plugin, you can see it
159
 
160
  == Changelog ==
161
 
 
 
 
 
 
 
162
  = 3.0.11 - Released: 05 October, 2016=
163
 
164
  * Tweak: Removed deprecated taxonomy count WooCommerce transient
4
  Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
  Requires at least: 4.0
6
  Tested up to: 4.6.1
7
+ Stable tag: 3.0.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
159
 
160
  == Changelog ==
161
 
162
+ = 3.0.12 - Released: 23 November, 2016 =
163
+
164
+ * Fixed: Url management with query type set to OR
165
+ * Fixed: Close dropdown widget before open another dropdown
166
+ * Fixed: Layout issue with color style
167
+
168
  = 3.0.11 - Released: 05 October, 2016=
169
 
170
  * Tweak: Removed deprecated taxonomy count WooCommerce transient
assets/images/14-bg.png ADDED
Binary file
assets/images/14-icon.png ADDED
Binary file
assets/images/14.png ADDED
Binary file
assets/js/yith-wcan-frontend.js CHANGED
@@ -366,6 +366,8 @@ jQuery(function ($) {
366
 
367
  $(document).on('click', 'a.yit-wcan-select-open:not(.active)', function (e) {
368
  e.preventDefault();
 
 
369
  yit_open_select_dropdown(this);
370
  });
371
 
366
 
367
  $(document).on('click', 'a.yit-wcan-select-open:not(.active)', function (e) {
368
  e.preventDefault();
369
+ //close other enbled dropdown
370
+ $('a.yit-wcan-select-open.active').trigger('click');
371
  yit_open_select_dropdown(this);
372
  });
373
 
assets/js/yith-wcan-frontend.min.js CHANGED
@@ -11,5 +11,6 @@ jQuery(function(a){function u(a,p){return a.replace(new RegExp("[?&]"+p+"=[^&#]*
11
  0<a(d).find(yith_wcan.result_count).length&&a(yith_wcan.result_count).html(a(d).find(yith_wcan.result_count).html()).show();a(".yith-woo-ajax-navigation").add(".yith-wcan-sort-by").add(".yith-wcan-stock-on-sale").add(".yith-wcan-list-price-filter").each(function(){var b=a(this),c=b.attr("id"),c=a(d).find("#"+c);0==c.length?b.hide():(b.html(c.html()),b.show())});if(1==yith_wcan.avada.is_enabled){var c=a(yith_wcan.avada.sort_count);c.html(a(d).find(yith_wcan.avada.sort_count).html());""==e.text()?c.hide():
12
  c.show()}1!=yith_wcan.change_browser_url||navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:d.pageTitle},"",b);a(document).trigger("ready");a(document).trigger("yith-wcan-ajax-filtered");a(window).trigger("scroll");if(n){if("undefined"!=typeof a.fn.slider){var c=parseInt(a(yith_wcan.wc_price_slider.min_price).data("min")),f=parseInt(a(yith_wcan.wc_price_slider.max_price).data("max"));a(yith_wcan.wc_price_slider.wrapper).slider("values",[c,f]);a(document.body).trigger("price_slider_slide",
13
  [c,f])}a(document).trigger("yith-wcan-ajax-reset-filtered")}x()}})};a(yith_wcan.container).not(".ywcps-products").wrap('<div class="yit-wcan-container"></div>');a(document).on("yith-wcan-wrapped",function(){x()});a(document).trigger("yith-wcan-wrapped");a(document).on("click",".yith-wcan a",function(k){a(this).yith_wcan_ajax_filters(k,this)});var t=function(){a("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},0);a("a.yit-wcan-select-open").removeClass("active")};
14
- a(document).on("click","a.yit-wcan-select-open.active",function(k){k.preventDefault();a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300);a(this).parent().find("a.yit-wcan-select-open").removeClass("active")});a(document).on("click","a.yit-wcan-select-open:not(.active)",function(k){k.preventDefault();a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","1").animate({visibility:"visible",opacity:1},300);a(this).parent().find("a.yit-wcan-select-open").addClass("active")});
15
- a(document).on("ready yith-wcan-ajax-filtered",function(){a("div.yith-wcan-select-wrapper ul.yith-wcan-select li.chosen");t();a("div.yith-wcan-select-wrapper").each(function(){var k="";a(this).find("ul.yith-wcan-select li.chosen").each(function(){k+=a(this).text()+", "});k=k.substring(0,k.length-2);""!=k&&a(this).parent().find("a.yit-wcan-select-open").text(k)})});a(document).on("ready",t);a("body").on("click",function(k){a(k.target).hasClass("yit-wcan-select-open")||t()})});
 
11
  0<a(d).find(yith_wcan.result_count).length&&a(yith_wcan.result_count).html(a(d).find(yith_wcan.result_count).html()).show();a(".yith-woo-ajax-navigation").add(".yith-wcan-sort-by").add(".yith-wcan-stock-on-sale").add(".yith-wcan-list-price-filter").each(function(){var b=a(this),c=b.attr("id"),c=a(d).find("#"+c);0==c.length?b.hide():(b.html(c.html()),b.show())});if(1==yith_wcan.avada.is_enabled){var c=a(yith_wcan.avada.sort_count);c.html(a(d).find(yith_wcan.avada.sort_count).html());""==e.text()?c.hide():
12
  c.show()}1!=yith_wcan.change_browser_url||navigator.userAgent.match(/msie/i)||window.history.pushState({pageTitle:d.pageTitle},"",b);a(document).trigger("ready");a(document).trigger("yith-wcan-ajax-filtered");a(window).trigger("scroll");if(n){if("undefined"!=typeof a.fn.slider){var c=parseInt(a(yith_wcan.wc_price_slider.min_price).data("min")),f=parseInt(a(yith_wcan.wc_price_slider.max_price).data("max"));a(yith_wcan.wc_price_slider.wrapper).slider("values",[c,f]);a(document.body).trigger("price_slider_slide",
13
  [c,f])}a(document).trigger("yith-wcan-ajax-reset-filtered")}x()}})};a(yith_wcan.container).not(".ywcps-products").wrap('<div class="yit-wcan-container"></div>');a(document).on("yith-wcan-wrapped",function(){x()});a(document).trigger("yith-wcan-wrapped");a(document).on("click",".yith-wcan a",function(k){a(this).yith_wcan_ajax_filters(k,this)});var t=function(){a("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},0);a("a.yit-wcan-select-open").removeClass("active")};
14
+ a(document).on("click","a.yit-wcan-select-open.active",function(k){k.preventDefault();a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","-1").animate({visibility:"hidden",opacity:0},300);a(this).parent().find("a.yit-wcan-select-open").removeClass("active")});a(document).on("click","a.yit-wcan-select-open:not(.active)",function(k){k.preventDefault();a("a.yit-wcan-select-open.active").trigger("click");a(this).parent().find("div.yith-wcan-select-wrapper").css("z-index","1").animate({visibility:"visible",
15
+ opacity:1},300);a(this).parent().find("a.yit-wcan-select-open").addClass("active")});a(document).on("ready yith-wcan-ajax-filtered",function(){a("div.yith-wcan-select-wrapper ul.yith-wcan-select li.chosen");t();a("div.yith-wcan-select-wrapper").each(function(){var k="";a(this).find("ul.yith-wcan-select li.chosen").each(function(){k+=a(this).text()+", "});k=k.substring(0,k.length-2);""!=k&&a(this).parent().find("a.yit-wcan-select-open").text(k)})});a(document).on("ready",t);a("body").on("click",function(k){a(k.target).hasClass("yit-wcan-select-open")||
16
+ t()})});
init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Ajax Product Filter
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Product Filter offers the perfect way to filter all the products of your shop.
6
- * Version: 3.0.11
7
  * Author: YITHEMES
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith-woocommerce-ajax-navigation
@@ -64,7 +64,7 @@ load_plugin_textdomain( 'yith-woocommerce-ajax-navigation', false, dirname( plug
64
  ! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
65
  ! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
66
  ! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
67
- ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '3.0.11' );
68
  ! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
69
  ! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
70
 
3
  * Plugin Name: YITH WooCommerce Ajax Product Filter
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Product Filter offers the perfect way to filter all the products of your shop.
6
+ * Version: 3.0.12
7
  * Author: YITHEMES
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yith-woocommerce-ajax-navigation
64
  ! defined( 'YITH_WCAN' ) && define( 'YITH_WCAN', true );
65
  ! defined( 'YITH_WCAN_URL' ) && define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
66
  ! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
67
+ ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '3.0.12' );
68
  ! defined( 'YITH_WCAN_FREE_INIT') && define( 'YITH_WCAN_FREE_INIT', plugin_basename( __FILE__ ) );
69
  ! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
70
 
plugin-fw/init.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 2.9.38
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
@@ -19,7 +19,6 @@
19
  * http://www.gnu.org/licenses/gpl-3.0.txt
20
  */
21
 
22
- // test
23
 
24
  if ( ! defined ( 'ABSPATH' ) ) {
25
  exit;
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 2.9.39
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
19
  * http://www.gnu.org/licenses/gpl-3.0.txt
20
  */
21
 
 
22
 
23
  if ( ! defined ( 'ABSPATH' ) ) {
24
  exit;
plugin-fw/lib/yit-plugin-panel.php CHANGED
@@ -114,7 +114,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
114
  if( ! isset( $admin_page_hooks['yit_plugin_panel'] ) ){
115
  $position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
116
  // YITH Plugins text must not be translated
117
- add_menu_page( 'yit_plugin_panel', 'YITH Plugins', 'manage_options', 'yit_plugin_panel', NULL, YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png', $position );
118
  }
119
  }
120
 
114
  if( ! isset( $admin_page_hooks['yit_plugin_panel'] ) ){
115
  $position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
116
  // YITH Plugins text must not be translated
117
+ current_user_can( 'manage_options' ) && add_menu_page( 'yit_plugin_panel', 'YITH Plugins', 'manage_options', 'yit_plugin_panel', NULL, YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png', $position );
118
  }
119
  }
120
 
templates/admin/premium.php CHANGED
@@ -418,6 +418,22 @@
418
  </div>
419
  </div>
420
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
421
  <div class="section section-cta section-odd">
422
  <div class="landing-container">
423
  <div class="premium-cta">
418
  </div>
419
  </div>
420
  </div>
421
+ <div class="section section-odd clear" style="background: url(<?php echo YITH_WCAN_URL ?>assets/images/14-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
422
+ <div class="landing-container">
423
+ <div class="col-2">
424
+ <div class="section-title">
425
+ <img src="<?php echo YITH_WCAN_URL ?>assets/images/14-icon.png" alt="icon 14" />
426
+ <h2><?php _e('Scroll to top','yith-woocommerce-ajax-navigation');?></h2>
427
+ </div>
428
+ <p>
429
+ <?php echo _e('Scroll to top is a feature to improve user experience on your site. Soon after filtering the product list, the page will be automatically scrolled to the top so the user can immediately see the filtered list. ', 'yith-woocommerce-ajax-navigation');?>
430
+ </p>
431
+ </div>
432
+ <div class="col-1">
433
+ <img src="<?php echo YITH_WCAN_URL ?>assets/images/14.png" alt="Filter by tag" />
434
+ </div>
435
+ </div>
436
+ </div>
437
  <div class="section section-cta section-odd">
438
  <div class="landing-container">
439
  <div class="premium-cta">
widgets/class.yith-wcan-navigation-widget.php CHANGED
@@ -483,7 +483,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
483
 
484
  echo '<li ' . $class . '>';
485
 
486
- echo ( $count > 0 || $option_is_set ) ? '<a style="' . $li_style . '" href="' . $link . '" title="' . $term->name . '" >' : '<span style="background-color:' . $instance['colors'][$term_id] . ';" >';
487
 
488
  echo $term->name;
489
 
@@ -1040,7 +1040,7 @@ if ( ! class_exists( 'YITH_WCAN_Navigation_Widget' ) ) {
1040
  $link = add_query_arg('post_type', $_GET['post_type'], $link);
1041
  }
1042
 
1043
- $is_attribute = apply_filters('yith_wcan_is_attribute_check', true);
1044
 
1045
  // Query type Arg
1046
  if ($is_attribute && $query_type == 'or' && !(sizeof($current_filter) == 1 && isset($_chosen_attributes[$taxonomy]['terms']) && is_array($_chosen_attributes[$taxonomy]['terms']) && $in_array_function($term->$filter_term_field, $_chosen_attributes[$taxonomy]['terms']))) {
483
 
484
  echo '<li ' . $class . '>';
485
 
486
+ echo ( $count > 0 || $option_is_set ) ? '<a style="' . $li_style . '" href="' . $link . '" title="' . $term->name . '" >' : '<span class="yith-wcan-color-not-available" style="' . $li_style . ';" >';
487
 
488
  echo $term->name;
489
 
1040
  $link = add_query_arg('post_type', $_GET['post_type'], $link);
1041
  }
1042
 
1043
+ $is_attribute = apply_filters('yith_wcan_is_attribute_check', true, $instance);
1044
 
1045
  // Query type Arg
1046
  if ($is_attribute && $query_type == 'or' && !(sizeof($current_filter) == 1 && isset($_chosen_attributes[$taxonomy]['terms']) && is_array($_chosen_attributes[$taxonomy]['terms']) && $in_array_function($term->$filter_term_field, $_chosen_attributes[$taxonomy]['terms']))) {