Ivory Search – WordPress Search Plugin - Version 4.1

Version Description

  • Improved plugin settings User Interface.
  • Added compatibility with Polylang plugin.
Download this release

Release Info

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

Code changes from version 4.0 to 4.1

add-search-to-menu.php CHANGED
@@ -2,8 +2,8 @@
2
  /**
3
  * Plugin Name: Ivory Search
4
  * Plugin URI: https://ivorysearch.com
5
- * Description: Enhances WordPress search to power your site. Ivory Search provides you the options & tools that you need to create an advanced powerful search for your site.
6
- * Version: 4.0
7
  * Author: Ivory Search
8
  * Author URI: https://ivorysearch.com/
9
  * License: GPL2+
2
  /**
3
  * Plugin Name: Ivory Search
4
  * Plugin URI: https://ivorysearch.com
5
+ * Description: The Ultimate WordPress Search plugin to power your custom search. Helping you build a better search. Includes WooCommerce Search support!
6
+ * Version: 4.1
7
  * Author: Ivory Search
8
  * Author URI: https://ivorysearch.com/
9
  * License: GPL2+
admin/class-is-admin.php CHANGED
@@ -66,7 +66,7 @@ class IS_Admin {
66
 
67
  wp_enqueue_style( 'is-admin-styles', plugins_url( '/admin/css/ivory-search-admin.css', IS_PLUGIN_FILE ), array(), IS_VERSION );
68
 
69
- wp_register_script( 'is-admin-scripts', plugins_url( '/admin/js/ivory-search-admin.js', IS_PLUGIN_FILE ), array( 'jquery', 'jquery-ui-tabs' ), IS_VERSION, true );
70
 
71
  $args = array(
72
  'saveAlert' => __(
@@ -688,7 +688,7 @@ class IS_Admin {
688
 
689
  $button = sprintf(
690
  '<input type="submit" class="button-primary" name="is_save" value="%1$s" onclick="%2$s" />',
691
- esc_attr( __( 'Save', 'ivory-search' ) ),
692
  $onclick );
693
 
694
  echo $button;
@@ -698,10 +698,10 @@ class IS_Admin {
698
  * Returns premium plugin version link.
699
  */
700
  public static function pro_link( $plan = 'pro' ) {
701
- if ( is_fs()->is_plan( $plan ) ) {
702
  return '';
703
  } else {
704
- return ' ( <a href="' . esc_url( menu_page_url( 'ivory-search-pricing', false ) ) . '"> ' . esc_html__( "Unlock", 'ivory-search' ) . '</a> ) ';
705
  }
706
  }
707
  }
66
 
67
  wp_enqueue_style( 'is-admin-styles', plugins_url( '/admin/css/ivory-search-admin.css', IS_PLUGIN_FILE ), array(), IS_VERSION );
68
 
