Search & Filter - Version 1.2.13

Version Description

  • Fix - a PHP warning when using Beaver Builder
Download this release

Release Info

Developer codeamp
Plugin Icon 128x128 Search & Filter
Version 1.2.13
Comparing to
See all releases

Code changes from version 1.2.12 to 1.2.13

Files changed (2) hide show
  1. readme.txt +6 -3
  2. search-filter.php +25 -26
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Search & Filter ===
2
- Contributors: DesignsAndCode
3
  Donate link:
4
  Tags: category, filter, taxonomy, search, wordpress, post type, post date
5
  Requires at least: 3.5
6
- Tested up to: 5.3
7
- Stable tag: 1.2.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -34,6 +34,9 @@ The documentation has been updated to include examples almost all configurable o
34
 
35
  == Changelog ==
36
 
 
 
 
37
  = 1.2.12 =
38
  * Fixed - some PHP warnings when using radio, checkbox and multiselects
39
  * Fixed - a typo (thanks sunjunkie)
1
  === Search & Filter ===
2
+ Contributors: DesignsAndCode, codeamp
3
  Donate link:
4
  Tags: category, filter, taxonomy, search, wordpress, post type, post date
5
  Requires at least: 3.5
6
+ Tested up to: 5.6
7
+ Stable tag: 1.2.13
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
34
 
35
  == Changelog ==
36
 
37
+ = 1.2.13 =
38
+ * Fix - a PHP warning when using Beaver Builder
39
+
40
  = 1.2.12 =
41
  * Fixed - some PHP warnings when using radio, checkbox and multiselects
42
  * Fixed - a typo (thanks sunjunkie)
search-filter.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.designsandcode.com/447/wordpress-search-filter-plugin-for
5
  Description: Search and Filtering system for Pages, Posts, Categories, Tags and Taxonomies
6
  Author: Designs & Code
7
  Author URI: http://www.designsandcode.com/
8
- Version: 1.2.12
9
  Text Domain: searchandfilter
10
  License: GPLv2
11
  */
@@ -14,7 +14,7 @@ License: GPLv2
14
  * Set up Plugin Globals
15
  */
16
  if (!defined('SEARCHANDFILTER_VERSION_NUM'))
17
- define('SEARCHANDFILTER_VERSION_NUM', '1.2.12');
18
 
19
  if (!defined('SEARCHANDFILTER_THEME_DIR'))
20
  define('SEARCHANDFILTER_THEME_DIR', ABSPATH . 'wp-content/themes/' . get_template());
@@ -571,38 +571,37 @@ if ( ! class_exists( 'SearchAndFilter' ) )
571
 
572
  $this->defaults[SF_FPRE.'post_tag'] = $tags;
573
 
574
-
575
- //loop through all the query vars
576
- foreach($wp_query->query as $key=>$val)
577
- {
578
- if(!in_array(SF_FPRE.$key, $this->frmqreserved))
579
- {//make sure the get is not a reserved get as they have already been handled above
580
 
581
- //now check it is a desired key
582
- if(in_array($key, $this->taxonomylist))
583
- {
584
- $taxslug = ($val);
585
- //$tax_params = explode("+",esc_attr($taxslug));
586
-
587
- $tax_params = (preg_split("/[,\+ ]/", esc_attr($taxslug))); //explode with 2 delims
588
-
589
- $taxs = array();
590
-
591
- foreach($tax_params as $tax_param)
592
  {
593
- $tax = get_term_by("slug",$tax_param, $key);
594
-
595
- if(isset($tax->term_id))
 
 
 
 
 
596
  {
597
- $taxs[] = $tax->term_id;
 
 
 
 
 
598
  }
599
- }
600
 
601
- $this->defaults[SF_FPRE.$key] = $taxs;
 
602
  }
603
  }
604
  }
605
-
606
  $post_date = array("","");
607
  if(isset($wp_query->query['post_date']))
608
  {
5
  Description: Search and Filtering system for Pages, Posts, Categories, Tags and Taxonomies
6
  Author: Designs & Code
7
  Author URI: http://www.designsandcode.com/
8
+ Version: 1.2.13
9
  Text Domain: searchandfilter
10
  License: GPLv2
11
  */
14
  * Set up Plugin Globals
15
  */
16
  if (!defined('SEARCHANDFILTER_VERSION_NUM'))
17
+ define('SEARCHANDFILTER_VERSION_NUM', '1.2.13');
18
 
19
  if (!defined('SEARCHANDFILTER_THEME_DIR'))
20
  define('SEARCHANDFILTER_THEME_DIR', ABSPATH . 'wp-content/themes/' . get_template());
571
 
572
  $this->defaults[SF_FPRE.'post_tag'] = $tags;
573
 
574
+ if ( isset( $wp_query->query ) && is_array( $wp_query->query ) ) {
575
+ //loop through all the query vars
576
+ foreach($wp_query->query as $key=>$val) {
577
+ if(!in_array(SF_FPRE.$key, $this->frmqreserved))
578
+ {//make sure the get is not a reserved get as they have already been handled above
 
579
 
580
+ //now check it is a desired key
581
+ if(in_array($key, $this->taxonomylist))
 
 
 
 
 
 
 
 
 
582
  {
583
+ $taxslug = ($val);
584
+ //$tax_params = explode("+",esc_attr($taxslug));
585
+
586
+ $tax_params = (preg_split("/[,\+ ]/", esc_attr($taxslug))); //explode with 2 delims
587
+
588
+ $taxs = array();
589
+
590
+ foreach($tax_params as $tax_param)
591
  {
592
+ $tax = get_term_by("slug",$tax_param, $key);
593
+
594
+ if(isset($tax->term_id))
595
+ {
596
+ $taxs[] = $tax->term_id;
597
+ }
598
  }
 
599
 
600
+ $this->defaults[SF_FPRE.$key] = $taxs;
601
+ }
602
  }
603
  }
604
  }
 
605
  $post_date = array("","");
606
  if(isset($wp_query->query['post_date']))
607
  {