Ivory Search – WordPress Search Plugin - Version 4.4.5

Version Description

  • Improved - Made SVG icons Accessibility Ready.
  • Improved - Search dropdown should not close on clicking on AJAX search results.
  • Fixed - AJAX search results Undefined index notices.
Download this release

Release Info

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

Code changes from version 4.4.4 to 4.4.5

add-search-to-menu.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Ivory Search
4
  * Plugin URI: https://ivorysearch.com
5
  * Description: The WordPress Search plugin that includes Search Form Customizer, WooCommerce Search, Image Search, Search Shortcode, AJAX Search & Live Search support!
6
- * Version: 4.4.4
7
  * Author: Ivory Search
8
  * Author URI: https://ivorysearch.com/
9
  * License: GPL2+
@@ -106,7 +106,7 @@ final class Ivory_Search {
106
  */
107
  private function define_constants() {
108
 
109
- define( 'IS_VERSION', '4.4.4' );
110
  define( 'IS_PLUGIN_FILE', __FILE__ );
111
  define( 'IS_PLUGIN_BASE', plugin_basename( IS_PLUGIN_FILE ) );
112
  define( 'IS_PLUGIN_DIR', plugin_dir_path( IS_PLUGIN_FILE ) );
3
  * Plugin Name: Ivory Search
4
  * Plugin URI: https://ivorysearch.com
5
  * Description: The WordPress Search plugin that includes Search Form Customizer, WooCommerce Search, Image Search, Search Shortcode, AJAX Search & Live Search support!
6
+ * Version: 4.4.5
7
  * Author: Ivory Search
8
  * Author URI: https://ivorysearch.com/
9
  * License: GPL2+
106
  */
107
  private function define_constants() {
108
 
109
+ define( 'IS_VERSION', '4.4.5' );
110
  define( 'IS_PLUGIN_FILE', __FILE__ );
111
  define( 'IS_PLUGIN_BASE', plugin_basename( IS_PLUGIN_FILE ) );
112
  define( 'IS_PLUGIN_DIR', plugin_dir_path( IS_PLUGIN_FILE ) );
includes/class-is-search-form.php CHANGED
@@ -486,7 +486,7 @@ class IS_Search_Form {
486
  }
487
  $result .= '</label>';
488
  if ( 'is-form-style-3' === $form_style ) {
489
- $result .= '<button type="submit" class="is-search-submit"><span class="is-search-icon"><svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24px"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg></span></button>';
490
  } else if ( 'is-form-style-2' !== $form_style ) {
491
  $result .= '<input type="submit" value="' . esc_html( $search_btn_text ) . '" class="is-search-submit" />';
492
  }
486
  }
487
  $result .= '</label>';
488
  if ( 'is-form-style-3' === $form_style ) {
489
+ $result .= '<button type="submit" class="is-search-submit"><span class="is-search-icon"><svg focusable="false" aria-label="' . __( "Search", "ivory-search" ) . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24px"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg></span></button>';
490
  } else if ( 'is-form-style-2' !== $form_style ) {
491
  $result .= '<input type="submit" value="' . esc_html( $search_btn_text ) . '" class="is-search-submit" />';
492
  }
languages/default.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ivory Search\n"
4
- "POT-Creation-Date: 2019-12-19 21:05+0530\n"
5
- "PO-Revision-Date: 2019-12-19 21:05+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Ivory Search <admin@ivorysearch.com>\n"
8
  "Language: en_US\n"
@@ -524,7 +524,7 @@ msgstr ""
524
  msgid "Search Form Customizer"
525
  msgstr ""
526
 
527
- #: ../admin/class-is-editor.php:716
528
  msgid "Nothing found"
529
  msgstr ""
530
 
@@ -668,7 +668,7 @@ msgstr ""
668
  msgid "Stock Status"
669
  msgstr ""
670
 
671
- #: ../admin/class-is-editor.php:991
672
  msgid "Featured Icon"
673
  msgstr ""
674
 
@@ -1447,6 +1447,8 @@ msgstr ""
1447
 
1448
  #: ../includes/class-is-admin-public.php:183
1449
  #: ../includes/class-is-search-form.php:449
 
 
1450
  msgid "Search"
1451
  msgstr ""
1452
 
@@ -1518,34 +1520,34 @@ msgstr ""
1518
  msgid "Select Search Form"
1519
  msgstr ""
1520
 
1521
- #: ../public/class-is-ajax.php:75
1522
  msgid "More results"
1523
  msgstr ""
1524
 
1525
- #: ../public/class-is-ajax.php:94 ../public/class-is-ajax.php:495
1526
  msgid "Tag"
1527
  msgstr ""
1528
 
1529
- #: ../public/class-is-ajax.php:104 ../public/class-is-ajax.php:493
1530
  msgid "Category"
1531
  msgstr ""
1532
 
1533
- #: ../public/class-is-ajax.php:674
1534
  msgid "<i>Tagged with:</i> "
1535
  msgstr ""
1536
 
1537
- #: ../public/class-is-ajax.php:699
1538
  msgid "<i>Categories:</i> "
1539
  msgstr ""
1540
 
1541
- #: ../public/class-is-ajax.php:760
1542
  msgid "In stock"
1543
  msgstr ""
1544
 
1545
- #: ../public/class-is-ajax.php:760
1546
  msgid "Out of stock"
1547
  msgstr ""
1548
 
1549
- #: ../public/class-is-ajax.php:827
1550
  msgid "Sale!"
1551
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ivory Search\n"
4
+ "POT-Creation-Date: 2019-12-24 21:30+0530\n"
5
+ "PO-Revision-Date: 2019-12-24 21:30+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Ivory Search <admin@ivorysearch.com>\n"
8
  "Language: en_US\n"
524
  msgid "Search Form Customizer"
525
  msgstr ""
526
 
527
+ #: ../admin/class-is-editor.php:716 ../public/class-is-ajax.php:67
528
  msgid "Nothing found"
529
  msgstr ""
530
 
668
  msgid "Stock Status"
669
  msgstr ""
670
 
671
+ #: ../admin/class-is-editor.php:991 ../public/class-is-ajax.php:603
672
  msgid "Featured Icon"
673
  msgstr ""
674
 
1447
 
1448
  #: ../includes/class-is-admin-public.php:183
1449
  #: ../includes/class-is-search-form.php:449
1450
+ #: ../includes/class-is-search-form.php:489 ../public/class-is-public.php:230
1451
+ #: ../public/class-is-public.php:273
1452
  msgid "Search"
1453
  msgstr ""
1454
 
1520
  msgid "Select Search Form"
1521
  msgstr ""
1522
 
1523
+ #: ../public/class-is-ajax.php:69
1524
  msgid "More results"
1525
  msgstr ""
1526
 
1527
+ #: ../public/class-is-ajax.php:97 ../public/class-is-ajax.php:498
1528
  msgid "Tag"
1529
  msgstr ""
1530
 
1531
+ #: ../public/class-is-ajax.php:107 ../public/class-is-ajax.php:496
1532
  msgid "Category"
1533
  msgstr ""
1534
 
1535
+ #: ../public/class-is-ajax.php:677
1536
  msgid "<i>Tagged with:</i> "
1537
  msgstr ""
1538
 
1539
+ #: ../public/class-is-ajax.php:702
1540
  msgid "<i>Categories:</i> "
1541
  msgstr ""
1542
 
1543
+ #: ../public/class-is-ajax.php:763
1544
  msgid "In stock"
1545
  msgstr ""
1546
 
1547
+ #: ../public/class-is-ajax.php:763
1548
  msgid "Out of stock"
1549
  msgstr ""
1550
 
1551
+ #: ../public/class-is-ajax.php:830
1552
  msgid "Sale!"
1553
  msgstr ""
public/class-is-ajax.php CHANGED
@@ -56,23 +56,26 @@ class IS_Ajax {
56
  $posts_per_page = isset( $is_settings['posts_per_page'] ) ? $is_settings['posts_per_page'] : 10;
57
 
58
  $defaults = array(
 
59
  'description_source' => 'content',
60
  'description_length' => 20,
61
  'show_image' => 0,
62
- 'show_description' => 0,
63
- 'show_price' => 0,
64
- 'hide_price_out_of_stock' => 0,
65
  'show_categories' => 0,
66
  'show_tags' => 0,
 
 
 
 
 
 
 
67
  'show_sale_badge' => 0,
68
  'show_sku' => 0,
69
  'show_stock_status' => 0,
70
  'show_featured_icon' => 0,
71
- 'show_matching_categories' => 0,
72
  'show_matching_tags' => 0,
73
- 'show_more_result' => false,
74
- 'show_details_box' => false,
75
- 'more_result_text' => __( 'More results', 'ivory-search' ),
76
  );
77
 
78
  $field = wp_parse_args( $stored_field, $defaults );
@@ -597,7 +600,7 @@ class IS_Ajax {
597
  <div class="is-title">
598
  <a href="<?php echo get_the_permalink( $post->ID ); ?>">
599
  <?php if( $product && isset( $field['show_featured_icon'] ) && $field['show_featured_icon'] && $product->is_featured() ) { ?>
600
- <svg class="is-featured-icon" version="1.1" viewBox="0 0 20 21" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink">
601
  <g fill-rule="evenodd" stroke="none" stroke-width="1"><g transform="translate(-296.000000, -422.000000)"><g transform="translate(296.000000, 422.500000)"><path d="M10,15.273 L16.18,19 L14.545,11.971 L20,7.244 L12.809,6.627 L10,0 L7.191,6.627 L0,7.244 L5.455,11.971 L3.82,19 L10,15.273 Z"></path></g></g></g>
602
  </svg>
603
  <?php } ?>
@@ -617,7 +620,7 @@ class IS_Ajax {
617
  * @return void
618
  */
619
  function author_markup( $field ) {
620
- if( $field['show_author'] ) { ?>
621
  <span class="author vcard">
622
  <?php _ex( '<i>By</i> ', 'Article written by', 'ivory-search' ); ?>
623
  <a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>">
@@ -637,7 +640,7 @@ class IS_Ajax {
637
  * @return void
638
  */
639
  function date_markup( $field, $post ) {
640
- if ( $field['show_date'] ) { ?>
641
  <span class="meta-date">
642
  <span class="posted-on">
643
  <?php
56
  $posts_per_page = isset( $is_settings['posts_per_page'] ) ? $is_settings['posts_per_page'] : 10;
57
 
58
  $defaults = array(
59
+ 'show_description' => 0,
60
  'description_source' => 'content',
61
  'description_length' => 20,
62
  'show_image' => 0,
 
 
 
63
  'show_categories' => 0,
64
  'show_tags' => 0,
65
+ 'show_author' => 0,
66
+ 'show_date' => 0,
67
+ 'nothing_found_text' => __( 'Nothing found', 'ivory-search' ),
68
+ 'show_more_result' => 1,
69
+ 'more_result_text' => __( 'More results', 'ivory-search' ),
70
+ 'show_price' => 1,
71
+ 'hide_price_out_of_stock' => 0,
72
  'show_sale_badge' => 0,
73
  'show_sku' => 0,
74
  'show_stock_status' => 0,
75
  'show_featured_icon' => 0,
76
+ 'show_matching_categories' => 1,
77
  'show_matching_tags' => 0,
78
+ 'show_details_box' => 1,
 
 
79
  );
80
 
81
  $field = wp_parse_args( $stored_field, $defaults );
600
  <div class="is-title">
601
  <a href="<?php echo get_the_permalink( $post->ID ); ?>">
602
  <?php if( $product && isset( $field['show_featured_icon'] ) && $field['show_featured_icon'] && $product->is_featured() ) { ?>
603
+ <svg class="is-featured-icon" focusable="false" aria-label="<?php _e( "Featured Icon", "ivory-search" ); ?>" version="1.1" viewBox="0 0 20 21" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink">
604
  <g fill-rule="evenodd" stroke="none" stroke-width="1"><g transform="translate(-296.000000, -422.000000)"><g transform="translate(296.000000, 422.500000)"><path d="M10,15.273 L16.18,19 L14.545,11.971 L20,7.244 L12.809,6.627 L10,0 L7.191,6.627 L0,7.244 L5.455,11.971 L3.82,19 L10,15.273 Z"></path></g></g></g>
605
  </svg>
606
  <?php } ?>
620
  * @return void
621
  */
622
  function author_markup( $field ) {
623
+ if ( isset( $field['show_author'] ) && $field['show_author'] ) { ?>
624
  <span class="author vcard">
625
  <?php _ex( '<i>By</i> ', 'Article written by', 'ivory-search' ); ?>
626
  <a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>">
640
  * @return void
641
  */
642
  function date_markup( $field, $post ) {
643
+ if ( isset( $field['show_date'] ) && $field['show_date'] ) { ?>
644
  <span class="meta-date">
645
  <span class="posted-on">
646
  <?php
public/class-is-public.php CHANGED
@@ -238,7 +238,7 @@ class IS_Public
238
  $items .= '<a title="' . esc_attr( $title ) . '" href="#">';
239
 
240
  if ( '' == $title ) {
241
- $items .= '<svg width="20" height="20" class="search-icon" role="img" viewBox="2 9 20 5">
242
  <path class="search-icon-path" d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg>';
243
  } else {
244
  $items .= $title;
@@ -282,7 +282,7 @@ class IS_Public
282
  $items .= '<a title="' . esc_attr( $title ) . '" href="#">';
283
 
284
  if ( '' == $title ) {
285
- $items .= '<svg width="20" height="20" class="search-icon" role="img" viewBox="2 9 20 5">
286
  <path class="search-icon-path" d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg>';
287
  } else {
288
  $items .= $title;
238
  $items .= '<a title="' . esc_attr( $title ) . '" href="#">';
239
 
240
  if ( '' == $title ) {
241
+ $items .= '<svg width="20" height="20" class="search-icon" role="img" viewBox="2 9 20 5" focusable="false" aria-label="' . __( "Search", "ivory-search" ) . '">
242
  <path class="search-icon-path" d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg>';
243
  } else {
244
  $items .= $title;
282
  $items .= '<a title="' . esc_attr( $title ) . '" href="#">';
283
 
284
  if ( '' == $title ) {
285
+ $items .= '<svg width="20" height="20" class="search-icon" role="img" viewBox="2 9 20 5" focusable="false" aria-label="' . __( "Search", "ivory-search" ) . '">
286
  <path class="search-icon-path" d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg>';
287
  } else {
288
  $items .= $title;
public/js/ivory-ajax-search.js CHANGED
@@ -6,6 +6,7 @@
6
  var old_search_term = '';
7
  var old_form_id = -1;
8
  var ajax;
 
9
 
10
  $('body').on('hover', '.is-ajax-search-tags > div, .is-ajax-search-categories > div, .is-ajax-search-post.is-product', function(event) {
11
 
@@ -42,6 +43,7 @@
42
  });
43
 
44
  $('.is-ajax-search .is-search-input').on('focusin, click', function(event) {
 
45
  if ( 0 === $(event.target).closest('form.processing').length ) {
46
  var form_id = $( event.target ).closest('.is-ajax-search').attr('data-form-id');
47
  var pos = $( event.target ).closest('.is-ajax-search').offset();
@@ -107,7 +109,6 @@
107
  });
108
 
109
  $(window).on('resize scroll', function(){
110
- var focused = $( document.activeElement ).closest('form');;
111
  if ( $( focused ).hasClass( 'is-ajax-search' ) ) {
112
  var form_id = $( focused ).attr( 'data-form-id' );
113
  var pos = $( focused ).offset();
@@ -143,6 +144,7 @@
143
 
144
  $('.is-ajax-search').each(function(index, el) {
145
  $( el ).find('.is-search-input').on('keyup', function( event ) {
 
146
  if ( 32 !== event.which ) {
147
  var self = this;
148
  window.clearTimeout( _ref );
6
  var old_search_term = '';
7
  var old_form_id = -1;
8
  var ajax;
9
+ var focused = $( document.activeElement ).closest('form');
10
 
11
  $('body').on('hover', '.is-ajax-search-tags > div, .is-ajax-search-categories > div, .is-ajax-search-post.is-product', function(event) {
12
 
43
  });
44
 
45
  $('.is-ajax-search .is-search-input').on('focusin, click', function(event) {
46
+ focused = $( this ).closest('form');
47
  if ( 0 === $(event.target).closest('form.processing').length ) {
48
  var form_id = $( event.target ).closest('.is-ajax-search').attr('data-form-id');
49
  var pos = $( event.target ).closest('.is-ajax-search').offset();
109
  });
110
 
111
  $(window).on('resize scroll', function(){
 
112
  if ( $( focused ).hasClass( 'is-ajax-search' ) ) {
113
  var form_id = $( focused ).attr( 'data-form-id' );
114
  var pos = $( focused ).offset();
144
 
145
  $('.is-ajax-search').each(function(index, el) {
146
  $( el ).find('.is-search-input').on('keyup', function( event ) {
147
+ focused = $( this ).closest('form');
148
  if ( 32 !== event.which ) {
149
  var self = this;
150
  window.clearTimeout( _ref );
public/js/ivory-search.js CHANGED
@@ -53,7 +53,7 @@
53
  } );
54
 
55
  $( window ).click( function( e ) {
56
- if ( 0 === e.button ) {
57
  if ( $( '.is-menu' ).hasClass( 'open' ) ) {
58
  $( '.is-menu form' ).animate(
59
  { width: '0' },
53
  } );
54
 
55
  $( window ).click( function( e ) {
56
+ if ( 0 === e.button && ! $( e.target ).closest( '.is-ajax-search-result' ).length && ! $( e.target ).closest( '.is-ajax-search-details' ).length ) {
57
  if ( $( '.is-menu' ).hasClass( 'open' ) ) {
58
  $( '.is-menu form' ).animate(
59
  { width: '0' },
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: search, woocommerce search, image search, ajax search, search shortcode, l
5
  Requires at least: 3.9
6
  Tested up to: 5.3
7
  Requires PHP: 5.2.4
8
- Stable tag: 4.4.4
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -192,6 +192,11 @@ Yes we do. We try our best to help free users with customisation requests and we
192
 
193
  == Changelog ==
194
 
 
 
 
 
 
195
  = 4.4.4 =
196
  * Fixed - Search form AJAX options not working.
197
 
5
  Requires at least: 3.9
6
  Tested up to: 5.3
7
  Requires PHP: 5.2.4
8
+ Stable tag: 4.4.5
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
192
 
193
  == Changelog ==
194
 
195
+ = 4.4.5 =
196
+ * Improved - Made SVG icons Accessibility Ready.
197
+ * Improved - Search dropdown should not close on clicking on AJAX search results.
198
+ * Fixed - AJAX search results Undefined index notices.
199
+
200
  = 4.4.4 =
201
  * Fixed - Search form AJAX options not working.
202