69
+ wp_register_script( 'is-admin-scripts', plugins_url( '/admin/js/ivory-search-admin.js', IS_PLUGIN_FILE ), array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-accordion' ), IS_VERSION, true );
70
 
71
  $args = array(
72
  'saveAlert' => __(
688
 
689
  $button = sprintf(
690
  '<input type="submit" class="button-primary" name="is_save" value="%1$s" onclick="%2$s" />',
691
+ esc_attr( __( 'Save Form', 'ivory-search' ) ),
692
  $onclick );
693
 
694
  echo $button;
698
  * Returns premium plugin version link.
699
  */
700
  public static function pro_link( $plan = 'pro' ) {
701
+ if ( is_fs()->is_plan_or_trial( $plan ) ) {
702
  return '';
703
  } else {
704
+ return '<span class="upgrade-wrapper"><a class="upgrade-link" href="' . esc_url( menu_page_url( 'ivory-search-pricing', false ) ) . '"> ' . esc_html__( "Upgrade To Access", 'ivory-search' ) . '</a></span>';
705
  }
706
  }
707
  }
admin/class-is-editor.php CHANGED
@@ -84,427 +84,415 @@ class IS_Search_Editor {
84
  $settings = $post->prop( '_is_settings' );
85
  $excludes = $post->prop( '_is_excludes' );
86
  ?>
87
-
88
- <div class="search-form-editor-box-includes" id="<?php echo $id; ?>">
89
- <fieldset>
90
- <legend>
91
  <?php
92
  _e( "Configure the below options to make specific content searchable.", 'ivory-search' );
93
  ?>
94
- </legend>
95
- <table class="form-table">
96
- <tbody>
97
- <tr>
98
- <th scope="row">
99
- <label for="<?php echo $id; ?>-post_type"><?php echo esc_html( __( 'Post Types', 'ivory-search' ) ); ?></label>
100
- </th>
101
- <td>
102
- <?php
103
- $args = array( 'public' => true );
104
-
105
- if ( isset( $settings['exclude_from_search'] ) ) {
106
- $args = array( 'public' => true, 'exclude_from_search' => false );
107
- }
108
- $posts = get_post_types( $args );
109
 
110
- if ( ! empty( $posts ) ){
111
- foreach ( $posts as $key => $post_type ) {
112
- $checked = isset( $includes['post_type'][ esc_attr( $key )] ) ? $includes['post_type'][ esc_attr( $key )] : 0;
113
 
114
- echo '<div class="col-wrapper check-radio"><input type="checkbox" id="'. $id . '-post_type-' . esc_attr( $key ) . '" name="'. $id . '[post_type][' . esc_attr( $key ) . ']" value="' . esc_attr( $key ) . '" ' . checked( $key, $checked, false ) . '/>';
115
- echo '<label for="'. $id . '-post_type-' . esc_attr( $key ) . '"> ' . ucfirst( esc_html( $post_type ) ) . '</label></div>';
116
- }
117
- $checked = ( isset( $includes['search_title'] ) && $includes['search_title'] ) ? 1 : 0;
118
- echo '<br /><br /><p><input type="checkbox" id="'. $id . '-search_title" name="'. $id . '[search_title]" value="1" ' . checked( 1, $checked, false ) . '/>';
119
- echo '<label for="'. $id . '-search_title">' . esc_html__( "Search in post title.", 'ivory-search' ) . '</label></p>';
120
- $checked = ( isset( $includes['search_content'] ) && $includes['search_content'] ) ? 1 : 0;
121
- echo '<p><input type="checkbox" id="'. $id . '-search_content" name="'. $id . '[search_content]" value="1" ' . checked( 1, $checked, false ) . '/>';
122
- echo '<label for="'. $id . '-search_content">' . esc_html__( "Search in post content.", 'ivory-search' ) . '</label></p>';
123
- $checked = ( isset( $includes['search_excerpt'] ) && $includes['search_excerpt'] ) ? 1 : 0;
124
- echo '<p><input type="checkbox" id="'. $id . '-search_excerpt" name="'. $id . '[search_excerpt]" value="1" ' . checked( 1, $checked, false ) . '/>';
125
- echo '<label for="'. $id . '-search_excerpt">' . esc_html__( "Search in post excerpt.", 'ivory-search' ) . '</label></p>';
126
- echo '<br /><select name="'. $id . '[post_type_qs]" >';
127
- $checked = isset( $includes['post_type_qs'] ) ? $includes['post_type_qs'] : 'none';
128
- echo '<option value="none" ' . selected( 'none', $checked, false ) . '>' . esc_html( __( 'None', 'ivory-search' ) ) . '</option>';
129
- foreach ( $posts as $key => $post_type ) {
130
- echo '<option value="' . $key . '" ' . selected( $key, $checked, false ) . '>' . ucfirst( esc_html( $post_type ) ) . '</option>';
131
- }
132
- echo '</select><label for="'. $id . '-post_type_qs"> ' . esc_html( __( 'Display this post type in the search query URL and restrict search to it.', 'ivory-search' ) ) . '</label>';
133
- } else {
134
- _e( 'No post types registered on your site.', 'ivory-search' );
135
- }
136
- ?>
137
- </td>
138
- <td>
139
- <?php
140
- $title = __( 'Post Types', 'ivory-search' );
141
- $content = '<p>' . __( 'Select post types that you want to make searchable.', 'ivory-search' ) . '</p>';
142
- IS_Help::help_tooltip( $title, $content );
143
- ?>
144
- </td>
145
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
 
147
- <tr>
148
- <th scope="row">
149
- <label for="<?php echo $id; ?>-tax_query"><?php esc_html_e( 'Taxonomy Terms', 'ivory-search' ); ?></label>
150
- </th>
151
- <td>
152
- <?php
153
 
154
- $args = array( 'post', 'page' );
155
 
156
- if ( isset( $includes['post_type'] ) && ! empty( $includes['post_type'] ) && is_array( $includes['post_type'] ) ) {
157
- $args = array_values( $includes['post_type'] );
158
- }
159
 
160
- $tax_objs = get_object_taxonomies( $args, 'objects' );
 
 
 
 
161
 
162
- if ( ! empty( $tax_objs ) ){
163
- foreach ( $tax_objs as $key => $tax_obj ) {
 
 
 
 
164
 
165
- $terms = get_terms( array(
166
- 'taxonomy' => $key,
167
- 'hide_empty' => false,
168
- ) );
169
 
170
- if ( ! empty( $terms ) ){
171
 
172
- echo '<div class="col-wrapper"><div class="col-title">' . ucwords( str_replace( '-', ' ', str_replace( '_', ' ', esc_html( $key ) ) ) ) . '</div>';
173
- echo '<input type="hidden" id="'. $id . '-tax_post_type" name="'. $id . '[tax_post_type]['.$key.']" value="'. implode( ',', $tax_obj->object_type ) .'" />';
174
- echo '<select name="'. $id . '[tax_query]['.$key.'][]" multiple size="8" >';
175
- foreach ( $terms as $key2 => $term ) {
176
 
177
- $checked = ( isset( $includes['tax_query'][$key] ) && in_array( $term->term_taxonomy_id, $includes['tax_query'][$key] ) ) ? $term->term_taxonomy_id : 0;
178
- echo '<option value="' . esc_attr( $term->term_taxonomy_id ) . '" ' . selected( $term->term_taxonomy_id, $checked, false ) . '>' . esc_html( $term->name ) . '</option>';
179
- }
180
- echo '</select></div>';
 
 
 
 
 
 
 
181
  }
 
 
 
 
 
182
  }
183
- echo '<br /><label for="'. $id . '-tax_query" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
184
-
185
- $checked = ( isset( $includes['tax_rel'] ) && "OR" == $includes['tax_rel'] ) ? "OR" : "AND";
186
- echo '<br /><p><input type="radio" id="'. $id . '-tax_rel_and" name="'. $id . '[tax_rel]" value="AND" ' . checked( 'AND', $checked, false ) . '/>';
187
- echo '<label for="'. $id . '-tax_rel_and" >' . esc_html__( "AND - Search posts having all the above selected terms.", 'ivory-search' ) . '</label></p>';
188
- echo '<p><input type="radio" id="'. $id . '-tax_rel_or" name="'. $id . '[tax_rel]" value="OR" ' . checked( 'OR', $checked, false ) . '/>';
189
- echo '<label for="'. $id . '-tax_rel_or" >' . esc_html__( "OR - Search posts having any one of the above selected terms.", 'ivory-search' ) . '</label></p>';
190
- $checked = ( isset( $includes['search_tax_title'] ) && $includes['search_tax_title'] ) ? 1 : 0;
191
- echo '<br /><p><input type="checkbox" id="'. $id . '-search_tax_title" name="'. $id . '[search_tax_title]" value="1" ' . checked( 1, $checked, false ) . '/>';
192
- echo '<label for="'. $id . '-search_tax_title" >' . esc_html__( "Search in taxonomy terms title.", 'ivory-search' ) . '</label></p>';
193
- $checked = ( isset( $includes['search_tax_desp'] ) && $includes['search_tax_desp'] ) ? 1 : 0;
194
- echo '<p><input type="checkbox" id="'. $id . '-search_tax_desp" name="'. $id . '[search_tax_desp]" value="1" ' . checked( 1, $checked, false ) . '/>';
195
- echo '<label for="'. $id . '-search_tax_desp" >' . esc_html__( "Search in taxonomy terms description.", 'ivory-search' ) . '</label></p>';
196
- } else {
197
- _e( 'No taxonomies registered for slected post types.', 'ivory-search' );
198
- }
199
- ?>
200
- </td>
201
- <td>
202
- <?php
203
- $title = __( 'Taxonomy Terms', 'ivory-search' );
204
- $content = '<p>' . __( 'The non empty terms created in the registered taxonomies of above selected post types display here.', 'ivory-search' ) . '</p>';
205
- $content .= '<p>' . __( 'Select terms here to restrict search to the posts having selected terms.', 'ivory-search' ) . '</p>';
206
- IS_Help::help_tooltip( $title, $content );
207
- ?>
208
- </td>
209
- </tr>
210
- <tr>
211
- <th scope="row">
212
- <label for="<?php echo $id; ?>-custom_field"><?php echo esc_html( __( 'Custom Fields', 'ivory-search' ) ); ?></label>
213
- </th>
214
- <td>
215
- <?php
216
- $args = array( 'post', 'page' );
217
-
218
- if ( isset( $includes['post_type'] ) && ! empty( $includes['post_type'] ) && is_array( $includes['post_type'] ) ) {
219
- $args = array_values( $includes['post_type'] );
220
  }
221
- $meta_keys = $this->is_meta_keys( $args );
222
- if ( ! empty( $meta_keys ) ) {
223
- echo '<select name="'. $id . '[custom_field][]" multiple size="8" >';
224
- foreach ( $meta_keys as $meta_key ) {
225
- $checked = ( isset( $includes['custom_field'] ) && in_array( $meta_key, $includes['custom_field'] ) ) ? $meta_key : 0;
226
- echo '<option value="' . esc_attr( $meta_key ) . '" ' . selected( $meta_key, $checked, false ) . '>' . esc_html( $meta_key ) . '</option>';
227
- }
228
- echo '</select>';
229
- echo '<br /><br /><label for="'. $id . '-custom_field" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
230
  }
231
- ?>
232
- </td>
233
- <td>
234
- <?php
235
- $title = __( 'Custom Fields', 'ivory-search' );
236
- $content = '<p>' . __( 'Select custom fields to make their values searchable.', 'ivory-search' ) . '</p>';
237
- IS_Help::help_tooltip( $title, $content );
238
- ?>
239
- </td>
240
- </tr>
241
- <tr>
242
- <th scope="row">
243
- <label for="<?php echo $id; ?>-woocommerce"><?php echo esc_html( __( 'WooCommerce', 'ivory-search' ) ); ?></label>
244
- </th>
245
- <td>
246
- <?php
247
- $args = array( 'post', 'page' );
248
-
249
- if ( isset( $includes['post_type'] ) && ! empty( $includes['post_type'] ) && is_array( $includes['post_type'] ) ) {
250
- $args = array_values( $includes['post_type'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  }
252
- if ( in_array( 'product', $args ) ) {
253
- $woo_sku_disable = is_fs()->is_plan( 'pro_plus' ) ? '' : ' disabled ';
254
- $checked = ( isset( $includes['woo']['sku'] ) && $includes['woo']['sku'] ) ? 1 : 0;
255
- echo '<p><input type="checkbox" ' . $woo_sku_disable . ' id="'. $id . '-sku" name="'. $id . '[woo][sku]" value="1" ' . checked( 1, $checked, false ) . '/>';
256
- echo '<label for="'. $id . '-sku" >' . esc_html__( "Search in WooCommerce products SKU.", 'ivory-search' ) . '</label>';
257
- echo IS_Admin::pro_link( 'pro_plus' ) . '</p>';
258
- } else {
259
- _e( 'WooCommerce product post type is not included in search.', 'ivory-search' );
260
  }
261
- ?>
262
- </td>
263
- <td>
264
- <?php
265
- $title = __( 'WooCommerce', 'ivory-search' );
266
- $content = '<p>' . __( 'Configure WooCommerce products search options here.', 'ivory-search' ) . '</p>';
267
- IS_Help::help_tooltip( $title, $content );
268
- ?>
269
- </td>
270
- </tr>
271
- <tr>
272
- <th scope="row">
273
- <label for="<?php echo $id; ?>-author"><?php echo esc_html( __( 'Authors', 'ivory-search' ) ); ?></label>
274
- </th>
275
- <td>
276
- <?php
277
-
278
- if ( ! isset( $excludes['author'] ) ) {
279
- $author_disable = is_fs()->is_plan( 'pro' ) ? '' : ' disabled ';
280
-
281
- $authors = get_users( array(
282
- 'fields' => array( 'ID', 'display_name' ),
283
- 'orderby' => 'post_count',
284
- 'order' => 'DESC',
285
- 'who' => 'authors',
286
- ) );
287
 
288
- if ( ! empty( $authors ) ) {
289
- if ( '' !== $author_disable ) {
290
- echo '<div class="col-wrapper check-radio">' . IS_Admin::pro_link() . '</div>';
291
- }
292
- foreach ( $authors as $author ) {
293
 
294
- $post_count = count_user_posts( $author->ID );
 
 
 
 
 
 
 
 
295
 
296
- // Move on if user has not published a post (yet).
297
- if ( ! $post_count ) {
298
- continue;
299
- }
 
 
 
 
 
 
 
 
 
 
300
 
301
- $checked = isset( $includes['author'][ esc_attr( $author->ID )] ) ? $includes['author'][ esc_attr( $author->ID )] : 0;
302
 
303
- echo '<div class="col-wrapper check-radio"><input 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 ) . '/>';
304
- echo '<label for="'. $id . '-author-' . esc_attr( $author->ID ) . '"> ' . ucfirst( esc_html( $author->display_name ) ) . '</label></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  }
306
- }
307
- } else {
308
- echo '<label>' . esc_html__( "Search has been already limited by excluding specific authors posts in the Excludes section.", 'ivory-search' ) . '</label>';
 
 
 
 
309
  }
310
 
311
- $checked = ( isset( $includes['search_author'] ) && $includes['search_author'] ) ? 1 : 0;
312
- echo '<br /><br /><input type="checkbox" id="'. $id . '-search_author" name="'. $id . '[search_author]" value="1" ' . checked( 1, $checked, false ) . '/>';
313
- echo '<label for="'. $id . '-search_author" >' . esc_html__( "Search in author Display name and display the posts created by that author.", 'ivory-search' ) . '</label>';
314
- ?>
315
- <td>
316
- <?php
317
- $title = __( 'Authors', 'ivory-search' );
318
- $content = '<p>' . __( 'Make specific author posts searchable.', 'ivory-search' ) . '</p>';
319
- IS_Help::help_tooltip( $title, $content );
320
- ?>
321
- </td>
322
- </td>
323
- </tr>
324
- <tr>
325
- <th scope="row">
326
- <label for="<?php echo $id; ?>-post_status"><?php echo esc_html( __( 'Post Status', 'ivory-search' ) ); ?></label>
327
- </th>
328
- <td>
329
- <?php
330
- if ( ! isset( $excludes['post_status'] ) ) {
331
- $post_statuses = get_post_stati();
332
-
333
- $post_status_disable = is_fs()->is_plan( 'pro' ) ? '' : ' disabled ';
334
-
335
- if ( ! empty( $post_statuses ) ) {
336
- if ( '' !== $post_status_disable ) {
337
- echo '<div class="col-wrapper check-radio">' . IS_Admin::pro_link() . '</div>';
338
- }
339
- foreach ( $post_statuses as $key => $post_status ) {
340
 
341
- $checked = isset( $includes['post_status'][ esc_attr( $key )] ) ? $includes['post_status'][ esc_attr( $key )] : 0;
 
 
 
 
 
 
 
342
 
343
- echo '<div class="col-wrapper check-radio"><input 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 ) . '/>';
344
- echo '<label for="'. $id . '-post_status-' . esc_attr( $key ) . '"> ' . ucwords( str_replace( '-', ' ', esc_html( $post_status ) ) ) . '</label></div>';
345
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  }
347
- } else {
348
- echo '<label>' . esc_html__( "Search has been already limited by excluding specific posts statuses from search in the Excludes section.", 'ivory-search' ) . '</label>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
  }
350
- ?>
351
- </td>
352
- <td>
353
- <?php
354
- $title = __( 'Post Status', 'ivory-search' );
355
- $content = '<p>' . __( 'Configure options to search posts having specific post statuses.', 'ivory-search' ) . '</p>';
356
- IS_Help::help_tooltip( $title, $content );
357
- ?>
358
- </td>
359
- </tr>
360
- <tr>
361
- <th scope="row">
362
- <label for="<?php echo $id; ?>-comment_count"><?php echo esc_html( __( 'Comments', 'ivory-search' ) ); ?></label>
363
- </th>
364
- <td>
365
- <?php
366
- $comment_count_disable = is_fs()->is_plan( 'pro' ) ? '' : ' disabled ';
367
- echo '<select name="'. $id . '[comment_count][compare]" ' . $comment_count_disable . ' style="min-width: 50px;">';
368
- $checked = isset( $includes['comment_count']['compare'] ) ? htmlspecialchars_decode( $includes['comment_count']['compare'] ) : '=';
369
- $compare = array( '=', '!=', '>', '>=', '<', '<=' );
370
- foreach ( $compare as $d ) {
371
- echo '<option value="' . htmlspecialchars_decode( $d ) . '" ' . selected( $d, $checked, false ) . '>' . esc_html( $d ) . '</option>';
372
- }
373
- echo '</select><label for="'. $id . '-comment_count-compare"> ' . esc_html( __( 'The search operator to compare comments count.', 'ivory-search' ) ) . '</label>';
374
- echo IS_Admin::pro_link() . '</div>';
375
-
376
- echo '<br /><select name="'. $id . '[comment_count][value]" ' . $comment_count_disable . ' >';
377
- $checked = isset( $includes['comment_count']['value'] ) ? $includes['comment_count']['value'] : 'na';
378
- echo '<option value="na" ' . selected( 'na', $checked, false ) . '>' . esc_html( __( 'NA', 'ivory-search' ) ) . '</option>';
379
- for ( $d = 0; $d <= 999; $d++ ) {
380
- echo '<option value="' . $d . '" ' . selected( $d, $checked, false ) . '>' . $d . '</option>';
381
- }
382
- echo '</select><label for="'. $id . '-comment_count-value"> ' . esc_html( __( 'The amount of comments your posts has to have.', 'ivory-search' ) ) . '</label>';
383
- echo IS_Admin::pro_link() . '</div>';
384
-
385
- $checked = ( isset( $includes['search_comment'] ) && $includes['search_comment'] ) ? 1 : 0;
386
- echo '<br /><br /><input type="checkbox" id="'. $id . '-search_comment" name="'. $id . '[search_comment]" value="1" ' . checked( 1, $checked, false ) . '/>';
387
- echo '<label for="'. $id . '-search_comment" >' . esc_html__( "Search in approved comments content.", 'ivory-search' ) . '</label>';
388
- ?>
389
- </td>
390
- <td>
391
- <?php
392
- $title = __( 'Comments', 'ivory-search' );
393
- $content = '<p>' . __( 'Make posts searchable having specific comments count.', 'ivory-search' ) . '</p>';
394
- IS_Help::help_tooltip( $title, $content );
395
- ?>
396
- </td>
397
- </tr>
398
- <tr>
399
- <th scope="row">
400
- <label for="<?php echo $id; ?>-date_query"><?php echo esc_html( __( 'Date', 'ivory-search' ) ); ?></label>
401
- </th>
402
- <td>
403
- <?php
404
- $range = array( 'after', 'before' );
405
- foreach ( $range as $value ) {
406
- echo '<div class="col-wrapper ' . $value . '"><div class="col-title">' . ucfirst( $value ) . '</div>';
407
-
408
- echo '<select name="'. $id . '[date_query]['.$value.'][day]" >';
409
- $checked = isset( $includes['date_query'][$value]['day'] ) ? $includes['date_query'][$value]['day'] : 'day';
410
- echo '<option value="day" ' . selected( 'day', $checked, false ) . '>' . esc_html( __( 'Day', 'ivory-search' ) ) . '</option>';
411
- for ( $d = 1; $d <= 31; $d++ ) {
412
- echo '<option value="' . $d . '" ' . selected( $d, $checked, false ) . '>' . $d . '</option>';
413
- }
414
- echo '</select>';
415
 
416
- echo '<select name="'. $id . '[date_query]['.$value.'][month]" >';
417
- $checked = isset( $includes['date_query'][$value]['month'] ) ? $includes['date_query'][$value]['month'] : 'month';
418
- echo '<option value="month" ' . selected( 'month', $checked, false ) . '>' . esc_html( __( 'Month', 'ivory-search' ) ) . '</option>';
419
- for ( $m = 1; $m <= 12; $m++ ) {
420
- echo '<option value="' . $m . '" ' . selected( $m, $checked, false ) . '>' . date( 'F', mktime( 0, 0, 0, $m, 1 ) ) . '</option>';
421
- }
422
- echo '</select>';
423
 
424
- echo '<select name="'. $id . '[date_query]['.$value.'][year]" >';
425
- $checked = isset( $includes['date_query'][$value]['year'] ) ? $includes['date_query'][$value]['year'] : 'year';
426
- echo '<option value="year" ' . selected( 'year', $checked, false ) . '>' . esc_html( __( 'Year', 'ivory-search' ) ) . '</option>';
427
- for ( $y = date("Y"); $y >= 1995; $y-- ) {
428
- echo '<option value="' . $y . '" ' . selected( $y, $checked, false ) . '>' . $y . '</option>';
429
- }
430
- echo '</select></div>';
431
  }
432
- ?>
433
- </td>
434
- <td>
435
- <?php
436
- $title = __( 'Date', 'ivory-search' );
437
- $content = '<p>' . __( 'Make posts searchable created in the specific date range.', 'ivory-search' ) . '</p>';
438
- IS_Help::help_tooltip( $title, $content );
439
- ?>
440
- </td>
441
- </tr>
442
- <tr>
443
- <th scope="row">
444
- <label for="<?php echo $id; ?>-has_password"><?php echo esc_html( __( 'Password', 'ivory-search' ) ); ?></label>
445
- </th>
446
- <td>
447
- <?php
448
- $checked = ( isset( $includes['has_password'] ) ) ? $includes['has_password'] : 'null';
449
- echo '<p><input type="radio" id="'. $id . '-has_password" name="'. $id . '[has_password]" value="null" ' . checked( 'null', $checked, false ) . '/>';
450
- echo '<label for="'. $id . '-has_password" >' . esc_html__( "Search all posts with and without passwords.", 'ivory-search' ) . '</label></p>';
451
- echo '<p><input type="radio" id="'. $id . '-has_password_1" name="'. $id . '[has_password]" value="1" ' . checked( 1, $checked, false ) . '/>';
452
- echo '<label for="'. $id . '-has_password_1" >' . esc_html__( "Search only posts with passwords.", 'ivory-search' ) . '</label></p>';
453
- echo '<p><input type="radio" id="'. $id . '-has_password_0" name="'. $id . '[has_password]" value="0" ' . checked( 0, $checked, false ) . '/>';
454
- echo '<label for="'. $id . '-has_password_0" >' . esc_html__( "Search only posts without passwords.", 'ivory-search' ) . '</label></p>';
455
- ?>
456
- </td>
457
- <td>
458
- <?php
459
- $title = __( 'Password', 'ivory-search' );
460
- $content = '<p>' . __( 'Configure options to search posts with or without password.', 'ivory-search' ) . '</p>';
461
- IS_Help::help_tooltip( $title, $content );
462
- ?>
463
- </td>
464
- </tr>
465
- <?php
466
- global $wp_version;
467
- if ( 4.9 <= $wp_version ) {
468
  ?>
469
- <tr>
470
- <th scope="row">
471
- <label for="<?php echo $id; ?>-post_file_type"><?php echo esc_html( __( 'File Types', 'ivory-search' ) ); ?></label>
472
- </th>
473
- <td>
474
- <?php
475
- if ( ! isset( $excludes['post_file_type'] ) ) {
476
- $file_types = get_allowed_mime_types();
477
- if ( ! empty( $file_types ) ) {
478
- $file_type_disable = is_fs()->is_plan( 'pro_plus' ) ? '' : ' disabled ';
479
- ksort($file_types);
480
- echo '<select name="'. $id . '[post_file_type][]" ' . $file_type_disable . ' multiple size="8" >';
481
- foreach ( $file_types as $key => $file_type ) {
482
- $checked = ( isset( $includes['post_file_type'] ) && in_array( $file_type, $includes['post_file_type'] ) ) ? $file_type : 0;
483
- echo '<option value="' . esc_attr( $file_type ) . '" ' . selected( $file_type, $checked, false ) . '>' . esc_html( $key ) . '</option>';
484
- }
485
- echo '</select>';
486
- echo IS_Admin::pro_link( 'pro_plus' );
487
- echo '<br /><br /><label for="'. $id . '-post_file_type" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
488
  }
489
- } else {
490
- echo '<label>' . esc_html__( "Search has been already limited by excluding specific File type in the Excludes section.", 'ivory-search' ) . '</label>';
 
 
 
 
 
 
 
 
 
 
491
  }
492
- ?>
493
- </td>
494
- <td>
495
- <?php
496
- $title = __( 'File Type', 'ivory-search' );
497
- $content = '<p>' . __( 'Configure options to search posts having specific MIME or file types specially media attachment posts.', 'ivory-search' ) . '</p>';
498
- IS_Help::help_tooltip( $title, $content );
499
- ?>
500
- </td>
501
- </tr>
502
- <?php
503
  }
504
  ?>
505
- </tbody>
506
- </table>
507
- </fieldset>
 
 
 
 
508
  </div>
509
 
510
  <?php
@@ -515,294 +503,296 @@ class IS_Search_Editor {
515
  $excludes = $post->prop( $id );
516
  $includes = $post->prop( '_is_includes' );
517
  ?>
518
- <div class="search-form-editor-box-excludes" id="<?php echo $id; ?>">
519
- <fieldset>
520
- <legend>
521
  <?php
522
  _e( "Configure the options to exclude specific content from search.", 'ivory-search' );
523
  ?>
524
- </legend>
525
- <table class="form-table">
526
- <tbody>
527
- <tr>
528
- <th scope="row">
529
- <label for="<?php echo $id; ?>-post__not_in"><?php echo esc_html( __( 'Posts', 'ivory-search' ) ); ?></label>
530
- </th>
531
- <td>
532
- <?php
533
- $post_types = array( 'post', 'page' );
534
-
535
- if ( isset( $includes['post_type'] ) && ! empty( $includes['post_type'] ) && is_array( $includes['post_type'] ) ) {
536
- $post_types = array_values( $includes['post_type'] );
537
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
538
 
539
- foreach ( $post_types as $post_type ) {
540
-
541
- $posts = get_posts( array(
542
- 'post_type' => $post_type,
543
- 'posts_per_page'=> -1,
544
- 'orderby' => 'title',
545
- 'order' => 'ASC',
546
- ) );
547
-
548
- if ( ! empty( $posts ) ) {
549
- echo '<div class="col-wrapper"><div class="col-title">' . ucwords( $post_type ) . '</div>';
550
- echo '<select name="'. $id . '[post__not_in][]" multiple size="8" >';
551
- foreach ( $posts as $post2 ) {
552
- $checked = ( isset( $excludes['post__not_in'] ) && in_array( $post2->ID, $excludes['post__not_in'] ) ) ? $post2->ID : 0;
553
- $post_title = ( isset( $post2->post_title ) && '' !== $post2->post_title ) ? esc_html( $post2->post_title ) : $post2->post_name;
554
- echo '<option value="' . esc_attr( $post2->ID ) . '" ' . selected( $post2->ID, $checked, false ) . '>' . $post_title . '</option>';
555
  }
556
- echo '</select></div>';
 
557
  }
 
 
 
 
 
 
 
558
  }
559
- echo '<br /><label for="'. $id . '-post__not_in" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
560
- ?>
561
- </td>
562
- <td>
563
- <?php
564
- $title = __( 'Posts', 'ivory-search' );
565
- $content = '<p>' . __( 'The posts and pages of searchable post types display here. You can make post types searchable in the form Includes section.', 'ivory-search' ) . '</p>';
566
- $content .= '<p>' . __( 'Select the posts to exclude from the search.', 'ivory-search' ) . '</p>';
567
- IS_Help::help_tooltip( $title, $content );
568
- ?>
569
- </td>
570
- </tr>
571
- <tr>
572
- <th scope="row">
573
- <label for="<?php echo $id; ?>-tax_query"><?php esc_html_e( 'Taxonomy Terms', 'ivory-search' ); ?></label>
574
- </th>
575
- <td>
576
- <?php
577
- $tax_objs = get_object_taxonomies( $post_types, 'objects' );
578
-
579
- if ( ! empty( $tax_objs ) ) {
580
- foreach ( $tax_objs as $key => $tax_obj ) {
581
-
582
- $terms = get_terms( array(
583
- 'taxonomy' => $key,
584
- 'hide_empty' => false,
585
- ) );
586
-
587
- if ( ! empty( $terms ) ){
588
-
589
- echo '<div class="col-wrapper"><div class="col-title">' . ucwords( str_replace( '-', ' ', str_replace( '_', ' ', esc_html( $key ) ) ) ) . '</div>';
590
- echo '<select name="'. $id . '[tax_query]['.$key.'][]" multiple size="8" >';
591
- foreach ( $terms as $key2 => $term ) {
592
-
593
- $checked = ( isset( $excludes['tax_query'][$key] ) && in_array( $term->term_taxonomy_id, $excludes['tax_query'][$key] ) ) ? $term->term_taxonomy_id : 0;
594
- echo '<option value="' . esc_attr( $term->term_taxonomy_id ) . '" ' . selected( $term->term_taxonomy_id, $checked, false ) . '>' . esc_html( $term->name ) . '</option>';
595
- }
596
- echo '</select></div>';
597
  }
 
 
 
 
 
598
  }
599
- echo '<br /><label for="'. $id . '-tax_query" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
600
- } else {
601
- _e( 'No taxonomies registered for slected post types.', 'ivory-search' );
602
- }
603
- ?>
604
- </td>
605
- <td>
606
- <?php
607
- $title = __( 'Taxonomy Terms', 'ivory-search' );
608
- $content = '<p>' . __( 'The taxonomies and terms attached to searchable post types display here. You can make post types searchable in the form Includes section.', 'ivory-search' ) . '</p>';
609
- $content .= '<p>' . __( 'Exclude posts from the search having selected terms.', 'ivory-search' ) . '</p>';
610
- IS_Help::help_tooltip( $title, $content );
611
- ?>
612
- </td>
613
- </tr>
614
- <tr>
615
- <th scope="row">
616
- <label for="<?php echo $id; ?>-custom_field"><?php echo esc_html( __( 'Custom Fields', 'ivory-search' ) ); ?></label>
617
- </th>
618
- <td>
619
- <?php
620
- $args = array( 'post', 'page' );
621
-
622
- if ( isset( $excludes['post_type'] ) && ! empty( $excludes['post_type'] ) && is_array( $excludes['post_type'] ) ) {
623
- $args = array_values( $excludes['post_type'] );
624
  }
625
- $meta_keys = $this->is_meta_keys( $args );
626
- if ( ! empty( $meta_keys ) ) {
627
- $custom_field_disable = is_fs()->is_plan( 'pro' ) ? '' : ' disabled ';
628
- echo '<select name="'. $id . '[custom_field][]" ' . $custom_field_disable . ' multiple size="8" >';
629
- foreach ( $meta_keys as $meta_key ) {
630
- $checked = ( isset( $excludes['custom_field'] ) && in_array( $meta_key, $excludes['custom_field'] ) ) ? $meta_key : 0;
631
- echo '<option value="' . esc_attr( $meta_key ) . '" ' . selected( $meta_key, $checked, false ) . '>' . esc_html( $meta_key ) . '</option>';
632
- }
633
- echo '</select>';
634
- echo IS_Admin::pro_link();
635
- echo '<br /><br /><label for="'. $id . '-custom_field" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
636
  }
637
- ?>
638
- </td>
639
- <td>
640
- <?php
641
- $title = __( 'Custom Fields', 'ivory-search' );
642
- $content = '<p>' . __( 'Exclude posts from the search having selected custom fields.', 'ivory-search' ) . '</p>';
643
- IS_Help::help_tooltip( $title, $content );
644
- ?>
645
- </td>
646
- </tr>
647
- <tr>
648
- <th scope="row">
649
- <label for="<?php echo $id; ?>-woocommerce"><?php echo esc_html( __( 'WooCommerce', 'ivory-search' ) ); ?></label>
650
- </th>
651
- <td>
652
- <?php
653
- $args = array( 'post', 'page' );
654
-
655
- if ( isset( $includes['post_type'] ) && ! empty( $includes['post_type'] ) && is_array( $includes['post_type'] ) ) {
656
- $args = array_values( $includes['post_type'] );
 
 
 
 
 
 
 
 
 
657
  }
658
- if ( in_array( 'product', $args ) ) {
659
- $outofstock_disable = is_fs()->is_plan( 'pro_plus' ) ? '' : ' disabled ';
660
- $checked = ( isset( $excludes['woo']['outofstock'] ) && $excludes['woo']['outofstock'] ) ? 1 : 0;
661
- echo '<input type="checkbox" ' . $outofstock_disable . ' id="'. $id . '-outofstock" name="'. $id . '[woo][outofstock]" value="1" ' . checked( 1, $checked, false ) . '/>';
662
- echo '<label for="'. $id . '-outofstock" >' . esc_html__( "Exclude 'out of stock' WooCommerce products.", 'ivory-search' ) . '</label>';
663
- echo IS_Admin::pro_link( 'pro_plus' );
664
- } else {
665
- _e( 'WooCommerce product post type is not included in search.', 'ivory-search' );
 
666
  }
667
- ?>
668
- </td>
669
- <td>
670
- <?php
671
- $title = __( 'WooCommerce', 'ivory-search' );
672
- $content = '<p>' . __( 'Exclude specific WooCommerce products from the search.', 'ivory-search' ) . '</p>';
673
- IS_Help::help_tooltip( $title, $content );
674
- ?>
675
- </td>
676
- </tr>
677
- <tr>
678
- <th scope="row">
679
- <label for="<?php echo $id; ?>-author"><?php echo esc_html( __( 'Authors', 'ivory-search' ) ); ?></label>
680
- </th>
681
- <td>
682
- <?php
683
- if ( ! isset( $includes['author'] ) ) {
684
-
685
- $author_disable = is_fs()->is_plan( 'pro' ) ? '' : ' disabled ';
686
- $authors = get_users( array(
687
- 'fields' => array( 'ID', 'display_name' ),
688
- 'orderby' => 'post_count',
689
- 'order' => 'DESC',
690
- 'who' => 'authors',
691
- ) );
692
- if ( ! empty( $authors ) ) {
693
- if ( '' !== $author_disable ) {
694
- echo '<div class="col-wrapper check-radio">' . IS_Admin::pro_link() . '</div>';
695
- }
696
- foreach ( $authors as $author ) {
697
 
698
- $post_count = count_user_posts( $author->ID );
699
 
700
- // Move on if user has not published a post (yet).
701
- if ( ! $post_count ) {
702
- continue;
703
- }
 
 
 
 
 
704
 
705
- $checked = isset( $excludes['author'][ esc_attr( $author->ID )] ) ? $excludes['author'][ esc_attr( $author->ID )] : 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
706
 
707
- echo '<div class="col-wrapper check-radio"><input 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 ) . '/>';
708
- echo '<label for="'. $id . '-author-' . esc_attr( $author->ID ) . '"> ' . ucfirst( esc_html( $author->display_name ) ) . '</label></div>';
709
- }
710
- }
711
- } else {
712
- echo '<label>' . esc_html__( "Search has been already limited to posts created by specific authors in the Includes section.", 'ivory-search' ) . '</label>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
713
  }
714
- ?>
715
- </td>
716
- <td>
717
- <?php
718
- $title = __( 'Authors', 'ivory-search' );
719
- $content = '<p>' . __( 'Exclude posts from the search created by slected authors.', 'ivory-search' ) . '</p>';
720
- IS_Help::help_tooltip( $title, $content );
721
- ?>
722
- </td>
723
- </tr>
724
- <tr>
725
- <th scope="row">
726
- <label for="<?php echo $id; ?>-post_status"><?php echo esc_html( __( 'Post Status', 'ivory-search' ) ); ?></label>
727
- </th>
728
- <td>
729
- <?php
730
- if ( ! isset( $includes['post_status'] ) ) {
731
- $post_statuses = get_post_stati();
732
- $post_status_disable = is_fs()->is_plan( 'pro' ) ? '' : ' disabled ';
733
-
734
- if ( ! empty( $post_statuses ) ) {
735
- if ( '' !== $post_status_disable ) {
736
- echo '<div class="col-wrapper check-radio">' . IS_Admin::pro_link() . '</div>';
737
- }
738
- foreach ( $post_statuses as $key => $post_status ) {
739
 
740
- $checked = isset( $excludes['post_status'][ esc_attr( $key )] ) ? $excludes['post_status'][ esc_attr( $key )] : 0;
741
 
742
- echo '<div class="col-wrapper check-radio"><input 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 ) . '/>';
743
- echo '<label for="'. $id . '-post_status-' . esc_attr( $key ) . '"> ' . ucwords( str_replace( '-', ' ', esc_html( $post_status ) ) ) . '</label></div>';
744
- }
745
- }
746
- } else {
747
- echo '<label>' . esc_html__( "Search has been already limited to posts statuses set in the Includes section.", 'ivory-search' ) . '</label>';
748
  }
749
 
750
- $checked = ( isset( $excludes['ignore_sticky_posts'] ) && $excludes['ignore_sticky_posts'] ) ? 1 : 0;
751
- echo '<br /><br /><input type="checkbox" id="'. $id . '-ignore_sticky_posts" name="'. $id . '[ignore_sticky_posts]" value="1" ' . checked( 1, $checked, false ) . '/>';
752
- echo '<label for="'. $id . '-ignore_sticky_posts" >' . esc_html__( "Exclude sticky posts from search.", 'ivory-search' ) . '</label>';
753
- ?>
754
- </td>
755
- <td>
756
- <?php
757
- $title = __( 'Post Status', 'ivory-search' );
758
- $content = '<p>' . __( 'Exclude posts from the search having selected post statuses.', 'ivory-search' ) . '</p>';
759
- IS_Help::help_tooltip( $title, $content );
760
- ?>
761
- </td>
762
- </tr>
763
- <?php
764
- global $wp_version;
765
- if ( 4.9 <= $wp_version ) {
766
  ?>
767
- <tr>
768
- <th scope="row">
769
- <label for="<?php echo $id; ?>-post_file_type"><?php echo esc_html( __( 'File Types', 'ivory-search' ) ); ?></label>
770
- </th>
771
- <td>
772
- <?php
773
- if ( ! isset( $includes['post_file_type'] ) ) {
774
- $file_types = get_allowed_mime_types();
775
- if ( ! empty( $file_types ) ) {
776
- $file_type_disable = is_fs()->is_plan( 'pro_plus' ) ? '' : ' disabled ';
777
- ksort( $file_types );
778
- echo '<select name="'. $id . '[post_file_type][]" ' . $file_type_disable . ' multiple size="8" >';
779
- foreach ( $file_types as $key => $file_type ) {
780
- $checked = ( isset( $excludes['post_file_type'] ) && in_array( $file_type, $excludes['post_file_type'] ) ) ? $file_type : 0;
781
- echo '<option value="' . esc_attr( $file_type ) . '" ' . selected( $file_type, $checked, false ) . '>' . esc_html( $key ) . '</option>';
782
- }
783
- echo '</select>';
784
- echo IS_Admin::pro_link( 'pro_plus' );
785
- echo '<br /><br /><label for="'. $id . '-post_file_type" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
786
  }
787
- } else {
788
- echo '<label>' . esc_html__( "Search has been already limited to specific File type set in the Includes section.", 'ivory-search' ) . '</label>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
789
  }
790
- ?>
791
- </td>
792
- <td>
793
- <?php
794
- $title = __( 'File Type', 'ivory-search' );
795
- $content = '<p>' . __( 'Exclude posts specially media attachment posts from the search having selected file types.', 'ivory-search' ) . '</p>';
796
- IS_Help::help_tooltip( $title, $content );
797
- ?>
798
- </td>
799
- </tr>
800
- <?php
801
  }
802
  ?>
803
- </tbody>
804
- </table>
805
- </fieldset>
 
 
 
806
  </div>
807
  <?php
808
  }
@@ -811,188 +801,179 @@ class IS_Search_Editor {
811
  $id = '_is_settings';
812
  $settings = $post->prop( $id );
813
  ?>
814
- <div class="search-form-editor-box-excludes" id="<?php echo $id; ?>">
815
- <fieldset>
816
- <legend>
817
  <?php
818
  _e( "Configure the options here to control search of this search form.", 'ivory-search' );
819
  ?>
820
- </legend>
821
- <table class="form-table">
822
- <tbody>
823
- <tr>
824
- <th scope="row">
825
- <label for="<?php echo $id; ?>-posts_per_page"><?php echo esc_html( __( 'Posts Per Page', 'ivory-search' ) ); ?></label>
826
- </th>
827
- <td>
828
- <?php
829
- echo '<select name="'. $id . '[posts_per_page]" >';
830
- $checked = isset( $settings['posts_per_page'] ) ? $settings['posts_per_page'] : get_option( 'posts_per_page', 10 );
831
- for ( $d = 1; $d <= 1000; $d++ ) {
832
- echo '<option value="' . $d . '" ' . selected( $d, $checked, false ) . '>' . $d . '</option>';
833
- }
834
- echo '</select><label for="'. $id . '-posts_per_page"> ' . esc_html( __( 'Number of posts to display on search results page.', 'ivory-search' ) ) . '</label></div>';
835
- ?>
836
- </td>
837
- </tr>
838
- <tr>
839
- <th scope="row">
840
- <label for="<?php echo $id; ?>-order"><?php echo esc_html( __( 'Order By', 'ivory-search' ) ); ?></label>
841
- </th>
842
- <td>
843
- <?php
844
- $orderby_disable = is_fs()->is_plan( 'pro' ) ? '' : ' disabled ';
845
- echo '<select name="'. $id . '[orderby]" ' . $orderby_disable . ' >';
846
- $checked = isset( $settings['orderby'] ) ? $settings['orderby'] : 'date';
847
- $orderbys = array( 'date', 'relevance', 'none', 'ID', 'author', 'title', 'name', 'type', 'modified', 'parent', 'rand',
848
- 'comment_count', 'menu_order', 'meta_value', 'meta_value_num', 'post__in', 'post_name__in', 'post_parent__in' );
849
- foreach ( $orderbys as $orderby ) {
850
- echo '<option value="' . $orderby . '" ' . selected( $orderby, $checked, false ) . '>' . ucwords( str_replace( '_', ' ', esc_html( $orderby ) ) ) . '</option>';
851
- }
852
-
853
- echo '</select><select name="'. $id . '[order]" ' . $orderby_disable . ' >';
854
- $checked = isset( $settings['order'] ) ? $settings['order'] : 'DESC';
855
- $orders = array( 'DESC', 'ASC' );
856
- foreach ( $orders as $order ) {
857
- echo '<option value="' . $order . '" ' . selected( $order, $checked, false ) . '>' . ucwords( str_replace( '_', ' ', esc_html( $order ) ) ) . '</option>';
858
- }
859
- echo '</select>';
860
- echo IS_Admin::pro_link();
861
- ?>
862
- </td>
863
- </tr>
864
- <tr>
865
- <th scope="row">
866
- <label for="<?php echo $id; ?>-highlight_terms"><?php echo esc_html( __( 'Highlight Terms', 'ivory-search' ) ); ?></label>
867
- </th>
868
- <td>
869
- <?php
870
- $checked = ( isset( $settings['highlight_terms'] ) && $settings['highlight_terms'] ) ? 1 : 0;
871
- echo '<input type="checkbox" id="'. $id . '-highlight_terms" name="'. $id . '[highlight_terms]" value="1" ' . checked( 1, $checked, false ) . '/>';
872
- echo '<label for="'. $id . '-highlight_terms" >' . esc_html__( "Highlight searched terms on search results page.", 'ivory-search' ) . '</label>';
873
- $color = ( isset( $settings['highlight_color'] ) ) ? $settings['highlight_color'] : '#FFFFB9';
874
- echo '<br /><br /><input size="10" type="text" id="'. $id . '-highlight_color" name="'. $id . '[highlight_color]" value="' . $color . '" />';
875
- echo '<label for="'. $id . '-highlight_color" > ' . esc_html__( "Set highlight color.", 'ivory-search' ) . '</label>';
876
- ?>
877
- </td>
878
- </tr>
879
- <tr>
880
- <th scope="row">
881
- <label for="<?php echo $id; ?>-term_rel"><?php echo esc_html( __( 'Search Terms Relation', 'ivory-search' ) ); ?></label>
882
- </th>
883
- <td>
884
- <?php
885
- $term_rel_disable = is_fs()->is_plan( 'pro' ) ? '' : ' disabled ';
886
- $checked = ( isset( $settings['term_rel'] ) && "OR" === $settings['term_rel'] ) ? "OR" : "AND";
887
- echo '<p><input type="radio" ' . $term_rel_disable . ' id="'. $id . '-term_rel_or" name="'. $id . '[term_rel]" value="OR" ' . checked( 'OR', $checked, false ) . '/>';
888
- echo '<label for="'. $id . '-term_rel_or" >' . esc_html__( "OR - Display content having any of the searched terms.", 'ivory-search' ) . '</label>' . IS_Admin::pro_link() . '</p>';
889
- echo '<p><input type="radio" ' . $term_rel_disable . ' id="'. $id . '-term_rel_and" name="'. $id . '[term_rel]" value="AND" ' . checked( 'AND', $checked, false ) . '/>';
890
- echo '<label for="'. $id . '-term_rel_and" >' . esc_html__( "AND - Display content having all the searched terms.", 'ivory-search' ) . '</label></p>';
891
- ?>
892
- </td>
893
- </tr>
894
- <tr>
895
- <th scope="row">
896
- <label for="<?php echo $id; ?>-fuzzy_match"><?php echo esc_html( __( 'Fuzzy Matching', 'ivory-search' ) ); ?></label>
897
- </th>
898
- <td>
899
- <?php
900
- $checked = isset( $settings['fuzzy_match'] ) ? $settings['fuzzy_match'] : '2';
901
- echo '<p><input type="radio" id="'. $id . '-whole" name="'. $id . '[fuzzy_match]" value="1" ' . checked( '1', $checked, false ) . '/>';
902
- echo '<label for="'. $id . '-whole" >' . esc_html__( "Whole - Search posts that include the whole search term.", 'ivory-search' ) . '</label></p>';
903
- echo '<p><input type="radio" id="'. $id . '-partial" name="'. $id . '[fuzzy_match]" value="2" ' . checked( '2', $checked, false ) . '/>';
904
- echo '<label for="'. $id . '-partial" >' . esc_html__( "Partial - Also search words in the posts that begins or ends with the search term.", 'ivory-search' ) . '</label></p>';
905
- ?>
906
- </td>
907
- </tr>
908
- <tr>
909
- <th scope="row">
910
- <label for="<?php echo $id; ?>-keyword_stem"><?php echo esc_html( __( 'Keyword Stemming', 'ivory-search' ) ); ?></label>
911
- </th>
912
- <td>
913
- <?php
914
- $stem_disable = is_fs()->is_plan( 'pro_plus' ) ? '' : ' disabled ';
915
- $checked = ( isset( $settings['keyword_stem'] ) && $settings['keyword_stem'] ) ? 1 : 0;
916
- echo '<input type="checkbox" id="'. $id . '-keyword_stem" ' . $stem_disable . ' name="'. $id . '[keyword_stem]" value="1" ' . checked( 1, $checked, false ) . '/>';
917
- echo '<label for="'. $id . '-keyword_stem" >' . esc_html__( "Also search base word of searched keyword.", 'ivory-search' ) . '</label>';
918
- echo IS_Admin::pro_link( 'pro_plus' );
919
- echo '<br /><label for="'. $id . '-keyword_stem" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Not recommended to use when Fuzzy Matching option is set to Whole.", 'ivory-search' ) . '</label>';
920
- ?>
921
- </td>
922
- <td>
923
- <?php
924
- $title = __( 'Keyword Stemming', 'ivory-search' );
925
- $content = '<p>' . __( 'It also searches base word of searched keyword.', 'ivory-search' ) . '</p>';
926
- $content .= '<p>' . __( 'For Example: If you search "doing" then it also searches base word of "doing" that is "do" in the posts.', 'ivory-search' ) . '</p>';
927
- $content .= '<p>' . __( 'If you want to search whole exact searched term then do not use this options and in this case it is not recommended to use when Fuzzy Matching option is set to Whole.', 'ivory-search' ) . '</p>';
928
- IS_Help::help_tooltip( $title, $content );
929
- ?>
930
- </td>
931
- </tr>
932
- <tr>
933
- <th scope="row">
934
- <label for="<?php echo $id; ?>-move_sticky_posts"><?php echo esc_html( __( 'Sticky Posts', 'ivory-search' ) ); ?></label>
935
- </th>
936
- <td>
937
  <?php
938
- $checked = ( isset( $settings['move_sticky_posts'] ) && $settings['move_sticky_posts'] ) ? 1 : 0;
939
- echo '<input type="checkbox" id="'. $id . '-move_sticky_posts" name="'. $id . '[move_sticky_posts]" value="1" ' . checked( 1, $checked, false ) . '/>';
940
- echo '<label for="'. $id . '-move_sticky_posts" >' . esc_html__( "Move sticky posts to the start of the search results page.", 'ivory-search' ) . '</label>';
941
- ?>
942
- </td>
943
- </tr>
944
- <tr>
945
- <th scope="row">
946
- <label for="<?php echo $id; ?>-empty_search"><?php echo esc_html( __( 'Empty Search', 'ivory-search' ) ); ?></label>
947
- </th>
948
- <td>
949
- <?php
950
- $checked = ( isset( $settings['empty_search'] ) && $settings['empty_search'] ) ? 1 : 0;
951
- echo '<input type="checkbox" id="'. $id . '-empty_search" name="'. $id . '[empty_search]" value="1" ' . checked( 1, $checked, false ) . '/>';
952
- echo '<label for="'. $id . '-empty_search" >' . esc_html__( "Display an error for empty search query.", 'ivory-search' ) . '</label>';
953
- ?>
954
- </td>
955
- </tr>
956
- <tr>
957
- <th scope="row">
958
- <label for="<?php echo $id; ?>-exclude_from_search"><?php echo esc_html( __( 'Respect exclude_from_search', 'ivory-search' ) ); ?></label>
959
- </th>
960
- <td>
961
- <?php
962
- $checked = ( isset( $settings['exclude_from_search'] ) && $settings['exclude_from_search'] ) ? 1 : 0;
963
- echo '<input type="checkbox" id="'. $id . '-exclude_from_search" name="'. $id . '[exclude_from_search]" value="1" ' . checked( 1, $checked, false ) . '/>';
964
- echo '<label for="'. $id . '-exclude_from_search" >' . esc_html__( "Do not search post types which are excluded from search.", 'ivory-search' ) . '</label>';
965
- ?>
966
- </td>
967
- </tr>
968
- <tr>
969
- <th scope="row">
970
- <label for="<?php echo $id; ?>-demo"><?php echo esc_html( __( 'Demo', 'ivory-search' ) ); ?></label>
971
- </th>
972
- <td>
973
- <?php
974
- $checked = ( isset( $settings['demo'] ) && $settings['demo'] ) ? 1 : 0;
975
- echo '<input type="checkbox" id="'. $id . '-demo" name="'. $id . '[demo]" value="1" ' . checked( 1, $checked, false ) . '/>';
976
- echo '<label for="'. $id . '-demo" >' . esc_html__( "Display search form only for site administrator.", 'ivory-search' ) . '</label>';
977
  ?>
978
- </td>
979
- </tr>
980
- <tr>
981
- <th scope="row">
982
- <label for="<?php echo $id; ?>-disable"><?php echo esc_html( __( 'Disable', 'ivory-search' ) ); ?></label>
983
- </th>
984
- <td>
985
  <?php
986
- $checked = ( isset( $settings['disable'] ) && $settings['disable'] ) ? 1 : 0;
987
- echo '<input type="checkbox" id="'. $id . '-disable" name="'. $id . '[disable]" value="1" ' . checked( 1, $checked, false ) . '/>';
988
- echo '<label for="'. $id . '-disable" >' . esc_html__( "Disable this search form.", 'ivory-search' ) . '</label>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
989
  ?>
990
- </td>
991
- </tr>
992
- </tbody>
993
- </table>
994
- </fieldset>
995
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
996
  <?php
997
  }
998
  }
84
  $settings = $post->prop( '_is_settings' );
85
  $excludes = $post->prop( '_is_excludes' );
86
  ?>
87
+ <h4 class="panel-desc">
 
 
 
88
  <?php
89
  _e( "Configure the below options to make specific content searchable.", 'ivory-search' );
90
  ?>
91
+ </h4>
92
+ <div class="search-form-editor-box" id="<?php echo $id; ?>">
 
 
 
 
 
 
 
 
 
 
 
 
 
93
 
94
+ <div class="form-table">
 
 
95
 
96
+ <h3 scope="row">
97
+ <label for="<?php echo $id; ?>-post_type"><?php esc_html_e( 'Post Types', 'ivory-search' ); ?></label>
98
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span>
99
+ </h3>
100
+ <div>
101
+ <?php
102
+
103
+ $content = __( 'Select post types that you want to make searchable.', 'ivory-search' );
104
+ IS_Help::help_info( $content );
105
+ echo '<div>';
106
+ $args = array( 'public' => true );
107
+
108
+ if ( isset( $settings['exclude_from_search'] ) ) {
109
+ $args = array( 'public' => true, 'exclude_from_search' => false );
110
+ }
111
+ $posts = get_post_types( $args );
112
+
113
+ if ( ! empty( $posts ) ){
114
+ foreach ( $posts as $key => $post_type ) {
115
+ $checked = isset( $includes['post_type'][ esc_attr( $key )] ) ? $includes['post_type'][ esc_attr( $key )] : 0;
116
+
117
+ echo '<div class="col-wrapper check-radio">';
118
+ echo '<label for="'. $id . '-post_type-' . esc_attr( $key ) . '"> ';
119
+ echo '<input type="checkbox" id="'. $id . '-post_type-' . esc_attr( $key ) . '" name="'. $id . '[post_type][' . esc_attr( $key ) . ']" value="' . esc_attr( $key ) . '" ' . checked( $key, $checked, false ) . '/>';
120
+ echo '<span class="toggle-check-text"></span>';
121
+ echo ucfirst( esc_html( $post_type ) ) . '</label></div>';
122
+ }
123
+ $checked = ( isset( $includes['search_title'] ) && $includes['search_title'] ) ? 1 : 0;
124
+ echo '<br /><p class="check-radio"><label for="'. $id . '-search_title"><input type="checkbox" id="'. $id . '-search_title" name="'. $id . '[search_title]" value="1" ' . checked( 1, $checked, false ) . '/>';
125
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search in post title.", 'ivory-search' ) . '</label></p>';
126
+ $checked = ( isset( $includes['search_content'] ) && $includes['search_content'] ) ? 1 : 0;
127
+ echo '<p class="check-radio"><label for="'. $id . '-search_content"><input type="checkbox" id="'. $id . '-search_content" name="'. $id . '[search_content]" value="1" ' . checked( 1, $checked, false ) . '/>';
128
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search in post content.", 'ivory-search' ) . '</label></p>';
129
+ $checked = ( isset( $includes['search_excerpt'] ) && $includes['search_excerpt'] ) ? 1 : 0;
130
+ echo '<p class="check-radio"><label for="'. $id . '-search_excerpt"><input type="checkbox" id="'. $id . '-search_excerpt" name="'. $id . '[search_excerpt]" value="1" ' . checked( 1, $checked, false ) . '/>';
131
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search in post excerpt.", 'ivory-search' ) . '</label></p>';
132
+ echo '<br /><select name="'. $id . '[post_type_qs]" >';
133
+ $checked = isset( $includes['post_type_qs'] ) ? $includes['post_type_qs'] : 'none';
134
+ echo '<option value="none" ' . selected( 'none', $checked, false ) . '>' . esc_html( __( 'None', 'ivory-search' ) ) . '</option>';
135
+ foreach ( $posts as $key => $post_type ) {
136
+ echo '<option value="' . $key . '" ' . selected( $key, $checked, false ) . '>' . ucfirst( esc_html( $post_type ) ) . '</option>';
137
+ }
138
+ echo '</select><label for="'. $id . '-post_type_qs"> ' . esc_html( __( 'Display this post type in the search query URL and restrict search to it.', 'ivory-search' ) ) . '</label>';
139
+ } else {
140
+ _e( 'No post types registered on your site.', 'ivory-search' );
141
+ }
142
 
143
+ ?>
144
+ </div></div>
 
 
 
 
145
 
 
146
 
 
 
 
147
 
148
+ <h3 scope="row">
149
+ <label for="<?php echo $id; ?>-tax_query"><?php esc_html_e( 'Taxonomy Terms', 'ivory-search' ); ?></label>
150
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
151
+ <div>
152
+ <?php
153
 
154
+ $content = __( 'Taxonomy terms that have no posts will not be visible below. Add a post with the taxonomy you want for it to be configurable.', 'ivory-search' );
155
+ $content .= '<br /><br />' . __( 'Terms selected here will restrict the search to posts that have the selected terms.', 'ivory-search' );
156
+ $content .= '<br />' .__( 'Taxonomy terms selected display in BOLD', 'ivory-search' );
157
+ IS_Help::help_info( $content );
158
+ echo '<div>';
159
+ $args = array( 'post', 'page' );
160
 
161
+ if ( isset( $includes['post_type'] ) && ! empty( $includes['post_type'] ) && is_array( $includes['post_type'] ) ) {
162
+ $args = array_values( $includes['post_type'] );
163
+ }
 
164
 
165
+ $tax_objs = get_object_taxonomies( $args, 'objects' );
166
 
167
+ if ( ! empty( $tax_objs ) ){
168
+ foreach ( $tax_objs as $key => $tax_obj ) {
 
 
169
 
170
+ $terms = get_terms( array(
171
+ 'taxonomy' => $key,
172
+ 'hide_empty' => false,
173
+ ) );
174
+
175
+ if ( ! empty( $terms ) ){
176
+
177
+ echo '<div class="col-wrapper"><div class="col-title">';
178
+ $col_title = ucwords( str_replace( '-', ' ', str_replace( '_', ' ', esc_html( $key ) ) ) );
179
+ if ( isset( $includes['tax_query'][$key] ) ) {
180
+ $col_title = '<strong>' . $col_title . '</strong>';
181
  }
182
+ 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 ) .'" />';
183
+ echo '<select name="'. $id . '[tax_query]['.$key.'][]" multiple size="8" >';
184
+ foreach ( $terms as $key2 => $term ) {
185
+ $checked = ( isset( $includes['tax_query'][$key] ) && in_array( $term->term_taxonomy_id, $includes['tax_query'][$key] ) ) ? $term->term_taxonomy_id : 0;
186
+ echo '<option value="' . esc_attr( $term->term_taxonomy_id ) . '" ' . selected( $term->term_taxonomy_id, $checked, false ) . '>' . esc_html( $term->name ) . '</option>';
187
  }
188
+ echo '</select></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  }
 
 
 
 
 
 
 
 
 
190
  }
191
+ echo '<br /><label for="'. $id . '-tax_query" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
192
+
193
+ $checked = ( isset( $includes['tax_rel'] ) && "OR" == $includes['tax_rel'] ) ? "OR" : "AND";
194
+ echo '<br /><p class="check-radio"><label for="'. $id . '-tax_rel_and" ><input type="radio" id="'. $id . '-tax_rel_and" name="'. $id . '[tax_rel]" value="AND" ' . checked( 'AND', $checked, false ) . '/>';
195
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "AND - Search posts having all the above selected terms.", 'ivory-search' ) . '</label></p>';
196
+ echo '<p class="check-radio"><label for="'. $id . '-tax_rel_or" ><input type="radio" id="'. $id . '-tax_rel_or" name="'. $id . '[tax_rel]" value="OR" ' . checked( 'OR', $checked, false ) . '/>';
197
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "OR - Search posts having any one of the above selected terms.", 'ivory-search' ) . '</label></p>';
198
+ $checked = ( isset( $includes['search_tax_title'] ) && $includes['search_tax_title'] ) ? 1 : 0;
199
+ echo '<br /><p class="check-radio"><label for="'. $id . '-search_tax_title" ><input type="checkbox" id="'. $id . '-search_tax_title" name="'. $id . '[search_tax_title]" value="1" ' . checked( 1, $checked, false ) . '/>';
200
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search in taxonomy terms title.", 'ivory-search' ) . '</label></p>';
201
+ $checked = ( isset( $includes['search_tax_desp'] ) && $includes['search_tax_desp'] ) ? 1 : 0;
202
+ echo '<p class="check-radio"><label for="'. $id . '-search_tax_desp" ><input type="checkbox" id="'. $id . '-search_tax_desp" name="'. $id . '[search_tax_desp]" value="1" ' . checked( 1, $checked, false ) . '/>';
203
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search in taxonomy terms description.", 'ivory-search' ) . '</label></p>';
204
+ } else {
205
+ _e( 'No taxonomies registered for slected post types.', 'ivory-search' );
206
+ }
207
+ ?>
208
+ </div></div>
209
+
210
+
211
+ <h3 scope="row">
212
+ <label for="<?php echo $id; ?>-custom_field"><?php echo esc_html( __( 'Custom Fields', 'ivory-search' ) ); ?></label>
213
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
214
+ <div>
215
+ <?php
216
+ $content = __( 'Select custom fields to make their values searchable.', 'ivory-search' );
217
+ IS_Help::help_info( $content );
218
+ echo '<div>';
219
+ $args = array( 'post', 'page' );
220
+
221
+ if ( isset( $includes['post_type'] ) && ! empty( $includes['post_type'] ) && is_array( $includes['post_type'] ) ) {
222
+ $args = array_values( $includes['post_type'] );
223
+ }
224
+ $meta_keys = $this->is_meta_keys( $args );
225
+ if ( ! empty( $meta_keys ) ) {
226
+ echo '<input class="list-search wide" placeholder="'. __( "Search..", 'ivory-search' ) . '" type="text">';
227
+ echo '<select name="'. $id . '[custom_field][]" multiple size="8" >';
228
+ foreach ( $meta_keys as $meta_key ) {
229
+ $checked = ( isset( $includes['custom_field'] ) && in_array( $meta_key, $includes['custom_field'] ) ) ? $meta_key : 0;
230
+ echo '<option value="' . esc_attr( $meta_key ) . '" ' . selected( $meta_key, $checked, false ) . '>' . esc_html( $meta_key ) . '</option>';
231
  }
232
+ echo '</select>';
233
+ echo '<br /><label for="'. $id . '-custom_field" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
234
+ }
235
+
236
+ if ( isset( $includes['custom_field'] ) ) {
237
+ echo '<br />' . __( 'Selected Custom Fields :', 'ivory-search' );
238
+ foreach ( $includes['custom_field'] as $custom_field ) {
239
+ echo '<br /><span style="font-size: 11px;">' . $custom_field . '</span>';
240
  }
241
+ }
242
+ ?>
243
+ </div></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
 
 
 
 
 
 
245
 
246
+ <h3 scope="row">
247
+ <label for="<?php echo $id; ?>-woocommerce"><?php echo esc_html( __( 'WooCommerce', 'ivory-search' ) ); ?></label>
248
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
249
+ <div>
250
+ <?php
251
+ $content = __( 'Configure WooCommerce products search options here.', 'ivory-search' );
252
+ IS_Help::help_info( $content );
253
+ echo '<div>';
254
+ $args = array( 'post', 'page' );
255
 
256
+ if ( isset( $includes['post_type'] ) && ! empty( $includes['post_type'] ) && is_array( $includes['post_type'] ) ) {
257
+ $args = array_values( $includes['post_type'] );
258
+ }
259
+ if ( in_array( 'product', $args ) ) {
260
+ $woo_sku_disable = is_fs()->is_plan_or_trial( 'pro_plus' ) ? '' : ' disabled ';
261
+ $checked = ( isset( $includes['woo']['sku'] ) && $includes['woo']['sku'] ) ? 1 : 0;
262
+ echo '<p class="check-radio"><label for="'. $id . '-sku" ><input type="checkbox" ' . $woo_sku_disable . ' id="'. $id . '-sku" name="'. $id . '[woo][sku]" value="1" ' . checked( 1, $checked, false ) . '/>';
263
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search in WooCommerce products SKU.", 'ivory-search' ) . '</label>';
264
+ echo IS_Admin::pro_link( 'pro_plus' ) . '</p>';
265
+ } else {
266
+ _e( 'WooCommerce product post type is not included in search.', 'ivory-search' );
267
+ }
268
+ ?>
269
+ </div></div>
270
 
 
271
 
272
+ <h3 scope="row">
273
+ <label for="<?php echo $id; ?>-author"><?php echo esc_html( __( 'Authors', 'ivory-search' ) ); ?></label>
274
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
275
+ <div>
276
+ <?php
277
+ $content = __( 'Make specific author posts searchable.', 'ivory-search' );
278
+ IS_Help::help_info( $content );
279
+ echo '<div>';
280
+ if ( ! isset( $excludes['author'] ) ) {
281
+ $author_disable = is_fs()->is_plan_or_trial( 'pro' ) ? '' : ' disabled ';
282
+
283
+ $authors = get_users( array(
284
+ 'fields' => array( 'ID', 'display_name' ),
285
+ 'orderby' => 'post_count',
286
+ 'order' => 'DESC',
287
+ 'who' => 'authors',
288
+ ) );
289
+
290
+ if ( ! empty( $authors ) ) {
291
+ if ( '' !== $author_disable ) {
292
+ echo '<div class="upgrade-parent">' . IS_Admin::pro_link();
293
  }
294
+ foreach ( $authors as $author ) {
295
+
296
+ $post_count = count_user_posts( $author->ID );
297
+
298
+ // Move on if user has not published a post (yet).
299
+ if ( ! $post_count ) {
300
+ continue;
301
  }
302
 
303
+ $checked = isset( $includes['author'][ esc_attr( $author->ID )] ) ? $includes['author'][ esc_attr( $author->ID )] : 0;
304
+
305
+ echo '<div class="col-wrapper check-radio"><label for="'. $id . '-author-' . esc_attr( $author->ID ) . '"><input 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 ) . '/>';
306
+ echo '<span class="toggle-check-text"></span> ' . ucfirst( esc_html( $author->display_name ) ) . '</label></div>';
307
+ }
308
+ }
309
+ } else {
310
+ echo '<label>' . esc_html__( "Search has been already limited by excluding specific authors posts in the Excludes section.", 'ivory-search' ) . '</label>';
311
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
 
313
+ if ( '' !== $author_disable ) {
314
+ echo '</div>';
315
+ }
316
+ $checked = ( isset( $includes['search_author'] ) && $includes['search_author'] ) ? 1 : 0;
317
+ echo '<br /><br /><p class="check-radio"><label for="'. $id . '-search_author" ><input type="checkbox" id="'. $id . '-search_author" name="'. $id . '[search_author]" value="1" ' . checked( 1, $checked, false ) . '/>';
318
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search in author Display name and display the posts created by that author.", 'ivory-search' ) . '</label></p>';
319
+ ?>
320
+ </div></div>
321
 
322
+ <h3 scope="row">
323
+ <label for="<?php echo $id; ?>-post_status"><?php echo esc_html( __( 'Post Status', 'ivory-search' ) ); ?></label>
324
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
325
+ <div>
326
+ <?php
327
+ $content = __( 'Configure options to search posts having specific post statuses.', 'ivory-search' );
328
+ IS_Help::help_info( $content );
329
+ echo '<div>';
330
+ if ( ! isset( $excludes['post_status'] ) ) {
331
+ $post_statuses = get_post_stati();
332
+
333
+ $post_status_disable = is_fs()->is_plan_or_trial( 'pro' ) ? '' : ' disabled ';
334
+
335
+ if ( ! empty( $post_statuses ) ) {
336
+ if ( '' !== $post_status_disable ) {
337
+ echo IS_Admin::pro_link();
338
  }
339
+ foreach ( $post_statuses as $key => $post_status ) {
340
+
341
+ $checked = isset( $includes['post_status'][ esc_attr( $key )] ) ? $includes['post_status'][ esc_attr( $key )] : 0;
342
+
343
+ echo '<div class="col-wrapper check-radio"><label for="'. $id . '-post_status-' . esc_attr( $key ) . '"><input 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 ) . '/>';
344
+ echo '<span class="toggle-check-text"></span> ' . ucwords( str_replace( '-', ' ', esc_html( $post_status ) ) ) . '</label></div>';
345
+ }
346
+ }
347
+ } else {
348
+ echo '<label>' . esc_html__( "Search has been already limited by excluding specific posts statuses from search in the Excludes section.", 'ivory-search' ) . '</label>';
349
+ }
350
+ ?>
351
+ </div></div>
352
+
353
+
354
+ <h3 scope="row">
355
+ <label for="<?php echo $id; ?>-comment_count"><?php echo esc_html( __( 'Comments', 'ivory-search' ) ); ?></label>
356
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
357
+ <div>
358
+ <?php
359
+ $content = __( 'Make posts searchable that have a specific number of comments.', 'ivory-search' );
360
+ IS_Help::help_info( $content );
361
+ echo '<div>';
362
+ $comment_count_disable = is_fs()->is_plan_or_trial( 'pro' ) ? '' : ' disabled ';
363
+ if ( '' !== $comment_count_disable ) {
364
+ echo '<div class="upgrade-parent">' . IS_Admin::pro_link();
365
+ }
366
+ echo '<select name="'. $id . '[comment_count][compare]" ' . $comment_count_disable . ' style="min-width: 50px;">';
367
+ $checked = isset( $includes['comment_count']['compare'] ) ? htmlspecialchars_decode( $includes['comment_count']['compare'] ) : '=';
368
+ $compare = array( '=', '!=', '>', '>=', '<', '<=' );
369
+ foreach ( $compare as $d ) {
370
+ echo '<option value="' . htmlspecialchars_decode( $d ) . '" ' . selected( $d, $checked, false ) . '>' . esc_html( $d ) . '</option>';
371
+ }
372
+ echo '</select><label for="'. $id . '-comment_count-compare"> ' . esc_html( __( 'The search operator to compare comments count.', 'ivory-search' ) ) . '</label>';
373
+
374
+ echo '<br /><select name="'. $id . '[comment_count][value]" ' . $comment_count_disable . ' >';
375
+ $checked = isset( $includes['comment_count']['value'] ) ? $includes['comment_count']['value'] : 'na';
376
+ echo '<option value="na" ' . selected( 'na', $checked, false ) . '>' . esc_html( __( 'NA', 'ivory-search' ) ) . '</option>';
377
+ for ( $d = 0; $d <= 999; $d++ ) {
378
+ echo '<option value="' . $d . '" ' . selected( $d, $checked, false ) . '>' . $d . '</option>';
379
+ }
380
+ echo '</select><label for="'. $id . '-comment_count-value"> ' . esc_html( __( 'The amount of comments your posts has to have.', 'ivory-search' ) ) . '</label>';
381
+ if ( '' !== $comment_count_disable ) {
382
+ echo '</div>';
383
+ }
384
+
385
+ $checked = ( isset( $includes['search_comment'] ) && $includes['search_comment'] ) ? 1 : 0;
386
+ echo '<br /><br /><p class="check-radio"><label for="'. $id . '-search_comment" ><input type="checkbox" id="'. $id . '-search_comment" name="'. $id . '[search_comment]" value="1" ' . checked( 1, $checked, false ) . '/>';
387
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search in approved comments content.", 'ivory-search' ) . '</label></p>';
388
+ ?>
389
+ </div></div>
390
+
391
+
392
+ <h3 scope="row">
393
+ <label for="<?php echo $id; ?>-date_query"><?php echo esc_html( __( 'Date', 'ivory-search' ) ); ?></label>
394
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
395
+ <div>
396
+ <?php
397
+ $content = __( 'Make posts searchable that were created in the specified data range.', 'ivory-search' );
398
+ IS_Help::help_info( $content );
399
+ echo '<div>';
400
+ $range = array( 'after', 'before' );
401
+ foreach ( $range as $value ) {
402
+ echo '<div class="col-wrapper ' . $value . '"><div class="col-title">' . ucfirst( $value ) . '</div>';
403
+
404
+ echo '<select name="'. $id . '[date_query]['.$value.'][day]" >';
405
+ $checked = isset( $includes['date_query'][$value]['day'] ) ? $includes['date_query'][$value]['day'] : 'day';
406
+ echo '<option value="day" ' . selected( 'day', $checked, false ) . '>' . esc_html( __( 'Day', 'ivory-search' ) ) . '</option>';
407
+ for ( $d = 1; $d <= 31; $d++ ) {
408
+ echo '<option value="' . $d . '" ' . selected( $d, $checked, false ) . '>' . $d . '</option>';
409
  }
410
+ echo '</select>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
 
412
+ echo '<select name="'. $id . '[date_query]['.$value.'][month]" >';
413
+ $checked = isset( $includes['date_query'][$value]['month'] ) ? $includes['date_query'][$value]['month'] : 'month';
414
+ echo '<option value="month" ' . selected( 'month', $checked, false ) . '>' . esc_html( __( 'Month', 'ivory-search' ) ) . '</option>';
415
+ for ( $m = 1; $m <= 12; $m++ ) {
416
+ echo '<option value="' . $m . '" ' . selected( $m, $checked, false ) . '>' . date( 'F', mktime( 0, 0, 0, $m, 1 ) ) . '</option>';
417
+ }
418
+ echo '</select>';
419
 
420
+ echo '<select name="'. $id . '[date_query]['.$value.'][year]" >';
421
+ $checked = isset( $includes['date_query'][$value]['year'] ) ? $includes['date_query'][$value]['year'] : 'year';
422
+ echo '<option value="year" ' . selected( 'year', $checked, false ) . '>' . esc_html( __( 'Year', 'ivory-search' ) ) . '</option>';
423
+ for ( $y = date("Y"); $y >= 1995; $y-- ) {
424
+ echo '<option value="' . $y . '" ' . selected( $y, $checked, false ) . '>' . $y . '</option>';
 
 
425
  }
426
+ echo '</select></div>';
427
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  ?>
429
+ </div></div>
430
+
431
+
432
+ <h3 scope="row">
433
+ <label for="<?php echo $id; ?>-has_password"><?php echo esc_html( __( 'Password', 'ivory-search' ) ); ?></label>
434
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
435
+ <div>
436
+ <?php
437
+ $content = __( 'Configure options to search posts with or without password.', 'ivory-search' );
438
+ IS_Help::help_info( $content );
439
+ echo '<div>';
440
+ $checked = ( isset( $includes['has_password'] ) ) ? $includes['has_password'] : 'null';
441
+ echo '<p class="check-radio"><label for="'. $id . '-has_password" ><input type="radio" id="'. $id . '-has_password" name="'. $id . '[has_password]" value="null" ' . checked( 'null', $checked, false ) . '/>';
442
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search all posts with and without passwords.", 'ivory-search' ) . '</label></p>';
443
+ echo '<p class="check-radio"><label for="'. $id . '-has_password_1" ><input type="radio" id="'. $id . '-has_password_1" name="'. $id . '[has_password]" value="1" ' . checked( 1, $checked, false ) . '/>';
444
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search only posts with passwords.", 'ivory-search' ) . '</label></p>';
445
+ echo '<p class="check-radio"><label for="'. $id . '-has_password_0" ><input type="radio" id="'. $id . '-has_password_0" name="'. $id . '[has_password]" value="0" ' . checked( 0, $checked, false ) . '/>';
446
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Search only posts without passwords.", 'ivory-search' ) . '</label></p>';
447
+ ?>
448
+ </div></div>
449
+
450
+ <?php
451
+ global $wp_version;
452
+ if ( 4.9 <= $wp_version ) {
453
+ ?>
454
+
455
+ <h3 scope="row">
456
+ <label for="<?php echo $id; ?>-post_file_type"><?php echo esc_html( __( 'File Types', 'ivory-search' ) ); ?></label>
457
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
458
+ <div>
459
+ <?php
460
+ $content = __( 'Configure searching to search based on posts that have a specific MIME type or files that have specific media attachments', 'ivory-search' );
461
+ IS_Help::help_info( $content );
462
+ echo '<div>';
463
+ if ( ! isset( $excludes['post_file_type'] ) ) {
464
+ $file_types = get_allowed_mime_types();
465
+ if ( ! empty( $file_types ) ) {
466
+ $file_type_disable = is_fs()->is_plan_or_trial( 'pro_plus' ) ? '' : ' disabled ';
467
+ ksort($file_types);
468
+ echo '<input class="list-search wide" placeholder="'. __( "Search..", 'ivory-search' ) . '" type="text">';
469
+ echo '<select name="'. $id . '[post_file_type][]" ' . $file_type_disable . ' multiple size="8" >';
470
+ foreach ( $file_types as $key => $file_type ) {
471
+ $checked = ( isset( $includes['post_file_type'] ) && in_array( $file_type, $includes['post_file_type'] ) ) ? $file_type : 0;
472
+ echo '<option value="' . esc_attr( $file_type ) . '" ' . selected( $file_type, $checked, false ) . '>' . esc_html( $key ) . '</option>';
473
  }
474
+ echo '</select>';
475
+ echo IS_Admin::pro_link( 'pro_plus' );
476
+ echo '<br /><br /><label for="'. $id . '-post_file_type" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
477
+ }
478
+ } else {
479
+ echo '<label>' . esc_html__( "Search has been already limited by excluding specific File type in the Excludes section.", 'ivory-search' ) . '</label>';
480
+ }
481
+
482
+ if ( isset( $includes['post_file_type'] ) ) {
483
+ echo '<br />' . __( 'Selected File Types :', 'ivory-search' );
484
+ foreach ( $includes['post_file_type'] as $post_file_type ) {
485
+ echo '<br /><span style="font-size: 11px;">' . $post_file_type . '</span>';
486
  }
 
 
 
 
 
 
 
 
 
 
 
487
  }
488
  ?>
489
+ </div></div>
490
+
491
+ <?php
492
+ }
493
+ ?>
494
+ </div>
495
+
496
  </div>
497
 
498
  <?php
503
  $excludes = $post->prop( $id );
504
  $includes = $post->prop( '_is_includes' );
505
  ?>
506
+ <h4 class="panel-desc">
 
 
507
  <?php
508
  _e( "Configure the options to exclude specific content from search.", 'ivory-search' );
509
  ?>
510
+ </h4>
511
+ <div class="search-form-editor-box" id="<?php echo $id; ?>">
512
+ <div class="form-table">
513
+
514
+ <h3 scope="row">
515
+ <label for="<?php echo $id; ?>-post__not_in"><?php echo esc_html( __( 'Posts', 'ivory-search' ) ); ?></label>
516
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
517
+ <div>
518
+ <?php
519
+ $content = __( 'The posts and pages of searchable post types display here.', 'ivory-search' );
520
+ $content .= '<br />' . __( 'Select the posts you wish to exclude from the search.', 'ivory-search' );
521
+ $content .= '<br />' . __( 'Selected post types display in BOLD.', 'ivory-search' );
522
+ IS_Help::help_info( $content );
523
+ echo '<div>';
524
+ $post_types = array( 'post', 'page' );
525
+
526
+ if ( isset( $includes['post_type'] ) && ! empty( $includes['post_type'] ) && is_array( $includes['post_type'] ) ) {
527
+ $post_types = array_values( $includes['post_type'] );
528
+ }
529
+
530
+ foreach ( $post_types as $post_type ) {
531
+
532
+ $posts = get_posts( array(
533
+ 'post_type' => $post_type,
534
+ 'posts_per_page'=> -1,
535
+ 'orderby' => 'title',
536
+ 'order' => 'ASC',
537
+ ) );
538
 
539
+ if ( ! empty( $posts ) ) {
540
+ $html = '<div class="col-wrapper"><div class="col-title">';
541
+ $col_title = ucwords( $post_type );
542
+ $temp = '';
543
+ $selected_pt = array();
544
+ foreach ( $posts as $post2 ) {
545
+ $checked = ( isset( $excludes['post__not_in'] ) && in_array( $post2->ID, $excludes['post__not_in'] ) ) ? $post2->ID : 0;
546
+ if ( $checked ) {
547
+ array_push( $selected_pt, $post_type );
 
 
 
 
 
 
 
548
  }
549
+ $post_title = ( isset( $post2->post_title ) && '' !== $post2->post_title ) ? esc_html( $post2->post_title ) : $post2->post_name;
550
+ $temp .= '<option value="' . esc_attr( $post2->ID ) . '" ' . selected( $post2->ID, $checked, false ) . '>' . $post_title . '</option>';
551
  }
552
+ if ( ! empty( $selected_pt ) && in_array( $post_type, $selected_pt) ) {
553
+ $col_title = '<strong>' . $col_title . '</strong>';
554
+ }
555
+ $html .= $col_title . '<input class="list-search" placeholder="'. __( "Search..", 'ivory-search' ) . '" type="text"></div>';
556
+ $html .= '<select name="'. $id . '[post__not_in][]" multiple size="8" >';
557
+ $html .= $temp . '</select></div>';
558
+ echo $html;
559
  }
560
+ }
561
+ echo '<br /><label for="'. $id . '-post__not_in" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
562
+ ?>
563
+ </div></div>
564
+
565
+ <h3 scope="row">
566
+ <label for="<?php echo $id; ?>-tax_query"><?php esc_html_e( 'Taxonomy Terms', 'ivory-search' ); ?></label>
567
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
568
+ <div>
569
+ <?php
570
+ $content = __( 'The taxonomies and terms attached to searchable post types display here.', 'ivory-search' );
571
+ $content .= '<br />' . __( 'Exclude posts from search results that have specific terms', 'ivory-search' );
572
+ $content .= '<br />' . __( 'Selected terms taxonomy title display in BOLD.', 'ivory-search' );
573
+ IS_Help::help_info( $content );
574
+ echo '<div>';
575
+ $tax_objs = get_object_taxonomies( $post_types, 'objects' );
576
+
577
+ if ( ! empty( $tax_objs ) ) {
578
+ foreach ( $tax_objs as $key => $tax_obj ) {
579
+
580
+ $terms = get_terms( array(
581
+ 'taxonomy' => $key,
582
+ 'hide_empty' => false,
583
+ ) );
584
+
585
+ if ( ! empty( $terms ) ){
586
+ echo '<div class="col-wrapper"><div class="col-title">';
587
+ $col_title = ucwords( str_replace( '-', ' ', str_replace( '_', ' ', esc_html( $key ) ) ) );
588
+ if ( isset( $excludes['tax_query'][$key] ) ) {
589
+ $col_title = '<strong>' . $col_title . '</strong>';
 
 
 
 
 
 
 
 
590
  }
591
+ echo $col_title . '<input class="list-search" placeholder="'. __( "Search..", 'ivory-search' ) . '" type="text"></div><select name="'. $id . '[tax_query]['.$key.'][]" multiple size="8" >';
592
+ foreach ( $terms as $key2 => $term ) {
593
+
594
+ $checked = ( isset( $excludes['tax_query'][$key] ) && in_array( $term->term_taxonomy_id, $excludes['tax_query'][$key] ) ) ? $term->term_taxonomy_id : 0;
595
+ echo '<option value="' . esc_attr( $term->term_taxonomy_id ) . '" ' . selected( $term->term_taxonomy_id, $checked, false ) . '>' . esc_html( $term->name ) . '</option>';
596
  }
597
+ echo '</select></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
598
  }
 
 
 
 
 
 
 
 
 
 
 
599
  }
600
+ echo '<br /><label for="'. $id . '-tax_query" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
601
+ } else {
602
+ _e( 'No taxonomies registered for slected post types.', 'ivory-search' );
603
+ }
604
+ ?>
605
+ </div></div>
606
+
607
+
608
+ <h3 scope="row">
609
+ <label for="<?php echo $id; ?>-custom_field"><?php echo esc_html( __( 'Custom Fields', 'ivory-search' ) ); ?></label>
610
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
611
+ <div>
612
+ <?php
613
+ $content = __( 'Exclude posts from the search having selected custom fields.', 'ivory-search' );
614
+ IS_Help::help_info( $content );
615
+ echo '<div>';
616
+ $args = array( 'post', 'page' );
617
+
618
+ if ( isset( $excludes['post_type'] ) && ! empty( $excludes['post_type'] ) && is_array( $excludes['post_type'] ) ) {
619
+ $args = array_values( $excludes['post_type'] );
620
+ }
621
+ $meta_keys = $this->is_meta_keys( $args );
622
+ if ( ! empty( $meta_keys ) ) {
623
+ $custom_field_disable = is_fs()->is_plan_or_trial( 'pro' ) ? '' : ' disabled ';
624
+ echo '<input class="list-search wide" placeholder="'. __( "Search..", 'ivory-search' ) . '" type="text">';
625
+ echo '<select name="'. $id . '[custom_field][]" ' . $custom_field_disable . ' multiple size="8" >';
626
+ foreach ( $meta_keys as $meta_key ) {
627
+ $checked = ( isset( $excludes['custom_field'] ) && in_array( $meta_key, $excludes['custom_field'] ) ) ? $meta_key : 0;
628
+ echo '<option value="' . esc_attr( $meta_key ) . '" ' . selected( $meta_key, $checked, false ) . '>' . esc_html( $meta_key ) . '</option>';
629
  }
630
+ echo '</select>';
631
+ echo IS_Admin::pro_link();
632
+ echo '<br /><br /><label for="'. $id . '-custom_field" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
633
+ }
634
+
635
+ if ( isset( $excludes['custom_field'] ) ) {
636
+ echo '<br />' . __( 'Excluded Custom Fields :', 'ivory-search' );
637
+ foreach ( $excludes['custom_field'] as $custom_field ) {
638
+ echo '<br /><span style="font-size: 11px;">' . $custom_field . '</span>';
639
  }
640
+ }
641
+ ?>
642
+ </div></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
643
 
 
644
 
645
+ <h3 scope="row">
646
+ <label for="<?php echo $id; ?>-woocommerce"><?php echo esc_html( __( 'WooCommerce', 'ivory-search' ) ); ?></label>
647
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
648
+ <div>
649
+ <?php
650
+ $content = __( 'Exclude specific WooCommerce products from the search.', 'ivory-search' );
651
+ IS_Help::help_info( $content );
652
+ echo '<div>';
653
+ $args = array( 'post', 'page' );
654
 
655
+ if ( isset( $includes['post_type'] ) && ! empty( $includes['post_type'] ) && is_array( $includes['post_type'] ) ) {
656
+ $args = array_values( $includes['post_type'] );
657
+ }
658
+ if ( in_array( 'product', $args ) ) {
659
+ $outofstock_disable = is_fs()->is_plan_or_trial( 'pro_plus' ) ? '' : ' disabled ';
660
+ $checked = ( isset( $excludes['woo']['outofstock'] ) && $excludes['woo']['outofstock'] ) ? 1 : 0;
661
+ echo '<p class="check-radio"><label for="'. $id . '-outofstock" ><input type="checkbox" ' . $outofstock_disable . ' id="'. $id . '-outofstock" name="'. $id . '[woo][outofstock]" value="1" ' . checked( 1, $checked, false ) . '/>';
662
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude 'out of stock' WooCommerce products.", 'ivory-search' ) . '</label></p>';
663
+ echo IS_Admin::pro_link( 'pro_plus' );
664
+ } else {
665
+ _e( 'WooCommerce product post type is not included in search.', 'ivory-search' );
666
+ }
667
+ ?>
668
+ </div></div>
669
 
670
+
671
+ <h3 scope="row">
672
+ <label for="<?php echo $id; ?>-author"><?php echo esc_html( __( 'Authors', 'ivory-search' ) ); ?></label>
673
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
674
+ <div>
675
+ <?php
676
+ $content = __( 'Exclude posts from the search created by slected authors.', 'ivory-search' );
677
+ IS_Help::help_info( $content );
678
+ echo '<div>';
679
+ if ( ! isset( $includes['author'] ) ) {
680
+
681
+ $author_disable = is_fs()->is_plan_or_trial( 'pro' ) ? '' : ' disabled ';
682
+ $authors = get_users( array(
683
+ 'fields' => array( 'ID', 'display_name' ),
684
+ 'orderby' => 'post_count',
685
+ 'order' => 'DESC',
686
+ 'who' => 'authors',
687
+ ) );
688
+ if ( ! empty( $authors ) ) {
689
+ if ( '' !== $author_disable ) {
690
+ echo IS_Admin::pro_link();
691
  }
692
+ foreach ( $authors as $author ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
693
 
694
+ $post_count = count_user_posts( $author->ID );
695
 
696
+ // Move on if user has not published a post (yet).
697
+ if ( ! $post_count ) {
698
+ continue;
 
 
 
699
  }
700
 
701
+ $checked = isset( $excludes['author'][ esc_attr( $author->ID )] ) ? $excludes['author'][ esc_attr( $author->ID )] : 0;
702
+
703
+ echo '<div class="col-wrapper check-radio"><label for="'. $id . '-author-' . esc_attr( $author->ID ) . '"><input 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 ) . '/>';
704
+ echo '<span class="toggle-check-text"></span> ' . ucfirst( esc_html( $author->display_name ) ) . '</label></div>';
705
+ }
706
+ }
707
+ } else {
708
+ echo '<label>' . esc_html__( "Search has been already limited to posts created by specific authors in the Includes section.", 'ivory-search' ) . '</label>';
709
+ }
 
 
 
 
 
 
 
710
  ?>
711
+ </div></div>
712
+
713
+
714
+ <h3 scope="row">
715
+ <label for="<?php echo $id; ?>-post_status"><?php echo esc_html( __( 'Post Status', 'ivory-search' ) ); ?></label>
716
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
717
+ <div>
718
+ <?php
719
+ $content = __( 'Exclude posts from the search having selected post statuses.', 'ivory-search' );
720
+ IS_Help::help_info( $content );
721
+ echo '<div>';
722
+ if ( ! isset( $includes['post_status'] ) ) {
723
+ $post_statuses = get_post_stati();
724
+ $post_status_disable = is_fs()->is_plan_or_trial( 'pro' ) ? '' : ' disabled ';
725
+
726
+ if ( ! empty( $post_statuses ) ) {
727
+ if ( '' !== $post_status_disable ) {
728
+ echo '<div class="upgrade-parent">' . IS_Admin::pro_link();
 
729
  }
730
+ foreach ( $post_statuses as $key => $post_status ) {
731
+
732
+ $checked = isset( $excludes['post_status'][ esc_attr( $key )] ) ? $excludes['post_status'][ esc_attr( $key )] : 0;
733
+
734
+ echo '<div class="col-wrapper check-radio"><label for="'. $id . '-post_status-' . esc_attr( $key ) . '"><input 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 ) . '/>';
735
+ echo '<span class="toggle-check-text"></span> ' . ucwords( str_replace( '-', ' ', esc_html( $post_status ) ) ) . '</label></div>';
736
+ }
737
+ if ( '' !== $post_status_disable ) {
738
+ echo '</div>';
739
+ }
740
+ }
741
+ } else {
742
+ echo '<label>' . esc_html__( "Search has been already limited to posts statuses set in the Includes section.", 'ivory-search' ) . '</label>';
743
+ }
744
+
745
+ $checked = ( isset( $excludes['ignore_sticky_posts'] ) && $excludes['ignore_sticky_posts'] ) ? 1 : 0;
746
+ echo '<br /><br /><p class="check-radio"><label for="'. $id . '-ignore_sticky_posts" ><input type="checkbox" id="'. $id . '-ignore_sticky_posts" name="'. $id . '[ignore_sticky_posts]" value="1" ' . checked( 1, $checked, false ) . '/>';
747
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Exclude sticky posts from search.", 'ivory-search' ) . '</label></p>';
748
+ ?>
749
+ </div></div>
750
+
751
+ <?php
752
+ global $wp_version;
753
+ if ( 4.9 <= $wp_version ) {
754
+ ?>
755
+
756
+ <h3 scope="row">
757
+ <label for="<?php echo $id; ?>-post_file_type"><?php echo esc_html( __( 'File Types', 'ivory-search' ) ); ?></label>
758
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
759
+ <div>
760
+ <?php
761
+ $content = __( 'Exclude posts specially media attachment posts from the search having selected file types.', 'ivory-search' );
762
+ IS_Help::help_info( $content );
763
+ echo '<div>';
764
+ if ( ! isset( $includes['post_file_type'] ) ) {
765
+ $file_types = get_allowed_mime_types();
766
+ if ( ! empty( $file_types ) ) {
767
+ $file_type_disable = is_fs()->is_plan_or_trial( 'pro_plus' ) ? '' : ' disabled ';
768
+ ksort( $file_types );
769
+ echo '<input class="list-search wide" placeholder="'. __( "Search..", 'ivory-search' ) . '" type="text">';
770
+ echo '<select name="'. $id . '[post_file_type][]" ' . $file_type_disable . ' multiple size="8" >';
771
+ foreach ( $file_types as $key => $file_type ) {
772
+ $checked = ( isset( $excludes['post_file_type'] ) && in_array( $file_type, $excludes['post_file_type'] ) ) ? $file_type : 0;
773
+ echo '<option value="' . esc_attr( $file_type ) . '" ' . selected( $file_type, $checked, false ) . '>' . esc_html( $key ) . '</option>';
774
+ }
775
+ echo '</select>';
776
+ echo IS_Admin::pro_link( 'pro_plus' );
777
+ echo '<br /><br /><label for="'. $id . '-post_file_type" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Press CTRL key to select multiple terms or deselect them.", 'ivory-search' ) . '</label>';
778
+ }
779
+ } else {
780
+ echo '<label>' . esc_html__( "Search has been already limited to specific File type set in the Includes section.", 'ivory-search' ) . '</label>';
781
+ }
782
+
783
+ if ( isset( $excludes['post_file_type'] ) ) {
784
+ echo '<br />' . __( 'Excluded File Types :', 'ivory-search' );
785
+ foreach ( $excludes['post_file_type'] as $post_file_type ) {
786
+ echo '<br /><span style="font-size: 11px;">' . $post_file_type . '</span>';
787
  }
 
 
 
 
 
 
 
 
 
 
 
788
  }
789
  ?>
790
+ </div></div>
791
+
792
+ <?php
793
+ }
794
+ ?>
795
+ </div>
796
  </div>
797
  <?php
798
  }
801
  $id = '_is_settings';
802
  $settings = $post->prop( $id );
803
  ?>
804
+ <h4 class="panel-desc">
 
 
805
  <?php
806
  _e( "Configure the options here to control search of this search form.", 'ivory-search' );
807
  ?>
808
+ </h4>
809
+ <div class="search-form-editor-box" id="<?php echo $id; ?>">
810
+ <div class="form-table">
811
+
812
+ <h3 scope="row">
813
+ <label for="<?php echo $id; ?>-posts_per_page"><?php echo esc_html( __( 'Posts Per Page', 'ivory-search' ) ); ?></label>
814
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
815
+ <div><div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
816
  <?php
817
+ echo '<select name="'. $id . '[posts_per_page]" >';
818
+ $checked = isset( $settings['posts_per_page'] ) ? $settings['posts_per_page'] : get_option( 'posts_per_page', 10 );
819
+ for ( $d = 1; $d <= 1000; $d++ ) {
820
+ echo '<option value="' . $d . '" ' . selected( $d, $checked, false ) . '>' . $d . '</option>';
821
+ }
822
+ echo '</select><label for="'. $id . '-posts_per_page"> ' . esc_html( __( 'Number of posts to display on search results page.', 'ivory-search' ) ) . '</label>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
823
  ?>
824
+ </div></div>
825
+
826
+
827
+ <h3 scope="row">
828
+ <label for="<?php echo $id; ?>-order"><?php echo esc_html( __( 'Order By', 'ivory-search' ) ); ?></label>
829
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
830
+ <div><div>
831
  <?php
832
+ $orderby_disable = is_fs()->is_plan_or_trial( 'pro' ) ? '' : ' disabled ';
833
+ echo '<select name="'. $id . '[orderby]" ' . $orderby_disable . ' >';
834
+ $checked = isset( $settings['orderby'] ) ? $settings['orderby'] : 'date';
835
+ $orderbys = array( 'date', 'relevance', 'none', 'ID', 'author', 'title', 'name', 'type', 'modified', 'parent', 'rand',
836
+ 'comment_count', 'menu_order', 'meta_value', 'meta_value_num', 'post__in', 'post_name__in', 'post_parent__in' );
837
+ foreach ( $orderbys as $orderby ) {
838
+ echo '<option value="' . $orderby . '" ' . selected( $orderby, $checked, false ) . '>' . ucwords( str_replace( '_', ' ', esc_html( $orderby ) ) ) . '</option>';
839
+ }
840
+
841
+ echo '</select><select name="'. $id . '[order]" ' . $orderby_disable . ' >';
842
+ $checked = isset( $settings['order'] ) ? $settings['order'] : 'DESC';
843
+ $orders = array( 'DESC', 'ASC' );
844
+ foreach ( $orders as $order ) {
845
+ echo '<option value="' . $order . '" ' . selected( $order, $checked, false ) . '>' . ucwords( str_replace( '_', ' ', esc_html( $order ) ) ) . '</option>';
846
+ }
847
+ echo '</select>';
848
+ echo IS_Admin::pro_link();
849
  ?>
850
+ </div></div>
851
+
852
+
853
+ <h3 scope="row">
854
+ <label for="<?php echo $id; ?>-highlight_terms"><?php echo esc_html( __( 'Highlight Terms', 'ivory-search' ) ); ?></label>
855
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
856
+ <div><div>
857
+ <?php
858
+ $checked = ( isset( $settings['highlight_terms'] ) && $settings['highlight_terms'] ) ? 1 : 0;
859
+ echo '<p class="check-radio"><label for="'. $id . '-highlight_terms" ><input type="checkbox" id="'. $id . '-highlight_terms" name="'. $id . '[highlight_terms]" value="1" ' . checked( 1, $checked, false ) . '/>';
860
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Highlight searched terms on search results page.", 'ivory-search' ) . '</label></p>';
861
+ $color = ( isset( $settings['highlight_color'] ) ) ? $settings['highlight_color'] : '#FFFFB9';
862
+ echo '<br /><br /><input size="10" type="text" id="'. $id . '-highlight_color" name="'. $id . '[highlight_color]" value="' . $color . '" />';
863
+ echo '<label for="'. $id . '-highlight_color" > ' . esc_html__( "Set highlight color.", 'ivory-search' ) . '</label>';
864
+ ?>
865
+ </div></div>
866
+
867
+
868
+ <h3 scope="row">
869
+ <label for="<?php echo $id; ?>-term_rel"><?php echo esc_html( __( 'Search Terms Relation', 'ivory-search' ) ); ?></label>
870
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
871
+ <div><div>
872
+ <?php
873
+ $term_rel_disable = is_fs()->is_plan_or_trial( 'pro' ) ? '' : ' disabled ';
874
+ $checked = ( isset( $settings['term_rel'] ) && "OR" === $settings['term_rel'] ) ? "OR" : "AND";
875
+ echo '<p class="check-radio"><label for="'. $id . '-term_rel_or" ><input type="radio" ' . $term_rel_disable . ' id="'. $id . '-term_rel_or" name="'. $id . '[term_rel]" value="OR" ' . checked( 'OR', $checked, false ) . '/>';
876
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "OR - Display content having any of the searched terms.", 'ivory-search' ) . '</label>' . IS_Admin::pro_link() . '</p>';
877
+ echo '<p class="check-radio"><label for="'. $id . '-term_rel_and" ><input type="radio" ' . $term_rel_disable . ' id="'. $id . '-term_rel_and" name="'. $id . '[term_rel]" value="AND" ' . checked( 'AND', $checked, false ) . '/>';
878
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "AND - Display content having all the searched terms.", 'ivory-search' ) . '</label></p>';
879
+ ?>
880
+ </div></div>
881
+
882
+
883
+ <h3 scope="row">
884
+ <label for="<?php echo $id; ?>-fuzzy_match"><?php echo esc_html( __( 'Fuzzy Matching', 'ivory-search' ) ); ?></label>
885
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
886
+ <div><div>
887
+ <?php
888
+ $checked = isset( $settings['fuzzy_match'] ) ? $settings['fuzzy_match'] : '2';
889
+ echo '<p class="check-radio"><label for="'. $id . '-whole" ><input type="radio" id="'. $id . '-whole" name="'. $id . '[fuzzy_match]" value="1" ' . checked( '1', $checked, false ) . '/>';
890
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Whole - Search posts that include the whole search term.", 'ivory-search' ) . '</label></p>';
891
+ echo '<p class="check-radio"><label for="'. $id . '-partial" ><input type="radio" id="'. $id . '-partial" name="'. $id . '[fuzzy_match]" value="2" ' . checked( '2', $checked, false ) . '/>';
892
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Partial - Also search words in the posts that begins or ends with the search term.", 'ivory-search' ) . '</label></p>';
893
+ ?>
894
+ </div></div>
895
+
896
+
897
+ <h3 scope="row">
898
+ <label for="<?php echo $id; ?>-keyword_stem"><?php echo esc_html( __( 'Keyword Stemming', 'ivory-search' ) ); ?></label>
899
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
900
+ <div>
901
+ <?php
902
+ $content = __( 'Searches the base word of a searched keyword', 'ivory-search' );
903
+ $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>';;
904
+ $content .= '<p>' . __( 'If you want to search whole exact searched term then do not use this options and in this case it is not recommended to use when Fuzzy Matching option is set to Whole.', 'ivory-search' ). '</p>';
905
+ IS_Help::help_info( $content );
906
+ echo '<div>';
907
+ $stem_disable = is_fs()->is_plan_or_trial( 'pro_plus' ) ? '' : ' disabled ';
908
+ $checked = ( isset( $settings['keyword_stem'] ) && $settings['keyword_stem'] ) ? 1 : 0;
909
+ echo '<p class="check-radio"><label for="'. $id . '-keyword_stem" ><input type="checkbox" id="'. $id . '-keyword_stem" ' . $stem_disable . ' name="'. $id . '[keyword_stem]" value="1" ' . checked( 1, $checked, false ) . '/>';
910
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Also search base word of searched keyword.", 'ivory-search' ) . '</label></p>';
911
+ echo IS_Admin::pro_link( 'pro_plus' );
912
+ echo '<br /><label for="'. $id . '-keyword_stem" style="font-size: 10px;clear:both;display:block;">' . esc_html__( "Not recommended to use when Fuzzy Matching option is set to Whole.", 'ivory-search' ) . '</label>';
913
+ ?>
914
+ </div></div>
915
+
916
+
917
+ <h3 scope="row">
918
+ <label for="<?php echo $id; ?>-move_sticky_posts"><?php echo esc_html( __( 'Sticky Posts', 'ivory-search' ) ); ?></label>
919
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
920
+ <div><div>
921
+ <?php
922
+ $checked = ( isset( $settings['move_sticky_posts'] ) && $settings['move_sticky_posts'] ) ? 1 : 0;
923
+ echo '<p class="check-radio"><label for="'. $id . '-move_sticky_posts" ><input type="checkbox" id="'. $id . '-move_sticky_posts" name="'. $id . '[move_sticky_posts]" value="1" ' . checked( 1, $checked, false ) . '/>';
924
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Move sticky posts to the start of the search results page.", 'ivory-search' ) . '</label></p>';
925
+ ?>
926
+ </div></div>
927
+
928
+
929
+ <h3 scope="row">
930
+ <label for="<?php echo $id; ?>-empty_search"><?php echo esc_html( __( 'Empty Search', 'ivory-search' ) ); ?></label>
931
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
932
+ <div><div>
933
+ <?php
934
+ $checked = ( isset( $settings['empty_search'] ) && $settings['empty_search'] ) ? 1 : 0;
935
+ echo '<p class="check-radio"><label for="'. $id . '-empty_search" ><input type="checkbox" id="'. $id . '-empty_search" name="'. $id . '[empty_search]" value="1" ' . checked( 1, $checked, false ) . '/>';
936
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Display an error for empty search query.", 'ivory-search' ) . '</label></p>';
937
+ ?>
938
+ </div></div>
939
+
940
+
941
+ <h3 scope="row">
942
+ <label for="<?php echo $id; ?>-exclude_from_search"><?php echo esc_html( __( 'Respect exclude_from_search', 'ivory-search' ) ); ?></label>
943
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
944
+ <div><div>
945
+ <?php
946
+ $checked = ( isset( $settings['exclude_from_search'] ) && $settings['exclude_from_search'] ) ? 1 : 0;
947
+ echo '<p class="check-radio"><label for="'. $id . '-exclude_from_search" ><input type="checkbox" id="'. $id . '-exclude_from_search" name="'. $id . '[exclude_from_search]" value="1" ' . checked( 1, $checked, false ) . '/>';
948
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Do not search post types which are excluded from search.", 'ivory-search' ) . '</label></p>';
949
+ ?>
950
+ </div></div>
951
+
952
+
953
+ <h3 scope="row">
954
+ <label for="<?php echo $id; ?>-demo"><?php echo esc_html( __( 'Demo', 'ivory-search' ) ); ?></label>
955
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
956
+ <div><div>
957
+ <?php
958
+ $checked = ( isset( $settings['demo'] ) && $settings['demo'] ) ? 1 : 0;
959
+ echo '<p class="check-radio"><label for="'. $id . '-demo" ><input type="checkbox" id="'. $id . '-demo" name="'. $id . '[demo]" value="1" ' . checked( 1, $checked, false ) . '/>';
960
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Display search form only for site administrator.", 'ivory-search' ) . '</label></p>';
961
+ ?>
962
+ </div></div>
963
+
964
+
965
+ <h3 scope="row">
966
+ <label for="<?php echo $id; ?>-disable"><?php echo esc_html( __( 'Disable', 'ivory-search' ) ); ?></label>
967
+ <span class="actions"><a class="expand" href="#"><?php esc_html_e( 'Expand All', 'ivory-search' ); ?></a><a class="collapse" href="#" style="display:none;"><?php esc_html_e( 'Collapse All', 'ivory-search' ); ?></a></span></h3>
968
+ <div><div>
969
+ <?php
970
+ $checked = ( isset( $settings['disable'] ) && $settings['disable'] ) ? 1 : 0;
971
+ echo '<p class="check-radio"><label for="'. $id . '-disable" ><input type="checkbox" id="'. $id . '-disable" name="'. $id . '[disable]" value="1" ' . checked( 1, $checked, false ) . '/>';
972
+ echo '<span class="toggle-check-text"></span>' . esc_html__( "Disable this search form.", 'ivory-search' ) . '</label></p>';
973
+ ?>
974
+ </div></div>
975
+ </div>
976
+ </div>
977
  <?php
978
  }
979
  }
admin/class-is-help.php CHANGED
@@ -42,7 +42,7 @@ class IS_Help {
42
 
43
  $this->screen->add_help_tab( array(
44
  'id' => 'edit_settings',
45
- 'title' => __( 'Settings', 'ivory-search' ),
46
  'content' => $this->content( 'edit_settings' ) ) );
47
 
48
  $this->sidebar();
@@ -56,7 +56,7 @@ class IS_Help {
56
 
57
  $this->screen->add_help_tab( array(
58
  'id' => 'search_to_menu',
59
- 'title' => __( 'Search To Menu', 'ivory-search' ),
60
  'content' => $this->content( 'search_to_menu' ) ) );
61
 
62
  $this->screen->add_help_tab( array(
@@ -84,7 +84,7 @@ class IS_Help {
84
  $content['edit_overview'] .= '<p>' . __( "<strong>Title</strong> is the title of a search form. This title is only used for labeling a search form, and can be edited.", 'ivory-search' ) . '</p>';
85
  $content['edit_overview'] .= '<p>' . __( "<strong>Includes</strong> provides options to control which content on the site is searchable.", 'ivory-search' ) . '</p>';
86
  $content['edit_overview'] .= '<p>' . __( "<strong>Excludes</strong> provides options to exclude specific content from the search on the site.", 'ivory-search' ) . '</p>';
87
- $content['edit_overview'] .= '<p>' . __( "<strong>Settings</strong> provides a place where you can customize overall behavior of this search form.", 'ivory-search' ) . '</p>';
88
 
89
  $content['includes'] = '<p>' . __( "Control here which content you want to make searchable using this search form.", 'ivory-search' ) . '</p>';
90
 
@@ -93,7 +93,7 @@ class IS_Help {
93
  $content['edit_settings'] = '<p>' . __( "Control here the overall behaviour of this search form.", 'ivory-search' ) . '</p>';
94
 
95
  $content['settings_overview'] = '<p>' . __( "On this screen, you can manage search added in the site navgation menu and configure settings that will affect all search forms and search functionality on the site. The settings screen comprised of the following sections:", 'ivory-search' ) . '</p>';
96
- $content['settings_overview'] .= '<p>' . __( "<strong>Search To Menu</strong> provides a place where you can customize the behavior of search form added in the site navgation menu.", 'ivory-search' ) . '</p>';
97
  $content['settings_overview'] .= '<p>' . __( "<strong>Settings</strong> provides options to configure sitewide search functionality.", 'ivory-search' ) . '</p>';
98
 
99
  $content['search_to_menu'] = '<p>' . __( "Cofigure the options in this section to manage search added in the site navigation menu.", 'ivory-search' ) . '</p>';
@@ -114,11 +114,10 @@ class IS_Help {
114
  $this->screen->set_help_sidebar( $content );
115
  }
116
 
117
- public static function help_tooltip( $title, $content ) { ?>
118
- <span class="is-tooltip">
119
- <i class="dashicons dashicons-editor-help is-help"></i>
120
- <span class="is-tip">
121
- <strong><?php echo $title; ?></strong>
122
  <?php echo $content; ?>
123
  </span>
124
  </span>
42
 
43
  $this->screen->add_help_tab( array(
44
  'id' => 'edit_settings',
45
+ 'title' => __( 'Options', 'ivory-search' ),
46
  'content' => $this->content( 'edit_settings' ) ) );
47
 
48
  $this->sidebar();
56
 
57
  $this->screen->add_help_tab( array(
58
  'id' => 'search_to_menu',
59
+ 'title' => __( 'Menu Search', 'ivory-search' ),
60
  'content' => $this->content( 'search_to_menu' ) ) );
61
 
62
  $this->screen->add_help_tab( array(
84
  $content['edit_overview'] .= '<p>' . __( "<strong>Title</strong> is the title of a search form. This title is only used for labeling a search form, and can be edited.", 'ivory-search' ) . '</p>';
85
  $content['edit_overview'] .= '<p>' . __( "<strong>Includes</strong> provides options to control which content on the site is searchable.", 'ivory-search' ) . '</p>';
86
  $content['edit_overview'] .= '<p>' . __( "<strong>Excludes</strong> provides options to exclude specific content from the search on the site.", 'ivory-search' ) . '</p>';
87
+ $content['edit_overview'] .= '<p>' . __( "<strong>Options</strong> provides a place where you can customize overall behavior of this search form.", 'ivory-search' ) . '</p>';
88
 
89
  $content['includes'] = '<p>' . __( "Control here which content you want to make searchable using this search form.", 'ivory-search' ) . '</p>';
90
 
93
  $content['edit_settings'] = '<p>' . __( "Control here the overall behaviour of this search form.", 'ivory-search' ) . '</p>';
94
 
95
  $content['settings_overview'] = '<p>' . __( "On this screen, you can manage search added in the site navgation menu and configure settings that will affect all search forms and search functionality on the site. The settings screen comprised of the following sections:", 'ivory-search' ) . '</p>';
96
+ $content['settings_overview'] .= '<p>' . __( "<strong>Menu Search</strong> provides a place where you can customize the behavior of search form added in the site navgation menu.", 'ivory-search' ) . '</p>';
97
  $content['settings_overview'] .= '<p>' . __( "<strong>Settings</strong> provides options to configure sitewide search functionality.", 'ivory-search' ) . '</p>';
98
 
99
  $content['search_to_menu'] = '<p>' . __( "Cofigure the options in this section to manage search added in the site navigation menu.", 'ivory-search' ) . '</p>';
114
  $this->screen->set_help_sidebar( $content );
115
  }
116
 
117
+ public static function help_info( $content ) { ?>
118
+ <span class="is-help">
119
+ <i class="dashicons dashicons-warning"></i>
120
+ <span class="is-info">
 
121
  <?php echo $content; ?>
122
  </span>
123
  </span>
admin/class-is-settings-fields.php CHANGED
@@ -62,6 +62,58 @@ class IS_Settings_Fields {
62
  return self::$_instance;
63
  }
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  /**
66
  * Registers plugin settings fields.
67
  */
@@ -100,8 +152,8 @@ class IS_Settings_Fields {
100
  /**
101
  * Displays Search To Menu section description text.
102
  */
103
- function search_to_menu_section_desc(){
104
- _e( 'Use below options to display search in menu and configure it.', 'ivory-search' );
105
  }
106
 
107
  /**
@@ -110,13 +162,17 @@ class IS_Settings_Fields {
110
  function settings_section_desc(){
111
  echo '</div>';
112
  echo '<div class="search-form-editor-panel" id="settings">';
113
- _e( 'Use below options to make sitewide changes in search.', 'ivory-search' );
114
  }
115
 
116
  /**
117
  * Displays choose menu locations field.
118
  */
119
  function menu_locations() {
 
 
 
 
120
  $html = '';
121
  $menus = get_registered_nav_menus();
122
 
@@ -136,21 +192,17 @@ class IS_Settings_Fields {
136
  } else {
137
  $html = __( 'No navigation menu registered on your site.', 'ivory-search' );
138
  }
139
- echo $html; ?>
140
- <td>
141
- <?php
142
- $title = __( 'Select Menu', 'ivory-search' );
143
- $content = '<p>' . __( 'Select menu here where you want to display search form.', 'ivory-search' ) . '</p>';
144
- IS_Help::help_tooltip( $title, $content );
145
- ?>
146
- </td>
147
- <?php
148
  }
149
 
150
  /**
151
  * Displays post types field.
152
  */
153
  function menu_post_types() {
 
 
 
 
154
  $html = '';
155
  $args = array( 'exclude_from_search' => false );
156
 
@@ -168,15 +220,7 @@ class IS_Settings_Fields {
168
  } else {
169
  $html = __( 'No post types registered on your site.', 'ivory-search' );
170
  }
171
- echo $html; ?>
172
- <td>
173
- <?php
174
- $title = __( 'Post Types', 'ivory-search' );
175
- $content = '<p>' . __( 'Select post types here that you want to make searchable.', 'ivory-search' ) . '</p>';
176
- IS_Help::help_tooltip( $title, $content );
177
- ?>
178
- </td>
179
- <?php
180
  }
181
 
182
 
@@ -184,14 +228,19 @@ class IS_Settings_Fields {
184
  * Displays menu search form field.
185
  */
186
  function menu_search_form() {
187
- $html = '';
188
 
189
- $form_disable = is_fs()->is_plan( 'pro' ) ? false : true;
 
 
 
 
 
 
190
  if ( $form_disable ) {
191
- $html .= '<p><select disabled id="menu_search_form" name="ivory_search[menu_search_form]" >';
192
- $html .= '<option value="0">' . __( 'none', 'ivory-search' ) . '</option>';
193
- $html .= '</select>';
194
- $html .= IS_Admin::pro_link() . '</p>';
195
  } else {
196
  $args = array( 'numberposts' => -1, 'post_type' => 'is_search_form' );
197
  $posts = get_posts( $args );
@@ -200,7 +249,7 @@ class IS_Settings_Fields {
200
 
201
  $check_value = isset( $this->opt['menu_search_form'] ) ? $this->opt['menu_search_form'] : 0;
202
  $html .= '<p><select id="menu_search_form" name="ivory_search[menu_search_form]" >';
203
- $html .= '<option value="0">' . __( 'none', 'ivory-search' ) . '</option>';
204
  foreach ( $posts as $post ) {
205
  $html .= '<option value="' . $post->ID . '"' . selected( $post->ID, $check_value, false ) . ' >' . $post->post_title . '</option>';
206
  }
@@ -211,18 +260,10 @@ class IS_Settings_Fields {
211
  } else {
212
  $html .= '<a href="' . esc_url( menu_page_url( 'ivory-search-new', false ) ) . '"> ' . esc_html__( "Create New", 'ivory-search' ) . '</a>';
213
  }
214
- $html .= '</p><label for="menu_search_form" style="font-size: 10px;">' . esc_html__( "It overwrites above Post Types option.", 'ivory-search' ) . '</label>';
215
  }
216
  }
217
- echo $html; ?>
218
- <td>
219
- <?php
220
- $title = __( 'Search Form', 'ivory-search' );
221
- $content = '<p>' . __( 'Select search form that will control search performed using menu search.', 'ivory-search' ) . '</p>';
222
- IS_Help::help_tooltip( $title, $content );
223
- ?>
224
- </td>
225
- <?php
226
  }
227
 
228
 
@@ -230,6 +271,10 @@ class IS_Settings_Fields {
230
  * Displays form style field.
231
  */
232
  function menu_form_style() {
 
 
 
 
233
  $styles = array(
234
  'default' => __( 'Default', 'ivory-search' ),
235
  'dropdown' => __( 'Dropdown', 'ivory-search' ),
@@ -238,7 +283,7 @@ class IS_Settings_Fields {
238
  'popup' => __( 'Popup', 'ivory-search' )
239
  );
240
 
241
- $popup_disable = is_fs()->is_plan( 'pro' ) ? false : true;
242
 
243
  if ( empty( $this->opt ) || ( ! isset( $this->opt['add_search_to_menu_style'] ) && ! isset( $this->opt['menu_style'] ) ) ) {
244
  $this->opt['menu_style'] = 'default';
@@ -250,85 +295,64 @@ class IS_Settings_Fields {
250
  $check_value = isset( $this->opt['menu_style'] ) ? $this->opt['menu_style'] : $check_value;
251
 
252
  foreach ( $styles as $key => $style ) {
253
- $html .= '<p><input type="radio" id="is_menu_style' . esc_attr( $key ) . '" name="ivory_search[menu_style]"';
 
 
 
 
 
254
  $html .= ( $popup_disable && 'popup' === $key ) ? ' disabled ' : '';
255
  $html .= 'name="ivory_search[menu_style]" value="' . esc_attr( $key ) . '" ' . checked( $key, $check_value, false ) . '/>';
256
  $html .= '<label for="is_menu_style' . esc_attr( $key ) . '"> ' . esc_html( $style ) . '</label>';
257
- if ( $popup_disable && 'popup' === $key ) {
258
- $html .= IS_Admin::pro_link();
259
- }
260
  $html .= '</p>';
261
  }
262
- echo $html; ?>
263
- <td>
264
- <?php
265
- $title = __( 'Form Style', 'ivory-search' );
266
- $content = '<p>' . __( 'Select form style for the search form displayed in the menu.', 'ivory-search' ) . '</p>';
267
- IS_Help::help_tooltip( $title, $content );
268
- ?>
269
- </td>
270
- <?php
271
  }
272
 
273
  /**
274
  * Displays search menu title field.
275
  */
276
  function menu_title() {
 
 
277
  $this->opt['add_search_to_menu_title'] = isset( $this->opt['add_search_to_menu_title'] ) ? $this->opt['add_search_to_menu_title'] : '';
278
  $this->opt['menu_title'] = isset( $this->opt['menu_title'] ) ? $this->opt['menu_title'] : $this->opt['add_search_to_menu_title'];
279
  $html = '<input type="text" class="large-text" id="is_menu_title" name="ivory_search[menu_title]" value="' . esc_attr( $this->opt['menu_title'] ) . '" />';
280
- echo $html; ?>
281
- <td>
282
- <?php
283
- $title = __( 'Menu Title', 'ivory-search' );
284
- $content = '<p>' . __( 'Displays set menu title text in place of search icon displays in navigation menu.', 'ivory-search' ) . '</p>';
285
- IS_Help::help_tooltip( $title, $content );
286
- ?>
287
- </td>
288
- <?php
289
  }
290
 
291
  /**
292
  * Displays search menu classes field.
293
  */
294
  function menu_classes() {
 
 
295
  $this->opt['add_search_to_menu_classes'] = isset( $this->opt['add_search_to_menu_classes'] ) ? $this->opt['add_search_to_menu_classes'] : '';
296
  $this->opt['menu_classes'] = isset( $this->opt['menu_classes'] ) ? $this->opt['menu_classes'] : $this->opt['add_search_to_menu_classes'];
297
  $html = '<input type="text" class="large-text" id="is_menu_classes" name="ivory_search[menu_classes]" value="' . esc_attr( $this->opt['menu_classes'] ) . '" />';
298
  $html .= '<br /><label for="is_menu_classes" style="font-size: 10px;">' . esc_html__( "Add classes seperated by space.", 'ivory-search' ) . '</label>';
299
- echo $html; ?>
300
- <td>
301
- <?php
302
- $title = __( 'Menu Classes', 'ivory-search' );
303
- $content = '<p>' . __( 'Adds set classes in the search navigation menu item.', 'ivory-search' ) . '</p>';
304
- IS_Help::help_tooltip( $title, $content );
305
- ?>
306
- </td>
307
- <?php
308
  }
309
 
310
  /**
311
  * Displays google cse field.
312
  */
313
  function menu_google_cse() {
 
 
314
  $this->opt['add_search_to_menu_gcse'] = isset( $this->opt['add_search_to_menu_gcse'] ) ? $this->opt['add_search_to_menu_gcse'] : '';
315
  $this->opt['menu_gcse'] = isset( $this->opt['menu_gcse'] ) ? $this->opt['menu_gcse'] : $this->opt['add_search_to_menu_gcse'];
316
  $html = '<input type="text" class="large-text" id="is_menu_gcse" name="ivory_search[menu_gcse]" value="' . esc_attr( $this->opt['menu_gcse'] ) . '" />';
317
- echo $html; ?>
318
- <td>
319
- <?php
320
- $title = __( 'Google CSE', 'ivory-search' );
321
- $content = '<p>' . __( 'Add only Google Custom Search( CSE ) search form code in the above text box that will replace default search form.', 'ivory-search' ) . '</p>';
322
- IS_Help::help_tooltip( $title, $content );
323
- ?>
324
- </td>
325
- <?php
326
  }
327
 
328
  /**
329
  * Displays display in header field.
330
  */
331
  function menu_search_in_header() {
 
 
 
332
  $check_value = isset( $this->opt['add_search_to_menu_display_in_header'] ) ? $this->opt['add_search_to_menu_display_in_header'] : 0;
333
 
334
  $check_string = checked( 'add_search_to_menu_display_in_header', $check_value, false );
@@ -340,7 +364,10 @@ class IS_Settings_Fields {
340
 
341
  $html = '<input type="checkbox" id="is_search_in_header" name="ivory_search[header_menu_search]" value="header_menu_search" ' . $check_string . ' />';
342
  $html .= '<label for="is_search_in_header"> ' . esc_html__( 'Display search form in header on mobile devices', 'ivory-search' ) . '</label>';
343
- $html .= '<br /><label for="is_search_in_header" style="font-size: 10px;margin: 5px 0 10px;display: inline-block;">' . esc_html__( "It does not work with caching as this functionality uses WordPress wp_is_mobile function.", 'ivory-search' ) . '</label>';
 
 
 
344
 
345
  $check_value = isset( $this->opt['astm_site_uses_cache'] ) ? $this->opt['astm_site_uses_cache'] : 0;
346
 
@@ -351,10 +378,9 @@ class IS_Settings_Fields {
351
  $check_string = checked( 'site_uses_cache', $check_value, false );
352
  }
353
 
354
- $html .= '<br /><input type="checkbox" id="is_site_uses_cache" name="ivory_search[site_uses_cache]" value="site_uses_cache" ' . $check_string . ' />';
355
  $html .= '<label for="is_site_uses_cache"> ' . esc_html__( 'This site uses cache', 'ivory-search' ) . '</label>';
356
- $html .= '<br /><label for="is_site_uses_cache" style="font-size: 10px;">' . esc_html__( "Use this option to display search form in site header and hide it on desktop using CSS code.", 'ivory-search' ) . '</label>';
357
- echo $html;
358
  }
359
 
360
  /**
@@ -365,7 +391,7 @@ class IS_Settings_Fields {
365
  $disable = checked( 1, $check_value, false );
366
  $html = '<input type="checkbox" id="is_disable" name="ivory_search[disable]" value="1" ' . $disable . ' />';
367
  $html .= '<label for="is_disable"> ' . esc_html__( 'Disable search functionality on whole site.', 'ivory-search' ) . '</label>';
368
- echo $html;
369
  }
370
 
371
  /**
@@ -376,7 +402,7 @@ class IS_Settings_Fields {
376
  $disable = checked( 1, $check_value, false );
377
  $html = '<input type="checkbox" id="is_default_search" name="ivory_search[default_search]" value="1" ' . $disable . ' />';
378
  $html .= '<label for="is_default_search"> ' . esc_html__( 'Do not use default search form to control WordPress default search functionality.', 'ivory-search' ) . '</label>';
379
- echo $html;
380
  }
381
 
382
  /**
@@ -384,6 +410,9 @@ class IS_Settings_Fields {
384
  */
385
  function header() {
386
 
 
 
 
387
  $html = '';
388
  $args = array( 'numberposts' => -1, 'post_type' => 'is_search_form' );
389
 
@@ -393,7 +422,7 @@ class IS_Settings_Fields {
393
 
394
  $check_value = isset( $this->opt['header_search'] ) ? $this->opt['header_search'] : 0;
395
  $html .= '<select id="is_header_search" name="ivory_search[header_search]" >';
396
- $html .= '<option value="0">' . __( 'none', 'ivory-search' ) . '</option>';
397
  foreach ( $posts as $post ) {
398
  $html .= '<option value="' . $post->ID . '"' . selected( $post->ID, $check_value, false ) . ' >' . $post->post_title . '</option>';
399
  }
@@ -404,9 +433,8 @@ class IS_Settings_Fields {
404
  } else {
405
  $html .= '<a href="' . esc_url( menu_page_url( 'ivory-search-new', false ) ) . '"> ' . esc_html__( "Create New", 'ivory-search' ) . '</a>';
406
  }
407
- $html .= '<br /><label for="is_header_search" style="font-size: 10px;">' . esc_html__( "Displays search form in site header using wp_head hook.", 'ivory-search' ) . '</label>';
408
  }
409
- echo $html;
410
  }
411
 
412
  /**
@@ -414,6 +442,9 @@ class IS_Settings_Fields {
414
  */
415
  function footer() {
416
 
 
 
 
417
  $html = '';
418
  $args = array( 'numberposts' => -1, 'post_type' => 'is_search_form' );
419
 
@@ -423,7 +454,7 @@ class IS_Settings_Fields {
423
 
424
  $check_value = isset( $this->opt['footer_search'] ) ? $this->opt['footer_search'] : 0;
425
  $html .= '<select id="is_footer_search" name="ivory_search[footer_search]" >';
426
- $html .= '<option value="0">' . __( 'none', 'ivory-search' ) . '</option>';
427
  foreach ( $posts as $post ) {
428
  $html .= '<option value="' . $post->ID . '"' . selected( $post->ID, $check_value, false ) . ' >' . $post->post_title . '</option>';
429
  }
@@ -434,9 +465,8 @@ class IS_Settings_Fields {
434
  } else {
435
  $html .= '<a href="' . esc_url( menu_page_url( 'ivory-search-new', false ) ) . '"> ' . esc_html__( "Create New", 'ivory-search' ) . '</a>';
436
  }
437
- $html .= '<br /><label for="is_footer_search" style="font-size: 10px;">' . esc_html__( "Displays search form in site footer using wp_footer hook.", 'ivory-search' ) . '</label>';
438
  }
439
- echo $html;
440
  }
441
 
442
  /**
@@ -454,70 +484,67 @@ class IS_Settings_Fields {
454
 
455
  $html = '<input type="checkbox" id="menu_close_icon" name="ivory_search[menu_close_icon]" value="menu_close_icon" ' . $check_string . ' />';
456
  $html .= '<label for="menu_close_icon"> ' . esc_html__( 'Display Search Form Close Icon', 'ivory-search' ) . '</label>';
457
- echo $html;
458
  }
459
 
460
  /**
461
  * Displays custom css field.
462
  */
463
  function custom_css() {
 
 
 
464
  $this->opt['add_search_to_menu_css'] = isset( $this->opt['add_search_to_menu_css'] ) ? $this->opt['add_search_to_menu_css'] : '';
465
  $this->opt['custom_css'] = isset( $this->opt['custom_css'] ) ? $this->opt['custom_css'] : $this->opt['add_search_to_menu_css'];
466
  $html = '<textarea class="large-text" rows="4" id="custom_css" name="ivory_search[custom_css]" >' . esc_attr( $this->opt['custom_css'] ) . '</textarea>';
467
- $html .= '<br /><label for="custom_css" style="font-size: 10px;">' . esc_html__( "Add custom css code if any to style search form.", 'ivory-search' ) . '</label>';
468
- echo $html;
469
  }
470
 
471
  /**
472
  * Displays stopwords field.
473
  */
474
  function stopwords() {
 
 
475
  $this->opt['stopwords'] = isset( $this->opt['stopwords'] ) ? $this->opt['stopwords'] : '';
476
  $html = '<textarea class="large-text" rows="4" id="stopwords" name="ivory_search[stopwords]" >' . esc_attr( $this->opt['stopwords'] ) . '</textarea>';
477
  $html .= '<br /><label for="stopwords" style="font-size: 10px;">' . esc_html__( "Please separate words with commas.", 'ivory-search' ) . '</label>';
478
- echo $html; ?>
479
- <td>
480
- <?php
481
- $title = __( 'Stopwords', 'ivory-search' );
482
- $content = '<p>' . __( 'Enter words here to add them to the list of stopwords. The stopwords will not be searched.', 'ivory-search' ) . '</p>';
483
- IS_Help::help_tooltip( $title, $content );
484
- ?>
485
- </td>
486
- <?php
487
  }
488
 
489
  /**
490
  * Displays synonyms field.
491
  */
492
  function synonyms() {
 
 
 
 
 
493
  $this->opt['synonyms'] = isset( $this->opt['synonyms'] ) ? $this->opt['synonyms'] : '';
494
  $html = '<textarea class="large-text" rows="4" id="synonyms" name="ivory_search[synonyms]" >' . esc_attr( $this->opt['synonyms'] ) . '</textarea>';
495
  $html .= '<br /><label for="synonyms" style="font-size: 10px;">' . esc_html__( 'The format here is key = value;. Please separate every synonyms key = value pairs with semicolon.', 'ivory-search' ) . '</label>';
496
- $synonyms_disable = is_fs()->is_plan( 'pro' ) ? '' : ' disabled ';
497
  $check_value = isset( $this->opt['synonyms_and'] ) ? $this->opt['synonyms_and'] : 0;
498
  $disable = checked( 1, $check_value, false );
499
- $html .= '<br /><br /><input type="checkbox" ' . $synonyms_disable . ' id="synonyms_and" name="ivory_search[synonyms_and]" value="1" ' . $disable . ' />';
500
- $html .= '<label for="synonyms_and"> ' . esc_html__( 'Disable synonyms for the search forms having AND search terms relation.', 'ivory-search' ) . '</label>';
501
  if ( '' !== $synonyms_disable ) {
502
- $html .= IS_Admin::pro_link();
 
 
503
  }
504
- echo $html; ?>
505
- <td>
506
- <?php
507
- $title = __( 'Synonyms', 'ivory-search' );
508
- $content = '<p>' . __( 'Add synonyms here to make the searches find better results.', 'ivory-search' ) . '</p>';
509
- $content .= '<p>' . __( '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' ) . '</p>';
510
- $content .= '<p>' . __( 'This only works for search forms and in OR searches. In AND searches the synonyms only restrict the search, as now the search only finds posts that contain both bird and crow.', 'ivory-search' ) . '</p>';
511
- IS_Help::help_tooltip( $title, $content );
512
- ?>
513
- </td>
514
- <?php
515
  }
516
 
517
  /**
518
  * Displays do not load plugin files field.
519
  */
520
  function plugin_files() {
 
 
 
 
521
  $styles = array(
522
  'css' => __( 'Plugin CSS File', 'ivory-search' ),
523
  'js' => __( 'Plugin JavaScript File', 'ivory-search' )
@@ -549,6 +576,6 @@ class IS_Settings_Fields {
549
  $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>';
550
  }
551
  }
552
- echo $html;
553
  }
554
  }
62
  return self::$_instance;
63
  }
64
 
65
+ /**
66
+ * Displays settings sections having custom markup.
67
+ */
68
+ public function is_do_settings_sections( $page ) {
69
+ global $wp_settings_sections, $wp_settings_fields;
70
+
71
+ if ( ! isset( $wp_settings_sections[$page] ) )
72
+ return;
73
+
74
+ foreach ( (array) $wp_settings_sections[$page] as $section ) {
75
+ if ( $section['title'] )
76
+ echo "<h2>{$section['title']}</h2>\n";
77
+
78
+ if ( $section['callback'] )
79
+ call_user_func( $section['callback'], $section );
80
+
81
+ if ( ! isset( $wp_settings_fields ) || !isset( $wp_settings_fields[$page] ) || !isset( $wp_settings_fields[$page][$section['id']] ) )
82
+ continue;
83
+ echo '<div class="form-table">';
84
+ $this->is_do_settings_fields( $page, $section['id'] );
85
+ echo '</div>';
86
+ }
87
+ }
88
+
89
+ /**
90
+ * Displays settings fields having custom markup.
91
+ */
92
+ public function is_do_settings_fields( $page, $section ) {
93
+ global $wp_settings_fields;
94
+
95
+ if ( ! isset( $wp_settings_fields[$page][$section] ) )
96
+ return;
97
+
98
+ foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
99
+ $class = '';
100
+
101
+ if ( ! empty( $field['args']['class'] ) ) {
102
+ $class = ' class="' . esc_attr( $field['args']['class'] ) . '"';
103
+ }
104
+
105
+ if ( ! empty( $field['args']['label_for'] ) ) {
106
+ echo '<h3 scope="row"><label for="' . esc_attr( $field['args']['label_for'] ) . '">' . $field['title'] . '</label>';
107
+ } else {
108
+ echo '<h3 scope="row">' . $field['title'];
109
+ }
110
+
111
+ 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></h3><div>';
112
+ call_user_func($field['callback'], $field['args']);
113
+ echo '</div>';
114
+ }
115
+ }
116
+
117
  /**
118
  * Registers plugin settings fields.
119
  */
152
  /**
153
  * Displays Search To Menu section description text.
154
  */
155
+ function search_to_menu_section_desc() {
156
+ echo '<h4 class="panel-desc">' . __( 'Use below options to display search in menu and configure it.', 'ivory-search' ) . '</h4>';
157
  }
158
 
159
  /**
162
  function settings_section_desc(){
163
  echo '</div>';
164
  echo '<div class="search-form-editor-panel" id="settings">';
165
+ echo '<h4 class="panel-desc">' . __( 'Use below options to make sitewide changes in search.', 'ivory-search' ) . '</h4>';
166
  }
167
 
168
  /**
169
  * Displays choose menu locations field.
170
  */
171
  function menu_locations() {
172
+
173
+ $content = __( 'Select menu here where you want to display search form.', 'ivory-search' );
174
+ IS_Help::help_info( $content );
175
+
176
  $html = '';
177
  $menus = get_registered_nav_menus();
178
 
192
  } else {
193
  $html = __( 'No navigation menu registered on your site.', 'ivory-search' );
194
  }
195
+ echo '<div>' . $html . '</div>';
 
 
 
 
 
 
 
 
196
  }
197
 
198
  /**
199
  * Displays post types field.
200
  */
201
  function menu_post_types() {
202
+
203
+ $content = __( 'Select post types here that you want to make searchable.', 'ivory-search' );
204
+ IS_Help::help_info( $content );
205
+
206
  $html = '';
207
  $args = array( 'exclude_from_search' => false );
208
 
220
  } else {
221
  $html = __( 'No post types registered on your site.', 'ivory-search' );
222
  }
223
+ echo '<div>' . $html . '</div>';
 
 
 
 
 
 
 
 
224
  }
225
 
226
 
228
  * Displays menu search form field.
229
  */
230
  function menu_search_form() {
 
231
 
232
+ $content = __( 'Select search form that will control search performed using menu search.', 'ivory-search' );
233
+ $content .= '<br />';
234
+ $content .= __( 'It overwrites above Post Types option.', 'ivory-search' );
235
+ IS_Help::help_info( $content );
236
+
237
+ $html = '';
238
+ $form_disable = is_fs()->is_plan_or_trial( 'pro' ) ? false : true;
239
  if ( $form_disable ) {
240
+ $html .= '<p>'.IS_Admin::pro_link();
241
+ $html .= '<select disabled id="menu_search_form" name="ivory_search[menu_search_form]" >';
242
+ $html .= '<option value="0" selected="selected">' . __( 'none', 'ivory-search' ) . '</option>';
243
+ $html .= '</select></p>';
244
  } else {
245
  $args = array( 'numberposts' => -1, 'post_type' => 'is_search_form' );
246
  $posts = get_posts( $args );
249
 
250
  $check_value = isset( $this->opt['menu_search_form'] ) ? $this->opt['menu_search_form'] : 0;
251
  $html .= '<p><select id="menu_search_form" name="ivory_search[menu_search_form]" >';
252
+ $html .= '<option value="0" ' . selected( 0, $check_value, false ) . '>' . __( 'none', 'ivory-search' ) . '</option>';
253
  foreach ( $posts as $post ) {
254
  $html .= '<option value="' . $post->ID . '"' . selected( $post->ID, $check_value, false ) . ' >' . $post->post_title . '</option>';
255
  }
260
  } else {
261
  $html .= '<a href="' . esc_url( menu_page_url( 'ivory-search-new', false ) ) . '"> ' . esc_html__( "Create New", 'ivory-search' ) . '</a>';
262
  }
263
+ $html .= '</p>';
264
  }
265
  }
266
+ echo '<div>' . $html . '</div>';
 
 
 
 
 
 
 
 
267
  }
268
 
269
 
271
  * Displays form style field.
272
  */
273
  function menu_form_style() {
274
+
275
+ $content = __( 'Select form style for the search form displayed in the menu.', 'ivory-search' );
276
+ IS_Help::help_info( $content );
277
+
278
  $styles = array(
279
  'default' => __( 'Default', 'ivory-search' ),
280
  'dropdown' => __( 'Dropdown', 'ivory-search' ),
283
  'popup' => __( 'Popup', 'ivory-search' )
284
  );
285
 
286
+ $popup_disable = is_fs()->is_plan_or_trial( 'pro' ) ? false : true;
287
 
288
  if ( empty( $this->opt ) || ( ! isset( $this->opt['add_search_to_menu_style'] ) && ! isset( $this->opt['menu_style'] ) ) ) {
289
  $this->opt['menu_style'] = 'default';
295
  $check_value = isset( $this->opt['menu_style'] ) ? $this->opt['menu_style'] : $check_value;
296
 
297
  foreach ( $styles as $key => $style ) {
298
+ if ( $popup_disable && 'popup' === $key ) {
299
+ $html .= '<p class="upgrade-parent">'.IS_Admin::pro_link();
300
+ } else {
301
+ $html .= '<p>';
302
+ }
303
+ $html .= '<input type="radio" id="is_menu_style' . esc_attr( $key ) . '" name="ivory_search[menu_style]"';
304
  $html .= ( $popup_disable && 'popup' === $key ) ? ' disabled ' : '';
305
  $html .= 'name="ivory_search[menu_style]" value="' . esc_attr( $key ) . '" ' . checked( $key, $check_value, false ) . '/>';
306
  $html .= '<label for="is_menu_style' . esc_attr( $key ) . '"> ' . esc_html( $style ) . '</label>';
 
 
 
307
  $html .= '</p>';
308
  }
309
+ echo '<div>' . $html . '</div>';
 
 
 
 
 
 
 
 
310
  }
311
 
312
  /**
313
  * Displays search menu title field.
314
  */
315
  function menu_title() {
316
+ $content = __( 'Displays set menu title text in place of search icon displays in navigation menu.', 'ivory-search' );
317
+ IS_Help::help_info( $content );
318
  $this->opt['add_search_to_menu_title'] = isset( $this->opt['add_search_to_menu_title'] ) ? $this->opt['add_search_to_menu_title'] : '';
319
  $this->opt['menu_title'] = isset( $this->opt['menu_title'] ) ? $this->opt['menu_title'] : $this->opt['add_search_to_menu_title'];
320
  $html = '<input type="text" class="large-text" id="is_menu_title" name="ivory_search[menu_title]" value="' . esc_attr( $this->opt['menu_title'] ) . '" />';
321
+ echo '<div>' . $html . '</div>';
 
 
 
 
 
 
 
 
322
  }
323
 
324
  /**
325
  * Displays search menu classes field.
326
  */
327
  function menu_classes() {
328
+ $content = __( 'Adds set classes in the search navigation menu item.', 'ivory-search' );
329
+ IS_Help::help_info( $content );
330
  $this->opt['add_search_to_menu_classes'] = isset( $this->opt['add_search_to_menu_classes'] ) ? $this->opt['add_search_to_menu_classes'] : '';
331
  $this->opt['menu_classes'] = isset( $this->opt['menu_classes'] ) ? $this->opt['menu_classes'] : $this->opt['add_search_to_menu_classes'];
332
  $html = '<input type="text" class="large-text" id="is_menu_classes" name="ivory_search[menu_classes]" value="' . esc_attr( $this->opt['menu_classes'] ) . '" />';
333
  $html .= '<br /><label for="is_menu_classes" style="font-size: 10px;">' . esc_html__( "Add classes seperated by space.", 'ivory-search' ) . '</label>';
334
+ echo '<div>' . $html . '</div>';
 
 
 
 
 
 
 
 
335
  }
336
 
337
  /**
338
  * Displays google cse field.
339
  */
340
  function menu_google_cse() {
341
+ $content = __( 'Add only Google Custom Search( CSE ) search form code in the above text box that will replace default search form.', 'ivory-search' );
342
+ IS_Help::help_info( $content );
343
  $this->opt['add_search_to_menu_gcse'] = isset( $this->opt['add_search_to_menu_gcse'] ) ? $this->opt['add_search_to_menu_gcse'] : '';
344
  $this->opt['menu_gcse'] = isset( $this->opt['menu_gcse'] ) ? $this->opt['menu_gcse'] : $this->opt['add_search_to_menu_gcse'];
345
  $html = '<input type="text" class="large-text" id="is_menu_gcse" name="ivory_search[menu_gcse]" value="' . esc_attr( $this->opt['menu_gcse'] ) . '" />';
346
+ echo '<div>' . $html . '</div>';
 
 
 
 
 
 
 
 
347
  }
348
 
349
  /**
350
  * Displays display in header field.
351
  */
352
  function menu_search_in_header() {
353
+ $content = __( 'Note: Does not work with caching as this functionality uses the WordPress wp_is_mobile function.', 'ivory-search' );
354
+ IS_Help::help_info( $content );
355
+
356
  $check_value = isset( $this->opt['add_search_to_menu_display_in_header'] ) ? $this->opt['add_search_to_menu_display_in_header'] : 0;
357
 
358
  $check_string = checked( 'add_search_to_menu_display_in_header', $check_value, false );
364
 
365
  $html = '<input type="checkbox" id="is_search_in_header" name="ivory_search[header_menu_search]" value="header_menu_search" ' . $check_string . ' />';
366
  $html .= '<label for="is_search_in_header"> ' . esc_html__( 'Display search form in header on mobile devices', 'ivory-search' ) . '</label>';
367
+ echo '<div>' . $html . '</div><br />';
368
+ $html = '';
369
+ $content = __( 'Use this option to display search form in your site header and hide the search form on desktop using CSS code.', 'ivory-search' );
370
+ IS_Help::help_info( $content );
371
 
372
  $check_value = isset( $this->opt['astm_site_uses_cache'] ) ? $this->opt['astm_site_uses_cache'] : 0;
373
 
378
  $check_string = checked( 'site_uses_cache', $check_value, false );
379
  }
380
 
381
+ $html .= '<input type="checkbox" id="is_site_uses_cache" name="ivory_search[site_uses_cache]" value="site_uses_cache" ' . $check_string . ' />';
382
  $html .= '<label for="is_site_uses_cache"> ' . esc_html__( 'This site uses cache', 'ivory-search' ) . '</label>';
383
+ echo '<div>' . $html . '</div>';
 
384
  }
385
 
386
  /**
391
  $disable = checked( 1, $check_value, false );
392
  $html = '<input type="checkbox" id="is_disable" name="ivory_search[disable]" value="1" ' . $disable . ' />';
393
  $html .= '<label for="is_disable"> ' . esc_html__( 'Disable search functionality on whole site.', 'ivory-search' ) . '</label>';
394
+ echo '<div>' . $html . '</div>';
395
  }
396
 
397
  /**
402
  $disable = checked( 1, $check_value, false );
403
  $html = '<input type="checkbox" id="is_default_search" name="ivory_search[default_search]" value="1" ' . $disable . ' />';
404
  $html .= '<label for="is_default_search"> ' . esc_html__( 'Do not use default search form to control WordPress default search functionality.', 'ivory-search' ) . '</label>';
405
+ echo '<div>' . $html . '</div>';
406
  }
407
 
408
  /**
410
  */
411
  function header() {
412
 
413
+ $content = __( 'Displays search form in site header using wp_head hook.', 'ivory-search' );
414
+ IS_Help::help_info( $content );
415
+
416
  $html = '';
417
  $args = array( 'numberposts' => -1, 'post_type' => 'is_search_form' );
418
 
422
 
423
  $check_value = isset( $this->opt['header_search'] ) ? $this->opt['header_search'] : 0;
424
  $html .= '<select id="is_header_search" name="ivory_search[header_search]" >';
425
+ $html .= '<option value="0" ' . selected( 0, $check_value, false ) . '>' . __( 'none', 'ivory-search' ) . '</option>';
426
  foreach ( $posts as $post ) {
427
  $html .= '<option value="' . $post->ID . '"' . selected( $post->ID, $check_value, false ) . ' >' . $post->post_title . '</option>';
428
  }
433
  } else {
434
  $html .= '<a href="' . esc_url( menu_page_url( 'ivory-search-new', false ) ) . '"> ' . esc_html__( "Create New", 'ivory-search' ) . '</a>';
435
  }
 
436
  }
437
+ echo '<div>' . $html . '</div>';
438
  }
439
 
440
  /**
442
  */
443
  function footer() {
444
 
445
+ $content = __( 'Displays search form in site footer using wp_footer hook.', 'ivory-search' );
446
+ IS_Help::help_info( $content );
447
+
448
  $html = '';
449
  $args = array( 'numberposts' => -1, 'post_type' => 'is_search_form' );
450
 
454
 
455
  $check_value = isset( $this->opt['footer_search'] ) ? $this->opt['footer_search'] : 0;
456
  $html .= '<select id="is_footer_search" name="ivory_search[footer_search]" >';
457
+ $html .= '<option value="0" ' . selected( 0, $check_value, false ) . '>' . __( 'none', 'ivory-search' ) . '</option>';
458
  foreach ( $posts as $post ) {
459
  $html .= '<option value="' . $post->ID . '"' . selected( $post->ID, $check_value, false ) . ' >' . $post->post_title . '</option>';
460
  }
465
  } else {
466
  $html .= '<a href="' . esc_url( menu_page_url( 'ivory-search-new', false ) ) . '"> ' . esc_html__( "Create New", 'ivory-search' ) . '</a>';
467
  }
 
468
  }
469
+ echo '<div>' . $html . '</div>';
470
  }
471
 
472
  /**
484
 
485
  $html = '<input type="checkbox" id="menu_close_icon" name="ivory_search[menu_close_icon]" value="menu_close_icon" ' . $check_string . ' />';
486
  $html .= '<label for="menu_close_icon"> ' . esc_html__( 'Display Search Form Close Icon', 'ivory-search' ) . '</label>';
487
+ echo '<div>' . $html . '</div>';
488
  }
489
 
490
  /**
491
  * Displays custom css field.
492
  */
493
  function custom_css() {
494
+ $content = __( 'Add custom css code if any to style search form.', 'ivory-search' );
495
+ IS_Help::help_info( $content );
496
+
497
  $this->opt['add_search_to_menu_css'] = isset( $this->opt['add_search_to_menu_css'] ) ? $this->opt['add_search_to_menu_css'] : '';
498
  $this->opt['custom_css'] = isset( $this->opt['custom_css'] ) ? $this->opt['custom_css'] : $this->opt['add_search_to_menu_css'];
499
  $html = '<textarea class="large-text" rows="4" id="custom_css" name="ivory_search[custom_css]" >' . esc_attr( $this->opt['custom_css'] ) . '</textarea>';
500
+ echo '<div>' . $html . '</div>';
 
501
  }
502
 
503
  /**
504
  * Displays stopwords field.
505
  */
506
  function stopwords() {
507
+ $content = __( 'Enter words here to add them to the list of stopwords. The stopwords will not be searched.', 'ivory-search' );
508
+ IS_Help::help_info( $content );
509
  $this->opt['stopwords'] = isset( $this->opt['stopwords'] ) ? $this->opt['stopwords'] : '';
510
  $html = '<textarea class="large-text" rows="4" id="stopwords" name="ivory_search[stopwords]" >' . esc_attr( $this->opt['stopwords'] ) . '</textarea>';
511
  $html .= '<br /><label for="stopwords" style="font-size: 10px;">' . esc_html__( "Please separate words with commas.", 'ivory-search' ) . '</label>';
512
+ echo '<div>' . $html . '</div>';
 
 
 
 
 
 
 
 
513
  }
514
 
515
  /**
516
  * Displays synonyms field.
517
  */
518
  function synonyms() {
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 />' . __( 'This only works for search forms and in OR searches. In AND searches the synonyms only restrict the search, as now the search only finds posts that contain both bird and crow.', 'ivory-search' );
522
+ IS_Help::help_info( $content );
523
+
524
  $this->opt['synonyms'] = isset( $this->opt['synonyms'] ) ? $this->opt['synonyms'] : '';
525
  $html = '<textarea class="large-text" rows="4" id="synonyms" name="ivory_search[synonyms]" >' . esc_attr( $this->opt['synonyms'] ) . '</textarea>';
526
  $html .= '<br /><label for="synonyms" style="font-size: 10px;">' . esc_html__( 'The format here is key = value;. Please separate every synonyms key = value pairs with semicolon.', 'ivory-search' ) . '</label>';
527
+ $synonyms_disable = is_fs()->is_plan_or_trial( 'pro' ) ? '' : ' disabled ';
528
  $check_value = isset( $this->opt['synonyms_and'] ) ? $this->opt['synonyms_and'] : 0;
529
  $disable = checked( 1, $check_value, false );
 
 
530
  if ( '' !== $synonyms_disable ) {
531
+ $html .= '<p class="upgrade-parent">'.IS_Admin::pro_link();
532
+ } else {
533
+ $html .= '<p>';
534
  }
535
+ $html .= '<input type="checkbox" ' . $synonyms_disable . ' id="synonyms_and" name="ivory_search[synonyms_and]" value="1" ' . $disable . ' />';
536
+ $html .= '<label for="synonyms_and"> ' . esc_html__( 'Disable synonyms for the search forms having AND search terms relation.', 'ivory-search' ) . '</label>';
537
+ echo '</p><div>' . $html . '</div>';
 
 
 
 
 
 
 
 
538
  }
539
 
540
  /**
541
  * Displays do not load plugin files field.
542
  */
543
  function plugin_files() {
544
+
545
+ $content = __( 'Configure to disable loading plugin CSS and JavaScript files.', 'ivory-search' );
546
+ IS_Help::help_info( $content );
547
+
548
  $styles = array(
549
  'css' => __( 'Plugin CSS File', 'ivory-search' ),
550
  'js' => __( 'Plugin JavaScript File', 'ivory-search' )
576
  $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>';
577
  }
578
  }
579
+ echo '<div>' . $html . '</div>';
580
  }
581
  }
admin/css/ivory-search-admin.css CHANGED
@@ -2,6 +2,141 @@ br {
2
  clear: both;
3
  }
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  #submitpost input.delete {
6
  padding: 0;
7
  margin: 0;
@@ -25,160 +160,254 @@ span.shortcode > input {
25
  margin: 0;
26
  }
27
 
28
- .is-warning {
29
- background-color: #fff8e5;
30
- border: 1px solid #d6c9a6;
31
- color: #775f20;
32
- padding: 10px 15px;
33
  }
34
 
35
- /*
36
- * Help Tool Tip
37
- */
38
-
39
- #search-form-editor .form-table td:last-child {
40
- vertical-align: top;
41
  }
42
 
43
- .is-tooltip {
 
44
  display: inline-block;
45
- margin-left: 3px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  position: relative;
 
47
  }
48
 
49
- i.is-help {
50
- color: #0073aa;
 
51
  }
52
 
53
- .is-tip {
54
- background: #fffAF0;
55
- border: 1px solid #f5deaf;
56
  border-radius: 3px;
57
- font-size: 14px;
58
- right: -20px;
59
- margin-top: -4px;
60
- margin-left: -10px;
61
- line-height: 1.5;
62
- opacity: 0;
63
- padding: 6px 12px;
64
- position: absolute;
65
- bottom: 25px;
66
- visibility: hidden;
67
- width: 350px;
68
- z-index: 9999;
69
- -webkit-transition: all ease-in-out 0.4s;
70
- transition: all ease-in-out 0.4s;
71
  }
72
 
73
- .is-tooltip:hover .is-tip {
74
- margin-left: 0;
75
- opacity: 1;
76
- visibility: visible;
77
  }
78
 
79
- .is-tip:after,
80
- .is-tip:before {
81
- right: auto;
82
- top: 100%;
83
- left: 92%;
84
- border: solid transparent;
85
- content: '';
86
- height: 0;
87
- width: 0;
88
- position: absolute;
89
- pointer-events: none;
90
  }
91
 
92
- .is-tip:before {
93
- border-color: rgba(245,222,175,0);
94
- border-top-color: #f5deaf;
95
- border-width: 7px;
96
- margin-left: -7px;
 
 
 
 
 
 
 
97
  }
98
 
99
- .is-tip:after {
100
- border-color: rgba(255,250,240,0);
101
- border-top-color: #fffAF0;
102
- border-width: 6px;
103
- margin-left: -6px;
104
  }
105
 
106
- @media screen and ( max-width: 782px ) {
107
- .is-tip {
108
- left: -15px;
109
- right: auto;
 
 
 
110
  }
111
 
112
- .is-tip:after, .is-tip:before {
113
- left: 6%;
 
114
  }
115
  }
116
 
117
- @media screen and ( max-width: 402px ) {
118
- .is-tip {
119
- width: 200px
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  }
121
 
122
- .is-tip:after,
123
- .is-tip:before {
124
- left: 10%;
 
125
  }
126
  }
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  /*
129
  * Tabs
130
  */
131
- .keyboard-interaction {
132
- visibility: hidden;
133
- color: #23282d;
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  }
135
 
136
  #search-form-editor-tabs {
137
- border-bottom: 1px solid #aaa;
138
- padding: 9px 15px 0 10px;
 
139
  margin: 0;
 
 
140
  }
141
 
142
  #search-form-editor-tabs li {
143
- display: inline-block;
144
- list-style: none;
145
- border: 1px solid #ccc;
146
- border-bottom: 1px solid #aaa;
147
  padding: 0;
148
- margin: 0 4px -1px;
149
- background-color: #e4e4e4;
150
- }
151
-
152
- #search-form-editor-tabs li:hover {
153
- background-color: #fff;
154
  }
155
 
 
156
  #search-form-editor-tabs li.ui-tabs-active,
157
  #search-form-editor-tabs li.ui-tabs-active:hover {
158
- border-top: 1px solid #aaa;
159
- border-right: 1px solid #aaa;
160
- border-left: 1px solid #aaa;
161
- border-bottom: 1px solid #f5f5f5;
162
- background-color: #f5f5f5;
163
  }
