Version Description
- Fixed - Search form AJAX options not working.
Download this release
Release Info
Developer | vinod dalvi |
Plugin | Ivory Search – WordPress Search Plugin |
Version | 4.4.4 |
Comparing to | |
See all releases |
Code changes from version 4.4.3 to 4.4.4
- add-search-to-menu.php +2 -2
- languages/default.po +2 -2
- public/class-is-ajax.php +19 -19
- readme.txt +4 -1
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.
|
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.
|
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.4
|
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.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 ) );
|
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-
|
5 |
-
"PO-Revision-Date: 2019-12-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Ivory Search <admin@ivorysearch.com>\n"
|
8 |
"Language: en_US\n"
|
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"
|
public/class-is-ajax.php
CHANGED
@@ -78,7 +78,7 @@ class IS_Ajax {
|
|
78 |
$field = wp_parse_args( $stored_field, $defaults );
|
79 |
$posts_class = 'is-show-details-disabled';
|
80 |
|
81 |
-
if( isset( $field['show_details_box'] ) ) {
|
82 |
$posts_class = 'is-show-details-enabled';
|
83 |
}
|
84 |
?>
|
@@ -87,7 +87,7 @@ class IS_Ajax {
|
|
87 |
<?php } ?>
|
88 |
<?php
|
89 |
// Show matching tags.
|
90 |
-
if( isset( $field['show_matching_tags'] ) && 1 == $page ) {
|
91 |
$this->term_title_markup( array(
|
92 |
'taxonomy' => 'product_tag',
|
93 |
'search_term' => $search_term,
|
@@ -97,7 +97,7 @@ class IS_Ajax {
|
|
97 |
}
|
98 |
|
99 |
// Show matching categories.
|
100 |
-
if( isset( $field['show_matching_categories'] ) && 1 == $page ) {
|
101 |
$this->term_title_markup( array(
|
102 |
'taxonomy' => 'product_cat',
|
103 |
'search_term' => $search_term,
|
@@ -130,7 +130,7 @@ class IS_Ajax {
|
|
130 |
if( 'product' === $post->post_type && function_exists( 'wc_get_product' ) ) {
|
131 |
$product = wc_get_product( $post->ID );
|
132 |
$product_class = 'is-product';
|
133 |
-
if ( isset( $field['show_sale_badge'] ) ) {
|
134 |
$on_sale = ( $product->is_in_stock() ) ? $product->is_on_sale() : '';
|
135 |
if ( $on_sale ) {
|
136 |
$product_class .= ' is-has-badge';
|
@@ -211,13 +211,13 @@ class IS_Ajax {
|
|
211 |
?>
|
212 |
</div>
|
213 |
<?php } ?>
|
214 |
-
<?php if( isset( $field['show_details_box'] ) ) { ?>
|
215 |
<div id="is-ajax-search-details-<?php echo $search_post_id; ?>" class="is-ajax-search-details">
|
216 |
<div class="is-ajax-search-items">
|
217 |
<?php
|
218 |
if ( 1 == $page ) {
|
219 |
// Show product details by "tags".
|
220 |
-
if( isset( $field['show_matching_tags'] ) ) {
|
221 |
$this->product_details_markup( array(
|
222 |
'taxonomy' => 'product_tag',
|
223 |
'search_term' => $search_term,
|
@@ -229,7 +229,7 @@ class IS_Ajax {
|
|
229 |
|
230 |
<?php
|
231 |
// Show product details by "categories".
|
232 |
-
if( isset( $field['show_matching_categories'] ) ) {
|
233 |
$this->product_details_markup( array(
|
234 |
'taxonomy' => 'product_cat',
|
235 |
'search_term' => $search_term,
|
@@ -247,7 +247,7 @@ class IS_Ajax {
|
|
247 |
$product_class = '';
|
248 |
if( 'product' === $post->post_type && function_exists( 'wc_get_product' ) ) {
|
249 |
$product = wc_get_product( $post->ID );
|
250 |
-
if ( isset( $field['show_sale_badge'] ) ) {
|
251 |
$on_sale = ( $product->is_in_stock() ) ? $product->is_on_sale() : '';
|
252 |
if ( $on_sale ) {
|
253 |
$product_class .= ' is-has-badge';
|
@@ -572,7 +572,7 @@ class IS_Ajax {
|
|
572 |
} else if( has_post_thumbnail( $post->ID ) ) {
|
573 |
$image = get_the_post_thumbnail( $post->ID, $image_size );
|
574 |
}
|
575 |
-
if ( isset( $field['show_image'] ) &&
|
576 |
<div class="left-section">
|
577 |
<div class="thumbnail">
|
578 |
<a href="<?php echo get_the_permalink( $post->ID ); ?>"><?php echo $image; ?></a>
|
@@ -596,7 +596,7 @@ class IS_Ajax {
|
|
596 |
?>
|
597 |
<div class="is-title">
|
598 |
<a href="<?php echo get_the_permalink( $post->ID ); ?>">
|
599 |
-
<?php if( $product && isset( $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>
|
@@ -667,7 +667,7 @@ class IS_Ajax {
|
|
667 |
* @return void
|
668 |
*/
|
669 |
function tags_markup( $field, $post ) {
|
670 |
-
if ( isset( $field['show_tags'] ) ) { ?>
|
671 |
<?php $terms = get_the_terms( $post->ID, $post->post_type.'_tag' );
|
672 |
if ( $terms && ! is_wp_error( $terms ) ) { ?>
|
673 |
<span class="is-meta-tag">
|
@@ -690,7 +690,7 @@ class IS_Ajax {
|
|
690 |
* @return void
|
691 |
*/
|
692 |
function categories_markup( $field, $post ) {
|
693 |
-
if ( isset( $field['show_categories'] ) ) { ?>
|
694 |
<?php
|
695 |
$tax_name = ( 'post' === $post->post_type ) ? 'category' : $post->post_type.'_cat';
|
696 |
$terms = get_the_terms( $post->ID, $tax_name );
|
@@ -717,9 +717,9 @@ class IS_Ajax {
|
|
717 |
function description_markup( $field, $post, $single = false ) {
|
718 |
|
719 |
// Description either content or excerpt.
|
720 |
-
if ( isset( $field['show_description'] ) ) {
|
721 |
|
722 |
-
$excerpt_length = ( isset( $field['description_length'] ) &&
|
723 |
|
724 |
$content = strip_tags( strip_shortcodes( $post->post_content ) );
|
725 |
|
@@ -755,7 +755,7 @@ class IS_Ajax {
|
|
755 |
|
756 |
if( $product ) {
|
757 |
// Show stock status.
|
758 |
-
if( isset( $field['show_stock_status'] ) ) {
|
759 |
$stock_status = ( $product->is_in_stock() ) ? 'in-stock' : 'out-of-stock';
|
760 |
$stock_status_text = ( 'in-stock' == $stock_status ) ? __( 'In stock', 'ivory-search' ) : __( 'Out of stock', 'ivory-search' );
|
761 |
echo '<span class="stock-status is-'.$stock_status.'">'.$stock_status_text.'</span>';
|
@@ -775,7 +775,7 @@ class IS_Ajax {
|
|
775 |
function product_sku_markup( $field, $product ) {
|
776 |
if ( $product ) {
|
777 |
// Show SKU.
|
778 |
-
if( isset( $field['show_sku'] ) ) {
|
779 |
$sku = $product->get_sku();
|
780 |
echo '<span class="sku"><i>SKU:</i> '.esc_html( $sku ).'</span>';
|
781 |
}
|
@@ -793,10 +793,10 @@ class IS_Ajax {
|
|
793 |
*/
|
794 |
function product_price_markup( $field, $product ) {
|
795 |
|
796 |
-
$hide_price_out_of_stock = isset( $field['hide_price_out_of_stock'] ) ? $field['hide_price_out_of_stock'] : false;
|
797 |
|
798 |
if ( $product ) {
|
799 |
-
if ( isset( $field['show_price'] ) ) {
|
800 |
if ( $product->is_in_stock() || false === $hide_price_out_of_stock ) {?>
|
801 |
<span class="is-prices">
|
802 |
<?php
|
@@ -821,7 +821,7 @@ class IS_Ajax {
|
|
821 |
function product_sale_badge_markup( $field, $product ) {
|
822 |
if ( $product ) {
|
823 |
// Show sale badge.
|
824 |
-
if ( isset( $field['show_sale_badge'] ) ) {
|
825 |
$on_sale = ( $product->is_in_stock() ) ? $product->is_on_sale() : '';
|
826 |
if( $on_sale ) {
|
827 |
echo '<div class="is-sale-badge">'.__( 'Sale!', 'ivory-search' ) .'</div>';
|
78 |
$field = wp_parse_args( $stored_field, $defaults );
|
79 |
$posts_class = 'is-show-details-disabled';
|
80 |
|
81 |
+
if ( isset( $field['show_details_box'] ) && $field['show_details_box'] ) {
|
82 |
$posts_class = 'is-show-details-enabled';
|
83 |
}
|
84 |
?>
|
87 |
<?php } ?>
|
88 |
<?php
|
89 |
// Show matching tags.
|
90 |
+
if( isset( $field['show_matching_tags'] ) && $field['show_matching_tags'] && 1 == $page ) {
|
91 |
$this->term_title_markup( array(
|
92 |
'taxonomy' => 'product_tag',
|
93 |
'search_term' => $search_term,
|
97 |
}
|
98 |
|
99 |
// Show matching categories.
|
100 |
+
if( isset( $field['show_matching_categories'] ) && $field['show_matching_categories'] && 1 == $page ) {
|
101 |
$this->term_title_markup( array(
|
102 |
'taxonomy' => 'product_cat',
|
103 |
'search_term' => $search_term,
|
130 |
if( 'product' === $post->post_type && function_exists( 'wc_get_product' ) ) {
|
131 |
$product = wc_get_product( $post->ID );
|
132 |
$product_class = 'is-product';
|
133 |
+
if ( isset( $field['show_sale_badge'] ) && $field['show_sale_badge'] ) {
|
134 |
$on_sale = ( $product->is_in_stock() ) ? $product->is_on_sale() : '';
|
135 |
if ( $on_sale ) {
|
136 |
$product_class .= ' is-has-badge';
|
211 |
?>
|
212 |
</div>
|
213 |
<?php } ?>
|
214 |
+
<?php if( isset( $field['show_details_box'] ) && $field['show_details_box'] ) { ?>
|
215 |
<div id="is-ajax-search-details-<?php echo $search_post_id; ?>" class="is-ajax-search-details">
|
216 |
<div class="is-ajax-search-items">
|
217 |
<?php
|
218 |
if ( 1 == $page ) {
|
219 |
// Show product details by "tags".
|
220 |
+
if( isset( $field['show_matching_tags'] ) && $field['show_matching_tags'] ) {
|
221 |
$this->product_details_markup( array(
|
222 |
'taxonomy' => 'product_tag',
|
223 |
'search_term' => $search_term,
|
229 |
|
230 |
<?php
|
231 |
// Show product details by "categories".
|
232 |
+
if( isset( $field['show_matching_categories'] ) && $field['show_matching_categories'] ) {
|
233 |
$this->product_details_markup( array(
|
234 |
'taxonomy' => 'product_cat',
|
235 |
'search_term' => $search_term,
|
247 |
$product_class = '';
|
248 |
if( 'product' === $post->post_type && function_exists( 'wc_get_product' ) ) {
|
249 |
$product = wc_get_product( $post->ID );
|
250 |
+
if ( isset( $field['show_sale_badge'] ) && $field['show_sale_badge'] ) {
|
251 |
$on_sale = ( $product->is_in_stock() ) ? $product->is_on_sale() : '';
|
252 |
if ( $on_sale ) {
|
253 |
$product_class .= ' is-has-badge';
|
572 |
} else if( has_post_thumbnail( $post->ID ) ) {
|
573 |
$image = get_the_post_thumbnail( $post->ID, $image_size );
|
574 |
}
|
575 |
+
if ( isset( $field['show_image'] ) && $field['show_image'] ) { ?>
|
576 |
<div class="left-section">
|
577 |
<div class="thumbnail">
|
578 |
<a href="<?php echo get_the_permalink( $post->ID ); ?>"><?php echo $image; ?></a>
|
596 |
?>
|
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>
|
667 |
* @return void
|
668 |
*/
|
669 |
function tags_markup( $field, $post ) {
|
670 |
+
if ( isset( $field['show_tags'] ) && $field['show_tags'] ) { ?>
|
671 |
<?php $terms = get_the_terms( $post->ID, $post->post_type.'_tag' );
|
672 |
if ( $terms && ! is_wp_error( $terms ) ) { ?>
|
673 |
<span class="is-meta-tag">
|
690 |
* @return void
|
691 |
*/
|
692 |
function categories_markup( $field, $post ) {
|
693 |
+
if ( isset( $field['show_categories'] ) && $field['show_categories'] ) { ?>
|
694 |
<?php
|
695 |
$tax_name = ( 'post' === $post->post_type ) ? 'category' : $post->post_type.'_cat';
|
696 |
$terms = get_the_terms( $post->ID, $tax_name );
|
717 |
function description_markup( $field, $post, $single = false ) {
|
718 |
|
719 |
// Description either content or excerpt.
|
720 |
+
if ( isset( $field['show_description'] ) && $field['show_description'] ) {
|
721 |
|
722 |
+
$excerpt_length = ( isset( $field['description_length'] ) && $field['description_length'] ) ? absint( $field['description_length'] ) : 20;
|
723 |
|
724 |
$content = strip_tags( strip_shortcodes( $post->post_content ) );
|
725 |
|
755 |
|
756 |
if( $product ) {
|
757 |
// Show stock status.
|
758 |
+
if( isset( $field['show_stock_status'] ) && $field['show_stock_status'] ) {
|
759 |
$stock_status = ( $product->is_in_stock() ) ? 'in-stock' : 'out-of-stock';
|
760 |
$stock_status_text = ( 'in-stock' == $stock_status ) ? __( 'In stock', 'ivory-search' ) : __( 'Out of stock', 'ivory-search' );
|
761 |
echo '<span class="stock-status is-'.$stock_status.'">'.$stock_status_text.'</span>';
|
775 |
function product_sku_markup( $field, $product ) {
|
776 |
if ( $product ) {
|
777 |
// Show SKU.
|
778 |
+
if( isset( $field['show_sku'] ) && $field['show_sku'] ) {
|
779 |
$sku = $product->get_sku();
|
780 |
echo '<span class="sku"><i>SKU:</i> '.esc_html( $sku ).'</span>';
|
781 |
}
|
793 |
*/
|
794 |
function product_price_markup( $field, $product ) {
|
795 |
|
796 |
+
$hide_price_out_of_stock = isset( $field['hide_price_out_of_stock'] ) && $field['hide_price_out_of_stock'] ? $field['hide_price_out_of_stock'] : false;
|
797 |
|
798 |
if ( $product ) {
|
799 |
+
if ( isset( $field['show_price'] ) && $field['show_price'] ) {
|
800 |
if ( $product->is_in_stock() || false === $hide_price_out_of_stock ) {?>
|
801 |
<span class="is-prices">
|
802 |
<?php
|
821 |
function product_sale_badge_markup( $field, $product ) {
|
822 |
if ( $product ) {
|
823 |
// Show sale badge.
|
824 |
+
if ( isset( $field['show_sale_badge'] ) && $field['show_sale_badge'] ) {
|
825 |
$on_sale = ( $product->is_in_stock() ) ? $product->is_on_sale() : '';
|
826 |
if( $on_sale ) {
|
827 |
echo '<div class="is-sale-badge">'.__( 'Sale!', 'ivory-search' ) .'</div>';
|
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.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -192,6 +192,9 @@ Yes we do. We try our best to help free users with customisation requests and we
|
|
192 |
|
193 |
== Changelog ==
|
194 |
|
|
|
|
|
|
|
195 |
= 4.4.3 =
|
196 |
* Fixed - AJAX search results displaying out of viewport.
|
197 |
* Fixed - AJAX search results Undefined index notices.
|
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 |
|
193 |
== Changelog ==
|
194 |
|
195 |
+
= 4.4.4 =
|
196 |
+
* Fixed - Search form AJAX options not working.
|
197 |
+
|
198 |
= 4.4.3 =
|
199 |
* Fixed - AJAX search results displaying out of viewport.
|
200 |
* Fixed - AJAX search results Undefined index notices.
|