YITH WooCommerce Ajax Product Filter - Version 1.3.2

Version Description

  • Fixed: Wrong enqueue of the main css file
  • Added: Filter yith_wcan_exclude_terms
Download this release

Release Info

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

Code changes from version 1.3.1 to 1.3.2

README.txt CHANGED
@@ -3,8 +3,8 @@
3
  Contributors: yithemes
4
  Tags: woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation
5
  Requires at least: 3.5.1
6
- Tested up to: 3.8.1
7
- Stable tag: 1.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -66,6 +66,11 @@ In order to display the widget you need to assign it to the sidebar in the Shop
66
 
67
  == Changelog ==
68
 
 
 
 
 
 
69
  = 1.3.1 =
70
 
71
  * Added: Attribute order (All, Hieralchical or Only Parent style)
3
  Contributors: yithemes
4
  Tags: woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation
5
  Requires at least: 3.5.1
6
+ Tested up to: 3.9.1
7
+ Stable tag: 1.3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
66
 
67
  == Changelog ==
68
 
69
+ = 1.3.2 =
70
+
71
+ * Fixed: Wrong enqueue of the main css file
72
+ * Added: Filter yith_wcan_exclude_terms
73
+
74
  = 1.3.1 =
75
 
76
  * Added: Attribute order (All, Hieralchical or Only Parent style)
assets/js/yith-wcan-admin.js CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Navigation
6
- * @version 1.3.1
7
  */