164
 
165
  #search-form-editor-tabs li a {
 
166
  padding: 6px 10px;
167
  font-size: 14px;
168
  font-weight: normal;
169
  line-height: 30px;
170
- color: #333;
 
171
  text-decoration: none;
 
172
  }
173
 
 
174
  #search-form-editor-tabs li.ui-tabs-active a {
175
- color: #000;
176
- font-size: 14px;
177
- font-weight: bold;
178
  }
179
 
180
- #search-form-editor-tabs li a:hover {
 
 
 
181
  color: #000;
 
 
 
 
 
 
 
 
182
  }
183
 
184
  #search-form-editor-tabs li a span.dashicons {
@@ -209,20 +438,132 @@ i.is-help {
209
  padding: 0;
210
  }
211
 
212
- #search-form-editor .search-form-editor-panel {
213
- background-color: #f5f5f5;
214
- border: 1px solid #aaa;
215
- border-top: none;
216
  padding: 16px;
217
  }
218
 
219
- #search-form-editor .form-table th {
220
- width: 100px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  }
222
 
223
- #search-form-editor .search-form-editor-panel fieldset legend {
224
- line-height: 1.5;
225
- margin: .6em 0 .4em;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  }
227
 
228
  /*
@@ -232,16 +573,24 @@ i.is-help {
232
  .col-wrapper {
233
  float: left;
234
  margin: 0 20px 15px 0;
235
- width: 170px;
236
  }
237
 
238
- .col-wrapper:nth-child(3n+0) {
239
  margin-right: 0;
240
  }
241
 
242
  .col-title {
243
  text-align: center;
244
- margin-bottom: 5px;
 
 
 
 
 
 
 
 
245
  }
246
 
247
  .col-wrapper.after {
@@ -249,7 +598,7 @@ i.is-help {
249
  }
250
 
251
  .col-wrapper.check-radio {
252
- margin: 0 15px 5px 0;
253
  }
254
 
255
  #wpbody .col-wrapper select[multiple],
2
  clear: both;
3
  }
4
 
5
+ #search-form-editor .check-radio input{
6
+ display: none;
7
+ }
8
+
9
+ #search-form-editor .check-radio input {
10
+ width: 1px;
11
+ height: 1px;
12
+ position: absolute;
13
+ border: 0;
14
+ box-shadow: none;
15
+ background: transparent;
16
+ z-index: 99999;
17
+ }
18
+
19
+ .check-radio .toggle-check-text {
20
+ display: inline-block;
21
+ position: relative;
22
+ text-transform: uppercase;
23
+ background: #CCC;
24
+ padding: 3px 9px 3px 18px;
25
+ border-radius: 15px;
26
+ height: 12px;
27
+ width: 8px;
28
+ color: #FFF;
29
+ font-size: 12px;
30
+ cursor: pointer;
31
+ transition: background-color 0.15s;
32
+ margin-right: 8px;
33
+ vertical-align: middle;
34
+ }
35
+
36
+ .check-radio .toggle-check-text:after {
37
+ content: ' ';
38
+ display: block;
39
+ background: #FFF;
40
+ width: 12px;
41
+ height: 12px;
42
+ border-radius: 15px;
43
+ position: absolute;
44
+ left: 3px;
45
+ top: 3px;
46
+ transition: left 0.15s, margin-left 0.15s;
47
+ }
48
+
49
+ .check-radio .toggle-check-text:before {
50
+ content: ' ';
51
+ }
52
+
53
+ .check-radio input:checked ~ .toggle-check-text {
54
+ background: #8ad869;
55
+ padding-left: 10px;
56
+ padding-right: 17px;
57
+ }
58
+
59
+ .check-radio input:checked ~ .toggle-check-text:before {
60
+ content: ' ';
61
+ }
62
+
63
+ .check-radio input:checked ~ .toggle-check-text:after {
64
+ left: 100%;
65
+ margin-left: -16px;
66
+ }
67
+
68
+ #submitdiv.searchbox {
69
+ background: #f1f1f1;
70
+ margin-bottom: 30px;
71
+ }
72
+
73
+ .searchbox #major-publishing-actions {
74
+ background: transparent;
75
+ border: 0;
76
+ }
77
+
78
+ #submitdiv.searchbox * {
79
+ text-align: center;
80
+ }
81
+
82
+ #search-body input.button-primary,
83
+ #submitdiv.searchbox input[type="submit"] {
84
+ background: #00C366;
85
+ border: 0;
86
+ color: #FFF;
87
+ padding: 4px 18px;
88
+ vertical-align: middle;
89
+ box-shadow: none;
90
+ text-shadow: none;
91
+ line-height: 22px;
92
+ height: auto;
93
+ font-size: 13px;
94
+ width: 90%;
95
+ white-space: normal;
96
+ word-break: break-word;
97
+ }
98
+
99
+ #submitdiv.searchbox input[type="submit"]:hover {
100
+ color: #f1f1f1;
101
+ }
102
+
103
+ #submitdiv.searchbox input.delete {
104
+ background: #b74c28;
105
+ }
106
+
107
+ #submitdiv.searchbox input.copy.button {
108
+ background:#0073aa;
109
+ }
110
+
111
+ #submitdiv.searchbox #delete-action {
112
+ float: none;
113
+ margin-top: 10px;
114
+ }
115
+
116
+ #searchtbox-container-1 input.button-primary {
117
+ width: auto;
118
+ margin-top: 15px;
119
+ }
120
+
121
+ #minor-publishing-actions {
122
+ padding: 0 10px 10px;
123
+ }
124
+
125
+ .searchbox #publishing-action .spinner {
126
+ float: none;
127
+ display: none;
128
+ }
129
+
130
+ .searchbox #publishing-action .spinner.is-active {
131
+ display: inline-block;
132
+ margin-top: 0;
133
+ margin-bottom: 8px;
134
+ }
135
+
136
+ #publishing-action {
137
+ float: none;
138
+ }
139
+
140
  #submitpost input.delete {
141
  padding: 0;
142
  margin: 0;
160
  margin: 0;
161
  }
162
 
163
+ .ivory-search_page_ivory-search-settings #wpcontent,
164
+ .toplevel_page_ivory-search #wpcontent,
165
+ .ivory-search_page_ivory-search-new #wpcontent {
166
+ background: #FFF;
 
167
  }
168
 
169
+ .is-search-image {
170
+ font-size: 30px;
171
+ line-height: 1;
 
 
 
172
  }
173
 
174
+ .is-search-image::before {
175
+ content: "\f179";
176
  display: inline-block;
177
+ font-size: 30px;
178
+ line-height: 1;
179
+ font-family: dashicons;
180
+ text-decoration: inherit;
181
+ font-style: normal;
182
+ vertical-align: middle;
183
+ text-align: center;
184
+ transition: color .1s ease-in 0;
185
+ -webkit-font-smoothing: antialiased;
186
+ -moz-osx-font-smoothing: grayscale;
187
+ }
188
+
189
+ h1.wp-heading-inline {
190
+ font-size: 18px;
191
+ }
192
+
193
+ #search-body #titlediv #title {
194
+ background: #f1f1f1;
195
+ box-shadow: none;
196
+ border: 0;
197
+ }
198
+
199
+ #post-body-content {
200
+ margin-bottom: 15px;
201
+ }
202
+
203
+ #poststuff #searchtbox-container-1 {
204
+ width: 100%;
205
+ margin-left: 210px;
206
  position: relative;
207
+ max-width: 65.5%;
208
  }
209
 
210
+ #poststuff #searchtbox-container-2 {
211
+ float: right;
212
+ width: 12%;
213
  }
214
 
215
+ #informationdiv ul {
216
+ border: 1px solid #ddd;
 
217
  border-radius: 3px;
218
+ margin: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  }
220
 
221
+ #informationdiv h3 {
222
+ margin: 0;
223
+ font-weight: 400;
224
+ font-size: 15px;
225
  }
226
 
227
+ #informationdiv h3::before {
228
+ font-family: dashicons;
229
+ content: "\f534";
230
+ display: inline-block;
231
+ float: left;
232
+ font-size: 20px;
233
+ color: #82878c;
234
+ margin-right: 5px;
 
 
 
235
  }
236
 
237
+ #informationdiv ul li {
238
+ padding: 10px;
239
+ margin: 0;
240
+ border-bottom: 1px solid #ddd;
241
+ }
242
+
243
+ #informationdiv ul li:last-child {
244
+ border-bottom: 0;
245
+ }
246
+
247
+ #informationdiv li a {
248
+ text-decoration: none;
249
  }
250
 
251
+ @media only screen and (min-width: 1420px) {
252
+ #search-form-editor #search-form-editor-tabs {
253
+ max-width: 185px;
254
+ }
 
255
  }
256
 
257
+ @media only screen and (max-width: 1175px) {
258
+ #poststuff #searchtbox-container-1 {
259
+ margin-left: 170px;
260
+ }
261
+
262
+ #search-form-editor #search-form-editor-tabs {
263
+ left: -165px;
264
  }
265
 
266
+ #submitdiv.searchbox input[type="submit"] {
267
+ width: 100%;
268
+ padding: 4px 0;
269
  }
270
  }
271
 
272
+ @media only screen and (max-width: 850px) {
273
+ #search-form-editor #search-form-editor-tabs {
274
+ position: static;
275
+ max-width: 100%;
276
+ }
277
+
278
+ #poststuff #searchtbox-container-1 {
279
+ max-width: 100%;
280
+ margin: 0;
281
+ }
282
+
283
+ #searchtbox-container-1 input.button-primary {
284
+ display: none;
285
+ }
286
+
287
+ #poststuff #searchtbox-container-2 {
288
+ width: 100%;
289
+ margin-top: 25px;
290
+ }
291
+
292
+ #submitdiv.searchbox * {
293
+ text-align: left;
294
  }
295
 
296
+ #submitdiv.searchbox input[type="submit"] {
297
+ max-width: 160px;
298
+ padding: 4px 18px;
299
+ text-align: center;
300
  }
301
  }
302
 
303
+
304
+ /*
305
+ * Help
306
+ */
307
+
308
+ #search-form-editor .form-table td:last-child {
309
+ vertical-align: top;
310
+ }
311
+
312
+ .is-help {
313
+ display: block;
314
+ margin-bottom: 15px;
315
+ font-size: 13px;
316
+ position: relative;
317
+ }
318
+
319
+ .is-help .dashicons-warning {
320
+ position: absolute;
321
+ top: 0;
322
+ left: 0;
323
+ }
324
+
325
+ .is-help .is-info {
326
+ padding-left: 25px;
327
+ display: block;
328
+ }
329
+
330
+ .is-help::after {
331
+ content: "";
332
+ display: block;
333
+ clear: both;
334
+ }
335
+
336
  /*
337
  * Tabs
338
  */
