From 91c6fd341c32152f24cd0e4168023bef42f82d2f Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Sat, 16 Nov 2019 04:13:26 -0800 Subject: [PATCH 1/2] Add `solr_power_ajax_search_query_args` filter to modify AJAX search --- includes/class-solrpower.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-solrpower.php b/includes/class-solrpower.php index c8fad63c..f603a317 100644 --- a/includes/class-solrpower.php +++ b/includes/class-solrpower.php @@ -317,13 +317,13 @@ function ( $url ) { $paged = filter_input( INPUT_GET, 'paged', FILTER_SANITIZE_STRING ); $paged = ( false === $paged || null === $paged ) ? 1 : absint( $paged ); - $args = array( + $args = array( 's' => filter_input( INPUT_GET, 's', FILTER_SANITIZE_STRING ), 'facets' => filter_input( INPUT_GET, 'facet', FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY ), 'posts_per_page' => get_option( 'posts_per_page' ), 'paged' => $paged, ); - + $args = apply_filters( 'solr_power_ajax_search_query_args', $args ); $query = new WP_Query( $args ); $query->get_posts(); From b98abc39180491ed9055f37611bef095872894b6 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Sat, 16 Nov 2019 04:16:53 -0800 Subject: [PATCH 2/2] Update README for v2.1.3 --- README.md | 5 ++++- readme.txt | 5 ++++- solr-power.php | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4b204f9f..4432de4f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Requires at least:** 4.6 **Requires PHP:** 7.1 **Tested up to:** 5.3 -**Stable tag:** 2.1.2 +**Stable tag:** 2.1.3 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -166,6 +166,9 @@ To support searching by author name (e.g. where "Pantheon" would return posts au ## Changelog ## +### 2.1.3 (November 16, 2019) ### +* Add `solr_power_ajax_search_query_args` filter to modify AJAX search query arguments [[#432](https://github.com/pantheon-systems/solr-power/pull/432)]. + ### 2.1.2 (August 28, 2019) ### * Adds `solr_is_private_blog` filter to allow control over whether a blog is indexed [[#423](https://github.com/pantheon-systems/solr-power/pull/423)]. diff --git a/readme.txt b/readme.txt index bb93272a..867971d2 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: search Requires at least: 4.6 Requires PHP: 7.1 Tested up to: 5.3 -Stable tag: 2.1.2 +Stable tag: 2.1.3 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -166,6 +166,9 @@ To support searching by author name (e.g. where "Pantheon" would return posts au == Changelog == += 2.1.3 (November 16, 2019) = +* Add `solr_power_ajax_search_query_args` filter to modify AJAX search query arguments [[#432](https://github.com/pantheon-systems/solr-power/pull/432)]. + = 2.1.2 (August 28, 2019) = * Adds `solr_is_private_blog` filter to allow control over whether a blog is indexed [[#423](https://github.com/pantheon-systems/solr-power/pull/423)]. diff --git a/solr-power.php b/solr-power.php index 8fa9f950..7ab5b388 100644 --- a/solr-power.php +++ b/solr-power.php @@ -2,7 +2,7 @@ /** * Plugin Name: Solr Power * Description: Allows WordPress sites to index and search content with ApacheSolr. - * Version: 2.1.2 + * Version: 2.1.3 * Author: Pantheon * Author URI: http://pantheon.io * Text Domain: solr-for-wordpress-on-pantheon @@ -10,7 +10,7 @@ * @package Solr_Power **/ -define( 'SOLR_POWER_VERSION', '2.1.2' ); +define( 'SOLR_POWER_VERSION', '2.1.3' ); /** * Copyright (c) 2011-2019 Pantheon, Matt Weber, Solr Power contributors