Relevanssi – A Better Search - Version 4.12.5

Version Description

  • Changed behaviour: relevanssi_excerpt_custom_field_content now gets the post ID and list of custom field names as a parameter.
  • Minor fix: Makes sure Relevanssi options are not wiped when the free version is deleted while Premium is active.
  • Minor fix: Adds a trailing slash to the blog URL in Did you mean links.
Download this release

Release Info

Developer msaari
Plugin Icon 128x128 Relevanssi – A Better Search
Version 4.12.5
Comparing to
See all releases

Code changes from version 4.12.4 to 4.12.5

lib/admin_scripts.js CHANGED
@@ -89,7 +89,7 @@ jQuery(document).ready(function ($) {
89
  $("#build_index").attr("disabled", "disabled")
90
  var relevanssi_note = $("#relevanssi-note")
91
  relevanssi_note.show()
92
- relevanssi_note.html(relevanssi.options_changed)
93
  })
94
 
95
  $("#relevanssi_default_orderby").change(function (e) {
89
  $("#build_index").attr("disabled", "disabled")
90
  var relevanssi_note = $("#relevanssi-note")
91
  relevanssi_note.show()
92
+ relevanssi_note.html('<p class="description important">' + relevanssi.options_changed + '</p>')
93
  })
94
 
95
  $("#relevanssi_default_orderby").change(function (e) {
lib/didyoumean.php CHANGED
@@ -69,7 +69,7 @@ function relevanssi_simple_didyoumean( $query, $pre, $post, $n = 5 ) {
69
 
70
  $result = null;
71
  if ( $suggestion ) {
72
- $url = get_bloginfo( 'url' );
73
  $url = esc_attr(
74
  add_query_arg(
75
  array( 's' => rawurlencode( $suggestion ) ),
69
 
70
  $result = null;
71
  if ( $suggestion ) {
72
+ $url = trailingslashit( get_bloginfo( 'url' ) );
73
  $url = esc_attr(
74
  add_query_arg(
75
  array( 's' => rawurlencode( $suggestion ) ),
lib/excerpts-highlights.php CHANGED
@@ -47,8 +47,8 @@ function relevanssi_do_excerpt( $t_post, $query, $excerpt_length = null, $excerp
47
  * Filters the search query before excerpt-building.
48
  *
49
  * Allows filtering the search query before generating an excerpt. This can
50
- * useful if you modifications to the search query, and it may help when working
51
- * with stemming.
52
  *
53
  * @param string $query The search query.
54
  */
@@ -1376,8 +1376,15 @@ function relevanssi_get_custom_field_content( $post_id ) {
1376
  * Filters the custom field content for excerpt use.
1377
  *
1378
  * @param string $custom_field_content Custom field content for excerpts.
 
 
1379
  */
1380
- return apply_filters( 'relevanssi_excerpt_custom_field_content', $custom_field_content );
 
 
 
 
 
1381
  }
1382
 
1383
  /**
47
  * Filters the search query before excerpt-building.
48
  *
49
  * Allows filtering the search query before generating an excerpt. This can
50
+ * useful if you make modifications to the search query, and it may also
51
+ * help when working with stemming.
52
  *
53
  * @param string $query The search query.
54
  */
1376
  * Filters the custom field content for excerpt use.
1377
  *
1378
  * @param string $custom_field_content Custom field content for excerpts.
1379
+ * @param int $post_id The post ID.
1380
+ * @param array $custom_fields The list of custom field names.
1381
  */
1382
+ return apply_filters(
1383
+ 'relevanssi_excerpt_custom_field_content',
1384
+ $custom_field_content,
1385
+ $post_id,
1386
+ $custom_fields
1387
+ );
1388
  }
1389
 
1390
  /**
lib/uninstall.php CHANGED
@@ -50,6 +50,11 @@ function relevanssi_drop_database_tables() {
50
  * @global object $wpdb The WordPress database interface.
51
  */
52
  function relevanssi_uninstall_free() {
 
 
 
 
 
53
  delete_option( 'relevanssi_admin_search' );
54
  delete_option( 'relevanssi_bg_col' );
55
  delete_option( 'relevanssi_cat' );
50
  * @global object $wpdb The WordPress database interface.
51
  */
52
  function relevanssi_uninstall_free() {
53
+ if ( defined( 'RELEVANSSI_PREMIUM' ) && RELEVANSSI_PREMIUM && ! defined( 'UNINSTALLING_RELEVANSSI_PREMIUM' ) ) {
54
+ // Relevanssi Premium exists, do not drop the tables.
55
+ return;
56
+ }
57
+
58
  delete_option( 'relevanssi_admin_search' );
59
  delete_option( 'relevanssi_bg_col' );
60
  delete_option( 'relevanssi_cat' );
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: 5.7
7
  Requires PHP: 7.0
8
- Stable tag: 4.12.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -131,6 +131,11 @@ Each document database is full of useless words. All the little words that appea
131
  * John Calahan for extensive 4.0 beta testing.
132
 
133
  == Changelog ==
 
 
 
 
 
134
  = 4.12.4 =
135
  * New feature: New action hooks `relevanssi_pre_the_content` and `relevanssi_post_the_content` fire before and after Relevanssi applies `the_content` filter to the post excerpts. Some Relevanssi default behaviour has been moved to these hooks so it can be modified.
136
  * Changed behaviour: The `relevanssi_do_not_index` gets the post object as a third parameter.
@@ -225,6 +230,9 @@ Each document database is full of useless words. All the little words that appea
225
  * Minor fix: The category inclusion and exclusion setting checkboxes on the Searching tab didn't work. The setting was saved, but the checkboxes wouldn't appear.
226
 
227
  == Upgrade notice ==
 
 
 
228
  = 4.12.4 =
229
  * Fixes minor bugs.
230
 
5
  Requires at least: 4.9
6
  Tested up to: 5.7
7
  Requires PHP: 7.0
8
+ Stable tag: 4.12.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
131
  * John Calahan for extensive 4.0 beta testing.
132
 
133
  == Changelog ==
134
+ = 4.12.5 =
135
+ * Changed behaviour: `relevanssi_excerpt_custom_field_content` now gets the post ID and list of custom field names as a parameter.
136
+ * Minor fix: Makes sure Relevanssi options are not wiped when the free version is deleted while Premium is active.
137
+ * Minor fix: Adds a trailing slash to the blog URL in Did you mean links.
138
+
139
  = 4.12.4 =
140
  * New feature: New action hooks `relevanssi_pre_the_content` and `relevanssi_post_the_content` fire before and after Relevanssi applies `the_content` filter to the post excerpts. Some Relevanssi default behaviour has been moved to these hooks so it can be modified.
141
  * Changed behaviour: The `relevanssi_do_not_index` gets the post object as a third parameter.
230
  * Minor fix: The category inclusion and exclusion setting checkboxes on the Searching tab didn't work. The setting was saved, but the checkboxes wouldn't appear.
231
 
232
  == Upgrade notice ==
233
+ = 4.12.5 =
234
+ * Fixes minor bugs.
235
+
236
  = 4.12.4 =
237
  * Fixes minor bugs.
238
 
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.12.4
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.12.4';
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.12.5
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.12.5';
71
 
72
  require_once 'lib/admin-ajax.php';
73
  require_once 'lib/common.php';