8
  jQuery(function($){
9
 
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Navigation
6
+ * @version 1.3.2
7
  */
8
  jQuery(function($){
9
 
assets/js/yith-wcan-frontend.js CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Navigation
6
- * @version 1.3.1
7
  */
8
  jQuery(function($){
9
  /**
3
  *
4
  * @author Your Inspiration Themes
5
  * @package YITH WooCommerce Ajax Navigation
6
+ * @version 1.3.2
7
  */
8
  jQuery(function($){
9
  /**
class.yith-wcan-admin.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
- * @version 1.3.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
+ * @version 1.3.2
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
class.yith-wcan-frontend.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
- * @version 1.3.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
@@ -38,7 +38,7 @@ if( !class_exists( 'YITH_WCAN_Frontend' ) ) {
38
  add_action( 'init', array( $this, 'init' ) );
39
  add_action( 'init', array( $this, 'woocommerce_layered_nav_init' ), 99 );
40
 
41
- add_action( 'wp_head', array( $this, 'enqueue_styles_scripts' ) );
42
 
43
  // YITH WCAN Loaded
44
  do_action( 'yith_wcan_loaded' );
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
+ * @version 1.3.2
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
38
  add_action( 'init', array( $this, 'init' ) );
39
  add_action( 'init', array( $this, 'woocommerce_layered_nav_init' ), 99 );
40
 
41
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
42
 
43
  // YITH WCAN Loaded
44
  do_action( 'yith_wcan_loaded' );
class.yith-wcan-helper.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
- * @version 1.3.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
+ * @version 1.3.2
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
class.yith-wcan.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
- * @version 1.3.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
@@ -22,7 +22,7 @@ if( !class_exists( 'YITH_WCAN' ) ) {
22
  * @var string
23
  * @since 1.0.0
24
  */
25
- public $version = '1.3.1';
26
 
27
  /**
28
  * Plugin object
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
+ * @version 1.3.2
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
22
  * @var string
23
  * @since 1.0.0
24
  */
25
+ public $version = '1.3.2';
26
 
27
  /**
28
  * Plugin object
functions.yith-wcan.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
- * @version 1.3.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
@@ -187,22 +187,24 @@ if( !function_exists('yit_get_terms') ) {
187
  */
188
  function yit_get_terms( $case, $taxonomy ) {
189
 
 
 
190
  switch ( $case ) {
191
 
192
  case 'all':
193
- $terms = get_terms( $taxonomy, array( 'hide_empty' => true ) );
194
  break;
195
 
196
  case 'hierarchical':
197
- $terms = yit_reorder_terms_by_parent( get_terms( $taxonomy, array( 'hide_empty' => true ) ) );
198
  break;
199
 
200
  case 'parent' :
201
- $terms = get_terms( $taxonomy, array( 'hide_empty' => true, 'parent' => false ) );
202
  break;
203
 
204
  default:
205
- $terms = get_terms( $taxonomy, array( 'hide_empty' => true ) );
206
  break;
207
  }
208
 
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
+ * @version 1.3.2
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
187
  */
188
  function yit_get_terms( $case, $taxonomy ) {
189
 
190
+ $exclude = apply_filters( 'yith_wcan_exclude_terms', array() );
191
+
192
  switch ( $case ) {
193
 
194
  case 'all':
195
+ $terms = get_terms( $taxonomy, array( 'hide_empty' => true, 'exclude' => $exclude ) );
196
  break;
197
 
198
  case 'hierarchical':
199
+ $terms = yit_reorder_terms_by_parent( get_terms( $taxonomy, array( 'hide_empty' => true, 'exclude' => $exclude ) ) );
200
  break;
201
 
202
  case 'parent' :
203
+ $terms = get_terms( $taxonomy, array( 'hide_empty' => true, 'parent' => false, 'exclude' => $exclude ) );
204
  break;
205
 
206
  default:
207
+ $terms = get_terms( $taxonomy, array( 'hide_empty' => true, 'exclude' => $exclude ) );
208
  break;
209
  }
210
 
init.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: YITH WooCommerce Ajax Navigation
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Navigation allows user to filter products in Shop page without reloading the page.
6
- * Version: 1.3.1
7
  * Author: Your Inspiration Themes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yit
@@ -11,7 +11,7 @@
11
  *
12
  * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Ajax Navigation
14
- * @version 1.3.1
15
  */
16
  /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
@@ -46,7 +46,7 @@ function yith_wcan_constructor() {
46
  define( 'YITH_WCAN', true );
47
  define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
48
  define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
49
- define( 'YITH_WCAN_VERSION', '1.3.1' );
50
 
51
  // Load required classes and functions
52
  require_once('functions.yith-wcan.php');
3
  * Plugin Name: YITH WooCommerce Ajax Navigation
4
  * Plugin URI: http://yithemes.com/
5
  * Description: YITH WooCommerce Ajax Navigation allows user to filter products in Shop page without reloading the page.
6
+ * Version: 1.3.2
7
  * Author: Your Inspiration Themes
8
  * Author URI: http://yithemes.com/
9
  * Text Domain: yit
11
  *
12
  * @author Your Inspiration Themes
13
  * @package YITH WooCommerce Ajax Navigation
14
+ * @version 1.3.2
15
  */
16
  /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
17
 
46
  define( 'YITH_WCAN', true );
47
  define( 'YITH_WCAN_URL', plugin_dir_url( __FILE__ ) );
48
  define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
49
+ define( 'YITH_WCAN_VERSION', '1.3.2' );
50
 
51
  // Load required classes and functions
52
  require_once('functions.yith-wcan.php');
widgets/class.yith-wcan-navigation-widget.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
- * @version 1.3.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
@@ -207,7 +207,7 @@ if( !class_exists( 'YITH_WCAN' ) ) {
207
  echo ( $count > 0 || $option_is_set ) ? '</a>' : '</span>';
208
 
209
  if( $count != 0 ) {
210
- echo ' <small class="count">' . $count . '</small></li>';
211
  }
212
 
213
  }
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
+ * @version 1.3.2
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
207
  echo ( $count > 0 || $option_is_set ) ? '</a>' : '</span>';
208
 
209
  if( $count != 0 ) {
210
+ echo ' <small class="count">' . $count . '</small><div class="clear"></div></li>';
211
  }
212
 
213
  }
widgets/class.yith-wcan-reset-navigation-widget.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
- * @version 1.3.1
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly
4
  *
5
  * @author Your Inspiration Themes
6
  * @package YITH WooCommerce Ajax Navigation
7
+ * @version 1.3.2
8
  */
9
 
10
  if ( !defined( 'YITH_WCAN' ) ) { exit; } // Exit if accessed directly