Version Description
- Fixed: when submitting an empty search/filter, "?s=" now gets appended to the url (an empty search) to force load a results page, previously this was redirecting to the homepage which does not work for many use cases
Download this release
Release Info
Developer | DesignsAndCode |
Plugin | Search & Filter |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- readme.txt +4 -1
- search-filter.php +7 -3
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: category, filter, taxonomy, search, wordpress
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.6
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -40,6 +40,9 @@ If you have used a plugin to register a custom taxonomy this info can normally b
|
|
40 |
|
41 |
== Changelog ==
|
42 |
|
|
|
|
|
|
|
43 |
= 1.1.0 =
|
44 |
* Added support for checkboxes and radio buttons, with the option to control this for each individual taxonomy.
|
45 |
* Added support to show or hide headings for each individual taxonomy.
|
4 |
Tags: category, filter, taxonomy, search, wordpress
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.6
|
7 |
+
Stable tag: 1.1.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
40 |
|
41 |
== Changelog ==
|
42 |
|
43 |
+
= 1.1.1 =
|
44 |
+
* Fixed: when submitting an empty search/filter, "?s=" now gets appended to the url (an empty search) to force load a results page, previously this was redirecting to the homepage which does not work for many use cases
|
45 |
+
|
46 |
= 1.1.0 =
|
47 |
* Added support for checkboxes and radio buttons, with the option to control this for each individual taxonomy.
|
48 |
* Added support to show or hide headings for each individual taxonomy.
|
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.1.
|
9 |
Text Domain: searchandfilter
|
10 |
License: GPLv2
|
11 |
*/
|
@@ -16,7 +16,7 @@ License: GPLv2
|
|
16 |
* Set up Plugin Globals
|
17 |
*/
|
18 |
if (!defined('SEARCHANDFILTER_VERSION_NUM'))
|
19 |
-
define('SEARCHANDFILTER_VERSION_NUM', '1.1.
|
20 |
|
21 |
if (!defined('SEARCHANDFILTER_THEME_DIR'))
|
22 |
define('SEARCHANDFILTER_THEME_DIR', ABSPATH . 'wp-content/themes/' . get_template());
|
@@ -506,7 +506,11 @@ if ( ! class_exists( 'SearchAndFilter' ) )
|
|
506 |
|
507 |
if($this->has_search_posted)
|
508 |
{//if the search has been posted, redirect to the newly formed url with all the right params
|
509 |
-
|
|
|
|
|
|
|
|
|
510 |
wp_redirect( (home_url().$this->urlparams) );
|
511 |
}
|
512 |
|
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.1.1
|
9 |
Text Domain: searchandfilter
|
10 |
License: GPLv2
|
11 |
*/
|
16 |
* Set up Plugin Globals
|
17 |
*/
|
18 |
if (!defined('SEARCHANDFILTER_VERSION_NUM'))
|
19 |
+
define('SEARCHANDFILTER_VERSION_NUM', '1.1.1');
|
20 |
|
21 |
if (!defined('SEARCHANDFILTER_THEME_DIR'))
|
22 |
define('SEARCHANDFILTER_THEME_DIR', ABSPATH . 'wp-content/themes/' . get_template());
|
506 |
|
507 |
if($this->has_search_posted)
|
508 |
{//if the search has been posted, redirect to the newly formed url with all the right params
|
509 |
+
|
510 |
+
if($this->urlparams=="/")
|
511 |
+
{//check to see if url params are set, if not ("/") then add "?s=" to force load search results, without this it would redirect to the homepage, which may be a custom page with no blog items/results
|
512 |
+
$this->urlparams .= "?s=";
|
513 |
+
}
|
514 |
wp_redirect( (home_url().$this->urlparams) );
|
515 |
}
|
516 |
|