339
+
340
+ #search-form-editor {
341
+ float: left;
342
+ width: 100%;
343
+ }
344
+
345
+ #search-form-editor > div {
346
+ display: none;
347
+ }
348
+
349
+ #search-form-editor + p.submit {
350
+ display: none;
351
+ }
352
+
353
+ #search-form-editor.ui-tabs + p.submit {
354
+ display: block;
355
  }
356
 
357
  #search-form-editor-tabs {
358
+ left: -210px;
359
+ position: absolute;
360
+ top: 0;
361
  margin: 0;
362
+ max-width: 26%;
363
+ width: 100%;
364
  }
365
 
366
  #search-form-editor-tabs li {
367
+ border: 1px solid #e6f1f7;
368
+ border-radius: 3px;
369
+ display: block;
 
370
  padding: 0;
371
+ margin-bottom: 3px;
372
+ outline: 0;
 
 
 
 
373
  }
374
 
375
+ #search-form-editor-tabs li:hover,
376
  #search-form-editor-tabs li.ui-tabs-active,
377
  #search-form-editor-tabs li.ui-tabs-active:hover {
378
+ background-color: #3985C4;
 
 
 
 
379
  }
380
 
381
  #search-form-editor-tabs li a {
382
+ box-shadow: none;
383
  padding: 6px 10px;
