Version Description
- Recent post bonus is now applied to searches.
- Exact term setting can now be disabled.
- Users of Members plugin would have drafts appear in search results. This is now fixed.
Download this release
Release Info
Developer | msaari |
Plugin | Relevanssi – A Better Search |
Version | 4.0.7 |
Comparing to | |
See all releases |
Code changes from version 4.0.6 to 4.0.7
- lib/common.php +5 -4
- lib/interface.php +4 -0
- lib/search.php +1 -1
- readme.txt +9 -1
- relevanssi.php +1 -1
lib/common.php
CHANGED
@@ -689,12 +689,13 @@ function relevanssi_default_post_ok( $post_ok, $post_id ) {
|
|
689 |
// Current user has the required capabilities and can see the page.
|
690 |
$post_ok = true;
|
691 |
}
|
692 |
-
}
|
693 |
|
694 |
-
|
695 |
-
|
696 |
-
|
|
|
697 |
}
|
|
|
698 |
if ( defined( 'GROUPS_CORE_VERSION' ) ) {
|
699 |
// Groups.
|
700 |
$current_user = wp_get_current_user();
|
689 |
// Current user has the required capabilities and can see the page.
|
690 |
$post_ok = true;
|
691 |
}
|
|
|
692 |
|
693 |
+
if ( function_exists( 'members_can_current_user_view_post' ) ) {
|
694 |
+
// Members.
|
695 |
+
$post_ok = members_can_current_user_view_post( $post_id );
|
696 |
+
}
|
697 |
}
|
698 |
+
|
699 |
if ( defined( 'GROUPS_CORE_VERSION' ) ) {
|
700 |
// Groups.
|
701 |
$current_user = wp_get_current_user();
|
lib/interface.php
CHANGED
@@ -138,6 +138,10 @@ function update_relevanssi_options() {
|
|
138 |
if ( ! isset( $_REQUEST['relevanssi_polylang_all_languages'] ) ) {
|
139 |
$_REQUEST['relevanssi_polylang_all_languages'] = 'off';
|
140 |
}
|
|
|
|
|
|
|
|
|
141 |
}
|
142 |
|
143 |
if ( 'logging' === $_REQUEST['tab'] ) {
|
138 |
if ( ! isset( $_REQUEST['relevanssi_polylang_all_languages'] ) ) {
|
139 |
$_REQUEST['relevanssi_polylang_all_languages'] = 'off';
|
140 |
}
|
141 |
+
|
142 |
+
if ( ! isset( $_REQUEST['relevanssi_exact_match_bonus'] ) ) {
|
143 |
+
$_REQUEST['relevanssi_exact_match_bonus'] = 'off';
|
144 |
+
}
|
145 |
}
|
146 |
|
147 |
if ( 'logging' === $_REQUEST['tab'] ) {
|
lib/search.php
CHANGED
@@ -772,7 +772,7 @@ function relevanssi_search( $args ) {
|
|
772 |
if ( $recency_bonus ) {
|
773 |
$post = relevanssi_get_post( $match->doc );
|
774 |
if ( strtotime( $post->post_date ) > $recency_cutoff_date ) {
|
775 |
-
$match->weight = $match->weight * $recency_bonus
|
776 |
}
|
777 |
}
|
778 |
|
772 |
if ( $recency_bonus ) {
|
773 |
$post = relevanssi_get_post( $match->doc );
|
774 |
if ( strtotime( $post->post_date ) > $recency_cutoff_date ) {
|
775 |
+
$match->weight = $match->weight * $recency_bonus;
|
776 |
}
|
777 |
}
|
778 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: search, relevance, better search
|
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.0
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 4.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -129,6 +129,11 @@ Each document database is full of useless words. All the little words that appea
|
|
129 |
|
130 |
== Changelog ==
|
131 |
|
|
|
|
|
|
|
|
|
|
|
132 |
= 4.0.6 =
|
133 |
* Indexing bugs squashed.
|
134 |
* Missing tag and category weight settings returned.
|
@@ -148,6 +153,9 @@ Each document database is full of useless words. All the little words that appea
|
|
148 |
|
149 |
== Upgrade notice ==
|
150 |
|
|
|
|
|
|
|
151 |
= 4.0.6 =
|
152 |
* Indexing bugs fixed and WPML support corrected.
|
153 |
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.0
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.0.7
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
129 |
|
130 |
== Changelog ==
|
131 |
|
132 |
+
= 4.0.7 =
|
133 |
+
* Recent post bonus is now applied to searches.
|
134 |
+
* Exact term setting can now be disabled.
|
135 |
+
* Users of Members plugin would have drafts appear in search results. This is now fixed.
|
136 |
+
|
137 |
= 4.0.6 =
|
138 |
* Indexing bugs squashed.
|
139 |
* Missing tag and category weight settings returned.
|
153 |
|
154 |
== Upgrade notice ==
|
155 |
|
156 |
+
= 4.0.7 =
|
157 |
+
* Small bug fixes.
|
158 |
+
|
159 |
= 4.0.6 =
|
160 |
* Indexing bugs fixed and WPML support corrected.
|
161 |
|
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.0.
|
17 |
* Author: Mikko Saari
|
18 |
* Author URI: http://www.mikkosaari.fi/
|
19 |
* Text Domain: relevanssi
|
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.0.7
|
17 |
* Author: Mikko Saari
|
18 |
* Author URI: http://www.mikkosaari.fi/
|
19 |
* Text Domain: relevanssi
|