Version Description
- Minor fix: WooCommerce layered navigation compatibility caused enough problems that I've disabled it by default. You can enable it with
add_filter( 'woocommerce_get_filtered_term_product_counts_query', 'relevanssi_filtered_term_product_counts_query' );
. - Minor fix: Data attribute handling for in-document highlighting is now better.
Download this release
Release Info
Developer | msaari |
Plugin | Relevanssi – A Better Search |
Version | 4.17.1 |
Comparing to | |
See all releases |
Code changes from version 4.17.0 to 4.17.1
- lib/compatibility/woocommerce.php +4 -1
- lib/excerpts-highlights.php +1 -2
- readme.txt +8 -1
- relevanssi.php +2 -2
lib/compatibility/woocommerce.php
CHANGED
@@ -13,7 +13,6 @@
|
|
13 |
add_filter( 'relevanssi_indexing_restriction', 'relevanssi_woocommerce_restriction' );
|
14 |
add_filter( 'relevanssi_admin_search_blocked_post_types', 'relevanssi_woocommerce_admin_search_blocked_post_types' );
|
15 |
add_filter( 'relevanssi_modify_wp_query', 'relevanssi_woocommerce_filters' );
|
16 |
-
add_filter( 'woocommerce_get_filtered_term_product_counts_query', 'relevanssi_filtered_term_product_counts_query' );
|
17 |
|
18 |
/**
|
19 |
* This action solves the problems introduced by adjust_posts_count() in
|
@@ -260,6 +259,10 @@ function relevanssi_woocommerce_filters( $query ) {
|
|
260 |
* @return array The modified query.
|
261 |
*/
|
262 |
function relevanssi_filtered_term_product_counts_query( $query ) {
|
|
|
|
|
|
|
|
|
263 |
global $relevanssi_variables, $wpdb;
|
264 |
|
265 |
if ( false !== stripos( $query['select'], 'product_or_parent_id' ) ) {
|
13 |
add_filter( 'relevanssi_indexing_restriction', 'relevanssi_woocommerce_restriction' );
|
14 |
add_filter( 'relevanssi_admin_search_blocked_post_types', 'relevanssi_woocommerce_admin_search_blocked_post_types' );
|
15 |
add_filter( 'relevanssi_modify_wp_query', 'relevanssi_woocommerce_filters' );
|
|
|
16 |
|
17 |
/**
|
18 |
* This action solves the problems introduced by adjust_posts_count() in
|
259 |
* @return array The modified query.
|
260 |
*/
|
261 |
function relevanssi_filtered_term_product_counts_query( $query ) {
|
262 |
+
if ( defined( 'BeRocket_AJAX_filters_version' ) ) {
|
263 |
+
return $query;
|
264 |
+
}
|
265 |
+
|
266 |
global $relevanssi_variables, $wpdb;
|
267 |
|
268 |
if ( false !== stripos( $query['select'], 'product_or_parent_id' ) ) {
|
lib/excerpts-highlights.php
CHANGED
@@ -1566,8 +1566,7 @@ function relevanssi_add_excerpt( &$post, $query ) {
|
|
1566 |
*/
|
1567 |
function relevanssi_entity_decode( $content, $flags = ENT_QUOTES, $charset = 'UTF-8' ) {
|
1568 |
$content = html_entity_decode( $content, $flags, $charset );
|
1569 |
-
|
1570 |
-
if ( preg_match_all( '/data-.+?="(.*?)"[ >]/sm', $content, $matches ) ) {
|
1571 |
$source = array();
|
1572 |
$replace = array();
|
1573 |
foreach ( $matches[1] as $match ) {
|
1566 |
*/
|
1567 |
function relevanssi_entity_decode( $content, $flags = ENT_QUOTES, $charset = 'UTF-8' ) {
|
1568 |
$content = html_entity_decode( $content, $flags, $charset );
|
1569 |
+
if ( preg_match_all( '/data-.+?="(.*?)"/sm', $content, $matches ) ) {
|
|
|
1570 |
$source = array();
|
1571 |
$replace = array();
|
1572 |
foreach ( $matches[1] as $match ) {
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: search, relevance, better search, product search, woocommerce search
|
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 7.0
|
8 |
-
Stable tag: 4.17.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -128,6 +128,10 @@ Each document database is full of useless words. All the little words that appea
|
|
128 |
* John Calahan for extensive 4.0 beta testing.
|
129 |
|
130 |
== Changelog ==
|
|
|
|
|
|
|
|
|
131 |
= 4.17.0 =
|
132 |
* New feature: You can now look at how the posts appear in the database from the Debugging tab.
|
133 |
* New feature: Relevanssi now works with WooCommerce layered navigation filters. The filter post counts should now match the Relevanssi search results.
|
@@ -184,6 +188,9 @@ Each document database is full of useless words. All the little words that appea
|
|
184 |
* Minor fix: The Bricks compatibility was improved, Relevanssi now notices changes to Bricks posts more often. Relevanssi also only reads the text from the `_bricks_page_content_2` custom field.
|
185 |
|
186 |
== Upgrade notice ==
|
|
|
|
|
|
|
187 |
= 4.17.0 =
|
188 |
* Large number of bug fixes and general improvements.
|
189 |
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 7.0
|
8 |
+
Stable tag: 4.17.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
128 |
* John Calahan for extensive 4.0 beta testing.
|
129 |
|
130 |
== Changelog ==
|
131 |
+
= 4.17.1 =
|
132 |
+
* Minor fix: WooCommerce layered navigation compatibility caused enough problems that I've disabled it by default. You can enable it with `add_filter( 'woocommerce_get_filtered_term_product_counts_query', 'relevanssi_filtered_term_product_counts_query' );`.
|
133 |
+
* Minor fix: Data attribute handling for in-document highlighting is now better.
|
134 |
+
|
135 |
= 4.17.0 =
|
136 |
* New feature: You can now look at how the posts appear in the database from the Debugging tab.
|
137 |
* New feature: Relevanssi now works with WooCommerce layered navigation filters. The filter post counts should now match the Relevanssi search results.
|
188 |
* Minor fix: The Bricks compatibility was improved, Relevanssi now notices changes to Bricks posts more often. Relevanssi also only reads the text from the `_bricks_page_content_2` custom field.
|
189 |
|
190 |
== Upgrade notice ==
|
191 |
+
= 4.17.1 =
|
192 |
+
* Disables the WooCommerce layered navigation support by default.
|
193 |
+
|
194 |
= 4.17.0 =
|
195 |
* Large number of bug fixes and general improvements.
|
196 |
|
relevanssi.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* Plugin Name: Relevanssi
|
14 |
* Plugin URI: https://www.relevanssi.com/
|
15 |
* Description: This plugin replaces WordPress search with a relevance-sorting search.
|
16 |
-
* Version: 4.17.
|
17 |
* Author: Mikko Saari
|
18 |
* Author URI: http://www.mikkosaari.fi/
|
19 |
* Text Domain: relevanssi
|
@@ -67,7 +67,7 @@ $relevanssi_variables['database_version'] = 6;
|
|
67 |
$relevanssi_variables['file'] = __FILE__;
|
68 |
$relevanssi_variables['plugin_dir'] = plugin_dir_path( __FILE__ );
|
69 |
$relevanssi_variables['plugin_basename'] = plugin_basename( __FILE__ );
|
70 |
-
$relevanssi_variables['plugin_version'] = '4.17.
|
71 |
|
72 |
require_once 'lib/admin-ajax.php';
|
73 |
require_once 'lib/common.php';
|
13 |
* Plugin Name: Relevanssi
|
14 |
* Plugin URI: https://www.relevanssi.com/
|
15 |
* Description: This plugin replaces WordPress search with a relevance-sorting search.
|
16 |
+
* Version: 4.17.1
|
17 |
* Author: Mikko Saari
|
18 |
* Author URI: http://www.mikkosaari.fi/
|
19 |
* Text Domain: relevanssi
|
67 |
$relevanssi_variables['file'] = __FILE__;
|
68 |
$relevanssi_variables['plugin_dir'] = plugin_dir_path( __FILE__ );
|
69 |
$relevanssi_variables['plugin_basename'] = plugin_basename( __FILE__ );
|
70 |
+
$relevanssi_variables['plugin_version'] = '4.17.1';
|
71 |
|
72 |
require_once 'lib/admin-ajax.php';
|
73 |
require_once 'lib/common.php';
|