plugin updates
This commit is contained in:
@@ -1,3 +1,38 @@
|
||||
= 2.19.1 =
|
||||
* 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.
|
||||
|
||||
= 2.19.0 =
|
||||
* New feature: New CLI command `list_pinned_posts` lists all pinned and unpinned posts.
|
||||
* New feature: New CLI command `list` lists indexed and unindexed posts, taxonomy terms and users.
|
||||
* New feature: You can now look at how the posts appear in the database from the Debugging tab.
|
||||
* New feature: Relevanssi now works with WooCommerce layered navigation filters. The filter post counts should now match the Relevanssi search results.
|
||||
* New feature: You can now export the click tracking logs.
|
||||
* New feature: New function `relevanssi_count_term_occurrances()` can be used to display how many times search terms appear in the database.
|
||||
* Changed behaviour: Relevanssi post update trigger is now on `wp_after_insert_post` instead of `wp_insert_post`. This makes the indexing more reliable and better compatible with other plugins.
|
||||
* Changed behaviour: Previously, throttling searches has been impossible when results are sorted by date. Now if you set Relevanssi to sort by post date from the searching settings, you can enable the throttle and the throttling will make sure to keep the most recent posts. This does not work if you set the `orderby` to `post_date` elsewhere.
|
||||
* Minor fix: Prevents Relevanssi from interfering in fringe cases (including The Event Calendar event search).
|
||||
* Minor fix: Relevanssi added the `highlight` parameter to home page URLs, even though it shouldn't.
|
||||
* Minor fix: Indexing `nav_menu_item` posts is stopped earlier in the process to avoid problems with big menus.
|
||||
* Minor fix: Add support for WooCommerce products attribute lookup table filtering.
|
||||
* Minor fix: Improves Polylang language detection.
|
||||
* Minor fix: Improve excerpts to avoid breaking HTML tags when tags are allowed.
|
||||
* Minor fix: Add support for JetSmartFilters.
|
||||
* Minor fix: With multiple excerpts, sometimes Relevanssi would return no excerpt at all.
|
||||
* Minor fix: If the `sentence` query variable is used to enable phrase searching, Relevanssi now adds quotes to the `highlight` parameter.
|
||||
* Minor fix: Add support for TablePress `table_filter` shortcodes.
|
||||
* Minor fix: Improve WPFD file content indexing support. Relevanssi indexing now happens after the WPFD indexing is done.
|
||||
* Minor fix: User profile update actions now happen at a later priority. This should reduce problems when indexing ACF fields, for example.
|
||||
* Minor fix: Relevanssi now hyphenates long search terms in the User searches page. This prevents long search terms from messing up the display.
|
||||
* Minor fix: Stopped some problems with Did you mean suggestions suggesting the same word if a hyphen was included.
|
||||
* Minor fix: If the API key wasn't set in network settings for a multisite installation, Relevanssi wouldn't fall back to the current site API key setting when indexing attachment content. That works correctly now; still, set the API key on network settings level.
|
||||
* Minor fix: Paging didn't work in admin searches for hierarchical post types (like pages).
|
||||
* Minor fix: Relevanssi doesn't add click tracking or highlight parameters to admin searches anymore.
|
||||
* Minor fix: The search log reset feature now also resets the click tracking log.
|
||||
* Minor fix: In-document highlighting could break certain elements thanks to Relevanssi messing up data attributes.
|
||||
* Minor fix: Relevanssi now recursively runs `relevanssi_block_to_render` and the CSS `relevanssi_noindex` filtering for inner blocks.
|
||||
* Minor fix: Relevanssi redirects now work better with FacetWP searches. Thanks to Jan Willem Oostendorp.
|
||||
|
||||
= 2.18.0 =
|
||||
* New feature: Oxygen compatibility has been upgraded to support JSON data from Oxygen 4. This is still in early stages, so feedback from Oxygen users is welcome.
|
||||
* New feature: New filter hook `relevanssi_oxygen_element` is used to filter Oxygen JSON elements. The earlier `relevanssi_oxygen_section_filters` and `relevanssi_oxygen_section_content` filters are no longer used with Oxygen 4; this hook is the only way to filter Oxygen elements.
|
||||
|
||||
@@ -399,8 +399,9 @@ function relevanssi_create_database_tables( $relevanssi_db_version ) {
|
||||
$sql = "SHOW INDEX FROM $relevanssi_log_table";
|
||||
$indices = $wpdb->get_results( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.NoCaching
|
||||
|
||||
$query_exists = false;
|
||||
$id_exists = false;
|
||||
$query_exists = false;
|
||||
$id_exists = false;
|
||||
$session_id_exists = false;
|
||||
foreach ( $indices as $index ) {
|
||||
if ( 'query' === $index->Key_name ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName
|
||||
$query_exists = true;
|
||||
@@ -408,6 +409,9 @@ function relevanssi_create_database_tables( $relevanssi_db_version ) {
|
||||
if ( 'id' === $index->Key_name ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName
|
||||
$id_exists = true;
|
||||
}
|
||||
if ( 'session_id' === $index->Key_name ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName
|
||||
$session_id_exists = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $query_exists ) {
|
||||
@@ -415,6 +419,11 @@ function relevanssi_create_database_tables( $relevanssi_db_version ) {
|
||||
$wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.NoCaching
|
||||
}
|
||||
|
||||
if ( ! $session_id_exists ) {
|
||||
$sql = "CREATE INDEX session_id ON $relevanssi_log_table (session_id)";
|
||||
$wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.NoCaching
|
||||
}
|
||||
|
||||
if ( $id_exists ) {
|
||||
$sql = "DROP INDEX id ON $relevanssi_log_table";
|
||||
$wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.NoCaching
|
||||
@@ -486,9 +495,11 @@ function relevanssi_rest_api_disable() {
|
||||
*/
|
||||
function relevanssi_export_log_check() {
|
||||
if ( isset( $_REQUEST['relevanssi_export'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification, just checking the parameter exists.
|
||||
check_admin_referer( 'relevanssi_export_logs', '_relevanssi_export_nonce' );
|
||||
relevanssi_export_log();
|
||||
}
|
||||
if ( isset( $_REQUEST['relevanssi_export_clicks'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification, just checking the parameter exists.
|
||||
check_admin_referer( 'relevanssi_export_logs', '_relevanssi_export_nonce' );
|
||||
function_exists( 'relevanssi_export_click_log' ) && relevanssi_export_click_log();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1977,7 +1977,7 @@ function relevanssi_post_date_throttle_join( $query_join ) {
|
||||
if ( 'post_date' === get_option( 'relevanssi_default_orderby' ) &&
|
||||
'on' === get_option( 'relevanssi_throttle', 'on' ) ) {
|
||||
global $wpdb;
|
||||
$query_join = ', ' . $wpdb->posts . ' AS p';
|
||||
$query_join .= ', ' . $wpdb->posts . ' AS p';
|
||||
}
|
||||
return $query_join;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ function relevanssi_logging_tab() {
|
||||
$omit_from_logs = get_option( 'relevanssi_omit_from_logs' );
|
||||
$trim_logs = get_option( 'relevanssi_trim_logs' );
|
||||
|
||||
wp_nonce_field( 'relevanssi_export_logs', '_relevanssi_export_nonce', true, true );
|
||||
|
||||
?>
|
||||
<table class="form-table" role="presentation">
|
||||
<tr>
|
||||
|
||||
@@ -108,7 +108,7 @@ function relevanssi_overview_tab() {
|
||||
<td>
|
||||
<p><a href="https://www.relevanssi.com/buy-premium"><?php esc_html_e( 'Buy Relevanssi Premium now', 'relevanssi' ); ?></a> –
|
||||
<?php // Translators: %1$s is the coupon code, %2$s is the year it expires. ?>
|
||||
<?php printf( esc_html__( 'use coupon code %1$s for 20%% discount (valid at least until the end of %2$s)', 'relevanssi' ), '<strong>FREE2023</strong>', '2023' ); ?></p>
|
||||
<?php printf( esc_html__( 'use coupon code %1$s for 20%% discount (valid at least until the end of %2$s)', 'relevanssi' ), '<strong>FREE2024</strong>', '2024' ); ?></p>
|
||||
<p><?php esc_html_e( 'Here are some improvements Relevanssi Premium offers:', 'relevanssi' ); ?></p>
|
||||
<ul class="relevanssi_ul">
|
||||
<li><?php esc_html_e( 'PDF content indexing', 'relevanssi' ); ?></li>
|
||||
|
||||
@@ -429,9 +429,15 @@ function relevanssi_get_current_language( bool $locale = true ) {
|
||||
|
||||
if ( isset( $post ) ) {
|
||||
if ( isset( $post->term_id ) && function_exists( 'pll_get_term_language' ) ) {
|
||||
$current_language = pll_get_term_language( $post->term_id, $locale ? 'locale' : 'slug' );
|
||||
$term_language = pll_get_term_language( $post->term_id, $locale ? 'locale' : 'slug' );
|
||||
if ( $term_language ) {
|
||||
$current_language = $term_language;
|
||||
}
|
||||
} elseif ( ! isset( $post->user_id ) && function_exists( 'pll_get_post_language' ) ) {
|
||||
$current_language = pll_get_post_language( $post->ID, $locale ? 'locale' : 'slug' );
|
||||
$post_language = pll_get_post_language( $post->ID, $locale ? 'locale' : 'slug' );
|
||||
if ( $post_language ) {
|
||||
$current_language = $post_language;
|
||||
}
|
||||
}
|
||||
} elseif ( function_exists( 'pll_current_language' ) ) {
|
||||
$pll_language = pll_current_language( $locale ? 'locale' : 'slug' );
|
||||
|
||||
@@ -34,7 +34,7 @@ function relevanssi_spamblock() {
|
||||
$query = urldecode( str_replace( $url_prefix, '', $_SERVER['REQUEST_URI'] ) );
|
||||
}
|
||||
}
|
||||
if ( ! isset( $query ) ) {
|
||||
if ( ! isset( $query ) || is_string( $query ) === false ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Tags: search, relevance, better search
|
||||
Requires at least: 4.9
|
||||
Requires PHP: 7.0
|
||||
Tested up to: 6.4
|
||||
Stable tag: 2.25.0
|
||||
Stable tag: 2.25.1
|
||||
|
||||
Relevanssi Premium replaces the default search with a partial-match search that sorts results by relevance. It also indexes comments and shortcode content.
|
||||
|
||||
@@ -256,6 +256,12 @@ Each document database is full of useless words. All the little words that appea
|
||||
* John Calahan for extensive 2.0 beta testing.
|
||||
|
||||
== Changelog ==
|
||||
= 2.25.1 =
|
||||
* Security fix: Relevanssi had a vulnerability where anyone could access the search logs and click logs. The log export is now protected.
|
||||
* Minor fix: Relevanssi had problems with Polylang when a post or term didn't have language specified. Now Relevanssi handles those situations better.
|
||||
* Minor fix: Post date throttling had a MySQL error that made it replace JOINs instead of concatenating.
|
||||
* Minor fix: The log database table now has an index on session_id, as not having that index can slow down the search a lot.
|
||||
|
||||
= 2.25.0 =
|
||||
* New feature: New filter hook `relevanssi_searchform_dropdown_args` filters the arguments for `wp_dropdown_categories()` in search forms.
|
||||
* Changed behaviour: Search form shortcode taxonomy dropdowns are now sorted alphabetically and not by term ID.
|
||||
@@ -374,42 +380,13 @@ Each document database is full of useless words. All the little words that appea
|
||||
* Minor fix: Negative search terms in AND searches caused problems, but now work better.
|
||||
* Minor fix: Pinning phrases that had the same word more than once (e.g. 'word by word') didn't work. Now it works better.
|
||||
|
||||
= 2.19.1 =
|
||||
* 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.
|
||||
|
||||
= 2.19.0 =
|
||||
* New feature: New CLI command `list_pinned_posts` lists all pinned and unpinned posts.
|
||||
* New feature: New CLI command `list` lists indexed and unindexed posts, taxonomy terms and users.
|
||||
* New feature: You can now look at how the posts appear in the database from the Debugging tab.
|
||||
* New feature: Relevanssi now works with WooCommerce layered navigation filters. The filter post counts should now match the Relevanssi search results.
|
||||
* New feature: You can now export the click tracking logs.
|
||||
* New feature: New function `relevanssi_count_term_occurrances()` can be used to display how many times search terms appear in the database.
|
||||
* Changed behaviour: Relevanssi post update trigger is now on `wp_after_insert_post` instead of `wp_insert_post`. This makes the indexing more reliable and better compatible with other plugins.
|
||||
* Changed behaviour: Previously, throttling searches has been impossible when results are sorted by date. Now if you set Relevanssi to sort by post date from the searching settings, you can enable the throttle and the throttling will make sure to keep the most recent posts. This does not work if you set the `orderby` to `post_date` elsewhere.
|
||||
* Minor fix: Prevents Relevanssi from interfering in fringe cases (including The Event Calendar event search).
|
||||
* Minor fix: Relevanssi added the `highlight` parameter to home page URLs, even though it shouldn't.
|
||||
* Minor fix: Indexing `nav_menu_item` posts is stopped earlier in the process to avoid problems with big menus.
|
||||
* Minor fix: Add support for WooCommerce products attribute lookup table filtering.
|
||||
* Minor fix: Improves Polylang language detection.
|
||||
* Minor fix: Improve excerpts to avoid breaking HTML tags when tags are allowed.
|
||||
* Minor fix: Add support for JetSmartFilters.
|
||||
* Minor fix: With multiple excerpts, sometimes Relevanssi would return no excerpt at all.
|
||||
* Minor fix: If the `sentence` query variable is used to enable phrase searching, Relevanssi now adds quotes to the `highlight` parameter.
|
||||
* Minor fix: Add support for TablePress `table_filter` shortcodes.
|
||||
* Minor fix: Improve WPFD file content indexing support. Relevanssi indexing now happens after the WPFD indexing is done.
|
||||
* Minor fix: User profile update actions now happen at a later priority. This should reduce problems when indexing ACF fields, for example.
|
||||
* Minor fix: Relevanssi now hyphenates long search terms in the User searches page. This prevents long search terms from messing up the display.
|
||||
* Minor fix: Stopped some problems with Did you mean suggestions suggesting the same word if a hyphen was included.
|
||||
* Minor fix: If the API key wasn't set in network settings for a multisite installation, Relevanssi wouldn't fall back to the current site API key setting when indexing attachment content. That works correctly now; still, set the API key on network settings level.
|
||||
* Minor fix: Paging didn't work in admin searches for hierarchical post types (like pages).
|
||||
* Minor fix: Relevanssi doesn't add click tracking or highlight parameters to admin searches anymore.
|
||||
* Minor fix: The search log reset feature now also resets the click tracking log.
|
||||
* Minor fix: In-document highlighting could break certain elements thanks to Relevanssi messing up data attributes.
|
||||
* Minor fix: Relevanssi now recursively runs `relevanssi_block_to_render` and the CSS `relevanssi_noindex` filtering for inner blocks.
|
||||
* Minor fix: Relevanssi redirects now work better with FacetWP searches. Thanks to Jan Willem Oostendorp.
|
||||
|
||||
== Upgrade notice ==
|
||||
= 2.25.1 =
|
||||
* Security hardening, better Polylang support.
|
||||
|
||||
= 2.25.0 =
|
||||
* Improvements to search form shortcode.
|
||||
|
||||
= 2.24.4 =
|
||||
* Fix broken taxonomy indexing.
|
||||
|
||||
@@ -447,10 +424,4 @@ Each document database is full of useless words. All the little words that appea
|
||||
* Bug fixes and small improvements.
|
||||
|
||||
= 2.20.0 =
|
||||
* New features, performance improvements, bug fixes.
|
||||
|
||||
= 2.19.1 =
|
||||
* Disables the WooCommerce layered navigation support by default.
|
||||
|
||||
= 2.19.0 =
|
||||
* Large number of bug fixes and general improvements.
|
||||
* New features, performance improvements, bug fixes.
|
||||
@@ -13,7 +13,7 @@
|
||||
* Plugin Name: Relevanssi Premium
|
||||
* Plugin URI: https://www.relevanssi.com/
|
||||
* Description: This premium plugin replaces WordPress search with a relevance-sorting search.
|
||||
* Version: 2.25.0
|
||||
* Version: 2.25.1
|
||||
* Author: Mikko Saari
|
||||
* Author URI: https://www.mikkosaari.fi/
|
||||
* Text Domain: relevanssi
|
||||
@@ -82,8 +82,8 @@ $relevanssi_variables['content_boost_default'] = 5;
|
||||
$relevanssi_variables['title_boost_default'] = 5;
|
||||
$relevanssi_variables['link_boost_default'] = 0.75;
|
||||
$relevanssi_variables['comment_boost_default'] = 0.75;
|
||||
$relevanssi_variables['database_version'] = 22;
|
||||
$relevanssi_variables['plugin_version'] = '2.25.0';
|
||||
$relevanssi_variables['database_version'] = 23;
|
||||
$relevanssi_variables['plugin_version'] = '2.25.1';
|
||||
$relevanssi_variables['plugin_dir'] = plugin_dir_path( __FILE__ );
|
||||
$relevanssi_variables['plugin_basename'] = plugin_basename( __FILE__ );
|
||||
$relevanssi_variables['file'] = __FILE__;
|
||||
|
||||
Reference in New Issue
Block a user