384
  font-size: 14px;
385
  font-weight: normal;
386
  line-height: 30px;
387
+ outline: 0;
388
+ color: #0073aa;
389
  text-decoration: none;
390
+ display: block;
391
  }
392
 
393
+ #search-form-editor-tabs li:hover a,
394
  #search-form-editor-tabs li.ui-tabs-active a {
395
+ color: #FFF;
 
 
396
  }
397
 
398
+ #search-form-editor-tabs li a::after {
399
+ font-family: dashicons;
400
+ content: "\f345";
401
+ display: inline-block;
402
  color: #000;
403
+ font-size: 20px;
404
+ position: absolute;
405
+ right: 5px;
406
+ }
407
+
408
+ #search-form-editor-tabs li.ui-tabs-active a::after,
409
+ #search-form-editor-tabs li:hover a::after {
410
+ color: #FFF;
411
  }
412
 
413
  #search-form-editor-tabs li a span.dashicons {
438
  padding: 0;
439
  }
440
 
441
+ .search-form-editor-box {
442
+ background-color: #f1f1f1;
 
 
443
  padding: 16px;
444
  }
445
 
446
+ h4.panel-desc {
447
+ margin-top: 0;
448
+ background: #edf8fb;
449
+ padding: 5px 15px;
450
+ color: #006799;
451
+ font-weight: 400;
452
+ border: 1px solid #cee2e8;
453
+ border-radius: 3px;
454
+ }
455
+
456
+ .form-table a {
457
+ text-decoration: none;
458
+ }
459
+
460
+ .form-table h3 {
461
+ clear: both;
462
+ cursor: pointer;
463
+ background-color: #1390cc;
464
+ color: #FFF;
465
+ padding: 8px 10px;
466
+ font-size: 1em;
467
+ border-radius: 3px 3px 0 0;
468
+ margin: 1.5em 0 0;
469
+ }
470
+
471
+ .form-table h3 .actions {
472
+ float: right;
473
  }
474
 
475
+ .form-table h3 .actions a {
476
+ color: #FFF;
477
+ text-decoration: none;
478
+ font-size: 11px;
479
+ padding: 10px;
480
+ outline: 0;
481
+ box-shadow: none;
482
+ }
483
+
484
+ .form-table h3:first-child {
485
+ margin: 0;
486
+ }
487
+
488
+ .form-table h3 .actions::after {
489
+ font-family: dashicons;
490
+ content: "\f140";
491
+ display: inline-block;
492
+ float: right;
493
+ font-size: 20px;
494
+ }
495
+
496
+ .form-table h3.ui-state-active .actions::after {
497
+ content: "\f142";
498
+ }
499
+
500
+ .form-table > div {
501
+ background-color: #FFF;
502
+ padding: 15px;
503
+ border: 1px solid #0073aa;
504
+ border-radius: 0 0 3px 3px;
505
+ }
506
+
507
+ .form-table > div::after {
508
+ content: "";
509
+ display: block;
510
+ clear: both;
511
+ }
512
+
513
+ .form-table > div > div {
514
+ background-color: #f1f1f1;
515
+ padding: 15px;
516
+ position: relative;
517
+ }
518
+
519
+ .form-table > div > div::after {
520
+ content: "";
521
+ display: block;
522
+ clear: both;
523
+ }
524
+
525
+ .form-table > div > div > p:first-of-type {
526
+ margin-top: 0;
527
+ }
528
+
529
+ .form-table > div > div > p:last-of-type {
530
+ margin-bottom: 0;
531
+ }
532
+
533
+ .upgrade-parent {
534
+ position: relative;
535
+ padding: 1em;
536
+ }
537
+
538
+ .upgrade-parent:after {
539
+ clear: both;
540
+ content: "";
541
+ display: block;
542
+ }
543
+
544
+ .upgrade-wrapper {
545
+ position: absolute;
546
+ top: 0;
547
+ left: 0;
548
+ width: 100%;
549
+ height: 100%;
550
+ text-align: center;
551
+ background: rgba(0,0,0,0.4);
552
+ z-index: 9999;
553
+ }
554
+
555
+ .upgrade-wrapper a.upgrade-link {
556
+ position: relative;
557
+ top: 35%;
558
+ color: #FFF;
559
+ box-shadow: none;
560
+ background: #00C366;
561
+ font-weight: 600;
562
+ padding: 5px 10px;
563
+ border-radius: 15px;
564
+ }
565
+ .upgrade-wrapper a.upgrade-link:hover {
566
+ background: #03ad5c;
567
  }
568
 
569
  /*
573
  .col-wrapper {
574
  float: left;
575
  margin: 0 20px 15px 0;
576
+ width: 190px;
577
  }
578
 
579
+ #search-form-editor .col-wrapper:nth-of-type(3n+0) {
580
  margin-right: 0;
581
  }
582
 
583
  .col-title {
584
  text-align: center;
585
+ }
586
+
587
+ .col-title strong {
588
+ color: #1390cc;
589
+ }
590
+
591
+ .list-search {
592
+ margin-top: 5px;
593
+ width: 100%;
594
  }
595
 
596
  .col-wrapper.after {
598
  }
599
 
600
  .col-wrapper.check-radio {
601
+ margin: 0 15px 10px 0;
602
  }
603
 
604
  #wpbody .col-wrapper select[multiple],
admin/js/ivory-search-admin.js CHANGED
@@ -45,19 +45,60 @@
45
  }
46
  }
47
  } );
 
 
 
 
 
 
 
 
48
 
49
- $( '#search-form-editor' ).on( 'change', function() {
50
- if ( ! $( '.search-form-editor-panel .is-warning' ).length ) {
51
- $( '.search-form-editor-panel' ).prepend('<div class="is-warning">Settings have changed, you should save them!</div>')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  } );
54
 
55
- $( '#search-form-editor-tabs' ).focusin( function( event ) {
56
- $( '#search-form-editor .keyboard-interaction' ).css(
57
- 'visibility', 'visible' );
58
- } ).focusout( function( event ) {
59
- $( '#search-form-editor .keyboard-interaction' ).css(
60
- 'visibility', 'hidden' );
 
 
 
 
61
  } );
62
 
63
  if ( '' === $( '#title' ).val() ) {
@@ -66,11 +107,16 @@
66
 
67
  ivory_search.titleHint();
68
 
 
 
 
 
 
 
 
69
  $( window ).on( 'beforeunload', function( event ) {
70
- console.log('beforeunload');
71
- var changed = false;
72
 
73
- $( '#is-admin-form-element :input[type!="hidden"]' ).each( function() {
74
  if ( $( this ).is( ':checkbox, :radio' ) ) {
75
  if ( this.defaultChecked != $( this ).is( ':checked' ) ) {
76
  changed = true;
45
  }
46
  }
47
  } );
48
+
49
+ $('.form-table .actions a.expand').click( function() {
50
+ $('.form-table .actions a.expand').hide();
51
+ $('.form-table .ui-accordion-content, .form-table .actions a.collapse').show();
52
+ $('.form-table .ui-accordion-content').addClass('ui-accordion-content-active');
53
+ $('.form-table h3').addClass('ui-state-active');
54
+ return false;
55
+ } );
56
 
57
+ $('.form-table .actions a.collapse').click( function() {
58
+ $('.form-table .actions a.expand').show();
59
+ $('.form-table .ui-accordion-content, .form-table .actions a.collapse').hide();
60
+ $('.form-table .ui-accordion-content').removeClass('ui-accordion-content-active');
61
+ $('.form-table h3').removeClass('ui-state-active');
62
+ return false;
63
+ } );
64
+
65
+ $( ".form-table" ).accordion( {
66
+ collapsible: true,
67
+ heightStyle: "content",
68
+ icons: false,
69
+ } );
70
+
71
+ $('#search-body option').mousedown(function(e) {
72
+ if ($(this).attr('selected')) {
73
+ $(this).removeAttr('selected');
74
+ } else {
75
+ $(this).attr('selected', 'selected' );
76
  }
77
+ return false;
78
+ } );
79
+
80
+ $( ".col-title .list-search" ).keyup(function() {
81
+ var search_val = $(this).val().toLowerCase();
82
+ var search_sel = $(this).parent().parent().find('select option');
83
+ $( search_sel ).each(function() {
84
+ if ( $(this).text().toLowerCase().indexOf( search_val ) === -1 ) {
85
+ $(this).fadeOut( 'fast' );
86
+ } else {
87
+ $(this).fadeIn( 'fast' );
88
+ }
89
+ } );
90
  } );
91
 
92
+ $( ".list-search.wide" ).keyup(function() {
93
+ var search_val = $(this).val().toLowerCase();
94
+ var search_sel = $(this).parent().find('select option');
95
+ $( search_sel ).each(function() {
96
+ if ( $(this).text().toLowerCase().indexOf( search_val ) === -1 ) {
97
+ $(this).fadeOut( 'fast' );
98
+ } else {
99
+ $(this).fadeIn( 'fast' );
100
+ }
101
+ } );
102
  } );
103
 
104
  if ( '' === $( '#title' ).val() ) {
107
 
108
  ivory_search.titleHint();
109
 
110
+ var changed = false;
111
+
112
+ $(document).on("submit", "form", function(event){
113
+ changed = false;
114
+ $(window).off('beforeunload');
115
+ } );
116
+
117
  $( window ).on( 'beforeunload', function( event ) {
 
 
118
 
119
+ $( '#search-body :input[type!="hidden"]' ).each( function() {
120
  if ( $( this ).is( ':checkbox, :radio' ) ) {
121
  if ( this.defaultChecked != $( this ).is( ':checked' ) ) {
122
  changed = true;
admin/partials/new-search-form.php CHANGED
@@ -14,7 +14,9 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  ?>
15
  <div class="wrap">
16
 
17
- <h1 class="wp-heading-inline"><?php
 
 
18
  if ( $post->initial() ) {
19
  esc_html_e( 'Add New Search Form', 'ivory-search' );
20
  } else {
@@ -56,11 +58,12 @@ if ( ! defined( 'ABSPATH' ) ) {
56
  <input type="hidden" id="active-tab" name="active-tab" value="<?php echo isset( $_GET['active-tab'] ) ? (int) $_GET['active-tab'] : '0'; ?>" />
57
 
58
  <div id="poststuff">
59
- <div id="post-body" class="metabox-holder columns-2">
 
60
  <div id="post-body-content">
61
  <div id="titlediv">
62
  <div id="titlewrap">
63
- <label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo esc_html( __( 'Enter title here', 'ivory-search' ) ); ?></label>
64
  <?php
65
  $posttitle_atts = array(
66
  'type' => 'text',
@@ -92,83 +95,7 @@ if ( ! defined( 'ABSPATH' ) ) {
92
  </div>
93
  </div><!-- #titlediv -->
94
  </div><!-- #post-body-content -->
95
-
96
- <div id="postbox-container-1" class="postbox-container">
97
- <?php if ( current_user_can( 'is_edit_search_form', $post_id ) ) : ?>
98
- <div id="submitdiv" class="postbox">
99
- <h3><?php echo esc_html( __( 'Status', 'ivory-search' ) ); ?></h3>
100
- <div class="inside">
101
- <div class="submitbox" id="submitpost">
102
-
103
- <div id="minor-publishing-actions">
104
-
105
- <div class="hidden">
106
- <input type="submit" class="button-primary" name="is_save" value="<?php echo esc_attr( __( 'Save', 'ivory-search' ) ); ?>" />
107
- </div>
108
-
109
- <?php
110
- if ( ! $post->initial() ) :
111
- $copy_nonce = wp_create_nonce( 'is-copy-search-form_' . $post_id );
112
- ?>
113
- <input type="submit" name="is-copy" class="copy button" value="<?php echo esc_attr( __( 'Duplicate', 'ivory-search' ) ); ?>" <?php echo "onclick=\"this.form._wpnonce.value = '$copy_nonce'; this.form.action.value = 'copy'; return true;\""; ?> />
114
- <?php endif; ?>
115
- </div><!-- #minor-publishing-actions -->
116
-
117
- <div id="misc-publishing-actions">
118
- <?php do_action( 'is_admin_misc_pub_section', $post_id ); ?>
119
- </div><!-- #misc-publishing-actions -->
120
-
121
- <div id="major-publishing-actions">
122
-
123
- <?php
124
- if ( ! $post->initial() && 'Default Search Form' !== $post->title() ) :
125
- $delete_nonce = wp_create_nonce( 'is-delete-search-form_' . $post_id );
126
- ?>
127
- <div id="delete-action">
128
- <input type="submit" name="is-delete" class="delete submitdelete" value="<?php echo esc_attr( __( 'Delete', 'ivory-search' ) ); ?>" <?php echo "onclick=\"if (confirm('" . esc_js( __( "You are about to delete this search form.\n 'Cancel' to stop, 'OK' to delete.", 'ivory-search' ) ) . "')) {this.form._wpnonce.value = '$delete_nonce'; this.form.action.value = 'delete'; return true;} return false;\""; ?> />
129
- </div><!-- #delete-action -->
130
- <?php endif; ?>
131
-
132
- <div id="publishing-action">
133
- <span class="spinner"></span>
134
- <?php $this->save_button( $post_id ); ?>
135
- </div>
136
- <div class="clear"></div>
137
- </div><!-- #major-publishing-actions -->
138
- </div><!-- #submitpost -->
139
- </div>
140
- </div><!-- #submitdiv -->
141
- <?php endif; ?>
142
-
143
- <div id="informationdiv" class="postbox">
144
- <h3><?php echo esc_html( __( 'Information', 'ivory-search' ) ); ?></h3>
145
- <div class="inside">
146
- <ul>
147
- <li><a href="https://ivorysearch.com/documentation/" target="_blank"><?php _e( 'Docs', 'ivory-search' ); ?></a></li>
148
- <li><a href="https://ivorysearch.com/support/" target="_blank"><?php _e( 'Support', 'ivory-search' ); ?></a></li>
149
- <li><a href="https://ivorysearch.com/contact/" target="_blank"><?php _e( 'Contact', 'ivory-search' ); ?></a></li>
150
- <li><a href="https://wordpress.org/support/plugin/add-search-to-menu/reviews/?filter=5#new-post" target="_blank"><?php _e( 'Give us a rating', 'ivory-search' ); ?></a></li>
151
- </ul>
152
- </div>
153
- </div><!-- #informationdiv -->
154
-
155
- </div><!-- #postbox-container-1 -->
156
-
157
- <div id="postbox-container-2" class="postbox-container">
158
  <div id="search-form-editor">
159
- <div class="keyboard-interaction"><?php
160
- echo sprintf(
161
- /* translators: 1: ◀ ▶ dashicon, 2: screen reader text for the dashicon */
162
- esc_html( __( '%1$s %2$s keys switch panels', 'ivory-search' ) ),
163
- '<span class="dashicons dashicons-leftright" aria-hidden="true"></span>',
164
- sprintf(
165
- '<span class="screen-reader-text">%s</span>',
166
- /* translators: screen reader text */
167
- esc_html( __( '(left and right arrow)', 'ivory-search' ) )
168
- )
169
- );
170
- ?></div>
171
-
172
  <?php
