Relevanssi – A Better Search - Version 4.1.3

Version Description

  • Improvements to meta key sorting.
  • Relevanssi settings page won't let you exclude categories you have restricted the search to.
  • Members plugin compatibility has been improved: it's only used if the 'content permissions' feature has been enabled.
  • The excerpt settings page was a bit buggy.
  • Slimstat analytics is now added to the blocked shortcodes list.
  • New filter: relevanssi_search_form works exactly like get_search_form, but only applies to the Relevanssi shortcode search forms.
  • New JetPack taxonomies and post types have been added to the block list so they won't appear in Relevanssi settings.
Download this release

Release Info

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

Code changes from version 4.1.2 to 4.1.3

lib/admin_scripts.js CHANGED
@@ -15,10 +15,10 @@ jQuery(document).ready(function($) {
15
  jQuery(document).ready(function($){
16
  $('.color-field').wpColorPicker();
17
 
18
- var txtcol_control = $("#relevanssi_txt_col");
19
- var bgcol_control = $("#relevanssi_bg_col");
20
- var class_control = $("#relevanssi_class");
21
- var css_control = $("#relevanssi_css");
22
 
23
  $("#relevanssi_highlight").change(function() {
24
  txtcol_control.addClass('screen-reader-text');
15
  jQuery(document).ready(function($){
16
  $('.color-field').wpColorPicker();
17
 
18
+ var txtcol_control = $("#tr_relevanssi_txt_col");
19
+ var bgcol_control = $("#tr_relevanssi_bg_col");
20
+ var class_control = $("#tr_relevanssi_class");
21
+ var css_control = $("#tr_relevanssi_css");
22
 
23
  $("#relevanssi_highlight").change(function() {
24
  txtcol_control.addClass('screen-reader-text');
lib/common.php CHANGED
@@ -168,12 +168,13 @@ function relevanssi_default_post_ok( $post_ok, $post_id ) {
168
  $post_ok = true;
169
  }
170
 
171
- if ( function_exists( 'members_can_current_user_view_post' ) ) {
172
- // Members.
173
- $post_ok = members_can_current_user_view_post( $post_id );
 
 
174
  }
175
  }
176
-
177
  if ( defined( 'GROUPS_CORE_VERSION' ) ) {
178
  // Groups.
179
  $current_user = wp_get_current_user();
@@ -196,13 +197,6 @@ function relevanssi_default_post_ok( $post_ok, $post_id ) {
196
  // WP JV Post Reading Groups.
197
  $post_ok = wp_jv_prg_user_can_see_a_post( get_current_user_id(), $post_id );
198
  }
199
- if ( class_exists( 'AAM', false ) ) {
200
- $object = AAM::api()->getUser()->getObject( 'post', $post_id );
201
- if ( $object->has( 'frontend.read' ) ) {
202
- // Current user is not allowed to see this post.
203
- $post_ok = false;
204
- }
205
- }
206
  /**
207
  * Filters statuses allowed in admin searches.
208
  *
@@ -246,6 +240,7 @@ function relevanssi_populate_array( $matches ) {
246
  array_push( $ids, $match->doc );
247
  }
248
 
 
249
  $ids = implode( ',', $ids );
250
  $posts = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE id IN ($ids)" ); // WPCS: unprepared SQL ok, no user-generated inputs.
251
 
@@ -493,6 +488,8 @@ function relevanssi_remove_punct( $a ) {
493
  return '';
494
  }
495
 
 
 
496
  $a = html_entity_decode( $a, ENT_QUOTES );
497
  $a = preg_replace( '/<[^>]*>/', ' ', $a );
498
 
@@ -647,7 +644,6 @@ function relevanssi_prevent_default_request( $request, $query ) {
647
  }
648
 
649
  $admin_search_ok = true;
650
-
651
  /**
652
  * Filters the admin search.
653
  *
@@ -1539,3 +1535,96 @@ function relevanssi_sanitize_hex_color( $color ) {
1539
 
1540
  return '';
1541
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  $post_ok = true;
169
  }
170
 
171
+ if ( function_exists( 'members_content_permissions_enabled' ) && function_exists( 'members_can_current_user_view_post' ) ) {
172
+ // Members. Only use, if 'content permissions' feature is enabled.
173
+ if ( members_content_permissions_enabled() ) {
174
+ $post_ok = members_can_current_user_view_post( $post_id );
175
+ }
176
  }
177
  }
 
178
  if ( defined( 'GROUPS_CORE_VERSION' ) ) {
179
  // Groups.
180
  $current_user = wp_get_current_user();
197
  // WP JV Post Reading Groups.
198
  $post_ok = wp_jv_prg_user_can_see_a_post( get_current_user_id(), $post_id );
199
  }
 
 
 
 
 
 
 
200
  /**
201
  * Filters statuses allowed in admin searches.
202
  *
240
  array_push( $ids, $match->doc );
241
  }
242
 
243
+ $ids = array_keys( array_flip( $ids ) ); // Remove duplicate IDs.
244
  $ids = implode( ',', $ids );
245
  $posts = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE id IN ($ids)" ); // WPCS: unprepared SQL ok, no user-generated inputs.
246
 
488
  return '';
489
  }
490
 
491
+ $a = preg_replace( '/&lt;(\d|\s)/', '\1', $a );
492
+
493
  $a = html_entity_decode( $a, ENT_QUOTES );
494
  $a = preg_replace( '/<[^>]*>/', ' ', $a );
495
 
644
  }
645
 
646
  $admin_search_ok = true;
 
647
  /**
648
  * Filters the admin search.
649
  *
1535
 
1536
  return '';
1537
  }
1538
+
1539
+ /**
1540
+ * Displays the list of most common words in the index.
1541
+ *
1542
+ * @global object $wpdb The WP database interface.
1543
+ * @global array $relevanssi_variables The global Relevanssi variables.
1544
+ *
1545
+ * @param int $limit How many words to display, default 25.
1546
+ * @param boolean $wp_cli If true, return just a list of words. If false, print out
1547
+ * HTML code.
1548
+ *
1549
+ * @return array A list of words, if $wp_cli is true.
1550
+ */
1551
+ function relevanssi_common_words( $limit = 25, $wp_cli = false ) {
1552
+ global $wpdb, $relevanssi_variables;
1553
+
1554
+ $plugin = 'relevanssi';
1555
+ if ( RELEVANSSI_PREMIUM ) {
1556
+ $plugin = 'relevanssi-premium';
1557
+ }
1558
+
1559
+ if ( ! is_numeric( $limit ) ) {
1560
+ $limit = 25;
1561
+ }
1562
+
1563
+ $words = $wpdb->get_results( 'SELECT COUNT(*) as cnt, term FROM ' . $relevanssi_variables['relevanssi_table'] . " GROUP BY term ORDER BY cnt DESC LIMIT $limit" ); // WPCS: unprepared sql ok, Relevanssi table name and $limit is numeric.
1564
+
1565
+ if ( ! $wp_cli ) {
1566
+ printf( '<h2>%s</h2>', esc_html__( '25 most common words in the index', 'relevanssi' ) );
1567
+ printf( '<p>%s</p>', esc_html__( "These words are excellent stopword material. A word that appears in most of the posts in the database is quite pointless when searching. This is also an easy way to create a completely new stopword list, if one isn't available in your language. Click the word to add the word to the stopword list. The word will also be removed from the index, so rebuilding the index is not necessary.", 'relevanssi' ) );
1568
+
1569
+ ?>
1570
+ <input type="hidden" name="dowhat" value="add_stopword" />
1571
+ <table class="form-table">
1572
+ <tr>
1573
+ <th scope="row"><?php esc_html_e( 'Stopword Candidates', 'relevanssi' ); ?></th>
1574
+ <td>
1575
+ <ul>
1576
+ <?php
1577
+ $src = plugins_url( 'delete.png', $relevanssi_variables['file'] );
1578
+
1579
+ foreach ( $words as $word ) {
1580
+ $stop = __( 'Add to stopwords', 'relevanssi' );
1581
+ printf( '<li><input style="padding: 0; margin: 0" type="submit" src="%1$s" name="term" value="%2$s"/> (%3$d)</li>', esc_attr( $src ), esc_attr( $word->term ), esc_html( $word->cnt ) );
1582
+ }
1583
+ ?>
1584
+ </ul>
1585
+ </td>
1586
+ </tr>
1587
+ </table>
1588
+ <?php
1589
+
1590
+ }
1591
+
1592
+ return $words;
1593
+ }
1594
+
1595
+ /**
1596
+ * Returns a list of post types Relevanssi does not want to use.
1597
+ *
1598
+ * @return array An array of post type names.
1599
+ */
1600
+ function relevanssi_get_forbidden_post_types() {
1601
+ return array(
1602
+ 'nav_menu_item', // Navigation menu items.
1603
+ 'revision', // Never index revisions.
1604
+ 'acf-field', // Advanced Custom Fields.
1605
+ 'acf-field-group', // Advanced Custom Fields.
1606
+ 'oembed_cache', // Mysterious caches.
1607
+ 'customize_changeset', // Customizer change sets.
1608
+ 'user_request', // User data request.
1609
+ 'custom_css', // Custom CSS data.
1610
+ 'cpt_staff_lst_item', // Staff List.
1611
+ 'cpt_staff_lst', // Staff List.
1612
+ 'wp_block', // Gutenberg block.
1613
+ 'amp_validated_url', // AMP.
1614
+ 'jp_pay_order', // Jetpack.
1615
+ 'jp_pay_product', // Jetpack.
1616
+ );
1617
+ }
1618
+
1619
+ /**
1620
+ * Returns a list of taxonomies Relevanssi does not want to use.
1621
+ *
1622
+ * @return array An array of taxonomy names.
1623
+ */
1624
+ function relevanssi_get_forbidden_taxonomies() {
1625
+ return array(
1626
+ 'nav_menu', // Navigation menus.
1627
+ 'link_category', // Link categories.
1628
+ 'amp_validation_error', // AMP.
1629
+ );
1630
+ }
lib/excerpts-highlights.php CHANGED
@@ -21,7 +21,7 @@ function relevanssi_the_excerpt() {
21
  if ( ! post_password_required( $post ) ) {
22
  echo '<p>' . $post->post_excerpt . '</p>'; // WPCS: XSS ok.
23
  } else {
24
- echo esc_html__( 'There is no excerpt because this is a protected post.' );
25
  }
26
  }
27
 
21
  if ( ! post_password_required( $post ) ) {
22
  echo '<p>' . $post->post_excerpt . '</p>'; // WPCS: XSS ok.
23
  } else {
24
+ esc_html_e( 'There is no excerpt because this is a protected post.', 'relevanssi' );
25
  }
26
  }
27
 
lib/indexing.php CHANGED
@@ -864,6 +864,7 @@ function relevanssi_index_doc( $index_post, $remove_first = false, $custom_field
864
  'swpm_protected', // Simple Membership Partially Protected content.
865
  'gravityform', // Gravity Forms.
866
  'sdm_latest_downloads', // SDM Simple Download Monitor.
 
867
  );
868
 
869
  $disable_shortcodes = get_option( 'relevanssi_disable_shortcodes' );
864
  'swpm_protected', // Simple Membership Partially Protected content.
865
  'gravityform', // Gravity Forms.
866
  'sdm_latest_downloads', // SDM Simple Download Monitor.
867
+ 'slimstat', // Slimstat Analytics.
868
  );
869
 
870
  $disable_shortcodes = get_option( 'relevanssi_disable_shortcodes' );
lib/interface.php CHANGED
@@ -317,8 +317,22 @@ function update_relevanssi_options() {
317
 
318
  if ( isset( $_REQUEST['relevanssi_excat'] ) ) {
319
  if ( is_array( $_REQUEST['relevanssi_excat'] ) ) {
320
- $csv_cats = implode( ',', $_REQUEST['relevanssi_excat'] );
321
- update_option( 'relevanssi_excat', $csv_cats );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  }
323
  } else {
324
  if ( isset( $_REQUEST['relevanssi_excat_active'] ) ) {
@@ -781,8 +795,8 @@ function relevanssi_options_form() {
781
  <a href="<?php echo esc_attr( $this_page ); ?>&amp;tab=stopwords" class="nav-tab <?php echo 'stopwords' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Stopwords', 'relevanssi' ); ?></a>
782
  <a href="<?php echo esc_attr( $this_page ); ?>&amp;tab=redirects" class="nav-tab <?php echo 'redirects' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Redirects', 'relevanssi' ); ?></a>
783
  <?php if ( RELEVANSSI_PREMIUM ) : ?>
 
784
  <a href="<?php echo esc_attr( $this_page ); ?>&amp;tab=importexport" class="nav-tab <?php echo 'importexport' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Import / Export options', 'relevanssi' ); ?></a>
785
- <a href="<?php echo esc_attr( $this_page ); ?>&amp;tab=search" class="nav-tab <?php echo 'search' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php echo esc_html_x( 'Search', 'noun', 'relevanssi' ); ?></a>
786
  <?php endif; ?>
787
  </h2>
788
 
@@ -834,6 +848,12 @@ function relevanssi_options_form() {
834
  relevanssi_import_export_tab();
835
  }
836
  }
 
 
 
 
 
 
837
  if ( 'redirects' === $active_tab ) {
838
  if ( ! RELEVANSSI_PREMIUM ) {
839
  $display_save_button = false;
317
 
318
  if ( isset( $_REQUEST['relevanssi_excat'] ) ) {
319
  if ( is_array( $_REQUEST['relevanssi_excat'] ) ) {
320
+ $array_excats = $_REQUEST['relevanssi_excat'];
321
+ $cat = get_option( 'relevanssi_cat' );
322
+ if ( $cat ) {
323
+ $array_cats = explode( ',', $cat );
324
+ $valid_excats = array();
325
+ foreach ( $array_excats as $excat ) {
326
+ if ( ! in_array( $excat, $array_cats, true ) ) {
327
+ $valid_excats[] = $excat;
328
+ }
329
+ }
330
+ } else {
331
+ // No category restrictions, so everything's good.
332
+ $valid_excats = $array_excats;
333
+ }
334
+ $csv_excats = implode( ',', $valid_excats );
335
+ update_option( 'relevanssi_excat', $csv_excats );
336
  }
337
  } else {
338
  if ( isset( $_REQUEST['relevanssi_excat_active'] ) ) {
795
  <a href="<?php echo esc_attr( $this_page ); ?>&amp;tab=stopwords" class="nav-tab <?php echo 'stopwords' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Stopwords', 'relevanssi' ); ?></a>
796
  <a href="<?php echo esc_attr( $this_page ); ?>&amp;tab=redirects" class="nav-tab <?php echo 'redirects' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Redirects', 'relevanssi' ); ?></a>
797
  <?php if ( RELEVANSSI_PREMIUM ) : ?>
798
+ <a href="<?php echo esc_attr( $this_page ); ?>&amp;tab=related" class="nav-tab <?php echo 'related' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Related', 'relevanssi' ); ?></a>
799
  <a href="<?php echo esc_attr( $this_page ); ?>&amp;tab=importexport" class="nav-tab <?php echo 'importexport' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Import / Export options', 'relevanssi' ); ?></a>
 
800
  <?php endif; ?>
801
  </h2>
802
 
848
  relevanssi_import_export_tab();
849
  }
850
  }
851
+ if ( 'related' === $active_tab ) {
852
+ if ( RELEVANSSI_PREMIUM ) {
853
+ require_once dirname( $relevanssi_variables['file'] ) . '/premium/tabs/related-tab.php';
854
+ relevanssi_related_tab();
855
+ }
856
+ }
857
  if ( 'redirects' === $active_tab ) {
858
  if ( ! RELEVANSSI_PREMIUM ) {
859
  $display_save_button = false;
lib/search.php CHANGED
@@ -702,6 +702,7 @@ function relevanssi_search( $args ) {
702
  foreach ( $matches as $match ) {
703
  $existing_ids[] = $match->doc;
704
  }
 
705
  $existing_ids = implode( ',', $existing_ids );
706
  $query = "SELECT relevanssi.*, relevanssi.title * $title_boost +
707
  relevanssi.content * $content_boost + relevanssi.comment * $comment_boost +
@@ -723,6 +724,7 @@ function relevanssi_search( $args ) {
723
  $existing_items[] = $match->item;
724
  }
725
  }
 
726
  $existing_items = implode( ',', $existing_items );
727
  if ( ! empty( $existing_items ) ) {
728
  $existing_items = "AND relevanssi.item NOT IN ($existing_items) ";
@@ -919,10 +921,12 @@ function relevanssi_search( $args ) {
919
  $scores[ $match->doc ] = 0;
920
  }
921
  $scores[ $match->doc ] += $match->weight;
922
- if ( is_numeric( $match->doc ) ) {
 
 
923
  // This is to weed out taxonomies and users (t_XXX, u_XXX).
924
  $include_these_posts[ $match->doc ] = true;
925
- } elseif ( 0 !== intval( $match->item ) ) {
926
  $include_these_items[ $match->item ] = true;
927
  }
928
  }
702
  foreach ( $matches as $match ) {
703
  $existing_ids[] = $match->doc;
704
  }
705
+ $existing_ids = array_keys( array_flip( $existing_ids ) );
706
  $existing_ids = implode( ',', $existing_ids );
707
  $query = "SELECT relevanssi.*, relevanssi.title * $title_boost +
708
  relevanssi.content * $content_boost + relevanssi.comment * $comment_boost +
724
  $existing_items[] = $match->item;
725
  }
726
  }
727
+ $existing_items = array_keys( array_flip( $existing_items ) );
728
  $existing_items = implode( ',', $existing_items );
729
  if ( ! empty( $existing_items ) ) {
730
  $existing_items = "AND relevanssi.item NOT IN ($existing_items) ";
921
  $scores[ $match->doc ] = 0;
922
  }
923
  $scores[ $match->doc ] += $match->weight;
924
+ // For AND searches, add the posts to the $include_these lists, so that
925
+ // nothing is missed.
926
+ if ( is_numeric( $match->doc ) && 'AND' === $operator ) {
927
  // This is to weed out taxonomies and users (t_XXX, u_XXX).
928
  $include_these_posts[ $match->doc ] = true;
929
+ } elseif ( 0 !== intval( $match->item ) && 'AND' === $operator ) {
930
  $include_these_items[ $match->item ] = true;
931
  }
932
  }
lib/shortcodes.php CHANGED
@@ -117,5 +117,10 @@ function relevanssi_search_form( $atts ) {
117
  }
118
  $form = str_replace( '</form>', implode( "\n", $additional_fields ) . '</form>', $form );
119
  }
120
- return $form;
 
 
 
 
 
121
  }
117
  }
118
  $form = str_replace( '</form>', implode( "\n", $additional_fields ) . '</form>', $form );
119
  }
120
+ /**
121
+ * Filters the Relevanssi shortcode search form before it's used.
122
+ *
123
+ * @param string The form HTML code.
124
+ */
125
+ return apply_filters( 'relevanssi_search_form', $form );
126
  }
lib/sorting.php CHANGED
@@ -155,14 +155,25 @@ function relevanssi_get_compare_values( $key, $item_1, $item_2 ) {
155
  global $wp_query;
156
  // Get the name of the field from the global WP_Query.
157
  $key = $wp_query->query_vars['meta_key'];
 
158
  if ( empty( $key ) ) {
159
  // If empty, try the Relevanssi meta_query.
160
  global $relevanssi_meta_query;
161
- if ( isset( $relevanssi_meta_query[0]['key'] ) ) {
162
- // Take from index 0, because using 'meta_value' requires the use of
163
- // 'meta_key', which means there'll be just one key.
164
- $key = $relevanssi_meta_query[0]['key'];
165
- } else {
 
 
 
 
 
 
 
 
 
 
166
  // The key is not set.
167
  return array( '', '' );
168
  }
155
  global $wp_query;
156
  // Get the name of the field from the global WP_Query.
157
  $key = $wp_query->query_vars['meta_key'];
158
+
159
  if ( empty( $key ) ) {
160
  // If empty, try the Relevanssi meta_query.
161
  global $relevanssi_meta_query;
162
+ foreach ( $relevanssi_meta_query as $meta_row ) {
163
+ // There may be many rows. Choose the one where there's just key
164
+ // and no value.
165
+ if ( ! is_array( $meta_row ) ) {
166
+ continue;
167
+ }
168
+ if ( isset( $meta_row['value'] ) ) {
169
+ continue;
170
+ }
171
+ if ( isset( $meta_row['key'] ) ) {
172
+ $key = $meta_row['key'];
173
+ }
174
+ }
175
+
176
+ if ( empty( $key ) ) {
177
  // The key is not set.
178
  return array( '', '' );
179
  }
lib/stopwords.php CHANGED
@@ -110,7 +110,7 @@ function relevanssi_add_stopword( $term, $verbose = true ) {
110
  printf( "<div id='message' class='updated fade'><p>%s</p></div>", sprintf( esc_html__( "Term '%s' added to stopwords!", 'relevanssi' ), esc_html( stripslashes( $term ) ) ) );
111
  } else {
112
  // Translators: %s is the stopword.
113
- printf( esc_html__( "<div id='message' class='updated fade'><p>Couldn't add term '%s' to stopwords!</p></div>", 'relevanssi' ), esc_html( stripslashes( $term ) ) );
114
  }
115
  }
116
  }
@@ -137,7 +137,7 @@ function relevanssi_add_single_stopword( $term ) {
137
  $term = stripslashes( $term );
138
  $term = esc_sql( $wpdb->esc_like( $term ) );
139
 
140
- $success = $wpdb->query( $wpdb->prepare( 'INSERT INTO ' . $relevanssi_variables['stopword_table'] . ' (stopword) VALUES (%s)', $term ) ); // WPCS: unprepared SQL ok, Relevanssi table name.
141
 
142
  if ( $success ) {
143
  // Remove from index.
110
  printf( "<div id='message' class='updated fade'><p>%s</p></div>", sprintf( esc_html__( "Term '%s' added to stopwords!", 'relevanssi' ), esc_html( stripslashes( $term ) ) ) );
111
  } else {
112
  // Translators: %s is the stopword.
113
+ printf( "<div id='message' class='updated fade'><p>%s</p></div>", sprintf( esc_html__( "Couldn't add term '%s' to stopwords!", 'relevanssi' ), esc_html( stripslashes( $term ) ) ) );
114
  }
115
  }
116
  }
137
  $term = stripslashes( $term );
138
  $term = esc_sql( $wpdb->esc_like( $term ) );
139
 
140
+ $success = $wpdb->query( $wpdb->prepare( 'INSERT IGNORE INTO ' . $relevanssi_variables['stopword_table'] . ' (stopword) VALUES (%s)', $term ) ); // WPCS: unprepared SQL ok, Relevanssi table name.
141
 
142
  if ( $success ) {
143
  // Remove from index.
lib/tabs/excerpts-tab.php CHANGED
@@ -243,7 +243,7 @@ function relevanssi_excerpts_tab() {
243
  <p class="description"><?php esc_html_e( 'Requires custom snippets to work.', 'relevanssi' ); ?></p>
244
  </td>
245
  </tr>
246
- <tr id="relevanssi_txt_col" class='<?php echo esc_attr( $txt_col_display ); ?>'>
247
  <th scope="row">
248
  <label for="relevanssi_txt_col"><?php esc_html_e( 'Text color', 'relevanssi' ); ?></label>
249
  </th>
@@ -257,7 +257,7 @@ function relevanssi_excerpts_tab() {
257
  />
258
  </td>
259
  </tr>
260
- <tr id="relevanssi_bg_col" class=' <?php echo esc_attr( $bg_col_display ); ?>'>
261
  <th scope="row">
262
  <label for="relevanssi_bg_col"><?php esc_html_e( 'Background color', 'relevanssi' ); ?></label>
263
  </th>
@@ -271,7 +271,7 @@ function relevanssi_excerpts_tab() {
271
  />
272
  </td>
273
  </tr>
274
- <tr id="relevanssi_css" class=' <?php echo esc_attr( $css_display ); ?>'>
275
  <th scope="row">
276
  <label for='relevanssi_css'><?php esc_html_e( 'CSS style for highlights', 'relevanssi' ); ?></label>
277
  </th>
@@ -287,7 +287,7 @@ function relevanssi_excerpts_tab() {
287
  <p class="description"><?php printf( esc_html__( 'The highlights will be wrapped in a %s with this CSS in the style parameter.', 'relevanssi' ), '&lt;span&gt;' ); ?></p>
288
  </td>
289
  </tr>
290
- <tr id="relevanssi_class" class=' <?php echo esc_attr( $class_display ); ?>'>
291
  <th scope="row">
292
  <label for='relevanssi_class'><?php esc_html_e( 'CSS class for highlights', 'relevanssi' ); ?></label>
293
  </th>
243
  <p class="description"><?php esc_html_e( 'Requires custom snippets to work.', 'relevanssi' ); ?></p>
244
  </td>
245
  </tr>
246
+ <tr id="tr_relevanssi_txt_col" class='<?php echo esc_attr( $txt_col_display ); ?>'>
247
  <th scope="row">
248
  <label for="relevanssi_txt_col"><?php esc_html_e( 'Text color', 'relevanssi' ); ?></label>
249
  </th>
257
  />
258
  </td>
259
  </tr>
260
+ <tr id="tr_relevanssi_bg_col" class=' <?php echo esc_attr( $bg_col_display ); ?>'>
261
  <th scope="row">
262
  <label for="relevanssi_bg_col"><?php esc_html_e( 'Background color', 'relevanssi' ); ?></label>
263
  </th>
271
  />
272
  </td>
273
  </tr>
274
+ <tr id="tr_relevanssi_css" class=' <?php echo esc_attr( $css_display ); ?>'>
275
  <th scope="row">
276
  <label for='relevanssi_css'><?php esc_html_e( 'CSS style for highlights', 'relevanssi' ); ?></label>
277
  </th>
287
  <p class="description"><?php printf( esc_html__( 'The highlights will be wrapped in a %s with this CSS in the style parameter.', 'relevanssi' ), '&lt;span&gt;' ); ?></p>
288
  </td>
289
  </tr>
290
+ <tr id="tr_relevanssi_class" class=' <?php echo esc_attr( $class_display ); ?>'>
291
  <th scope="row">
292
  <label for='relevanssi_class'><?php esc_html_e( 'CSS class for highlights', 'relevanssi' ); ?></label>
293
  </th>
lib/tabs/indexing-tab.php CHANGED
@@ -174,7 +174,7 @@ function relevanssi_indexing_tab() {
174
  $public_types = array_merge( $pt_1, $pt_2 );
175
  $post_types = get_post_types();
176
  foreach ( $post_types as $type ) {
177
- if ( in_array( $type, array( 'nav_menu_item', 'revision', 'acf-field', 'acf-field-group', 'oembed_cache', 'customize_changeset', 'custom_css' ), true ) ) {
178
  continue;
179
  }
180
  $checked = '';
@@ -226,7 +226,7 @@ function relevanssi_indexing_tab() {
226
  <?php
227
  $taxos = get_taxonomies( '', 'objects' );
228
  foreach ( $taxos as $taxonomy ) {
229
- if ( in_array( $taxonomy->name, array( 'nav_menu', 'link_category' ), true ) ) {
230
  continue;
231
  }
232
  $checked = '';
174
  $public_types = array_merge( $pt_1, $pt_2 );
175
  $post_types = get_post_types();
176
  foreach ( $post_types as $type ) {
177
+ if ( in_array( $type, relevanssi_get_forbidden_post_types(), true ) ) {
178
  continue;
179
  }
180
  $checked = '';
226
  <?php
227
  $taxos = get_taxonomies( '', 'objects' );
228
  foreach ( $taxos as $taxonomy ) {
229
+ if ( in_array( $taxonomy->name, relevanssi_get_forbidden_taxonomies(), true ) ) {
230
  continue;
231
  }
232
  $checked = '';
lib/tabs/overview-tab.php CHANGED
@@ -24,7 +24,7 @@ function relevanssi_overview_tab() {
24
  <table class="form-table">
25
 
26
  <?php
27
- if ( ! is_multisite() && function_exists( 'relevanssi_form_api_key' ) ) {
28
  relevanssi_form_api_key();
29
  }
30
  if ( function_exists( 'relevanssi_form_hide_post_controls' ) ) {
@@ -106,10 +106,11 @@ function relevanssi_overview_tab() {
106
  <td>
107
  <p><a href="https://www.relevanssi.com/buy-premium"><?php esc_html_e( 'Buy Relevanssi Premium now', 'relevanssi' ); ?></a> –
108
  <?php // Translators: %1$s is the coupon code, %2$s is the year it expires. ?>
109
- <?php printf( esc_html__( 'use coupon code %1$s for 20%% discount (valid at least until the end of %2$s)', 'relevanssi' ), '<strong>FREE2018</strong>', '2018' ); ?></p>
110
  <p><?php esc_html_e( 'Here are some improvements Relevanssi Premium offers:', 'relevanssi' ); ?></p>
111
  <ul class="relevanssi_ul">
112
  <li><?php esc_html_e( 'PDF content indexing', 'relevanssi' ); ?></li>
 
113
  <li><?php esc_html_e( 'Index and search user profile pages', 'relevanssi' ); ?></li>
114
  <li><?php esc_html_e( 'Index and search taxonomy term pages', 'relevanssi' ); ?></li>
115
  <li><?php esc_html_e( 'Multisite searches across many subsites', 'relevanssi' ); ?></li>
@@ -118,6 +119,7 @@ function relevanssi_overview_tab() {
118
  <li><?php esc_html_e( 'Internal link anchors can be search terms for the target posts', 'relevanssi' ); ?></li>
119
  <li><?php esc_html_e( 'Index and search any columns in the wp_posts database', 'relevanssi' ); ?></li>
120
  <li><?php esc_html_e( 'Hide Relevanssi branding from the User Searches page on a client installation', 'relevanssi' ); ?></li>
 
121
  </ul>
122
  </td>
123
  </tr>
24
  <table class="form-table">
25
 
26
  <?php
27
+ if ( ! is_plugin_active_for_network( plugin_basename( $relevanssi_variables['file'] ) ) && function_exists( 'relevanssi_form_api_key' ) ) {
28
  relevanssi_form_api_key();
29
  }
30
  if ( function_exists( 'relevanssi_form_hide_post_controls' ) ) {
106
  <td>
107
  <p><a href="https://www.relevanssi.com/buy-premium"><?php esc_html_e( 'Buy Relevanssi Premium now', 'relevanssi' ); ?></a> –
108
  <?php // Translators: %1$s is the coupon code, %2$s is the year it expires. ?>
109
+ <?php printf( esc_html__( 'use coupon code %1$s for 20%% discount (valid at least until the end of %2$s)', 'relevanssi' ), '<strong>FREE2019</strong>', '2019' ); ?></p>
110
  <p><?php esc_html_e( 'Here are some improvements Relevanssi Premium offers:', 'relevanssi' ); ?></p>
111
  <ul class="relevanssi_ul">
112
  <li><?php esc_html_e( 'PDF content indexing', 'relevanssi' ); ?></li>
113
+ <li><?php esc_html_e( 'A Related posts feature', 'relevanssi' ); ?></li>
114
  <li><?php esc_html_e( 'Index and search user profile pages', 'relevanssi' ); ?></li>
115
  <li><?php esc_html_e( 'Index and search taxonomy term pages', 'relevanssi' ); ?></li>
116
  <li><?php esc_html_e( 'Multisite searches across many subsites', 'relevanssi' ); ?></li>
119
  <li><?php esc_html_e( 'Internal link anchors can be search terms for the target posts', 'relevanssi' ); ?></li>
120
  <li><?php esc_html_e( 'Index and search any columns in the wp_posts database', 'relevanssi' ); ?></li>
121
  <li><?php esc_html_e( 'Hide Relevanssi branding from the User Searches page on a client installation', 'relevanssi' ); ?></li>
122
+ <li><?php esc_html_e( 'Redirect search queries to custom URLs', 'relevanssi' ); ?></li>
123
  </ul>
124
  </td>
125
  </tr>
lib/tabs/stopwords-tab.php CHANGED
@@ -100,59 +100,3 @@ function relevanssi_show_stopwords() {
100
 
101
  <?php
102
  }
103
-
104
- /**
105
- * Displays the list of most common words in the index.
106
- *
107
- * @global object $wpdb The WP database interface.
108
- * @global array $relevanssi_variables The global Relevanssi variables.
109
- *
110
- * @param int $limit How many words to display, default 25.
111
- * @param boolean $wp_cli If true, return just a list of words. If false, print out
112
- * HTML code.
113
- *
114
- * @return array A list of words, if $wp_cli is true.
115
- */
116
- function relevanssi_common_words( $limit = 25, $wp_cli = false ) {
117
- global $wpdb, $relevanssi_variables;
118
-
119
- $plugin = 'relevanssi';
120
- if ( RELEVANSSI_PREMIUM ) {
121
- $plugin = 'relevanssi-premium';
122
- }
123
-
124
- if ( ! is_numeric( $limit ) ) {
125
- $limit = 25;
126
- }
127
-
128
- $words = $wpdb->get_results( 'SELECT COUNT(*) as cnt, term FROM ' . $relevanssi_variables['relevanssi_table'] . " GROUP BY term ORDER BY cnt DESC LIMIT $limit" ); // WPCS: unprepared sql ok, Relevanssi table name and $limit is numeric.
129
-
130
- if ( ! $wp_cli ) {
131
- printf( '<h2>%s</h2>', esc_html__( '25 most common words in the index', 'relevanssi' ) );
132
- printf( '<p>%s</p>', esc_html__( "These words are excellent stopword material. A word that appears in most of the posts in the database is quite pointless when searching. This is also an easy way to create a completely new stopword list, if one isn't available in your language. Click the word to add the word to the stopword list. The word will also be removed from the index, so rebuilding the index is not necessary.", 'relevanssi' ) );
133
-
134
- ?>
135
- <input type="hidden" name="dowhat" value="add_stopword" />
136
- <table class="form-table">
137
- <tr>
138
- <th scope="row"><?php esc_html_e( 'Stopword Candidates', 'relevanssi' ); ?></th>
139
- <td>
140
- <ul>
141
- <?php
142
- $src = plugins_url( 'delete.png', $relevanssi_variables['file'] );
143
-
144
- foreach ( $words as $word ) {
145
- $stop = __( 'Add to stopwords', 'relevanssi' );
146
- printf( '<li><input style="padding: 0; margin: 0" type="submit" src="%1$s" name="term" value="%2$s"/> (%3$d)</li>', esc_attr( $src ), esc_attr( $word->term ), esc_html( $word->cnt ) );
147
- }
148
- ?>
149
- </ul>
150
- </td>
151
- </tr>
152
- </table>
153
- <?php
154
-
155
- }
156
-
157
- return $words;
158
- }
100
 
101
  <?php
102
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: msaari
3
  Donate link: https://www.relevanssi.com/buy-premium/
4
  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.1.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -17,7 +17,7 @@ Relevanssi replaces the standard WordPress search with a better search engine, w
17
 
18
  This is the free version of Relevanssi. There's also Relevanssi Premium, which has added features. For more information about Premium, see [Relevanssi.com](https://www.relevanssi.com/).
19
 
20
- Do note that using Relevanssi may require large amounts (hundreds of megabytes) of database space (for a reasonable estimate, multiply the size of your `wp_posts database table by three). If your hosting setup has a limited amount of space for database tables, using Relevanssi may cause problems. In those cases use of Relevanssi cannot be recommended.
21
 
22
  = Key features =
23
  * Search results sorted in the order of relevance, not by date.
@@ -56,6 +56,7 @@ Do note that using Relevanssi may require large amounts (hundreds of megabytes)
56
  * Highlighting search terms for visitors from external search engines.
57
  * Export and import settings.
58
  * [WP CLI commands](https://www.relevanssi.com/user-manual/wp-cli/).
 
59
 
60
  = Relevanssi in Facebook =
61
  You can find [Relevanssi in Facebook](https://www.facebook.com/relevanssi).
@@ -129,6 +130,14 @@ Each document database is full of useless words. All the little words that appea
129
  * John Calahan for extensive 4.0 beta testing.
130
 
131
  == Changelog ==
 
 
 
 
 
 
 
 
132
 
133
  = 4.1.2 =
134
  * Choosing "CSS Style" for highlighting was not possible. That is now fixed.
@@ -173,6 +182,8 @@ Each document database is full of useless words. All the little words that appea
173
  * WP Search Suggest compatibility added.
174
 
175
  == Upgrade notice ==
 
 
176
 
177
  = 4.1.2 =
178
  * Better compatibility with Gutenberg, new features.
3
  Donate link: https://www.relevanssi.com/buy-premium/
4
  Tags: search, relevance, better search
5
  Requires at least: 4.0
6
+ Tested up to: 5.0.3
7
  Requires PHP: 5.6
8
+ Stable tag: 4.1.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
17
 
18
  This is the free version of Relevanssi. There's also Relevanssi Premium, which has added features. For more information about Premium, see [Relevanssi.com](https://www.relevanssi.com/).
19
 
20
+ Do note that using Relevanssi may require large amounts (hundreds of megabytes) of database space (for a reasonable estimate, multiply the size of your `wp_posts` database table by three). If your hosting setup has a limited amount of space for database tables, using Relevanssi may cause problems. In those cases use of Relevanssi cannot be recommended.
21
 
22
  = Key features =
23
  * Search results sorted in the order of relevance, not by date.
56
  * Highlighting search terms for visitors from external search engines.
57
  * Export and import settings.
58
  * [WP CLI commands](https://www.relevanssi.com/user-manual/wp-cli/).
59
+ * Related posts.
60
 
61
  = Relevanssi in Facebook =
62
  You can find [Relevanssi in Facebook](https://www.facebook.com/relevanssi).
130
  * John Calahan for extensive 4.0 beta testing.
131
 
132
  == Changelog ==
133
+ = 4.1.3 =
134
+ * Improvements to meta key sorting.
135
+ * Relevanssi settings page won't let you exclude categories you have restricted the search to.
136
+ * Members plugin compatibility has been improved: it's only used if the 'content permissions' feature has been enabled.
137
+ * The excerpt settings page was a bit buggy.
138
+ * Slimstat analytics is now added to the blocked shortcodes list.
139
+ * New filter: `relevanssi_search_form` works exactly like `get_search_form`, but only applies to the Relevanssi shortcode search forms.
140
+ * New JetPack taxonomies and post types have been added to the block list so they won't appear in Relevanssi settings.
141
 
142
  = 4.1.2 =
143
  * Choosing "CSS Style" for highlighting was not possible. That is now fixed.
182
  * WP Search Suggest compatibility added.
183
 
184
  == Upgrade notice ==
185
+ = 4.1.3 =
186
+ * Small improvements here and there.
187
 
188
  = 4.1.2 =
189
  * Better compatibility with Gutenberg, new features.
relevanssi.php CHANGED
@@ -13,14 +13,14 @@
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.1.2
17
  * Author: Mikko Saari
18
  * Author URI: http://www.mikkosaari.fi/
19
  * Text Domain: relevanssi
20
  */
21
 
22
  /**
23
- * Copyright 2018 Mikko Saari (email: mikko@mikkosaari.fi)
24
  * This file is part of Relevanssi, a search plugin for WordPress.
25
  *
26
  * Relevanssi is free software: you can redistribute it and/or modify
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.1.3
17
  * Author: Mikko Saari
18
  * Author URI: http://www.mikkosaari.fi/
19
  * Text Domain: relevanssi
20
  */
21
 
22
  /**
23
+ * Copyright 2019 Mikko Saari (email: mikko@mikkosaari.fi)
24
  * This file is part of Relevanssi, a search plugin for WordPress.
25
  *
26
  * Relevanssi is free software: you can redistribute it and/or modify
relevanssi.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Relevanssi\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2018-12-11 14:06+0200\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Mikko Saari <mikko@mikkosaari.fi>\n"
8
  "Language-Team: \n"
@@ -12,7 +12,7 @@ msgstr ""
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "X-Poedit-KeywordsList: _e;__;esc_html__;esc_html_e;_n\n"
14
  "X-Poedit-Basepath: .\n"
15
- "X-Generator: Poedit 2.2\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
  "X-Poedit-SearchPath-1: lib\n"
18
 
@@ -50,7 +50,29 @@ msgstr ""
50
  msgid "hide"
51
  msgstr ""
52
 
53
- #: lib/contextual-help.php:24 lib/interface.php:777
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  #: lib/tabs/overview-tab.php:56
55
  msgid "Searching"
56
  msgstr ""
@@ -354,7 +376,7 @@ msgid ""
354
  "extension."
355
  msgstr ""
356
 
357
- #: lib/init.php:186 lib/init.php:187 lib/interface.php:439
358
  #: lib/tabs/logging-tab.php:47
359
  msgid "User searches"
360
  msgstr ""
@@ -379,266 +401,270 @@ msgstr ""
379
  msgid "Relevanssi Premium Search Options"
380
  msgstr ""
381
 
382
- #: lib/interface.php:441
383
  msgid "Relevanssi User Searches"
384
  msgstr ""
385
 
386
- #: lib/interface.php:464
387
  msgid "Enable query logging to see stats here."
388
  msgstr ""
389
 
390
- #: lib/interface.php:476
391
  msgid "Admin Search"
392
  msgstr ""
393
 
394
- #: lib/interface.php:506
395
  msgid "Logs clear!"
396
  msgstr ""
397
 
398
- #: lib/interface.php:508
399
  msgid "Clearing the logs failed."
400
  msgstr ""
401
 
402
- #: lib/interface.php:542
403
  msgid "Total Searches"
404
  msgstr ""
405
 
406
- #: lib/interface.php:544
407
  msgid "Totals"
408
  msgstr ""
409
 
410
- #: lib/interface.php:548
411
  msgid "Common Queries"
412
  msgstr ""
413
 
414
- #: lib/interface.php:558
415
  #, php-format
416
  msgid ""
417
  "Here you can see the %d most common user search queries, how many times "
418
  "those queries were made and how many results were found for those queries."
419
  msgstr ""
420
 
421
- #: lib/interface.php:562 lib/interface.php:584 lib/interface.php:625
422
  msgid "Today and yesterday"
423
  msgstr ""
424
 
425
- #: lib/interface.php:565 lib/interface.php:571 lib/interface.php:576
426
- #: lib/interface.php:593
427
  #, php-format
428
  msgid "Last %d days"
429
  msgstr ""
430
 
431
- #: lib/interface.php:581
432
  msgid "Unsuccessful Queries"
433
  msgstr ""
434
 
435
- #: lib/interface.php:588 lib/interface.php:626
436
  msgid "Last 7 days"
437
  msgstr ""
438
 
439
- #: lib/interface.php:599
440
  msgid "Reset Logs"
441
  msgstr ""
442
 
443
- #: lib/interface.php:603
444
  #, php-format
445
  msgid "To reset the logs, type \"reset\" into the box here %1$s and click %2$s"
446
  msgstr ""
447
 
448
- #: lib/interface.php:627
449
  msgid "Last 30 days"
450
  msgstr ""
451
 
452
- #: lib/interface.php:628
453
  msgid "Forever"
454
  msgstr ""
455
 
456
- #: lib/interface.php:636
457
  msgid "When"
458
  msgstr ""
459
 
460
- #: lib/interface.php:636
461
  msgid "Searches"
462
  msgstr ""
463
 
464
- #: lib/interface.php:693 lib/log.php:163
465
  msgid "Query"
466
  msgstr ""
467
 
468
- #: lib/interface.php:693
469
  msgid "Hits"
470
  msgstr ""
471
 
472
- #: lib/interface.php:774
473
  msgid "Overview"
474
  msgstr ""
475
 
476
- #: lib/interface.php:775 lib/tabs/overview-tab.php:44
477
  msgid "Indexing"
478
  msgstr ""
479
 
480
- #: lib/interface.php:776
481
  msgid "Attachments"
482
  msgstr ""
483
 
484
- #: lib/interface.php:778
485
  msgid "Logging"
486
  msgstr ""
487
 
488
- #: lib/interface.php:779 lib/tabs/overview-tab.php:60
489
  msgid "Excerpts and highlights"
490
  msgstr ""
491
 
492
- #: lib/interface.php:780 lib/tabs/synonyms-tab.php:25
493
  #: lib/tabs/synonyms-tab.php:30
494
  msgid "Synonyms"
495
  msgstr ""
496
 
497
- #: lib/interface.php:781 lib/tabs/stopwords-tab.php:18
498
  msgid "Stopwords"
499
  msgstr ""
500
 
501
- #: lib/interface.php:782 lib/tabs/redirects-tab.php:18
502
  msgid "Redirects"
503
  msgstr ""
504
 
505
- #: lib/interface.php:784
 
 
 
 
506
  msgid "Import / Export options"
507
  msgstr ""
508
 
509
- #: lib/interface.php:898
510
  msgid "Click OK to copy Relevanssi options to all subsites"
511
  msgstr ""
512
 
513
- #: lib/interface.php:899
514
  msgid "Are you sure you want to remove all stopwords?"
515
  msgstr ""
516
 
517
- #: lib/interface.php:900
518
  msgid "Wiping out the index..."
519
  msgstr ""
520
 
521
- #: lib/interface.php:901
522
  msgid "Done."
523
  msgstr ""
524
 
525
- #: lib/interface.php:902
526
  msgid "Indexing users..."
527
  msgstr ""
528
 
529
- #: lib/interface.php:903
530
  msgid "Indexing the following taxonomies:"
531
  msgstr ""
532
 
533
- #: lib/interface.php:904
534
  msgid "Indexing attachments..."
535
  msgstr ""
536
 
537
- #: lib/interface.php:905
538
  msgid "Counting posts..."
539
  msgstr ""
540
 
541
- #: lib/interface.php:906
542
  msgid "Counting taxonomy terms..."
543
  msgstr ""
544
 
545
- #: lib/interface.php:907
546
  msgid "Counting users..."
547
  msgstr ""
548
 
549
- #: lib/interface.php:908
550
  msgid "Counting attachments..."
551
  msgstr ""
552
 
553
- #: lib/interface.php:909
554
  msgid "posts found."
555
  msgstr ""
556
 
557
- #: lib/interface.php:910
558
  msgid "taxonomy terms found."
559
  msgstr ""
560
 
561
- #: lib/interface.php:911
562
  msgid "users found."
563
  msgstr ""
564
 
565
- #: lib/interface.php:912
566
  msgid "attachments found."
567
  msgstr ""
568
 
569
- #: lib/interface.php:913
570
  msgid "Taxonomy term indexing is disabled."
571
  msgstr ""
572
 
573
- #: lib/interface.php:914
574
  msgid "User indexing is disabled."
575
  msgstr ""
576
 
577
- #: lib/interface.php:915
578
  msgid "Indexing complete."
579
  msgstr ""
580
 
581
- #: lib/interface.php:916
582
  msgid "posts excluded."
583
  msgstr ""
584
 
585
- #: lib/interface.php:917
586
  msgid "Settings have changed, please save the options before indexing."
587
  msgstr ""
588
 
589
- #: lib/interface.php:918
590
  msgid "Reload the page to refresh the state of the index."
591
  msgstr ""
592
 
593
- #: lib/interface.php:919
594
  msgid "Are you sure you want to delete all attachment content from the index?"
595
  msgstr ""
596
 
597
- #: lib/interface.php:920
598
  msgid "Relevanssi attachment data wiped clean."
599
  msgstr ""
600
 
601
- #: lib/interface.php:921
602
  msgid "hour"
603
  msgstr ""
604
 
605
- #: lib/interface.php:922
606
  msgid "hours"
607
  msgstr ""
608
 
609
- #: lib/interface.php:923
610
  msgid "about"
611
  msgstr ""
612
 
613
- #: lib/interface.php:924
614
  msgid "about an hour"
615
  msgstr ""
616
 
617
- #: lib/interface.php:925
618
  msgid "about an hour and a half"
619
  msgstr ""
620
 
621
- #: lib/interface.php:926
622
  msgid "minute"
623
  msgstr ""
624
 
625
- #: lib/interface.php:927
626
  msgid "minutes"
627
  msgstr ""
628
 
629
- #: lib/interface.php:928
630
  msgid "less than a minute"
631
  msgstr ""
632
 
633
- #: lib/interface.php:929
634
  msgid "we're done!"
635
  msgstr ""
636
 
637
- #: lib/interface.php:961
638
  msgid "Tag weight"
639
  msgstr ""
640
 
641
- #: lib/interface.php:969
642
  msgid "Category weight"
643
  msgstr ""
644
 
@@ -711,9 +737,7 @@ msgstr ""
711
 
712
  #: lib/stopwords.php:113
713
  #, php-format
714
- msgid ""
715
- "<div id='message' class='updated fade'><p>Couldn't add term '%s' to "
716
- "stopwords!</p></div>"
717
  msgstr ""
718
 
719
  #: lib/stopwords.php:165
@@ -1575,38 +1599,46 @@ msgid "PDF content indexing"
1575
  msgstr ""
1576
 
1577
  #: lib/tabs/overview-tab.php:113
1578
- msgid "Index and search user profile pages"
1579
  msgstr ""
1580
 
1581
  #: lib/tabs/overview-tab.php:114
1582
- msgid "Index and search taxonomy term pages"
1583
  msgstr ""
1584
 
1585
  #: lib/tabs/overview-tab.php:115
1586
- msgid "Multisite searches across many subsites"
1587
  msgstr ""
1588
 
1589
  #: lib/tabs/overview-tab.php:116
1590
- msgid "WP CLI commands"
1591
  msgstr ""
1592
 
1593
  #: lib/tabs/overview-tab.php:117
1594
- msgid "Adjust weights separately for each post type and taxonomy"
1595
  msgstr ""
1596
 
1597
  #: lib/tabs/overview-tab.php:118
1598
- msgid "Internal link anchors can be search terms for the target posts"
1599
  msgstr ""
1600
 
1601
  #: lib/tabs/overview-tab.php:119
1602
- msgid "Index and search any columns in the wp_posts database"
1603
  msgstr ""
1604
 
1605
  #: lib/tabs/overview-tab.php:120
 
 
 
 
1606
  msgid ""
1607
  "Hide Relevanssi branding from the User Searches page on a client installation"
1608
  msgstr ""
1609
 
 
 
 
 
1610
  #: lib/tabs/redirects-tab.php:20
1611
  msgid ""
1612
  "With Relevanssi Premium, you can set up redirects. These are keywords that "
@@ -1943,28 +1975,6 @@ msgid ""
1943
  "copy it to a different blog or otherwise need the list."
1944
  msgstr ""
1945
 
1946
- #: lib/tabs/stopwords-tab.php:131
1947
- msgid "25 most common words in the index"
1948
- msgstr ""
1949
-
1950
- #: lib/tabs/stopwords-tab.php:132
1951
- msgid ""
1952
- "These words are excellent stopword material. A word that appears in most of "
1953
- "the posts in the database is quite pointless when searching. This is also an "
1954
- "easy way to create a completely new stopword list, if one isn't available in "
1955
- "your language. Click the word to add the word to the stopword list. The word "
1956
- "will also be removed from the index, so rebuilding the index is not "
1957
- "necessary."
1958
- msgstr ""
1959
-
1960
- #: lib/tabs/stopwords-tab.php:138
1961
- msgid "Stopword Candidates"
1962
- msgstr ""
1963
-
1964
- #: lib/tabs/stopwords-tab.php:145
1965
- msgid "Add to stopwords"
1966
- msgstr ""
1967
-
1968
  #: lib/tabs/synonyms-tab.php:33
1969
  msgid ""
1970
  "Add synonyms here to make the searches find better results. If you notice "
2
  msgstr ""
3
  "Project-Id-Version: Relevanssi\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2019-02-12 14:31+0200\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Mikko Saari <mikko@mikkosaari.fi>\n"
8
  "Language-Team: \n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "X-Poedit-KeywordsList: _e;__;esc_html__;esc_html_e;_n\n"
14
  "X-Poedit-Basepath: .\n"
15
+ "X-Generator: Poedit 2.2.1\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
  "X-Poedit-SearchPath-1: lib\n"
18
 
50
  msgid "hide"
51
  msgstr ""
52
 
53
+ #: lib/common.php:1566
54
+ msgid "25 most common words in the index"
55
+ msgstr ""
56
+
57
+ #: lib/common.php:1567
58
+ msgid ""
59
+ "These words are excellent stopword material. A word that appears in most of "
60
+ "the posts in the database is quite pointless when searching. This is also an "
61
+ "easy way to create a completely new stopword list, if one isn't available in "
62
+ "your language. Click the word to add the word to the stopword list. The word "
63
+ "will also be removed from the index, so rebuilding the index is not "
64
+ "necessary."
65
+ msgstr ""
66
+
67
+ #: lib/common.php:1573
68
+ msgid "Stopword Candidates"
69
+ msgstr ""
70
+
71
+ #: lib/common.php:1580
72
+ msgid "Add to stopwords"
73
+ msgstr ""
74
+
75
+ #: lib/contextual-help.php:24 lib/interface.php:791
76
  #: lib/tabs/overview-tab.php:56
77
  msgid "Searching"
78
  msgstr ""
376
  "extension."
377
  msgstr ""
378
 
379
+ #: lib/init.php:186 lib/init.php:187 lib/interface.php:453
380
  #: lib/tabs/logging-tab.php:47
381
  msgid "User searches"
382
  msgstr ""
401
  msgid "Relevanssi Premium Search Options"
402
  msgstr ""
403
 
404
+ #: lib/interface.php:455
405
  msgid "Relevanssi User Searches"
406
  msgstr ""
407
 
408
+ #: lib/interface.php:478
409
  msgid "Enable query logging to see stats here."
410
  msgstr ""
411
 
412
+ #: lib/interface.php:490
413
  msgid "Admin Search"
414
  msgstr ""
415
 
416
+ #: lib/interface.php:520
417
  msgid "Logs clear!"
418
  msgstr ""
419
 
420
+ #: lib/interface.php:522
421
  msgid "Clearing the logs failed."
422
  msgstr ""
423
 
424
+ #: lib/interface.php:556
425
  msgid "Total Searches"
426
  msgstr ""
427
 
428
+ #: lib/interface.php:558
429
  msgid "Totals"
430
  msgstr ""
431
 
432
+ #: lib/interface.php:562
433
  msgid "Common Queries"
434
  msgstr ""
435
 
436
+ #: lib/interface.php:572
437
  #, php-format
438
  msgid ""
439
  "Here you can see the %d most common user search queries, how many times "
440
  "those queries were made and how many results were found for those queries."
441
  msgstr ""
442
 
443
+ #: lib/interface.php:576 lib/interface.php:598 lib/interface.php:639
444
  msgid "Today and yesterday"
445
  msgstr ""
446
 
447
+ #: lib/interface.php:579 lib/interface.php:585 lib/interface.php:590
448
+ #: lib/interface.php:607
449
  #, php-format
450
  msgid "Last %d days"
451
  msgstr ""
452
 
453
+ #: lib/interface.php:595
454
  msgid "Unsuccessful Queries"
455
  msgstr ""
456
 
457
+ #: lib/interface.php:602 lib/interface.php:640
458
  msgid "Last 7 days"
459
  msgstr ""
460
 
461
+ #: lib/interface.php:613
462
  msgid "Reset Logs"
463
  msgstr ""
464
 
465
+ #: lib/interface.php:617
466
  #, php-format
467
  msgid "To reset the logs, type \"reset\" into the box here %1$s and click %2$s"
468
  msgstr ""
469
 
470
+ #: lib/interface.php:641
471
  msgid "Last 30 days"
472
  msgstr ""
473
 
474
+ #: lib/interface.php:642
475
  msgid "Forever"
476
  msgstr ""
477
 
478
+ #: lib/interface.php:650
479
  msgid "When"
480
  msgstr ""
481
 
482
+ #: lib/interface.php:650
483
  msgid "Searches"
484
  msgstr ""
485
 
486
+ #: lib/interface.php:707 lib/log.php:163
487
  msgid "Query"
488
  msgstr ""
489
 
490
+ #: lib/interface.php:707
491
  msgid "Hits"
492
  msgstr ""
493
 
494
+ #: lib/interface.php:788
495
  msgid "Overview"
496
  msgstr ""
497
 
498
+ #: lib/interface.php:789 lib/tabs/overview-tab.php:44
499
  msgid "Indexing"
500
  msgstr ""
501
 
502
+ #: lib/interface.php:790
503
  msgid "Attachments"
504
  msgstr ""
505
 
506
+ #: lib/interface.php:792
507
  msgid "Logging"
508
  msgstr ""
509
 
510
+ #: lib/interface.php:793 lib/tabs/overview-tab.php:60
511
  msgid "Excerpts and highlights"
512
  msgstr ""
513
 
514
+ #: lib/interface.php:794 lib/tabs/synonyms-tab.php:25
515
  #: lib/tabs/synonyms-tab.php:30
516
  msgid "Synonyms"
517
  msgstr ""
518
 
519
+ #: lib/interface.php:795 lib/tabs/stopwords-tab.php:18
520
  msgid "Stopwords"
521
  msgstr ""
522
 
523
+ #: lib/interface.php:796 lib/tabs/redirects-tab.php:18
524
  msgid "Redirects"
525
  msgstr ""
526
 
527
+ #: lib/interface.php:798
528
+ msgid "Related"
529
+ msgstr ""
530
+
531
+ #: lib/interface.php:799
532
  msgid "Import / Export options"
533
  msgstr ""
534
 
535
+ #: lib/interface.php:918
536
  msgid "Click OK to copy Relevanssi options to all subsites"
537
  msgstr ""
538
 
539
+ #: lib/interface.php:919
540
  msgid "Are you sure you want to remove all stopwords?"
541
  msgstr ""
542
 
543
+ #: lib/interface.php:920
544
  msgid "Wiping out the index..."
545
  msgstr ""
546
 
547
+ #: lib/interface.php:921
548
  msgid "Done."
549
  msgstr ""
550
 
551
+ #: lib/interface.php:922
552
  msgid "Indexing users..."
553
  msgstr ""
554
 
555
+ #: lib/interface.php:923
556
  msgid "Indexing the following taxonomies:"
557
  msgstr ""
558
 
559
+ #: lib/interface.php:924
560
  msgid "Indexing attachments..."
561
  msgstr ""
562
 
563
+ #: lib/interface.php:925
564
  msgid "Counting posts..."
565
  msgstr ""
566
 
567
+ #: lib/interface.php:926
568
  msgid "Counting taxonomy terms..."
569
  msgstr ""
570
 
571
+ #: lib/interface.php:927
572
  msgid "Counting users..."
573
  msgstr ""
574
 
575
+ #: lib/interface.php:928
576
  msgid "Counting attachments..."
577
  msgstr ""
578
 
579
+ #: lib/interface.php:929
580
  msgid "posts found."
581
  msgstr ""
582
 
583
+ #: lib/interface.php:930
584
  msgid "taxonomy terms found."
585
  msgstr ""
586
 
587
+ #: lib/interface.php:931
588
  msgid "users found."
589
  msgstr ""
590
 
591
+ #: lib/interface.php:932
592
  msgid "attachments found."
593
  msgstr ""
594
 
595
+ #: lib/interface.php:933
596
  msgid "Taxonomy term indexing is disabled."
597
  msgstr ""
598
 
599
+ #: lib/interface.php:934
600
  msgid "User indexing is disabled."
601
  msgstr ""
602
 
603
+ #: lib/interface.php:935
604
  msgid "Indexing complete."
605
  msgstr ""
606
 
607
+ #: lib/interface.php:936
608
  msgid "posts excluded."
609
  msgstr ""
610
 
611
+ #: lib/interface.php:937
612
  msgid "Settings have changed, please save the options before indexing."
613
  msgstr ""
614
 
615
+ #: lib/interface.php:938
616
  msgid "Reload the page to refresh the state of the index."
617
  msgstr ""
618
 
619
+ #: lib/interface.php:939
620
  msgid "Are you sure you want to delete all attachment content from the index?"
621
  msgstr ""
622
 
623
+ #: lib/interface.php:940
624
  msgid "Relevanssi attachment data wiped clean."
625
  msgstr ""
626
 
627
+ #: lib/interface.php:941
628
  msgid "hour"
629
  msgstr ""
630
 
631
+ #: lib/interface.php:942
632
  msgid "hours"
633
  msgstr ""
634
 
635
+ #: lib/interface.php:943
636
  msgid "about"
637
  msgstr ""
638
 
639
+ #: lib/interface.php:944
640
  msgid "about an hour"
641
  msgstr ""
642
 
643
+ #: lib/interface.php:945
644
  msgid "about an hour and a half"
645
  msgstr ""
646
 
647
+ #: lib/interface.php:946
648
  msgid "minute"
649
  msgstr ""
650
 
651
+ #: lib/interface.php:947
652
  msgid "minutes"
653
  msgstr ""
654
 
655
+ #: lib/interface.php:948
656
  msgid "less than a minute"
657
  msgstr ""
658
 
659
+ #: lib/interface.php:949
660
  msgid "we're done!"
661
  msgstr ""
662
 
663
+ #: lib/interface.php:981
664
  msgid "Tag weight"
665
  msgstr ""
666
 
667
+ #: lib/interface.php:989
668
  msgid "Category weight"
669
  msgstr ""
670
 
737
 
738
  #: lib/stopwords.php:113
739
  #, php-format
740
+ msgid "Couldn't add term '%s' to stopwords!"
 
 
741
  msgstr ""
742
 
743
  #: lib/stopwords.php:165
1599
  msgstr ""
1600
 
1601
  #: lib/tabs/overview-tab.php:113
1602
+ msgid "A Related posts feature"
1603
  msgstr ""
1604
 
1605
  #: lib/tabs/overview-tab.php:114
1606
+ msgid "Index and search user profile pages"
1607
  msgstr ""
1608
 
1609
  #: lib/tabs/overview-tab.php:115
1610
+ msgid "Index and search taxonomy term pages"
1611
  msgstr ""
1612
 
1613
  #: lib/tabs/overview-tab.php:116
1614
+ msgid "Multisite searches across many subsites"
1615
  msgstr ""
1616
 
1617
  #: lib/tabs/overview-tab.php:117
1618
+ msgid "WP CLI commands"
1619
  msgstr ""
1620
 
1621
  #: lib/tabs/overview-tab.php:118
1622
+ msgid "Adjust weights separately for each post type and taxonomy"
1623
  msgstr ""
1624
 
1625
  #: lib/tabs/overview-tab.php:119
1626
+ msgid "Internal link anchors can be search terms for the target posts"
1627
  msgstr ""
1628
 
1629
  #: lib/tabs/overview-tab.php:120
1630
+ msgid "Index and search any columns in the wp_posts database"
1631
+ msgstr ""
1632
+
1633
+ #: lib/tabs/overview-tab.php:121
1634
  msgid ""
1635
  "Hide Relevanssi branding from the User Searches page on a client installation"
1636
  msgstr ""
1637
 
1638
+ #: lib/tabs/overview-tab.php:122
1639
+ msgid "Redirect search queries to custom URLs"
1640
+ msgstr ""
1641
+
1642
  #: lib/tabs/redirects-tab.php:20
1643
  msgid ""
1644
  "With Relevanssi Premium, you can set up redirects. These are keywords that "
1975
  "copy it to a different blog or otherwise need the list."
1976
  msgstr ""
1977
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1978
  #: lib/tabs/synonyms-tab.php:33
1979
  msgid ""
1980
  "Add synonyms here to make the searches find better results. If you notice "