Ivory Search – WordPress Search Plugin - Version 4.4

Version Description

  • Improved - Plugin admin options user interface.
  • Added - Option "Do not display post_type in the search URL".
  • Added - Filter to change image size in AJAX search results.
  • Fixed - Menu search form not getting saved.
  • Fixed - AJAX search results dispalying WPBakery plugin shortcodes
  • Fixed - AJAX Show More Results section not disabling.
  • Fixed - Add New Search Form screen Undefined index error.
  • Fixed - Edit search form link position issue.
  • Fixed - AJAX More Results text show / hide issue.
  • Fixed - List of post saving issue and DISABLE_IS_LOAD_ALL not working issue.
  • Moved - Menu Search section as a second section.
  • Changed - Synonyms separator from semicolon to new line.
  • Removed - Post status option from the search form Excludes section.
  • Free - Made the premium option free - Search All Or Any Search Terms.
  • Free - Made the premium option free - Menu search form selection.
Download this release

Release Info

Developer vinod dalvi
Plugin Icon 128x128 Ivory Search – WordPress Search Plugin
Version 4.4
Comparing to
See all releases

Code changes from version 4.3.3 to 4.4

add-search-to-menu.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Ivory Search
4
  * Plugin URI: https://ivorysearch.com
5
  * Description: The WordPress Search plugin that includes Search Form Customizer, WooCommerce Search, Image Search, Search Shortcode, AJAX Search & Live Search support!
6
- * Version: 4.3.3
7
  * Author: Ivory Search
8
  * Author URI: https://ivorysearch.com/
9
  * License: GPL2+
@@ -12,7 +12,7 @@
12
  * Text Domain: ivory-search
13
  *
14
  *
15
- * WC tested up to: 3.6.4
16
  *
17
  * Ivory Search is free software: you can redistribute it and/or modify
18
  * it under the terms of the GNU General Public License as published by
@@ -108,7 +108,7 @@ final class Ivory_Search {
108
  */
109
  private function define_constants() {
110
 
111
- define( 'IS_VERSION', '4.3.1' );
112
  define( 'IS_PLUGIN_FILE', __FILE__ );
113
  define( 'IS_PLUGIN_BASE', plugin_basename( IS_PLUGIN_FILE ) );
114
  define( 'IS_PLUGIN_DIR', plugin_dir_path( IS_PLUGIN_FILE ) );
3
  * Plugin Name: Ivory Search
4
  * Plugin URI: https://ivorysearch.com
5
  * Description: The WordPress Search plugin that includes Search Form Customizer, WooCommerce Search, Image Search, Search Shortcode, AJAX Search & Live Search support!
6
+ * Version: 4.4
7
  * Author: Ivory Search
8
  * Author URI: https://ivorysearch.com/
9
  * License: GPL2+
12
  * Text Domain: ivory-search
13
  *
14
  *
15
+ * WC tested up to: 3.7
16
  *
17
  * Ivory Search is free software: you can redistribute it and/or modify
18
  * it under the terms of the GNU General Public License as published by
108
  */
109
  private function define_constants() {
110
 
111
+ define( 'IS_VERSION', '4.4' );
112
  define( 'IS_PLUGIN_FILE', __FILE__ );
113
  define( 'IS_PLUGIN_BASE', plugin_basename( IS_PLUGIN_FILE ) );
114
  define( 'IS_PLUGIN_DIR', plugin_dir_path( IS_PLUGIN_FILE ) );
admin/class-is-admin.php CHANGED
@@ -65,6 +65,7 @@ class IS_Admin
65
  array(),
66
  IS_VERSION
67
  );
 
68
  wp_register_script(
69
  'is-admin-scripts',
70
  plugins_url( '/admin/js/ivory-search-admin.js', IS_PLUGIN_FILE ),
@@ -157,7 +158,7 @@ class IS_Admin
157
  return array(
158
  $prefix . 'is_pointers' => array(
159
  'content' => $new_pointer_content,
160
- 'anchor_id' => '#the-list tr:first-child a.row-title',
161
  'edge' => 'left',
162
  'align' => 'left',
163
  'active' => !in_array( $prefix . 'is_pointers', $dismissed ),
@@ -241,7 +242,7 @@ class IS_Admin
241
  'https://ivorysearch.com/support/',
242
  'https://ivorysearch.com/contact/'
243
  ) ;
244
- echo '<a class="is-notice-dismiss" href="' . add_query_arg( 'is_dismiss', 'notice_config' ) . '">' . __( 'Dismiss', 'iovry-search' ) . '</a></p></div>' ;
245
  }
246
 
247
  }
@@ -261,13 +262,13 @@ class IS_Admin
261
 
262
  if ( $diff > 900000 ) {
263
  echo '<div class="is-notice notice"><div class="is-notice-image"></div><div class="is-notice-body">' ;
264
- echo '<a class="is-notice-dismiss" href="' . add_query_arg( 'is_dismiss', 'notice_review' ) . '">' . esc_html__( 'Dismiss', 'iovry-search' ) . '</a>' ;
265
- echo '<div class="is-notice-title">' . esc_html__( 'Have you found Ivory Search plugin useful?', 'iovry-search' ) . '</div>' ;
266
- echo '<div class="is-notice-content">' . esc_html__( 'We poured a lot of hours into creating it, and we\'d love it if you could give us a nice rating on the official plugin directory.', 'iovry-search' ) . '</div>' ;
267
  echo '<div class="is-notice-links">' ;
268
- echo '<a href="' . esc_url( 'https://wordpress.org/support/plugin/add-search-to-menu/reviews/?filter=5#new-post' ) . '" class="button button-primary" target="_blank" >' . esc_html__( 'Rate Ivory Search and Help Us Out', 'iovry-search' ) . '</a>' ;
269
- echo '<a href="' . esc_url( 'https://ivorysearch.com/support/' ) . '" class="button button-primary" target="_blank">' . esc_html__( 'Get Support', 'iovry-search' ) . '</a>' ;
270
- echo '<a href="' . esc_url( 'https://ivorysearch.com/contact/' ) . '" class="button button-primary" target="_blank">' . esc_html__( 'Say Hi', 'iovry-search' ) . '</a>' ;
271
  echo '</div></div></div>' ;
272
  }
273
 
@@ -453,9 +454,30 @@ class IS_Admin
453
 
454
 
455
  if ( 'invalid' == $_REQUEST['message'] ) {
456
- $updated_message = __( "There was a validation error saving the search form.", 'ivory-search' );
457
- $updated_message2 = sprintf( __( "Please make sure you have not selected similar %s fields in the search form Includes and Excludes sections.", 'ivory-search' ), $_REQUEST['data'] );
458
- echo sprintf( '<div id="message" class="notice notice-error is-dismissible"><p>%s</p><p>%s</p></div>', esc_html( $updated_message ), esc_html( $updated_message2 ) ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  return;
460
  }
461
 
@@ -870,6 +892,10 @@ class IS_Admin
870
  'search_title' => 1,
871
  'search_content' => 1,
872
  'search_excerpt' => 1,
 
 
 
 
873
  );
874
  }
875
  $properties['_is_includes'] = $this->sanitize_includes( $args['_is_includes'] );
@@ -915,10 +941,10 @@ class IS_Admin
915
  return $defaults;
916
  }
917
  $defaults = wp_parse_args( $defaults, array(
918
- 'post_type' => array(
919
- 'post' => 'post',
920
- 'page' => 'page',
921
- ),
922
  ) );
923
  $input = wp_parse_args( $input, $defaults );
924
  $output = $this->sanitize_fields( $input );
65
  array(),
66
  IS_VERSION
67
  );
68
+ wp_enqueue_script( 'jquery-ui-datepicker' );
69
  wp_register_script(
70
  'is-admin-scripts',
71
  plugins_url( '/admin/js/ivory-search-admin.js', IS_PLUGIN_FILE ),
158
  return array(
159
  $prefix . 'is_pointers' => array(
160
  'content' => $new_pointer_content,
161
+ 'anchor_id' => '#the-list tr:last-child a.row-title',
162
  'edge' => 'left',
163
  'align' => 'left',
164
  'active' => !in_array( $prefix . 'is_pointers', $dismissed ),
242
  'https://ivorysearch.com/support/',
243
  'https://ivorysearch.com/contact/'
244
  ) ;
245
+ echo '<a class="is-notice-dismiss" href="' . add_query_arg( 'is_dismiss', 'notice_config' ) . '">' . __( 'Dismiss', 'ivory-search' ) . '</a></p></div>' ;
246
  }
247
 
248
  }
262
 
263
  if ( $diff > 900000 ) {
264
  echo '<div class="is-notice notice"><div class="is-notice-image"></div><div class="is-notice-body">' ;
265
+ echo '<a class="is-notice-dismiss" href="' . add_query_arg( 'is_dismiss', 'notice_review' ) . '">' . esc_html__( 'Dismiss', 'ivory-search' ) . '</a>' ;
266
+ echo '<div class="is-notice-title">' . esc_html__( 'Have you found Ivory Search plugin useful?', 'ivory-search' ) . '</div>' ;
267
+ echo '<div class="is-notice-content">' . esc_html__( 'We poured a lot of hours into creating it, and we\'d love it if you could give us a nice rating on the official plugin directory.', 'ivory-search' ) . '</div>' ;
268
  echo '<div class="is-notice-links">' ;
269
+ echo '<a href="' . esc_url( 'https://wordpress.org/support/plugin/add-search-to-menu/reviews/?filter=5#new-post' ) . '" class="button button-primary" target="_blank" >' . esc_html__( 'Rate Ivory Search and Help Us Out', 'ivory-search' ) . '</a>' ;
270
+ echo '<a href="' . esc_url( 'https://ivorysearch.com/support/' ) . '" class="button button-primary" target="_blank">' . esc_html__( 'Get Support', 'ivory-search' ) . '</a>' ;
271
+ echo '<a href="' . esc_url( 'https://ivorysearch.com/contact/' ) . '" class="button button-primary" target="_blank">' . esc_html__( 'Say Hi', 'ivory-search' ) . '</a>' ;
272
  echo '</div></div></div>' ;
273
  }
274
 
454
 
455
 
456
  if ( 'invalid' == $_REQUEST['message'] ) {
457
+ $updated_message = __( "Validation error occurred.", 'ivory-search' );
458
+ $includes = __( "Includes", 'ivory-search' );
459
+ $excludes = __( "Excludes", 'ivory-search' );
460
+
461
+ if ( isset( $_REQUEST['tab'] ) ) {
462
+ $url = esc_url( menu_page_url( 'ivory-search', false ) ) . '&post=' . $_REQUEST['post'] . '&action=edit';
463
+
464
+ if ( 'excludes' == $_REQUEST['tab'] ) {
465
+ $includes = '<a href="' . $url . '&tab=includes">' . __( "Includes", 'ivory-search' ) . '</a>';
466
+ } else {
467
+ if ( 'includes' == $_REQUEST['tab'] ) {
468
+ $excludes = '<a href="' . $url . '&tab=excludes">' . __( "Excludes", 'ivory-search' ) . '</a>';
469
+ }
470
+ }
471
+
472
+ }
473
+
474
+ $updated_message2 = sprintf(
475
+ __( "Please make sure you have not selected similar %s fields in the search form %s and %s sections.", 'ivory-search' ),
476
+ $_REQUEST['data'],
477
+ $includes,
478
+ $excludes
479
+ );
480
+ echo sprintf( '<div id="message" class="notice notice-error is-dismissible"><p>%s</p><p>%s</p></div>', esc_html( $updated_message ), $updated_message2 ) ;
481
  return;
482
  }
483
 
892
  'search_title' => 1,
893
  'search_content' => 1,
894
  'search_excerpt' => 1,
895
+ 'post_status' => array(
896
+ 'publish' => 'publish',
897
+ 'inherit' => 'inherit',
898
+ ),
899
  );
900
  }
901
  $properties['_is_includes'] = $this->sanitize_includes( $args['_is_includes'] );
941
  return $defaults;
942
  }
943
  $defaults = wp_parse_args( $defaults, array(
944
+ 'post_type' => get_post_types( array(
945
+ 'public' => true,
946
+ 'exclude_from_search' => false,
947
+ ) ),
948
  ) );
949
  $input = wp_parse_args( $input, $defaults );
950
  $output = $this->sanitize_fields( $input );
admin/class-is-editor.php CHANGED
@@ -15,12 +15,18 @@ class IS_Search_Editor
15
  return preg_match( '/^[A-Za-z][-A-Za-z0-9_:.]*$/', $string );
16
  }
17
 
18
- public function add_panel( $id, $title, $callback )
 
 
 
 
 
19
  {
20
  if ( $this->is_name( $id ) ) {
21
  $this->panels[$id] = array(
22
- 'title' => $title,
23
- 'callback' => $callback,
 
24
  );
25
  }
26
  }
@@ -39,10 +45,11 @@ class IS_Search_Editor
39
  foreach ( $this->panels as $id => $panel ) {
40
  $class = ( $tab == $id ? 'active' : '' );
41
  echo sprintf(
42
- '<li id="%1$s-tab" class="%2$s"><a href="%3$s">%4$s</a></li>',
43
  esc_attr( $id ),
44
  esc_attr( $class ),
45
  $url . '&tab=' . $id,
 
46
  esc_html( $panel['title'] )
47
  ) ;
48
  }
@@ -71,11 +78,10 @@ class IS_Search_Editor
71
  * @global Object $wpdb WPDB object
72
  * @return Array array of meta keys
73
  */
74
- function is_meta_keys( $post_types )
75
  {
76
  global $wpdb ;
77
- $post_types = implode( "', '", $post_types );
78
- $is_fields = $wpdb->get_results( apply_filters( 'is_meta_keys_query', "select DISTINCT meta_key from {$wpdb->postmeta} pt LEFT JOIN {$wpdb->posts} p ON (pt.post_id = p.ID) where meta_key NOT LIKE '\\_%' AND post_type IN ( '{$post_types}' ) ORDER BY meta_key ASC" ) );
79
  $meta_keys = array();
80
  if ( is_array( $is_fields ) && !empty($is_fields) ) {
81
  foreach ( $is_fields as $field ) {
@@ -97,6 +103,7 @@ class IS_Search_Editor
97
  $excludes = $post->prop( '_is_excludes' );
98
  $settings = $post->prop( '_is_settings' );
99
  $default_search = ( NULL == $post->id() ? true : false );
 
100
  ?>
101
  <h4 class="panel-desc">
102
  <?php
@@ -130,63 +137,111 @@ class IS_Search_Editor
130
  'public' => true,
131
  'exclude_from_search' => false,
132
  ) );
 
 
 
 
 
 
 
 
 
 
133
 
134
  if ( !empty($post_types) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  foreach ( $post_types as $key => $post_type ) {
136
  $checked = ( $default_search || isset( $includes['post_type'][esc_attr( $key )] ) ? esc_attr( $key ) : 0 );
137
- echo '<div class="col-wrapper check-radio">' ;
138
  echo '<label for="' . $id . '-post_type-' . esc_attr( $key ) . '"> ' ;
139
  echo '<input class="_is_includes-post_type" type="checkbox" id="' . $id . '-post_type-' . esc_attr( $key ) . '" name="' . $id . '[post_type][' . esc_attr( $key ) . ']" value="' . esc_attr( $key ) . '" ' . checked( $key, $checked, false ) . '/>' ;
140
  echo '<span class="toggle-check-text"></span>' ;
141
- echo ucfirst( esc_html( $post_type ) ) . '</label></div>' ;
142
  }
143
- $checked = ( $default_search || isset( $includes['search_title'] ) && $includes['search_title'] ? 1 : 0 );
144
- echo '<br /><br /><p class="check-radio"><label for="' . $id . '-search_title"><input class="_is_includes-post_type" type="checkbox" id="' . $id . '-search_title" name="' . $id . '[search_title]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
145
- echo '<span class="toggle-check-text"></span>' . esc_html__( "Search post title", 'ivory-search' ) . '</label></p>' ;
146
- $checked = ( $default_search || isset( $includes['search_content'] ) && $includes['search_content'] ? 1 : 0 );
147
- echo '<p class="check-radio"><label for="' . $id . '-search_content"><input class="_is_includes-post_type" type="checkbox" id="' . $id . '-search_content" name="' . $id . '[search_content]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
148
- echo '<span class="toggle-check-text"></span>' . esc_html__( "Search post content", 'ivory-search' ) . '</label></p>' ;
149
- $checked = ( $default_search || isset( $includes['search_excerpt'] ) && $includes['search_excerpt'] ? 1 : 0 );
150
- echo '<p class="check-radio"><label for="' . $id . '-search_excerpt"><input class="_is_includes-post_type" type="checkbox" id="' . $id . '-search_excerpt" name="' . $id . '[search_excerpt]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
151
- echo '<span class="toggle-check-text"></span>' . esc_html__( "Search post excerpt", 'ivory-search' ) . '</label></p>' ;
152
  } else {
153
- echo '<span class="notice-is-info">' . __( 'No post types registered on your site.', 'ivory-search' ) . '</span>' ;
 
 
 
 
 
 
 
154
  }
155
 
156
  ?>
157
  </div></div>
158
 
159
- <h3 scope="row">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  <label for="<?php
161
- echo $id ;
162
- ?>-post__in"><?php
163
- echo esc_html( __( 'Posts, Pages & Custom Posts', 'ivory-search' ) ) ;
164
- ?></label>
165
  </h3>
166
- <div>
 
 
167
  <?php
168
- $content = __( 'Search only selected posts.', 'ivory-search' );
169
- IS_Help::help_info( $content );
170
- echo '<div>' ;
171
- if ( isset( $includes['post_type'] ) && !empty($includes['post_type']) && is_array( $includes['post_type'] ) ) {
172
- $post_types = array_values( $includes['post_type'] );
173
- }
174
- $posts_found = false;
175
- foreach ( $post_types as $post_type ) {
 
 
176
  $posts = get_posts( array(
177
  'post_type' => $post_type,
178
- 'posts_per_page' => 100,
179
  'orderby' => 'title',
180
  'order' => 'ASC',
181
  ) );
 
 
182
 
183
  if ( !empty($posts) ) {
184
  $posts_found = true;
185
- $html = '<div class="col-wrapper"><div class="col-title">';
186
- $col_title = '<span>' . ucwords( $post_type ) . '</span>';
187
  $temp = '';
188
- $selected_pt = array();
189
  foreach ( $posts as $post2 ) {
 
 
 
190
  $checked = ( isset( $includes['post__in'] ) && in_array( $post2->ID, $includes['post__in'] ) ? $post2->ID : 0 );
191
  if ( $checked ) {
192
  array_push( $selected_pt, $post_type );
@@ -200,156 +255,216 @@ class IS_Search_Editor
200
  $html .= $col_title . '<input class="list-search" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text"></div>';
201
  $html .= '<select class="_is_includes-post__in" name="' . $id . '[post__in][]" multiple size="8" >';
202
  $html .= $temp . '</select>';
203
- if ( count( $posts ) >= 100 && !defined( 'DISABLE_IS_LOAD_ALL' ) ) {
204
  $html .= '<div id="' . $post_type . '" class="load-all">' . __( 'Load All', 'ivory-search' ) . '</div>';
205
  }
206
  $html .= '</div>';
207
- echo $html ;
208
  }
209
-
210
- }
211
-
212
- if ( !$posts_found ) {
213
- echo '<span class="notice-is-info">' . __( 'No posts created for selected post types.', 'ivory-search' ) . '</span>' ;
214
- } else {
215
- echo '<br /><label for="' . $id . '-post__in" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key & Left Mouse button to select multiple terms or deselect them.", 'ivory-search' ) . '</label>' ;
216
- }
217
-
218
- ?>
219
- </div></div>
220
-
221
- <h3 scope="row">
222
- <label for="<?php
223
- echo $id ;
224
- ?>-tax_query"><?php
225
- esc_html_e( 'Category & Taxonomy Terms', 'ivory-search' );
226
- ?></label>
227
- </h3>
228
- <div>
229
- <?php
230
- $content = __( 'Search posts of only selected categories, taxonomies & terms.', 'ivory-search' );
231
- IS_Help::help_info( $content );
232
- echo '<div>' ;
233
- $tax_objs = get_object_taxonomies( $post_types, 'objects' );
234
-
235
- if ( !empty($tax_objs) ) {
236
- foreach ( $tax_objs as $key => $tax_obj ) {
237
- $terms = get_terms( array(
238
- 'taxonomy' => $key,
239
- 'hide_empty' => false,
240
- ) );
241
 
242
- if ( !empty($terms) ) {
243
- echo '<div class="col-wrapper"><div class="col-title">' ;
244
- $col_title = ucwords( str_replace( '-', ' ', str_replace( '_', ' ', esc_html( $key ) ) ) );
245
- if ( isset( $includes['tax_query'][$key] ) ) {
246
- $col_title = '<strong>' . $col_title . '</strong>';
247
- }
248
- echo $col_title . '<input class="list-search" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text"></div><input type="hidden" id="' . $id . '-tax_post_type" name="' . $id . '[tax_post_type][' . $key . ']" value="' . implode( ',', $tax_obj->object_type ) . '" />' ;
249
- echo '<select class="_is_includes-tax_query" name="' . $id . '[tax_query][' . $key . '][]" multiple size="8" >' ;
250
- foreach ( $terms as $key2 => $term ) {
251
- $checked = ( isset( $includes['tax_query'][$key] ) && in_array( $term->term_taxonomy_id, $includes['tax_query'][$key] ) ? $term->term_taxonomy_id : 0 );
252
- echo '<option value="' . esc_attr( $term->term_taxonomy_id ) . '" ' . selected( $term->term_taxonomy_id, $checked, false ) . '>' . esc_html( $term->name ) . '</option>' ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  }
254
- echo '</select></div>' ;
255
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  }
258
- echo '<br /><label for="' . $id . '-tax_query" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key & Left Mouse button to select multiple terms or deselect them.", 'ivory-search' ) . '</label>' ;
259
- $checked = ( isset( $includes['tax_rel'] ) && "OR" == $includes['tax_rel'] ? "OR" : "AND" );
260
- echo '<br /><p class="check-radio"><label for="' . $id . '-tax_rel_and" ><input class="_is_includes-tax_query" type="radio" id="' . $id . '-tax_rel_and" name="' . $id . '[tax_rel]" value="AND" ' . checked( 'AND', $checked, false ) . '/>' ;
261
- echo '<span class="toggle-check-text"></span>' . esc_html__( "AND - Search posts having all the above selected terms", 'ivory-search' ) . '</label></p>' ;
262
- echo '<p class="check-radio"><label for="' . $id . '-tax_rel_or" ><input class="_is_includes-tax_query" type="radio" id="' . $id . '-tax_rel_or" name="' . $id . '[tax_rel]" value="OR" ' . checked( 'OR', $checked, false ) . '/>' ;
263
- echo '<span class="toggle-check-text"></span>' . esc_html__( "OR - Search posts having any one of the above selected terms", 'ivory-search' ) . '</label></p>' ;
264
- $checked = ( isset( $includes['search_tax_title'] ) && $includes['search_tax_title'] ? 1 : 0 );
265
- echo '<br /><p class="check-radio"><label for="' . $id . '-search_tax_title" ><input class="_is_includes-tax_query" type="checkbox" id="' . $id . '-search_tax_title" name="' . $id . '[search_tax_title]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
266
- echo '<span class="toggle-check-text"></span>' . esc_html__( "Search term title", 'ivory-search' ) . '</label></p>' ;
267
- $checked = ( isset( $includes['search_tax_desp'] ) && $includes['search_tax_desp'] ? 1 : 0 );
268
- echo '<p class="check-radio"><label for="' . $id . '-search_tax_desp" ><input class="_is_includes-tax_query" type="checkbox" id="' . $id . '-search_tax_desp" name="' . $id . '[search_tax_desp]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
269
- echo '<span class="toggle-check-text"></span>' . esc_html__( "Search term description", 'ivory-search' ) . '</label></p>' ;
270
- } else {
271
- echo '<span class="notice-is-info">' . __( 'No taxonomies registered for selected post types.', 'ivory-search' ) . '</span>' ;
272
- }
273
-
274
- ?>
275
- </div></div>
276
-
277
-
278
- <h3 scope="row">
279
- <label for="<?php
280
- echo $id ;
281
- ?>-custom_field"><?php
282
- echo esc_html( __( 'Custom Fields & Metadata', 'ivory-search' ) ) ;
283
- ?></label>
284
- </h3>
285
- <div>
286
- <?php
287
- $content = __( 'Search values of selected custom fields.', 'ivory-search' );
288
- IS_Help::help_info( $content );
289
- echo '<div>' ;
290
- $meta_keys = $this->is_meta_keys( $post_types );
291
-
292
- if ( !empty($meta_keys) ) {
293
- echo '<input class="list-search wide" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text">' ;
294
- echo '<select class="_is_includes-custom_field" name="' . $id . '[custom_field][]" multiple size="8" >' ;
295
- foreach ( $meta_keys as $meta_key ) {
296
- $checked = ( isset( $includes['custom_field'] ) && in_array( $meta_key, $includes['custom_field'] ) ? $meta_key : 0 );
297
- echo '<option value="' . esc_attr( $meta_key ) . '" ' . selected( $meta_key, $checked, false ) . '>' . esc_html( $meta_key ) . '</option>' ;
298
  }
299
- echo '</select>' ;
300
- echo '<br /><label for="' . $id . '-custom_field" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key & Left Mouse button to select multiple terms or deselect them.", 'ivory-search' ) . '</label>' ;
301
- } else {
302
- echo '<span class="notice-is-info">' . __( 'No custom fields created for selected post types.', 'ivory-search' ) . '</span>' ;
303
- }
304
-
305
-
306
- if ( isset( $includes['custom_field'] ) ) {
307
- echo '<br />' . __( 'Selected Custom Fields :', 'ivory-search' ) ;
308
- foreach ( $includes['custom_field'] as $custom_field ) {
309
- echo '<br /><span style="font-size: 11px;">' . $custom_field . '</span>' ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
  }
 
 
 
 
311
  }
312
-
313
  ?>
314
- </div></div>
315
-
316
 
317
  <h3 scope="row">
318
  <label for="<?php
319
  echo $id ;
320
- ?>-woocommerce"><?php
321
- echo esc_html( __( 'WooCommerce', 'ivory-search' ) ) ;
322
  ?></label>
323
  </h3>
324
  <div>
325
  <?php
326
- $content = __( 'Search WooCommerce products.', 'ivory-search' );
327
  IS_Help::help_info( $content );
328
  echo '<div>' ;
329
-
330
- if ( class_exists( 'WooCommerce' ) ) {
331
-
332
- if ( $default_search || in_array( 'product', $post_types ) ) {
333
- $woo_sku_disable = ( is_fs()->is_plan_or_trial( 'pro_plus' ) && $this->is_premium_plugin ? '' : ' disabled ' );
334
- $checked = ( isset( $includes['woo']['sku'] ) && $includes['woo']['sku'] ? 1 : 0 );
335
- echo '<p class="check-radio"><label for="' . $id . '-sku" ><input class="_is_includes-woocommerce" type="checkbox" ' . $woo_sku_disable . ' id="' . $id . '-sku" name="' . $id . '[woo][sku]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
336
- echo '<span class="toggle-check-text"></span>' . esc_html__( "Search product SKU", 'ivory-search' ) . '</label></p>' ;
337
- $checked = ( isset( $includes['woo']['variation'] ) && $includes['woo']['variation'] ? 1 : 0 );
338
- echo '<p class="check-radio"><label for="' . $id . '-variation" ><input class="_is_includes-woocommerce" type="checkbox" ' . $woo_sku_disable . ' id="' . $id . '-variation" name="' . $id . '[woo][variation]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
339
- echo '<span class="toggle-check-text"></span>' . esc_html__( "Search product variation", 'ivory-search' ) . '</label>' ;
340
- echo IS_Admin::pro_link( 'pro_plus' ) . '</p>' ;
341
- } else {
342
- echo '<span class="notice-is-info">' . __( 'Please first configure this search form to search WooCommerce product post type.', 'ivory-search' ) . '</span>' ;
343
- }
344
-
345
- } else {
346
- IS_Help::woocommerce_inactive_field_notice();
347
  }
348
-
349
  ?>
350
  </div></div>
351
 
352
-
353
  <h3 scope="row">
354
  <label for="<?php
355
  echo $id ;
@@ -359,7 +474,7 @@ class IS_Search_Editor
359
  </h3>
360
  <div>
361
  <?php
362
- $content = __( 'Search posts of selected authors.', 'ivory-search' );
363
  IS_Help::help_info( $content );
364
  echo '<div>' ;
365
  $author_disable = ( is_fs()->is_plan_or_trial( 'pro' ) && $this->is_premium_plugin ? '' : ' disabled ' );
@@ -369,13 +484,30 @@ class IS_Search_Editor
369
  'fields' => array( 'ID', 'display_name' ),
370
  'orderby' => 'post_count',
371
  'order' => 'DESC',
372
- 'who' => 'authors',
373
  ) );
374
 
375
  if ( !empty($authors) ) {
376
  if ( '' !== $author_disable ) {
377
  echo '<div class="upgrade-parent">' . IS_Admin::pro_link() ;
378
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
379
  foreach ( $authors as $author ) {
380
  $post_count = count_user_posts( $author->ID );
381
  // Move on if user has not published a post (yet).
@@ -383,13 +515,14 @@ class IS_Search_Editor
383
  continue;
384
  }
385
  $checked = ( isset( $includes['author'][esc_attr( $author->ID )] ) ? $includes['author'][esc_attr( $author->ID )] : 0 );
386
- echo '<div class="col-wrapper check-radio"><label for="' . $id . '-author-' . esc_attr( $author->ID ) . '"><input class="_is_includes-author" type="checkbox" ' . $author_disable . ' id="' . $id . '-author-' . esc_attr( $author->ID ) . '" name="' . $id . '[author][' . esc_attr( $author->ID ) . ']" value="' . esc_attr( $author->ID ) . '" ' . checked( $author->ID, $checked, false ) . '/>' ;
387
- echo '<span class="toggle-check-text"></span> ' . ucfirst( esc_html( $author->display_name ) ) . '</label></div>' ;
388
  }
 
389
  }
390
 
391
  } else {
392
- echo '<span class="notice-is-info">' . esc_html__( "This search form is already configured in the Excludes section to not search for specific author posts.", 'ivory-search' ) . '</span>' ;
393
  }
394
 
395
  if ( '' !== $author_disable ) {
@@ -401,42 +534,6 @@ class IS_Search_Editor
401
  ?>
402
  </div></div>
403
 
404
- <h3 scope="row">
405
- <label for="<?php
406
- echo $id ;
407
- ?>-post_status"><?php
408
- echo esc_html( __( 'Post Status', 'ivory-search' ) ) ;
409
- ?></label>
410
- </h3>
411
- <div>
412
- <?php
413
- $content = __( 'Search posts having selected post statuses.', 'ivory-search' );
414
- IS_Help::help_info( $content );
415
- echo '<div>' ;
416
-
417
- if ( !isset( $excludes['post_status'] ) ) {
418
- $post_statuses = get_post_stati();
419
- $post_status_disable = ( is_fs()->is_plan_or_trial( 'pro' ) && $this->is_premium_plugin ? '' : ' disabled ' );
420
-
421
- if ( !empty($post_statuses) ) {
422
- if ( '' !== $post_status_disable ) {
423
- echo IS_Admin::pro_link() ;
424
- }
425
- foreach ( $post_statuses as $key => $post_status ) {
426
- $checked = ( isset( $includes['post_status'][esc_attr( $key )] ) ? $includes['post_status'][esc_attr( $key )] : 0 );
427
- echo '<div class="col-wrapper check-radio"><label for="' . $id . '-post_status-' . esc_attr( $key ) . '"><input class="_is_includes-post_status" type="checkbox" ' . $post_status_disable . ' id="' . $id . '-post_status-' . esc_attr( $key ) . '" name="' . $id . '[post_status][' . esc_attr( $key ) . ']" value="' . esc_attr( $key ) . '" ' . checked( $key, $checked, false ) . '/>' ;
428
- echo '<span class="toggle-check-text"></span> ' . ucwords( str_replace( '-', ' ', esc_html( $post_status ) ) ) . '</label></div>' ;
429
- }
430
- }
431
-
432
- } else {
433
- echo '<span class="notice-is-info">' . esc_html__( "This search form is already configured in the Excludes section to not search posts of specific post statuses.", 'ivory-search' ) . '</span>' ;
434
- }
435
-
436
- ?>
437
- </div></div>
438
-
439
-
440
  <h3 scope="row">
441
  <label for="<?php
442
  echo $id ;
@@ -446,7 +543,7 @@ class IS_Search_Editor
446
  </h3>
447
  <div>
448
  <?php
449
- $content = __( 'Search posts by comments.', 'ivory-search' );
450
  IS_Help::help_info( $content );
451
  echo '<div>' ;
452
  $comment_count_disable = ( is_fs()->is_plan_or_trial( 'pro' ) && $this->is_premium_plugin ? '' : ' disabled ' );
@@ -483,65 +580,62 @@ class IS_Search_Editor
483
  ?>
484
  </div></div>
485
 
486
-
487
  <h3 scope="row">
488
  <label for="<?php
489
  echo $id ;
490
- ?>-date_query"><?php
491
- echo esc_html( __( 'Date', 'ivory-search' ) ) ;
492
  ?></label>
493
  </h3>
494
  <div>
495
  <?php
496
- $content = __( 'Search posts created in the specified date range.', 'ivory-search' );
497
  IS_Help::help_info( $content );
498
  echo '<div>' ;
499
- $range = array( 'after', 'before' );
500
- foreach ( $range as $value ) {
501
- $col_title = ( 'after' == $value ? __( 'From', 'ivory-search' ) : __( 'To', 'ivory-search' ) );
502
- echo '<div class="col-wrapper ' . $value . '"><div class="col-title">' . $col_title . '</div>' ;
503
- echo '<select class="_is_includes-date_query" name="' . $id . '[date_query][' . $value . '][day]" >' ;
504
- $checked = ( isset( $includes['date_query'][$value]['day'] ) ? $includes['date_query'][$value]['day'] : 'day' );
505
- echo '<option value="day" ' . selected( 'day', $checked, false ) . '>' . esc_html( __( 'Day', 'ivory-search' ) ) . '</option>' ;
506
- for ( $d = 1 ; $d <= 31 ; $d++ ) {
507
- echo '<option value="' . $d . '" ' . selected( $d, $checked, false ) . '>' . $d . '</option>' ;
 
 
 
 
 
 
 
508
  }
509
- echo '</select>' ;
510
- echo '<select class="_is_includes-date_query" name="' . $id . '[date_query][' . $value . '][month]" >' ;
511
- $checked = ( isset( $includes['date_query'][$value]['month'] ) ? $includes['date_query'][$value]['month'] : 'month' );
512
- echo '<option value="month" ' . selected( 'month', $checked, false ) . '>' . esc_html( __( 'Month', 'ivory-search' ) ) . '</option>' ;
513
- for ( $m = 1 ; $m <= 12 ; $m++ ) {
514
- echo '<option value="' . $m . '" ' . selected( $m, $checked, false ) . '>' . date( 'F', mktime(
515
- 0,
516
- 0,
517
- 0,
518
- $m,
519
- 1
520
- ) ) . '</option>' ;
521
  }
522
- echo '</select>' ;
523
- echo '<select class="_is_includes-date_query" name="' . $id . '[date_query][' . $value . '][year]" >' ;
524
- $checked = ( isset( $includes['date_query'][$value]['year'] ) ? $includes['date_query'][$value]['year'] : 'year' );
525
- echo '<option value="year" ' . selected( 'year', $checked, false ) . '>' . esc_html( __( 'Year', 'ivory-search' ) ) . '</option>' ;
526
- for ( $y = date( "Y" ) ; $y >= 1995 ; $y-- ) {
527
- echo '<option value="' . $y . '" ' . selected( $y, $checked, false ) . '>' . $y . '</option>' ;
 
528
  }
529
- echo '</select></div>' ;
530
  }
 
531
  ?>
532
  </div></div>
533
 
534
-
535
  <h3 scope="row">
536
- <label for="<?php
537
  echo $id ;
538
  ?>-has_password"><?php
539
  echo esc_html( __( 'Password Protected', 'ivory-search' ) ) ;
540
  ?></label>
541
  </h3>
542
- <div>
543
  <?php
544
- echo '<div>' ;
545
  $checked = ( isset( $includes['has_password'] ) ? $includes['has_password'] : 'null' );
546
  echo '<p class="check-radio"><label for="' . $id . '-has_password" ><input class="_is_includes-has_password" type="radio" id="' . $id . '-has_password" name="' . $id . '[has_password]" value="null" ' . checked( 'null', $checked, false ) . '/>' ;
547
  echo '<span class="toggle-check-text"></span>' . esc_html__( "Search posts with or without passwords", 'ivory-search' ) . '</label></p>' ;
@@ -553,66 +647,72 @@ class IS_Search_Editor
553
  </div></div>
554
 
555
  <h3 scope="row">
556
- <label for="<?php
557
  echo $id ;
558
- ?>-post_file_type"><?php
559
- echo esc_html( __( 'Attachments, Media, Files & MIME Types', 'ivory-search' ) ) ;
560
  ?></label>
561
- <span class="actions"><a class="expand" href="#"><?php
562
  esc_html_e( 'Expand All', 'ivory-search' );
563
  ?></a><a class="collapse" href="#" style="display:none;"><?php
564
  esc_html_e( 'Collapse All', 'ivory-search' );
565
- ?></a></span></h3>
566
- <div>
567
- <?php
568
- $content = __( 'Search selected media, attachments, images, documents, videos, files or MIME types.', 'ivory-search' );
569
- IS_Help::help_info( $content );
570
- echo '<div>' ;
571
- global $wp_version ;
 
 
 
 
 
 
 
 
 
 
 
 
572
 
573
- if ( 4.9 <= $wp_version ) {
 
574
 
575
- if ( $default_search || isset( $includes['post_type'] ) && in_array( 'attachment', $includes['post_type'] ) ) {
576
-
577
- if ( !isset( $excludes['post_file_type'] ) ) {
578
- $file_types = get_allowed_mime_types();
 
 
579
 
580
- if ( !empty($file_types) ) {
581
- $file_type_disable = ( is_fs()->is_plan_or_trial( 'pro_plus' ) && $this->is_premium_plugin ? '' : ' disabled ' );
582
- ksort( $file_types );
583
- echo '<input class="list-search wide" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text">' ;
584
- echo '<select class="_is_includes-post_file_type" name="' . $id . '[post_file_type][]" ' . $file_type_disable . ' multiple size="8" >' ;
585
- foreach ( $file_types as $key => $file_type ) {
586
- $checked = ( isset( $includes['post_file_type'] ) && in_array( $file_type, $includes['post_file_type'] ) ? $file_type : 0 );
587
- echo '<option value="' . esc_attr( $file_type ) . '" ' . selected( $file_type, $checked, false ) . '>' . esc_html( $key ) . '</option>' ;
588
- }
589
- echo '</select>' ;
590
- echo IS_Admin::pro_link( 'pro_plus' ) ;
591
- echo '<br /><br /><label for="' . $id . '-post_file_type" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key & Left Mouse button to select multiple terms or deselect them.", 'ivory-search' ) . '</label>' ;
592
  }
593
 
594
- } else {
595
- echo '<span class="notice-is-info">' . esc_html__( "This search form is already configured in the Excludes section to not search specific file & MIME types.", 'ivory-search' ) . '</span>' ;
596
  }
597
-
598
- } else {
599
- echo '<span class="notice-is-info">' . __( 'Please first configure this search form to search Attachment post type.', 'ivory-search' ) . '</span>' ;
600
  }
601
-
602
- } else {
603
- echo '<span class="notice-is-info">' . __( 'You are using WordPress version less than 4.9 which does not support searching by MIME type.', 'ivory-search' ) . '</span>' ;
604
- }
605
-
606
-
607
- if ( isset( $includes['post_file_type'] ) ) {
608
- echo '<br />' . __( 'Selected File Types :', 'ivory-search' ) ;
609
- foreach ( $includes['post_file_type'] as $post_file_type ) {
610
- echo '<br /><span style="font-size: 11px;">' . $post_file_type . '</span>' ;
611
  }
 
 
 
 
 
 
612
  }
613
 
614
  ?>
615
  </div></div>
 
616
  </div>
617
 
618
  </div>
@@ -711,6 +811,7 @@ class IS_Search_Editor
711
  $id = '_is_ajax';
712
  $settings = $post->prop( $id );
713
  $includes = $post->prop( '_is_includes' );
 
714
  // If not have any settings saved then set default value for fields.
715
 
716
  if ( empty($settings) ) {
@@ -886,7 +987,7 @@ class IS_Search_Editor
886
  <!-- Description Length -->
887
  <div class="is-field <?php
888
  echo esc_attr( $id ) ;
889
- ?>-description_length_wrap">
890
  <input class="<?php
891
  echo esc_attr( $id ) ;
892
  ?>-description_length" min="1" type="number" id="<?php
@@ -1025,7 +1126,7 @@ class IS_Search_Editor
1025
  </p>
1026
  </div>
1027
  <!-- Minimum Number of Characters -->
1028
- <div class="<?php
1029
  echo esc_attr( $id ) ;
1030
  ?>-min_no_for_search_wrap">
1031
  <input class="<?php
@@ -1082,7 +1183,7 @@ class IS_Search_Editor
1082
  </p>
1083
  </div>
1084
  <!-- Show More Result -->
1085
- <div class="<?php
1086
  echo esc_attr( $id ) ;
1087
  ?>-show_more_result_wrap">
1088
  <p class="check-radio">
@@ -1236,7 +1337,7 @@ class IS_Search_Editor
1236
  } else {
1237
 
1238
  if ( !isset( $includes['post_type'] ) || !in_array( 'product', $includes['post_type'] ) ) {
1239
- echo '<span class="notice-is-info">' . __( 'Please first configure this search form to search WooCommerce product post type.', 'ivory-search' ) . '</span>' ;
1240
  } else {
1241
  ?>
1242
  <span class="is-field-disabled-message"><span class="message"><?php
@@ -1476,7 +1577,7 @@ class IS_Search_Editor
1476
  <?php
1477
  IS_Help::help_info( __( 'Below options only apply to matching categories or tags.', 'ivory-search' ) );
1478
  ?><br />
1479
- <label for="<?php
1480
  echo esc_attr( $id ) ;
1481
  ?>-product_list">
1482
  <?php
@@ -1505,14 +1606,14 @@ class IS_Search_Editor
1505
  ?>><?php
1506
  _e( 'On-sale Products</option>', 'ivory-search' );
1507
  ?></option>
1508
- </select>
1509
  </div>
1510
 
1511
  <!-- Order by -->
1512
  <div class="<?php
1513
  echo esc_attr( $id ) ;
1514
  ?>-order_by_wrap">
1515
- <label for="<?php
1516
  echo esc_attr( $id ) ;
1517
  ?>-order_by">
1518
  <?php
@@ -1546,14 +1647,14 @@ class IS_Search_Editor
1546
  ?>><?php
1547
  _e( 'Sales', 'ivory-search' );
1548
  ?></option>
1549
- </select>
1550
  </div>
1551
 
1552
  <!-- Order -->
1553
  <div class="<?php
1554
  echo esc_attr( $id ) ;
1555
  ?>-order_wrap">
1556
- <label for="<?php
1557
  echo esc_attr( $id ) ;
1558
  ?>-order">
1559
  <?php
@@ -1577,7 +1678,7 @@ class IS_Search_Editor
1577
  ?>><?php
1578
  _e( 'DESC', 'ivory-search' );
1579
  ?></option>
1580
- </select>
1581
  </div>
1582
 
1583
  <?php
@@ -1638,6 +1739,7 @@ class IS_Search_Editor
1638
  $excludes = $post->prop( $id );
1639
  $includes = $post->prop( '_is_includes' );
1640
  $default_search = ( NULL == $post->id() ? true : false );
 
1641
  ?>
1642
  <h4 class="panel-desc">
1643
  <?php
@@ -1649,22 +1751,7 @@ class IS_Search_Editor
1649
  ?>">
1650
  <div class="form-table form-table-panel-excludes">
1651
 
1652
- <h3 scope="row">
1653
- <label for="<?php
1654
- echo $id ;
1655
- ?>-post__not_in"><?php
1656
- echo esc_html( __( 'Posts, Pages & Custom Posts', 'ivory-search' ) ) ;
1657
- ?></label>
1658
- <span class="actions"><a class="expand" href="#"><?php
1659
- esc_html_e( 'Expand All', 'ivory-search' );
1660
- ?></a><a class="collapse" href="#" style="display:none;"><?php
1661
- esc_html_e( 'Collapse All', 'ivory-search' );
1662
- ?></a></span></h3>
1663
- <div>
1664
- <?php
1665
- $content = __( 'Exclude selected posts from search.', 'ivory-search' );
1666
- IS_Help::help_info( $content );
1667
- echo '<div>' ;
1668
  $post_types = get_post_types( array(
1669
  'public' => true,
1670
  'exclude_from_search' => false,
@@ -1672,24 +1759,72 @@ class IS_Search_Editor
1672
  if ( isset( $includes['post_type'] ) && !empty($includes['post_type']) && is_array( $includes['post_type'] ) ) {
1673
  $post_types = array_values( $includes['post_type'] );
1674
  }
1675
-
1676
- if ( !isset( $includes['post__in'] ) ) {
1677
- $posts_found = false;
1678
- foreach ( $post_types as $post_type ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1679
  $posts = get_posts( array(
1680
  'post_type' => $post_type,
1681
- 'posts_per_page' => 100,
1682
  'orderby' => 'title',
1683
  'order' => 'ASC',
1684
  ) );
 
 
 
1685
 
1686
  if ( !empty($posts) ) {
1687
  $posts_found = true;
1688
- $html = '<div class="col-wrapper"><div class="col-title">';
1689
  $col_title = '<span>' . ucwords( $post_type ) . '</span>';
1690
  $temp = '';
1691
- $selected_pt = array();
1692
  foreach ( $posts as $post2 ) {
 
 
 
 
1693
  $checked = ( isset( $excludes['post__not_in'] ) && in_array( $post2->ID, $excludes['post__not_in'] ) ? $post2->ID : 0 );
1694
  if ( $checked ) {
1695
  array_push( $selected_pt, $post_type );
@@ -1703,146 +1838,199 @@ class IS_Search_Editor
1703
  $html .= $col_title . '<input class="list-search" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text"></div>';
1704
  $html .= '<select class="_is_excludes-post__not_in" name="' . $id . '[post__not_in][]" multiple size="8" >';
1705
  $html .= $temp . '</select>';
1706
- if ( count( $posts ) >= 100 && !defined( 'DISABLE_IS_LOAD_ALL' ) ) {
1707
  $html .= '<div id="' . $post_type . '" class="load-all">' . __( 'Load All', 'ivory-search' ) . '</div>';
1708
  }
1709
  $html .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1710
  echo $html ;
 
 
1711
  }
1712
 
1713
  }
1714
 
1715
- if ( !$posts_found ) {
1716
- echo '<span class="notice-is-info">' . __( 'No posts created for selected post types.', 'ivory-search' ) . '</span>' ;
1717
- } else {
1718
- echo '<br /><label for="' . $id . '-post__not_in" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key & Left Mouse button to select multiple terms or deselect them.", 'ivory-search' ) . '</label>' ;
1719
- }
1720
-
1721
- } else {
1722
- echo '<span class="notice-is-info">' . __( 'This search form is already configured in the Includes section to search specific posts.', 'ivory-search' ) . '</span>' ;
1723
- }
1724
-
1725
- ?>
1726
- </div></div>
1727
-
1728
- <h3 scope="row">
1729
- <label for="<?php
1730
- echo $id ;
1731
- ?>-tax_query"><?php
1732
- esc_html_e( 'Category & Taxonomy Terms', 'ivory-search' );
1733
- ?></label>
1734
- </h3>
1735
- <div>
1736
- <?php
1737
- $content = __( 'Exclude posts of selected categories, taxonomies & terms from search.', 'ivory-search' );
1738
- IS_Help::help_info( $content );
1739
- echo '<div>' ;
1740
- $tax_objs = get_object_taxonomies( $post_types, 'objects' );
1741
-
1742
- if ( !empty($tax_objs) ) {
1743
- foreach ( $tax_objs as $key => $tax_obj ) {
1744
- $terms = get_terms( array(
1745
- 'taxonomy' => $key,
1746
- 'hide_empty' => false,
1747
- ) );
1748
-
1749
- if ( !empty($terms) ) {
1750
- echo '<div class="col-wrapper"><div class="col-title">' ;
1751
- $col_title = ucwords( str_replace( '-', ' ', str_replace( '_', ' ', esc_html( $key ) ) ) );
1752
- if ( isset( $excludes['tax_query'][$key] ) ) {
1753
- $col_title = '<strong>' . $col_title . '</strong>';
1754
- }
1755
- echo $col_title . '<input class="list-search" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text"></div><select class="_is_excludes-tax_query" name="' . $id . '[tax_query][' . $key . '][]" multiple size="8" >' ;
1756
- foreach ( $terms as $key2 => $term ) {
1757
- $checked = ( isset( $excludes['tax_query'][$key] ) && in_array( $term->term_taxonomy_id, $excludes['tax_query'][$key] ) ? $term->term_taxonomy_id : 0 );
1758
- echo '<option value="' . esc_attr( $term->term_taxonomy_id ) . '" ' . selected( $term->term_taxonomy_id, $checked, false ) . '>' . esc_html( $term->name ) . '</option>' ;
1759
  }
1760
- echo '</select></div>' ;
1761
  }
1762
-
1763
- }
1764
- echo '<br /><label for="' . $id . '-tax_query" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key & Left Mouse button to select multiple terms or deselect them.", 'ivory-search' ) . '</label>' ;
1765
- } else {
1766
- echo '<span class="notice-is-info">' . __( 'No taxonomies registered for selected post types.', 'ivory-search' ) . '</span>' ;
1767
- }
1768
-
1769
- ?>
1770
- </div></div>
1771
-
1772
-
1773
- <h3 scope="row">
1774
- <label for="<?php
1775
- echo $id ;
1776
- ?>-custom_field"><?php
1777
- echo esc_html( __( 'Custom Fields & Metadata', 'ivory-search' ) ) ;
1778
- ?></label>
1779
- </h3>
1780
- <div>
1781
- <?php
1782
- $content = __( 'Exclude posts having selected custom fields from search.', 'ivory-search' );
1783
- IS_Help::help_info( $content );
1784
- echo '<div>' ;
1785
- $meta_keys = $this->is_meta_keys( $post_types );
1786
-
1787
- if ( !empty($meta_keys) ) {
1788
- $custom_field_disable = ( is_fs()->is_plan_or_trial( 'pro' ) && $this->is_premium_plugin ? '' : ' disabled ' );
1789
- echo '<input class="list-search wide" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text">' ;
1790
- echo '<select class="_is_excludes-custom_field" name="' . $id . '[custom_field][]" ' . $custom_field_disable . ' multiple size="8" >' ;
1791
- foreach ( $meta_keys as $meta_key ) {
1792
- $checked = ( isset( $excludes['custom_field'] ) && in_array( $meta_key, $excludes['custom_field'] ) ? $meta_key : 0 );
1793
- echo '<option value="' . esc_attr( $meta_key ) . '" ' . selected( $meta_key, $checked, false ) . '>' . esc_html( $meta_key ) . '</option>' ;
1794
  }
1795
- echo '</select>' ;
1796
- echo IS_Admin::pro_link() ;
1797
- echo '<br /><br /><label for="' . $id . '-custom_field" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key & Left Mouse button to select multiple terms or deselect them.", 'ivory-search' ) . '</label>' ;
1798
- } else {
1799
- echo '<span class="notice-is-info">' . __( 'No custom fields created for selected post types.', 'ivory-search' ) . '</span>' ;
1800
- }
1801
-
1802
-
1803
- if ( isset( $excludes['custom_field'] ) ) {
1804
- echo '<br />' . __( 'Excluded Custom Fields :', 'ivory-search' ) ;
1805
- foreach ( $excludes['custom_field'] as $custom_field ) {
1806
- echo '<br /><span style="font-size: 11px;">' . $custom_field . '</span>' ;
 
 
 
 
 
 
 
 
 
 
 
 
1807
  }
1808
- }
1809
-
1810
- ?>
1811
- </div></div>
1812
-
1813
-
1814
- <h3 scope="row">
1815
- <label for="<?php
1816
- echo $id ;
1817
- ?>-woocommerce"><?php
1818
- echo esc_html( __( 'WooCommerce', 'ivory-search' ) ) ;
1819
- ?></label>
1820
- </h3>
1821
- <div>
1822
- <?php
1823
- $content = __( 'Exclude selected WooCommerce products from search.', 'ivory-search' );
1824
- IS_Help::help_info( $content );
1825
- echo '<div>' ;
1826
-
1827
- if ( class_exists( 'WooCommerce' ) ) {
1828
 
1829
- if ( in_array( 'product', $post_types ) ) {
 
1830
  $outofstock_disable = ( is_fs()->is_plan_or_trial( 'pro_plus' ) && $this->is_premium_plugin ? '' : ' disabled ' );
1831
  $checked = ( isset( $excludes['woo']['outofstock'] ) && $excludes['woo']['outofstock'] ? 1 : 0 );
1832
- echo '<p class="check-radio"><label for="' . $id . '-outofstock" ><input class="_is_excludes-woocommerce" type="checkbox" ' . $outofstock_disable . ' id="' . $id . '-outofstock" name="' . $id . '[woo][outofstock]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
1833
- echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude 'Out of Stock' products", 'ivory-search' ) . '</label></p>' ;
1834
  echo IS_Admin::pro_link( 'pro_plus' ) ;
1835
- } else {
1836
- echo '<span class="notice-is-info">' . __( 'Please first configure this search form to search WooCommerce product post type.', 'ivory-search' ) . '</span>' ;
1837
  }
1838
-
1839
- } else {
1840
- IS_Help::woocommerce_inactive_field_notice();
1841
- }
1842
-
1843
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1844
  </div></div>
1845
 
 
 
 
1846
 
1847
  <h3 scope="row">
1848
  <label for="<?php
@@ -1853,7 +2041,7 @@ class IS_Search_Editor
1853
  </h3>
1854
  <div>
1855
  <?php
1856
- $content = __( 'Exclude posts created by selected authors from search.', 'ivory-search' );
1857
  IS_Help::help_info( $content );
1858
  echo '<div>' ;
1859
 
@@ -1870,6 +2058,24 @@ class IS_Search_Editor
1870
  if ( '' !== $author_disable ) {
1871
  echo IS_Admin::pro_link() ;
1872
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1873
  foreach ( $authors as $author ) {
1874
  $post_count = count_user_posts( $author->ID );
1875
  // Move on if user has not published a post (yet).
@@ -1877,13 +2083,14 @@ class IS_Search_Editor
1877
  continue;
1878
  }
1879
  $checked = ( isset( $excludes['author'][esc_attr( $author->ID )] ) ? $excludes['author'][esc_attr( $author->ID )] : 0 );
1880
- echo '<div class="col-wrapper check-radio"><label for="' . $id . '-author-' . esc_attr( $author->ID ) . '"><input class="_is_excludes-author" type="checkbox" ' . $author_disable . ' id="' . $id . '-author-' . esc_attr( $author->ID ) . '" name="' . $id . '[author][' . esc_attr( $author->ID ) . ']" value="' . esc_attr( $author->ID ) . '" ' . checked( $author->ID, $checked, false ) . '/>' ;
1881
- echo '<span class="toggle-check-text"></span> ' . ucfirst( esc_html( $author->display_name ) ) . '</label></div>' ;
1882
  }
 
1883
  }
1884
 
1885
  } else {
1886
- echo '<span class="notice-is-info">' . esc_html__( "This search form is already configured in the Includes section to search posts created by specific authors.", 'ivory-search' ) . '</span>' ;
1887
  }
1888
 
1889
  ?>
@@ -1891,105 +2098,25 @@ class IS_Search_Editor
1891
 
1892
 
1893
  <h3 scope="row">
1894
- <label for="<?php
1895
  echo $id ;
1896
  ?>-post_status"><?php
1897
  echo esc_html( __( 'Post Status', 'ivory-search' ) ) ;
1898
  ?></label>
1899
- </h3>
1900
- <div>
1901
- <?php
1902
- $content = __( 'Exclude posts having selected post statuses from search.', 'ivory-search' );
1903
- IS_Help::help_info( $content );
1904
- echo '<div>' ;
1905
-
1906
- if ( !isset( $includes['post_status'] ) ) {
1907
- $post_statuses = get_post_stati();
1908
- $post_status_disable = ( is_fs()->is_plan_or_trial( 'pro' ) && $this->is_premium_plugin ? '' : ' disabled ' );
1909
-
1910
- if ( !empty($post_statuses) ) {
1911
- if ( '' !== $post_status_disable ) {
1912
- echo '<div class="upgrade-parent">' . IS_Admin::pro_link() ;
1913
- }
1914
- foreach ( $post_statuses as $key => $post_status ) {
1915
- $checked = ( isset( $excludes['post_status'][esc_attr( $key )] ) ? $excludes['post_status'][esc_attr( $key )] : 0 );
1916
- echo '<div class="col-wrapper check-radio"><label for="' . $id . '-post_status-' . esc_attr( $key ) . '"><input class="_is_excludes-post_status" type="checkbox" ' . $post_status_disable . ' id="' . $id . '-post_status-' . esc_attr( $key ) . '" name="' . $id . '[post_status][' . esc_attr( $key ) . ']" value="' . esc_attr( $key ) . '" ' . checked( $key, $checked, false ) . '/>' ;
1917
- echo '<span class="toggle-check-text"></span> ' . ucwords( str_replace( '-', ' ', esc_html( $post_status ) ) ) . '</label></div>' ;
1918
- }
1919
- if ( '' !== $post_status_disable ) {
1920
- echo '</div>' ;
1921
- }
1922
- }
1923
-
1924
- } else {
1925
- echo '<span class="notice-is-info">' . esc_html__( "This search form is already configured in the Includes section to search posts of specific post statuses.", 'ivory-search' ) . '</span>' ;
1926
- }
1927
-
1928
- $checked = ( isset( $excludes['ignore_sticky_posts'] ) && $excludes['ignore_sticky_posts'] ? 1 : 0 );
1929
- echo '<br /><br /><p class="check-radio"><label for="' . $id . '-ignore_sticky_posts" ><input class="_is_excludes-post_status" type="checkbox" id="' . $id . '-ignore_sticky_posts" name="' . $id . '[ignore_sticky_posts]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
1930
- echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude sticky posts from search", 'ivory-search' ) . '</label></p>' ;
1931
- ?>
1932
- </div></div>
1933
-
1934
- <h3 scope="row">
1935
- <label for="<?php
1936
- echo $id ;
1937
- ?>-post_file_type"><?php
1938
- echo esc_html( __( 'Attachments, Media, Files & MIME Types', 'ivory-search' ) ) ;
1939
- ?></label>
1940
- <span class="actions"><a class="expand" href="#"><?php
1941
  esc_html_e( 'Expand All', 'ivory-search' );
1942
  ?></a><a class="collapse" href="#" style="display:none;"><?php
1943
  esc_html_e( 'Collapse All', 'ivory-search' );
1944
- ?></a></span></h3>
 
1945
  <div>
1946
  <?php
1947
- $content = __( 'Exclude selected media, attachments, images, documents, videos, files or MIME types from search.', 'ivory-search' );
1948
  IS_Help::help_info( $content );
1949
  echo '<div>' ;
1950
- global $wp_version ;
1951
-
1952
- if ( 4.9 <= $wp_version ) {
1953
-
1954
- if ( $default_search || isset( $includes['post_type'] ) && in_array( 'attachment', $includes['post_type'] ) ) {
1955
-
1956
- if ( !isset( $includes['post_file_type'] ) ) {
1957
- $file_types = get_allowed_mime_types();
1958
-
1959
- if ( !empty($file_types) ) {
1960
- $file_type_disable = ( is_fs()->is_plan_or_trial( 'pro_plus' ) && $this->is_premium_plugin ? '' : ' disabled ' );
1961
- ksort( $file_types );
1962
- echo '<input class="list-search wide" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text">' ;
1963
- echo '<select class="_is_excludes-post_file_type" name="' . $id . '[post_file_type][]" ' . $file_type_disable . ' multiple size="8" >' ;
1964
- foreach ( $file_types as $key => $file_type ) {
1965
- $checked = ( isset( $excludes['post_file_type'] ) && in_array( $file_type, $excludes['post_file_type'] ) ? $file_type : 0 );
1966
- echo '<option value="' . esc_attr( $file_type ) . '" ' . selected( $file_type, $checked, false ) . '>' . esc_html( $key ) . '</option>' ;
1967
- }
1968
- echo '</select>' ;
1969
- echo IS_Admin::pro_link( 'pro_plus' ) ;
1970
- echo '<br /><br /><label for="' . $id . '-post_file_type" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key & Left Mouse button to select multiple terms or deselect them.", 'ivory-search' ) . '</label>' ;
1971
- }
1972
-
1973
- } else {
1974
- echo '<span class="notice-is-info">' . esc_html__( "This search form is already configured in the Includes section to search specific Attachments, Media or Files.", 'ivory-search' ) . '</span>' ;
1975
- }
1976
-
1977
- } else {
1978
- echo '<span class="notice-is-info">' . __( 'Please first configure this search form to search Attachment post type.', 'ivory-search' ) . '</span>' ;
1979
- }
1980
-
1981
- } else {
1982
- echo '<span class="notice-is-info">' . __( 'You are using WordPress version less than 4.9 which does not support searching by MIME type.', 'ivory-search' ) . '</span>' ;
1983
- }
1984
-
1985
-
1986
- if ( isset( $excludes['post_file_type'] ) ) {
1987
- echo '<br />' . __( 'Excluded File Types :', 'ivory-search' ) ;
1988
- foreach ( $excludes['post_file_type'] as $post_file_type ) {
1989
- echo '<br /><span style="font-size: 11px;">' . $post_file_type . '</span>' ;
1990
- }
1991
- }
1992
-
1993
  ?>
1994
  </div></div>
1995
  </div>
@@ -2119,11 +2246,10 @@ class IS_Search_Editor
2119
  $content = __( 'Select whether to search posts having all or any of the words being searched.', 'ivory-search' );
2120
  IS_Help::help_info( $content );
2121
  echo '<div>' ;
2122
- $term_rel_disable = ( is_fs()->is_plan_or_trial( 'pro' ) && $this->is_premium_plugin ? '' : ' disabled ' );
2123
  $checked = ( isset( $settings['term_rel'] ) && "OR" === $settings['term_rel'] ? "OR" : "AND" );
2124
- echo '<p class="check-radio"><label for="' . $id . '-term_rel_or" ><input class="_is_settings-term_rel" type="radio" ' . $term_rel_disable . ' id="' . $id . '-term_rel_or" name="' . $id . '[term_rel]" value="OR" ' . checked( 'OR', $checked, false ) . '/>' ;
2125
- echo '<span class="toggle-check-text"></span>' . esc_html__( "OR - Display content having any of the search terms", 'ivory-search' ) . '</label>' . IS_Admin::pro_link() . '</p>' ;
2126
- echo '<p class="check-radio"><label for="' . $id . '-term_rel_and" ><input class="_is_settings-term_rel" type="radio" ' . $term_rel_disable . ' id="' . $id . '-term_rel_and" name="' . $id . '[term_rel]" value="AND" ' . checked( 'AND', $checked, false ) . '/>' ;
2127
  echo '<span class="toggle-check-text"></span>' . esc_html__( "AND - Display content having all the search terms", 'ivory-search' ) . '</label></p>' ;
2128
  ?>
2129
  </div></div>
@@ -2160,7 +2286,7 @@ class IS_Search_Editor
2160
  <?php
2161
  $content = __( 'Select whether to search the base word of a searched keyword.', 'ivory-search' );
2162
  $content .= '<p>' . __( 'For Example: If you search "doing" then it also searches base word of "doing" that is "do" in the specified post types.', 'ivory-search' ) . '</p>';
2163
- $content .= '<p>' . __( 'Not recommended to use when Fuzzy Matching option is set to Whole.', 'ivory-search' ) . '</p>';
2164
  IS_Help::help_info( $content );
2165
  echo '<div>' ;
2166
  $stem_disable = ( is_fs()->is_plan_or_trial( 'pro_plus' ) && $this->is_premium_plugin ? '' : ' disabled ' );
@@ -2175,68 +2301,31 @@ class IS_Search_Editor
2175
  <h3 scope="row">
2176
  <label for="<?php
2177
  echo $id ;
2178
- ?>-move_sticky_posts"><?php
2179
- echo esc_html( __( 'Sticky Posts', 'ivory-search' ) ) ;
2180
  ?></label>
2181
- </h3>
 
 
 
 
2182
  <div><div>
2183
  <?php
2184
  $checked = ( isset( $settings['move_sticky_posts'] ) && $settings['move_sticky_posts'] ? 1 : 0 );
2185
  echo '<p class="check-radio"><label for="' . $id . '-move_sticky_posts" ><input class="_is_settings-move_sticky_posts" type="checkbox" id="' . $id . '-move_sticky_posts" name="' . $id . '[move_sticky_posts]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
2186
  echo '<span class="toggle-check-text"></span>' . esc_html__( "Display sticky posts to the start of the search results page", 'ivory-search' ) . '</label></p>' ;
2187
- ?>
2188
- </div></div>
2189
-
2190
-
2191
- <h3 scope="row">
2192
- <label for="<?php
2193
- echo $id ;
2194
- ?>-empty_search"><?php
2195
- echo esc_html( __( 'Empty Search Query', 'ivory-search' ) ) ;
2196
- ?></label>
2197
- </h3>
2198
- <div><?php
2199
- $content = __( 'Select whether to display an error when user perform search without any search word.', 'ivory-search' );
2200
- IS_Help::help_info( $content );
2201
- echo '<div>' ;
2202
- $checked = ( isset( $settings['empty_search'] ) && $settings['empty_search'] ? 1 : 0 );
2203
- echo '<p class="check-radio"><label for="' . $id . '-empty_search" ><input class="_is_settings-empty_search" type="checkbox" id="' . $id . '-empty_search" name="' . $id . '[empty_search]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
2204
- echo '<span class="toggle-check-text"></span>' . esc_html__( "Display an error for empty search query", 'ivory-search' ) . '</label></p>' ;
2205
- ?>
2206
- </div></div>
2207
-
2208
- <h3 scope="row">
2209
- <label for="<?php
2210
- echo $id ;
2211
- ?>-demo"><?php
2212
- echo esc_html( __( 'Demo Search', 'ivory-search' ) ) ;
2213
- ?></label>
2214
- </h3>
2215
- <div><div>
2216
- <?php
2217
  $checked = ( isset( $settings['demo'] ) && $settings['demo'] ? 1 : 0 );
2218
  echo '<p class="check-radio"><label for="' . $id . '-demo" ><input class="_is_settings-demo" type="checkbox" id="' . $id . '-demo" name="' . $id . '[demo]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
2219
  echo '<span class="toggle-check-text"></span>' . esc_html__( "Display search form only for site administrator", 'ivory-search' ) . '</label></p>' ;
2220
- ?>
2221
- </div></div>
2222
-
2223
-
2224
- <h3 scope="row">
2225
- <label for="<?php
2226
- echo $id ;
2227
- ?>-disable"><?php
2228
- echo esc_html( __( 'Disable Search', 'ivory-search' ) ) ;
2229
- ?></label>
2230
- <span class="actions"><a class="expand" href="#"><?php
2231
- esc_html_e( 'Expand All', 'ivory-search' );
2232
- ?></a><a class="collapse" href="#" style="display:none;"><?php
2233
- esc_html_e( 'Collapse All', 'ivory-search' );
2234
- ?></a></span></h3>
2235
- <div><div>
2236
- <?php
2237
  $checked = ( isset( $settings['disable'] ) && $settings['disable'] ? 1 : 0 );
2238
  echo '<p class="check-radio"><label for="' . $id . '-disable" ><input class="_is_settings-disable" type="checkbox" id="' . $id . '-disable" name="' . $id . '[disable]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
2239
  echo '<span class="toggle-check-text"></span>' . esc_html__( "Disable this search form", 'ivory-search' ) . '</label></p>' ;
 
 
 
 
 
 
2240
  ?>
2241
  </div></div>
2242
  </div>
15
  return preg_match( '/^[A-Za-z][-A-Za-z0-9_:.]*$/', $string );
16
  }
17
 
18
+ public function add_panel(
19
+ $id,
20
+ $title,
21
+ $callback,
22
+ $description
23
+ )
24
  {
25
  if ( $this->is_name( $id ) ) {
26
  $this->panels[$id] = array(
27
+ 'title' => $title,
28
+ 'callback' => $callback,
29
+ 'description' => $description,
30
  );
31
  }
32
  }
45
  foreach ( $this->panels as $id => $panel ) {
46
  $class = ( $tab == $id ? 'active' : '' );
47
  echo sprintf(
48
+ '<li id="%1$s-tab" class="%2$s"><a href="%3$s" title="%4$s">%5$s</a></li>',
49
  esc_attr( $id ),
50
  esc_attr( $class ),
51
  $url . '&tab=' . $id,
52
+ esc_attr( $panel['description'] ),
53
  esc_html( $panel['title'] )
54
  ) ;
55
  }
78
  * @global Object $wpdb WPDB object
79
  * @return Array array of meta keys
80
  */
81
+ function is_meta_keys( $post_type )
82
  {
83
  global $wpdb ;
84
+ $is_fields = $wpdb->get_results( apply_filters( 'is_meta_keys_query', "select DISTINCT meta_key from {$wpdb->postmeta} pt LEFT JOIN {$wpdb->posts} p ON (pt.post_id = p.ID) where meta_key NOT LIKE '\\_%' AND post_type IN ( '{$post_type}' ) ORDER BY meta_key ASC" ) );
 
85
  $meta_keys = array();
86
  if ( is_array( $is_fields ) && !empty($is_fields) ) {
87
  foreach ( $is_fields as $field ) {
103
  $excludes = $post->prop( '_is_excludes' );
104
  $settings = $post->prop( '_is_settings' );
105
  $default_search = ( NULL == $post->id() ? true : false );
106
+ $excludes_url = ( isset( $_REQUEST['post'] ) ? '<a href="' . esc_url( menu_page_url( 'ivory-search', false ) ) . '&post=' . $_REQUEST['post'] . '&action=edit&tab=excludes' . '">' . __( "Excludes", 'ivory-search' ) . '</a>' : '' );
107
  ?>
108
  <h4 class="panel-desc">
109
  <?php
137
  'public' => true,
138
  'exclude_from_search' => false,
139
  ) );
140
+ $post_types2 = array();
141
+
142
+ if ( $default_search ) {
143
+ $post_types2 = $post_types;
144
+ } else {
145
+ if ( isset( $includes['post_type'] ) && !empty($includes['post_type']) && is_array( $includes['post_type'] ) ) {
146
+ $post_types2 = array_values( $includes['post_type'] );
147
+ }
148
+ }
149
+
150
 
151
  if ( !empty($post_types) ) {
152
+ echo '<div class="is-cb-dropdown">' ;
153
+ echo '<div class="is-cb-title">' ;
154
+
155
+ if ( empty($post_types2) ) {
156
+ echo '<span class="is-cb-select">' . __( 'Select Post Types', 'ivory-search' ) . '</span><span class="is-cb-titles"></span>' ;
157
+ } else {
158
+ echo '<span style="display:none;" class="is-cb-select">' . __( 'Select Post Types', 'ivory-search' ) . '</span><span class="is-cb-titles">' ;
159
+ foreach ( $post_types2 as $post_type2 ) {
160
+ echo '<span title="' . $post_type2 . '"> ' . $post_type2 . '</span>' ;
161
+ }
162
+ echo '</span>' ;
163
+ }
164
+
165
+ echo '</div>' ;
166
+ echo '<div class="is-cb-multisel">' ;
167
  foreach ( $post_types as $key => $post_type ) {
168
  $checked = ( $default_search || isset( $includes['post_type'][esc_attr( $key )] ) ? esc_attr( $key ) : 0 );
 
169
  echo '<label for="' . $id . '-post_type-' . esc_attr( $key ) . '"> ' ;
170
  echo '<input class="_is_includes-post_type" type="checkbox" id="' . $id . '-post_type-' . esc_attr( $key ) . '" name="' . $id . '[post_type][' . esc_attr( $key ) . ']" value="' . esc_attr( $key ) . '" ' . checked( $key, $checked, false ) . '/>' ;
171
  echo '<span class="toggle-check-text"></span>' ;
172
+ echo ucfirst( esc_html( $post_type ) ) . '</label>' ;
173
  }
174
+ echo '</div></div>' ;
 
 
 
 
 
 
 
 
175
  } else {
176
+ echo '<span class="notice-is-info">' . __( 'No post types registered on the site.', 'ivory-search' ) . '</span>' ;
177
+ }
178
+
179
+
180
+ if ( isset( $includes['post_type'] ) && is_array( $includes['post_type'] ) && 1 == count( $includes['post_type'] ) ) {
181
+ $checked = ( isset( $includes['post_type_url'] ) ? 'y' : 'n' );
182
+ echo '<br /><p class="check-radio"><label for="' . $id . '-post_type_url"><input class="_is_includes-post_type_url" type="checkbox" id="' . $id . '-post_type_url" name="' . $id . '[post_type_url]" value="y" ' . checked( 'y', $checked, false ) . '/>' ;
183
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Do not display post_type in the search URL", 'ivory-search' ) . '</label></p>' ;
184
  }
185
 
186
  ?>
187
  </div></div>
188
 
189
+ <?php
190
+ $post_types = $post_types2;
191
+ foreach ( $post_types as $post_type ) {
192
+ $accord_title = $post_type . 's';
193
+
194
+ if ( 'product' == $post_type ) {
195
+ $accord_title .= ' <i>' . __( '( WooCommerce )', 'ivory-search' ) . '</i>';
196
+ } else {
197
+ if ( 'attachment' == $post_type ) {
198
+ $accord_title .= ' <i>' . __( '( Images, Videos, Audios, Docs, PDFs, Files & Media )', 'ivory-search' ) . '</i>';
199
+ }
200
+ }
201
+
202
+ ?>
203
+
204
+ <h3 scope="row" class="post-type-<?php
205
+ echo $post_type ;
206
+ ?>">
207
  <label for="<?php
208
+ echo $id ;
209
+ ?>-post__in"><?php
210
+ echo $accord_title ;
211
+ ?></label>
212
  </h3>
213
+ <div class="post-type-<?php
214
+ echo $post_type ;
215
+ ?>">
216
  <?php
217
+ echo '<div>' ;
218
+
219
+ if ( 'product' == $post_type && !class_exists( 'WooCommerce' ) ) {
220
+ IS_Help::woocommerce_inactive_field_notice();
221
+ echo '</div></div>' ;
222
+ continue;
223
+ }
224
+
225
+ $posts_found = false;
226
+ $posts_per_page = ( defined( 'DISABLE_IS_LOAD_ALL' ) || isset( $includes['post__in'] ) ? -1 : 100 );
227
  $posts = get_posts( array(
228
  'post_type' => $post_type,
229
+ 'posts_per_page' => $posts_per_page,
230
  'orderby' => 'title',
231
  'order' => 'ASC',
232
  ) );
233
+ $html = '<div class="is-posts">';
234
+ $selected_pt = array();
235
 
236
  if ( !empty($posts) ) {
237
  $posts_found = true;
238
+ $html .= '<div class="col-wrapper"><div class="col-title">';
239
+ $col_title = '<span>' . ucwords( $post_type ) . 's</span>';
240
  $temp = '';
 
241
  foreach ( $posts as $post2 ) {
242
+ if ( isset( $excludes['post__not_in'] ) && in_array( $post2->ID, $excludes['post__not_in'] ) ) {
243
+ continue;
244
+ }
245
  $checked = ( isset( $includes['post__in'] ) && in_array( $post2->ID, $includes['post__in'] ) ? $post2->ID : 0 );
246
  if ( $checked ) {
247
  array_push( $selected_pt, $post_type );
255
  $html .= $col_title . '<input class="list-search" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text"></div>';
256
  $html .= '<select class="_is_includes-post__in" name="' . $id . '[post__in][]" multiple size="8" >';
257
  $html .= $temp . '</select>';
258
+ if ( count( $posts ) >= 100 && !defined( 'DISABLE_IS_LOAD_ALL' ) && !isset( $includes['post__in'] ) ) {
259
  $html .= '<div id="' . $post_type . '" class="load-all">' . __( 'Load All', 'ivory-search' ) . '</div>';
260
  }
261
  $html .= '</div>';
 
262
  }
263
+
264
+
265
+ if ( !$posts_found ) {
266
+ $html .= '<br /><span class="notice-is-info">' . sprintf( __( 'No %ss created.', 'ivory-search' ), $post_type ) . '</span>';
267
+ } else {
268
+ $html .= '<br /><label for="' . $id . '-post__in" class="ctrl-multi-select">' . esc_html__( "Hold down the control (ctrl) or command button to select multiple options.", 'ivory-search' ) . '</label><br />';
269
+ }
270
+
271
+ $html .= '</div>';
272
+ $checked = 'all';
273
+
274
+ if ( !empty($selected_pt) && in_array( $post_type, $selected_pt ) ) {
275
+ $checked = 'selected';
276
+ } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
 
278
+ if ( isset( $includes['post__in'] ) ) {
279
+ echo '<span class="notice-is-info">' . __( 'The search form is configured to only search specific posts of another post type.', 'ivory-search' ) . '</span>' ;
280
+ echo '</div></div>' ;
281
+ continue;
282
+ }
283
+
284
+ }
285
+
286
+ echo '<p class="check-radio"><label for="' . $post_type . '-post-search_all" ><input class="is-post-select" type="radio" id="' . $post_type . '-post-search_all" name="' . $post_type . '[post_search_radio]" value="all" ' . checked( 'all', $checked, false ) . '/>' ;
287
+ echo '<span class="toggle-check-text"></span>' . sprintf( esc_html__( "Search all %ss", 'ivory-search' ), $post_type ) . '</label></p>' ;
288
+ echo '<p class="check-radio"><label for="' . $post_type . '-post-search_selected" ><input class="is-post-select" type="radio" id="' . $post_type . '-post-search_selected" name="' . $post_type . '[post_search_radio]" value="selected" ' . checked( 'selected', $checked, false ) . '/>' ;
289
+ echo '<span class="toggle-check-text"></span>' . sprintf( esc_html__( "Search only selected %ss", 'ivory-search' ), $post_type ) . '</label></p>' ;
290
+ echo $html ;
291
+ $tax_objs = get_object_taxonomies( $post_type, 'objects' );
292
+
293
+ if ( !empty($tax_objs) ) {
294
+ $html = '<div class="is-taxes">';
295
+ $selected_tax = false;
296
+ foreach ( $tax_objs as $key => $tax_obj ) {
297
+ $terms = get_terms( array(
298
+ 'taxonomy' => $key,
299
+ ) );
300
+
301
+ if ( !empty($terms) ) {
302
+ $html .= '<div class="col-wrapper"><div class="col-title">';
303
+ $col_title = ucwords( str_replace( '-', ' ', str_replace( '_', ' ', esc_html( $key ) ) ) );
304
+
305
+ if ( isset( $includes['tax_query'][$key] ) ) {
306
+ $col_title = '<strong>' . $col_title . '</strong>';
307
+ $selected_tax = true;
308
+ }
309
+
310
+ $html .= $col_title . '<input class="list-search" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text"></div><input type="hidden" id="' . $id . '-tax_post_type" name="' . $id . '[tax_post_type][' . $key . ']" value="' . implode( ',', $tax_obj->object_type ) . '" />';
311
+ $html .= '<select class="_is_includes-tax_query" name="' . $id . '[tax_query][' . $key . '][]" multiple size="8" >';
312
+ foreach ( $terms as $key2 => $term ) {
313
+ $checked = ( isset( $includes['tax_query'][$key] ) && in_array( $term->term_taxonomy_id, $includes['tax_query'][$key] ) ? $term->term_taxonomy_id : 0 );
314
+ $html .= '<option value="' . esc_attr( $term->term_taxonomy_id ) . '" ' . selected( $term->term_taxonomy_id, $checked, false ) . '>' . esc_html( $term->name ) . '</option>';
315
+ }
316
+ $html .= '</select></div>';
317
  }
318
+
319
  }
320
+ $html .= '<br /><label for="' . $id . '-tax_query" class="ctrl-multi-select">' . esc_html__( "Hold down the control (ctrl) or command button to select multiple options.", 'ivory-search' ) . '</label><br />';
321
+ $html .= '</div>';
322
+ $checked = ( $selected_tax ? 'selected' : 'all' );
323
+ echo '<br /><p class="check-radio"><label for="' . $post_type . '-tax-search_all" ><input class="is-tax-select" type="radio" id="' . $post_type . '-tax-search_all" name="' . $post_type . '[tax_search_radio]" value="all" ' . checked( 'all', $checked, false ) . '/>' ;
324
+ echo '<span class="toggle-check-text"></span>' . sprintf(
325
+ esc_html__( "Search %ss of all taxonomies (%s categories, tags & terms %s)", 'ivory-search' ),
326
+ $post_type,
327
+ '<i>',
328
+ '</i>'
329
+ ) . '</label></p>' ;
330
+ echo '<p class="check-radio"><label for="' . $post_type . '-tax-search_selected" ><input class="is-tax-select" type="radio" id="' . $post_type . '-tax-search_selected" name="' . $post_type . '[tax_search_radio]" value="selected" ' . checked( 'selected', $checked, false ) . '/>' ;
331
+ echo '<span class="toggle-check-text"></span>' . sprintf(
332
+ esc_html__( "Search %ss of only selected taxonomies (%s categories, tags & terms %s)", 'ivory-search' ),
333
+ $post_type,
334
+ '<i>',
335
+ '</i>'
336
+ ) . '</label></p>' ;
337
+ echo $html ;
338
+ }
339
 
340
+ $meta_keys = $this->is_meta_keys( $post_type );
341
+
342
+ if ( !empty($meta_keys) ) {
343
+ $html = '<div class="col-wrapper is-metas">';
344
+ $selected_meta = false;
345
+ $html .= '<input class="list-search wide" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text">';
346
+ $html .= '<select class="_is_includes-custom_field" name="' . $id . '[custom_field][]" multiple size="8" >';
347
+ foreach ( $meta_keys as $meta_key ) {
348
+ $checked = ( isset( $includes['custom_field'] ) && in_array( $meta_key, $includes['custom_field'] ) ? $meta_key : 0 );
349
+ if ( $checked ) {
350
+ $selected_meta = true;
351
+ }
352
+ $html .= '<option value="' . esc_attr( $meta_key ) . '" ' . selected( $meta_key, $checked, false ) . '>' . esc_html( $meta_key ) . '</option>';
353
+ }
354
+ $html .= '</select>';
355
+ $html .= '<br /><label for="' . $id . '-custom_field" class="ctrl-multi-select">' . esc_html__( "Hold down the control (ctrl) or command button to select multiple options.", 'ivory-search' ) . '</label><br />';
356
+ $html .= '</div>';
357
+ $checked = ( $selected_meta ? 'selected' : 'all' );
358
+ echo '<br /><p class="check-radio"><label for="' . $post_type . '-meta-search_selected" ><input class="is-meta-select" type="checkbox" id="' . $post_type . '-meta-search_selected" name="' . $post_type . '[meta_search_radio]" value="selected" ' . checked( 'selected', $checked, false ) . '/>' ;
359
+ echo '<span class="toggle-check-text"></span>' . sprintf( esc_html__( "Search selected %s custom fields values", 'ivory-search' ), $post_type ) . '</label></p>' ;
360
+ echo $html ;
361
  }
362
+
363
+
364
+ if ( 'product' == $post_type ) {
365
+ $woo_sku_disable = ( is_fs()->is_plan_or_trial( 'pro_plus' ) && $this->is_premium_plugin ? '' : ' disabled ' );
366
+ $checked = ( isset( $includes['woo']['sku'] ) && $includes['woo']['sku'] ? 1 : 0 );
367
+ echo '<br /><p class="check-radio"><label for="' . $id . '-sku" ><input class="_is_includes-woocommerce" type="checkbox" ' . $woo_sku_disable . ' id="' . $id . '-sku" name="' . $id . '[woo][sku]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
368
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search product SKU", 'ivory-search' ) . '</label></p>' ;
369
+ $checked = ( isset( $includes['woo']['variation'] ) && $includes['woo']['variation'] ? 1 : 0 );
370
+ echo '<p class="check-radio"><label for="' . $id . '-variation" ><input class="_is_includes-woocommerce" type="checkbox" ' . $woo_sku_disable . ' id="' . $id . '-variation" name="' . $id . '[woo][variation]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
371
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search product variation", 'ivory-search' ) . '</label>' ;
372
+ echo IS_Admin::pro_link( 'pro_plus' ) . '</p>' ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  }
374
+
375
+
376
+ if ( 'attachment' == $post_type ) {
377
+ global $wp_version ;
378
+
379
+ if ( 4.9 <= $wp_version ) {
380
+
381
+ if ( !isset( $excludes['post_file_type'] ) ) {
382
+ echo '<br />' ;
383
+ $file_types = get_allowed_mime_types();
384
+
385
+ if ( !empty($file_types) ) {
386
+ $file_type_disable = ( is_fs()->is_plan_or_trial( 'pro_plus' ) && $this->is_premium_plugin ? '' : ' disabled ' );
387
+ ksort( $file_types );
388
+ $html = '<br /><div class="is-mime">';
389
+ $html .= '<input class="list-search wide" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text">';
390
+ $html .= '<select class="_is_includes-post_file_type" name="' . $id . '[post_file_type][]" ' . $file_type_disable . ' multiple size="8" >';
391
+ foreach ( $file_types as $key => $file_type ) {
392
+ $checked = ( isset( $includes['post_file_type'] ) && in_array( $file_type, $includes['post_file_type'] ) ? $file_type : 0 );
393
+ $html .= '<option value="' . esc_attr( $file_type ) . '" ' . selected( $file_type, $checked, false ) . '>' . esc_html( $key ) . '</option>';
394
+ }
395
+ $html .= '</select>';
396
+ echo IS_Admin::pro_link( 'pro_plus' ) ;
397
+ $html .= '<br /><label for="' . $id . '-post_file_type" class="ctrl-multi-select">' . esc_html__( "Hold down the control (ctrl) or command button to select multiple options.", 'ivory-search' ) . '</label><br />';
398
+
399
+ if ( isset( $includes['post_file_type'] ) ) {
400
+ $html .= __( 'Selected File Types :', 'ivory-search' );
401
+ foreach ( $includes['post_file_type'] as $post_file_type ) {
402
+ $html .= '<br /><span style="font-size: 11px;">' . $post_file_type . '</span>';
403
+ }
404
+ }
405
+
406
+ $html .= '</div>';
407
+ $checked = ( isset( $includes['post_file_type'] ) && !empty($includes['post_file_type']) ? 'selected' : 'all' );
408
+ echo '<p class="check-radio"><label for="mime-search_all" ><input class="is-mime-select" type="radio" id="mime-search_all" name="mime_search_radio" value="all" ' . checked( 'all', $checked, false ) . '/>' ;
409
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search all MIME types", 'ivory-search' ) . '</label></p>' ;
410
+ echo '<p class="check-radio"><label for="mime-search_selected" ><input class="is-mime-select" type="radio" id="mime-search_selected" name="mime_search_radio" value="selected" ' . checked( 'selected', $checked, false ) . '/>' ;
411
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search only selected MIME types", 'ivory-search' ) . '</label></p>' ;
412
+ echo $html ;
413
+ echo '<span class="search-attachments-wrapper">' ;
414
+ echo '<p class="check-radio"><label for="' . $id . '-search_images"><input class="search-attachments" type="checkbox" id="' . $id . '-search_images" name="search_images" value="1" checked="checked" />' ;
415
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search Images", 'ivory-search' ) . '</label></p>' ;
416
+ echo '<p class="check-radio"><label for="' . $id . '-search_videos"><input class="search-attachments" type="checkbox" id="' . $id . '-search_videos" name="search_videos" value="1" checked="checked" />' ;
417
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search Videos", 'ivory-search' ) . '</label></p>' ;
418
+ echo '<p class="check-radio"><label for="' . $id . '-search_audios"><input class="search-attachments" type="checkbox" id="' . $id . '-search_audios" name="search_audios" value="1" checked="checked" />' ;
419
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search Audios", 'ivory-search' ) . '</label></p>' ;
420
+ echo '<p class="check-radio"><label for="' . $id . '-search_text"><input class="search-attachments" type="checkbox" id="' . $id . '-search_text" name="search_text" value="1" checked="checked" />' ;
421
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search Text Files", 'ivory-search' ) . '</label></p>' ;
422
+ echo '<p class="check-radio"><label for="' . $id . '-search_pdfs"><input class="search-attachments" type="checkbox" id="' . $id . '-search_pdfs" name="search_pdfs" value="1" checked="checked" />' ;
423
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search PDF Files", 'ivory-search' ) . '</label></p>' ;
424
+ echo '<p class="check-radio"><label for="' . $id . '-search_docs"><input class="search-attachments" type="checkbox" id="' . $id . '-search_docs" name="search_docs" value="1" checked="checked"/>' ;
425
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search Document Files", 'ivory-search' ) . '</label></p>' ;
426
+ echo '</span>' ;
427
+ }
428
+
429
+ } else {
430
+ echo '<br /><span class="notice-is-info">' . sprintf( esc_html__( "This search form is configured in the %s section to not search specific MIME types.", 'ivory-search' ), $excludes_url ) . '</span>' ;
431
+ }
432
+
433
+ } else {
434
+ echo '<br /><span class="notice-is-info">' . __( 'You are using WordPress version less than 4.9 which does not support searching by MIME type.', 'ivory-search' ) . '</span>' ;
435
+ }
436
+
437
  }
438
+
439
+ ?>
440
+ </div></div>
441
+ <?php
442
  }
 
443
  ?>
 
 
444
 
445
  <h3 scope="row">
446
  <label for="<?php
447
  echo $id ;
448
+ ?>-date_query"><?php
449
+ echo esc_html( __( 'Date', 'ivory-search' ) ) ;
450
  ?></label>
451
  </h3>
452
  <div>
453
  <?php
454
+ $content = __( 'Search posts created only in the specified date range.', 'ivory-search' );
455
  IS_Help::help_info( $content );
456
  echo '<div>' ;
457
+ $range = array( 'after', 'before' );
458
+ foreach ( $range as $value ) {
459
+ $col_title = ( 'after' == $value ? __( 'From', 'ivory-search' ) : __( 'To', 'ivory-search' ) );
460
+ echo '<div class="col-wrapper ' . $value . '"><div class="col-title">' . $col_title . '</div>' ;
461
+ $checked = ( isset( $includes['date_query'][$value]['date'] ) ? $includes['date_query'][$value]['date'] : '' );
462
+ echo '<input type="text" id="is-' . $value . '-datepicker" name="' . $id . '[date_query][' . $value . '][date]" value="' . $checked . '">' ;
463
+ echo '</div>' ;
 
 
 
 
 
 
 
 
 
 
 
464
  }
 
465
  ?>
466
  </div></div>
467
 
 
468
  <h3 scope="row">
469
  <label for="<?php
470
  echo $id ;
474
  </h3>
475
  <div>
476
  <?php
477
+ $content = __( 'Search posts created by selected authors.', 'ivory-search' );
478
  IS_Help::help_info( $content );
479
  echo '<div>' ;
480
  $author_disable = ( is_fs()->is_plan_or_trial( 'pro' ) && $this->is_premium_plugin ? '' : ' disabled ' );
484
  'fields' => array( 'ID', 'display_name' ),
485
  'orderby' => 'post_count',
486
  'order' => 'DESC',
 
487
  ) );
488
 
489
  if ( !empty($authors) ) {
490
  if ( '' !== $author_disable ) {
491
  echo '<div class="upgrade-parent">' . IS_Admin::pro_link() ;
492
  }
493
+ echo '<div class="is-cb-dropdown">' ;
494
+ echo '<div class="is-cb-title">' ;
495
+
496
+ if ( !isset( $includes['author'] ) || empty($includes['author']) ) {
497
+ echo '<span class="is-cb-select">' . __( 'Searches all author posts', 'ivory-search' ) . '</span><span class="is-cb-titles"></span>' ;
498
+ } else {
499
+ echo '<span style="display:none;" class="is-cb-select">' . __( 'Searches all author posts', 'ivory-search' ) . '</span><span class="is-cb-titles">' ;
500
+ foreach ( $includes['author'] as $author2 ) {
501
+ $display_name = get_userdata( $author2 );
502
+ if ( $display_name ) {
503
+ echo '<span title="' . ucfirst( esc_html( $display_name->display_name ) ) . '"> ' . esc_html( $display_name->display_name ) . '</span>' ;
504
+ }
505
+ }
506
+ echo '</span>' ;
507
+ }
508
+
509
+ echo '</div>' ;
510
+ echo '<div class="is-cb-multisel">' ;
511
  foreach ( $authors as $author ) {
512
  $post_count = count_user_posts( $author->ID );
513
  // Move on if user has not published a post (yet).
515
  continue;
516
  }
517
  $checked = ( isset( $includes['author'][esc_attr( $author->ID )] ) ? $includes['author'][esc_attr( $author->ID )] : 0 );
518
+ echo '<label for="' . $id . '-author-' . esc_attr( $author->ID ) . '"><input class="_is_includes-author" type="checkbox" ' . $author_disable . ' id="' . $id . '-author-' . esc_attr( $author->ID ) . '" name="' . $id . '[author][' . esc_attr( $author->ID ) . ']" value="' . esc_attr( $author->ID ) . '" ' . checked( $author->ID, $checked, false ) . '/>' ;
519
+ echo '<span class="toggle-check-text"></span> ' . ucfirst( esc_html( $author->display_name ) ) . '</label>' ;
520
  }
521
+ echo '</div></div>' ;
522
  }
523
 
524
  } else {
525
+ echo '<br /><span class="notice-is-info">' . sprintf( esc_html__( "This search form is configured in the %s section to not search for specific author posts.", 'ivory-search' ), $excludes_url ) . '</span>' ;
526
  }
527
 
528
  if ( '' !== $author_disable ) {
534
  ?>
535
  </div></div>
536
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  <h3 scope="row">
538
  <label for="<?php
539
  echo $id ;
543
  </h3>
544
  <div>
545
  <?php
546
+ $content = __( 'Search posts by configured comments.', 'ivory-search' );
547
  IS_Help::help_info( $content );
548
  echo '<div>' ;
549
  $comment_count_disable = ( is_fs()->is_plan_or_trial( 'pro' ) && $this->is_premium_plugin ? '' : ' disabled ' );
580
  ?>
581
  </div></div>
582
 
 
583
  <h3 scope="row">
584
  <label for="<?php
585
  echo $id ;
586
+ ?>-post_status"><?php
587
+ echo esc_html( __( 'Post Status', 'ivory-search' ) ) ;
588
  ?></label>
589
  </h3>
590
  <div>
591
  <?php
592
+ $content = __( 'Search posts having selected post statuses.', 'ivory-search' );
593
  IS_Help::help_info( $content );
594
  echo '<div>' ;
595
+ $post_statuses = get_post_stati();
596
+ $post_status_disable = ( is_fs()->is_plan_or_trial( 'pro' ) && $this->is_premium_plugin ? '' : ' disabled ' );
597
+
598
+ if ( !empty($post_statuses) ) {
599
+ if ( '' !== $post_status_disable ) {
600
+ echo IS_Admin::pro_link() ;
601
+ }
602
+ echo '<div class="is-cb-dropdown">' ;
603
+ echo '<div class="is-cb-title">' ;
604
+ if ( $default_search || !isset( $includes['post_status'] ) || empty($includes['post_status']) ) {
605
+ $includes = array(
606
+ 'post_status' => array(
607
+ 'publish' => 'publish',
608
+ 'inherit' => 'inherit',
609
+ ),
610
+ );
611
  }
612
+ echo '<span style="display:none;" class="is-cb-select">' . __( 'Select Post Status', 'ivory-search' ) . '</span><span class="is-cb-titles">' ;
613
+ foreach ( $includes['post_status'] as $post_status2 ) {
614
+ echo '<span title="' . esc_html( $post_status2 ) . '"> ' . str_replace( '-', ' ', esc_html( $post_status2 ) ) . '</span>' ;
 
 
 
 
 
 
 
 
 
615
  }
616
+ echo '</span>' ;
617
+ echo '</div>' ;
618
+ echo '<div class="is-cb-multisel">' ;
619
+ foreach ( $post_statuses as $key => $post_status ) {
620
+ $checked = ( isset( $includes['post_status'][esc_attr( $key )] ) ? $includes['post_status'][esc_attr( $key )] : 0 );
621
+ echo '<label for="' . $id . '-post_status-' . esc_attr( $key ) . '"><input class="_is_includes-post_status" type="checkbox" ' . $post_status_disable . ' id="' . $id . '-post_status-' . esc_attr( $key ) . '" name="' . $id . '[post_status][' . esc_attr( $key ) . ']" value="' . esc_attr( $key ) . '" ' . checked( $key, $checked, false ) . '/>' ;
622
+ echo '<span class="toggle-check-text"></span> ' . ucwords( str_replace( '-', ' ', esc_html( $post_status ) ) ) . '</label>' ;
623
  }
624
+ echo '</div></div>' ;
625
  }
626
+
627
  ?>
628
  </div></div>
629
 
 
630
  <h3 scope="row">
631
+ <label for="<?php
632
  echo $id ;
633
  ?>-has_password"><?php
634
  echo esc_html( __( 'Password Protected', 'ivory-search' ) ) ;
635
  ?></label>
636
  </h3>
637
+ <div><div>
638
  <?php
 
639
  $checked = ( isset( $includes['has_password'] ) ? $includes['has_password'] : 'null' );
640
  echo '<p class="check-radio"><label for="' . $id . '-has_password" ><input class="_is_includes-has_password" type="radio" id="' . $id . '-has_password" name="' . $id . '[has_password]" value="null" ' . checked( 'null', $checked, false ) . '/>' ;
641
  echo '<span class="toggle-check-text"></span>' . esc_html__( "Search posts with or without passwords", 'ivory-search' ) . '</label></p>' ;
647
  </div></div>
648
 
649
  <h3 scope="row">
650
+ <label for="<?php
651
  echo $id ;
652
+ ?>-extras"><?php
653
+ echo esc_html( __( 'Extras', 'ivory-search' ) ) ;
654
  ?></label>
655
+ <span class="actions"><a class="expand" href="#"><?php
656
  esc_html_e( 'Expand All', 'ivory-search' );
657
  ?></a><a class="collapse" href="#" style="display:none;"><?php
658
  esc_html_e( 'Collapse All', 'ivory-search' );
659
+ ?></a></span>
660
+ </h3>
661
+ <div><div class="includes_extras">
662
+ <?php
663
+ $checked = ( $default_search || isset( $includes['search_title'] ) && $includes['search_title'] ? 1 : 0 );
664
+ echo '<p class="check-radio"><label for="' . $id . '-search_title"><input class="_is_includes-post_type" type="checkbox" id="' . $id . '-search_title" name="' . $id . '[search_title]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
665
+ echo '<span class="toggle-check-text"></span>' . sprintf( esc_html__( "Search post title %s( File title )%s", 'ivory-search' ), '<i>', '</i>' ) . '</label></p>' ;
666
+ $checked = ( $default_search || isset( $includes['search_content'] ) && $includes['search_content'] ? 1 : 0 );
667
+ echo '<p class="check-radio"><label for="' . $id . '-search_content"><input class="_is_includes-post_type" type="checkbox" id="' . $id . '-search_content" name="' . $id . '[search_content]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
668
+ echo '<span class="toggle-check-text"></span>' . sprintf( esc_html__( "Search post content %s( File description )%s", 'ivory-search' ), '<i>', '</i>' ) . '</label></p>' ;
669
+ $checked = ( $default_search || isset( $includes['search_excerpt'] ) && $includes['search_excerpt'] ? 1 : 0 );
670
+ echo '<p class="check-radio"><label for="' . $id . '-search_excerpt"><input class="_is_includes-post_type" type="checkbox" id="' . $id . '-search_excerpt" name="' . $id . '[search_excerpt]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
671
+ echo '<span class="toggle-check-text"></span>' . sprintf( esc_html__( "Search post excerpt %s( File caption )%s", 'ivory-search' ), '<i>', '</i>' ) . '</label></p>' ;
672
+ $checked = ( isset( $includes['search_tax_title'] ) && $includes['search_tax_title'] ? 1 : 0 );
673
+ echo '<p class="check-radio"><label for="' . $id . '-search_tax_title" ><input class="_is_includes-tax_query" type="checkbox" id="' . $id . '-search_tax_title" name="' . $id . '[search_tax_title]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
674
+ echo '<span class="toggle-check-text"></span>' . sprintf( esc_html__( "Search category title %s( Displays posts of the category )%s", 'ivory-search' ), '<i>', '</i>' ) . '</label></p>' ;
675
+ $checked = ( isset( $includes['search_tax_desp'] ) && $includes['search_tax_desp'] ? 1 : 0 );
676
+ echo '<p class="check-radio"><label for="' . $id . '-search_tax_desp" ><input class="_is_includes-tax_query" type="checkbox" id="' . $id . '-search_tax_desp" name="' . $id . '[search_tax_desp]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
677
+ echo '<span class="toggle-check-text"></span>' . sprintf( esc_html__( "Search category description %s( Displays posts of the category )%s", 'ivory-search' ), '<i>', '</i>' ) . '</label></p>' ;
678
 
679
+ if ( isset( $includes['tax_query'] ) ) {
680
+ $tax_rel_disable = '';
681
 
682
+ if ( isset( $includes['tax_post_type'] ) ) {
683
+ $temp = array();
684
+ foreach ( $includes['tax_query'] as $key => $value ) {
685
+ if ( isset( $includes['tax_post_type'][$key] ) && (empty($temp) || !in_array( $includes['tax_post_type'][$key], $temp )) ) {
686
+ array_push( $temp, $includes['tax_post_type'][$key] );
687
+ }
688
 
689
+ if ( count( $temp ) > 1 ) {
690
+ $tax_rel_disable = 'disabled';
691
+ $includes['tax_rel'] = "OR";
692
+ break;
 
 
 
 
 
 
 
 
693
  }
694
 
 
 
695
  }
 
 
 
696
  }
697
+
698
+ echo '<p class="check-radio">' ;
699
+
700
+ if ( 'disabled' == $tax_rel_disable ) {
701
+ echo '<br />' ;
702
+ $content = __( 'Note: The below option is disabled and set to OR as you have configured the search form to search multiple taxonomies.', 'ivory-search' );
703
+ IS_Help::help_info( $content );
 
 
 
704
  }
705
+
706
+ $checked = ( isset( $includes['tax_rel'] ) && "AND" == $includes['tax_rel'] ? "AND" : "OR" );
707
+ echo '<label for="' . $id . '-tax_rel_and" ><input class="_is_includes-tax_query" type="radio" id="' . $id . '-tax_rel_and" ' . $tax_rel_disable . ' name="' . $id . '[tax_rel]" value="AND" ' . checked( 'AND', $checked, false ) . '/>' ;
708
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "AND - Search posts having all the above selected category terms", 'ivory-search' ) . '</label></p>' ;
709
+ echo '<p class="check-radio"><label for="' . $id . '-tax_rel_or" ><input class="_is_includes-tax_query" type="radio" id="' . $id . '-tax_rel_or" ' . $tax_rel_disable . ' name="' . $id . '[tax_rel]" value="OR" ' . checked( 'OR', $checked, false ) . '/>' ;
710
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "OR - Search posts having any one of the above selected category terms", 'ivory-search' ) . '</label></p>' ;
711
  }
712
 
713
  ?>
714
  </div></div>
715
+
716
  </div>
717
 
718
  </div>
811
  $id = '_is_ajax';
812
  $settings = $post->prop( $id );
813
  $includes = $post->prop( '_is_includes' );
814
+ $includes_url = ( isset( $_REQUEST['post'] ) ? '<a href="' . esc_url( menu_page_url( 'ivory-search', false ) ) . '&post=' . $_REQUEST['post'] . '&action=edit&tab=includes' . '">' . __( "Includes", 'ivory-search' ) . '</a>' : '' );
815
  // If not have any settings saved then set default value for fields.
816
 
817
  if ( empty($settings) ) {
987
  <!-- Description Length -->
988
  <div class="is-field <?php
989
  echo esc_attr( $id ) ;
990
+ ?>-description_length_wrap"><br />
991
  <input class="<?php
992
  echo esc_attr( $id ) ;
993
  ?>-description_length" min="1" type="number" id="<?php
1126
  </p>
1127
  </div>
1128
  <!-- Minimum Number of Characters -->
1129
+ <br /><div class="<?php
1130
  echo esc_attr( $id ) ;
1131
  ?>-min_no_for_search_wrap">
1132
  <input class="<?php
1183
  </p>
1184
  </div>
1185
  <!-- Show More Result -->
1186
+ <br /><div class="<?php
1187
  echo esc_attr( $id ) ;
1188
  ?>-show_more_result_wrap">
1189
  <p class="check-radio">
1337
  } else {
1338
 
1339
  if ( !isset( $includes['post_type'] ) || !in_array( 'product', $includes['post_type'] ) ) {
1340
+ echo '<br /><span class="notice-is-info">' . sprintf( esc_html__( "Please first configure this search form in the %s section to search WooCommerce product post type.", 'ivory-search' ), $includes_url ) . '</span><br />' ;
1341
  } else {
1342
  ?>
1343
  <span class="is-field-disabled-message"><span class="message"><?php
1577
  <?php
1578
  IS_Help::help_info( __( 'Below options only apply to matching categories or tags.', 'ivory-search' ) );
1579
  ?><br />
1580
+ <p><label for="<?php
1581
  echo esc_attr( $id ) ;
1582
  ?>-product_list">
1583
  <?php
1606
  ?>><?php
1607
  _e( 'On-sale Products</option>', 'ivory-search' );
1608
  ?></option>
1609
+ </select></p>
1610
  </div>
1611
 
1612
  <!-- Order by -->
1613
  <div class="<?php
1614
  echo esc_attr( $id ) ;
1615
  ?>-order_by_wrap">
1616
+ <p><label for="<?php
1617
  echo esc_attr( $id ) ;
1618
  ?>-order_by">
1619
  <?php
1647
  ?>><?php
1648
  _e( 'Sales', 'ivory-search' );
1649
  ?></option>
1650
+ </select></p>
1651
  </div>
1652
 
1653
  <!-- Order -->
1654
  <div class="<?php
1655
  echo esc_attr( $id ) ;
1656
  ?>-order_wrap">
1657
+ <p><label for="<?php
1658
  echo esc_attr( $id ) ;
1659
  ?>-order">
1660
  <?php
1678
  ?>><?php
1679
  _e( 'DESC', 'ivory-search' );
1680
  ?></option>
1681
+ </select></p>
1682
  </div>
1683
 
1684
  <?php
1739
  $excludes = $post->prop( $id );
1740
  $includes = $post->prop( '_is_includes' );
1741
  $default_search = ( NULL == $post->id() ? true : false );
1742
+ $includes_url = ( isset( $_REQUEST['post'] ) ? '<a href="' . esc_url( menu_page_url( 'ivory-search', false ) ) . '&post=' . $_REQUEST['post'] . '&action=edit&tab=includes' . '">' . __( "Includes", 'ivory-search' ) . '</a>' : '' );
1743
  ?>
1744
  <h4 class="panel-desc">
1745
  <?php
1751
  ?>">
1752
  <div class="form-table form-table-panel-excludes">
1753
 
1754
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1755
  $post_types = get_post_types( array(
1756
  'public' => true,
1757
  'exclude_from_search' => false,
1759
  if ( isset( $includes['post_type'] ) && !empty($includes['post_type']) && is_array( $includes['post_type'] ) ) {
1760
  $post_types = array_values( $includes['post_type'] );
1761
  }
1762
+ foreach ( $post_types as $key => $post_type ) {
1763
+ $accord_title = $post_type . 's';
1764
+
1765
+ if ( 'product' == $post_type ) {
1766
+ $accord_title .= ' <i>' . __( '( WooCommerce )', 'ivory-search' ) . '</i>';
1767
+ } else {
1768
+ if ( 'attachment' == $post_type ) {
1769
+ $accord_title .= ' <i>' . __( '( Images, Videos, Audios, Docs, PDFs, Files & Media )', 'ivory-search' ) . '</i>';
1770
+ }
1771
+ }
1772
+
1773
+ ?>
1774
+ <h3 scope="row">
1775
+ <label for="<?php
1776
+ echo $id ;
1777
+ ?>-post__not_in"><?php
1778
+ echo $accord_title ;
1779
+ ?></label>
1780
+ <?php
1781
+
1782
+ if ( is_numeric( $key ) && 0 == $key || 'post' === $key ) {
1783
+ ?>
1784
+ <span class="actions"><a class="expand" href="#"><?php
1785
+ esc_html_e( 'Expand All', 'ivory-search' );
1786
+ ?></a><a class="collapse" href="#" style="display:none;"><?php
1787
+ esc_html_e( 'Collapse All', 'ivory-search' );
1788
+ ?></a></span>
1789
+ <?php
1790
+ }
1791
+
1792
+ ?>
1793
+ </h3>
1794
+ <div>
1795
+ <?php
1796
+ echo '<div>' ;
1797
+
1798
+ if ( 'product' == $post_type && !class_exists( 'WooCommerce' ) ) {
1799
+ IS_Help::woocommerce_inactive_field_notice();
1800
+ echo '</div></div>' ;
1801
+ continue;
1802
+ }
1803
+
1804
+
1805
+ if ( 'attachment' != $post_type || !isset( $includes['post_file_type'] ) ) {
1806
+ $posts_found = false;
1807
+ $posts_per_page = ( defined( 'DISABLE_IS_LOAD_ALL' ) || isset( $excludes['post__not_in'] ) ? -1 : 100 );
1808
  $posts = get_posts( array(
1809
  'post_type' => $post_type,
1810
+ 'posts_per_page' => $posts_per_page,
1811
  'orderby' => 'title',
1812
  'order' => 'ASC',
1813
  ) );
1814
+ $html = '<div class="is-posts">';
1815
+ $selected_pt = array();
1816
+ $selected_pt2 = array();
1817
 
1818
  if ( !empty($posts) ) {
1819
  $posts_found = true;
1820
+ $html .= '<div class="col-wrapper"><div class="col-title">';
1821
  $col_title = '<span>' . ucwords( $post_type ) . '</span>';
1822
  $temp = '';
 
1823
  foreach ( $posts as $post2 ) {
1824
+ $checked = ( isset( $includes['post__in'] ) && in_array( $post2->ID, $includes['post__in'] ) ? $post2->ID : 0 );
1825
+ if ( $checked ) {
1826
+ array_push( $selected_pt2, $post_type );
1827
+ }
1828
  $checked = ( isset( $excludes['post__not_in'] ) && in_array( $post2->ID, $excludes['post__not_in'] ) ? $post2->ID : 0 );
1829
  if ( $checked ) {
1830
  array_push( $selected_pt, $post_type );
1838
  $html .= $col_title . '<input class="list-search" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text"></div>';
1839
  $html .= '<select class="_is_excludes-post__not_in" name="' . $id . '[post__not_in][]" multiple size="8" >';
1840
  $html .= $temp . '</select>';
1841
+ if ( count( $posts ) >= 100 && !defined( 'DISABLE_IS_LOAD_ALL' ) && !isset( $excludes['post__not_in'] ) ) {
1842
  $html .= '<div id="' . $post_type . '" class="load-all">' . __( 'Load All', 'ivory-search' ) . '</div>';
1843
  }
1844
  $html .= '</div>';
1845
+ }
1846
+
1847
+
1848
+ if ( !$posts_found ) {
1849
+ $html .= '<br /><span class="notice-is-info">' . sprintf( __( 'No %ss created.', 'ivory-search' ), $post_type ) . '</span>';
1850
+ } else {
1851
+ $html .= '<br /><label for="' . $id . '-post__not_in" class="ctrl-multi-select">' . esc_html__( "Hold down the control (ctrl) or command button to select multiple options.", 'ivory-search' ) . '</label><br />';
1852
+ }
1853
+
1854
+ $html .= '</div>';
1855
+ $checked = 'all';
1856
+
1857
+ if ( !empty($selected_pt) && in_array( $post_type, $selected_pt ) ) {
1858
+ $checked = 'selected';
1859
+ } else {
1860
+
1861
+ if ( empty($selected_pt2) && isset( $includes['post__in'] ) ) {
1862
+ echo '<br /><span class="notice-is-info">' . sprintf( esc_html__( "The search form is configured in the %s section to only search specific posts of another post type.", 'ivory-search' ), $includes_url ) . '</span>' ;
1863
+ echo '</div></div>' ;
1864
+ continue;
1865
+ }
1866
+
1867
+ }
1868
+
1869
+
1870
+ if ( empty($selected_pt2) ) {
1871
+ echo '<p class="check-radio"><label for="' . $post_type . '-post-search_all" ><input class="is-post-select" type="radio" id="' . $post_type . '-post-search_all" name="' . $post_type . '[post_search_radio]" value="all" ' . checked( 'all', $checked, false ) . '/>' ;
1872
+ echo '<span class="toggle-check-text"></span>' . sprintf( esc_html__( "Do not exclude any %s from search", 'ivory-search' ), $post_type ) . '</label></p>' ;
1873
+ echo '<p class="check-radio"><label for="' . $post_type . '-post-search_selected" ><input class="is-post-select" type="radio" id="' . $post_type . '-post-search_selected" name="' . $post_type . '[post_search_radio]" value="selected" ' . checked( 'selected', $checked, false ) . '/>' ;
1874
+ echo '<span class="toggle-check-text"></span>' . sprintf( esc_html__( "Exclude selected %ss from search", 'ivory-search' ), $post_type ) . '</label></p>' ;
1875
  echo $html ;
1876
+ } else {
1877
+ echo '<br /><span class="notice-is-info">' . sprintf( esc_html__( "The search form is configured in the %s section to only search specific posts.", 'ivory-search' ), $includes_url ) . '</span><br />' ;
1878
  }
1879
 
1880
  }
1881
 
1882
+ $tax_objs = get_object_taxonomies( $post_type, 'objects' );
1883
+
1884
+ if ( !empty($tax_objs) ) {
1885
+ $html = '<div class="is-taxes">';
1886
+ $selected_tax = false;
1887
+ foreach ( $tax_objs as $key => $tax_obj ) {
1888
+ $terms = get_terms( array(
1889
+ 'taxonomy' => $key,
1890
+ ) );
1891
+
1892
+ if ( !empty($terms) ) {
1893
+ $html .= '<div class="col-wrapper"><div class="col-title">';
1894
+ $col_title = ucwords( str_replace( '-', ' ', str_replace( '_', ' ', esc_html( $key ) ) ) );
1895
+
1896
+ if ( isset( $excludes['tax_query'][$key] ) ) {
1897
+ $col_title = '<strong>' . $col_title . '</strong>';
1898
+ $selected_tax = true;
1899
+ }
1900
+
1901
+ $html .= $col_title . '<input class="list-search" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text"></div><select class="_is_excludes-tax_query" name="' . $id . '[tax_query][' . $key . '][]" multiple size="8" >';
1902
+ foreach ( $terms as $key2 => $term ) {
1903
+ $checked = ( isset( $excludes['tax_query'][$key] ) && in_array( $term->term_taxonomy_id, $excludes['tax_query'][$key] ) ? $term->term_taxonomy_id : 0 );
1904
+ $html .= '<option value="' . esc_attr( $term->term_taxonomy_id ) . '" ' . selected( $term->term_taxonomy_id, $checked, false ) . '>' . esc_html( $term->name ) . '</option>';
1905
+ }
1906
+ $html .= '</select></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1907
  }
1908
+
1909
  }
1910
+ $html .= '<br /><label for="' . $id . '-tax_query" class="ctrl-multi-select">' . esc_html__( "Hold down the control (ctrl) or command button to select multiple options.", 'ivory-search' ) . '</label><br />';
1911
+ $html .= '</div>';
1912
+ $checked = ( $selected_tax ? 'selected' : 'all' );
1913
+ echo '<br /><p class="check-radio"><label for="' . $post_type . '-tax-search_all" ><input class="is-tax-select" type="radio" id="' . $post_type . '-tax-search_all" name="' . $post_type . '[tax_search_radio]" value="all" ' . checked( 'all', $checked, false ) . '/>' ;
1914
+ echo '<span class="toggle-check-text"></span>' . sprintf(
1915
+ esc_html__( "Do not exclude any %s from search of any taxonomies (%s categories, tags & terms %s)", 'ivory-search' ),
1916
+ $post_type,
1917
+ '<i>',
1918
+ '</i>'
1919
+ ) . '</label></p>' ;
1920
+ echo '<p class="check-radio"><label for="' . $post_type . '-tax-search_selected" ><input class="is-tax-select" type="radio" id="' . $post_type . '-tax-search_selected" name="' . $post_type . '[tax_search_radio]" value="selected" ' . checked( 'selected', $checked, false ) . '/>' ;
1921
+ echo '<span class="toggle-check-text"></span>' . sprintf(
1922
+ esc_html__( "Exclude %ss from search of selected taxonomies (%s categories, tags & terms %s)", 'ivory-search' ),
1923
+ $post_type,
1924
+ '<i>',
1925
+ '</i>'
1926
+ ) . '</label></p>' ;
1927
+ echo $html ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1928
  }
1929
+
1930
+ $meta_keys = $this->is_meta_keys( $post_type );
1931
+
1932
+ if ( !empty($meta_keys) ) {
1933
+ $html = '<div class="col-wrapper is-metas">';
1934
+ $selected_meta = false;
1935
+ $custom_field_disable = ( is_fs()->is_plan_or_trial( 'pro' ) && $this->is_premium_plugin ? '' : ' disabled ' );
1936
+ $html .= '<input class="list-search wide" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text">';
1937
+ $html .= '<select class="_is_excludes-custom_field" name="' . $id . '[custom_field][]" ' . $custom_field_disable . ' multiple size="8" >';
1938
+ foreach ( $meta_keys as $meta_key ) {
1939
+ $checked = ( isset( $excludes['custom_field'] ) && in_array( $meta_key, $excludes['custom_field'] ) ? $meta_key : 0 );
1940
+ if ( $checked ) {
1941
+ $selected_meta = true;
1942
+ }
1943
+ $html .= '<option value="' . esc_attr( $meta_key ) . '" ' . selected( $meta_key, $checked, false ) . '>' . esc_html( $meta_key ) . '</option>';
1944
+ }
1945
+ $html .= '</select>';
1946
+ $html .= IS_Admin::pro_link();
1947
+ $html .= '<br /><label for="' . $id . '-custom_field" class="ctrl-multi-select">' . esc_html__( "Hold down the control (ctrl) or command button to select multiple options.", 'ivory-search' ) . '</label><br />';
1948
+ $html .= '</div>';
1949
+ $checked = ( $selected_meta ? 'selected' : 'all' );
1950
+ echo '<br /><p class="check-radio"><label for="' . $post_type . '-meta-search_selected" ><input class="is-meta-select" type="checkbox" id="' . $post_type . '-meta-search_selected" name="' . $post_type . '[meta_search_radio]" value="selected" ' . checked( 'selected', $checked, false ) . '/>' ;
1951
+ echo '<span class="toggle-check-text"></span>' . sprintf( esc_html__( "Exclude %ss from search having selected custom fields", 'ivory-search' ), $post_type ) . '</label></p>' ;
1952
+ echo $html ;
1953
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1954
 
1955
+
1956
+ if ( 'product' == $post_type ) {
1957
  $outofstock_disable = ( is_fs()->is_plan_or_trial( 'pro_plus' ) && $this->is_premium_plugin ? '' : ' disabled ' );
1958
  $checked = ( isset( $excludes['woo']['outofstock'] ) && $excludes['woo']['outofstock'] ? 1 : 0 );
1959
+ echo '<br /><p class="check-radio"><label for="' . $id . '-outofstock" ><input class="_is_excludes-woocommerce" type="checkbox" ' . $outofstock_disable . ' id="' . $id . '-outofstock" name="' . $id . '[woo][outofstock]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
1960
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude 'Out of Stock' products from search", 'ivory-search' ) . '</label></p>' ;
1961
  echo IS_Admin::pro_link( 'pro_plus' ) ;
 
 
1962
  }
1963
+
1964
+
1965
+ if ( 'attachment' == $post_type ) {
1966
+ global $wp_version ;
1967
+
1968
+ if ( 4.9 <= $wp_version ) {
1969
+
1970
+ if ( !isset( $includes['post_file_type'] ) ) {
1971
+ echo '<br />' ;
1972
+ $file_types = get_allowed_mime_types();
1973
+
1974
+ if ( !empty($file_types) ) {
1975
+ $file_type_disable = ( is_fs()->is_plan_or_trial( 'pro_plus' ) && $this->is_premium_plugin ? '' : ' disabled ' );
1976
+ ksort( $file_types );
1977
+ $html = '<br /><div class="is-mime">';
1978
+ $html .= '<input class="list-search wide" placeholder="' . __( "Search..", 'ivory-search' ) . '" type="text">';
1979
+ $html .= '<select class="_is_excludes-post_file_type" name="' . $id . '[post_file_type][]" ' . $file_type_disable . ' multiple size="8" >';
1980
+ foreach ( $file_types as $key => $file_type ) {
1981
+ $checked = ( isset( $excludes['post_file_type'] ) && in_array( $file_type, $excludes['post_file_type'] ) ? $file_type : 0 );
1982
+ $html .= '<option value="' . esc_attr( $file_type ) . '" ' . selected( $file_type, $checked, false ) . '>' . esc_html( $key ) . '</option>';
1983
+ }
1984
+ $html .= '</select>';
1985
+ echo IS_Admin::pro_link( 'pro_plus' ) ;
1986
+ $html .= '<br /><label for="' . $id . '-post_file_type" class="ctrl-multi-select">' . esc_html__( "Hold down the control (ctrl) or command button to select multiple options.", 'ivory-search' ) . '</label><br />';
1987
+
1988
+ if ( isset( $excludes['post_file_type'] ) ) {
1989
+ $html .= __( 'Excluded File Types :', 'ivory-search' );
1990
+ foreach ( $excludes['post_file_type'] as $post_file_type ) {
1991
+ $html .= '<br /><span style="font-size: 11px;">' . $post_file_type . '</span>';
1992
+ }
1993
+ }
1994
+
1995
+ $html .= '</div>';
1996
+ $checked = ( isset( $excludes['post_file_type'] ) && !empty($excludes['post_file_type']) ? 'selected' : 'all' );
1997
+ echo '<p class="check-radio"><label for="mime-search_all" ><input class="is-mime-select" type="radio" id="mime-search_all" name="mime_search_radio" value="all" ' . checked( 'all', $checked, false ) . '/>' ;
1998
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search all MIME types", 'ivory-search' ) . '</label></p>' ;
1999
+ echo '<p class="check-radio"><label for="mime-search_selected" ><input class="is-mime-select" type="radio" id="mime-search_selected" name="mime_search_radio" value="selected" ' . checked( 'selected', $checked, false ) . '/>' ;
2000
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude selected MIME types from search", 'ivory-search' ) . '</label></p>' ;
2001
+ echo $html ;
2002
+ echo '<span class="search-attachments-wrapper">' ;
2003
+ echo '<p class="check-radio"><label for="' . $id . '-search_images"><input class="search-attachments exclude" type="checkbox" id="' . $id . '-search_images" name="search_images" value="1" />' ;
2004
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude Images", 'ivory-search' ) . '</label></p>' ;
2005
+ echo '<p class="check-radio"><label for="' . $id . '-search_videos"><input class="search-attachments exclude" type="checkbox" id="' . $id . '-search_videos" name="search_videos" value="1" />' ;
2006
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude Videos", 'ivory-search' ) . '</label></p>' ;
2007
+ echo '<p class="check-radio"><label for="' . $id . '-search_audios"><input class="search-attachments exclude" type="checkbox" id="' . $id . '-search_audios" name="search_audios" value="1" />' ;
2008
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude Audios", 'ivory-search' ) . '</label></p>' ;
2009
+ echo '<p class="check-radio"><label for="' . $id . '-search_text"><input class="search-attachments exclude" type="checkbox" id="' . $id . '-search_text" name="search_text" value="1" />' ;
2010
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude Text Files", 'ivory-search' ) . '</label></p>' ;
2011
+ echo '<p class="check-radio"><label for="' . $id . '-search_pdfs"><input class="search-attachments exclude" type="checkbox" id="' . $id . '-search_pdfs" name="search_pdfs" value="1" />' ;
2012
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude PDF Files", 'ivory-search' ) . '</label></p>' ;
2013
+ echo '<p class="check-radio"><label for="' . $id . '-search_docs"><input class="search-attachments exclude" type="checkbox" id="' . $id . '-search_docs" name="search_docs" value="1" />' ;
2014
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude Document Files", 'ivory-search' ) . '</label></p>' ;
2015
+ echo '</span>' ;
2016
+ }
2017
+
2018
+ } else {
2019
+ echo '<br /><span class="notice-is-info">' . sprintf( esc_html__( "This search form is configured in the %s section to search specific attachments.", 'ivory-search' ), $includes_url ) . '</span><br />' ;
2020
+ }
2021
+
2022
+ } else {
2023
+ echo '<span class="notice-is-info">' . __( 'You are using WordPress version less than 4.9 which does not support searching by MIME type.', 'ivory-search' ) . '</span>' ;
2024
+ }
2025
+
2026
+ }
2027
+
2028
+ ?>
2029
  </div></div>
2030
 
2031
+ <?php
2032
+ }
2033
+ ?>
2034
 
2035
  <h3 scope="row">
2036
  <label for="<?php
2041
  </h3>
2042
  <div>
2043
  <?php
2044
+ $content = __( 'Exclude posts from search created by selected authors.', 'ivory-search' );
2045
  IS_Help::help_info( $content );
2046
  echo '<div>' ;
2047
 
2058
  if ( '' !== $author_disable ) {
2059
  echo IS_Admin::pro_link() ;
2060
  }
2061
+ echo '<div class="is-cb-dropdown">' ;
2062
+ echo '<div class="is-cb-title">' ;
2063
+
2064
+ if ( !isset( $excludes['author'] ) || empty($excludes['author']) ) {
2065
+ echo '<span class="is-cb-select">' . __( 'Search all author posts', 'ivory-search' ) . '</span><span class="is-cb-titles"></span>' ;
2066
+ } else {
2067
+ echo '<span style="display:none;" class="is-cb-select">' . __( 'Search all author posts', 'ivory-search' ) . '</span><span class="is-cb-titles">' ;
2068
+ foreach ( $excludes['author'] as $author2 ) {
2069
+ $display_name = get_userdata( $author2 );
2070
+ if ( $display_name ) {
2071
+ echo '<span title="' . ucfirst( esc_html( $display_name->display_name ) ) . '"> ' . esc_html( $display_name->display_name ) . '</span>' ;
2072
+ }
2073
+ }
2074
+ echo '</span>' ;
2075
+ }
2076
+
2077
+ echo '</div>' ;
2078
+ echo '<div class="is-cb-multisel">' ;
2079
  foreach ( $authors as $author ) {
2080
  $post_count = count_user_posts( $author->ID );
2081
  // Move on if user has not published a post (yet).
2083
  continue;
2084
  }
2085
  $checked = ( isset( $excludes['author'][esc_attr( $author->ID )] ) ? $excludes['author'][esc_attr( $author->ID )] : 0 );
2086
+ echo '<label for="' . $id . '-author-' . esc_attr( $author->ID ) . '"><input class="_is_excludes-author" type="checkbox" ' . $author_disable . ' id="' . $id . '-author-' . esc_attr( $author->ID ) . '" name="' . $id . '[author][' . esc_attr( $author->ID ) . ']" value="' . esc_attr( $author->ID ) . '" ' . checked( $author->ID, $checked, false ) . '/>' ;
2087
+ echo '<span class="toggle-check-text"></span> ' . ucfirst( esc_html( $author->display_name ) ) . '</label>' ;
2088
  }
2089
+ echo '</div></div>' ;
2090
  }
2091
 
2092
  } else {
2093
+ echo '<br /><span class="notice-is-info">' . sprintf( esc_html__( "This search form is configured in the %s section to search posts created by specific authors.", 'ivory-search' ), $includes_url ) . '</span><br />' ;
2094
  }
2095
 
2096
  ?>
2098
 
2099
 
2100
  <h3 scope="row">
2101
+ <label for="<?php
2102
  echo $id ;
2103
  ?>-post_status"><?php
2104
  echo esc_html( __( 'Post Status', 'ivory-search' ) ) ;
2105
  ?></label>
2106
+ <span class="actions"><a class="expand" href="#"><?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2107
  esc_html_e( 'Expand All', 'ivory-search' );
2108
  ?></a><a class="collapse" href="#" style="display:none;"><?php
2109
  esc_html_e( 'Collapse All', 'ivory-search' );
2110
+ ?></a></span>
2111
+ </h3>
2112
  <div>
2113
  <?php
2114
+ $content = __( 'Exclude posts from search having selected post statuses.', 'ivory-search' );
2115
  IS_Help::help_info( $content );
2116
  echo '<div>' ;
2117
+ $checked = ( isset( $excludes['ignore_sticky_posts'] ) && $excludes['ignore_sticky_posts'] ? 1 : 0 );
2118
+ echo '<p class="check-radio"><label for="' . $id . '-ignore_sticky_posts" ><input class="_is_excludes-post_status" type="checkbox" id="' . $id . '-ignore_sticky_posts" name="' . $id . '[ignore_sticky_posts]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
2119
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude sticky posts from search", 'ivory-search' ) . '</label></p>' ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2120
  ?>
2121
  </div></div>
2122
  </div>
2246
  $content = __( 'Select whether to search posts having all or any of the words being searched.', 'ivory-search' );
2247
  IS_Help::help_info( $content );
2248
  echo '<div>' ;
 
2249
  $checked = ( isset( $settings['term_rel'] ) && "OR" === $settings['term_rel'] ? "OR" : "AND" );
2250
+ echo '<p class="check-radio"><label for="' . $id . '-term_rel_or" ><input class="_is_settings-term_rel" type="radio" id="' . $id . '-term_rel_or" name="' . $id . '[term_rel]" value="OR" ' . checked( 'OR', $checked, false ) . '/>' ;
2251
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "OR - Display content having any of the search terms", 'ivory-search' ) . '</label></p>' ;
2252
+ echo '<p class="check-radio"><label for="' . $id . '-term_rel_and" ><input class="_is_settings-term_rel" type="radio" id="' . $id . '-term_rel_and" name="' . $id . '[term_rel]" value="AND" ' . checked( 'AND', $checked, false ) . '/>' ;
2253
  echo '<span class="toggle-check-text"></span>' . esc_html__( "AND - Display content having all the search terms", 'ivory-search' ) . '</label></p>' ;
2254
  ?>
2255
  </div></div>
2286
  <?php
2287
  $content = __( 'Select whether to search the base word of a searched keyword.', 'ivory-search' );
2288
  $content .= '<p>' . __( 'For Example: If you search "doing" then it also searches base word of "doing" that is "do" in the specified post types.', 'ivory-search' ) . '</p>';
2289
+ $content .= '<p><span class="is-info-warning">' . __( 'Not recommended to use when Fuzzy Matching option is set to Whole.', 'ivory-search' ) . '</span></p>';
2290
  IS_Help::help_info( $content );
2291
  echo '<div>' ;
2292
  $stem_disable = ( is_fs()->is_plan_or_trial( 'pro_plus' ) && $this->is_premium_plugin ? '' : ' disabled ' );
2301
  <h3 scope="row">
2302
  <label for="<?php
2303
  echo $id ;
2304
+ ?>-extras"><?php
2305
+ echo esc_html( __( 'Extras', 'ivory-search' ) ) ;
2306
  ?></label>
2307
+ <span class="actions"><a class="expand" href="#"><?php
2308
+ esc_html_e( 'Expand All', 'ivory-search' );
2309
+ ?></a><a class="collapse" href="#" style="display:none;"><?php
2310
+ esc_html_e( 'Collapse All', 'ivory-search' );
2311
+ ?></a></span></h3>
2312
  <div><div>
2313
  <?php
2314
  $checked = ( isset( $settings['move_sticky_posts'] ) && $settings['move_sticky_posts'] ? 1 : 0 );
2315
  echo '<p class="check-radio"><label for="' . $id . '-move_sticky_posts" ><input class="_is_settings-move_sticky_posts" type="checkbox" id="' . $id . '-move_sticky_posts" name="' . $id . '[move_sticky_posts]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
2316
  echo '<span class="toggle-check-text"></span>' . esc_html__( "Display sticky posts to the start of the search results page", 'ivory-search' ) . '</label></p>' ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2317
  $checked = ( isset( $settings['demo'] ) && $settings['demo'] ? 1 : 0 );
2318
  echo '<p class="check-radio"><label for="' . $id . '-demo" ><input class="_is_settings-demo" type="checkbox" id="' . $id . '-demo" name="' . $id . '[demo]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
2319
  echo '<span class="toggle-check-text"></span>' . esc_html__( "Display search form only for site administrator", 'ivory-search' ) . '</label></p>' ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2320
  $checked = ( isset( $settings['disable'] ) && $settings['disable'] ? 1 : 0 );
2321
  echo '<p class="check-radio"><label for="' . $id . '-disable" ><input class="_is_settings-disable" type="checkbox" id="' . $id . '-disable" name="' . $id . '[disable]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
2322
  echo '<span class="toggle-check-text"></span>' . esc_html__( "Disable this search form", 'ivory-search' ) . '</label></p>' ;
2323
+ echo '<br /><p class="check-radio">' ;
2324
+ $content = __( 'Select whether to display an error when user perform search without any search word.', 'ivory-search' );
2325
+ IS_Help::help_info( $content );
2326
+ $checked = ( isset( $settings['empty_search'] ) && $settings['empty_search'] ? 1 : 0 );
2327
+ echo '<br /><label for="' . $id . '-empty_search" ><input class="_is_settings-empty_search" type="checkbox" id="' . $id . '-empty_search" name="' . $id . '[empty_search]" value="1" ' . checked( 1, $checked, false ) . '/>' ;
2328
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Display an error for empty search query", 'ivory-search' ) . '</label></p>' ;
2329
  ?>
2330
  </div></div>
2331
  </div>
admin/class-is-help.php CHANGED
@@ -134,12 +134,13 @@ class IS_Help {
134
 
135
  public static function woocommerce_inactive_field_notice( $echo = true ) {
136
 
137
- $message = __( 'Activate WooCommerce plugin to use this option.', 'ivory-search' );
 
138
 
139
  if( $echo ) {
140
- echo '<span class="notice-is-info"> ' . esc_html( $message ) . '</span>';
141
  } else {
142
- return '<span class="notice-is-info">' . esc_html( $message ) . '</span>';
143
  }
144
  }
145
  }
134
 
135
  public static function woocommerce_inactive_field_notice( $echo = true ) {
136
 
137
+ $woo_url = '<a href="'.admin_url('plugins.php').'" target="_blank">'.__( "WooCommerce", 'ivory-search' ).'</a>';
138
+ $message = sprintf( __( 'Activate %s plugin to use this option.', 'ivory-search' ), $woo_url );
139
 
140
  if( $echo ) {
141
+ echo '<span class="notice-is-info"> ' . $message . '</span>';
142
  } else {
143
+ return '<span class="notice-is-info">' . $message . '</span>';
144
  }
145
  }
146
  }
admin/class-is-settings-fields.php CHANGED
@@ -105,7 +105,7 @@ class IS_Settings_Fields
105
  echo '<h3 scope="row">' . $field['title'] ;
106
  }
107
 
108
- if ( 'Select Menu' == $field['title'] || 'Close Icon' == $field['title'] || 'Header Search' == $field['title'] || 'Default Search' == $field['title'] ) {
109
  echo '<span class="actions"><a class="expand" href="#">' . esc_html__( 'Expand All', 'ivory-search' ) . '</a><a class="collapse" href="#" style="display:none;">' . esc_html__( 'Collapse All', 'ivory-search' ) . '</a></span>' ;
110
  }
111
  echo '</h3><div>' ;
@@ -120,144 +120,95 @@ class IS_Settings_Fields
120
  function register_settings_fields()
121
  {
122
  if ( !empty($GLOBALS['pagenow']) && 'options.php' === $GLOBALS['pagenow'] ) {
123
- if ( isset( $_POST['is_settings'] ) ) {
124
  add_filter( 'whitelist_options', function ( $whitelist_options ) {
125
- $whitelist_options['ivory_search'][0] = 'is_settings';
126
  return $whitelist_options;
127
  } );
128
  }
129
  }
130
 
131
- if ( !isset( $_GET['tab'] ) || 'menu-search' == $_GET['tab'] ) {
132
  add_settings_section(
133
- 'ivory_search_section',
134
  '',
135
- array( $this, 'menu_search_section_desc' ),
136
  'ivory_search'
137
  );
138
  add_settings_field(
139
- 'ivory_search_locations',
140
- __( 'Select Menu', 'ivory-search' ),
141
- array( $this, 'menu_locations' ),
142
  'ivory_search',
143
- 'ivory_search_section'
144
  );
145
  add_settings_field(
146
- 'ivory_search_form',
147
- __( 'Search Form', 'ivory-search' ),
148
- array( $this, 'menu_search_form' ),
149
  'ivory_search',
150
- 'ivory_search_section'
151
  );
152
  add_settings_field(
153
- 'ivory_search_style',
154
- __( 'Form Style', 'ivory-search' ),
155
- array( $this, 'menu_form_style' ),
156
  'ivory_search',
157
- 'ivory_search_section'
158
  );
159
  add_settings_field(
160
- 'ivory_search_title',
161
- __( 'Menu Title', 'ivory-search' ),
162
- array( $this, 'menu_title' ),
163
  'ivory_search',
164
- 'ivory_search_section'
165
  );
166
  add_settings_field(
167
- 'ivory_search_classes',
168
- __( 'Menu Classes', 'ivory-search' ),
169
- array( $this, 'menu_classes' ),
170
  'ivory_search',
171
- 'ivory_search_section'
172
  );
173
  add_settings_field(
174
- 'ivory_search_gcse',
175
- __( 'Google CSE', 'ivory-search' ),
176
- array( $this, 'menu_google_cse' ),
177
  'ivory_search',
178
- 'ivory_search_section'
179
  );
180
  add_settings_field(
181
- 'ivory_search_close_icon',
182
- __( 'Close Icon', 'ivory-search' ),
183
- array( $this, 'menu_close_icon' ),
184
  'ivory_search',
185
- 'ivory_search_section'
186
  );
187
- register_setting( 'ivory_search', 'is_menu_search' );
 
 
 
 
 
 
 
188
  } else {
189
 
190
- if ( isset( $_GET['tab'] ) && 'settings' == $_GET['tab'] ) {
191
  add_settings_section(
192
- 'ivory_search_settings',
193
  '',
194
- array( $this, 'settings_section_desc' ),
195
  'ivory_search'
196
  );
197
  add_settings_field(
198
- 'ivory_search_header',
199
- __( 'Header Search', 'ivory-search' ),
200
- array( $this, 'header' ),
201
- 'ivory_search',
202
- 'ivory_search_settings'
203
- );
204
- add_settings_field(
205
- 'ivory_search_footer',
206
- __( 'Footer Search', 'ivory-search' ),
207
- array( $this, 'footer' ),
208
- 'ivory_search',
209
- 'ivory_search_settings'
210
- );
211
- add_settings_field(
212
- 'ivory_search_display_in_header',
213
- __( 'Mobile Search', 'ivory-search' ),
214
- array( $this, 'menu_search_in_header' ),
215
- 'ivory_search',
216
- 'ivory_search_settings'
217
- );
218
- add_settings_field(
219
- 'ivory_search_css',
220
- __( 'Custom CSS', 'ivory-search' ),
221
- array( $this, 'custom_css' ),
222
- 'ivory_search',
223
- 'ivory_search_settings'
224
- );
225
- add_settings_field(
226
- 'ivory_search_stopwords',
227
- __( 'Stopwords', 'ivory-search' ),
228
- array( $this, 'stopwords' ),
229
- 'ivory_search',
230
- 'ivory_search_settings'
231
- );
232
- add_settings_field(
233
- 'ivory_search_synonyms',
234
- __( 'Synonyms', 'ivory-search' ),
235
- array( $this, 'synonyms' ),
236
  'ivory_search',
237
- 'ivory_search_settings'
238
  );
239
- add_settings_field(
240
- 'not_load_files',
241
- __( 'Do Not Load Plugin Files', 'ivory-search' ),
242
- array( $this, 'plugin_files' ),
243
- 'ivory_search',
244
- 'ivory_search_settings'
245
- );
246
- add_settings_field(
247
- 'ivory_search_disable',
248
- __( 'Disable Search', 'ivory-search' ),
249
- array( $this, 'disable' ),
250
- 'ivory_search',
251
- 'ivory_search_settings'
252
- );
253
- add_settings_field(
254
- 'ivory_search_default',
255
- __( 'Default Search', 'ivory-search' ),
256
- array( $this, 'default_search' ),
257
- 'ivory_search',
258
- 'ivory_search_settings'
259
- );
260
- register_setting( 'ivory_search', 'is_settings' );
261
  }
262
 
263
  }
@@ -281,17 +232,20 @@ class IS_Settings_Fields
281
  }
282
 
283
  /**
284
- * Displays choose menu locations field.
285
  */
286
- function menu_locations()
287
  {
 
 
 
288
  $content = __( 'Display search form on selected menu.', 'ivory-search' );
289
  IS_Help::help_info( $content );
290
  $html = '';
 
291
  $menus = get_registered_nav_menus();
292
 
293
  if ( !empty($menus) ) {
294
- $check_value = '';
295
  foreach ( $menus as $location => $description ) {
296
 
297
  if ( has_nav_menu( $location ) ) {
@@ -315,59 +269,13 @@ class IS_Settings_Fields
315
  }
316
 
317
  echo '<div>' . $html . '</div>' ;
318
- }
319
-
320
- /**
321
- * Displays menu search form field.
322
- */
323
- function menu_search_form()
324
- {
325
- $content = __( 'Select search form that will control menu search functionality.', 'ivory-search' );
326
- IS_Help::help_info( $content );
327
- $html = '<p>';
328
- $form_disable = ( is_fs()->is_plan_or_trial( 'pro' ) && $this->is_premium_plugin ? false : true );
329
- if ( $form_disable ) {
330
- $html .= IS_Admin::pro_link();
331
- }
332
- $args = array(
333
- 'numberposts' => -1,
334
- 'post_type' => 'is_search_form',
335
- 'order' => 'ASC',
336
- );
337
- $posts = get_posts( $args );
338
-
339
- if ( !empty($posts) ) {
340
- $check_value = ( isset( $this->opt['menu_search_form'] ) ? $this->opt['menu_search_form'] : 0 );
341
- $check_value = ( $check_value ? $check_value : 'default' );
342
- $select_disable = ( $form_disable ? 'disabled' : '' );
343
- $html .= '<select class="ivory_search_form" ' . $select_disable . ' id="menu_search_form" name="is_menu_search[menu_search_form]" >';
344
- foreach ( $posts as $post ) {
345
- if ( ('default' === $check_value || $post->ID !== $check_value) && 'Default Search Form' === $post->post_title ) {
346
- $check_value = $post->ID;
347
- }
348
- $html .= '<option value="' . $post->ID . '"' . selected( $post->ID, $check_value, false ) . ' >' . $post->post_title . '</option>';
349
- if ( $form_disable && $post->ID === (int) $check_value ) {
350
- break;
351
- }
352
- }
353
- $html .= '</select>';
354
-
355
- if ( $check_value ) {
356
- $html .= '<a href="' . esc_url( menu_page_url( 'ivory-search', false ) ) . '&post=' . $check_value . '&action=edit"> ' . esc_html__( "Edit Search Form", 'ivory-search' ) . '</a>';
357
- } else {
358
- $html .= '<a href="' . esc_url( menu_page_url( 'ivory-search-new', false ) ) . '"> ' . esc_html__( "Create New", 'ivory-search' ) . '</a>';
359
- }
360
-
361
  }
362
-
363
- echo '</p><div>' . $html . '</div>' ;
364
- }
365
-
366
- /**
367
- * Displays form style field.
368
- */
369
- function menu_form_style()
370
- {
371
  $content = __( 'Select menu search form style.', 'ivory-search' );
372
  IS_Help::help_info( $content );
373
  $styles = array(
@@ -390,41 +298,85 @@ class IS_Settings_Fields
390
  $html .= '<span class="toggle-check-text"></span>' . esc_html( $style ) . '</label>';
391
  $html .= '</p>';
392
  }
393
- echo '<div>' . $html . '</div>' ;
394
- }
395
-
396
- /**
397
- * Displays search menu title field.
398
- */
399
- function menu_title()
400
- {
401
- $content = __( 'Add menu title to display in place of search icon.', 'ivory-search' );
402
- IS_Help::help_info( $content );
403
- $this->opt['add_search_to_menu_title'] = ( isset( $this->opt['add_search_to_menu_title'] ) ? $this->opt['add_search_to_menu_title'] : '' );
404
- $this->opt['menu_title'] = ( isset( $this->opt['menu_title'] ) ? $this->opt['menu_title'] : $this->opt['add_search_to_menu_title'] );
405
- $html = '<input class="ivory_search_title" type="text" class="ivory_search_title" id="is_menu_title" name="is_menu_search[menu_title]" value="' . esc_attr( $this->opt['menu_title'] ) . '" />';
406
- echo '<div>' . $html . '</div>' ;
407
- }
408
-
409
- /**
410
- * Displays search menu classes field.
411
- */
412
- function menu_classes()
413
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  $content = __( 'Add class to search form menu item.', 'ivory-search' );
415
  IS_Help::help_info( $content );
416
  $this->opt['add_search_to_menu_classes'] = ( isset( $this->opt['add_search_to_menu_classes'] ) ? $this->opt['add_search_to_menu_classes'] : '' );
417
  $this->opt['menu_classes'] = ( isset( $this->opt['menu_classes'] ) ? $this->opt['menu_classes'] : $this->opt['add_search_to_menu_classes'] );
418
  $html = '<input class="ivory_search_classes" type="text" class="ivory_search_classes" id="is_menu_classes" name="is_menu_search[menu_classes]" value="' . esc_attr( $this->opt['menu_classes'] ) . '" />';
419
  $html .= '<br /><label for="is_menu_classes" style="font-size: 10px;">' . esc_html__( "Add multiple classes seperated by space.", 'ivory-search' ) . '</label>';
420
- echo '<div>' . $html . '</div>' ;
421
- }
422
-
423
- /**
424
- * Displays google cse field.
425
- */
426
- function menu_google_cse()
427
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  $content = __( 'Add Google Custom Search( CSE ) search form code that will replace default search form.', 'ivory-search' );
429
  IS_Help::help_info( $content );
430
  $this->opt['add_search_to_menu_gcse'] = ( isset( $this->opt['add_search_to_menu_gcse'] ) ? $this->opt['add_search_to_menu_gcse'] : '' );
@@ -433,24 +385,6 @@ class IS_Settings_Fields
433
  echo '<div>' . $html . '</div>' ;
434
  }
435
 
436
- /**
437
- * Displays search form close icon field.
438
- */
439
- function menu_close_icon()
440
- {
441
- $check_value = ( isset( $this->opt['add_search_to_menu_close_icon'] ) ? $this->opt['add_search_to_menu_close_icon'] : 0 );
442
- $check_string = checked( 'add_search_to_menu_close_icon', $check_value, false );
443
-
444
- if ( $this->ivory_search ) {
445
- $check_value = ( isset( $this->opt['menu_close_icon'] ) ? $this->opt['menu_close_icon'] : 0 );
446
- $check_string = checked( 'menu_close_icon', $check_value, false );
447
- }
448
-
449
- $html = '<label for="menu_close_icon"><input class="ivory_search_close_icon" type="checkbox" id="menu_close_icon" name="is_menu_search[menu_close_icon]" value="menu_close_icon" ' . $check_string . ' />';
450
- $html .= '<span class="toggle-check-text"></span>' . esc_html__( 'Display search form close icon', 'ivory-search' ) . '</label>';
451
- echo '<div>' . $html . '</div>' ;
452
- }
453
-
454
  /**
455
  * Displays search form in site header.
456
  */
@@ -584,12 +518,12 @@ class IS_Settings_Fields
584
  {
585
  $content = __( 'Add synonyms here to make the searches find better results.', 'ivory-search' );
586
  $content .= '<br /><br />' . __( 'If you add bird = crow to the list of synonyms, searches for bird automatically become a search for bird crow and will thus match to posts that include either bird or crow.', 'ivory-search' );
587
- $content .= '<br /><br />' . __( 'This only works for search forms configured to search any of the search terms(OR) and not all search terms(AND).', 'ivory-search' );
588
  IS_Help::help_info( $content );
589
  $this->opt['synonyms'] = ( isset( $this->opt['synonyms'] ) ? $this->opt['synonyms'] : '' );
590
  $html = '<textarea class="ivory_search_synonyms" rows="4" id="synonyms" name="is_settings[synonyms]" >' . esc_attr( $this->opt['synonyms'] ) . '</textarea>';
591
- $html .= '<br /><label for="synonyms" style="font-size: 10px;">' . esc_html__( 'The format here is key = value;', 'ivory-search' ) . '</label>';
592
- $html .= '<br /><label for="synonyms" style="font-size: 10px;">' . esc_html__( 'Please separate every synonyms key = value pairs with semicolon.', 'ivory-search' ) . '</label>';
593
  echo '<div>' . $html . '</div>' ;
594
  $html = '';
595
  }
@@ -602,8 +536,8 @@ class IS_Settings_Fields
602
  $content = __( 'Enable below options to disable loading of plugin CSS and JavaScript files.', 'ivory-search' );
603
  IS_Help::help_info( $content );
604
  $styles = array(
605
- 'css' => __( 'Plugin CSS files', 'ivory-search' ),
606
- 'js' => __( 'Plugin JavaScript files', 'ivory-search' ),
607
  );
608
  $html = '';
609
  foreach ( $styles as $key => $file ) {
@@ -615,41 +549,44 @@ class IS_Settings_Fields
615
  $check_string = checked( $key, $check_value, false );
616
  }
617
 
618
- $html .= '<label for="not_load_files[' . esc_attr( $key ) . ']"><input class="not_load_files" type="checkbox" id="not_load_files[' . esc_attr( $key ) . ']" name="is_settings[not_load_files][' . esc_attr( $key ) . ']" value="' . esc_attr( $key ) . '" ' . $check_string . '/>';
 
 
 
619
  $html .= '<span class="toggle-check-text"></span>' . esc_html( $file ) . '</label>';
 
620
 
621
  if ( 'css' == $key ) {
622
  $html .= '<br /><label for="not_load_files[' . esc_attr( $key ) . ']" style="font-size: 10px;">' . esc_html__( 'If checked, you have to add following plugin file code into your child theme CSS file.', 'ivory-search' ) . '</label>';
623
  $html .= '<br /><a style="font-size: 13px;" target="_blank" href="' . plugins_url( '/public/css/ivory-search.css', IS_PLUGIN_FILE ) . '"/a>' . plugins_url( '/public/css/ivory-search.css', IS_PLUGIN_FILE ) . '</a>';
624
- $html .= '<br /><br />';
625
  } else {
626
  $html .= '<br /><label for="not_load_files[' . esc_attr( $key ) . ']" style="font-size: 10px;">' . esc_html__( "If checked, you have to add following plugin files code into your child theme JavaScript file.", 'ivory-search' ) . '</label>';
627
  $html .= '<br /><a style="font-size: 13px;" target="_blank" href="' . plugins_url( '/public/js/ivory-search.js', IS_PLUGIN_FILE ) . '"/a>' . plugins_url( '/public/js/ivory-search.js', IS_PLUGIN_FILE ) . '</a>';
628
  $html .= '<br /><a style="font-size: 13px;" target="_blank" href="' . plugins_url( '/public/js/is-highlight.js', IS_PLUGIN_FILE ) . '"/a>' . plugins_url( '/public/js/is-highlight.js', IS_PLUGIN_FILE ) . '</a>';
629
  $html .= '<br /><a style="font-size: 13px;" target="_blank" href="' . plugins_url( '/public/js/ivory-ajax-search.js', IS_PLUGIN_FILE ) . '"/a>' . plugins_url( '/public/js/ivory-ajax-search.js', IS_PLUGIN_FILE ) . '</a>';
630
  }
631
-
 
632
  }
633
  echo '<div>' . $html . '</div>' ;
634
  }
635
 
636
- /**
637
- * Disables search functionality on whole site.
638
- */
639
- function disable()
640
  {
 
 
 
641
  $check_value = ( isset( $this->opt['disable'] ) ? $this->opt['disable'] : 0 );
642
  $disable = checked( 1, $check_value, false );
643
  $html = '<label for="is_disable"><input class="ivory_search_disable" type="checkbox" id="is_disable" name="is_settings[disable]" value="1" ' . $disable . ' />';
644
  $html .= '<span class="toggle-check-text"></span>' . esc_html__( 'Disable search functionality on entire website', 'ivory-search' ) . '</label>';
645
- echo '<div>' . $html . '</div>' ;
646
- }
647
-
648
- /**
649
- * Controls default search functionality.
650
- */
651
- function default_search()
652
- {
653
  $check_value = ( isset( $this->opt['default_search'] ) ? $this->opt['default_search'] : 0 );
654
  $disable = checked( 1, $check_value, false );
655
  $html = '<label for="is_default_search"><input class="ivory_search_default" type="checkbox" id="is_default_search" name="is_settings[default_search]" value="1" ' . $disable . ' />';
105
  echo '<h3 scope="row">' . $field['title'] ;
106
  }
107
 
108
+ if ( 'Header Search' == $field['title'] || 'Extras' == $field['title'] ) {
109
  echo '<span class="actions"><a class="expand" href="#">' . esc_html__( 'Expand All', 'ivory-search' ) . '</a><a class="collapse" href="#" style="display:none;">' . esc_html__( 'Collapse All', 'ivory-search' ) . '</a></span>' ;
110
  }
111
  echo '</h3><div>' ;
120
  function register_settings_fields()
121
  {
122
  if ( !empty($GLOBALS['pagenow']) && 'options.php' === $GLOBALS['pagenow'] ) {
123
+ if ( isset( $_POST['is_menu_search'] ) ) {
124
  add_filter( 'whitelist_options', function ( $whitelist_options ) {
125
+ $whitelist_options['ivory_search'][0] = 'is_menu_search';
126
  return $whitelist_options;
127
  } );
128
  }
129
  }
130
 
131
+ if ( !isset( $_GET['tab'] ) || 'settings' == $_GET['tab'] ) {
132
  add_settings_section(
133
+ 'ivory_search_settings',
134
  '',
135
+ array( $this, 'settings_section_desc' ),
136
  'ivory_search'
137
  );
138
  add_settings_field(
139
+ 'ivory_search_header',
140
+ __( 'Header Search', 'ivory-search' ),
141
+ array( $this, 'header' ),
142
  'ivory_search',
143
+ 'ivory_search_settings'
144
  );
145
  add_settings_field(
146
+ 'ivory_search_footer',
147
+ __( 'Footer Search', 'ivory-search' ),
148
+ array( $this, 'footer' ),
149
  'ivory_search',
150
+ 'ivory_search_settings'
151
  );
152
  add_settings_field(
153
+ 'ivory_search_display_in_header',
154
+ __( 'Mobile Search', 'ivory-search' ),
155
+ array( $this, 'menu_search_in_header' ),
156
  'ivory_search',
157
+ 'ivory_search_settings'
158
  );
159
  add_settings_field(
160
+ 'ivory_search_css',
161
+ __( 'Custom CSS', 'ivory-search' ),
162
+ array( $this, 'custom_css' ),
163
  'ivory_search',
164
+ 'ivory_search_settings'
165
  );
166
  add_settings_field(
167
+ 'ivory_search_stopwords',
168
+ __( 'Stopwords', 'ivory-search' ),
169
+ array( $this, 'stopwords' ),
170
  'ivory_search',
171
+ 'ivory_search_settings'
172
  );
173
  add_settings_field(
174
+ 'ivory_search_synonyms',
175
+ __( 'Synonyms', 'ivory-search' ),
176
+ array( $this, 'synonyms' ),
177
  'ivory_search',
178
+ 'ivory_search_settings'
179
  );
180
  add_settings_field(
181
+ 'not_load_files',
182
+ __( 'Plugin Files', 'ivory-search' ),
183
+ array( $this, 'plugin_files' ),
184
  'ivory_search',
185
+ 'ivory_search_settings'
186
  );
187
+ add_settings_field(
188
+ 'ivory_search_extras',
189
+ __( 'Extras', 'ivory-search' ),
190
+ array( $this, 'extras' ),
191
+ 'ivory_search',
192
+ 'ivory_search_settings'
193
+ );
194
+ register_setting( 'ivory_search', 'is_settings' );
195
  } else {
196
 
197
+ if ( isset( $_GET['tab'] ) && 'menu-search' == $_GET['tab'] ) {
198
  add_settings_section(
199
+ 'ivory_search_section',
200
  '',
201
+ array( $this, 'menu_search_section_desc' ),
202
  'ivory_search'
203
  );
204
  add_settings_field(
205
+ 'ivory_search_locations',
206
+ __( 'Menu Search Form Settings', 'ivory-search' ),
207
+ array( $this, 'menu_settings' ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  'ivory_search',
209
+ 'ivory_search_section'
210
  );
211
+ register_setting( 'ivory_search', 'is_menu_search' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  }
213
 
214
  }
232
  }
233
 
234
  /**
235
+ * Displays menu settings fields.
236
  */
237
+ function menu_settings()
238
  {
239
+ /**
240
+ * Displays choose menu locations field.
241
+ */
242
  $content = __( 'Display search form on selected menu.', 'ivory-search' );
243
  IS_Help::help_info( $content );
244
  $html = '';
245
+ $check_value = '';
246
  $menus = get_registered_nav_menus();
247
 
248
  if ( !empty($menus) ) {
 
249
  foreach ( $menus as $location => $description ) {
250
 
251
  if ( has_nav_menu( $location ) ) {
269
  }
270
 
271
  echo '<div>' . $html . '</div>' ;
272
+ if ( !isset( $this->opt['menus'] ) && !isset( $this->opt['add_search_to_menu_locations'] ) || '' === $check_value ) {
273
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  }
275
+ echo '<br /><br />' ;
276
+ /**
277
+ * Displays form style field.
278
+ */
 
 
 
 
 
279
  $content = __( 'Select menu search form style.', 'ivory-search' );
280
  IS_Help::help_info( $content );
281
  $styles = array(
298
  $html .= '<span class="toggle-check-text"></span>' . esc_html( $style ) . '</label>';
299
  $html .= '</p>';
300
  }
301
+ echo '<div>' . $html . '</div><br /><br />' ;
302
+
303
+ if ( 'default' != $check_value ) {
304
+
305
+ if ( 'popup' != $check_value ) {
306
+ /**
307
+ * Displays search form close icon field.
308
+ */
309
+ $check_value = ( isset( $this->opt['add_search_to_menu_close_icon'] ) ? $this->opt['add_search_to_menu_close_icon'] : 0 );
310
+ $check_string = checked( 'add_search_to_menu_close_icon', $check_value, false );
311
+
312
+ if ( $this->ivory_search ) {
313
+ $check_value = ( isset( $this->opt['menu_close_icon'] ) ? $this->opt['menu_close_icon'] : 0 );
314
+ $check_string = checked( 'menu_close_icon', $check_value, false );
315
+ }
316
+
317
+ $html = '<label for="menu_close_icon"><input class="ivory_search_close_icon" type="checkbox" id="menu_close_icon" name="is_menu_search[menu_close_icon]" value="menu_close_icon" ' . $check_string . ' />';
318
+ $html .= '<span class="toggle-check-text"></span>' . esc_html__( 'Display search form close icon', 'ivory-search' ) . '</label>';
319
+ echo '<div>' . $html . '</div> <br /><br />' ;
320
+ }
321
+
322
+ /**
323
+ * Displays search menu title field.
324
+ */
325
+ $content = __( 'Add menu title to display in place of search icon.', 'ivory-search' );
326
+ IS_Help::help_info( $content );
327
+ $this->opt['add_search_to_menu_title'] = ( isset( $this->opt['add_search_to_menu_title'] ) ? $this->opt['add_search_to_menu_title'] : '' );
328
+ $this->opt['menu_title'] = ( isset( $this->opt['menu_title'] ) ? $this->opt['menu_title'] : $this->opt['add_search_to_menu_title'] );
329
+ $html = '<input class="ivory_search_title" type="text" class="ivory_search_title" id="is_menu_title" name="is_menu_search[menu_title]" value="' . esc_attr( $this->opt['menu_title'] ) . '" />';
330
+ echo '<div>' . $html . '</div> <br /><br />' ;
331
+ }
332
+
333
+ /**
334
+ * Displays search menu classes field.
335
+ */
336
  $content = __( 'Add class to search form menu item.', 'ivory-search' );
337
  IS_Help::help_info( $content );
338
  $this->opt['add_search_to_menu_classes'] = ( isset( $this->opt['add_search_to_menu_classes'] ) ? $this->opt['add_search_to_menu_classes'] : '' );
339
  $this->opt['menu_classes'] = ( isset( $this->opt['menu_classes'] ) ? $this->opt['menu_classes'] : $this->opt['add_search_to_menu_classes'] );
340
  $html = '<input class="ivory_search_classes" type="text" class="ivory_search_classes" id="is_menu_classes" name="is_menu_search[menu_classes]" value="' . esc_attr( $this->opt['menu_classes'] ) . '" />';
341
  $html .= '<br /><label for="is_menu_classes" style="font-size: 10px;">' . esc_html__( "Add multiple classes seperated by space.", 'ivory-search' ) . '</label>';
342
+ echo '<div>' . $html . '</div> <br /><br />' ;
343
+ /**
344
+ * Displays menu search form field.
345
+ */
346
+ $content = __( 'Select search form that will control menu search functionality.', 'ivory-search' );
347
+ IS_Help::help_info( $content );
348
+ $html = '';
349
+ $args = array(
350
+ 'numberposts' => -1,
351
+ 'post_type' => 'is_search_form',
352
+ 'order' => 'ASC',
353
+ );
354
+ $posts = get_posts( $args );
355
+
356
+ if ( !empty($posts) ) {
357
+ $check_value = ( isset( $this->opt['menu_search_form'] ) ? $this->opt['menu_search_form'] : 0 );
358
+ $check_value = ( $check_value ? $check_value : 'default' );
359
+ $html .= '<select class="ivory_search_form" id="menu_search_form" name="is_menu_search[menu_search_form]" >';
360
+ foreach ( $posts as $post ) {
361
+ if ( 'default' === $check_value && 'Default Search Form' === $post->post_title ) {
362
+ $check_value = $post->ID;
363
+ }
364
+ $html .= '<option value="' . $post->ID . '"' . selected( $post->ID, $check_value, false ) . ' >' . $post->post_title . '</option>';
365
+ }
366
+ $html .= '</select>';
367
+
368
+ if ( $check_value ) {
369
+ $html .= '<a href="' . esc_url( menu_page_url( 'ivory-search', false ) ) . '&post=' . $check_value . '&action=edit"> ' . esc_html__( "Edit Search Form", 'ivory-search' ) . '</a>';
370
+ } else {
371
+ $html .= '<a href="' . esc_url( menu_page_url( 'ivory-search-new', false ) ) . '"> ' . esc_html__( "Create New", 'ivory-search' ) . '</a>';
372
+ }
373
+
374
+ }
375
+
376
+ echo '<div>' . $html . '</div><br /><br />' ;
377
+ /**
378
+ * Displays google cse field.
379
+ */
380
  $content = __( 'Add Google Custom Search( CSE ) search form code that will replace default search form.', 'ivory-search' );
381
  IS_Help::help_info( $content );
382
  $this->opt['add_search_to_menu_gcse'] = ( isset( $this->opt['add_search_to_menu_gcse'] ) ? $this->opt['add_search_to_menu_gcse'] : '' );
385
  echo '<div>' . $html . '</div>' ;
386
  }
387
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
388
  /**
389
  * Displays search form in site header.
390
  */
518
  {
519
  $content = __( 'Add synonyms here to make the searches find better results.', 'ivory-search' );
520
  $content .= '<br /><br />' . __( 'If you add bird = crow to the list of synonyms, searches for bird automatically become a search for bird crow and will thus match to posts that include either bird or crow.', 'ivory-search' );
521
+ $content .= '<br /><br /><span class="is-info-warning">' . __( 'This only works for search forms configured to search any of the search terms(OR) and not all search terms(AND) in the search form Options.', 'ivory-search' ) . '</span>';
522
  IS_Help::help_info( $content );
523
  $this->opt['synonyms'] = ( isset( $this->opt['synonyms'] ) ? $this->opt['synonyms'] : '' );
524
  $html = '<textarea class="ivory_search_synonyms" rows="4" id="synonyms" name="is_settings[synonyms]" >' . esc_attr( $this->opt['synonyms'] ) . '</textarea>';
525
+ $html .= '<br /><label for="synonyms" style="font-size: 10px;">' . esc_html__( 'The format here is key = value', 'ivory-search' ) . '</label>';
526
+ $html .= '<br /><label for="synonyms" style="font-size: 10px;">' . esc_html__( 'Please add every synonyms key = value pairs on new line.', 'ivory-search' ) . '</label>';
527
  echo '<div>' . $html . '</div>' ;
528
  $html = '';
529
  }
536
  $content = __( 'Enable below options to disable loading of plugin CSS and JavaScript files.', 'ivory-search' );
537
  IS_Help::help_info( $content );
538
  $styles = array(
539
+ 'css' => __( 'Do not load plugin CSS files', 'ivory-search' ),
540
+ 'js' => __( 'Do not load plugin JavaScript files', 'ivory-search' ),
541
  );
542
  $html = '';
543
  foreach ( $styles as $key => $file ) {
549
  $check_string = checked( $key, $check_value, false );
550
  }
551
 
552
+ if ( 'js' == $key ) {
553
+ $html .= '<br />';
554
+ }
555
+ $html .= '<br /><label for="not_load_files[' . esc_attr( $key ) . ']"><input class="not_load_files" type="checkbox" id="not_load_files[' . esc_attr( $key ) . ']" name="is_settings[not_load_files][' . esc_attr( $key ) . ']" value="' . esc_attr( $key ) . '" ' . $check_string . '/>';
556
  $html .= '<span class="toggle-check-text"></span>' . esc_html( $file ) . '</label>';
557
+ $html .= '<span class="not-load-wrapper">';
558
 
559
  if ( 'css' == $key ) {
560
  $html .= '<br /><label for="not_load_files[' . esc_attr( $key ) . ']" style="font-size: 10px;">' . esc_html__( 'If checked, you have to add following plugin file code into your child theme CSS file.', 'ivory-search' ) . '</label>';
561
  $html .= '<br /><a style="font-size: 13px;" target="_blank" href="' . plugins_url( '/public/css/ivory-search.css', IS_PLUGIN_FILE ) . '"/a>' . plugins_url( '/public/css/ivory-search.css', IS_PLUGIN_FILE ) . '</a>';
562
+ $html .= '<br />';
563
  } else {
564
  $html .= '<br /><label for="not_load_files[' . esc_attr( $key ) . ']" style="font-size: 10px;">' . esc_html__( "If checked, you have to add following plugin files code into your child theme JavaScript file.", 'ivory-search' ) . '</label>';
565
  $html .= '<br /><a style="font-size: 13px;" target="_blank" href="' . plugins_url( '/public/js/ivory-search.js', IS_PLUGIN_FILE ) . '"/a>' . plugins_url( '/public/js/ivory-search.js', IS_PLUGIN_FILE ) . '</a>';
566
  $html .= '<br /><a style="font-size: 13px;" target="_blank" href="' . plugins_url( '/public/js/is-highlight.js', IS_PLUGIN_FILE ) . '"/a>' . plugins_url( '/public/js/is-highlight.js', IS_PLUGIN_FILE ) . '</a>';
567
  $html .= '<br /><a style="font-size: 13px;" target="_blank" href="' . plugins_url( '/public/js/ivory-ajax-search.js', IS_PLUGIN_FILE ) . '"/a>' . plugins_url( '/public/js/ivory-ajax-search.js', IS_PLUGIN_FILE ) . '</a>';
568
  }
569
+
570
+ $html .= '</span>';
571
  }
572
  echo '<div>' . $html . '</div>' ;
573
  }
574
 
575
+ function extras()
 
 
 
576
  {
577
+ /**
578
+ * Disables search functionality on whole site.
579
+ */
580
  $check_value = ( isset( $this->opt['disable'] ) ? $this->opt['disable'] : 0 );
581
  $disable = checked( 1, $check_value, false );
582
  $html = '<label for="is_disable"><input class="ivory_search_disable" type="checkbox" id="is_disable" name="is_settings[disable]" value="1" ' . $disable . ' />';
583
  $html .= '<span class="toggle-check-text"></span>' . esc_html__( 'Disable search functionality on entire website', 'ivory-search' ) . '</label>';
584
+ echo '<div>' . $html . '</div><br /><br />' ;
585
+ /**
586
+ * Controls default search functionality.
587
+ */
588
+ $content = __( 'Warning: Use with caution.', 'ivory-search' );
589
+ IS_Help::help_info( $content );
 
 
590
  $check_value = ( isset( $this->opt['default_search'] ) ? $this->opt['default_search'] : 0 );
591
  $disable = checked( 1, $check_value, false );
592
  $html = '<label for="is_default_search"><input class="ivory_search_default" type="checkbox" id="is_default_search" name="is_settings[default_search]" value="1" ' . $disable . ' />';
admin/css/ivory-search-admin.css CHANGED
@@ -17,7 +17,7 @@ br {
17
 
18
  #search-form-editor textarea,
19
  #search-form-editor input[type=text] {
20
- width: 99%;
21
  }
22
 
23
  #search-form-editor label {
@@ -275,6 +275,20 @@ h4.panel-desc::before,
275
  text-decoration: none;
276
  }
277
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  @media only screen and (min-width: 1420px) {
279
  #search-form-editor #search-form-editor-tabs {
280
  max-width: 185px;
@@ -338,22 +352,19 @@ h4.panel-desc::before,
338
 
339
  .is-help {
340
  color: #72777c;
341
- display: block;
342
  font-size: 13px;
 
343
  position: relative;
344
- padding: 5px;
345
- border: 1px solid #d4eff5;
346
- border-radius: 3px;
347
- background: #f2f6f9;
348
  }
349
 
350
  .is-help .dashicons-warning {
351
- float: left;
352
- }
353
-
354
- .is-help .is-info {
355
- padding-left: 25px;
356
- display: block;
357
  }
358
 
359
  .is-help::after {
@@ -362,6 +373,10 @@ h4.panel-desc::before,
362
  clear: both;
363
  }
364
 
 
 
 
 
365
  /*
366
  * Tabs
367
  */
@@ -482,6 +497,11 @@ h4.panel-desc {
482
  border-radius: 3px 3px 0 0;
483
  margin: 0.5em 0 0;
484
  border: 1px solid #e5e5e5;
 
 
 
 
 
485
  }
486
 
487
  #search-body .search-form-editor-panel {
@@ -546,7 +566,7 @@ h4.panel-desc {
546
 
547
  .form-table > div {
548
  background-color: #FFF;
549
- padding: 15px;
550
  border: 1px solid #e5e5e5;
551
  border-radius: 0 0 3px 3px;
552
  border-top: 0;
@@ -559,7 +579,6 @@ h4.panel-desc {
559
  }
560
 
561
  .form-table > div > div {
562
- padding: 10px;
563
  position: relative;
564
  }
565
 
@@ -569,12 +588,17 @@ h4.panel-desc {
569
  clear: both;
570
  }
571
 
 
 
 
 
572
  .form-table > div > div > p:first-of-type {
573
  margin-top: 0;
 
574
  }
575
 
576
- .form-table > div > div > p:last-of-type {
577
- margin-bottom: 0;
578
  }
579
 
580
  .is-field-disabled-message {
@@ -633,10 +657,16 @@ h4.panel-desc {
633
  border: 1px solid #ffb900;
634
  padding: 5px 15px;
635
  font-size: 12px;
636
- display: block;
637
  border-radius: 2px;
638
  }
639
 
 
 
 
 
 
 
640
  .upgrade-parent {
641
  position: relative;
642
  padding: 1em;
@@ -673,11 +703,6 @@ h4.panel-desc {
673
  background: #03ad5c;
674
  }
675
 
676
- @media only screen and (min-width: 1213px) {
677
- #search-form-editor .col-wrapper:nth-of-type(3n+0) {
678
- margin-right: 0;
679
- }
680
- }
681
 
682
  /*
683
  * Settings
@@ -685,9 +710,9 @@ h4.panel-desc {
685
 
686
  .col-wrapper {
687
  float: left;
688
- margin: 0 20px 15px 0;
689
  position: relative;
690
- width: 190px;
691
  }
692
 
693
  .col-wrapper .spinner {
@@ -724,6 +749,7 @@ h4.panel-desc {
724
  #wpbody .search-form-editor-panel select[multiple]{
725
  width: 100%;
726
  height: 150px;
 
727
  }
728
 
729
  .col-wrapper select[multiple] option {
@@ -752,8 +778,288 @@ h4.panel-desc {
752
  cursor: pointer;
753
  }
754
 
755
- @media screen and ( max-width: 450px ) {
756
- .col-wrapper {
757
- width: 100%;
758
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
759
  }
17
 
18
  #search-form-editor textarea,
19
  #search-form-editor input[type=text] {
20
+ width: 100%;
21
  }
22
 
23
  #search-form-editor label {
275
  text-decoration: none;
276
  }
277
 
278
+ .search-attachments-wrapper {
279
+ display: none;
280
+ }
281
+
282
+ @media only screen and (min-width: 1024px) {
283
+ .is-taxes .col-wrapper {
284
+ width: 48%;
285
+ }
286
+
287
+ .is-taxes .col-wrapper:nth-child(2n+1) {
288
+ margin-right: 2%;
289
+ }
290
+ }
291
+
292
  @media only screen and (min-width: 1420px) {
293
  #search-form-editor #search-form-editor-tabs {
294
  max-width: 185px;
352
 
353
  .is-help {
354
  color: #72777c;
355
+ display: inline-block;
356
  font-size: 13px;
357
+ font-style: italic;
358
  position: relative;
359
+ margin-bottom: 10px;
 
 
 
360
  }
361
 
362
  .is-help .dashicons-warning {
363
+ height: 16px;
364
+ width: 16px;
365
+ font-size: 16px;
366
+ vertical-align: text-top;
367
+ display: inline-block;
 
368
  }
369
 
370
  .is-help::after {
373
  clear: both;
374
  }
375
 
376
+ .is-info-warning {
377
+ color: #ce5454;
378
+ }
379
+
380
  /*
381
  * Tabs
382
  */
497
  border-radius: 3px 3px 0 0;
498
  margin: 0.5em 0 0;
499
  border: 1px solid #e5e5e5;
500
+ text-transform: capitalize;
501
+ }
502
+
503
+ #search-body .form-table h3 i {
504
+ font-weight: 100;
505
  }
506
 
507
  #search-body .search-form-editor-panel {
566
 
567
  .form-table > div {
568
  background-color: #FFF;
569
+ padding: 25px 15px;
570
  border: 1px solid #e5e5e5;
571
  border-radius: 0 0 3px 3px;
572
  border-top: 0;
579
  }
580
 
581
  .form-table > div > div {
 
582
  position: relative;
583
  }
584
 
588
  clear: both;
589
  }
590
 
591
+ .form-table > div > div > p:last-of-type {
592
+ margin-bottom: 0;
593
+ }
594
+
595
  .form-table > div > div > p:first-of-type {
596
  margin-top: 0;
597
+ margin-bottom: 1em;
598
  }
599
 
600
+ .form-table > div > div > br + p.check-radio {
601
+ margin-top: 0;
602
  }
603
 
604
  .is-field-disabled-message {
657
  border: 1px solid #ffb900;
658
  padding: 5px 15px;
659
  font-size: 12px;
660
+ display: inline-block;
661
  border-radius: 2px;
662
  }
663
 
664
+ .ctrl-multi-select {
665
+ font-size: 10px;
666
+ clear:both;
667
+ display:block;
668
+ }
669
+
670
  .upgrade-parent {
671
  position: relative;
672
  padding: 1em;
703
  background: #03ad5c;
704
  }
705
 
 
 
 
 
 
706
 
707
  /*
708
  * Settings
710
 
711
  .col-wrapper {
712
  float: left;
713
+ margin-top: 15px;
714
  position: relative;
715
+ width: 100%;
716
  }
717
 
718
  .col-wrapper .spinner {
749
  #wpbody .search-form-editor-panel select[multiple]{
750
  width: 100%;
751
  height: 150px;
752
+ overflow: overlay;
753
  }
754
 
755
  .col-wrapper select[multiple] option {
778
  cursor: pointer;
779
  }
780
 
781
+ .is-cb-title {
782
+ background-color: #fff;
783
+ border: 1px solid #CCC;
784
+ display: inline-block;
785
+ padding: 6px 12px;
786
+ -webkit-user-select: none;
787
+ -moz-user-select: none;
788
+ cursor: pointer;
789
+ -ms-user-select: none;
790
+ -o-user-select: none;
791
+ user-select: none;
792
+ text-transform: capitalize;
793
+ }
794
+
795
+ .is-cb-title::after {
796
+ font-family: dashicons;
797
+ content: "\f347";
798
+ color: #72777c;
799
+ font-size: 14px;
800
+ line-height: 1;
801
+ vertical-align: text-bottom;
802
+ font-weight: 800;
803
+ margin-left: 10px;
804
+ }
805
+
806
+ .is-cb-title:hover {
807
+ background-color: #ebebeb;
808
+ }
809
+
810
+ .is-cb-title.is-dropdown-toggle {
811
+ -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
812
+ box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
813
+ background-color: #ebebeb;
814
+ }
815
+
816
+ .is-cb-titles span:after {
817
+ content: ", ";
818
+ display: inline-block;
819
+ }
820
+
821
+ .is-cb-titles span:last-child:after {
822
+ display:none;
823
+ }
824
+
825
+ .is-cb-multisel {
826
+ width: auto;
827
+ display: none;
828
+ border-radius: 4px;
829
+ -webkit-box-shadow: 0 6px 12px rgba(0,0,0,0.175);
830
+ box-shadow: 0 6px 12px rgba(0,0,0,0.175);
831
+ position: absolute;
832
+ top: 100%;
833
+ left: 0;
834
+ background: #FFF;
835
+ border: 1px solid #CCC;
836
+ padding: 10px 15px;
837
+ z-index: 9999;
838
+ }
839
+
840
+ .is-cb-multisel > label {
841
+ display: block;
842
+ width: 190px;
843
+ margin: 10px 0;
844
+ float: left;
845
+ }
846
+
847
+ .is-cb-multisel > label:nth-child(2n+1) {
848
+ clear: both;
849
+ }
850
+
851
+ .is-cb-dropdown {
852
+ position: relative;
853
+ }
854
+
855
+ /* Date Picker Default Styles */
856
+ .ui-datepicker {
857
+ padding: 0;
858
+ margin: 0;
859
+ -webkit-border-radius: 0;
860
+ -moz-border-radius: 0;
861
+ border-radius: 0;
862
+ background-color: #fff;
863
+ border: 1px solid #dfdfdf;
864
+ border-top: none;
865
+ -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
866
+ box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
867
+ min-width: 17em;
868
+ width: auto;
869
+ z-index: 1000 !important;
870
+ }
871
+
872
+ body.wp-admin:not(.rtl) .ui-datepicker {
873
+ margin-left: -1px;
874
+ }
875
+
876
+ body.wp-admin.rtl .ui-datepicker {
877
+ margin-right: -1px;
878
+ }
879
+
880
+ .ui-datepicker * {
881
+ padding: 0;
882
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
883
+ -webkit-border-radius: 0;
884
+ -moz-border-radius: 0;
885
+ border-radius: 0;
886
+ }
887
+
888
+ .ui-datepicker table {
889
+ font-size: 13px;
890
+ margin: 0;
891
+ border: none;
892
+ border-collapse: collapse;
893
+ }
894
+
895
+ .ui-datepicker .ui-widget-header,
896
+ .ui-datepicker .ui-datepicker-header {
897
+ background-image: none;
898
+ border: none;
899
+ color: #fff;
900
+ font-weight: normal;
901
+ }
902
+
903
+ .ui-datepicker .ui-datepicker-header .ui-state-hover {
904
+ background: transparent;
905
+ border-color: transparent;
906
+ cursor: pointer;
907
+ }
908
+
909
+ .ui-datepicker .ui-datepicker-title {
910
+ margin: 0;
911
+ padding: 4px 0;
912
+ color: #fff;
913
+ font-size: 14px;
914
+ line-height: 14px;
915
+ text-align: center;
916
+ }
917
+
918
+ .ui-datepicker .ui-datepicker-prev,
919
+ .ui-datepicker .ui-datepicker-next {
920
+ position: relative;
921
+ top: 0;
922
+ height: 34px;
923
+ width: 34px;
924
+ }
925
+
926
+ .ui-datepicker .ui-state-hover.ui-datepicker-prev,
927
+ .ui-datepicker .ui-state-hover.ui-datepicker-next {
928
+ border: none;
929
+ }
930
+
931
+ .ui-datepicker .ui-datepicker-prev,
932
+ .ui-datepicker .ui-datepicker-prev-hover {
933
+ left: 0;
934
+ }
935
+
936
+ .ui-datepicker .ui-datepicker-next,
937
+ .ui-datepicker .ui-datepicker-next-hover {
938
+ right: 0;
939
+ }
940
+
941
+ .ui-datepicker .ui-datepicker-next span,
942
+ .ui-datepicker .ui-datepicker-prev span {
943
+ display: none;
944
+ }
945
+
946
+ .ui-datepicker .ui-datepicker-prev {
947
+ float: left;
948
+ }
949
+
950
+ .ui-datepicker .ui-datepicker-next {
951
+ float: right;
952
+ }
953
+
954
+ .ui-datepicker .ui-datepicker-prev:before,
955
+ .ui-datepicker .ui-datepicker-next:before {
956
+ font: normal 20px/34px 'dashicons';
957
+ padding-left: 7px;
958
+ color: #fff;
959
+ speak: none;
960
+ -webkit-font-smoothing: antialiased;
961
+ -moz-osx-font-smoothing: grayscale;
962
+ width: 34px;
963
+ height: 34px;
964
+ }
965
+
966
+ .ui-datepicker .ui-datepicker-prev:before {
967
+ content: '\f341';
968
+ }
969
+
970
+ .ui-datepicker .ui-datepicker-next:before {
971
+ content: '\f345';
972
+ }
973
+
974
+ .ui-datepicker .ui-datepicker-prev-hover:before,
975
+ .ui-datepicker .ui-datepicker-next-hover:before {
976
+ opacity: 0.7;
977
+ }
978
+
979
+ .ui-datepicker select.ui-datepicker-month,
980
+ .ui-datepicker select.ui-datepicker-year {
981
+ width: 33%;
982
+ }
983
+
984
+ .ui-datepicker thead {
985
+ color: #fff;
986
+ font-weight: 600;
987
+ }
988
+
989
+ .ui-datepicker th {
990
+ padding: 10px;
991
+ }
992
+
993
+ .ui-datepicker td {
994
+ padding: 0;
995
+ border: 1px solid #f4f4f4;
996
+ }
997
+
998
+ .ui-datepicker td.ui-datepicker-other-month {
999
+ border: transparent;
1000
+ }
1001
+
1002
+ .ui-datepicker tr:first-of-type td {
1003
+ border-top: 1px solid #f0f0f0;
1004
+ }
1005
+
1006
+ .ui-datepicker td.ui-datepicker-week-end {
1007
+ background-color: #f4f4f4;
1008
+ border: 1px solid #f0f0f0;
1009
+ }
1010
+
1011
+ .ui-datepicker td.ui-datepicker-today {
1012
+ background-color: #f0f0c0;
1013
+ }
1014
+
1015
+ .ui-datepicker td.ui-datepicker-current-day {
1016
+ background: #bbdd88;
1017
+ }
1018
+
1019
+ .ui-datepicker td .ui-state-default {
1020
+ background: transparent;
1021
+ border: none;
1022
+ text-align: center;
1023
+ text-decoration: none;
1024
+ width: auto;
1025
+ display: block;
1026
+ padding: 5px 10px;
1027
+ font-weight: normal;
1028
+ color: #444;
1029
+ }
1030
+
1031
+ .ui-datepicker td.ui-state-disabled .ui-state-default {
1032
+ opacity: 0.5;
1033
+ }
1034
+
1035
+ /* Default Color Scheme */
1036
+ .ui-datepicker .ui-widget-header,
1037
+ .ui-datepicker .ui-datepicker-header {
1038
+ background: #00a0d2;
1039
+ }
1040
+
1041
+ .ui-datepicker thead {
1042
+ background: #32373c;
1043
+ }
1044
+
1045
+ .ui-datepicker td .ui-state-hover {
1046
+ background: #0073aa;
1047
+ color: #fff;
1048
+ }
1049
+
1050
+ /* WordPress Color Schemes */
1051
+
1052
+ /* Fresh */
1053
+ .admin-color-fresh .ui-datepicker .ui-widget-header,
1054
+ .admin-color-fresh .ui-datepicker .ui-datepicker-header {
1055
+ background: #00a0d2;
1056
+ }
1057
+
1058
+ .admin-color-fresh .ui-datepicker thead {
1059
+ background: #32373c;
1060
+ }
1061
+
1062
+ .admin-color-fresh .ui-datepicker td .ui-state-hover {
1063
+ background: #0073aa;
1064
+ color: #fff;
1065
  }
admin/js/ivory-search-admin.js CHANGED
@@ -39,6 +39,35 @@
39
  } );
40
  } );
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  $('.form-table .actions a.expand').click( function() {
43
  $('.form-table .actions a.expand').hide();
44
  $('.form-table .ui-accordion-content, .form-table .actions a.collapse').show();
@@ -151,8 +180,7 @@
151
  $(this).find("#title[disabled]").data('tipText', title).removeAttr('title');
152
  $('<p class="title_tooltip"></p>')
153
  .text(title)
154
- .appendTo('body')
155
- .fadeIn('slow');
156
  }
157
  }, function() {
158
  // Hover out code
@@ -165,6 +193,24 @@
165
  .css({ top: mousey, left: mousex })
166
  });
167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
 
169
  } );
170
 
@@ -193,6 +239,257 @@
193
  } );
194
  };
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  function toggle_description_inputs() {
197
  if( $( '#_is_ajax-show_description' ).is(':checked') ) {
198
  $( '._is_ajax-description_source_wrap, ._is_ajax-description_length_wrap' ).removeClass('is-field-disabled').show();
39
  } );
40
  } );
41
 
42
+ var dateFormat = "d-m-yy",
43
+ from = $( "#is-after-datepicker" )
44
+ .datepicker({
45
+ dateFormat : 'd-m-yy',
46
+ changeMonth: true,
47
+ changeYear: true
48
+ })
49
+ .on( "change", function() {
50
+ to.datepicker( "option", "minDate", isgetDate( this ) );
51
+ }),
52
+ to = $( "#is-before-datepicker" ).datepicker({
53
+ dateFormat : 'd-m-yy',
54
+ changeMonth: true,
55
+ changeYear: true
56
+ })
57
+ .on( "change", function() {
58
+ from.datepicker( "option", "maxDate", isgetDate( this ) );
59
+ });
60
+
61
+ function isgetDate( element ) {
62
+ var date;
63
+ try {
64
+ date = $.datepicker.parseDate( dateFormat, element.value );
65
+ } catch( error ) {
66
+ date = null;
67
+ }
68
+ return date;
69
+ }
70
+
71
  $('.form-table .actions a.expand').click( function() {
72
  $('.form-table .actions a.expand').hide();
73
  $('.form-table .ui-accordion-content, .form-table .actions a.collapse').show();
180
  $(this).find("#title[disabled]").data('tipText', title).removeAttr('title');
181
  $('<p class="title_tooltip"></p>')
182
  .text(title)
183
+ .appendTo('body');
 
184
  }
185
  }, function() {
186
  // Hover out code
193
  .css({ top: mousey, left: mousex })
194
  });
195
 
196
+ $('#search-form-editor-tabs li').hover(function(){
197
+ // Hover over code
198
+ var title = $(this).find("a").attr('title');
199
+ $(this).find("a").data('tipText', title).removeAttr('title');
200
+ $('<p class="title_tooltip '+$(this).attr('id')+'"></p>')
201
+ .text(title)
202
+ .appendTo('body')
203
+ .fadeIn('slow');
204
+ }, function() {
205
+ // Hover out code
206
+ $(this).find("a").attr('title', $(this).find("a").data('tipText'));
207
+ $('.title_tooltip.'+$(this).attr('id')).remove();
208
+ }).mousemove(function(e) {
209
+ var mousex = e.pageX + 20; //Get X coordinates
210
+ var mousey = e.pageY - 40; //Get Y coordinates
211
+ $('.title_tooltip.'+$(this).attr('id'))
212
+ .css({ top: mousey, left: mousex })
213
+ });
214
 
215
  } );
216
 
239
  } );
240
  };
241
 
242
+ $(".is-cb-dropdown .is-cb-title").on('click', function() {
243
+ if ( $( this ).hasClass('is-dropdown-toggle') ){
244
+ $( this ).removeClass('is-dropdown-toggle');
245
+ } else {
246
+ $( this ).addClass('is-dropdown-toggle');
247
+ }
248
+ $( this ).parents(".is-cb-dropdown").find(".is-cb-multisel").slideToggle('fast');
249
+ });
250
+
251
+ $(document).bind('click', function(e) {
252
+ var $clicked = $(e.target);
253
+ if (!$clicked.parents().hasClass("is-cb-dropdown")) {
254
+ $(".is-cb-dropdown .is-cb-multisel").hide();
255
+ $( '.is-cb-title' ).removeClass('is-dropdown-toggle');
256
+ }
257
+ });
258
+
259
+ $('.is-cb-multisel input[type="checkbox"]').on('click', function() {
260
+
261
+ var title = $(this).val();
262
+ if ( $.isNumeric( title ) ) {
263
+ title = $(this).parent().text().trim();
264
+ }
265
+
266
+ if ($(this).is(':checked')) {
267
+ var html = '<span title="' + title + '"> ' + title + '</span>';
268
+ $( this ).parents(".is-cb-dropdown").find('.is-cb-titles').append(html);
269
+ $( this ).parents(".is-cb-dropdown").find(".is-cb-select").hide();
270
+ } else {
271
+ $( '.form-table .post-type-'+title ).remove();
272
+ $( this ).parents(".is-cb-dropdown").find('.is-cb-titles span[title="' + title + '"]').remove();
273
+ if ( 0 === $( this ).parents(".is-cb-dropdown").find( '.is-cb-titles span' ).length ) {
274
+ $( this ).parents(".is-cb-dropdown").find(".is-cb-select").show();
275
+ }
276
+ }
277
+ });
278
+
279
+ $( '#search-form-editor .is-mime-select, #search-form-editor .is-post-select, #search-form-editor .is-tax-select, #search-form-editor .is-meta-select' ).each( function() {
280
+ if ( $( this ).is( ':checked' ) ) {
281
+ if ( 'all' === $( this ).val() ) {
282
+ if ( $( this ).hasClass( 'is-post-select' ) ) {
283
+ $( this ).closest( 'div' ).find( '.is-posts' ).hide();
284
+ } else if ( $( this ).hasClass( 'is-tax-select' ) ) {
285
+ $( this ).closest( 'div' ).find( '.is-taxes' ).hide();
286
+ } else if ( $( this ).hasClass( 'is-mime-select' ) ) {
287
+ $( this ).closest( 'div' ).find( '.is-mime' ).hide();
288
+ }
289
+ }
290
+ if ( $( this ).hasClass( 'is-meta-select' ) ) {
291
+ $( this ).closest( 'div' ).find( '.is-metas' ).show();
292
+ }
293
+ } else {
294
+ if ( $( this ).hasClass( 'is-meta-select' ) ) {
295
+ $( this ).closest( 'div' ).find( '.is-metas' ).hide();
296
+ }
297
+ }
298
+ } );
299
+
300
+ $( '#search-form-editor .is-post-select, #search-form-editor .is-tax-select, #search-form-editor .is-meta-select, #search-form-editor .is-mime-select' ).on( 'click', function() {
301
+ if ( $( this ).hasClass( 'is-meta-select' ) ) {
302
+ if ( $( this ).is( ':checked' ) ) {
303
+ $( this ).closest( 'div' ).find( '.is-metas' ).show();
304
+ } else {
305
+ $( this ).closest( 'div' ).find( '.is-metas' ).hide();
306
+ $( this ).closest( 'div' ).find( '.is-metas select option').prop( 'selected', false );
307
+ }
308
+ } else if ( 'selected' === $( this ).val() ) {
309
+ if ( $( this ).hasClass( 'is-post-select' ) ) {
310
+ $( this ).closest( 'div' ).find( '.is-posts' ).show();
311
+ } else if ( $( this ).hasClass( 'is-tax-select' ) ) {
312
+ $( this ).closest( 'div' ).find( '.is-taxes' ).show();
313
+ } else if ( $( this ).hasClass( 'is-mime-select' ) ) {
314
+ $( this ).closest( 'div' ).find( '.is-mime' ).show();
315
+ }
316
+ } else {
317
+ if ( $( this ).hasClass( 'is-post-select' ) ) {
318
+ $( this ).closest( 'div' ).find( '.is-posts' ).hide();
319
+ $( this ).closest( 'div' ).find( '.is-posts select option').prop( 'selected', false );
320
+ } else if ( $( this ).hasClass( 'is-tax-select' ) ) {
321
+ $( this ).closest( 'div' ).find( '.is-taxes' ).hide();
322
+ $( this ).closest( 'div' ).find( '.is-taxes select option').prop( 'selected', false );
323
+ } else if ( $( this ).hasClass( 'is-mime-select' ) ) {
324
+ $( this ).closest( 'div' ).find( '.is-mime' ).hide();
325
+ $( this ).closest( 'div' ).find( '.is-mime select option').prop( 'selected', false );
326
+ }
327
+ }
328
+ } );
329
+
330
+ function is_all_mulitple_options_selected( this2 ) {
331
+ if ( $( this2 ).closest('.is-metas').length ) {
332
+ return;
333
+ }
334
+ var all_options = $( this2 ).parent().find( 'option' ).length;
335
+ var selected_options = $( this2 ).parent().find( 'option:selected' ).length;
336
+ var deselect_all = false;
337
+ if ( all_options === selected_options ) {
338
+ deselect_all = true;
339
+ alert('No need to select all instead use alternative option');
340
+ } else {
341
+ if ( $( '#excludes' ).length ) {
342
+ if ( ( ( all_options / 2 ) + 1 ) <= selected_options ) {
343
+ deselect_all = true;
344
+ alert('Instead select specific to search in the Includes section');
345
+ }
346
+ } else if ( $( '#includes' ).length ) {
347
+ if ( ( ( all_options / 2 ) + 1 ) <= selected_options ) {
348
+ deselect_all = true;
349
+ alert('Instead select specific to exclude in the Excludes section');
350
+ }
351
+ }
352
+ }
353
+ if ( deselect_all ) {
354
+ $( this2 ).parent().find( 'option' ).prop( 'selected', false );
355
+ }
356
+ }
357
+
358
+ $( '#search-form-editor select[multiple] option' ).on( 'click', function() {
359
+ is_all_mulitple_options_selected( this );
360
+ } );
361
+
362
+ $( '#search-form-editor select[multiple]' ).on( 'keyup', function() {
363
+ is_all_mulitple_options_selected( this );
364
+ } );
365
+
366
+ $('.includes_extras input[type="checkbox"]').on('click', function() {
367
+
368
+ if ( ! $(this).is(':checked') ) {
369
+ if ( ! $( this ).closest( '.includes_extras' ).find( 'input[type="checkbox"]:checked' ).length ) {
370
+ alert('Please make sure that you have configured the search form to search any content');
371
+ }
372
+ }
373
+ } );
374
+
375
+ $( '#search-form-editor .is-mime option' ).on( 'click', function() {
376
+ if ( ! $( this ).is(':checked') ) {
377
+ if ( 0 === $('.is-mime select option:selected').length ) {
378
+ if ( $('#includes').length ) {
379
+ $('.search-attachments').prop( "checked", true );
380
+ } else {
381
+ $('.search-attachments').prop( "checked", false );
382
+ }
383
+ }
384
+ } else {
385
+ is_mime_multi_option_selected();
386
+ }
387
+ } );
388
+
389
+ $( '#search-form-editor .is-mime-select' ).on( 'click', function() {
390
+ if ( 'all' === $( this ).val() ) {
391
+ if ( $('#excludes').length ) {
392
+ $('.search-attachments').prop( "checked", false );
393
+ } else {
394
+ $('.search-attachments').prop( "checked", true );
395
+ }
396
+ }
397
+ } );
398
+
399
+ if ( 0 !== $('.is-mime select option:selected').length ) {
400
+ is_mime_multi_option_selected();
401
+ }
402
+
403
+ function is_mime_multi_option_selected(){
404
+ var temp_value = ['image', 'video', 'audio', 'text', 'pdf'];
405
+ $.each(temp_value, function(key, value) {
406
+ if ( 0 === $('.is-mime select option[value*="'+value+'"]:selected').length ) {
407
+ $('.search-attachments[name*="'+value+'"]').prop( "checked", false );
408
+ } else {
409
+ $('.search-attachments[name*="'+value+'"]').prop( "checked", true );
410
+ }
411
+ } );
412
+
413
+ if ( 0 === $('.is-mime select option[value*="doc"]:selected').length && 0 === $('.is-mime select option[value*="excel"]:selected').length && 0 === $('.is-mime select option[value*="word"]:selected').length ) {
414
+ $('.search-attachments[name*="doc"]').prop( "checked", false );
415
+ } else {
416
+ $('.search-attachments[name*="doc"]').prop( "checked", true );
417
+ }
418
+ }
419
+
420
+ $( '.search-attachments-wrapper' ).show();
421
+
422
+ $('.search-attachments').on('click', function() {
423
+ if ( 0 === $('.is-mime select option:selected').length ) {
424
+ if ( ! $(this).hasClass('exclude') ){
425
+ if ( $( this ).is(':checked') ) {
426
+ return;
427
+ } else {
428
+ alert('You can configure it to exclude from search in the search form Excludes section');
429
+ return false;
430
+ }
431
+ }
432
+ }
433
+ var search_name = $( this ).attr('name');
434
+ var search_value = '';
435
+
436
+ switch(search_name) {
437
+ case 'search_images':
438
+ search_value = 'image';
439
+ break;
440
+ case 'search_videos':
441
+ search_value = 'video';
442
+ break;
443
+ case 'search_audios':
444
+ search_value = 'audio';
445
+ break;
446
+ case 'search_text':
447
+ search_value = 'text';
448
+ break;
449
+ case 'search_pdfs':
450
+ search_value = 'pdf';
451
+ break;
452
+ case 'search_docs':
453
+ search_value = ['doc', 'excel', 'word'];
454
+ break;
455
+ }
456
+ if ( '' !== search_value ) {
457
+ if ( Array.isArray( search_value ) ) {
458
+ var this2 = this;
459
+ $.each(search_value, function(key, value) {
460
+ if ( $( this2 ).is(':checked') ) {
461
+ $('.is-mime select option[value*="'+value+'"]').attr('selected', 'selected');
462
+ } else {
463
+ $('.is-mime select option[value*="'+value+'"]').removeAttr('selected');
464
+ }
465
+ });
466
+ } else {
467
+ if ( $( this ).is(':checked') ) {
468
+ $('.is-mime select option[value*="'+search_value+'"]').attr('selected', 'selected');
469
+ } else {
470
+ $('.is-mime select option[value*="'+search_value+'"]').removeAttr('selected');
471
+ }
472
+ }
473
+ }
474
+ if ( ! $(this).hasClass('exclude') && 0 === $('.is-mime select option:selected').length ) {
475
+ $('.search-attachments').prop( "checked", true );
476
+ }
477
+ } );
478
+
479
+ $('#search-form-editor .not_load_files').each(function() {
480
+ if( ! $( this ).is(':checked') ) {
481
+ $( this ).parent().next('.not-load-wrapper').hide();
482
+ }
483
+ } );
484
+
485
+ $('#search-form-editor .not_load_files').on('click', function() {
486
+ if( $( this ).is(':checked') ) {
487
+ $( this ).parent().next('.not-load-wrapper').show();
488
+ } else {
489
+ $( this ).parent().next('.not-load-wrapper').hide();
490
+ }
491
+ } );
492
+
493
  function toggle_description_inputs() {
494
  if( $( '#_is_ajax-show_description' ).is(':checked') ) {
495
  $( '._is_ajax-description_source_wrap, ._is_ajax-description_length_wrap' ).removeClass('is-field-disabled').show();
admin/partials/search-form.php CHANGED
@@ -77,7 +77,7 @@ if ( ! defined( 'ABSPATH' ) ) {
77
  'autocomplete' => 'off',
78
  'disabled' =>
79
  current_user_can( 'is_edit_search_form', $post_id ) && 'Default Search Form' !== $post->title() ? '' : 'disabled',
80
- 'title' => 'Default Search Form' !== $post->title() ? __( "Search form name", 'ivory-search' ) : __( "Editing the title of Default Search Form is restricted.", 'ivory-search' ),
81
  );
82
 
83
  echo sprintf( '<input %s />', IS_Admin_Public::format_atts( $posttitle_atts ) );
@@ -108,22 +108,27 @@ if ( ! defined( 'ABSPATH' ) ) {
108
  'includes' => array(
109
  'title' => __( 'Includes', 'ivory-search' ),
110
  'callback' => 'includes_panel',
 
111
  ),
112
  'excludes' => array(
113
  'title' => __( 'Excludes', 'ivory-search' ),
114
  'callback' => 'excludes_panel',
 
115
  ),
116
  'customize' => array(
117
  'title' => __( 'Customize', 'ivory-search' ),
118
  'callback' => 'customize_panel',
 
119
  ),
120
  'ajax' => array(
121
  'title' => __( 'AJAX', 'ivory-search' ),
122
  'callback' => 'ajax_panel',
 
123
  ),
124
  'options' => array(
125
  'title' => __( 'Options', 'ivory-search' ),
126
  'callback' => 'options_panel',
 
127
  ),
128
  );
129
  }
@@ -131,7 +136,7 @@ if ( ! defined( 'ABSPATH' ) ) {
131
  $panels = apply_filters( 'is_editor_panels', $panels );
132
 
133
  foreach ( $panels as $id => $panel ) {
134
- $editor->add_panel( $id, $panel['title'], $panel['callback'] );
135
  }
136
 
137
  $editor->display();
77
  'autocomplete' => 'off',
78
  'disabled' =>
79
  current_user_can( 'is_edit_search_form', $post_id ) && 'Default Search Form' !== $post->title() ? '' : 'disabled',
80
+ 'title' => 'Default Search Form' !== $post->title() ? __( "Search form name", 'ivory-search' ) : __( "Editing the title of Default Search Form is restricted", 'ivory-search' ),
81
  );
82
 
83
  echo sprintf( '<input %s />', IS_Admin_Public::format_atts( $posttitle_atts ) );
108
  'includes' => array(
109
  'title' => __( 'Includes', 'ivory-search' ),
110
  'callback' => 'includes_panel',
111
+ 'description' => __( 'Configure the content to search', 'ivory-search' ),
112
  ),
113
  'excludes' => array(
114
  'title' => __( 'Excludes', 'ivory-search' ),
115
  'callback' => 'excludes_panel',
116
+ 'description' => __( 'Exclude the content from search', 'ivory-search' ),
117
  ),
118
  'customize' => array(
119
  'title' => __( 'Customize', 'ivory-search' ),
120
  'callback' => 'customize_panel',
121
+ 'description' => __( 'Customize search form colors, text and style', 'ivory-search' ),
122
  ),
123
  'ajax' => array(
124
  'title' => __( 'AJAX', 'ivory-search' ),
125
  'callback' => 'ajax_panel',
126
+ 'description' => __( 'Configure AJAX search', 'ivory-search' ),
127
  ),
128
  'options' => array(
129
  'title' => __( 'Options', 'ivory-search' ),
130
  'callback' => 'options_panel',
131
+ 'description' => __( 'Manage search functionality', 'ivory-search' ),
132
  ),
133
  );
134
  }
136
  $panels = apply_filters( 'is_editor_panels', $panels );
137
 
138
  foreach ( $panels as $id => $panel ) {
139
+ $editor->add_panel( $id, $panel['title'], $panel['callback'], $panel['description'] );
140
  }
141
 
142
  $editor->display();
admin/partials/settings-form.php CHANGED
@@ -34,35 +34,37 @@ if ( ! defined( 'ABSPATH' ) ) {
34
  settings_fields( 'ivory_search' );
35
 
36
  $panels = array(
37
- 'menu-search' => array(
38
- 'menu-search',
39
- 'Menu Search',
40
- ),
41
  'settings' => array(
42
  'settings',
43
  'Settings',
 
 
 
 
 
 
44
  )
45
  );
46
 
47
  echo '<ul id="search-form-editor-tabs">';
48
 
49
- $tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'menu-search';
50
  $url = esc_url( menu_page_url( 'ivory-search-settings', false ) );
51
 
52
  foreach ( $panels as $id => $panel ) {
53
  $class = ( $tab == $id ) ? 'active' : '';
54
- echo sprintf( '<li id="%1$s-tab" class="%2$s"><a href="%3$s">%4$s</a></li>',
55
- esc_attr( $panel[0] ), esc_attr( $class ), $url . '&tab=' . $panel[0], esc_html( $panel[1] ) );
56
  }
57
 
58
  echo '</ul>';
59
 
60
  $settings_fields = IS_Settings_Fields::getInstance();
61
 
62
- if ( 'menu-search' == $tab ) {
63
- $settings_fields->is_do_settings_sections( 'ivory_search', 'ivory_search_section' );
64
- } else if ( 'settings' == $tab ) {
65
  $settings_fields->is_do_settings_sections( 'ivory_search', 'ivory_search_settings' );
 
 
66
  }
67
 
68
  ?>
34
  settings_fields( 'ivory_search' );
35
 
36
  $panels = array(
 
 
 
 
37
  'settings' => array(
38
  'settings',
39
  'Settings',
40
+ 'Make search changes on entire website',
41
+ ),
42
+ 'menu-search' => array(
43
+ 'menu-search',
44
+ 'Menu Search',
45
+ 'Display & configure search in menu',
46
  )
47
  );
48
 
49
  echo '<ul id="search-form-editor-tabs">';
50
 
51
+ $tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'settings';
52
  $url = esc_url( menu_page_url( 'ivory-search-settings', false ) );
53
 
54
  foreach ( $panels as $id => $panel ) {
55
  $class = ( $tab == $id ) ? 'active' : '';
56
+ echo sprintf( '<li id="%1$s-tab" class="%2$s"><a href="%3$s" title="%4$s">%5$s</a></li>',
57
+ esc_attr( $panel[0] ), esc_attr( $class ), $url . '&tab=' . $panel[0], esc_attr( $panel[2] ), esc_html( $panel[1] ) );
58
  }
59
 
60
  echo '</ul>';
61
 
62
  $settings_fields = IS_Settings_Fields::getInstance();
63
 
64
+ if ( 'settings' == $tab ) {
 
 
65
  $settings_fields->is_do_settings_sections( 'ivory_search', 'ivory_search_settings' );
66
+ } else if ( 'menu-search' == $tab ) {
67
+ $settings_fields->is_do_settings_sections( 'ivory_search', 'ivory_search_section' );
68
  }
69
 
70
  ?>
includes/class-is-search-form.php CHANGED
@@ -429,7 +429,7 @@ class IS_Search_Form {
429
  if ( 'n' !== $display_id ) {
430
  $result = preg_replace('/<\/form>/', '<input type="hidden" name="id" value="' . $args['id'] . '" /></form>', $result );
431
  }
432
- if ( isset( $_includes['post_type'] ) && count( $_includes['post_type'] ) < 2 ) {
433
  $result = preg_replace('/<\/form>/', '<input type="hidden" name="post_type" value="' . reset( $_includes['post_type'] ) . '" /></form>', $result );
434
  }
435
 
@@ -491,7 +491,7 @@ class IS_Search_Form {
491
  $result .= '<input type="hidden" name="id" value="' . $args['id'] . '" />';
492
  }
493
 
494
- if ( isset( $_includes['post_type'] ) && count( $_includes['post_type'] ) < 2 ) {
495
  $result .= '<input type="hidden" name="post_type" value="' . reset( $_includes['post_type'] ) . '" />';
496
  }
497
  $result .= '</form>';
429
  if ( 'n' !== $display_id ) {
430
  $result = preg_replace('/<\/form>/', '<input type="hidden" name="id" value="' . $args['id'] . '" /></form>', $result );
431
  }
432
+ if ( ! isset( $_includes['post_type_url'] ) && isset( $_includes['post_type'] ) && count( $_includes['post_type'] ) < 2 ) {
433
  $result = preg_replace('/<\/form>/', '<input type="hidden" name="post_type" value="' . reset( $_includes['post_type'] ) . '" /></form>', $result );
434
  }
435
 
491
  $result .= '<input type="hidden" name="id" value="' . $args['id'] . '" />';
492
  }
493
 
494
+ if ( ! isset( $_includes['post_type_url'] ) && isset( $_includes['post_type'] ) && count( $_includes['post_type'] ) < 2 ) {
495
  $result .= '<input type="hidden" name="post_type" value="' . reset( $_includes['post_type'] ) . '" />';
496
  }
497
  $result .= '</form>';
includes/class-is-widget.php CHANGED
@@ -30,7 +30,9 @@ class IS_Widget extends WP_Widget {
30
  }
31
  if ( ! empty( $instance['search_form'] ) ) {
32
  echo do_shortcode( '[ivory-search id="' . $instance['search_form'] . '"]' );
33
- }
 
 
34
  echo $args['after_widget'];
35
  }
36
 
@@ -59,7 +61,7 @@ class IS_Widget extends WP_Widget {
59
  if ( ! empty( $posts ) ) {
60
  $html .= '<label for="'. esc_attr( $this->get_field_id( 'search_form' ) ) .'">'. esc_attr_e( 'Search Form:', 'ivory-search' ) .'</label>';
61
  $html .= '<select class="widefat" id="'.esc_attr( $this->get_field_id( 'search_form' ) ).'" name="'.esc_attr( $this->get_field_name( 'search_form' ) ).'" >';
62
- $html .= '<option value="0">' . __( 'none', 'ivory-search' ) . '</option>';
63
  foreach ( $posts as $post ) {
64
  $html .= '<option value="' . $post->ID . '"' . selected( $post->ID, $search_form, false ) . ' >' . $post->post_title . '</option>';
65
  }
30
  }
31
  if ( ! empty( $instance['search_form'] ) ) {
32
  echo do_shortcode( '[ivory-search id="' . $instance['search_form'] . '"]' );
33
+ } else {
34
+ _e( 'Please select search form in the Ivory Search widget.', 'ivory-search' );
35
+ }
36
  echo $args['after_widget'];
37
  }
38
 
61
  if ( ! empty( $posts ) ) {
62
  $html .= '<label for="'. esc_attr( $this->get_field_id( 'search_form' ) ) .'">'. esc_attr_e( 'Search Form:', 'ivory-search' ) .'</label>';
63
  $html .= '<select class="widefat" id="'.esc_attr( $this->get_field_id( 'search_form' ) ).'" name="'.esc_attr( $this->get_field_name( 'search_form' ) ).'" >';
64
+ $html .= '<option value="0">' . __( 'Select Search Form', 'ivory-search' ) . '</option>';
65
  foreach ( $posts as $post ) {
66
  $html .= '<option value="' . $post->ID . '"' . selected( $post->ID, $search_form, false ) . ' >' . $post->post_title . '</option>';
67
  }
languages/default.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ivory Search\n"
4
- "POT-Creation-Date: 2019-06-28 22:20+0530\n"
5
- "PO-Revision-Date: 2019-06-28 22:20+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Ivory Search <admin@ivorysearch.com>\n"
8
  "Language: en_US\n"
@@ -16,50 +16,51 @@ msgstr ""
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
- #: ../admin/class-is-admin.php:72
20
  msgid "The changes you made will be lost if you navigate away from this page."
21
  msgstr ""
22
 
23
- #: ../admin/class-is-admin.php:136 ../admin/class-is-settings-fields.php:257
24
  #: ../admin/partials/search-form.php:23
25
  msgid "Edit Search Form"
26
  msgstr ""
27
 
28
- #: ../admin/class-is-admin.php:137
29
  msgid "Click on the search form title to edit it."
30
  msgstr ""
31
 
32
- #: ../admin/class-is-admin.php:138
33
  msgid "Edit the Default Search Form to manage the default WordPress search."
34
  msgstr ""
35
 
36
- #: ../admin/class-is-admin.php:162 ../admin/class-is-admin.php:439
37
  #: ../admin/class-is-help.php:64
38
  msgid "Settings"
39
  msgstr ""
40
 
41
- #: ../admin/class-is-admin.php:180 ../admin/class-is-help.php:110
42
  msgid "Docs"
43
  msgstr ""
44
 
45
- #: ../admin/class-is-admin.php:181 ../admin/class-is-help.php:111
46
- #: ../admin/partials/search-form.php:195 ../admin/partials/settings-form.php:98
 
47
  msgid "Support"
48
  msgstr ""
49
 
50
- #: ../admin/class-is-admin.php:202
51
  #, php-format
52
  msgid ""
53
  "If you like %1$s please leave us a %2$s rating. A huge thanks in advance!"
54
  msgstr ""
55
 
56
- #: ../admin/class-is-admin.php:203 ../admin/class-is-admin.php:426
57
  #: ../includes/class-is-admin-public.php:106 ../includes/class-is-widget.php:13
58
- #: ../includes/class-is-widget.php:45
59
  msgid "Ivory Search"
60
  msgstr ""
61
 
62
- #: ../admin/class-is-admin.php:226
63
  #, php-format
64
  msgid ""
65
  "Thank you for using <strong>Ivory Search</strong> plugin. You can configure "
@@ -68,156 +69,168 @@ msgid ""
68
  "us</a>."
69
  msgstr ""
70
 
71
- #: ../admin/class-is-admin.php:227 ../admin/class-is-admin.php:248
72
  msgid "Dismiss"
73
  msgstr ""
74
 
75
- #: ../admin/class-is-admin.php:249
76
  msgid "Have you found Ivory Search plugin useful?"
77
  msgstr ""
78
 
79
- #: ../admin/class-is-admin.php:250
80
  msgid ""
81
  "We poured a lot of hours into creating it, and we'd love it if you could "
82
  "give us a nice rating on the official plugin directory."
83
  msgstr ""
84
 
85
- #: ../admin/class-is-admin.php:252
86
  msgid "Rate Ivory Search and Help Us Out"
87
  msgstr ""
88
 
89
- #: ../admin/class-is-admin.php:253
90
  msgid "Get Support"
91
  msgstr ""
92
 
93
- #: ../admin/class-is-admin.php:254
94
  msgid "Say Hi"
95
  msgstr ""
96
 
97
- #: ../admin/class-is-admin.php:292
98
  msgid "No posts found"
99
  msgstr ""
100
 
101
- #: ../admin/class-is-admin.php:392
102
  msgid "Search form created."
103
  msgstr ""
104
 
105
- #: ../admin/class-is-admin.php:394
106
  msgid "Search form saved."
107
  msgstr ""
108
 
109
- #: ../admin/class-is-admin.php:396
110
  msgid "Search form deleted."
111
  msgstr ""
112
 
113
- #: ../admin/class-is-admin.php:398
114
  msgid "Search form reset."
115
  msgstr ""
116
 
117
- #: ../admin/class-is-admin.php:407
118
  msgid "There was an error saving the search form."
119
  msgstr ""
120
 
121
- #: ../admin/class-is-admin.php:415
122
- msgid "There was a validation error saving the search form."
123
  msgstr ""
124
 
125
- #: ../admin/class-is-admin.php:416
 
 
 
 
 
 
 
 
 
 
 
 
126
  #, php-format
127
  msgid ""
128
  "Please make sure you have not selected similar %s fields in the search form "
129
- "Includes and Excludes sections."
130
  msgstr ""
131
 
132
- #: ../admin/class-is-admin.php:428 ../admin/class-is-admin.php:471
133
  #: ../includes/class-is-search-form.php:59
134
  msgid "Search Forms"
135
  msgstr ""
136
 
137
- #: ../admin/class-is-admin.php:433 ../admin/class-is-admin.php:435
138
  #: ../admin/partials/search-form.php:21
139
  msgid "Add New Search Form"
140
  msgstr ""
141
 
142
- #: ../admin/class-is-admin.php:433 ../admin/class-is-admin.php:435
143
- #: ../admin/class-is-admin.php:478 ../admin/partials/search-form.php:31
144
  msgid "Add New"
145
  msgstr ""
146
 
147
- #: ../admin/class-is-admin.php:439 ../admin/partials/settings-form.php:20
148
  msgid "Ivory Search Settings"
149
  msgstr ""
150
 
151
- #: ../admin/class-is-admin.php:484
152
  #, php-format
153
  msgid "Search results for &#8220;%s&#8221;"
154
  msgstr ""
155
 
156
- #: ../admin/class-is-admin.php:495
157
  msgid "Find Search Forms"
158
  msgstr ""
159
 
160
- #: ../admin/class-is-admin.php:539
161
  msgid "You are not allowed to edit this item."
162
  msgstr ""
163
 
164
- #: ../admin/class-is-admin.php:633
165
  msgid "You are not allowed to reset this item."
166
  msgstr ""
167
 
168
- #: ../admin/class-is-admin.php:669
169
  msgid "You are not allowed to copy this item."
170
  msgstr ""
171
 
172
- #: ../admin/class-is-admin.php:710
173
  msgid "You are not allowed to delete this item."
174
  msgstr ""
175
 
176
- #: ../admin/class-is-admin.php:714
177
  msgid "Error in deleting."
178
  msgstr ""
179
 
180
- #: ../admin/class-is-admin.php:946
181
  msgid "Save Form"
182
  msgstr ""
183
 
184
- #: ../admin/class-is-admin.php:958
185
  msgid "Upgrade to Pro to Access"
186
  msgstr ""
187
 
188
- #: ../admin/class-is-admin.php:965
189
  msgid "Install Premium Version to Access"
190
  msgstr ""
191
 
192
- #: ../admin/class-is-admin.php:967
193
  msgid "Upgrade to Pro Plus to Access"
194
  msgstr ""
195
 
196
- #: ../admin/class-is-editor.php:60
197
  msgid "The requested section does not exist."
198
  msgstr ""
199
 
200
- #: ../admin/class-is-editor.php:104
201
  msgid "This search form searches the below configured content."
202
  msgstr ""
203
 
204
- #: ../admin/class-is-editor.php:112
205
  msgid "Post Types"
206
  msgstr ""
207
 
208
- #: ../admin/class-is-editor.php:113 ../admin/class-is-editor.php:500
209
- #: ../admin/class-is-editor.php:577 ../admin/class-is-editor.php:671
210
- #: ../admin/class-is-editor.php:993 ../admin/class-is-editor.php:1033
211
- #: ../admin/class-is-editor.php:1279 ../admin/class-is-editor.php:1340
212
- #: ../admin/class-is-editor.php:1492 ../admin/class-is-settings-fields.php:118
213
  msgid "Expand All"
214
  msgstr ""
215
 
216
- #: ../admin/class-is-editor.php:113 ../admin/class-is-editor.php:500
217
- #: ../admin/class-is-editor.php:578 ../admin/class-is-editor.php:672
218
- #: ../admin/class-is-editor.php:994 ../admin/class-is-editor.php:1033
219
- #: ../admin/class-is-editor.php:1279 ../admin/class-is-editor.php:1340
220
- #: ../admin/class-is-editor.php:1492 ../admin/class-is-settings-fields.php:118
221
  msgid "Collapse All"
222
  msgstr ""
223
 
@@ -225,680 +238,731 @@ msgstr ""
225
  msgid "Search selected post types."
226
  msgstr ""
227
 
228
- #: ../admin/class-is-editor.php:134
229
- msgid "Search post title"
230
- msgstr ""
231
-
232
- #: ../admin/class-is-editor.php:137
233
- msgid "Search post content"
234
  msgstr ""
235
 
236
- #: ../admin/class-is-editor.php:140
237
- msgid "Search post excerpt"
238
  msgstr ""
239
 
240
- #: ../admin/class-is-editor.php:142
241
- msgid "No post types registered on your site."
242
  msgstr ""
243
 
244
- #: ../admin/class-is-editor.php:149 ../admin/class-is-editor.php:1032
245
- msgid "Posts, Pages & Custom Posts"
246
  msgstr ""
247
 
248
- #: ../admin/class-is-editor.php:153
249
- msgid "Search only selected posts."
250
  msgstr ""
251
 
252
- #: ../admin/class-is-editor.php:188 ../admin/class-is-editor.php:233
253
- #: ../admin/class-is-editor.php:271 ../admin/class-is-editor.php:516
254
- #: ../admin/class-is-editor.php:1073 ../admin/class-is-editor.php:1120
255
- #: ../admin/class-is-editor.php:1149 ../admin/class-is-editor.php:1293
256
  msgid "Search.."
257
  msgstr ""
258
 
259
- #: ../admin/class-is-editor.php:192 ../admin/class-is-editor.php:1077
260
  msgid "Load All"
261
  msgstr ""
262
 
263
- #: ../admin/class-is-editor.php:200 ../admin/class-is-editor.php:1085
264
- msgid "No posts created for selected post types."
 
265
  msgstr ""
266
 
267
- #: ../admin/class-is-editor.php:202 ../admin/class-is-editor.php:242
268
- #: ../admin/class-is-editor.php:278 ../admin/class-is-editor.php:524
269
- #: ../admin/class-is-editor.php:1087 ../admin/class-is-editor.php:1129
270
- #: ../admin/class-is-editor.php:1157 ../admin/class-is-editor.php:1301
271
  msgid ""
272
- "Press CTRL key & Left Mouse button to select multiple terms or deselect them."
273
  msgstr ""
274
 
275
- #: ../admin/class-is-editor.php:208 ../admin/class-is-editor.php:1097
276
- msgid "Category & Taxonomy Terms"
 
 
277
  msgstr ""
278
 
279
- #: ../admin/class-is-editor.php:212
280
- msgid "Search posts of only selected categories, taxonomies & terms."
 
281
  msgstr ""
282
 
283
- #: ../admin/class-is-editor.php:245
284
- msgid "AND - Search posts having all the above selected terms"
 
285
  msgstr ""
286
 
287
- #: ../admin/class-is-editor.php:247
288
- msgid "OR - Search posts having any one of the above selected terms"
 
289
  msgstr ""
290
 
291
- #: ../admin/class-is-editor.php:250
292
- msgid "Search term title"
 
293
  msgstr ""
294
 
295
- #: ../admin/class-is-editor.php:253
296
- msgid "Search term description"
 
297
  msgstr ""
298
 
299
- #: ../admin/class-is-editor.php:255 ../admin/class-is-editor.php:1131
300
- msgid "No taxonomies registered for selected post types."
301
  msgstr ""
302
 
303
- #: ../admin/class-is-editor.php:262 ../admin/class-is-editor.php:1138
304
- msgid "Custom Fields & Metadata"
305
  msgstr ""
306
 
307
- #: ../admin/class-is-editor.php:266
308
- msgid "Search values of selected custom fields."
309
  msgstr ""
310
 
311
- #: ../admin/class-is-editor.php:280 ../admin/class-is-editor.php:1159
312
- msgid "No custom fields created for selected post types."
313
  msgstr ""
314
 
315
- #: ../admin/class-is-editor.php:284
316
- msgid "Selected Custom Fields :"
317
  msgstr ""
318
 
319
- #: ../admin/class-is-editor.php:294 ../admin/class-is-editor.php:840
320
- #: ../admin/class-is-editor.php:1173
321
- msgid "WooCommerce"
322
  msgstr ""
323
 
324
- #: ../admin/class-is-editor.php:298
325
- msgid "Search WooCommerce products."
326
  msgstr ""
327
 
328
- #: ../admin/class-is-editor.php:306
329
- msgid "Search product SKU"
330
  msgstr ""
331
 
332
- #: ../admin/class-is-editor.php:309
333
- msgid "Search product variation"
334
  msgstr ""
335
 
336
- #: ../admin/class-is-editor.php:312 ../admin/class-is-editor.php:1188
337
- msgid ""
338
- "Please first configure this search form to search WooCommerce product post "
339
- "type."
340
  msgstr ""
341
 
342
- #: ../admin/class-is-editor.php:322 ../admin/class-is-editor.php:1198
343
- msgid "Authors"
344
  msgstr ""
345
 
346
- #: ../admin/class-is-editor.php:326
347
- msgid "Search posts of selected authors."
 
 
 
348
  msgstr ""
349
 
350
- #: ../admin/class-is-editor.php:359
351
  msgid ""
352
- "This search form is already configured in the Excludes section to not search "
353
- "for specific author posts."
354
  msgstr ""
355
 
356
- #: ../admin/class-is-editor.php:367
357
- msgid "Search author Display Name and display the posts created by that author"
 
358
  msgstr ""
359
 
360
- #: ../admin/class-is-editor.php:372 ../admin/class-is-editor.php:1241
361
- msgid "Post Status"
362
  msgstr ""
363
 
364
- #: ../admin/class-is-editor.php:376
365
- msgid "Search posts having selected post statuses."
366
  msgstr ""
367
 
368
- #: ../admin/class-is-editor.php:397
369
- msgid ""
370
- "This search form is already configured in the Excludes section to not search "
371
- "posts of specific post statuses."
372
  msgstr ""
373
 
374
- #: ../admin/class-is-editor.php:404
375
- msgid "Comments"
376
  msgstr ""
377
 
378
- #: ../admin/class-is-editor.php:408
379
- msgid "Search posts by comments."
380
  msgstr ""
381
 
382
- #: ../admin/class-is-editor.php:415
383
- msgid "Search posts having number of comments"
384
  msgstr ""
385
 
386
- #: ../admin/class-is-editor.php:425
387
- msgid "NA"
 
 
 
388
  msgstr ""
389
 
390
- #: ../admin/class-is-editor.php:436
391
- msgid "Search approved comment content"
392
  msgstr ""
393
 
394
- #: ../admin/class-is-editor.php:442 ../admin/class-is-editor.php:758
395
- #: ../admin/class-is-editor.php:968 ../admin/class-is-list-table.php:34
396
- msgid "Date"
397
  msgstr ""
398
 
399
- #: ../admin/class-is-editor.php:446
400
- msgid "Search posts created in the specified date range."
401
  msgstr ""
402
 
403
- #: ../admin/class-is-editor.php:451
404
- msgid "From"
405
  msgstr ""
406
 
407
- #: ../admin/class-is-editor.php:451
408
- msgid "To"
409
  msgstr ""
410
 
411
- #: ../admin/class-is-editor.php:456
412
- msgid "Day"
 
 
 
 
413
  msgstr ""
414
 
415
- #: ../admin/class-is-editor.php:464
416
- msgid "Month"
417
  msgstr ""
418
 
419
- #: ../admin/class-is-editor.php:472
420
- msgid "Year"
421
  msgstr ""
422
 
423
- #: ../admin/class-is-editor.php:483
424
  msgid "Password Protected"
425
  msgstr ""
426
 
427
- #: ../admin/class-is-editor.php:490
428
  msgid "Search posts with or without passwords"
429
  msgstr ""
430
 
431
- #: ../admin/class-is-editor.php:492
432
  msgid "Search posts with passwords"
433
  msgstr ""
434
 
435
- #: ../admin/class-is-editor.php:494
436
  msgid "Search posts without passwords"
437
  msgstr ""
438
 
439
- #: ../admin/class-is-editor.php:499 ../admin/class-is-editor.php:1278
440
- msgid "Attachments, Media, Files & MIME Types"
 
441
  msgstr ""
442
 
443
- #: ../admin/class-is-editor.php:503
444
- msgid ""
445
- "Search selected media, attachments, images, documents, videos, files or MIME "
446
- "types."
447
  msgstr ""
448
 
449
- #: ../admin/class-is-editor.php:527
450
- msgid ""
451
- "This search form is already configured in the Excludes section to not search "
452
- "specific file & MIME types."
 
 
 
 
 
 
 
 
 
453
  msgstr ""
454
 
455
- #: ../admin/class-is-editor.php:530 ../admin/class-is-editor.php:1307
456
- msgid "Please first configure this search form to search Attachment post type."
 
457
  msgstr ""
458
 
459
- #: ../admin/class-is-editor.php:533 ../admin/class-is-editor.php:1310
460
  msgid ""
461
- "You are using WordPress version less than 4.9 which does not support "
462
- "searching by MIME type."
463
  msgstr ""
464
 
465
- #: ../admin/class-is-editor.php:537
466
- msgid "Selected File Types :"
467
  msgstr ""
468
 
469
- #: ../admin/class-is-editor.php:560
 
 
 
 
470
  msgid "Use below options to customize this search form."
471
  msgstr ""
472
 
473
- #: ../admin/class-is-editor.php:567 ../admin/class-is-editor.php:582
474
  msgid "Enable Search Form Customization"
475
  msgstr ""
476
 
477
- #: ../admin/class-is-editor.php:575 ../admin/class-is-editor.php:991
478
  #: ../includes/class-is-search-form.php:507
479
  msgid "Customizer"
480
  msgstr ""
481
 
482
- #: ../admin/class-is-editor.php:583
483
  msgid ""
484
  "Use below customizer to customize search form colors, text and search form "
485
  "style."
486
  msgstr ""
487
 
488
- #: ../admin/class-is-editor.php:591
489
  msgid "Search Form Customizer"
490
  msgstr ""
491
 
492
- #: ../admin/class-is-editor.php:637
493
  msgid "Nothing found"
494
  msgstr ""
495
 
496
- #: ../admin/class-is-editor.php:640
497
  msgid "View All"
498
  msgstr ""
499
 
500
- #: ../admin/class-is-editor.php:644
501
  msgid "More Results.."
502
  msgstr ""
503
 
504
- #: ../admin/class-is-editor.php:655
505
  msgid ""
506
  "Configure below options to manage AJAX functionality of this search form."
507
  msgstr ""
508
 
509
- #: ../admin/class-is-editor.php:662 ../admin/class-is-editor.php:676
510
- #: ../admin/class-is-editor.php:849 ../admin/class-is-editor.php:998
511
  msgid "Enable AJAX Search"
512
  msgstr ""
513
 
514
- #: ../admin/class-is-editor.php:669
515
  msgid "Search Results"
516
  msgstr ""
517
 
518
- #: ../admin/class-is-editor.php:677
519
  msgid "Display selected content in the search results."
520
  msgstr ""
521
 
522
- #: ../admin/class-is-editor.php:684
523
  msgid "Description"
524
  msgstr ""
525
 
526
- #: ../admin/class-is-editor.php:692
527
  msgid "Excerpt"
528
  msgstr ""
529
 
530
- #: ../admin/class-is-editor.php:698
531
  msgid "Content"
532
  msgstr ""
533
 
534
- #: ../admin/class-is-editor.php:706
535
  msgid "Description Length."
536
  msgstr ""
537
 
538
- #: ../admin/class-is-editor.php:714
539
  msgid "Image"
540
  msgstr ""
541
 
542
- #: ../admin/class-is-editor.php:725
543
  msgid "Categories"
544
  msgstr ""
545
 
546
- #: ../admin/class-is-editor.php:736
547
  msgid "Tags"
548
  msgstr ""
549
 
550
- #: ../admin/class-is-editor.php:747 ../admin/class-is-list-table.php:33
551
  msgid "Author"
552
  msgstr ""
553
 
554
- #: ../admin/class-is-editor.php:765
555
  msgid "Minimum number of characters required to run ajax search."
556
  msgstr ""
557
 
558
- #: ../admin/class-is-editor.php:770
559
  msgid "Search results box max height."
560
  msgstr ""
561
 
562
- #: ../admin/class-is-editor.php:773
563
  msgid "Configure the plugin text displayed in the search results."
564
  msgstr ""
565
 
566
- #: ../admin/class-is-editor.php:778
567
  msgid "Text when there is no search results. HTML tags is allowed."
568
  msgstr ""
569
 
570
- #: ../admin/class-is-editor.php:787
571
  msgid "Show 'More Results..' text in the bottom of the search results box"
572
  msgstr ""
573
 
574
- #: ../admin/class-is-editor.php:795
575
  msgid "Text for the \"More Results..\"."
576
  msgstr ""
577
 
578
- #: ../admin/class-is-editor.php:805
579
  msgid ""
580
  "View All Result - Show link to search results page at the bottom of search "
581
  "results block."
582
  msgstr ""
583
 
584
- #: ../admin/class-is-editor.php:814
585
  msgid ""
586
  "Text for the \"View All\" which shown at the bottom of the search result."
587
  msgstr ""
588
 
589
- #: ../admin/class-is-editor.php:819
590
  msgid "Configure how the search button should work clicking on it."
591
  msgstr ""
592
 
593
- #: ../admin/class-is-editor.php:825
594
  msgid "Search button displays search results page"
595
  msgstr ""
596
 
597
- #: ../admin/class-is-editor.php:832
598
  msgid "Search button displays ajax search results"
599
  msgstr ""
600
 
601
- #: ../admin/class-is-editor.php:847
 
 
 
 
 
602
  msgid ""
603
- "Please first configure this search form to search WooCommerce product post "
604
- "type."
605
  msgstr ""
606
 
607
- #: ../admin/class-is-editor.php:850
608
  msgid "Display selected WooCommerce content in the search results."
609
  msgstr ""
610
 
611
- #: ../admin/class-is-editor.php:857 ../admin/class-is-editor.php:969
612
  msgid "Price"
613
  msgstr ""
614
 
615
- #: ../admin/class-is-editor.php:868
616
  msgid "Hide Price for Out of Stock Products"
617
  msgstr ""
618
 
619
- #: ../admin/class-is-editor.php:879
620
  msgid "Sale Badge"
621
  msgstr ""
622
 
623
- #: ../admin/class-is-editor.php:890
624
  msgid "SKU"
625
  msgstr ""
626
 
627
- #: ../admin/class-is-editor.php:901
628
  msgid "Stock Status"
629
  msgstr ""
630
 
631
- #: ../admin/class-is-editor.php:912
632
  msgid "Featured Icon"
633
  msgstr ""
634
 
635
- #: ../admin/class-is-editor.php:923
636
  msgid "Matching Categories"
637
  msgstr ""
638
 
639
- #: ../admin/class-is-editor.php:934
640
  msgid "Matching Tags"
641
  msgstr ""
642
 
643
- #: ../admin/class-is-editor.php:945
644
  msgid "Details Box"
645
  msgstr ""
646
 
647
- #: ../admin/class-is-editor.php:951
648
  msgid "Below options only apply to matching categories or tags."
649
  msgstr ""
650
 
651
- #: ../admin/class-is-editor.php:953
652
  msgid "Product List"
653
  msgstr ""
654
 
655
- #: ../admin/class-is-editor.php:956
656
  msgid "All Product"
657
  msgstr ""
658
 
659
- #: ../admin/class-is-editor.php:957
660
  msgid "Featured Products"
661
  msgstr ""
662
 
663
- #: ../admin/class-is-editor.php:958
664
  msgid "On-sale Products</option>"
665
  msgstr ""
666
 
667
- #: ../admin/class-is-editor.php:965
668
  msgid "Order by"
669
  msgstr ""
670
 
671
- #: ../admin/class-is-editor.php:970
672
  msgid "Random"
673
  msgstr ""
674
 
675
- #: ../admin/class-is-editor.php:971
676
  msgid "Sales"
677
  msgstr ""
678
 
679
- #: ../admin/class-is-editor.php:978
680
  msgid "Order"
681
  msgstr ""
682
 
683
- #: ../admin/class-is-editor.php:981
684
  msgid "ASC"
685
  msgstr ""
686
 
687
- #: ../admin/class-is-editor.php:982
688
  msgid "DESC"
689
  msgstr ""
690
 
691
- #: ../admin/class-is-editor.php:999
692
  msgid ""
693
  "Use below customizer to customize AJAX search results color and loader image."
694
  msgstr ""
695
 
696
- #: ../admin/class-is-editor.php:1007
697
  msgid "AJAX Search Customizer"
698
  msgstr ""
699
 
700
- #: ../admin/class-is-editor.php:1025
701
  msgid "This search form excludes the below configured content from search."
702
  msgstr ""
703
 
704
- #: ../admin/class-is-editor.php:1036
705
- msgid "Exclude selected posts from search."
 
 
 
706
  msgstr ""
707
 
708
- #: ../admin/class-is-editor.php:1091
 
 
 
 
 
 
 
 
 
 
 
709
  msgid ""
710
- "This search form is already configured in the Includes section to search "
711
- "specific posts."
712
  msgstr ""
713
 
714
- #: ../admin/class-is-editor.php:1101
715
- msgid "Exclude posts of selected categories, taxonomies & terms from search."
 
 
 
716
  msgstr ""
717
 
718
- #: ../admin/class-is-editor.php:1142
719
- msgid "Exclude posts having selected custom fields from search."
 
 
 
720
  msgstr ""
721
 
722
- #: ../admin/class-is-editor.php:1163
723
- msgid "Excluded Custom Fields :"
 
724
  msgstr ""
725
 
726
- #: ../admin/class-is-editor.php:1177
727
- msgid "Exclude selected WooCommerce products from search."
728
  msgstr ""
729
 
730
- #: ../admin/class-is-editor.php:1185
731
- msgid "Exclude 'Out of Stock' products"
732
  msgstr ""
733
 
734
- #: ../admin/class-is-editor.php:1202
735
- msgid "Exclude posts created by selected authors from search."
736
  msgstr ""
737
 
738
- #: ../admin/class-is-editor.php:1234
739
- msgid ""
740
- "This search form is already configured in the Includes section to search "
741
- "posts created by specific authors."
742
  msgstr ""
743
 
744
- #: ../admin/class-is-editor.php:1245
745
- msgid "Exclude posts having selected post statuses from search."
746
  msgstr ""
747
 
748
- #: ../admin/class-is-editor.php:1268
749
- msgid ""
750
- "This search form is already configured in the Includes section to search "
751
- "posts of specific post statuses."
752
  msgstr ""
753
 
754
- #: ../admin/class-is-editor.php:1273
755
- msgid "Exclude sticky posts from search"
756
  msgstr ""
757
 
758
- #: ../admin/class-is-editor.php:1282
 
 
 
 
 
 
 
 
 
759
  msgid ""
760
- "Exclude selected media, attachments, images, documents, videos, files or "
761
- "MIME types from search."
762
  msgstr ""
763
 
764
- #: ../admin/class-is-editor.php:1304
 
 
 
 
 
 
 
 
 
765
  msgid ""
766
- "This search form is already configured in the Includes section to search "
767
- "specific Attachments, Media or Files."
768
  msgstr ""
769
 
770
- #: ../admin/class-is-editor.php:1314
771
- msgid "Excluded File Types :"
 
 
 
 
772
  msgstr ""
773
 
774
- #: ../admin/class-is-editor.php:1332
775
  msgid "Configure below options to manage functionality of this search form."
776
  msgstr ""
777
 
778
- #: ../admin/class-is-editor.php:1339
779
  msgid "Posts Per Page"
780
  msgstr ""
781
 
782
- #: ../admin/class-is-editor.php:1343
783
  msgid "Display selected number of posts on search results page."
784
  msgstr ""
785
 
786
- #: ../admin/class-is-editor.php:1358
787
  msgid "Order Search Results"
788
  msgstr ""
789
 
790
- #: ../admin/class-is-editor.php:1361
791
  msgid "Display posts on search results page ordered by selected options."
792
  msgstr ""
793
 
794
- #: ../admin/class-is-editor.php:1386
795
  msgid "Highlight Search Terms"
796
  msgstr ""
797
 
798
- #: ../admin/class-is-editor.php:1392
799
  msgid "Highlight searched terms on search results page"
800
  msgstr ""
801
 
802
- #: ../admin/class-is-editor.php:1395
803
  msgid "Set highlight color in Hex format"
804
  msgstr ""
805
 
806
- #: ../admin/class-is-editor.php:1401
807
  msgid "Search All Or Any Search Terms"
808
  msgstr ""
809
 
810
- #: ../admin/class-is-editor.php:1405
811
  msgid ""
812
  "Select whether to search posts having all or any of the words being searched."
813
  msgstr ""
814
 
815
- #: ../admin/class-is-editor.php:1411
816
  msgid "OR - Display content having any of the search terms"
817
  msgstr ""
818
 
819
- #: ../admin/class-is-editor.php:1413
820
  msgid "AND - Display content having all the search terms"
821
  msgstr ""
822
 
823
- #: ../admin/class-is-editor.php:1419
824
  msgid "Fuzzy Matching"
825
  msgstr ""
826
 
827
- #: ../admin/class-is-editor.php:1422
828
  msgid ""
829
  "Select whether to search posts having whole or partial word being searched."
830
  msgstr ""
831
 
832
- #: ../admin/class-is-editor.php:1427
833
  msgid "Whole - Search posts that include the whole search term"
834
  msgstr ""
835
 
836
- #: ../admin/class-is-editor.php:1429
837
  msgid ""
838
  "Partial - Also search words in the posts that begins or ends with the search "
839
  "term"
840
  msgstr ""
841
 
842
- #: ../admin/class-is-editor.php:1435
843
  msgid "Keyword Stemming"
844
  msgstr ""
845
 
846
- #: ../admin/class-is-editor.php:1439
847
  msgid "Select whether to search the base word of a searched keyword."
848
  msgstr ""
849
 
850
- #: ../admin/class-is-editor.php:1440
851
  msgid ""
852
  "For Example: If you search \"doing\" then it also searches base word of "
853
  "\"doing\" that is \"do\" in the specified post types."
854
  msgstr ""
855
 
856
- #: ../admin/class-is-editor.php:1441
857
  msgid "Not recommended to use when Fuzzy Matching option is set to Whole."
858
  msgstr ""
859
 
860
- #: ../admin/class-is-editor.php:1447
861
  msgid "Also search base word of searched keyword"
862
  msgstr ""
863
 
864
- #: ../admin/class-is-editor.php:1454
865
- msgid "Sticky Posts"
866
  msgstr ""
867
 
868
- #: ../admin/class-is-editor.php:1460
869
- msgid "Display sticky posts to the start of the search results page"
870
  msgstr ""
871
 
872
- #: ../admin/class-is-editor.php:1466
873
- msgid "Empty Search Query"
874
  msgstr ""
875
 
876
- #: ../admin/class-is-editor.php:1469
877
  msgid ""
878
  "Select whether to display an error when user perform search without any "
879
  "search word."
880
  msgstr ""
881
 
882
- #: ../admin/class-is-editor.php:1474
883
  msgid "Display an error for empty search query"
884
  msgstr ""
885
 
886
- #: ../admin/class-is-editor.php:1479
887
- msgid "Demo Search"
888
- msgstr ""
889
-
890
- #: ../admin/class-is-editor.php:1485
891
- msgid "Display search form only for site administrator"
892
- msgstr ""
893
-
894
- #: ../admin/class-is-editor.php:1491 ../admin/class-is-settings-fields.php:165
895
- msgid "Disable Search"
896
- msgstr ""
897
-
898
- #: ../admin/class-is-editor.php:1497
899
- msgid "Disable this search form"
900
- msgstr ""
901
-
902
  #: ../admin/class-is-help.php:16 ../admin/class-is-help.php:30
903
  #: ../admin/class-is-help.php:54
904
  msgid "Overview"
@@ -908,15 +972,7 @@ msgstr ""
908
  msgid "Available Actions"
909
  msgstr ""
910
 
911
- #: ../admin/class-is-help.php:35 ../admin/partials/search-form.php:109
912
- msgid "Includes"
913
- msgstr ""
914
-
915
- #: ../admin/class-is-help.php:40 ../admin/partials/search-form.php:113
916
- msgid "Excludes"
917
- msgstr ""
918
-
919
- #: ../admin/class-is-help.php:45 ../admin/partials/search-form.php:125
920
  msgid "Options"
921
  msgstr ""
922
 
@@ -1039,12 +1095,13 @@ msgstr ""
1039
  msgid "For more information:"
1040
  msgstr ""
1041
 
1042
- #: ../admin/class-is-help.php:112 ../admin/partials/settings-form.php:100
1043
  msgid "Give us a rating"
1044
  msgstr ""
1045
 
1046
- #: ../admin/class-is-help.php:137
1047
- msgid "Activate WooCommerce plugin to use this option."
 
1048
  msgstr ""
1049
 
1050
  #: ../admin/class-is-list-table.php:31
@@ -1056,7 +1113,7 @@ msgid "Shortcode"
1056
  msgstr ""
1057
 
1058
  #: ../admin/class-is-list-table.php:119 ../admin/class-is-list-table.php:182
1059
- #: ../admin/partials/search-form.php:163
1060
  msgid "Delete"
1061
  msgstr ""
1062
 
@@ -1066,17 +1123,17 @@ msgid "Edit &#8220;%s&#8221;"
1066
  msgstr ""
1067
 
1068
  #: ../admin/class-is-list-table.php:158
1069
- #: ../admin/class-is-settings-fields.php:380
1070
- #: ../admin/class-is-settings-fields.php:412
1071
- #: ../includes/class-is-search-form.php:503 ../includes/class-is-widget.php:69
1072
  msgid "Edit"
1073
  msgstr ""
1074
 
1075
- #: ../admin/class-is-list-table.php:168 ../admin/partials/search-form.php:178
1076
  msgid "Duplicate"
1077
  msgstr ""
1078
 
1079
- #: ../admin/class-is-list-table.php:181 ../admin/partials/search-form.php:163
1080
  msgid ""
1081
  "You are about to delete this search form.\n"
1082
  " 'Cancel' to stop, 'OK' to delete."
@@ -1096,237 +1153,212 @@ msgid "d/m/Y"
1096
  msgstr ""
1097
 
1098
  #: ../admin/class-is-settings-fields.php:144
1099
- msgid "Select Menu"
1100
  msgstr ""
1101
 
1102
  #: ../admin/class-is-settings-fields.php:145
1103
- #: ../includes/class-is-search-form.php:60
1104
- msgid "Search Form"
1105
  msgstr ""
1106
 
1107
  #: ../admin/class-is-settings-fields.php:146
1108
- msgid "Form Style"
1109
  msgstr ""
1110
 
1111
  #: ../admin/class-is-settings-fields.php:147
1112
- msgid "Menu Title"
1113
  msgstr ""
1114
 
1115
  #: ../admin/class-is-settings-fields.php:148
1116
- msgid "Menu Classes"
1117
  msgstr ""
1118
 
1119
  #: ../admin/class-is-settings-fields.php:149
1120
- msgid "Google CSE"
1121
  msgstr ""
1122
 
1123
  #: ../admin/class-is-settings-fields.php:150
1124
- msgid "Close Icon"
1125
- msgstr ""
1126
-
1127
- #: ../admin/class-is-settings-fields.php:158
1128
- msgid "Header Search"
1129
  msgstr ""
1130
 
1131
  #: ../admin/class-is-settings-fields.php:159
1132
- msgid "Footer Search"
1133
- msgstr ""
1134
-
1135
- #: ../admin/class-is-settings-fields.php:160
1136
- msgid "Mobile Search"
1137
- msgstr ""
1138
-
1139
- #: ../admin/class-is-settings-fields.php:161
1140
- msgid "Custom CSS"
1141
- msgstr ""
1142
-
1143
- #: ../admin/class-is-settings-fields.php:162
1144
- msgid "Stopwords"
1145
- msgstr ""
1146
-
1147
- #: ../admin/class-is-settings-fields.php:163
1148
- msgid "Synonyms"
1149
- msgstr ""
1150
-
1151
- #: ../admin/class-is-settings-fields.php:164
1152
- msgid "Do Not Load Plugin Files"
1153
- msgstr ""
1154
-
1155
- #: ../admin/class-is-settings-fields.php:166
1156
- msgid "Default Search"
1157
  msgstr ""
1158
 
1159
- #: ../admin/class-is-settings-fields.php:176
1160
  msgid "Display search in menu and configure it using below options."
1161
  msgstr ""
1162
 
1163
- #: ../admin/class-is-settings-fields.php:183
1164
  msgid "Make search changes on entire website using below options."
1165
  msgstr ""
1166
 
1167
- #: ../admin/class-is-settings-fields.php:191
1168
  msgid "Display search form on selected menu."
1169
  msgstr ""
1170
 
1171
- #: ../admin/class-is-settings-fields.php:212
1172
  #, php-format
1173
  msgid "Please assign menu to navigation menu location in the %sMenus screen%s."
1174
  msgstr ""
1175
 
1176
- #: ../admin/class-is-settings-fields.php:215
1177
  msgid "Navigation menu location is not registered on the site."
1178
  msgstr ""
1179
 
1180
- #: ../admin/class-is-settings-fields.php:225
1181
- msgid "Select search form that will control menu search functionality."
1182
- msgstr ""
1183
-
1184
- #: ../admin/class-is-settings-fields.php:259
1185
- #: ../admin/class-is-settings-fields.php:382
1186
- #: ../admin/class-is-settings-fields.php:414 ../includes/class-is-widget.php:71
1187
- msgid "Create New"
1188
- msgstr ""
1189
-
1190
- #: ../admin/class-is-settings-fields.php:271
1191
  msgid "Select menu search form style."
1192
  msgstr ""
1193
 
1194
- #: ../admin/class-is-settings-fields.php:275
1195
  msgid "Default"
1196
  msgstr ""
1197
 
1198
- #: ../admin/class-is-settings-fields.php:276
1199
  msgid "Dropdown"
1200
  msgstr ""
1201
 
1202
- #: ../admin/class-is-settings-fields.php:277
1203
  msgid "Sliding"
1204
  msgstr ""
1205
 
1206
- #: ../admin/class-is-settings-fields.php:278
1207
  msgid "Full Width"
1208
  msgstr ""
1209
 
1210
- #: ../admin/class-is-settings-fields.php:279
1211
  msgid "Popup"
1212
  msgstr ""
1213
 
1214
- #: ../admin/class-is-settings-fields.php:304
 
 
 
 
1215
  msgid "Add menu title to display in place of search icon."
1216
  msgstr ""
1217
 
1218
- #: ../admin/class-is-settings-fields.php:316
1219
  msgid "Add class to search form menu item."
1220
  msgstr ""
1221
 
1222
- #: ../admin/class-is-settings-fields.php:321
1223
  msgid "Add multiple classes seperated by space."
1224
  msgstr ""
1225
 
1226
- #: ../admin/class-is-settings-fields.php:329
 
 
 
 
 
 
 
 
 
 
1227
  msgid ""
1228
  "Add Google Custom Search( CSE ) search form code that will replace default "
1229
  "search form."
1230
  msgstr ""
1231
 
1232
- #: ../admin/class-is-settings-fields.php:352
1233
- msgid "Display search form close icon"
1234
- msgstr ""
1235
-
1236
- #: ../admin/class-is-settings-fields.php:361
1237
  msgid "Select search form to display in site header."
1238
  msgstr ""
1239
 
1240
- #: ../admin/class-is-settings-fields.php:373
1241
- #: ../admin/class-is-settings-fields.php:405 ../includes/class-is-widget.php:62
1242
  msgid "none"
1243
  msgstr ""
1244
 
1245
- #: ../admin/class-is-settings-fields.php:393
1246
  msgid "Select search form to display in site footer."
1247
  msgstr ""
1248
 
1249
- #: ../admin/class-is-settings-fields.php:434
1250
  msgid "Display search form in site header on mobile devices"
1251
  msgstr ""
1252
 
1253
- #: ../admin/class-is-settings-fields.php:437
1254
  msgid ""
1255
  "If this site uses cache then please select the below option to display "
1256
  "search form on mobile."
1257
  msgstr ""
1258
 
1259
- #: ../admin/class-is-settings-fields.php:450
1260
  msgid "This site uses cache"
1261
  msgstr ""
1262
 
1263
- #: ../admin/class-is-settings-fields.php:458
1264
  msgid "Add custom css code."
1265
  msgstr ""
1266
 
1267
- #: ../admin/class-is-settings-fields.php:471
1268
  msgid "Enter stopwords here that will not be searched."
1269
  msgstr ""
1270
 
1271
- #: ../admin/class-is-settings-fields.php:475
1272
  msgid "Please separate multiple words with commas."
1273
  msgstr ""
1274
 
1275
- #: ../admin/class-is-settings-fields.php:483
1276
  msgid "Add synonyms here to make the searches find better results."
1277
  msgstr ""
1278
 
1279
- #: ../admin/class-is-settings-fields.php:484
1280
  msgid ""
1281
  "If you add bird = crow to the list of synonyms, searches for bird "
1282
  "automatically become a search for bird crow and will thus match to posts "
1283
  "that include either bird or crow."
1284
  msgstr ""
1285
 
1286
- #: ../admin/class-is-settings-fields.php:485
1287
  msgid ""
1288
  "This only works for search forms configured to search any of the search "
1289
- "terms(OR) and not all search terms(AND)."
1290
  msgstr ""
1291
 
1292
- #: ../admin/class-is-settings-fields.php:490
1293
- msgid "The format here is key = value;"
1294
  msgstr ""
1295
 
1296
- #: ../admin/class-is-settings-fields.php:491
1297
- msgid "Please separate every synonyms key = value pairs with semicolon."
1298
  msgstr ""
1299
 
1300
- #: ../admin/class-is-settings-fields.php:501
1301
  msgid ""
1302
  "Enable below options to disable loading of plugin CSS and JavaScript files."
1303
  msgstr ""
1304
 
1305
- #: ../admin/class-is-settings-fields.php:505
1306
- msgid "Plugin CSS files"
1307
  msgstr ""
1308
 
1309
- #: ../admin/class-is-settings-fields.php:506
1310
- msgid "Plugin JavaScript files"
1311
  msgstr ""
1312
 
1313
- #: ../admin/class-is-settings-fields.php:526
1314
  msgid ""
1315
  "If checked, you have to add following plugin file code into your child theme "
1316
  "CSS file."
1317
  msgstr ""
1318
 
1319
- #: ../admin/class-is-settings-fields.php:530
1320
  msgid ""
1321
  "If checked, you have to add following plugin files code into your child "
1322
  "theme JavaScript file."
1323
  msgstr ""
1324
 
1325
- #: ../admin/class-is-settings-fields.php:546
1326
  msgid "Disable search functionality on entire website"
1327
  msgstr ""
1328
 
1329
- #: ../admin/class-is-settings-fields.php:557
 
 
 
 
1330
  msgid ""
1331
  "Do not use Default Search Form to control WordPress default search "
1332
  "functionality"
@@ -1337,7 +1369,7 @@ msgid "Search form name"
1337
  msgstr ""
1338
 
1339
  #: ../admin/partials/search-form.php:80
1340
- msgid "Editing the title of Default Search Form is restricted."
1341
  msgstr ""
1342
 
1343
  #: ../admin/partials/search-form.php:92
@@ -1346,41 +1378,62 @@ msgid ""
1346
  "content:"
1347
  msgstr ""
1348
 
1349
- #: ../admin/partials/search-form.php:117
 
 
 
 
 
 
 
 
1350
  msgid "Customize"
1351
  msgstr ""
1352
 
1353
  #: ../admin/partials/search-form.php:121
 
 
 
 
1354
  msgid "AJAX"
1355
  msgstr ""
1356
 
1357
- #: ../admin/partials/search-form.php:172
 
 
 
 
 
 
 
 
1358
  msgid "Save"
1359
  msgstr ""
1360
 
1361
- #: ../admin/partials/search-form.php:182
1362
  msgid "Reset"
1363
  msgstr ""
1364
 
1365
- #: ../admin/partials/search-form.php:182
1366
  msgid ""
1367
  "You are about to reset this search form.\n"
1368
  " 'Cancel' to stop, 'OK' to reset."
1369
  msgstr ""
1370
 
1371
- #: ../admin/partials/search-form.php:191 ../admin/partials/settings-form.php:94
1372
  msgid "Information"
1373
  msgstr ""
1374
 
1375
- #: ../admin/partials/search-form.php:194 ../admin/partials/settings-form.php:97
1376
  msgid "Documentation"
1377
  msgstr ""
1378
 
1379
- #: ../admin/partials/search-form.php:196 ../admin/partials/settings-form.php:99
 
1380
  msgid "Contact Us"
1381
  msgstr ""
1382
 
1383
- #: ../admin/partials/search-form.php:197
1384
  msgid "Rate Ivory Search"
1385
  msgstr ""
1386
 
@@ -1434,6 +1487,10 @@ msgstr ""
1434
  msgid "AJAX loader image."
1435
  msgstr ""
1436
 
 
 
 
 
1437
  #: ../includes/class-is-search-form.php:111
1438
  #: ../includes/class-is-search-form.php:205
1439
  msgid "Untitled"
@@ -1454,34 +1511,42 @@ msgstr ""
1454
  msgid "Displays ivory search form."
1455
  msgstr ""
1456
 
1457
- #: ../public/class-is-ajax.php:73
 
 
 
 
 
 
 
 
1458
  msgid "More results"
1459
  msgstr ""
1460
 
1461
- #: ../public/class-is-ajax.php:92 ../public/class-is-ajax.php:493
1462
  msgid "Tag"
1463
  msgstr ""
1464
 
1465
- #: ../public/class-is-ajax.php:102 ../public/class-is-ajax.php:491
1466
  msgid "Category"
1467
  msgstr ""
1468
 
1469
- #: ../public/class-is-ajax.php:671
1470
  msgid "<i>Tagged with:</i> "
1471
  msgstr ""
1472
 
1473
- #: ../public/class-is-ajax.php:696
1474
  msgid "<i>Categories:</i> "
1475
  msgstr ""
1476
 
1477
- #: ../public/class-is-ajax.php:753
1478
  msgid "In stock"
1479
  msgstr ""
1480
 
1481
- #: ../public/class-is-ajax.php:753
1482
  msgid "Out of stock"
1483
  msgstr ""
1484
 
1485
- #: ../public/class-is-ajax.php:820
1486
  msgid "Sale!"
1487
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ivory Search\n"
4
+ "POT-Creation-Date: 2019-09-19 18:43+0530\n"
5
+ "PO-Revision-Date: 2019-09-19 18:43+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Ivory Search <admin@ivorysearch.com>\n"
8
  "Language: en_US\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
+ #: ../admin/class-is-admin.php:73
20
  msgid "The changes you made will be lost if you navigate away from this page."
21
  msgstr ""
22
 
23
+ #: ../admin/class-is-admin.php:137 ../admin/class-is-settings-fields.php:316
24
  #: ../admin/partials/search-form.php:23
25
  msgid "Edit Search Form"
26
  msgstr ""
27
 
28
+ #: ../admin/class-is-admin.php:138
29
  msgid "Click on the search form title to edit it."
30
  msgstr ""
31
 
32
+ #: ../admin/class-is-admin.php:139
33
  msgid "Edit the Default Search Form to manage the default WordPress search."
34
  msgstr ""
35
 
36
+ #: ../admin/class-is-admin.php:163 ../admin/class-is-admin.php:450
37
  #: ../admin/class-is-help.php:64
38
  msgid "Settings"
39
  msgstr ""
40
 
41
+ #: ../admin/class-is-admin.php:181 ../admin/class-is-help.php:110
42
  msgid "Docs"
43
  msgstr ""
44
 
45
+ #: ../admin/class-is-admin.php:182 ../admin/class-is-help.php:111
46
+ #: ../admin/partials/search-form.php:200
47
+ #: ../admin/partials/settings-form.php:100
48
  msgid "Support"
49
  msgstr ""
50
 
51
+ #: ../admin/class-is-admin.php:203
52
  #, php-format
53
  msgid ""
54
  "If you like %1$s please leave us a %2$s rating. A huge thanks in advance!"
55
  msgstr ""
56
 
57
+ #: ../admin/class-is-admin.php:204 ../admin/class-is-admin.php:437
58
  #: ../includes/class-is-admin-public.php:106 ../includes/class-is-widget.php:13
59
+ #: ../includes/class-is-widget.php:47
60
  msgid "Ivory Search"
61
  msgstr ""
62
 
63
+ #: ../admin/class-is-admin.php:227
64
  #, php-format
65
  msgid ""
66
  "Thank you for using <strong>Ivory Search</strong> plugin. You can configure "
69
  "us</a>."
70
  msgstr ""
71
 
72
+ #: ../admin/class-is-admin.php:228 ../admin/class-is-admin.php:249
73
  msgid "Dismiss"
74
  msgstr ""
75
 
76
+ #: ../admin/class-is-admin.php:250
77
  msgid "Have you found Ivory Search plugin useful?"
78
  msgstr ""
79
 
80
+ #: ../admin/class-is-admin.php:251
81
  msgid ""
82
  "We poured a lot of hours into creating it, and we'd love it if you could "
83
  "give us a nice rating on the official plugin directory."
84
  msgstr ""
85
 
86
+ #: ../admin/class-is-admin.php:253
87
  msgid "Rate Ivory Search and Help Us Out"
88
  msgstr ""
89
 
90
+ #: ../admin/class-is-admin.php:254
91
  msgid "Get Support"
92
  msgstr ""
93
 
94
+ #: ../admin/class-is-admin.php:255
95
  msgid "Say Hi"
96
  msgstr ""
97
 
98
+ #: ../admin/class-is-admin.php:293
99
  msgid "No posts found"
100
  msgstr ""
101
 
102
+ #: ../admin/class-is-admin.php:393
103
  msgid "Search form created."
104
  msgstr ""
105
 
106
+ #: ../admin/class-is-admin.php:395
107
  msgid "Search form saved."
108
  msgstr ""
109
 
110
+ #: ../admin/class-is-admin.php:397
111
  msgid "Search form deleted."
112
  msgstr ""
113
 
114
+ #: ../admin/class-is-admin.php:399
115
  msgid "Search form reset."
116
  msgstr ""
117
 
118
+ #: ../admin/class-is-admin.php:408
119
  msgid "There was an error saving the search form."
120
  msgstr ""
121
 
122
+ #: ../admin/class-is-admin.php:416
123
+ msgid "Validation error occurred."
124
  msgstr ""
125
 
126
+ #: ../admin/class-is-admin.php:417 ../admin/class-is-admin.php:422
127
+ #: ../admin/class-is-editor.php:670 ../admin/class-is-editor.php:1087
128
+ #: ../admin/class-is-help.php:35 ../admin/partials/search-form.php:109
129
+ msgid "Includes"
130
+ msgstr ""
131
+
132
+ #: ../admin/class-is-admin.php:418 ../admin/class-is-admin.php:424
133
+ #: ../admin/class-is-editor.php:101 ../admin/class-is-help.php:40
134
+ #: ../admin/partials/search-form.php:114
135
+ msgid "Excludes"
136
+ msgstr ""
137
+
138
+ #: ../admin/class-is-admin.php:427
139
  #, php-format
140
  msgid ""
141
  "Please make sure you have not selected similar %s fields in the search form "
142
+ "%s and %s sections."
143
  msgstr ""
144
 
145
+ #: ../admin/class-is-admin.php:439 ../admin/class-is-admin.php:482
146
  #: ../includes/class-is-search-form.php:59
147
  msgid "Search Forms"
148
  msgstr ""
149
 
150
+ #: ../admin/class-is-admin.php:444 ../admin/class-is-admin.php:446
151
  #: ../admin/partials/search-form.php:21
152
  msgid "Add New Search Form"
153
  msgstr ""
154
 
155
+ #: ../admin/class-is-admin.php:444 ../admin/class-is-admin.php:446
156
+ #: ../admin/class-is-admin.php:489 ../admin/partials/search-form.php:31
157
  msgid "Add New"
158
  msgstr ""
159
 
160
+ #: ../admin/class-is-admin.php:450 ../admin/partials/settings-form.php:20
161
  msgid "Ivory Search Settings"
162
  msgstr ""
163
 
164
+ #: ../admin/class-is-admin.php:495
165
  #, php-format
166
  msgid "Search results for &#8220;%s&#8221;"
167
  msgstr ""
168
 
169
+ #: ../admin/class-is-admin.php:506
170
  msgid "Find Search Forms"
171
  msgstr ""
172
 
173
+ #: ../admin/class-is-admin.php:550
174
  msgid "You are not allowed to edit this item."
175
  msgstr ""
176
 
177
+ #: ../admin/class-is-admin.php:644
178
  msgid "You are not allowed to reset this item."
179
  msgstr ""
180
 
181
+ #: ../admin/class-is-admin.php:680
182
  msgid "You are not allowed to copy this item."
183
  msgstr ""
184
 
185
+ #: ../admin/class-is-admin.php:721
186
  msgid "You are not allowed to delete this item."
187
  msgstr ""
188
 
189
+ #: ../admin/class-is-admin.php:725
190
  msgid "Error in deleting."
191
  msgstr ""
192
 
193
+ #: ../admin/class-is-admin.php:955
194
  msgid "Save Form"
195
  msgstr ""
196
 
197
+ #: ../admin/class-is-admin.php:967
198
  msgid "Upgrade to Pro to Access"
199
  msgstr ""
200
 
201
+ #: ../admin/class-is-admin.php:974
202
  msgid "Install Premium Version to Access"
203
  msgstr ""
204
 
205
+ #: ../admin/class-is-admin.php:976
206
  msgid "Upgrade to Pro Plus to Access"
207
  msgstr ""
208
 
209
+ #: ../admin/class-is-editor.php:61
210
  msgid "The requested section does not exist."
211
  msgstr ""
212
 
213
+ #: ../admin/class-is-editor.php:105
214
  msgid "This search form searches the below configured content."
215
  msgstr ""
216
 
217
+ #: ../admin/class-is-editor.php:113
218
  msgid "Post Types"
219
  msgstr ""
220
 
221
+ #: ../admin/class-is-editor.php:114 ../admin/class-is-editor.php:557
222
+ #: ../admin/class-is-editor.php:641 ../admin/class-is-editor.php:736
223
+ #: ../admin/class-is-editor.php:1058 ../admin/class-is-editor.php:1115
224
+ #: ../admin/class-is-editor.php:1384 ../admin/class-is-editor.php:1415
225
+ #: ../admin/class-is-editor.php:1529 ../admin/class-is-settings-fields.php:118
226
  msgid "Expand All"
227
  msgstr ""
228
 
229
+ #: ../admin/class-is-editor.php:114 ../admin/class-is-editor.php:557
230
+ #: ../admin/class-is-editor.php:642 ../admin/class-is-editor.php:737
231
+ #: ../admin/class-is-editor.php:1059 ../admin/class-is-editor.php:1115
232
+ #: ../admin/class-is-editor.php:1384 ../admin/class-is-editor.php:1415
233
+ #: ../admin/class-is-editor.php:1529 ../admin/class-is-settings-fields.php:118
234
  msgid "Collapse All"
235
  msgstr ""
236
 
238
  msgid "Search selected post types."
239
  msgstr ""
240
 
241
+ #: ../admin/class-is-editor.php:133 ../admin/class-is-editor.php:135
242
+ msgid "Select Post Types"
 
 
 
 
243
  msgstr ""
244
 
245
+ #: ../admin/class-is-editor.php:152
246
+ msgid "No post types registered on the site."
247
  msgstr ""
248
 
249
+ #: ../admin/class-is-editor.php:158
250
+ msgid "Do not display post_type in the search URL"
251
  msgstr ""
252
 
253
+ #: ../admin/class-is-editor.php:168 ../admin/class-is-editor.php:1107
254
+ msgid "( WooCommerce )"
255
  msgstr ""
256
 
257
+ #: ../admin/class-is-editor.php:170 ../admin/class-is-editor.php:1109
258
+ msgid "( Images, Videos, Audios, Docs, PDFs, Files & Media )"
259
  msgstr ""
260
 
261
+ #: ../admin/class-is-editor.php:215 ../admin/class-is-editor.php:263
262
+ #: ../admin/class-is-editor.php:286 ../admin/class-is-editor.php:326
263
+ #: ../admin/class-is-editor.php:1158 ../admin/class-is-editor.php:1211
264
+ #: ../admin/class-is-editor.php:1235 ../admin/class-is-editor.php:1272
265
  msgid "Search.."
266
  msgstr ""
267
 
268
+ #: ../admin/class-is-editor.php:219 ../admin/class-is-editor.php:1162
269
  msgid "Load All"
270
  msgstr ""
271
 
272
+ #: ../admin/class-is-editor.php:224 ../admin/class-is-editor.php:1168
273
+ #, php-format
274
+ msgid "No %ss created."
275
  msgstr ""
276
 
277
+ #: ../admin/class-is-editor.php:226 ../admin/class-is-editor.php:272
278
+ #: ../admin/class-is-editor.php:296 ../admin/class-is-editor.php:334
279
+ #: ../admin/class-is-editor.php:1170 ../admin/class-is-editor.php:1220
280
+ #: ../admin/class-is-editor.php:1246 ../admin/class-is-editor.php:1280
281
  msgid ""
282
+ "Hold down the control (ctrl) or command button to select multiple options."
283
  msgstr ""
284
 
285
+ #: ../admin/class-is-editor.php:234
286
+ msgid ""
287
+ "The search form is configured to only search specific posts of another post "
288
+ "type."
289
  msgstr ""
290
 
291
+ #: ../admin/class-is-editor.php:239
292
+ #, php-format
293
+ msgid "Search all %ss"
294
  msgstr ""
295
 
296
+ #: ../admin/class-is-editor.php:241
297
+ #, php-format
298
+ msgid "Search only selected %ss"
299
  msgstr ""
300
 
301
+ #: ../admin/class-is-editor.php:276
302
+ #, php-format
303
+ msgid "Search %ss of all taxonomies (%s categories, tags & terms %s)"
304
  msgstr ""
305
 
306
+ #: ../admin/class-is-editor.php:278
307
+ #, php-format
308
+ msgid "Search %ss of only selected taxonomies (%s categories, tags & terms %s)"
309
  msgstr ""
310
 
311
+ #: ../admin/class-is-editor.php:300
312
+ #, php-format
313
+ msgid "Search selected %s custom fields values"
314
  msgstr ""
315
 
316
+ #: ../admin/class-is-editor.php:308
317
+ msgid "Search product SKU"
318
  msgstr ""
319
 
320
+ #: ../admin/class-is-editor.php:311
321
+ msgid "Search product variation"
322
  msgstr ""
323
 
324
+ #: ../admin/class-is-editor.php:336
325
+ msgid "Selected File Types :"
326
  msgstr ""
327
 
328
+ #: ../admin/class-is-editor.php:344 ../admin/class-is-editor.php:1290
329
+ msgid "Search all MIME types"
330
  msgstr ""
331
 
332
+ #: ../admin/class-is-editor.php:346
333
+ msgid "Search only selected MIME types"
334
  msgstr ""
335
 
336
+ #: ../admin/class-is-editor.php:351
337
+ msgid "Search Images"
 
338
  msgstr ""
339
 
340
+ #: ../admin/class-is-editor.php:353
341
+ msgid "Search Videos"
342
  msgstr ""
343
 
344
+ #: ../admin/class-is-editor.php:355
345
+ msgid "Search Audios"
346
  msgstr ""
347
 
348
+ #: ../admin/class-is-editor.php:357
349
+ msgid "Search Text Files"
350
  msgstr ""
351
 
352
+ #: ../admin/class-is-editor.php:359
353
+ msgid "Search PDF Files"
 
 
354
  msgstr ""
355
 
356
+ #: ../admin/class-is-editor.php:361
357
+ msgid "Search Document Files"
358
  msgstr ""
359
 
360
+ #: ../admin/class-is-editor.php:365
361
+ #, php-format
362
+ msgid ""
363
+ "This search form is configured in the %s section to not search specific MIME "
364
+ "types."
365
  msgstr ""
366
 
367
+ #: ../admin/class-is-editor.php:368 ../admin/class-is-editor.php:1313
368
  msgid ""
369
+ "You are using WordPress version less than 4.9 which does not support "
370
+ "searching by MIME type."
371
  msgstr ""
372
 
373
+ #: ../admin/class-is-editor.php:377 ../admin/class-is-editor.php:823
374
+ #: ../admin/class-is-editor.php:1033 ../admin/class-is-list-table.php:34
375
+ msgid "Date"
376
  msgstr ""
377
 
378
+ #: ../admin/class-is-editor.php:381
379
+ msgid "Search posts created only in the specified date range."
380
  msgstr ""
381
 
382
+ #: ../admin/class-is-editor.php:387
383
+ msgid "From"
384
  msgstr ""
385
 
386
+ #: ../admin/class-is-editor.php:387
387
+ msgid "To"
 
 
388
  msgstr ""
389
 
390
+ #: ../admin/class-is-editor.php:397 ../admin/class-is-editor.php:1323
391
+ msgid "Authors"
392
  msgstr ""
393
 
394
+ #: ../admin/class-is-editor.php:401
395
+ msgid "Search posts created by selected authors."
396
  msgstr ""
397
 
398
+ #: ../admin/class-is-editor.php:420 ../admin/class-is-editor.php:422
399
+ msgid "Searches all author posts"
400
  msgstr ""
401
 
402
+ #: ../admin/class-is-editor.php:450
403
+ #, php-format
404
+ msgid ""
405
+ "This search form is configured in the %s section to not search for specific "
406
+ "author posts."
407
  msgstr ""
408
 
409
+ #: ../admin/class-is-editor.php:458
410
+ msgid "Search author Display Name and display the posts created by that author"
411
  msgstr ""
412
 
413
+ #: ../admin/class-is-editor.php:463
414
+ msgid "Comments"
 
415
  msgstr ""
416
 
417
+ #: ../admin/class-is-editor.php:467
418
+ msgid "Search posts by configured comments."
419
  msgstr ""
420
 
421
+ #: ../admin/class-is-editor.php:474
422
+ msgid "Search posts having number of comments"
423
  msgstr ""
424
 
425
+ #: ../admin/class-is-editor.php:484
426
+ msgid "NA"
427
  msgstr ""
428
 
429
+ #: ../admin/class-is-editor.php:495
430
+ msgid "Search approved comment content"
431
+ msgstr ""
432
+
433
+ #: ../admin/class-is-editor.php:500 ../admin/class-is-editor.php:1383
434
+ msgid "Post Status"
435
  msgstr ""
436
 
437
+ #: ../admin/class-is-editor.php:504
438
+ msgid "Search posts having selected post statuses."
439
  msgstr ""
440
 
441
+ #: ../admin/class-is-editor.php:521
442
+ msgid "Select Post Status"
443
  msgstr ""
444
 
445
+ #: ../admin/class-is-editor.php:541
446
  msgid "Password Protected"
447
  msgstr ""
448
 
449
+ #: ../admin/class-is-editor.php:547
450
  msgid "Search posts with or without passwords"
451
  msgstr ""
452
 
453
+ #: ../admin/class-is-editor.php:549
454
  msgid "Search posts with passwords"
455
  msgstr ""
456
 
457
+ #: ../admin/class-is-editor.php:551
458
  msgid "Search posts without passwords"
459
  msgstr ""
460
 
461
+ #: ../admin/class-is-editor.php:556 ../admin/class-is-editor.php:1528
462
+ #: ../admin/class-is-settings-fields.php:151
463
+ msgid "Extras"
464
  msgstr ""
465
 
466
+ #: ../admin/class-is-editor.php:563
467
+ #, php-format
468
+ msgid "Search post title %s( File title )%s"
 
469
  msgstr ""
470
 
471
+ #: ../admin/class-is-editor.php:566
472
+ #, php-format
473
+ msgid "Search post content %s( File description )%s"
474
+ msgstr ""
475
+
476
+ #: ../admin/class-is-editor.php:569
477
+ #, php-format
478
+ msgid "Search post excerpt %s( File caption )%s"
479
+ msgstr ""
480
+
481
+ #: ../admin/class-is-editor.php:572
482
+ #, php-format
483
+ msgid "Search category title %s( Displays posts of the category )%s"
484
  msgstr ""
485
 
486
+ #: ../admin/class-is-editor.php:575
487
+ #, php-format
488
+ msgid "Search category description %s( Displays posts of the category )%s"
489
  msgstr ""
490
 
491
+ #: ../admin/class-is-editor.php:596
492
  msgid ""
493
+ "Note: The below option is disabled and set to OR as you have configured the "
494
+ "search form to search multiple taxonomies."
495
  msgstr ""
496
 
497
+ #: ../admin/class-is-editor.php:601
498
+ msgid "AND - Search posts having all the above selected category terms"
499
  msgstr ""
500
 
501
+ #: ../admin/class-is-editor.php:603
502
+ msgid "OR - Search posts having any one of the above selected category terms"
503
+ msgstr ""
504
+
505
+ #: ../admin/class-is-editor.php:624
506
  msgid "Use below options to customize this search form."
507
  msgstr ""
508
 
509
+ #: ../admin/class-is-editor.php:631 ../admin/class-is-editor.php:646
510
  msgid "Enable Search Form Customization"
511
  msgstr ""
512
 
513
+ #: ../admin/class-is-editor.php:639 ../admin/class-is-editor.php:1056
514
  #: ../includes/class-is-search-form.php:507
515
  msgid "Customizer"
516
  msgstr ""
517
 
518
+ #: ../admin/class-is-editor.php:647
519
  msgid ""
520
  "Use below customizer to customize search form colors, text and search form "
521
  "style."
522
  msgstr ""
523
 
524
+ #: ../admin/class-is-editor.php:655
525
  msgid "Search Form Customizer"
526
  msgstr ""
527
 
528
+ #: ../admin/class-is-editor.php:702
529
  msgid "Nothing found"
530
  msgstr ""
531
 
532
+ #: ../admin/class-is-editor.php:705
533
  msgid "View All"
534
  msgstr ""
535
 
536
+ #: ../admin/class-is-editor.php:709
537
  msgid "More Results.."
538
  msgstr ""
539
 
540
+ #: ../admin/class-is-editor.php:720
541
  msgid ""
542
  "Configure below options to manage AJAX functionality of this search form."
543
  msgstr ""
544
 
545
+ #: ../admin/class-is-editor.php:727 ../admin/class-is-editor.php:741
546
+ #: ../admin/class-is-editor.php:914 ../admin/class-is-editor.php:1063
547
  msgid "Enable AJAX Search"
548
  msgstr ""
549
 
550
+ #: ../admin/class-is-editor.php:734
551
  msgid "Search Results"
552
  msgstr ""
553
 
554
+ #: ../admin/class-is-editor.php:742
555
  msgid "Display selected content in the search results."
556
  msgstr ""
557
 
558
+ #: ../admin/class-is-editor.php:749
559
  msgid "Description"
560
  msgstr ""
561
 
562
+ #: ../admin/class-is-editor.php:757
563
  msgid "Excerpt"
564
  msgstr ""
565
 
566
+ #: ../admin/class-is-editor.php:763
567
  msgid "Content"
568
  msgstr ""
569
 
570
+ #: ../admin/class-is-editor.php:771
571
  msgid "Description Length."
572
  msgstr ""
573
 
574
+ #: ../admin/class-is-editor.php:779
575
  msgid "Image"
576
  msgstr ""
577
 
578
+ #: ../admin/class-is-editor.php:790
579
  msgid "Categories"
580
  msgstr ""
581
 
582
+ #: ../admin/class-is-editor.php:801
583
  msgid "Tags"
584
  msgstr ""
585
 
586
+ #: ../admin/class-is-editor.php:812 ../admin/class-is-list-table.php:33
587
  msgid "Author"
588
  msgstr ""
589
 
590
+ #: ../admin/class-is-editor.php:830
591
  msgid "Minimum number of characters required to run ajax search."
592
  msgstr ""
593
 
594
+ #: ../admin/class-is-editor.php:835
595
  msgid "Search results box max height."
596
  msgstr ""
597
 
598
+ #: ../admin/class-is-editor.php:838
599
  msgid "Configure the plugin text displayed in the search results."
600
  msgstr ""
601
 
602
+ #: ../admin/class-is-editor.php:843
603
  msgid "Text when there is no search results. HTML tags is allowed."
604
  msgstr ""
605
 
606
+ #: ../admin/class-is-editor.php:852
607
  msgid "Show 'More Results..' text in the bottom of the search results box"
608
  msgstr ""
609
 
610
+ #: ../admin/class-is-editor.php:860
611
  msgid "Text for the \"More Results..\"."
612
  msgstr ""
613
 
614
+ #: ../admin/class-is-editor.php:870
615
  msgid ""
616
  "View All Result - Show link to search results page at the bottom of search "
617
  "results block."
618
  msgstr ""
619
 
620
+ #: ../admin/class-is-editor.php:879
621
  msgid ""
622
  "Text for the \"View All\" which shown at the bottom of the search result."
623
  msgstr ""
624
 
625
+ #: ../admin/class-is-editor.php:884
626
  msgid "Configure how the search button should work clicking on it."
627
  msgstr ""
628
 
629
+ #: ../admin/class-is-editor.php:890
630
  msgid "Search button displays search results page"
631
  msgstr ""
632
 
633
+ #: ../admin/class-is-editor.php:897
634
  msgid "Search button displays ajax search results"
635
  msgstr ""
636
 
637
+ #: ../admin/class-is-editor.php:905 ../admin/class-is-help.php:137
638
+ msgid "WooCommerce"
639
+ msgstr ""
640
+
641
+ #: ../admin/class-is-editor.php:912
642
+ #, php-format
643
  msgid ""
644
+ "Please first configure this search form in the %s section to search "
645
+ "WooCommerce product post type."
646
  msgstr ""
647
 
648
+ #: ../admin/class-is-editor.php:915
649
  msgid "Display selected WooCommerce content in the search results."
650
  msgstr ""
651
 
652
+ #: ../admin/class-is-editor.php:922 ../admin/class-is-editor.php:1034
653
  msgid "Price"
654
  msgstr ""
655
 
656
+ #: ../admin/class-is-editor.php:933
657
  msgid "Hide Price for Out of Stock Products"
658
  msgstr ""
659
 
660
+ #: ../admin/class-is-editor.php:944
661
  msgid "Sale Badge"
662
  msgstr ""
663
 
664
+ #: ../admin/class-is-editor.php:955
665
  msgid "SKU"
666
  msgstr ""
667
 
668
+ #: ../admin/class-is-editor.php:966
669
  msgid "Stock Status"
670
  msgstr ""
671
 
672
+ #: ../admin/class-is-editor.php:977
673
  msgid "Featured Icon"
674
  msgstr ""
675
 
676
+ #: ../admin/class-is-editor.php:988
677
  msgid "Matching Categories"
678
  msgstr ""
679
 
680
+ #: ../admin/class-is-editor.php:999
681
  msgid "Matching Tags"
682
  msgstr ""
683
 
684
+ #: ../admin/class-is-editor.php:1010
685
  msgid "Details Box"
686
  msgstr ""
687
 
688
+ #: ../admin/class-is-editor.php:1016
689
  msgid "Below options only apply to matching categories or tags."
690
  msgstr ""
691
 
692
+ #: ../admin/class-is-editor.php:1018
693
  msgid "Product List"
694
  msgstr ""
695
 
696
+ #: ../admin/class-is-editor.php:1021
697
  msgid "All Product"
698
  msgstr ""
699
 
700
+ #: ../admin/class-is-editor.php:1022
701
  msgid "Featured Products"
702
  msgstr ""
703
 
704
+ #: ../admin/class-is-editor.php:1023
705
  msgid "On-sale Products</option>"
706
  msgstr ""
707
 
708
+ #: ../admin/class-is-editor.php:1030
709
  msgid "Order by"
710
  msgstr ""
711
 
712
+ #: ../admin/class-is-editor.php:1035
713
  msgid "Random"
714
  msgstr ""
715
 
716
+ #: ../admin/class-is-editor.php:1036
717
  msgid "Sales"
718
  msgstr ""
719
 
720
+ #: ../admin/class-is-editor.php:1043
721
  msgid "Order"
722
  msgstr ""
723
 
724
+ #: ../admin/class-is-editor.php:1046
725
  msgid "ASC"
726
  msgstr ""
727
 
728
+ #: ../admin/class-is-editor.php:1047
729
  msgid "DESC"
730
  msgstr ""
731
 
732
+ #: ../admin/class-is-editor.php:1064
733
  msgid ""
734
  "Use below customizer to customize AJAX search results color and loader image."
735
  msgstr ""
736
 
737
+ #: ../admin/class-is-editor.php:1072
738
  msgid "AJAX Search Customizer"
739
  msgstr ""
740
 
741
+ #: ../admin/class-is-editor.php:1091
742
  msgid "This search form excludes the below configured content from search."
743
  msgstr ""
744
 
745
+ #: ../admin/class-is-editor.php:1177
746
+ #, php-format
747
+ msgid ""
748
+ "The search form is configured in the %s section to only search specific "
749
+ "posts of another post type."
750
  msgstr ""
751
 
752
+ #: ../admin/class-is-editor.php:1183
753
+ #, php-format
754
+ msgid "Do not exclude any %s from search"
755
+ msgstr ""
756
+
757
+ #: ../admin/class-is-editor.php:1185
758
+ #, php-format
759
+ msgid "Exclude selected %ss from search"
760
+ msgstr ""
761
+
762
+ #: ../admin/class-is-editor.php:1188
763
+ #, php-format
764
  msgid ""
765
+ "The search form is configured in the %s section to only search specific "
766
+ "posts."
767
  msgstr ""
768
 
769
+ #: ../admin/class-is-editor.php:1224
770
+ #, php-format
771
+ msgid ""
772
+ "Do not exclude any %s from search of any taxonomies (%s categories, tags & "
773
+ "terms %s)"
774
  msgstr ""
775
 
776
+ #: ../admin/class-is-editor.php:1226
777
+ #, php-format
778
+ msgid ""
779
+ "Exclude %ss from search of selected taxonomies (%s categories, tags & terms "
780
+ "%s)"
781
  msgstr ""
782
 
783
+ #: ../admin/class-is-editor.php:1250
784
+ #, php-format
785
+ msgid "Exclude %ss from search having selected custom fields"
786
  msgstr ""
787
 
788
+ #: ../admin/class-is-editor.php:1258
789
+ msgid "Exclude 'Out of Stock' products from search"
790
  msgstr ""
791
 
792
+ #: ../admin/class-is-editor.php:1282
793
+ msgid "Excluded File Types :"
794
  msgstr ""
795
 
796
+ #: ../admin/class-is-editor.php:1292
797
+ msgid "Exclude selected MIME types from search"
798
  msgstr ""
799
 
800
+ #: ../admin/class-is-editor.php:1296
801
+ msgid "Exclude Images"
 
 
802
  msgstr ""
803
 
804
+ #: ../admin/class-is-editor.php:1298
805
+ msgid "Exclude Videos"
806
  msgstr ""
807
 
808
+ #: ../admin/class-is-editor.php:1300
809
+ msgid "Exclude Audios"
 
 
810
  msgstr ""
811
 
812
+ #: ../admin/class-is-editor.php:1302
813
+ msgid "Exclude Text Files"
814
  msgstr ""
815
 
816
+ #: ../admin/class-is-editor.php:1304
817
+ msgid "Exclude PDF Files"
818
+ msgstr ""
819
+
820
+ #: ../admin/class-is-editor.php:1306
821
+ msgid "Exclude Document Files"
822
+ msgstr ""
823
+
824
+ #: ../admin/class-is-editor.php:1310
825
+ #, php-format
826
  msgid ""
827
+ "This search form is configured in the %s section to search specific "
828
+ "attachments."
829
  msgstr ""
830
 
831
+ #: ../admin/class-is-editor.php:1327
832
+ msgid "Exclude posts from search created by selected authors."
833
+ msgstr ""
834
+
835
+ #: ../admin/class-is-editor.php:1346 ../admin/class-is-editor.php:1348
836
+ msgid "Search all author posts"
837
+ msgstr ""
838
+
839
+ #: ../admin/class-is-editor.php:1376
840
+ #, php-format
841
  msgid ""
842
+ "This search form is configured in the %s section to search posts created by "
843
+ "specific authors."
844
  msgstr ""
845
 
846
+ #: ../admin/class-is-editor.php:1388
847
+ msgid "Exclude posts from search having selected post statuses."
848
+ msgstr ""
849
+
850
+ #: ../admin/class-is-editor.php:1393
851
+ msgid "Exclude sticky posts from search"
852
  msgstr ""
853
 
854
+ #: ../admin/class-is-editor.php:1407
855
  msgid "Configure below options to manage functionality of this search form."
856
  msgstr ""
857
 
858
+ #: ../admin/class-is-editor.php:1414
859
  msgid "Posts Per Page"
860
  msgstr ""
861
 
862
+ #: ../admin/class-is-editor.php:1418
863
  msgid "Display selected number of posts on search results page."
864
  msgstr ""
865
 
866
+ #: ../admin/class-is-editor.php:1433
867
  msgid "Order Search Results"
868
  msgstr ""
869
 
870
+ #: ../admin/class-is-editor.php:1436
871
  msgid "Display posts on search results page ordered by selected options."
872
  msgstr ""
873
 
874
+ #: ../admin/class-is-editor.php:1461
875
  msgid "Highlight Search Terms"
876
  msgstr ""
877
 
878
+ #: ../admin/class-is-editor.php:1467
879
  msgid "Highlight searched terms on search results page"
880
  msgstr ""
881
 
882
+ #: ../admin/class-is-editor.php:1470
883
  msgid "Set highlight color in Hex format"
884
  msgstr ""
885
 
886
+ #: ../admin/class-is-editor.php:1476
887
  msgid "Search All Or Any Search Terms"
888
  msgstr ""
889
 
890
+ #: ../admin/class-is-editor.php:1480
891
  msgid ""
892
  "Select whether to search posts having all or any of the words being searched."
893
  msgstr ""
894
 
895
+ #: ../admin/class-is-editor.php:1485
896
  msgid "OR - Display content having any of the search terms"
897
  msgstr ""
898
 
899
+ #: ../admin/class-is-editor.php:1487
900
  msgid "AND - Display content having all the search terms"
901
  msgstr ""
902
 
903
+ #: ../admin/class-is-editor.php:1493
904
  msgid "Fuzzy Matching"
905
  msgstr ""
906
 
907
+ #: ../admin/class-is-editor.php:1496
908
  msgid ""
909
  "Select whether to search posts having whole or partial word being searched."
910
  msgstr ""
911
 
912
+ #: ../admin/class-is-editor.php:1501
913
  msgid "Whole - Search posts that include the whole search term"
914
  msgstr ""
915
 
916
+ #: ../admin/class-is-editor.php:1503
917
  msgid ""
918
  "Partial - Also search words in the posts that begins or ends with the search "
919
  "term"
920
  msgstr ""
921
 
922
+ #: ../admin/class-is-editor.php:1509
923
  msgid "Keyword Stemming"
924
  msgstr ""
925
 
926
+ #: ../admin/class-is-editor.php:1513
927
  msgid "Select whether to search the base word of a searched keyword."
928
  msgstr ""
929
 
930
+ #: ../admin/class-is-editor.php:1514
931
  msgid ""
932
  "For Example: If you search \"doing\" then it also searches base word of "
933
  "\"doing\" that is \"do\" in the specified post types."
934
  msgstr ""
935
 
936
+ #: ../admin/class-is-editor.php:1515
937
  msgid "Not recommended to use when Fuzzy Matching option is set to Whole."
938
  msgstr ""
939
 
940
+ #: ../admin/class-is-editor.php:1521
941
  msgid "Also search base word of searched keyword"
942
  msgstr ""
943
 
944
+ #: ../admin/class-is-editor.php:1534
945
+ msgid "Display sticky posts to the start of the search results page"
946
  msgstr ""
947
 
948
+ #: ../admin/class-is-editor.php:1538
949
+ msgid "Display search form only for site administrator"
950
  msgstr ""
951
 
952
+ #: ../admin/class-is-editor.php:1542
953
+ msgid "Disable this search form"
954
  msgstr ""
955
 
956
+ #: ../admin/class-is-editor.php:1545
957
  msgid ""
958
  "Select whether to display an error when user perform search without any "
959
  "search word."
960
  msgstr ""
961
 
962
+ #: ../admin/class-is-editor.php:1549
963
  msgid "Display an error for empty search query"
964
  msgstr ""
965
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
966
  #: ../admin/class-is-help.php:16 ../admin/class-is-help.php:30
967
  #: ../admin/class-is-help.php:54
968
  msgid "Overview"
972
  msgid "Available Actions"
973
  msgstr ""
974
 
975
+ #: ../admin/class-is-help.php:45 ../admin/partials/search-form.php:129
 
 
 
 
 
 
 
 
976
  msgid "Options"
977
  msgstr ""
978
 
1095
  msgid "For more information:"
1096
  msgstr ""
1097
 
1098
+ #: ../admin/class-is-help.php:112 ../admin/partials/settings-form.php:102
1099
  msgid "Give us a rating"
1100
  msgstr ""
1101
 
1102
+ #: ../admin/class-is-help.php:138
1103
+ #, php-format
1104
+ msgid "Activate %s plugin to use this option."
1105
  msgstr ""
1106
 
1107
  #: ../admin/class-is-list-table.php:31
1113
  msgstr ""
1114
 
1115
  #: ../admin/class-is-list-table.php:119 ../admin/class-is-list-table.php:182
1116
+ #: ../admin/partials/search-form.php:168
1117
  msgid "Delete"
1118
  msgstr ""
1119
 
1123
  msgstr ""
1124
 
1125
  #: ../admin/class-is-list-table.php:158
1126
+ #: ../admin/class-is-settings-fields.php:359
1127
+ #: ../admin/class-is-settings-fields.php:391
1128
+ #: ../includes/class-is-search-form.php:503 ../includes/class-is-widget.php:71
1129
  msgid "Edit"
1130
  msgstr ""
1131
 
1132
+ #: ../admin/class-is-list-table.php:168 ../admin/partials/search-form.php:183
1133
  msgid "Duplicate"
1134
  msgstr ""
1135
 
1136
+ #: ../admin/class-is-list-table.php:181 ../admin/partials/search-form.php:168
1137
  msgid ""
1138
  "You are about to delete this search form.\n"
1139
  " 'Cancel' to stop, 'OK' to delete."
1153
  msgstr ""
1154
 
1155
  #: ../admin/class-is-settings-fields.php:144
1156
+ msgid "Header Search"
1157
  msgstr ""
1158
 
1159
  #: ../admin/class-is-settings-fields.php:145
1160
+ msgid "Footer Search"
 
1161
  msgstr ""
1162
 
1163
  #: ../admin/class-is-settings-fields.php:146
1164
+ msgid "Mobile Search"
1165
  msgstr ""
1166
 
1167
  #: ../admin/class-is-settings-fields.php:147
1168
+ msgid "Custom CSS"
1169
  msgstr ""
1170
 
1171
  #: ../admin/class-is-settings-fields.php:148
1172
+ msgid "Stopwords"
1173
  msgstr ""
1174
 
1175
  #: ../admin/class-is-settings-fields.php:149
1176
+ msgid "Synonyms"
1177
  msgstr ""
1178
 
1179
  #: ../admin/class-is-settings-fields.php:150
1180
+ msgid "Plugin Files"
 
 
 
 
1181
  msgstr ""
1182
 
1183
  #: ../admin/class-is-settings-fields.php:159
1184
+ msgid "Menu Search Form Settings"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1185
  msgstr ""
1186
 
1187
+ #: ../admin/class-is-settings-fields.php:169
1188
  msgid "Display search in menu and configure it using below options."
1189
  msgstr ""
1190
 
1191
+ #: ../admin/class-is-settings-fields.php:176
1192
  msgid "Make search changes on entire website using below options."
1193
  msgstr ""
1194
 
1195
+ #: ../admin/class-is-settings-fields.php:186
1196
  msgid "Display search form on selected menu."
1197
  msgstr ""
1198
 
1199
+ #: ../admin/class-is-settings-fields.php:207
1200
  #, php-format
1201
  msgid "Please assign menu to navigation menu location in the %sMenus screen%s."
1202
  msgstr ""
1203
 
1204
+ #: ../admin/class-is-settings-fields.php:210
1205
  msgid "Navigation menu location is not registered on the site."
1206
  msgstr ""
1207
 
1208
+ #: ../admin/class-is-settings-fields.php:223
 
 
 
 
 
 
 
 
 
 
1209
  msgid "Select menu search form style."
1210
  msgstr ""
1211
 
1212
+ #: ../admin/class-is-settings-fields.php:227
1213
  msgid "Default"
1214
  msgstr ""
1215
 
1216
+ #: ../admin/class-is-settings-fields.php:228
1217
  msgid "Dropdown"
1218
  msgstr ""
1219
 
1220
+ #: ../admin/class-is-settings-fields.php:229
1221
  msgid "Sliding"
1222
  msgstr ""
1223
 
1224
+ #: ../admin/class-is-settings-fields.php:230
1225
  msgid "Full Width"
1226
  msgstr ""
1227
 
1228
+ #: ../admin/class-is-settings-fields.php:231
1229
  msgid "Popup"
1230
  msgstr ""
1231
 
1232
+ #: ../admin/class-is-settings-fields.php:266
1233
+ msgid "Display search form close icon"
1234
+ msgstr ""
1235
+
1236
+ #: ../admin/class-is-settings-fields.php:272
1237
  msgid "Add menu title to display in place of search icon."
1238
  msgstr ""
1239
 
1240
+ #: ../admin/class-is-settings-fields.php:283
1241
  msgid "Add class to search form menu item."
1242
  msgstr ""
1243
 
1244
+ #: ../admin/class-is-settings-fields.php:288
1245
  msgid "Add multiple classes seperated by space."
1246
  msgstr ""
1247
 
1248
+ #: ../admin/class-is-settings-fields.php:294
1249
+ msgid "Select search form that will control menu search functionality."
1250
+ msgstr ""
1251
+
1252
+ #: ../admin/class-is-settings-fields.php:318
1253
+ #: ../admin/class-is-settings-fields.php:361
1254
+ #: ../admin/class-is-settings-fields.php:393 ../includes/class-is-widget.php:73
1255
+ msgid "Create New"
1256
+ msgstr ""
1257
+
1258
+ #: ../admin/class-is-settings-fields.php:326
1259
  msgid ""
1260
  "Add Google Custom Search( CSE ) search form code that will replace default "
1261
  "search form."
1262
  msgstr ""
1263
 
1264
+ #: ../admin/class-is-settings-fields.php:340
 
 
 
 
1265
  msgid "Select search form to display in site header."
1266
  msgstr ""
1267
 
1268
+ #: ../admin/class-is-settings-fields.php:352
1269
+ #: ../admin/class-is-settings-fields.php:384
1270
  msgid "none"
1271
  msgstr ""
1272
 
1273
+ #: ../admin/class-is-settings-fields.php:372
1274
  msgid "Select search form to display in site footer."
1275
  msgstr ""
1276
 
1277
+ #: ../admin/class-is-settings-fields.php:413
1278
  msgid "Display search form in site header on mobile devices"
1279
  msgstr ""
1280
 
1281
+ #: ../admin/class-is-settings-fields.php:416
1282
  msgid ""
1283
  "If this site uses cache then please select the below option to display "
1284
  "search form on mobile."
1285
  msgstr ""
1286
 
1287
+ #: ../admin/class-is-settings-fields.php:429
1288
  msgid "This site uses cache"
1289
  msgstr ""
1290
 
1291
+ #: ../admin/class-is-settings-fields.php:437
1292
  msgid "Add custom css code."
1293
  msgstr ""
1294
 
1295
+ #: ../admin/class-is-settings-fields.php:450
1296
  msgid "Enter stopwords here that will not be searched."
1297
  msgstr ""
1298
 
1299
+ #: ../admin/class-is-settings-fields.php:454
1300
  msgid "Please separate multiple words with commas."
1301
  msgstr ""
1302
 
1303
+ #: ../admin/class-is-settings-fields.php:462
1304
  msgid "Add synonyms here to make the searches find better results."
1305
  msgstr ""
1306
 
1307
+ #: ../admin/class-is-settings-fields.php:463
1308
  msgid ""
1309
  "If you add bird = crow to the list of synonyms, searches for bird "
1310
  "automatically become a search for bird crow and will thus match to posts "
1311
  "that include either bird or crow."
1312
  msgstr ""
1313
 
1314
+ #: ../admin/class-is-settings-fields.php:464
1315
  msgid ""
1316
  "This only works for search forms configured to search any of the search "
1317
+ "terms(OR) and not all search terms(AND) in the search form Options."
1318
  msgstr ""
1319
 
1320
+ #: ../admin/class-is-settings-fields.php:469
1321
+ msgid "The format here is key = value"
1322
  msgstr ""
1323
 
1324
+ #: ../admin/class-is-settings-fields.php:470
1325
+ msgid "Please add every synonyms key = value pairs on new line."
1326
  msgstr ""
1327
 
1328
+ #: ../admin/class-is-settings-fields.php:480
1329
  msgid ""
1330
  "Enable below options to disable loading of plugin CSS and JavaScript files."
1331
  msgstr ""
1332
 
1333
+ #: ../admin/class-is-settings-fields.php:484
1334
+ msgid "Do not load plugin CSS files"
1335
  msgstr ""
1336
 
1337
+ #: ../admin/class-is-settings-fields.php:485
1338
+ msgid "Do not load plugin JavaScript files"
1339
  msgstr ""
1340
 
1341
+ #: ../admin/class-is-settings-fields.php:509
1342
  msgid ""
1343
  "If checked, you have to add following plugin file code into your child theme "
1344
  "CSS file."
1345
  msgstr ""
1346
 
1347
+ #: ../admin/class-is-settings-fields.php:513
1348
  msgid ""
1349
  "If checked, you have to add following plugin files code into your child "
1350
  "theme JavaScript file."
1351
  msgstr ""
1352
 
1353
+ #: ../admin/class-is-settings-fields.php:531
1354
  msgid "Disable search functionality on entire website"
1355
  msgstr ""
1356
 
1357
+ #: ../admin/class-is-settings-fields.php:537
1358
+ msgid "Warning: Use with caution."
1359
+ msgstr ""
1360
+
1361
+ #: ../admin/class-is-settings-fields.php:542
1362
  msgid ""
1363
  "Do not use Default Search Form to control WordPress default search "
1364
  "functionality"
1369
  msgstr ""
1370
 
1371
  #: ../admin/partials/search-form.php:80
1372
+ msgid "Editing the title of Default Search Form is restricted"
1373
  msgstr ""
1374
 
1375
  #: ../admin/partials/search-form.php:92
1378
  "content:"
1379
  msgstr ""
1380
 
1381
+ #: ../admin/partials/search-form.php:111
1382
+ msgid "Configure the content to search"
1383
+ msgstr ""
1384
+
1385
+ #: ../admin/partials/search-form.php:116
1386
+ msgid "Exclude the content from search"
1387
+ msgstr ""
1388
+
1389
+ #: ../admin/partials/search-form.php:119
1390
  msgid "Customize"
1391
  msgstr ""
1392
 
1393
  #: ../admin/partials/search-form.php:121
1394
+ msgid "Customize search form colors, text and style"
1395
+ msgstr ""
1396
+
1397
+ #: ../admin/partials/search-form.php:124
1398
  msgid "AJAX"
1399
  msgstr ""
1400
 
1401
+ #: ../admin/partials/search-form.php:126
1402
+ msgid "Configure AJAX search"
1403
+ msgstr ""
1404
+
1405
+ #: ../admin/partials/search-form.php:131
1406
+ msgid "Manage search functionality"
1407
+ msgstr ""
1408
+
1409
+ #: ../admin/partials/search-form.php:177
1410
  msgid "Save"
1411
  msgstr ""
1412
 
1413
+ #: ../admin/partials/search-form.php:187
1414
  msgid "Reset"
1415
  msgstr ""
1416
 
1417
+ #: ../admin/partials/search-form.php:187
1418
  msgid ""
1419
  "You are about to reset this search form.\n"
1420
  " 'Cancel' to stop, 'OK' to reset."
1421
  msgstr ""
1422
 
1423
+ #: ../admin/partials/search-form.php:196 ../admin/partials/settings-form.php:96
1424
  msgid "Information"
1425
  msgstr ""
1426
 
1427
+ #: ../admin/partials/search-form.php:199 ../admin/partials/settings-form.php:99
1428
  msgid "Documentation"
1429
  msgstr ""
1430
 
1431
+ #: ../admin/partials/search-form.php:201
1432
+ #: ../admin/partials/settings-form.php:101
1433
  msgid "Contact Us"
1434
  msgstr ""
1435
 
1436
+ #: ../admin/partials/search-form.php:202
1437
  msgid "Rate Ivory Search"
1438
  msgstr ""
1439
 
1487
  msgid "AJAX loader image."
1488
  msgstr ""
1489
 
1490
+ #: ../includes/class-is-search-form.php:60
1491
+ msgid "Search Form"
1492
+ msgstr ""
1493
+
1494
  #: ../includes/class-is-search-form.php:111
1495
  #: ../includes/class-is-search-form.php:205
1496
  msgid "Untitled"
1511
  msgid "Displays ivory search form."
1512
  msgstr ""
1513
 
1514
+ #: ../includes/class-is-widget.php:34
1515
+ msgid "Please select search form in the Ivory Search widget."
1516
+ msgstr ""
1517
+
1518
+ #: ../includes/class-is-widget.php:64
1519
+ msgid "Select Search Form"
1520
+ msgstr ""
1521
+
1522
+ #: ../public/class-is-ajax.php:75
1523
  msgid "More results"
1524
  msgstr ""
1525
 
1526
+ #: ../public/class-is-ajax.php:94 ../public/class-is-ajax.php:495
1527
  msgid "Tag"
1528
  msgstr ""
1529
 
1530
+ #: ../public/class-is-ajax.php:104 ../public/class-is-ajax.php:493
1531
  msgid "Category"
1532
  msgstr ""
1533
 
1534
+ #: ../public/class-is-ajax.php:674
1535
  msgid "<i>Tagged with:</i> "
1536
  msgstr ""
1537
 
1538
+ #: ../public/class-is-ajax.php:699
1539
  msgid "<i>Categories:</i> "
1540
  msgstr ""
1541
 
1542
+ #: ../public/class-is-ajax.php:761
1543
  msgid "In stock"
1544
  msgstr ""
1545
 
1546
+ #: ../public/class-is-ajax.php:761
1547
  msgid "Out of stock"
1548
  msgstr ""
1549
 
1550
+ #: ../public/class-is-ajax.php:828
1551
  msgid "Sale!"
1552
  msgstr ""
public/class-is-ajax.php CHANGED
@@ -52,6 +52,8 @@ class IS_Ajax {
52
 
53
  $search_form = IS_Search_Form::get_instance( $search_post_id );
54
  $stored_field = $search_form->prop( '_is_ajax' );
 
 
55
 
56
  $defaults = array(
57
  'description_source' => 'content',
@@ -107,6 +109,7 @@ class IS_Ajax {
107
  $post_args = array(
108
  'suppress_filters' => false,
109
  'post_type' => '',
 
110
  's' => $search_term,
111
  'paged' => $page,
112
  );
@@ -194,8 +197,7 @@ class IS_Ajax {
194
  </div>
195
  <?php } ?>
196
  <?php
197
- $is_settings = $search_form->prop( '_is_settings' );
198
- if ( isset( $field['show_more_result'] ) && ( ! isset( $is_settings['posts_per_page'] ) || count( $posts ) >= $is_settings['posts_per_page'] ) ) {
199
  $next_page = $page + 1; ?>
200
  <div class="is-show-more-results" data-page="<?php echo $next_page; ?>">
201
  <div class="is-show-more-results-text"><?php echo $field['more_result_text']; ?></div>
@@ -564,10 +566,11 @@ class IS_Ajax {
564
  */
565
  function image_markup( $field, $post ) {
566
  $image = '';
 
567
  if( 'attachment' === $post->post_type ) {
568
- $image = wp_get_attachment_image( $post->ID, 'thumbnail' );
569
  } else if( has_post_thumbnail( $post->ID ) ) {
570
- $image = get_the_post_thumbnail( $post->ID, 'thumbnail' );
571
  }
572
  if( $field['show_image'] && ! empty( $image ) ) { ?>
573
  <div class="left-section">
@@ -727,6 +730,11 @@ class IS_Ajax {
727
  }
728
 
729
  $content = wp_trim_words( $content, $excerpt_length, '...' );
 
 
 
 
 
730
  ?>
731
  <div class="is-ajax-result-description">
732
  <?php echo $content; ?>
52
 
53
  $search_form = IS_Search_Form::get_instance( $search_post_id );
54
  $stored_field = $search_form->prop( '_is_ajax' );
55
+ $is_settings = $search_form->prop( '_is_settings' );
56
+ $posts_per_page = isset( $is_settings['posts_per_page'] ) ? $is_settings['posts_per_page'] : 10;
57
 
58
  $defaults = array(
59
  'description_source' => 'content',
109
  $post_args = array(
110
  'suppress_filters' => false,
111
  'post_type' => '',
112
+ 'numberposts' => $posts_per_page,
113
  's' => $search_term,
114
  'paged' => $page,
115
  );
197
  </div>
198
  <?php } ?>
199
  <?php
200
+ if ( isset( $field['show_more_result'] ) && $field['show_more_result'] && ( count( $posts ) >= $posts_per_page ) ) {
 
201
  $next_page = $page + 1; ?>
202
  <div class="is-show-more-results" data-page="<?php echo $next_page; ?>">
203
  <div class="is-show-more-results-text"><?php echo $field['more_result_text']; ?></div>
566
  */
567
  function image_markup( $field, $post ) {
568
  $image = '';
569
+ $image_size = apply_filters( 'is_ajax_image_size', 'thumbnail' );
570
  if( 'attachment' === $post->post_type ) {
571
+ $image = wp_get_attachment_image( $post->ID, $image_size );
572
  } else if( has_post_thumbnail( $post->ID ) ) {
573
+ $image = get_the_post_thumbnail( $post->ID, $image_size );
574
  }
575
  if( $field['show_image'] && ! empty( $image ) ) { ?>
576
  <div class="left-section">
730
  }
731
 
732
  $content = wp_trim_words( $content, $excerpt_length, '...' );
733
+
734
+ // Removes WPBakery plugin shortcodes
735
+ $patterns = "/\[[\/]?vc_[^\]]*\]/";
736
+ $replacements = "";
737
+ $content = preg_replace( $patterns, $replacements, $content );
738
  ?>
739
  <div class="is-ajax-result-description">
740
  <?php echo $content; ?>
public/class-is-public.php CHANGED
@@ -434,10 +434,11 @@ class IS_Public
434
  }
435
  break;
436
  case 'tax_query':
437
- $tax_args = ( isset( $temp['tax_rel'] ) && 'OR' === $temp['tax_rel'] ? 'OR' : 'AND' );
438
  $tax_args = array(
439
- 'relation' => $tax_args,
440
  );
 
441
  foreach ( $inc_val as $tax_key => $tax_val ) {
442
 
443
  if ( !empty($tax_val) ) {
@@ -447,21 +448,43 @@ class IS_Public
447
  'terms' => array_values( $tax_val ),
448
  );
449
  $tax_arr['post_type'] = $temp['tax_post_type'][$tax_key];
 
 
 
450
  array_push( $tax_args, $tax_arr );
451
  }
452
 
453
  }
 
 
 
454
  $query->set( $inc_key, $tax_args );
455
  break;
456
  case 'author':
457
  break;
458
  case 'date_query':
459
  foreach ( $inc_val as $key => $value ) {
460
- foreach ( $value as $key2 => $value2 ) {
461
- if ( $key2 === $value2 ) {
462
- unset( $inc_val[$key][$key2] );
 
 
 
 
 
 
 
 
 
 
 
463
  }
 
 
 
 
464
  }
 
465
  }
466
 
467
  if ( !empty($inc_val['before']) || !empty($inc_val['after']) ) {
@@ -636,10 +659,10 @@ class IS_Public
636
  // skip processing
637
  }
638
 
639
- $terms_relation_type = 'AND';
640
 
641
  if ( isset( $this->opt['synonyms'] ) && 'OR' === $terms_relation_type ) {
642
- $pairs = explode( ';', $this->opt['synonyms'] );
643
  foreach ( $pairs as $pair ) {
644
  if ( empty($pair) ) {
645
  // Skip empty rows.
434
  }
435
  break;
436
  case 'tax_query':
437
+ $tax_rel = ( isset( $temp['tax_rel'] ) && 'AND' === $temp['tax_rel'] ? 'AND' : 'OR' );
438
  $tax_args = array(
439
+ 'relation' => $tax_rel,
440
  );
441
+ $temp2 = array();
442
  foreach ( $inc_val as $tax_key => $tax_val ) {
443
 
444
  if ( !empty($tax_val) ) {
448
  'terms' => array_values( $tax_val ),
449
  );
450
  $tax_arr['post_type'] = $temp['tax_post_type'][$tax_key];
451
+ if ( empty($temp2) || !in_array( $temp['tax_post_type'][$tax_key], $temp2 ) ) {
452
+ array_push( $temp2, $temp['tax_post_type'][$tax_key] );
453
+ }
454
  array_push( $tax_args, $tax_arr );
455
  }
456
 
457
  }
458
+ if ( count( $temp2 ) > 1 ) {
459
+ $tax_args['relation'] = 'OR';
460
+ }
461
  $query->set( $inc_key, $tax_args );
462
  break;
463
  case 'author':
464
  break;
465
  case 'date_query':
466
  foreach ( $inc_val as $key => $value ) {
467
+
468
+ if ( isset( $inc_val[$key]['date'] ) && !empty($inc_val[$key]['date']) ) {
469
+ $temp = explode( '-', $inc_val[$key]['date'] );
470
+
471
+ if ( is_array( $temp ) && !empty($temp) ) {
472
+ if ( isset( $temp[0] ) && $temp[0] > 0 && $temp[0] < 32 ) {
473
+ $inc_val[$key]['day'] = $temp[0];
474
+ }
475
+ if ( isset( $temp[1] ) ) {
476
+ $inc_val[$key]['month'] = $temp[1];
477
+ }
478
+ if ( isset( $temp[2] ) ) {
479
+ $inc_val[$key]['year'] = $temp[2];
480
+ }
481
  }
482
+
483
+ unset( $inc_val[$key]['date'] );
484
+ } else {
485
+ unset( $inc_val[$key] );
486
  }
487
+
488
  }
489
 
490
  if ( !empty($inc_val['before']) || !empty($inc_val['after']) ) {
659
  // skip processing
660
  }
661
 
662
+ $terms_relation_type = ( isset( $q['_is_settings']['term_rel'] ) && 'OR' === $q['_is_settings']['term_rel'] ? 'OR' : 'AND' );
663
 
664
  if ( isset( $this->opt['synonyms'] ) && 'OR' === $terms_relation_type ) {
665
+ $pairs = preg_split( '/\\r\\n|\\r|\\n/', $this->opt['synonyms'] );
666
  foreach ( $pairs as $pair ) {
667
  if ( empty($pair) ) {
668
  // Skip empty rows.
public/css/ivory-search.css CHANGED
@@ -210,7 +210,7 @@ form .is-link-container {
210
 
211
  form .is-link-container div {
212
  position: absolute;
213
- width: auto;
214
  bottom: -25px;
215
  left: 5px;
216
  z-index: 99999;
210
 
211
  form .is-link-container div {
212
  position: absolute;
213
+ width: 200px;
214
  bottom: -25px;
215
  left: 5px;
216
  z-index: 99999;
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: search, woocommerce search, image search, ajax search, search shortcode, l
5
  Requires at least: 3.9
6
  Tested up to: 5.2
7
  Requires PHP: 5.2.4
8
- Stable tag: 4.3.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -83,7 +83,7 @@ Feel free to ask it using [Contact Form](https://ivorysearch.com/contact/).
83
  <li> Search only posts without passwords.</li>
84
  <li> Search all posts with and without passwords.</li>
85
  <li> Search specific files, MIME type or media attachments such as images, audio, videos, PDF, documents etc. [Premium]</li>
86
- <li> Search in the title, caption and description of images, attachments and media. [Premium]</li>
87
  <li> Search in multiple languages as the plugin supports multilingual plugins such as Polylang, WPML etc.</li>
88
  </ul>
89
 
@@ -121,7 +121,7 @@ Feel free to ask it using [Contact Form](https://ivorysearch.com/contact/).
121
  <li> Option to add word synonyms to provide more relevant search results.</li>
122
  <li> Display post_type argument in the search query URL and restrict search to it.</li>
123
  <li> Search posts having all or any of the selected category or taxonomy terms.</li>
124
- <li> Display content having any or all the searched terms. [Premium]</li>
125
  <li> Fuzzy Matching - Search posts that include the whole search term or search words in the posts that begins or ends with the search term.</li>
126
  <li> Keyword Stemming - Also searches base word of searched keyword. [Premium]</li>
127
  </ul>
@@ -192,6 +192,23 @@ Yes we do. We try our best to help free users with customisation requests and we
192
 
193
  == Changelog ==
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  = 4.3.3 =
196
  * Fixed - header already sent issue displayed in the search forms admin page.
197
  * Fixed - Default style menu search form width issue.
5
  Requires at least: 3.9
6
  Tested up to: 5.2
7
  Requires PHP: 5.2.4
8
+ Stable tag: 4.4
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
83
  <li> Search only posts without passwords.</li>
84
  <li> Search all posts with and without passwords.</li>
85
  <li> Search specific files, MIME type or media attachments such as images, audio, videos, PDF, documents etc. [Premium]</li>
86
+ <li> Search in the title, caption and description of images, attachments and media.</li>
87
  <li> Search in multiple languages as the plugin supports multilingual plugins such as Polylang, WPML etc.</li>
88
  </ul>
89
 
121
  <li> Option to add word synonyms to provide more relevant search results.</li>
122
  <li> Display post_type argument in the search query URL and restrict search to it.</li>
123
  <li> Search posts having all or any of the selected category or taxonomy terms.</li>
124
+ <li> Display content having any or all the searched terms.</li>
125
  <li> Fuzzy Matching - Search posts that include the whole search term or search words in the posts that begins or ends with the search term.</li>
126
  <li> Keyword Stemming - Also searches base word of searched keyword. [Premium]</li>
127
  </ul>
192
 
193
  == Changelog ==
194
 
195
+ = 4.4 =
196
+ * Improved - Plugin admin options user interface.
197
+ * Added - Option "Do not display post_type in the search URL".
198
+ * Added - Filter to change image size in AJAX search results.
199
+ * Fixed - Menu search form not getting saved.
200
+ * Fixed - AJAX search results dispalying WPBakery plugin shortcodes
201
+ * Fixed - AJAX Show More Results section not disabling.
202
+ * Fixed - Add New Search Form screen Undefined index error.
203
+ * Fixed - Edit search form link position issue.
204
+ * Fixed - AJAX More Results text show / hide issue.
205
+ * Fixed - List of post saving issue and DISABLE_IS_LOAD_ALL not working issue.
206
+ * Moved - Menu Search section as a second section.
207
+ * Changed - Synonyms separator from semicolon to new line.
208
+ * Removed - Post status option from the search form Excludes section.
209
+ * Free - Made the premium option free - Search All Or Any Search Terms.
210
+ * Free - Made the premium option free - Menu search form selection.
211
+
212
  = 4.3.3 =
213
  * Fixed - header already sent issue displayed in the search forms admin page.
214
  * Fixed - Default style menu search form width issue.