173
 
174
  $editor = new IS_Search_Editor( $post );
@@ -185,7 +112,7 @@ if ( ! defined( 'ABSPATH' ) ) {
185
  'callback' => 'excludes_panel',
186
  ),
187
  'settings' => array(
188
- 'title' => __( 'Settings', 'ivory-search' ),
189
  'callback' => 'settings_panel',
190
  ),
191
  );
@@ -205,9 +132,61 @@ if ( ! defined( 'ABSPATH' ) ) {
205
  <p class="submit"><?php $this->save_button( $post_id ); ?></p>
206
  <?php endif; ?>
207
 
208
- </div><!-- #postbox-container-2 -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
 
210
- </div><!-- #post-body -->
 
211
  <br class="clear" />
212
  </div><!-- #poststuff -->
213
  </form>
14
  ?>
15
  <div class="wrap">
16
 
17
+ <h1 class="wp-heading-inline">
18
+ <span class="is-search-image"></span>
19
+ <?php
20
  if ( $post->initial() ) {
21
  esc_html_e( 'Add New Search Form', 'ivory-search' );
22
  } else {
58
  <input type="hidden" id="active-tab" name="active-tab" value="<?php echo isset( $_GET['active-tab'] ) ? (int) $_GET['active-tab'] : '0'; ?>" />
59
 
60
  <div id="poststuff">
61
+ <div id="search-body" class="metabox-holder columns-2">
62
+ <div id="searchtbox-container-1" class="postbox-container">
63
  <div id="post-body-content">
64
  <div id="titlediv">
65
  <div id="titlewrap">
66
+ <label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo esc_html( __( 'Enter search form name', 'ivory-search' ) ); ?></label>
67
  <?php
68
  $posttitle_atts = array(
69
  'type' => 'text',
95
  </div>
96
  </div><!-- #titlediv -->
97
  </div><!-- #post-body-content -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  <div id="search-form-editor">
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  <?php
100
 
101
  $editor = new IS_Search_Editor( $post );
112
  'callback' => 'excludes_panel',
113
  ),
114
  'settings' => array(
115
+ 'title' => __( 'Options', 'ivory-search' ),
116
  'callback' => 'settings_panel',
117
  ),
118
  );
132
  <p class="submit"><?php $this->save_button( $post_id ); ?></p>
133
  <?php endif; ?>
134
 
135
+ </div><!-- #searchtbox-container-1 -->
136
+ <div id="searchtbox-container-2" class="postbox-container">
137
+ <?php if ( current_user_can( 'is_edit_search_form', $post_id ) ) : ?>
138
+ <div id="submitdiv" class="searchbox">
139
+ <div class="inside">
140
+ <div class="submitbox" id="submitpost">
141
+
142
+ <div id="major-publishing-actions">
143
+
144
+ <div id="publishing-action">
145
+ <span class="spinner"></span>
146
+ <?php $this->save_button( $post_id ); ?>
147
+ </div>
148
+ <?php
149
+ if ( ! $post->initial() && 'Default Search Form' !== $post->title() ) :
150
+ $delete_nonce = wp_create_nonce( 'is-delete-search-form_' . $post_id );
151
+ ?>
152
+ <div id="delete-action">
153
+ <input type="submit" name="is-delete" class="delete submitdelete" value="<?php echo esc_attr( __( 'Delete', 'ivory-search' ) ); ?>" <?php echo "onclick=\"if (confirm('" . esc_js( __( "You are about to delete this search form.\n 'Cancel' to stop, 'OK' to delete.", 'ivory-search' ) ) . "')) {this.form._wpnonce.value = '$delete_nonce'; this.form.action.value = 'delete'; return true;} return false;\""; ?> />
154
+ </div><!-- #delete-action -->
155
+ <?php endif; ?>
156
+ <div class="clear"></div>
157
+ </div><!-- #major-publishing-actions -->
158
+ <?php if ( ! $post->initial() ) : ?>
159
+ <div id="minor-publishing-actions">
160
+
161
+ <div class="hidden">
162
+ <input type="submit" class="button-primary" name="is_save" value="<?php echo esc_attr( __( 'Save', 'ivory-search' ) ); ?>" />
163
+ </div>
164
+
165
+ <?php
166
+ $copy_nonce = wp_create_nonce( 'is-copy-search-form_' . $post_id );
167
+ ?>
168
+ <input type="submit" name="is-copy" class="copy button" value="<?php echo esc_attr( __( 'Duplicate', 'ivory-search' ) ); ?>" <?php echo "onclick=\"this.form._wpnonce.value = '$copy_nonce'; this.form.action.value = 'copy'; return true;\""; ?> />
169
+ </div><!-- #minor-publishing-actions -->
170
+ <?php endif; ?>
171
+ </div><!-- #submitpost -->
172
+ </div>
173
+ </div><!-- #submitdiv -->
174
+ <?php endif; ?>
175
+
176
+ <div id="informationdiv" class="searchbox">
177
+ <h3><?php echo esc_html( __( 'Information', 'ivory-search' ) ); ?></h3>
178
+ <div class="inside">
179
+ <ul>
180
+ <li><a href="https://ivorysearch.com/documentation/" target="_blank"><?php _e( 'Docs', 'ivory-search' ); ?></a></li>
181
+ <li><a href="https://ivorysearch.com/support/" target="_blank"><?php _e( 'Support', 'ivory-search' ); ?></a></li>
182
+ <li><a href="https://ivorysearch.com/contact/" target="_blank"><?php _e( 'Contact', 'ivory-search' ); ?></a></li>
183
+ <li><a href="https://wordpress.org/support/plugin/add-search-to-menu/reviews/?filter=5#new-post" target="_blank"><?php _e( 'Give us a rating', 'ivory-search' ); ?></a></li>
184
+ </ul>
185
+ </div>
186
+ </div><!-- #informationdiv -->
187
 
188
+ </div><!-- #searchtbox-container-2 -->
189
+ </div><!-- #search-body -->
190
  <br class="clear" />
191
  </div><!-- #poststuff -->
192
  </form>
admin/partials/settings-form.php CHANGED
@@ -15,72 +15,30 @@ if ( ! defined( 'ABSPATH' ) ) {
15
 
16
  <div class="wrap">
17
 
18
- <h1 class="wp-heading-inline"><?php esc_html_e( 'Ivory Search Settings', 'ivory-search' ); ?></h1>
 
 
 
19
 
20
  <hr class="wp-header-end">
21
 
22
  <?php do_action( 'is_admin_notices' ); ?>
 
23
 
24
  <div id="poststuff">
25
- <div id="post-body" class="metabox-holder columns-2">
26
  <form id="ivory_search_options" action="options.php" method="post">
27
- <div id="postbox-container-1" class="postbox-container">
28
- <?php if ( current_user_can( 'is_edit_search_form' ) ) : ?>
29
- <div id="submitdiv" class="postbox">
30
- <h3><?php echo esc_html( __( 'Status', 'ivory-search' ) ); ?></h3>
31
- <div class="inside">
32
- <div class="submitbox" id="submitpost">
33
- <div id="major-publishing-actions">
34
- <div id="publishing-action">
35
- <span class="spinner"></span>
36
- <?php submit_button( 'Save', 'primary', 'ivory_search_options_submit', false ); ?>
37
- </div>
38
- <div class="clear"></div>
39
- </div><!-- #major-publishing-actions -->
40
- </div><!-- #submitpost -->
41
- </div>
42
- </div><!-- #submitdiv -->
43
- <?php endif; ?>
44
-
45
- <div id="informationdiv" class="postbox">
46
- <h3><?php echo esc_html( __( 'Information', 'ivory-search' ) ); ?></h3>
47
- <div class="inside">
48
- <ul>
49
- <li><a href="https://ivorysearch.com/documentation/" target="_blank"><?php _e( 'Docs', 'ivory-search' ); ?></a></li>
50
- <li><a href="https://ivorysearch.com/support/" target="_blank"><?php _e( 'Support', 'ivory-search' ); ?></a></li>
51
- <li><a href="https://ivorysearch.com/contact/" target="_blank"><?php _e( 'Contact', 'ivory-search' ); ?></a></li>
52
- <li><a href="https://wordpress.org/support/plugin/add-search-to-menu/reviews/?filter=5#new-post" target="_blank"><?php _e( 'Give us a rating', 'ivory-search' ); ?></a></li>
53
- </ul>
54
- </div>
55
- </div><!-- #informationdiv -->
56
- </div><!-- #postbox-container-1 -->
57
-
58
- <div id="postbox-container-2" class="postbox-container">
59
  <div id="search-form-editor">
60
- <div class="keyboard-interaction"><?php
61
- echo sprintf(
62
- /* translators: 1: ◀ ▶ dashicon, 2: screen reader text for the dashicon */
63
- esc_html( __( '%1$s %2$s keys switch panels', 'ivory-search' ) ),
64
- '<span class="dashicons dashicons-leftright" aria-hidden="true"></span>',
65
- sprintf(
66
- '<span class="screen-reader-text">%s</span>',
67
- /* translators: screen reader text */
68
- esc_html( __( '(left and right arrow)', 'ivory-search' ) )
69
- )
70
- );
71
- ?></div>
72
-
73
  <?php
74
  settings_fields( 'ivory_search' );
75
  $activetab = isset( $_GET['active-tab'] ) ? (int) $_GET['active-tab'] : '0';
76
  echo '<input type="hidden" id="active-tab" name="active-tab" value="'. $activetab .'" />';
77
 
78
- echo '<ul id="search-form-editor-tabs">';
79
-
80
  $panels = array(
81
  'search-to-menu' => array(
82
  'search-to-menu',
83
- 'Search To Menu',
84
  ),
85
  'settings' => array(
86
  'settings',
@@ -88,14 +46,17 @@ if ( ! defined( 'ABSPATH' ) ) {
88
  )
89
  );
90
 
 
 
91
  foreach ( $panels as $id => $panel ) {
92
  echo sprintf( '<li id="%1$s-tab"><a href="#%1$s">%2$s</a></li>',
93
  esc_attr( $panel[0] ), esc_html( $panel[1] ) );
94
  }
95
 
96
  echo '</ul>';
97
- echo '<div class="search-form-editor-panel" id="search-to-menu">';
98
- do_settings_sections( 'ivory_search' );
 
99
  echo '</div>';
100
  ?>
101
  </div><!-- #search-form-editor -->
@@ -104,7 +65,36 @@ if ( ! defined( 'ABSPATH' ) ) {
104
  submit_button( 'Save', 'primary', 'ivory_search_options_submit' );
105
  endif; ?>
106
 
107
- </div><!-- #postbox-container-2 -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  </form>
109
  </div><!-- #post-body -->
110
  <br class="clear" />
15
 
16
  <div class="wrap">
17
 
18
+ <h1 class="wp-heading-inline">
19
+ <span class="is-search-image"></span>
20
+ <?php esc_html_e( 'Ivory Search Settings', 'ivory-search' ); ?>
21
+ </h1>
22
 
23
  <hr class="wp-header-end">
24
 
25
  <?php do_action( 'is_admin_notices' ); ?>
26
+ <?php settings_errors(); ?>
27
 
28
  <div id="poststuff">
29
+ <div id="search-body" class="metabox-holder columns-2">
30
  <form id="ivory_search_options" action="options.php" method="post">
31
+ <div id="searchtbox-container-1" class="postbox-container">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  <div id="search-form-editor">
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  <?php
34
  settings_fields( 'ivory_search' );
35
  $activetab = isset( $_GET['active-tab'] ) ? (int) $_GET['active-tab'] : '0';
36
  echo '<input type="hidden" id="active-tab" name="active-tab" value="'. $activetab .'" />';
37
 
 
 
38
  $panels = array(
39
  'search-to-menu' => array(
40
  'search-to-menu',
41
+ 'Menu Search',
42
  ),
43
  'settings' => array(
44
  'settings',
46
  )
47
  );
48
 
49
+ echo '<ul id="search-form-editor-tabs">';
50
+
51
  foreach ( $panels as $id => $panel ) {
52
  echo sprintf( '<li id="%1$s-tab"><a href="#%1$s">%2$s</a></li>',
53
  esc_attr( $panel[0] ), esc_html( $panel[1] ) );
54
  }
55
 
56
  echo '</ul>';
57
+ echo '<div class="search-form-editor-panel" id="search-to-menu">';
58
+ $settings_fields = IS_Settings_Fields::getInstance();
59
+ $settings_fields->is_do_settings_sections( 'ivory_search' );
60
  echo '</div>';
61
  ?>
62
  </div><!-- #search-form-editor -->
65
  submit_button( 'Save', 'primary', 'ivory_search_options_submit' );
66
  endif; ?>
67
 
68
+ </div><!-- #searchtbox-container-1 -->
69
+ <div id="searchtbox-container-2" class="postbox-container">
70
+ <?php if ( current_user_can( 'is_edit_search_form' ) ) : ?>
71
+ <div id="submitdiv" class="searchbox">
72
+ <div class="inside">
73
+ <div class="submitbox" id="submitpost">
74
+ <div id="major-publishing-actions">
75
+ <div id="publishing-action">
76
+ <span class="spinner"></span>
77
+ <?php submit_button( 'Save', 'primary', 'ivory_search_options_submit', false ); ?>
78
+ </div>
79
+ <div class="clear"></div>
80
+ </div><!-- #major-publishing-actions -->
81
+ </div><!-- #submitpost -->
82
+ </div>
83
+ </div><!-- #submitdiv -->
84
+ <?php endif; ?>
85
+
86
+ <div id="informationdiv" class="searchbox">
87
+ <h3><?php echo esc_html( __( 'Information', 'ivory-search' ) ); ?></h3>
88
+ <div class="inside">
89
+ <ul>
90
+ <li><a href="https://ivorysearch.com/documentation/" target="_blank"><?php _e( 'Docs', 'ivory-search' ); ?></a></li>
91
+ <li><a href="https://ivorysearch.com/support/" target="_blank"><?php _e( 'Support', 'ivory-search' ); ?></a></li>
92
+ <li><a href="https://ivorysearch.com/contact/" target="_blank"><?php _e( 'Contact', 'ivory-search' ); ?></a></li>
93
+ <li><a href="https://wordpress.org/support/plugin/add-search-to-menu/reviews/?filter=5#new-post" target="_blank"><?php _e( 'Give us a rating', 'ivory-search' ); ?></a></li>
94
+ </ul>
95
+ </div>
96
+ </div><!-- #informationdiv -->
97
+ </div><!-- #searchtbox-container-2 -->
98
  </form>
99
  </div><!-- #post-body -->
100
  <br class="clear" />
includes/class-is-search-form.php CHANGED
@@ -13,8 +13,6 @@ class IS_Search_Form {
13
  private $is_locale;
14
  private $properties = array();
15
  private $unit_tag;
16
- private $responses_count = 0;
17
- private $shortcode_atts = array();
18
 
19
  private function __construct( $post = null ) {
20
  $post = get_post( $post );
@@ -259,204 +257,30 @@ class IS_Search_Form {
259
  /* Generating Form HTML */
260
 
261
  public function form_html( $args = '' ) {
262
- $args = wp_parse_args( $args, array(
263
- 'html_id' => '',
264
- 'html_name' => '',
265
- 'html_class' => '',
266
- 'output' => 'form',
267
- ) );
268
-
269
- $this->shortcode_atts = $args;
270
-
271
- if ( 'raw_form' == $args['output'] ) {
272
- return '<pre class="is-raw-form"><code>'
273
- . esc_html( $this->prop( 'form' ) ) . '</code></pre>';
274
- }
275
-
276
- $this->unit_tag = self::get_unit_tag( $this->id );
277
 
278
- $lang_tag = str_replace( '_', '-', $this->locale );
279
 
280
- if ( preg_match( '/^([a-z]+-[a-z]+)-/i', $lang_tag, $matches ) ) {
281
- $lang_tag = $matches[1];
282
- }
283
 
284
- $html = '';
285
- $html = apply_filters( 'is_before_search_form', $html );
286
-
287
- $html .= sprintf( '<div %s>',
288
- IS_Admin_Public::format_atts( array(
289
- 'role' => 'form',
290
- 'class' => 'ivory-search search-form',
291
- 'id' => $this->unit_tag,
292
- ( get_option( 'html_type' ) == 'text/html' ) ? 'lang' : 'xml:lang'
293
- => $lang_tag,
294
- 'dir' => is_rtl( $this->locale ) ? 'rtl' : 'ltr',
295
- ) )
296
- );
297
-
298
- $html .= "\n" . $this->screen_reader_response() . "\n";
299
-
300
- $url = $this->get_request_uri();
301
-
302
- if ( $frag = strstr( $url, '#' ) ) {
303
- $url = substr( $url, 0, -strlen( $frag ) );
304
- }
305
 
306
- $url .= '#' . $this->unit_tag;
307
-
308
- $url = apply_filters( 'is_form_action_url', $url );
309
-
310
- $id_attr = apply_filters( 'is_form_id_attr',
311
- preg_replace( '/[^A-Za-z0-9:._-]/', '', $args['html_id'] ) );
312
-
313
- $name_attr = apply_filters( 'is_form_name_attr',
314
- preg_replace( '/[^A-Za-z0-9:._-]/', '', $args['html_name'] ) );
315
-
316
- $class = 'ivory-search-form search-form searchform';
317
-
318
- if ( $args['html_class'] ) {
319
- $class .= ' ' . $args['html_class'];
320
- }
321
-
322
- $class = explode( ' ', $class );
323
- $class = array_map( 'sanitize_html_class', $class );
324
- $class = array_filter( $class );
325
- $class = array_unique( $class );
326
- $class = implode( ' ', $class );
327
- $class = apply_filters( 'is_form_class_attr', $class );
328
-
329
- $enctype = apply_filters( 'is_form_enctype', '' );
330
- $autocomplete = apply_filters( 'is_form_autocomplete', '' );
331
-
332
- $atts = array(
333
- 'role' => 'search',
334
- 'action' => esc_url( home_url( '/' ) ),
335
- 'method' => 'get',
336
- 'class' => $class,
337
- 'id' => 'searchform',
338
- 'enctype' => $this->enctype_value( $enctype ),
339
- 'autocomplete' => $autocomplete,
340
- );
341
-
342
- if ( '' !== $id_attr ) {
343
- $atts['id'] = $id_attr;
344
- }
345
-
346
- if ( '' !== $name_attr ) {
347
- $atts['name'] = $name_attr;
348
- }
349
-
350
- $atts = IS_Admin_Public::format_atts( $atts );
351
-
352
- $html .= sprintf( '<form %s>', $atts ) . "\n";
353
-
354
- $format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';
355
-
356
- if ( 'html5' == $format ) {
357
- $html .= '<label>
358
- <span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
359
- <input type="search" class="search-field" placeholder="' . esc_attr_x( 'Search &hellip;', 'placeholder' ) . '" value="' . get_search_query() . '" name="s" />
360
- </label>
361
- <input type="submit" class="search-submit" id="searchsubmit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />';
362
- } else {
363
- $html .= '<label class="screen-reader-text" for="s">' . _x( 'Search for:', 'label' ) . '</label>
364
- <input type="text" value="' . get_search_query() . '" name="s" id="s" />
365
- <input type="submit" class="search-submit" id="searchsubmit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />';
366
- }
367
-
368
- $html .= $this->form_hidden_fields();
369
-
370
- if ( ! $this->responses_count ) {
371
- $html .= $this->form_response_output();
372
- }
373
-
374
- $html = apply_filters( 'is_search_form', $html );
375
-
376
- $html .= '</form>';
377
- $html .= '</div>';
378
-
379
- $html = apply_filters( 'is_after_search_form', $html );
380
-
381
- return $html;
382
- }
383
-
384
- private function form_hidden_fields() {
385
- $hidden_fields = array(
386
- 'id' => $this->id(),
387
- );
388
 
389
  $_includes = $this->prop( '_is_includes' );
390
 
391
  if ( isset( $_includes['post_type_qs'] ) && 'none' !== $_includes['post_type_qs'] ) {
392
- $hidden_fields = array_merge ( $hidden_fields, array( 'post_type' => $_includes['post_type_qs'] ) );
393
  }
394
 
395
- $hidden_fields += (array) apply_filters(
396
- 'is_form_hidden_fields', array() );
397
-
398
- $content = '';
399
-
400
- foreach ( $hidden_fields as $name => $value ) {
401
- $content .= sprintf(
402
- '<input type="hidden" name="%1$s" value="%2$s" />',
403
- esc_attr( $name ), esc_attr( $value ) ) . "\n";
404
  }
405
 
406
- return '<div style="display: none;">' . "\n" . $content . '</div>' . "\n";
407
  }
408
 
409
- public function form_response_output() {
410
- $class = 'is-response-output';
411
- $role = '';
412
- $content = '';
413
-
414
- if ( $this->is_posted() ) { // Post response output for non-AJAX
415
- $role = 'alert';
416
- } else {
417
- $class .= ' is-display-none';
418
- }
419
-
420
- $atts = array(
421
- 'class' => trim( $class ),
422
- 'role' => trim( $role ),
423
- );
424
-
425
- $atts = IS_Admin_Public::format_atts( $atts );
426
-
427
- $output = sprintf( '<div %1$s>%2$s</div>',
428
- $atts, esc_html( $content ) );
429
-
430
- $output = apply_filters( 'is_form_response_output',
431
- $output, $class, $content, $this );
432
-
433
- $this->responses_count += 1;
434
-
435
- return $output;
436
- }
437
-
438
- public function screen_reader_response() {
439
- $class = 'screen-reader-response';
440
- $role = '';
441
- $content = '';
442
-
443
- if ( $this->is_posted() ) { // Post response output for non-AJAX
444
- $role = 'alert';
445
- }
446
-
447
- $atts = array(
448
- 'class' => trim( $class ),
449
- 'role' => trim( $role ) );
450
-
451
- $atts = IS_Admin_Public::format_atts( $atts );
452
-
453
- $output = sprintf( '<div %1$s>%2$s</div>',
454
- $atts, $content );
455
-
456
- return $output;
457
- }
458
-
459
-
460
  /* Settings */
461
 
462
  public function setting( $name, $max = 1 ) {
@@ -620,39 +444,4 @@ class IS_Search_Form {
620
  return $output;
621
  }
622
 
623
- function get_request_uri() {
624
- static $request_uri = '';
625
-
626
- if ( empty( $request_uri ) ) {
627
- $request_uri = add_query_arg( array() );
628
- }
629
-
630
- return esc_url_raw( $request_uri );
631
- }
632
-
633
- function enctype_value( $enctype ) {
634
- $enctype = trim( $enctype );
635
-
636
- if ( empty( $enctype ) ) {
637
- return '';
638
- }
639
-
640
- $valid_enctypes = array(
641
- 'application/x-www-form-urlencoded',
642
- 'multipart/form-data',
643
- 'text/plain',
644
- );
645
-
646
- if ( in_array( $enctype, $valid_enctypes ) ) {
647
- return $enctype;
648
- }
649
-
650
- $pattern = '%^enctype="(' . implode( '|', $valid_enctypes ) . ')"$%';
651
-
652
- if ( preg_match( $pattern, $enctype, $matches ) ) {
653
- return $matches[1]; // for back-compat
654
- }
655
-
656
- return '';
657
- }
658
  }
13
  private $is_locale;
14
  private $properties = array();
15
  private $unit_tag;
 
 
16
 
17
  private function __construct( $post = null ) {
18
  $post = get_post( $post );
257
  /* Generating Form HTML */
258
 
259
  public function form_html( $args = '' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
 
261
+ do_action( 'pre_is_get_search_form' );
262
 
263
+ remove_filter( 'get_search_form', array( IS_Public::getInstance(), 'get_search_form' ), 99 );
264
+ $form = get_search_form( false );
265
+ add_filter( 'get_search_form', array( IS_Public::getInstance(), 'get_search_form' ), 99 );
266
 
267
+ $result = apply_filters( 'is_search_form', $form );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
 
269
+ $result = preg_replace('/<\/form>/', '<input type="hidden" name="id" value="' . $args['id'] . '" /></form>', $result );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
 
271
  $_includes = $this->prop( '_is_includes' );
272
 
273
  if ( isset( $_includes['post_type_qs'] ) && 'none' !== $_includes['post_type_qs'] ) {
274
+ $result = preg_replace('/<\/form>/', '<input type="hidden" name="post_type" value="' . $_includes['post_type_qs'] . '" /></form>', $result );
275
  }
276
 
277
+ if ( null === $result ) {
278
+ $result = $form;
 
 
 
 
 
 
 
279
  }
280
 
281
+ return $result;
282
  }
283
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  /* Settings */
285
 
286
  public function setting( $name, $max = 1 ) {
444
  return $output;
445
  }
446
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  }
includes/class-is.php CHANGED
@@ -128,6 +128,7 @@ class IS_Loader {
128
  private function public_hooks() {
129
 
130
  $public = IS_Public::getInstance();
 
131
  add_action( 'init', array( $public, 'init' ) );
132
  add_filter( 'get_search_form', array( $public, 'get_search_form' ), 99 );
133
 
@@ -152,7 +153,6 @@ class IS_Loader {
152
  add_filter( 'wp_nav_menu_items', array( $public, 'wp_nav_menu_items' ), 99, 2 );
153
  }
154
 
155
- /* Requests distinct results */
156
  add_filter( 'posts_distinct_request', array( $public, 'posts_distinct_request' ) );
157
  add_filter( 'posts_join' , array( $public, 'posts_join' ) );
158
  add_filter( 'posts_search', array( $public, 'posts_search' ), 501, 2 );
128
  private function public_hooks() {
129
 
130
  $public = IS_Public::getInstance();
131
+
132
  add_action( 'init', array( $public, 'init' ) );
133
  add_filter( 'get_search_form', array( $public, 'get_search_form' ), 99 );
134
 
153
  add_filter( 'wp_nav_menu_items', array( $public, 'wp_nav_menu_items' ), 99, 2 );
154
  }
155
 
 
156
  add_filter( 'posts_distinct_request', array( $public, 'posts_distinct_request' ) );
157
  add_filter( 'posts_join' , array( $public, 'posts_join' ) );
158
  add_filter( 'posts_search', array( $public, 'posts_search' ), 501, 2 );
includes/freemius.php CHANGED
@@ -18,18 +18,23 @@ function is_fs()
18
  // Include Freemius SDK.
19
  require_once dirname( __FILE__ ) . '/freemius/start.php';
20
  $is_fs = fs_dynamic_init( array(
21
- 'id' => '2086',
22
- 'slug' => 'add-search-to-menu',
23
- 'type' => 'plugin',
24
- 'public_key' => 'pk_e05b040b84ff5014d0f0955127743',
25
- 'is_premium' => false,
26
- 'has_addons' => false,
27
- 'has_paid_plans' => true,
28
- 'menu' => array(
 
 
 
 
 
29
  'slug' => 'ivory-search',
30
  'support' => false,
31
  ),
32
- 'is_live' => true,
33
  ) );
34
  }
35
 
18
  // Include Freemius SDK.
19
  require_once dirname( __FILE__ ) . '/freemius/start.php';
20
  $is_fs = fs_dynamic_init( array(
21
+ 'id' => '2086',
22
+ 'slug' => 'add-search-to-menu',
23
+ 'type' => 'plugin',
24
+ 'public_key' => 'pk_e05b040b84ff5014d0f0955127743',
25
+ 'is_premium' => false,
26
+ 'has_addons' => false,
27
+ 'has_paid_plans' => true,
28
+ 'has_affiliation' => 'selected',
29
+ 'trial' => array(
30
+ 'days' => 7,
31
+ 'is_require_payment' => false,
32
+ ),
33
+ 'menu' => array(
34
  'slug' => 'ivory-search',
35
  'support' => false,
36
  ),
37
+ 'is_live' => true,
38
  ) );
39
  }
40
 
languages/default.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ivory Search\n"
4
- "POT-Creation-Date: 2018-08-06 22:27+0530\n"
5
- "PO-Revision-Date: 2018-08-06 22:27+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Ivory Search <admin@ivorysearch.com>\n"
8
  "Language: en_US\n"
@@ -21,8 +21,8 @@ msgid "The changes you made will be lost if you navigate away from this page."
21
  msgstr ""
22
 
23
  #: ../admin/class-is-admin.php:94 ../admin/class-is-help.php:111
24
- #: ../admin/partials/new-search-form.php:148
25
- #: ../admin/partials/settings-form.php:50
26
  msgid "Support"
27
  msgstr ""
28
 
@@ -68,25 +68,24 @@ msgid "Ivory Search"
68
  msgstr ""
69
 
70
  #: ../admin/class-is-admin.php:257 ../admin/class-is-admin.php:295
71
- #: ../includes/class-is-search-form.php:61
72
  msgid "Search Forms"
73
  msgstr ""
74
 
75
- #: ../admin/class-is-admin.php:260 ../admin/partials/new-search-form.php:19
76
  msgid "Add New Search Form"
77
  msgstr ""
78
 
79
  #: ../admin/class-is-admin.php:260 ../admin/class-is-admin.php:302
80
- #: ../admin/partials/new-search-form.php:29
81
  msgid "Add New"
82
  msgstr ""
83
 
84
- #: ../admin/class-is-admin.php:263 ../admin/partials/settings-form.php:18
85
  msgid "Ivory Search Settings"
86
  msgstr ""
87
 
88
- #: ../admin/class-is-admin.php:263 ../admin/class-is-help.php:45
89
- #: ../admin/class-is-help.php:64 ../admin/partials/new-search-form.php:188
90
  msgid "Settings"
91
  msgstr ""
92
 
@@ -115,145 +114,194 @@ msgstr ""
115
  msgid "Error in deleting."
116
  msgstr ""
117
 
118
- #: ../admin/class-is-admin.php:689 ../admin/partials/new-search-form.php:106
119
- msgid "Save"
120
  msgstr ""
121
 
122
- #: ../admin/class-is-admin.php:702
123
- msgid "Unlock"
124
  msgstr ""
125
 
126
- #: ../admin/class-is-editor.php:92
127
  msgid "Configure the below options to make specific content searchable."
128
  msgstr ""
129
 
130
- #: ../admin/class-is-editor.php:99 ../admin/class-is-editor.php:140
131
- #: ../admin/class-is-settings-fields.php:75
132
- #: ../admin/class-is-settings-fields.php:174
133
  msgid "Post Types"
134
  msgstr ""
135
 
136
- #: ../admin/class-is-editor.php:119
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  msgid "Search in post title."
138
  msgstr ""
139
 
140
- #: ../admin/class-is-editor.php:122
141
  msgid "Search in post content."
142
  msgstr ""
143
 
144
- #: ../admin/class-is-editor.php:125
145
  msgid "Search in post excerpt."
146
  msgstr ""
147
 
148
- #: ../admin/class-is-editor.php:128
149
  msgid "None"
150
  msgstr ""
151
 
152
- #: ../admin/class-is-editor.php:132
153
  msgid ""
154
  "Display this post type in the search query URL and restrict search to it."
155
  msgstr ""
156
 
157
- #: ../admin/class-is-editor.php:134 ../admin/class-is-settings-fields.php:169
158
  msgid "No post types registered on your site."
159
  msgstr ""
160
 
161
- #: ../admin/class-is-editor.php:141
162
- msgid "Select post types that you want to make searchable."
163
  msgstr ""
164
 
165
- #: ../admin/class-is-editor.php:149 ../admin/class-is-editor.php:203
166
- #: ../admin/class-is-editor.php:573 ../admin/class-is-editor.php:607
167
- msgid "Taxonomy Terms"
 
 
 
 
 
 
 
 
 
 
 
168
  msgstr ""
169
 
170
- #: ../admin/class-is-editor.php:183 ../admin/class-is-editor.php:229
171
- #: ../admin/class-is-editor.php:487 ../admin/class-is-editor.php:559
172
- #: ../admin/class-is-editor.php:599 ../admin/class-is-editor.php:635
173
- #: ../admin/class-is-editor.php:785
 
 
 
 
 
 
 
174
  msgid "Press CTRL key to select multiple terms or deselect them."
175
  msgstr ""
176
 
177
- #: ../admin/class-is-editor.php:187
178
  msgid "AND - Search posts having all the above selected terms."
179
  msgstr ""
180
 
181
- #: ../admin/class-is-editor.php:189
182
  msgid "OR - Search posts having any one of the above selected terms."
183
  msgstr ""
184
 
185
- #: ../admin/class-is-editor.php:192
186
  msgid "Search in taxonomy terms title."
187
  msgstr ""
188
 
189
- #: ../admin/class-is-editor.php:195
190
  msgid "Search in taxonomy terms description."
191
  msgstr ""
192
 
193
- #: ../admin/class-is-editor.php:197 ../admin/class-is-editor.php:601
194
  msgid "No taxonomies registered for slected post types."
195
  msgstr ""
196
 
197
- #: ../admin/class-is-editor.php:204
198
- msgid ""
199
- "The non empty terms created in the registered taxonomies of above selected "
200
- "post types display here."
201
  msgstr ""
202
 
203
- #: ../admin/class-is-editor.php:205
204
- msgid ""
205
- "Select terms here to restrict search to the posts having selected terms."
206
  msgstr ""
207
 
208
- #: ../admin/class-is-editor.php:212 ../admin/class-is-editor.php:235
209
- #: ../admin/class-is-editor.php:616 ../admin/class-is-editor.php:641
210
- msgid "Custom Fields"
211
  msgstr ""
212
 
213
- #: ../admin/class-is-editor.php:236
214
- msgid "Select custom fields to make their values searchable."
215
  msgstr ""
216
 
217
- #: ../admin/class-is-editor.php:243 ../admin/class-is-editor.php:265
218
- #: ../admin/class-is-editor.php:649 ../admin/class-is-editor.php:671
219
- msgid "WooCommerce"
220
  msgstr ""
221
 
222
- #: ../admin/class-is-editor.php:256
223
  msgid "Search in WooCommerce products SKU."
224
  msgstr ""
225
 
226
- #: ../admin/class-is-editor.php:259 ../admin/class-is-editor.php:665
227
  msgid "WooCommerce product post type is not included in search."
228
  msgstr ""
229
 
230
- #: ../admin/class-is-editor.php:266
231
- msgid "Configure WooCommerce products search options here."
232
  msgstr ""
233
 
234
- #: ../admin/class-is-editor.php:273 ../admin/class-is-editor.php:317
235
- #: ../admin/class-is-editor.php:679 ../admin/class-is-editor.php:718
236
- msgid "Authors"
237
  msgstr ""
238
 
239
- #: ../admin/class-is-editor.php:308
240
  msgid ""
241
  "Search has been already limited by excluding specific authors posts in the "
242
  "Excludes section."
243
  msgstr ""
244
 
245
- #: ../admin/class-is-editor.php:313
246
  msgid ""
247
  "Search in author Display name and display the posts created by that author."
248
  msgstr ""
249
 
250
- #: ../admin/class-is-editor.php:318
251
- msgid "Make specific author posts searchable."
252
  msgstr ""
253
 
254
- #: ../admin/class-is-editor.php:326 ../admin/class-is-editor.php:354
255
- #: ../admin/class-is-editor.php:726 ../admin/class-is-editor.php:757
256
- msgid "Post Status"
257
  msgstr ""
258
 
259
  #: ../admin/class-is-editor.php:348
@@ -263,22 +311,22 @@ msgid ""
263
  msgstr ""
264
 
265
  #: ../admin/class-is-editor.php:355
266
- msgid "Configure options to search posts having specific post statuses."
267
  msgstr ""
268
 
269
- #: ../admin/class-is-editor.php:362 ../admin/class-is-editor.php:392
270
- msgid "Comments"
271
  msgstr ""
272
 
273
- #: ../admin/class-is-editor.php:373
274
  msgid "The search operator to compare comments count."
275
  msgstr ""
276
 
277
- #: ../admin/class-is-editor.php:378
278
  msgid "NA"
279
  msgstr ""
280
 
281
- #: ../admin/class-is-editor.php:382
282
  msgid "The amount of comments your posts has to have."
283
  msgstr ""
284
 
@@ -286,267 +334,275 @@ msgstr ""
286
  msgid "Search in approved comments content."
287
  msgstr ""
288
 
289
- #: ../admin/class-is-editor.php:393
290
- msgid "Make posts searchable having specific comments count."
291
  msgstr ""
292
 
293
- #: ../admin/class-is-editor.php:400 ../admin/class-is-editor.php:436
294
- #: ../admin/class-is-list-table.php:34
295
- msgid "Date"
296
  msgstr ""
297
 
298
- #: ../admin/class-is-editor.php:410
299
  msgid "Day"
300
  msgstr ""
301
 
302
- #: ../admin/class-is-editor.php:418
303
  msgid "Month"
304
  msgstr ""
305
 
306
- #: ../admin/class-is-editor.php:426
307
  msgid "Year"
308
  msgstr ""
309
 
310
- #: ../admin/class-is-editor.php:437
311
- msgid "Make posts searchable created in the specific date range."
312
  msgstr ""
313
 
314
- #: ../admin/class-is-editor.php:444 ../admin/class-is-editor.php:459
315
- msgid "Password"
316
  msgstr ""
317
 
318
- #: ../admin/class-is-editor.php:450
319
  msgid "Search all posts with and without passwords."
320
  msgstr ""
321
 
322
- #: ../admin/class-is-editor.php:452
323
  msgid "Search only posts with passwords."
324
  msgstr ""
325
 
326
- #: ../admin/class-is-editor.php:454
327
  msgid "Search only posts without passwords."
328
  msgstr ""
329
 
330
- #: ../admin/class-is-editor.php:460
331
- msgid "Configure options to search posts with or without password."
332
  msgstr ""
333
 
334
- #: ../admin/class-is-editor.php:471 ../admin/class-is-editor.php:769
335
- msgid "File Types"
 
 
336
  msgstr ""
337
 
338
- #: ../admin/class-is-editor.php:490
339
  msgid ""
340
  "Search has been already limited by excluding specific File type in the "
341
  "Excludes section."
342
  msgstr ""
343
 
344
- #: ../admin/class-is-editor.php:496 ../admin/class-is-editor.php:794
345
- msgid "File Type"
346
- msgstr ""
347
-
348
- #: ../admin/class-is-editor.php:497
349
- msgid ""
350
- "Configure options to search posts having specific MIME or file types "
351
- "specially media attachment posts."
352
  msgstr ""
353
 
354
- #: ../admin/class-is-editor.php:522
355
  msgid "Configure the options to exclude specific content from search."
356
  msgstr ""
357
 
358
- #: ../admin/class-is-editor.php:529 ../admin/class-is-editor.php:564
359
  msgid "Posts"
360
  msgstr ""
361
 
362
- #: ../admin/class-is-editor.php:565
363
- msgid ""
364
- "The posts and pages of searchable post types display here. You can make post "
365
- "types searchable in the form Includes section."
366
  msgstr ""
367
 
368
- #: ../admin/class-is-editor.php:566
369
- msgid "Select the posts to exclude from the search."
370
  msgstr ""
371
 
372
- #: ../admin/class-is-editor.php:608
 
 
 
 
373
  msgid ""
374
- "The taxonomies and terms attached to searchable post types display here. You "
375
- "can make post types searchable in the form Includes section."
 
 
 
376
  msgstr ""
377
 
378
- #: ../admin/class-is-editor.php:609
379
- msgid "Exclude posts from the search having selected terms."
380
  msgstr ""
381
 
382
- #: ../admin/class-is-editor.php:642
383
  msgid "Exclude posts from the search having selected custom fields."
384
  msgstr ""
385
 
 
 
 
 
 
 
 
 
386
  #: ../admin/class-is-editor.php:662
387
  msgid "Exclude 'out of stock' WooCommerce products."
388
  msgstr ""
389
 
390
- #: ../admin/class-is-editor.php:672
391
- msgid "Exclude specific WooCommerce products from the search."
392
  msgstr ""
393
 
394
- #: ../admin/class-is-editor.php:712
395
  msgid ""
396
  "Search has been already limited to posts created by specific authors in the "
397
  "Includes section."
398
  msgstr ""
399
 
400
  #: ../admin/class-is-editor.php:719
401
- msgid "Exclude posts from the search created by slected authors."
402
  msgstr ""
403
 
404
- #: ../admin/class-is-editor.php:747
405
  msgid ""
406
  "Search has been already limited to posts statuses set in the Includes "
407
  "section."
408
  msgstr ""
409
 
410
- #: ../admin/class-is-editor.php:752
411
  msgid "Exclude sticky posts from search."
412
  msgstr ""
413
 
414
- #: ../admin/class-is-editor.php:758
415
- msgid "Exclude posts from the search having selected post statuses."
 
 
416
  msgstr ""
417
 
418
- #: ../admin/class-is-editor.php:788
419
  msgid ""
420
  "Search has been already limited to specific File type set in the Includes "
421
  "section."
422
  msgstr ""
423
 
424
- #: ../admin/class-is-editor.php:795
425
- msgid ""
426
- "Exclude posts specially media attachment posts from the search having "
427
- "selected file types."
428
  msgstr ""
429
 
430
- #: ../admin/class-is-editor.php:818
431
  msgid "Configure the options here to control search of this search form."
432
  msgstr ""
433
 
434
- #: ../admin/class-is-editor.php:825
435
  msgid "Posts Per Page"
436
  msgstr ""
437
 
438
- #: ../admin/class-is-editor.php:834
439
  msgid "Number of posts to display on search results page."
440
  msgstr ""
441
 
442
- #: ../admin/class-is-editor.php:840
443
  msgid "Order By"
444
  msgstr ""
445
 
446
- #: ../admin/class-is-editor.php:866
447
  msgid "Highlight Terms"
448
  msgstr ""
449
 
450
- #: ../admin/class-is-editor.php:872
451
  msgid "Highlight searched terms on search results page."
452
  msgstr ""
453
 
454
- #: ../admin/class-is-editor.php:875
455
  msgid "Set highlight color."
456
  msgstr ""
457
 
458
- #: ../admin/class-is-editor.php:881
459
  msgid "Search Terms Relation"
460
  msgstr ""
461
 
462
- #: ../admin/class-is-editor.php:888
463
  msgid "OR - Display content having any of the searched terms."
464
  msgstr ""
465
 
466
- #: ../admin/class-is-editor.php:890
467
  msgid "AND - Display content having all the searched terms."
468
  msgstr ""
469
 
470
- #: ../admin/class-is-editor.php:896
471
  msgid "Fuzzy Matching"
472
  msgstr ""
473
 
474
- #: ../admin/class-is-editor.php:902
475
  msgid "Whole - Search posts that include the whole search term."
476
  msgstr ""
477
 
478
- #: ../admin/class-is-editor.php:904
479
  msgid ""
480
  "Partial - Also search words in the posts that begins or ends with the search "
481
  "term."
482
  msgstr ""
483
 
484
- #: ../admin/class-is-editor.php:910 ../admin/class-is-editor.php:924
485
  msgid "Keyword Stemming"
486
  msgstr ""
487
 
488
- #: ../admin/class-is-editor.php:917
489
- msgid "Also search base word of searched keyword."
490
- msgstr ""
491
-
492
- #: ../admin/class-is-editor.php:919
493
- msgid "Not recommended to use when Fuzzy Matching option is set to Whole."
494
- msgstr ""
495
-
496
- #: ../admin/class-is-editor.php:925
497
- msgid "It also searches base word of searched keyword."
498
  msgstr ""
499
 
500
- #: ../admin/class-is-editor.php:926
501
  msgid ""
502
  "For Example: If you search \"doing\" then it also searches base word of "
503
- "\"doing\" that is \"do\" in the posts."
504
  msgstr ""
505
 
506
- #: ../admin/class-is-editor.php:927
507
  msgid ""
508
  "If you want to search whole exact searched term then do not use this options "
509
  "and in this case it is not recommended to use when Fuzzy Matching option is "
510
  "set to Whole."
511
  msgstr ""
512
 
513
- #: ../admin/class-is-editor.php:934
 
 
 
 
 
 
 
 
514
  msgid "Sticky Posts"
515
  msgstr ""
516
 
517
- #: ../admin/class-is-editor.php:940
518
  msgid "Move sticky posts to the start of the search results page."
519
  msgstr ""
520
 
521
- #: ../admin/class-is-editor.php:946
522
  msgid "Empty Search"
523
  msgstr ""
524
 
525
- #: ../admin/class-is-editor.php:952
526
  msgid "Display an error for empty search query."
527
  msgstr ""
528
 
529
- #: ../admin/class-is-editor.php:958
530
  msgid "Respect exclude_from_search"
531
  msgstr ""
532
 
533
- #: ../admin/class-is-editor.php:964
534
  msgid "Do not search post types which are excluded from search."
535
  msgstr ""
536
 
537
- #: ../admin/class-is-editor.php:970
538
  msgid "Demo"
539
  msgstr ""
540
 
541
- #: ../admin/class-is-editor.php:976
542
  msgid "Display search form only for site administrator."
543
  msgstr ""
544
 
545
- #: ../admin/class-is-editor.php:982 ../admin/class-is-settings-fields.php:94
546
  msgid "Disable"
547
  msgstr ""
548
 
549
- #: ../admin/class-is-editor.php:988
550
  msgid "Disable this search form."
551
  msgstr ""
552
 
@@ -559,16 +615,20 @@ msgstr ""
559
  msgid "Available Actions"
560
  msgstr ""
561
 
562
- #: ../admin/class-is-help.php:35 ../admin/partials/new-search-form.php:180
563
  msgid "Includes"
564
  msgstr ""
565
 
566
- #: ../admin/class-is-help.php:40 ../admin/partials/new-search-form.php:184
567
  msgid "Excludes"
568
  msgstr ""
569
 
 
 
 
 
570
  #: ../admin/class-is-help.php:59
571
- msgid "Search To Menu"
572
  msgstr ""
573
 
574
  #: ../admin/class-is-help.php:76
@@ -631,7 +691,7 @@ msgstr ""
631
 
632
  #: ../admin/class-is-help.php:87
633
  msgid ""
634
- "<strong>Settings</strong> provides a place where you can customize overall "
635
  "behavior of this search form."
636
  msgstr ""
637
 
@@ -661,7 +721,7 @@ msgstr ""
661
 
662
  #: ../admin/class-is-help.php:96
663
  msgid ""
664
- "<strong>Search To Menu</strong> provides a place where you can customize the "
665
  "behavior of search form added in the site navgation menu."
666
  msgstr ""
667
 
@@ -686,13 +746,13 @@ msgstr ""
686
  msgid "For more information:"
687
  msgstr ""
688
 
689
- #: ../admin/class-is-help.php:110 ../admin/partials/new-search-form.php:147
690
- #: ../admin/partials/settings-form.php:49
691
  msgid "Docs"
692
  msgstr ""
693
 
694
- #: ../admin/class-is-help.php:112 ../admin/partials/new-search-form.php:150
695
- #: ../admin/partials/settings-form.php:52
696
  msgid "Give us a rating"
697
  msgstr ""
698
 
@@ -709,7 +769,7 @@ msgid "Author"
709
  msgstr ""
710
 
711
  #: ../admin/class-is-list-table.php:111 ../admin/class-is-list-table.php:174
712
- #: ../admin/partials/new-search-form.php:128
713
  msgid "Delete"
714
  msgstr ""
715
 
@@ -719,19 +779,19 @@ msgid "Edit &#8220;%s&#8221;"
719
  msgstr ""
720
 
721
  #: ../admin/class-is-list-table.php:150
722
- #: ../admin/class-is-settings-fields.php:210
723
- #: ../admin/class-is-settings-fields.php:403
724
- #: ../admin/class-is-settings-fields.php:433 ../includes/class-is-widget.php:69
725
  msgid "Edit"
726
  msgstr ""
727
 
728
  #: ../admin/class-is-list-table.php:160
729
- #: ../admin/partials/new-search-form.php:113
730
  msgid "Duplicate"
731
  msgstr ""
732
 
733
  #: ../admin/class-is-list-table.php:173
734
- #: ../admin/partials/new-search-form.php:128
735
  msgid ""
736
  "You are about to delete this search form.\n"
737
  " 'Cancel' to stop, 'OK' to delete."
@@ -750,311 +810,295 @@ msgstr ""
750
  msgid "d/m/Y"
751
  msgstr ""
752
 
753
- #: ../admin/class-is-settings-fields.php:71
754
- #: ../admin/class-is-settings-fields.php:142
755
  msgid "Select Menu"
756
  msgstr ""
757
 
758
- #: ../admin/class-is-settings-fields.php:78
759
- #: ../admin/class-is-settings-fields.php:220
760
- #: ../includes/class-is-search-form.php:62
761
  msgid "Search Form"
762
  msgstr ""
763
 
764
- #: ../admin/class-is-settings-fields.php:79
765
- #: ../admin/class-is-settings-fields.php:265
766
  msgid "Form Style"
767
  msgstr ""
768
 
769
- #: ../admin/class-is-settings-fields.php:80
770
- #: ../admin/class-is-settings-fields.php:283
771
  msgid "Menu Title"
772
  msgstr ""
773
 
774
- #: ../admin/class-is-settings-fields.php:81
775
- #: ../admin/class-is-settings-fields.php:302
776
  msgid "Menu Classes"
777
  msgstr ""
778
 
779
- #: ../admin/class-is-settings-fields.php:82
780
- #: ../admin/class-is-settings-fields.php:320
781
  msgid "Google CSE"
782
  msgstr ""
783
 
784
- #: ../admin/class-is-settings-fields.php:83
785
  msgid "Close Icon"
786
  msgstr ""
787
 
788
- #: ../admin/class-is-settings-fields.php:87
789
  msgid "Header"
790
  msgstr ""
791
 
792
- #: ../admin/class-is-settings-fields.php:88
793
  msgid "Footer"
794
  msgstr ""
795
 
796
- #: ../admin/class-is-settings-fields.php:89
797
  msgid "Mobile Display"
798
  msgstr ""
799
 
800
- #: ../admin/class-is-settings-fields.php:90
801
  msgid "Custom CSS"
802
  msgstr ""
803
 
804
- #: ../admin/class-is-settings-fields.php:91
805
- #: ../admin/class-is-settings-fields.php:481
806
  msgid "Stopwords"
807
  msgstr ""
808
 
809
- #: ../admin/class-is-settings-fields.php:92
810
- #: ../admin/class-is-settings-fields.php:507
811
  msgid "Synonyms"
812
  msgstr ""
813
 
814
- #: ../admin/class-is-settings-fields.php:93
815
  msgid "Not load files"
816
  msgstr ""
817
 
818
- #: ../admin/class-is-settings-fields.php:95
819
  msgid "Default Search"
820
  msgstr ""
821
 
822
- #: ../admin/class-is-settings-fields.php:104
823
  msgid "Use below options to display search in menu and configure it."
824
  msgstr ""
825
 
826
- #: ../admin/class-is-settings-fields.php:113
827
  msgid "Use below options to make sitewide changes in search."
828
  msgstr ""
829
 
830
- #: ../admin/class-is-settings-fields.php:137
831
- msgid "No navigation menu registered on your site."
832
- msgstr ""
833
-
834
- #: ../admin/class-is-settings-fields.php:143
835
  msgid "Select menu here where you want to display search form."
836
  msgstr ""
837
 
838
- #: ../admin/class-is-settings-fields.php:175
839
- msgid "Select post types here that you want to make searchable."
840
  msgstr ""
841
 
842
- #: ../admin/class-is-settings-fields.php:192
843
  #: ../admin/class-is-settings-fields.php:203
844
- #: ../admin/class-is-settings-fields.php:396
845
- #: ../admin/class-is-settings-fields.php:426 ../includes/class-is-widget.php:62
846
- msgid "none"
847
  msgstr ""
848
 
849
- #: ../admin/class-is-settings-fields.php:212
850
- #: ../admin/class-is-settings-fields.php:405
851
- #: ../admin/class-is-settings-fields.php:435 ../includes/class-is-widget.php:71
852
- msgid "Create New"
853
  msgstr ""
854
 
855
- #: ../admin/class-is-settings-fields.php:214
856
  msgid "It overwrites above Post Types option."
857
  msgstr ""
858
 
859
- #: ../admin/class-is-settings-fields.php:221
860
- msgid ""
861
- "Select search form that will control search performed using menu search."
 
 
862
  msgstr ""
863
 
864
- #: ../admin/class-is-settings-fields.php:234
 
 
 
 
 
 
 
 
 
 
865
  msgid "Default"
866
  msgstr ""
867
 
868
- #: ../admin/class-is-settings-fields.php:235
869
  msgid "Dropdown"
870
  msgstr ""
871
 
872
- #: ../admin/class-is-settings-fields.php:236
873
  msgid "Sliding"
874
  msgstr ""
875
 
876
- #: ../admin/class-is-settings-fields.php:237
877
  msgid "Full Width"
878
  msgstr ""
879
 
880
- #: ../admin/class-is-settings-fields.php:238
881
  msgid "Popup"
882
  msgstr ""
883
 
884
- #: ../admin/class-is-settings-fields.php:266
885
- msgid "Select form style for the search form displayed in the menu."
886
- msgstr ""
887
-
888
- #: ../admin/class-is-settings-fields.php:284
889
  msgid ""
890
  "Displays set menu title text in place of search icon displays in navigation "
891
  "menu."
892
  msgstr ""
893
 
894
- #: ../admin/class-is-settings-fields.php:298
895
- msgid "Add classes seperated by space."
896
  msgstr ""
897
 
898
- #: ../admin/class-is-settings-fields.php:303
899
- msgid "Adds set classes in the search navigation menu item."
900
  msgstr ""
901
 
902
- #: ../admin/class-is-settings-fields.php:321
903
  msgid ""
904
  "Add only Google Custom Search( CSE ) search form code in the above text box "
905
  "that will replace default search form."
906
  msgstr ""
907
 
908
- #: ../admin/class-is-settings-fields.php:342
909
- msgid "Display search form in header on mobile devices"
910
- msgstr ""
911
-
912
- #: ../admin/class-is-settings-fields.php:343
913
  msgid ""
914
- "It does not work with caching as this functionality uses WordPress "
915
  "wp_is_mobile function."
916
  msgstr ""
917
 
918
- #: ../admin/class-is-settings-fields.php:355
919
- msgid "This site uses cache"
920
  msgstr ""
921
 
922
- #: ../admin/class-is-settings-fields.php:356
923
  msgid ""
924
- "Use this option to display search form in site header and hide it on desktop "
925
- "using CSS code."
926
  msgstr ""
927
 
928
- #: ../admin/class-is-settings-fields.php:367
 
 
 
 
929
  msgid "Disable search functionality on whole site."
930
  msgstr ""
931
 
932
- #: ../admin/class-is-settings-fields.php:378
933
  msgid ""
934
  "Do not use default search form to control WordPress default search "
935
  "functionality."
936
  msgstr ""
937
 
938
- #: ../admin/class-is-settings-fields.php:407
939
  msgid "Displays search form in site header using wp_head hook."
940
  msgstr ""
941
 
942
- #: ../admin/class-is-settings-fields.php:437
943
  msgid "Displays search form in site footer using wp_footer hook."
944
  msgstr ""
945
 
946
- #: ../admin/class-is-settings-fields.php:456
947
  msgid "Display Search Form Close Icon"
948
  msgstr ""
949
 
950
- #: ../admin/class-is-settings-fields.php:467
951
  msgid "Add custom css code if any to style search form."
952
  msgstr ""
953
 
954
- #: ../admin/class-is-settings-fields.php:477
955
- msgid "Please separate words with commas."
956
- msgstr ""
957
-
958
- #: ../admin/class-is-settings-fields.php:482
959
  msgid ""
960
  "Enter words here to add them to the list of stopwords. The stopwords will "
961
  "not be searched."
962
  msgstr ""
963
 
964
- #: ../admin/class-is-settings-fields.php:495
965
- msgid ""
966
- "The format here is key = value;. Please separate every synonyms key = value "
967
- "pairs with semicolon."
968
- msgstr ""
969
-
970
- #: ../admin/class-is-settings-fields.php:500
971
- msgid "Disable synonyms for the search forms having AND search terms relation."
972
  msgstr ""
973
 
974
- #: ../admin/class-is-settings-fields.php:508
975
  msgid "Add synonyms here to make the searches find better results."
976
  msgstr ""
977
 
978
- #: ../admin/class-is-settings-fields.php:509
979
  msgid ""
980
  "If you add bird = crow to the list of synonyms, searches for bird "
981
  "automatically become a search for bird crow and will thus match to posts "
982
  "that include either bird or crow."
983
  msgstr ""
984
 
985
- #: ../admin/class-is-settings-fields.php:510
986
  msgid ""
987
  "This only works for search forms and in OR searches. In AND searches the "
988
  "synonyms only restrict the search, as now the search only finds posts that "
989
  "contain both bird and crow."
990
  msgstr ""
991
 
992
- #: ../admin/class-is-settings-fields.php:522
 
 
 
 
 
 
 
 
 
 
 
 
 
 
993
  msgid "Plugin CSS File"
994
  msgstr ""
995
 
996
- #: ../admin/class-is-settings-fields.php:523
997
  msgid "Plugin JavaScript File"
998
  msgstr ""
999
 
1000
- #: ../admin/class-is-settings-fields.php:543
1001
  msgid ""
1002
  "If checked, you have to add following plugin file code into your child theme "
1003
  "CSS file."
1004
  msgstr ""
1005
 
1006
- #: ../admin/class-is-settings-fields.php:547
1007
  msgid ""
1008
  "If checked, you have to add following plugin files code into your child "
1009
  "theme JavaScript file."
1010
  msgstr ""
1011
 
1012
- #: ../admin/partials/new-search-form.php:21
1013
  msgid "Edit Search Form"
1014
  msgstr ""
1015
 
1016
- #: ../admin/partials/new-search-form.php:63
1017
- msgid "Enter title here"
1018
  msgstr ""
1019
 
1020
- #: ../admin/partials/new-search-form.php:86
1021
  msgid ""
1022
  "Copy this shortcode and paste it into your post, page, or text widget "
1023
  "content:"
1024
  msgstr ""
1025
 
1026
- #: ../admin/partials/new-search-form.php:99
1027
- #: ../admin/partials/settings-form.php:30
1028
- msgid "Status"
1029
  msgstr ""
1030
 
1031
- #: ../admin/partials/new-search-form.php:144
1032
- #: ../admin/partials/settings-form.php:46
1033
  msgid "Information"
1034
  msgstr ""
1035
 
1036
- #: ../admin/partials/new-search-form.php:149
1037
- #: ../admin/partials/settings-form.php:51
1038
  msgid "Contact"
1039
  msgstr ""
1040
 
1041
- #: ../admin/partials/new-search-form.php:162
1042
- #: ../admin/partials/settings-form.php:63
1043
- #, php-format
1044
- msgid "%1$s %2$s keys switch panels"
1045
- msgstr ""
1046
-
1047
- #: ../admin/partials/new-search-form.php:167
1048
- #: ../admin/partials/settings-form.php:68
1049
- msgid "(left and right arrow)"
1050
- msgstr ""
1051
-
1052
- #: ../includes/class-is-search-form.php:113
1053
- #: ../includes/class-is-search-form.php:225
1054
  msgid "Untitled"
1055
  msgstr ""
1056
 
1057
- #: ../includes/class-is-search-form.php:151
1058
  #, php-format
1059
  msgid ""
1060
  "<code>%1$s</code> property of a <code>IS_Search_Form</code> object is "
@@ -1065,12 +1109,12 @@ msgstr ""
1065
  msgid "Displays ivory search form."
1066
  msgstr ""
1067
 
1068
- #: ../includes/freemius.php:54
1069
  #, php-format
1070
  msgid "Hey %1$s"
1071
  msgstr ""
1072
 
1073
- #: ../includes/freemius.php:54
1074
  #, php-format
1075
  msgid ""
1076
  "Please help us improve %2$s by securely sharing some usage data with %5$s. "
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ivory Search\n"
4
+ "POT-Creation-Date: 2018-08-30 16:16+0530\n"
5
+ "PO-Revision-Date: 2018-08-30 16:16+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Ivory Search <admin@ivorysearch.com>\n"
8
  "Language: en_US\n"
21
  msgstr ""
22
 
23
  #: ../admin/class-is-admin.php:94 ../admin/class-is-help.php:111
24
+ #: ../admin/partials/new-search-form.php:181
25
+ #: ../admin/partials/settings-form.php:91
26
  msgid "Support"
27
  msgstr ""
28
 
68
  msgstr ""
69
 
70
  #: ../admin/class-is-admin.php:257 ../admin/class-is-admin.php:295
71
+ #: ../includes/class-is-search-form.php:59
72
  msgid "Search Forms"
73
  msgstr ""
74
 
75
+ #: ../admin/class-is-admin.php:260 ../admin/partials/new-search-form.php:21
76
  msgid "Add New Search Form"
77
  msgstr ""
78
 
79
  #: ../admin/class-is-admin.php:260 ../admin/class-is-admin.php:302
80
+ #: ../admin/partials/new-search-form.php:31
81
  msgid "Add New"
82
  msgstr ""
83
 
84
+ #: ../admin/class-is-admin.php:263 ../admin/partials/settings-form.php:20
85
  msgid "Ivory Search Settings"
86
  msgstr ""
87
 
88
+ #: ../admin/class-is-admin.php:263 ../admin/class-is-help.php:64
 
89
  msgid "Settings"
90
  msgstr ""
91
 
114
  msgid "Error in deleting."
115
  msgstr ""
116
 
117
+ #: ../admin/class-is-admin.php:691
118
+ msgid "Save Form"
119
  msgstr ""
120
 
121
+ #: ../admin/class-is-admin.php:704
122
+ msgid "Upgrade To Access"
123
  msgstr ""
124
 
125
+ #: ../admin/class-is-editor.php:89
126
  msgid "Configure the below options to make specific content searchable."
127
  msgstr ""
128
 
129
+ #: ../admin/class-is-editor.php:97 ../admin/class-is-settings-fields.php:127
 
 
130
  msgid "Post Types"
131
  msgstr ""
132
 
133
+ #: ../admin/class-is-editor.php:98 ../admin/class-is-editor.php:150
134
+ #: ../admin/class-is-editor.php:213 ../admin/class-is-editor.php:248
135
+ #: ../admin/class-is-editor.php:274 ../admin/class-is-editor.php:324
136
+ #: ../admin/class-is-editor.php:356 ../admin/class-is-editor.php:394
137
+ #: ../admin/class-is-editor.php:434 ../admin/class-is-editor.php:457
138
+ #: ../admin/class-is-editor.php:516 ../admin/class-is-editor.php:567
139
+ #: ../admin/class-is-editor.php:610 ../admin/class-is-editor.php:647
140
+ #: ../admin/class-is-editor.php:673 ../admin/class-is-editor.php:716
141
+ #: ../admin/class-is-editor.php:758 ../admin/class-is-editor.php:814
142
+ #: ../admin/class-is-editor.php:829 ../admin/class-is-editor.php:855
143
+ #: ../admin/class-is-editor.php:870 ../admin/class-is-editor.php:885
144
+ #: ../admin/class-is-editor.php:899 ../admin/class-is-editor.php:919
145
+ #: ../admin/class-is-editor.php:931 ../admin/class-is-editor.php:943
146
+ #: ../admin/class-is-editor.php:955 ../admin/class-is-editor.php:967
147
+ #: ../admin/class-is-settings-fields.php:111
148
+ msgid "Expand All"
149
+ msgstr ""
150
+
151
+ #: ../admin/class-is-editor.php:98 ../admin/class-is-editor.php:150
152
+ #: ../admin/class-is-editor.php:213 ../admin/class-is-editor.php:248
153
+ #: ../admin/class-is-editor.php:274 ../admin/class-is-editor.php:324
154
+ #: ../admin/class-is-editor.php:356 ../admin/class-is-editor.php:394
155
+ #: ../admin/class-is-editor.php:434 ../admin/class-is-editor.php:457
156
+ #: ../admin/class-is-editor.php:516 ../admin/class-is-editor.php:567
157
+ #: ../admin/class-is-editor.php:610 ../admin/class-is-editor.php:647
158
+ #: ../admin/class-is-editor.php:673 ../admin/class-is-editor.php:716
159
+ #: ../admin/class-is-editor.php:758 ../admin/class-is-editor.php:814
160
+ #: ../admin/class-is-editor.php:829 ../admin/class-is-editor.php:855
161
+ #: ../admin/class-is-editor.php:870 ../admin/class-is-editor.php:885
162
+ #: ../admin/class-is-editor.php:899 ../admin/class-is-editor.php:919
163
+ #: ../admin/class-is-editor.php:931 ../admin/class-is-editor.php:943
164
+ #: ../admin/class-is-editor.php:955 ../admin/class-is-editor.php:967
165
+ #: ../admin/class-is-settings-fields.php:111
166
+ msgid "Collapse All"
167
+ msgstr ""
168
+
169
+ #: ../admin/class-is-editor.php:103
170
+ msgid "Select post types that you want to make searchable."
171
+ msgstr ""
172
+
173
+ #: ../admin/class-is-editor.php:125
174
  msgid "Search in post title."
175
  msgstr ""
176
 
177
+ #: ../admin/class-is-editor.php:128
178
  msgid "Search in post content."
179
  msgstr ""
180
 
181
+ #: ../admin/class-is-editor.php:131
182
  msgid "Search in post excerpt."
183
  msgstr ""
184
 
185
+ #: ../admin/class-is-editor.php:134
186
  msgid "None"
187
  msgstr ""
188
 
189
+ #: ../admin/class-is-editor.php:138
190
  msgid ""
191
  "Display this post type in the search query URL and restrict search to it."
192
  msgstr ""
193
 
194
+ #: ../admin/class-is-editor.php:140 ../admin/class-is-settings-fields.php:221
195
  msgid "No post types registered on your site."
196
  msgstr ""
197
 
198
+ #: ../admin/class-is-editor.php:149 ../admin/class-is-editor.php:566
199
+ msgid "Taxonomy Terms"
200
  msgstr ""
201
 
202
+ #: ../admin/class-is-editor.php:154
203
+ msgid ""
204
+ "Taxonomy terms that have no posts will not be visible below. Add a post with "
205
+ "the taxonomy you want for it to be configurable."
206
+ msgstr ""
207
+
208
+ #: ../admin/class-is-editor.php:155
209
+ msgid ""
210
+ "Terms selected here will restrict the search to posts that have the selected "
211
+ "terms."
212
+ msgstr ""
213
+
214
+ #: ../admin/class-is-editor.php:156
215
+ msgid "Taxonomy terms selected display in BOLD"
216
  msgstr ""
217
 
218
+ #: ../admin/class-is-editor.php:182 ../admin/class-is-editor.php:226
219
+ #: ../admin/class-is-editor.php:468 ../admin/class-is-editor.php:555
220
+ #: ../admin/class-is-editor.php:591 ../admin/class-is-editor.php:624
221
+ #: ../admin/class-is-editor.php:769
222
+ msgid "Search.."
223
+ msgstr ""
224
+
225
+ #: ../admin/class-is-editor.php:191 ../admin/class-is-editor.php:233
226
+ #: ../admin/class-is-editor.php:476 ../admin/class-is-editor.php:561
227
+ #: ../admin/class-is-editor.php:600 ../admin/class-is-editor.php:632
228
+ #: ../admin/class-is-editor.php:777
229
  msgid "Press CTRL key to select multiple terms or deselect them."
230
  msgstr ""
231
 
232
+ #: ../admin/class-is-editor.php:195
233
  msgid "AND - Search posts having all the above selected terms."
234
  msgstr ""
235
 
236
+ #: ../admin/class-is-editor.php:197
237
  msgid "OR - Search posts having any one of the above selected terms."
238
  msgstr ""
239
 
240
+ #: ../admin/class-is-editor.php:200
241
  msgid "Search in taxonomy terms title."
242
  msgstr ""
243
 
244
+ #: ../admin/class-is-editor.php:203
245
  msgid "Search in taxonomy terms description."
246
  msgstr ""
247
 
248
+ #: ../admin/class-is-editor.php:205 ../admin/class-is-editor.php:602
249
  msgid "No taxonomies registered for slected post types."
250
  msgstr ""
251
 
252
+ #: ../admin/class-is-editor.php:212 ../admin/class-is-editor.php:609
253
+ msgid "Custom Fields"
 
 
254
  msgstr ""
255
 
256
+ #: ../admin/class-is-editor.php:216
257
+ msgid "Select custom fields to make their values searchable."
 
258
  msgstr ""
259
 
260
+ #: ../admin/class-is-editor.php:237
261
+ msgid "Selected Custom Fields :"
 
262
  msgstr ""
263
 
264
+ #: ../admin/class-is-editor.php:247 ../admin/class-is-editor.php:646
265
+ msgid "WooCommerce"
266
  msgstr ""
267
 
268
+ #: ../admin/class-is-editor.php:251
269
+ msgid "Configure WooCommerce products search options here."
 
270
  msgstr ""
271
 
272
+ #: ../admin/class-is-editor.php:263
273
  msgid "Search in WooCommerce products SKU."
274
  msgstr ""
275
 
276
+ #: ../admin/class-is-editor.php:266 ../admin/class-is-editor.php:665
277
  msgid "WooCommerce product post type is not included in search."
278
  msgstr ""
279
 
280
+ #: ../admin/class-is-editor.php:273 ../admin/class-is-editor.php:672
281
+ msgid "Authors"
282
  msgstr ""
283
 
284
+ #: ../admin/class-is-editor.php:277
285
+ msgid "Make specific author posts searchable."
 
286
  msgstr ""
287
 
288
+ #: ../admin/class-is-editor.php:310
289
  msgid ""
290
  "Search has been already limited by excluding specific authors posts in the "
291
  "Excludes section."
292
  msgstr ""
293
 
294
+ #: ../admin/class-is-editor.php:318
295
  msgid ""
296
  "Search in author Display name and display the posts created by that author."
297
  msgstr ""
298
 
299
+ #: ../admin/class-is-editor.php:323 ../admin/class-is-editor.php:715
300
+ msgid "Post Status"
301
  msgstr ""
302
 
303
+ #: ../admin/class-is-editor.php:327
304
+ msgid "Configure options to search posts having specific post statuses."
 
305
  msgstr ""
306
 
307
  #: ../admin/class-is-editor.php:348
311
  msgstr ""
312
 
313
  #: ../admin/class-is-editor.php:355
314
+ msgid "Comments"
315
  msgstr ""
316
 
317
+ #: ../admin/class-is-editor.php:359
318
+ msgid "Make posts searchable that have a specific number of comments."
319
  msgstr ""
320
 
321
+ #: ../admin/class-is-editor.php:372
322
  msgid "The search operator to compare comments count."
323
  msgstr ""
324
 
325
+ #: ../admin/class-is-editor.php:376
326
  msgid "NA"
327
  msgstr ""
328
 
329
+ #: ../admin/class-is-editor.php:380
330
  msgid "The amount of comments your posts has to have."
331
  msgstr ""
332
 
334
  msgid "Search in approved comments content."
335
  msgstr ""
336
 
337
+ #: ../admin/class-is-editor.php:393 ../admin/class-is-list-table.php:34
338
+ msgid "Date"
339
  msgstr ""
340
 
341
+ #: ../admin/class-is-editor.php:397
342
+ msgid "Make posts searchable that were created in the specified data range."
 
343
  msgstr ""
344
 
345
+ #: ../admin/class-is-editor.php:406
346
  msgid "Day"
347
  msgstr ""
348
 
349
+ #: ../admin/class-is-editor.php:414
350
  msgid "Month"
351
  msgstr ""
352
 
353
+ #: ../admin/class-is-editor.php:422
354
  msgid "Year"
355
  msgstr ""
356
 
357
+ #: ../admin/class-is-editor.php:433
358
+ msgid "Password"
359
  msgstr ""
360
 
361
+ #: ../admin/class-is-editor.php:437
362
+ msgid "Configure options to search posts with or without password."
363
  msgstr ""
364
 
365
+ #: ../admin/class-is-editor.php:442
366
  msgid "Search all posts with and without passwords."
367
  msgstr ""
368
 
369
+ #: ../admin/class-is-editor.php:444
370
  msgid "Search only posts with passwords."
371
  msgstr ""
372
 
373
+ #: ../admin/class-is-editor.php:446
374
  msgid "Search only posts without passwords."
375
  msgstr ""
376
 
377
+ #: ../admin/class-is-editor.php:456 ../admin/class-is-editor.php:757
378
+ msgid "File Types"
379
  msgstr ""
380
 
381
+ #: ../admin/class-is-editor.php:460
382
+ msgid ""
383
+ "Configure searching to search based on posts that have a specific MIME type "
384
+ "or files that have specific media attachments"
385
  msgstr ""
386
 
387
+ #: ../admin/class-is-editor.php:479
388
  msgid ""
389
  "Search has been already limited by excluding specific File type in the "
390
  "Excludes section."
391
  msgstr ""
392
 
393
+ #: ../admin/class-is-editor.php:483
394
+ msgid "Selected File Types :"
 
 
 
 
 
 
395
  msgstr ""
396
 
397
+ #: ../admin/class-is-editor.php:508
398
  msgid "Configure the options to exclude specific content from search."
399
  msgstr ""
400
 
401
+ #: ../admin/class-is-editor.php:515
402
  msgid "Posts"
403
  msgstr ""
404
 
405
+ #: ../admin/class-is-editor.php:519
406
+ msgid "The posts and pages of searchable post types display here."
 
 
407
  msgstr ""
408
 
409
+ #: ../admin/class-is-editor.php:520
410
+ msgid "Select the posts you wish to exclude from the search."
411
  msgstr ""
412
 
413
+ #: ../admin/class-is-editor.php:521
414
+ msgid "Selected post types display in BOLD."
415
+ msgstr ""
416
+
417
+ #: ../admin/class-is-editor.php:570
418
  msgid ""
419
+ "The taxonomies and terms attached to searchable post types display here."
420
+ msgstr ""
421
+
422
+ #: ../admin/class-is-editor.php:571
423
+ msgid "Exclude posts from search results that have specific terms"
424
  msgstr ""
425
 
426
+ #: ../admin/class-is-editor.php:572
427
+ msgid "Selected terms taxonomy title display in BOLD."
428
  msgstr ""
429
 
430
+ #: ../admin/class-is-editor.php:613
431
  msgid "Exclude posts from the search having selected custom fields."
432
  msgstr ""
433
 
434
+ #: ../admin/class-is-editor.php:636
435
+ msgid "Excluded Custom Fields :"
436
+ msgstr ""
437
+
438
+ #: ../admin/class-is-editor.php:650
439
+ msgid "Exclude specific WooCommerce products from the search."
440
+ msgstr ""
441
+
442
  #: ../admin/class-is-editor.php:662
443
  msgid "Exclude 'out of stock' WooCommerce products."
444
  msgstr ""
445
 
446
+ #: ../admin/class-is-editor.php:676
447
+ msgid "Exclude posts from the search created by slected authors."
448
  msgstr ""
449
 
450
+ #: ../admin/class-is-editor.php:708
451
  msgid ""
452
  "Search has been already limited to posts created by specific authors in the "
453
  "Includes section."
454
  msgstr ""
455
 
456
  #: ../admin/class-is-editor.php:719
457
+ msgid "Exclude posts from the search having selected post statuses."
458
  msgstr ""
459
 
460
+ #: ../admin/class-is-editor.php:742
461
  msgid ""
462
  "Search has been already limited to posts statuses set in the Includes "
463
  "section."
464
  msgstr ""
465
 
466
+ #: ../admin/class-is-editor.php:747
467
  msgid "Exclude sticky posts from search."
468
  msgstr ""
469
 
470
+ #: ../admin/class-is-editor.php:761
471
+ msgid ""
472
+ "Exclude posts specially media attachment posts from the search having "
473
+ "selected file types."
474
  msgstr ""
475
 
476
+ #: ../admin/class-is-editor.php:780
477
  msgid ""
478
  "Search has been already limited to specific File type set in the Includes "
479
  "section."
480
  msgstr ""
481
 
482
+ #: ../admin/class-is-editor.php:784
483
+ msgid "Excluded File Types :"
 
 
484
  msgstr ""
485
 
486
+ #: ../admin/class-is-editor.php:806
487
  msgid "Configure the options here to control search of this search form."
488
  msgstr ""
489
 
490
+ #: ../admin/class-is-editor.php:813
491
  msgid "Posts Per Page"
492
  msgstr ""
493
 
494
+ #: ../admin/class-is-editor.php:822
495
  msgid "Number of posts to display on search results page."
496
  msgstr ""
497
 
498
+ #: ../admin/class-is-editor.php:828
499
  msgid "Order By"
500
  msgstr ""
501
 
502
+ #: ../admin/class-is-editor.php:854
503
  msgid "Highlight Terms"
504
  msgstr ""
505
 
506
+ #: ../admin/class-is-editor.php:860
507
  msgid "Highlight searched terms on search results page."
508
  msgstr ""
509
 
510
+ #: ../admin/class-is-editor.php:863
511
  msgid "Set highlight color."
512
  msgstr ""
513
 
514
+ #: ../admin/class-is-editor.php:869
515
  msgid "Search Terms Relation"
516
  msgstr ""
517
 
518
+ #: ../admin/class-is-editor.php:876
519
  msgid "OR - Display content having any of the searched terms."
520
  msgstr ""
521
 
522
+ #: ../admin/class-is-editor.php:878
523
  msgid "AND - Display content having all the searched terms."
524
  msgstr ""
525
 
526
+ #: ../admin/class-is-editor.php:884
527
  msgid "Fuzzy Matching"
528
  msgstr ""
529
 
530
+ #: ../admin/class-is-editor.php:890
531
  msgid "Whole - Search posts that include the whole search term."
532
  msgstr ""
533
 
534
+ #: ../admin/class-is-editor.php:892
535
  msgid ""
536
  "Partial - Also search words in the posts that begins or ends with the search "
537
  "term."
538
  msgstr ""
539
 
540
+ #: ../admin/class-is-editor.php:898
541
  msgid "Keyword Stemming"
542
  msgstr ""
543
 
544
+ #: ../admin/class-is-editor.php:902
545
+ msgid "Searches the base word of a searched keyword"
 
 
 
 
 
 
 
 
546
  msgstr ""
547
 
548
+ #: ../admin/class-is-editor.php:903
549
  msgid ""
550
  "For Example: If you search \"doing\" then it also searches base word of "
551
+ "\"doing\" that is \"do\" in the specified post types."
552
  msgstr ""
553
 
554
+ #: ../admin/class-is-editor.php:904
555
  msgid ""
556
  "If you want to search whole exact searched term then do not use this options "
557
  "and in this case it is not recommended to use when Fuzzy Matching option is "
558
  "set to Whole."
559
  msgstr ""
560
 
561
+ #: ../admin/class-is-editor.php:910
562
+ msgid "Also search base word of searched keyword."
563
+ msgstr ""
564
+
565
+ #: ../admin/class-is-editor.php:912
566
+ msgid "Not recommended to use when Fuzzy Matching option is set to Whole."
567
+ msgstr ""
568
+
569
+ #: ../admin/class-is-editor.php:918
570
  msgid "Sticky Posts"
571
  msgstr ""
572
 
573
+ #: ../admin/class-is-editor.php:924
574
  msgid "Move sticky posts to the start of the search results page."
575
  msgstr ""
576
 
577
+ #: ../admin/class-is-editor.php:930
578
  msgid "Empty Search"
579
  msgstr ""
580
 
581
+ #: ../admin/class-is-editor.php:936
582
  msgid "Display an error for empty search query."
583
  msgstr ""
584
 
585
+ #: ../admin/class-is-editor.php:942
586
  msgid "Respect exclude_from_search"
587
  msgstr ""
588
 
589
+ #: ../admin/class-is-editor.php:948
590
  msgid "Do not search post types which are excluded from search."
591
  msgstr ""
592
 
593
+ #: ../admin/class-is-editor.php:954
594
  msgid "Demo"
595
  msgstr ""
596
 
597
+ #: ../admin/class-is-editor.php:960
598
  msgid "Display search form only for site administrator."
599
  msgstr ""
600
 
601
+ #: ../admin/class-is-editor.php:966 ../admin/class-is-settings-fields.php:146
602
  msgid "Disable"
603
  msgstr ""
604
 
605
+ #: ../admin/class-is-editor.php:972
606
  msgid "Disable this search form."
607
  msgstr ""
608
 
615
  msgid "Available Actions"
616
  msgstr ""
617
 
618
+ #: ../admin/class-is-help.php:35 ../admin/partials/new-search-form.php:107
619
  msgid "Includes"
620
  msgstr ""
621
 
622
+ #: ../admin/class-is-help.php:40 ../admin/partials/new-search-form.php:111
623
  msgid "Excludes"
624
  msgstr ""
625
 
626
+ #: ../admin/class-is-help.php:45 ../admin/partials/new-search-form.php:115
627
+ msgid "Options"
628
+ msgstr ""
629
+
630
  #: ../admin/class-is-help.php:59
631
+ msgid "Menu Search"
632
  msgstr ""
633
 
634
  #: ../admin/class-is-help.php:76
691
 
692
  #: ../admin/class-is-help.php:87
693
  msgid ""
694
+ "<strong>Options</strong> provides a place where you can customize overall "
695
  "behavior of this search form."
696
  msgstr ""
697
 
721
 
722
  #: ../admin/class-is-help.php:96
723
  msgid ""
724
+ "<strong>Menu Search</strong> provides a place where you can customize the "
725
  "behavior of search form added in the site navgation menu."
726
  msgstr ""
727
 
746
  msgid "For more information:"
747
  msgstr ""
748
 
749
+ #: ../admin/class-is-help.php:110 ../admin/partials/new-search-form.php:180
750
+ #: ../admin/partials/settings-form.php:90
751
  msgid "Docs"
752
  msgstr ""
753
 
754
+ #: ../admin/class-is-help.php:112 ../admin/partials/new-search-form.php:183
755
+ #: ../admin/partials/settings-form.php:93
756
  msgid "Give us a rating"
757
  msgstr ""
758
 
769
  msgstr ""
770
 
771
  #: ../admin/class-is-list-table.php:111 ../admin/class-is-list-table.php:174
772
+ #: ../admin/partials/new-search-form.php:153
773
  msgid "Delete"
774
  msgstr ""
775
 
779
  msgstr ""
780
 
781
  #: ../admin/class-is-list-table.php:150
782
+ #: ../admin/class-is-settings-fields.php:259
783
+ #: ../admin/class-is-settings-fields.php:432
784
+ #: ../admin/class-is-settings-fields.php:464 ../includes/class-is-widget.php:69
785
  msgid "Edit"
786
  msgstr ""
787
 
788
  #: ../admin/class-is-list-table.php:160
789
+ #: ../admin/partials/new-search-form.php:168
790
  msgid "Duplicate"
791
  msgstr ""
792
 
793
  #: ../admin/class-is-list-table.php:173
794
+ #: ../admin/partials/new-search-form.php:153
795
  msgid ""
796
  "You are about to delete this search form.\n"
797
  " 'Cancel' to stop, 'OK' to delete."
810
  msgid "d/m/Y"
811
  msgstr ""
812
 
813
+ #: ../admin/class-is-settings-fields.php:123
 
814
  msgid "Select Menu"
815
  msgstr ""
816
 
817
+ #: ../admin/class-is-settings-fields.php:130
818
+ #: ../includes/class-is-search-form.php:60
 
819
  msgid "Search Form"
820
  msgstr ""
821
 
822
+ #: ../admin/class-is-settings-fields.php:131
 
823
  msgid "Form Style"
824
  msgstr ""
825
 
826
+ #: ../admin/class-is-settings-fields.php:132
 
827
  msgid "Menu Title"
828
  msgstr ""
829
 
830
+ #: ../admin/class-is-settings-fields.php:133
 
831
  msgid "Menu Classes"
832
  msgstr ""
833
 
834
+ #: ../admin/class-is-settings-fields.php:134
 
835
  msgid "Google CSE"
836
  msgstr ""
837
 
838
+ #: ../admin/class-is-settings-fields.php:135
839
  msgid "Close Icon"
840
  msgstr ""
841
 
842
+ #: ../admin/class-is-settings-fields.php:139
843
  msgid "Header"
844
  msgstr ""
845
 
846
+ #: ../admin/class-is-settings-fields.php:140
847
  msgid "Footer"
848
  msgstr ""
849
 
850
+ #: ../admin/class-is-settings-fields.php:141
851
  msgid "Mobile Display"
852
  msgstr ""
853
 
854
+ #: ../admin/class-is-settings-fields.php:142
855
  msgid "Custom CSS"
856
  msgstr ""
857
 
858
+ #: ../admin/class-is-settings-fields.php:143
 
859
  msgid "Stopwords"
860
  msgstr ""
861
 
862
+ #: ../admin/class-is-settings-fields.php:144
 
863
  msgid "Synonyms"
864
  msgstr ""
865
 
866
+ #: ../admin/class-is-settings-fields.php:145
867
  msgid "Not load files"
868
  msgstr ""
869
 
870
+ #: ../admin/class-is-settings-fields.php:147
871
  msgid "Default Search"
872
  msgstr ""
873
 
874
+ #: ../admin/class-is-settings-fields.php:156
875
  msgid "Use below options to display search in menu and configure it."
876
  msgstr ""
877
 
878
+ #: ../admin/class-is-settings-fields.php:165
879
  msgid "Use below options to make sitewide changes in search."
880
  msgstr ""
881
 
882
+ #: ../admin/class-is-settings-fields.php:173
 
 
 
 
883
  msgid "Select menu here where you want to display search form."
884
  msgstr ""
885
 
886
+ #: ../admin/class-is-settings-fields.php:193
887
+ msgid "No navigation menu registered on your site."
888
  msgstr ""
889
 
 
890
  #: ../admin/class-is-settings-fields.php:203
891
+ msgid "Select post types here that you want to make searchable."
 
 
892
  msgstr ""
893
 
894
+ #: ../admin/class-is-settings-fields.php:232
895
+ msgid ""
896
+ "Select search form that will control search performed using menu search."
 
897
  msgstr ""
898
 
899
+ #: ../admin/class-is-settings-fields.php:234
900
  msgid "It overwrites above Post Types option."
901
  msgstr ""
902
 
903
+ #: ../admin/class-is-settings-fields.php:242
904
+ #: ../admin/class-is-settings-fields.php:252
905
+ #: ../admin/class-is-settings-fields.php:425
906
+ #: ../admin/class-is-settings-fields.php:457 ../includes/class-is-widget.php:62
907
+ msgid "none"
908
  msgstr ""
909
 
910
+ #: ../admin/class-is-settings-fields.php:261
911
+ #: ../admin/class-is-settings-fields.php:434
912
+ #: ../admin/class-is-settings-fields.php:466 ../includes/class-is-widget.php:71
913
+ msgid "Create New"
914
+ msgstr ""
915
+
916
+ #: ../admin/class-is-settings-fields.php:275
917
+ msgid "Select form style for the search form displayed in the menu."
918
+ msgstr ""
919
+
920
+ #: ../admin/class-is-settings-fields.php:279
921
  msgid "Default"
922
  msgstr ""
923
 
924
+ #: ../admin/class-is-settings-fields.php:280
925
  msgid "Dropdown"
926
  msgstr ""
927
 
928
+ #: ../admin/class-is-settings-fields.php:281
929
  msgid "Sliding"
930
  msgstr ""
931
 
932
+ #: ../admin/class-is-settings-fields.php:282
933
  msgid "Full Width"
934
  msgstr ""
935
 
936
+ #: ../admin/class-is-settings-fields.php:283
937
  msgid "Popup"
938
  msgstr ""
939
 
940
+ #: ../admin/class-is-settings-fields.php:316
 
 
 
 
941
  msgid ""
942
  "Displays set menu title text in place of search icon displays in navigation "
943
  "menu."
944
  msgstr ""
945
 
946
+ #: ../admin/class-is-settings-fields.php:328
947
+ msgid "Adds set classes in the search navigation menu item."
948
  msgstr ""
949
 
950
+ #: ../admin/class-is-settings-fields.php:333
951
+ msgid "Add classes seperated by space."
952
  msgstr ""
953
 
954
+ #: ../admin/class-is-settings-fields.php:341
955
  msgid ""
956
  "Add only Google Custom Search( CSE ) search form code in the above text box "
957
  "that will replace default search form."
958
  msgstr ""
959
 
960
+ #: ../admin/class-is-settings-fields.php:353
 
 
 
 
961
  msgid ""
962
+ "Note: Does not work with caching as this functionality uses the WordPress "
963
  "wp_is_mobile function."
964
  msgstr ""
965
 
966
+ #: ../admin/class-is-settings-fields.php:366
967
+ msgid "Display search form in header on mobile devices"
968
  msgstr ""
969
 
970
+ #: ../admin/class-is-settings-fields.php:369
971
  msgid ""
972
+ "Use this option to display search form in your site header and hide the "
973
+ "search form on desktop using CSS code."
974
  msgstr ""
975
 
976
+ #: ../admin/class-is-settings-fields.php:382
977
+ msgid "This site uses cache"
978
+ msgstr ""
979
+
980
+ #: ../admin/class-is-settings-fields.php:393
981
  msgid "Disable search functionality on whole site."
982
  msgstr ""
983
 
984
+ #: ../admin/class-is-settings-fields.php:404
985
  msgid ""
986
  "Do not use default search form to control WordPress default search "
987
  "functionality."
988
  msgstr ""
989
 
990
+ #: ../admin/class-is-settings-fields.php:413
991
  msgid "Displays search form in site header using wp_head hook."
992
  msgstr ""
993
 
994
+ #: ../admin/class-is-settings-fields.php:445
995
  msgid "Displays search form in site footer using wp_footer hook."
996
  msgstr ""
997
 
998
+ #: ../admin/class-is-settings-fields.php:486
999
  msgid "Display Search Form Close Icon"
1000
  msgstr ""
1001
 
1002
+ #: ../admin/class-is-settings-fields.php:494
1003
  msgid "Add custom css code if any to style search form."
1004
  msgstr ""
1005
 
1006
+ #: ../admin/class-is-settings-fields.php:507
 
 
 
 
1007
  msgid ""
1008
  "Enter words here to add them to the list of stopwords. The stopwords will "
1009
  "not be searched."
1010
  msgstr ""
1011
 
1012
+ #: ../admin/class-is-settings-fields.php:511
1013
+ msgid "Please separate words with commas."
 
 
 
 
 
 
1014
  msgstr ""
1015
 
1016
+ #: ../admin/class-is-settings-fields.php:519
1017
  msgid "Add synonyms here to make the searches find better results."
1018
  msgstr ""
1019
 
1020
+ #: ../admin/class-is-settings-fields.php:520
1021
  msgid ""
1022
  "If you add bird = crow to the list of synonyms, searches for bird "
1023
  "automatically become a search for bird crow and will thus match to posts "
1024
  "that include either bird or crow."
1025
  msgstr ""
1026
 
1027
+ #: ../admin/class-is-settings-fields.php:521
1028
  msgid ""
1029
  "This only works for search forms and in OR searches. In AND searches the "
1030
  "synonyms only restrict the search, as now the search only finds posts that "
1031
  "contain both bird and crow."
1032
  msgstr ""
1033
 
1034
+ #: ../admin/class-is-settings-fields.php:526
1035
+ msgid ""
1036
+ "The format here is key = value;. Please separate every synonyms key = value "
1037
+ "pairs with semicolon."
1038
+ msgstr ""
1039
+
1040
+ #: ../admin/class-is-settings-fields.php:536
1041
+ msgid "Disable synonyms for the search forms having AND search terms relation."
1042
+ msgstr ""
1043
+
1044
+ #: ../admin/class-is-settings-fields.php:545
1045
+ msgid "Configure to disable loading plugin CSS and JavaScript files."
1046
+ msgstr ""
1047
+
1048
+ #: ../admin/class-is-settings-fields.php:549
1049
  msgid "Plugin CSS File"
1050
  msgstr ""
1051
 
1052
+ #: ../admin/class-is-settings-fields.php:550
1053
  msgid "Plugin JavaScript File"
1054
  msgstr ""
1055
 
1056
+ #: ../admin/class-is-settings-fields.php:570
1057
  msgid ""
1058
  "If checked, you have to add following plugin file code into your child theme "
1059
  "CSS file."
1060
  msgstr ""
1061
 
1062
+ #: ../admin/class-is-settings-fields.php:574
1063
  msgid ""
1064
  "If checked, you have to add following plugin files code into your child "
1065
  "theme JavaScript file."
1066
  msgstr ""
1067
 
1068
+ #: ../admin/partials/new-search-form.php:23
1069
  msgid "Edit Search Form"
1070
  msgstr ""
1071
 
1072
+ #: ../admin/partials/new-search-form.php:66
1073
+ msgid "Enter search form name"
1074
  msgstr ""
1075
 
1076
+ #: ../admin/partials/new-search-form.php:89
1077
  msgid ""
1078
  "Copy this shortcode and paste it into your post, page, or text widget "
1079
  "content:"
1080
  msgstr ""
1081
 
1082
+ #: ../admin/partials/new-search-form.php:162
1083
+ msgid "Save"
 
1084
  msgstr ""
1085
 
1086
+ #: ../admin/partials/new-search-form.php:177
1087
+ #: ../admin/partials/settings-form.php:87
1088
  msgid "Information"
1089
  msgstr ""
1090
 
1091
+ #: ../admin/partials/new-search-form.php:182
1092
+ #: ../admin/partials/settings-form.php:92
1093
  msgid "Contact"
1094
  msgstr ""
1095
 
1096
+ #: ../includes/class-is-search-form.php:111
1097
+ #: ../includes/class-is-search-form.php:223
 
 
 
 
 
 
 
 
 
 
 
1098
  msgid "Untitled"
1099
  msgstr ""
1100
 
1101
+ #: ../includes/class-is-search-form.php:149
1102
  #, php-format
1103
  msgid ""
1104
  "<code>%1$s</code> property of a <code>IS_Search_Form</code> object is "
1109
  msgid "Displays ivory search form."
1110
  msgstr ""
1111
 
1112
+ #: ../includes/freemius.php:59
1113
  #, php-format
1114
  msgid "Hey %1$s"
1115
  msgstr ""
1116
 
1117
+ #: ../includes/freemius.php:59
1118
  #, php-format
1119
  msgid ""
1120
  "Please help us improve %2$s by securely sharing some usage data with %5$s. "
public/class-is-public.php CHANGED
@@ -77,7 +77,7 @@ class IS_Public
77
  IS_VERSION,
78
  true
79
  );
80
- if ( is_search() && isset( $wp_query->query_vars['_is_settings']['highlight_terms'] ) ) {
81
  wp_enqueue_script(
82
  'is-highlight',
83
  plugins_url( '/public/js/is-highlight.js', IS_PLUGIN_FILE ),
@@ -89,7 +89,7 @@ class IS_Public
89
  }
90
 
91
 
92
- if ( is_search() && isset( $wp_query->query_vars['_is_settings']['highlight_terms'] ) ) {
93
  wp_enqueue_script(
94
  'is-highlight',
95
  plugins_url( '/public/js/is-highlight.js', IS_PLUGIN_FILE ),
@@ -144,12 +144,8 @@ class IS_Public
144
  return '[ivory-search]';
145
  }
146
  $atts = shortcode_atts( array(
147
- 'id' => 0,
148
- 'title' => '',
149
- 'html_id' => '',
150
- 'html_name' => '',
151
- 'html_class' => '',
152
- 'output' => 'form',
153
  ), $atts, 'ivory-search' );
154
  $id = (int) $atts['id'];
155
  $title = trim( $atts['title'] );
@@ -222,13 +218,7 @@ class IS_Public
222
  }
223
 
224
  /**
225
- * Display search form.
226
- *
227
- * Will first attempt to locate the searchform.php file in either the child or
228
- * the parent, then load it. If it doesn't exist, then the default search form
229
- * will be displayed. The default search form is HTML, which will be displayed.
230
- * There is a filter applied to the search form HTML in order to edit or replace
231
- * it. The filter is {@see 'get_search_form'}.
232
  *
233
  * @since 4.0
234
  *
@@ -240,45 +230,10 @@ class IS_Public
240
  /**
241
  * Fires before the search form is retrieved, at the start of get_search_form().
242
  */
243
- do_action( 'pre_get_search_form' );
244
  do_action( 'pre_get_menu_search_form' );
245
- $format = ( current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml' );
246
- /**
247
- * Filters the HTML format of the search form.
248
- *
249
- * @param string $format The type of markup to use in the search form.
250
- * Accepts 'html5', 'xhtml'.
251
- */
252
- $format = apply_filters( 'search_form_format', $format );
253
- $format = apply_filters( 'menu_search_form_format', $format );
254
- $search_form_template = locate_template( 'searchform.php' );
255
-
256
- if ( '' !== $search_form_template ) {
257
- ob_start();
258
- require $search_form_template;
259
- $form = ob_get_clean();
260
- } else {
261
-
262
- if ( 'html5' == $format ) {
263
- $form = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '">
264
- <label>
265
- <span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
266
- <input type="search" class="search-field" placeholder="' . esc_attr_x( 'Search &hellip;', 'placeholder' ) . '" value="' . get_search_query() . '" name="s" />
267
- </label>
268
- <input type="submit" class="search-submit" value="' . esc_attr_x( 'Search', 'submit button' ) . '" />
269
- </form>';
270
- } else {
271
- $form = '<form role="search" method="get" id="searchform" class="searchform" action="' . esc_url( home_url( '/' ) ) . '">
272
- <div>
273
- <label class="screen-reader-text" for="s">' . _x( 'Search for:', 'label' ) . '</label>
274
- <input type="text" value="' . get_search_query() . '" name="s" id="s" />
275
- <input type="submit" id="searchsubmit" value="' . esc_attr_x( 'Search', 'submit button' ) . '" />
276
- </div>
277
- </form>';
278
- }
279
-
280
- }
281
-
282
  /**
283
  * Filters the HTML output of the search form.
284
  *
@@ -445,17 +400,27 @@ class IS_Public
445
 
446
  if ( 'm' === $is_id ) {
447
  $check_value = ( isset( $this->opt['menu_search_form'] ) ? $this->opt['menu_search_form'] : 0 );
 
448
  if ( !$check_value ) {
 
449
 
450
  if ( isset( $this->opt['menu_posts'] ) ) {
451
  $query->set( 'post_type', $this->opt['menu_posts'] );
 
452
  } else {
 
453
  if ( !$this->ivory_search && isset( $this->opt['add_search_to_menu_posts'] ) ) {
454
  $query->set( 'post_type', $this->opt['add_search_to_menu_posts'] );
 
455
  }
 
 
 
 
 
456
  }
457
-
458
  }
 
459
  }
460
 
461
 
77
  IS_VERSION,
78
  true
79
  );
80
+ if ( is_search() && isset( $wp_query->query_vars['_is_settings']['highlight_terms'] ) && 0 !== $wp_query->found_posts ) {
81
  wp_enqueue_script(
82
  'is-highlight',
83
  plugins_url( '/public/js/is-highlight.js', IS_PLUGIN_FILE ),
89
  }
90
 
91
 
92
+ if ( is_search() && isset( $wp_query->query_vars['_is_settings']['highlight_terms'] ) && 0 !== $wp_query->found_posts ) {
93
  wp_enqueue_script(
94
  'is-highlight',
95
  plugins_url( '/public/js/is-highlight.js', IS_PLUGIN_FILE ),
144
  return '[ivory-search]';
145
  }
146
  $atts = shortcode_atts( array(
147
+ 'id' => 0,
148
+ 'title' => '',
 
 
 
 
149
  ), $atts, 'ivory-search' );
150
  $id = (int) $atts['id'];
151
  $title = trim( $atts['title'] );
218
  }
219
 
220
  /**
221
+ * Displays menu search form.
 
 
 
 
 
 
222
  *
223
  * @since 4.0
224
  *
230
  /**
231
  * Fires before the search form is retrieved, at the start of get_search_form().
232
  */
 
233
  do_action( 'pre_get_menu_search_form' );
234
+ remove_filter( 'get_search_form', array( IS_Public::getInstance(), 'get_search_form' ), 99 );
235
+ $form = get_search_form( false );
236
+ add_filter( 'get_search_form', array( IS_Public::getInstance(), 'get_search_form' ), 99 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  /**
238
  * Filters the HTML output of the search form.
239
  *
400
 
401
  if ( 'm' === $is_id ) {
402
  $check_value = ( isset( $this->opt['menu_search_form'] ) ? $this->opt['menu_search_form'] : 0 );
403
+
404
  if ( !$check_value ) {
405
+ $attachment = array();
406
 
407
  if ( isset( $this->opt['menu_posts'] ) ) {
408
  $query->set( 'post_type', $this->opt['menu_posts'] );
409
+ $attachment = $this->opt['menu_posts'];
410
  } else {
411
+
412
  if ( !$this->ivory_search && isset( $this->opt['add_search_to_menu_posts'] ) ) {
413
  $query->set( 'post_type', $this->opt['add_search_to_menu_posts'] );
414
+ $attachment = $this->opt['add_search_to_menu_posts'];
415
  }
416
+
417
+ }
418
+
419
+ if ( !empty($attachment) && in_array( 'attachment', $attachment ) ) {
420
+ $query->set( 'post_status', array( 'publish', 'inherit' ) );
421
  }
 
422
  }
423
+
424
  }
425
 
426
 
readme.txt CHANGED
@@ -5,11 +5,11 @@ Tags: search, search menu, woocommerce search, search plugin, search shortcode,
5
  Requires at least: 3.9
6
  Tested up to: 4.9
7
  Requires PHP: 5.2.4
8
- Stable tag: 4.0
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
12
- Ivory Search enhances the WordPress search and provides you the options and tools you need to create an advanced powerful search for your site.
13
 
14
  == Description ==
15
 
@@ -122,14 +122,40 @@ Please read below documentation to know how to use Ivory Search plugin.
122
 
123
  https://ivorysearch.com/knowledge-base/how-to-use-ivory-search-plugin/
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  == Screenshots ==
126
 
127
  1. Includes section controls what content on the site to make searchable for the search form.
128
  2. Excludes section controls what content on the site to exclude from search for the search form.
129
- 3. Search form settings section customizes overall behavior of the search form.
130
  4. Ivory Search plugin options in the admin menu.
131
- 5. Search To Menu section provides options to customize the behavior of search form added in the site navigation menu.
132
- 6. Settings section of the settings page provides options to configure sitewide search functionality that affects all search forms.
133
  7. Displays default search form in the menu.
134
  8. Displays dropdown search form in the menu.
135
  9. Displays sliding search form in the menu.
@@ -137,6 +163,13 @@ https://ivorysearch.com/knowledge-base/how-to-use-ivory-search-plugin/
137
 
138
  == Changelog ==
139
 
 
 
 
 
 
 
 
140
  = 4.0 =
141
  * Renamed plugin from "Add Search To Menu" to "Ivory Search".
142
  * Changed old settings page from Settings -> Add Search To Menu to Ivory Search -> Settings
@@ -176,4 +209,4 @@ https://ivorysearch.com/knowledge-base/how-to-use-ivory-search-plugin/
176
  * This is a major update.
177
  * Renamed plugin from "Add Search To Menu" to "Ivory Search".
178
  * Changed old settings page from Settings -> Add Search To Menu to Ivory Search -> Settings
179
- * Developed lot of options to enhance search functionality.
5
  Requires at least: 3.9
6
  Tested up to: 4.9
7
  Requires PHP: 5.2.4
8
+ Stable tag: 4.1
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
12
+ The Ultimate WordPress Search plugin to power your custom search. Helping you build a better search. Includes WooCommerce Search support!
13
 
14
  == Description ==
15
 
122
 
123
  https://ivorysearch.com/knowledge-base/how-to-use-ivory-search-plugin/
124
 
125
+ = Is the plugin compatible with WooCommerce? =
126
+
127
+ It is! Ivory Search integrates directly with WooCommerce to provide a powerful and advanced WooCommerce Search. Not only can you use Fuzzy searching, you can exclude specific WooCommerce products from search, include specific WooCommerce products in your search and much much more.
128
+
129
+ If you need more advanced WooCommerce Search functionality, upgrade to Ivory Search premium which provides WooCommerce SKU searching and even more powerful WooCommerce Search functionality.
130
+
131
+ = Can I Add Search to Menu? =
132
+
133
+ Sure thing! Using our advanced custom search plugin you can easily add your search to menu in just a couple of clicks, be up and running in minutes and never look back.
134
+
135
+ = What About Search Shortcodes? =
136
+
137
+ Glad you asked! Ivory Search provides a range of search shortcodes you can use, best of all you can create an unlimited number of custom search forms and then embed them on your WordPress site using our powerful and easy to use range of Search Shortcodes.
138
+
139
+ = Don’t suppose you have Search Widgets? =
140
+
141
+ We do have Search Widgets! Using Ivory Search you can add a custom search widget to your WordPress powered website quickly and easily, with minimal hassle. Simply add your custom search form. Then head on over to your widgets area and add your custom search widget in a couple of clicks. Couldn’t get much easier than that. What’s more, the custom search widget works completely out the box with any theme.
142
+
143
+ = Will My Custom Search Work With My Theme? =
144
+
145
+ Ivory Search, has been tested and works perfectly with a range of themes, including but by no means limited to Divi, allowing you to build a custom search with Divi, Avada, X and Pro by Themeco, GeneratePress, OceanWP and many more.
146
+
147
+ = Do You Offer Customization Support? =
148
+
149
+ We do! We try our best to help free users with customisation requests and we offer guaranteed CSS customisations for our premium users.
150
+
151
  == Screenshots ==
152
 
153
  1. Includes section controls what content on the site to make searchable for the search form.
154
  2. Excludes section controls what content on the site to exclude from search for the search form.
155
+ 3. Options section customizes overall behavior of the search form.
156
  4. Ivory Search plugin options in the admin menu.
157
+ 5. Menu Search section provides options to customize the behavior of search form added in the site navigation menu.
158
+ 6. Settings section provides options to configure sitewide search functionality that affects all search forms.
159
  7. Displays default search form in the menu.
160
  8. Displays dropdown search form in the menu.
161
  9. Displays sliding search form in the menu.
163
 
164
  == Changelog ==
165
 
166
+ = 4.1 =
167
+ * Improved plugin settings User Interface.
168
+ * Added compatibility with Polylang plugin.
169
+
170
+ = 4.0.1 =
171
+ * Fixed menu search form attachment search issue.
172
+
173
  = 4.0 =
174
  * Renamed plugin from "Add Search To Menu" to "Ivory Search".
175
  * Changed old settings page from Settings -> Add Search To Menu to Ivory Search -> Settings
209
  * This is a major update.
210
  * Renamed plugin from "Add Search To Menu" to "Ivory Search".
211
  * Changed old settings page from Settings -> Add Search To Menu to Ivory Search -> Settings
212
+ * Developed lot of options to enhance search functionality.