Version Description
- Add option to display 'Clear search results' buttom on desktop devices
Download this release
Release Info
Developer | Mihail Barinov |
Plugin | Advanced Woo Search |
Version | 1.48 |
Comparing to | |
See all releases |
Code changes from version 1.47 to 1.48
- advanced-woo-search.php +2 -2
- assets/js/common.js +4 -3
- includes/class-aws-markup.php +3 -1
- includes/class-aws-versions.php +13 -0
- includes/options.php +12 -0
- languages/aws.pot +6 -0
- readme.txt +5 -2
advanced-woo-search.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: Advanced Woo Search
|
5 |
Description: Advance ajax WooCommerce product search.
|
6 |
-
Version: 1.
|
7 |
Author: ILLID
|
8 |
Author URI: https://advanced-woo-search.com/
|
9 |
Text Domain: aws
|
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
16 |
exit;
|
17 |
}
|
18 |
|
19 |
-
define( 'AWS_VERSION', '1.
|
20 |
|
21 |
|
22 |
define( 'AWS_DIR', dirname( __FILE__ ) );
|
3 |
/*
|
4 |
Plugin Name: Advanced Woo Search
|
5 |
Description: Advance ajax WooCommerce product search.
|
6 |
+
Version: 1.48
|
7 |
Author: ILLID
|
8 |
Author URI: https://advanced-woo-search.com/
|
9 |
Text Domain: aws
|
16 |
exit;
|
17 |
}
|
18 |
|
19 |
+
define( 'AWS_VERSION', '1.48' );
|
20 |
|
21 |
|
22 |
define( 'AWS_DIR', dirname( __FILE__ ) );
|
assets/js/common.js
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
|
20 |
$('body').append('<div id="aws-search-result-' + instance + '" class="aws-search-result" style="display: none;"></div>');
|
21 |
|
22 |
-
methods.
|
23 |
|
24 |
setTimeout(function() { methods.resultLayout(); }, 500);
|
25 |
|
@@ -300,8 +300,8 @@
|
|
300 |
}
|
301 |
},
|
302 |
|
303 |
-
|
304 |
-
if ( methods.isMobile() ) {
|
305 |
$searchForm.addClass('aws-show-clear');
|
306 |
}
|
307 |
},
|
@@ -342,6 +342,7 @@
|
|
342 |
showLoader: ( self.data('show-loader') !== undefined ) ? self.data('show-loader') : true,
|
343 |
showMore: ( self.data('show-more') !== undefined ) ? self.data('show-more') : true,
|
344 |
showPage: ( self.data('show-page') !== undefined ) ? self.data('show-page') : true,
|
|
|
345 |
useAnalytics: ( self.data('use-analytics') !== undefined ) ? self.data('use-analytics') : false,
|
346 |
instance: instance,
|
347 |
resultBlock: '#aws-search-result-' + instance
|
19 |
|
20 |
$('body').append('<div id="aws-search-result-' + instance + '" class="aws-search-result" style="display: none;"></div>');
|
21 |
|
22 |
+
methods.addClasses();
|
23 |
|
24 |
setTimeout(function() { methods.resultLayout(); }, 500);
|
25 |
|
300 |
}
|
301 |
},
|
302 |
|
303 |
+
addClasses: function() {
|
304 |
+
if ( methods.isMobile() || d.showClear ) {
|
305 |
$searchForm.addClass('aws-show-clear');
|
306 |
}
|
307 |
},
|
342 |
showLoader: ( self.data('show-loader') !== undefined ) ? self.data('show-loader') : true,
|
343 |
showMore: ( self.data('show-more') !== undefined ) ? self.data('show-more') : true,
|
344 |
showPage: ( self.data('show-page') !== undefined ) ? self.data('show-page') : true,
|
345 |
+
showClear: ( self.data('show-clear') !== undefined ) ? self.data('show-clear') : false,
|
346 |
useAnalytics: ( self.data('use-analytics') !== undefined ) ? self.data('use-analytics') : false,
|
347 |
instance: instance,
|
348 |
resultBlock: '#aws-search-result-' + instance
|
includes/class-aws-markup.php
CHANGED
@@ -31,6 +31,7 @@ if ( ! class_exists( 'AWS_Markup' ) ) :
|
|
31 |
$show_loader = AWS()->get_settings( 'show_loader' );
|
32 |
$show_more = AWS()->get_settings( 'show_more' );
|
33 |
$show_page = AWS()->get_settings( 'show_page' );
|
|
|
34 |
$use_analytics = AWS()->get_settings( 'use_analytics' );
|
35 |
|
36 |
$url_array = parse_url( home_url() );
|
@@ -49,6 +50,7 @@ if ( ! class_exists( 'AWS_Markup' ) ) :
|
|
49 |
'data-show-loader' => $show_loader,
|
50 |
'data-show-more' => $show_more,
|
51 |
'data-show-page' => $show_page,
|
|
|
52 |
'data-use-analytics' => $use_analytics,
|
53 |
'data-min-chars' => $min_chars,
|
54 |
);
|
@@ -59,7 +61,7 @@ if ( ! class_exists( 'AWS_Markup' ) ) :
|
|
59 |
|
60 |
$markup = '';
|
61 |
$markup .= '<div class="aws-container" ' . $params_string . '>';
|
62 |
-
$markup .= '<form class="aws-search-form" action="' . home_url() . '" method="get" role="search" >';
|
63 |
$markup .= '<input type="text" name="s" value="' . get_search_query() . '" class="aws-search-field" placeholder="' . $placeholder . '" autocomplete="off" />';
|
64 |
$markup .= '<input type="hidden" name="post_type" value="product">';
|
65 |
$markup .= '<input type="hidden" name="type_aws" value="true">';
|
31 |
$show_loader = AWS()->get_settings( 'show_loader' );
|
32 |
$show_more = AWS()->get_settings( 'show_more' );
|
33 |
$show_page = AWS()->get_settings( 'show_page' );
|
34 |
+
$show_clear = AWS()->get_settings( 'show_clear' );
|
35 |
$use_analytics = AWS()->get_settings( 'use_analytics' );
|
36 |
|
37 |
$url_array = parse_url( home_url() );
|
50 |
'data-show-loader' => $show_loader,
|
51 |
'data-show-more' => $show_more,
|
52 |
'data-show-page' => $show_page,
|
53 |
+
'data-show-clear' => $show_clear,
|
54 |
'data-use-analytics' => $use_analytics,
|
55 |
'data-min-chars' => $min_chars,
|
56 |
);
|
61 |
|
62 |
$markup = '';
|
63 |
$markup .= '<div class="aws-container" ' . $params_string . '>';
|
64 |
+
$markup .= '<form class="aws-search-form" action="' . home_url('/') . '" method="get" role="search" >';
|
65 |
$markup .= '<input type="text" name="s" value="' . get_search_query() . '" class="aws-search-field" placeholder="' . $placeholder . '" autocomplete="off" />';
|
66 |
$markup .= '<input type="hidden" name="post_type" value="product">';
|
67 |
$markup .= '<input type="hidden" name="type_aws" value="true">';
|
includes/class-aws-versions.php
CHANGED
@@ -176,6 +176,19 @@ if ( ! class_exists( 'AWS_Versions' ) ) :
|
|
176 |
|
177 |
}
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
}
|
180 |
|
181 |
update_option( 'aws_plugin_ver', AWS_VERSION );
|
176 |
|
177 |
}
|
178 |
|
179 |
+
if ( version_compare( $current_version, '1.48', '<' ) ) {
|
180 |
+
|
181 |
+
$settings = get_option( 'aws_settings' );
|
182 |
+
|
183 |
+
if ( $settings ) {
|
184 |
+
if ( ! isset( $settings['show_clear'] ) ) {
|
185 |
+
$settings['show_clear'] = 'false';
|
186 |
+
update_option( 'aws_settings', $settings );
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
}
|
191 |
+
|
192 |
}
|
193 |
|
194 |
update_option( 'aws_plugin_ver', AWS_VERSION );
|
includes/options.php
CHANGED
@@ -112,6 +112,18 @@ $options['form'][] = array(
|
|
112 |
)
|
113 |
);
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
$options['form'][] = array(
|
116 |
"name" => __( "Show 'View All Results'", "aws" ),
|
117 |
"desc" => __( "Show link to search results page at the bottom of search results block.", "aws" ),
|
112 |
)
|
113 |
);
|
114 |
|
115 |
+
$options['form'][] = array(
|
116 |
+
"name" => __( "Show clear button", "aws" ),
|
117 |
+
"desc" => __( "Show 'Clear search string' button for desktop devices ( for mobile it is always visible ).", "aws" ),
|
118 |
+
"id" => "show_clear",
|
119 |
+
"value" => 'true',
|
120 |
+
"type" => "radio",
|
121 |
+
'choices' => array(
|
122 |
+
'true' => __( 'On', 'aws' ),
|
123 |
+
'false' => __( 'Off', 'aws' ),
|
124 |
+
)
|
125 |
+
);
|
126 |
+
|
127 |
$options['form'][] = array(
|
128 |
"name" => __( "Show 'View All Results'", "aws" ),
|
129 |
"desc" => __( "Show link to search results page at the bottom of search results block.", "aws" ),
|
languages/aws.pot
CHANGED
@@ -214,6 +214,12 @@ msgstr ""
|
|
214 |
msgid "Show loader animation while searching."
|
215 |
msgstr ""
|
216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
msgid "Show 'View All Results'"
|
218 |
msgstr ""
|
219 |
|
214 |
msgid "Show loader animation while searching."
|
215 |
msgstr ""
|
216 |
|
217 |
+
msgid "Show clear button"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
msgid "Show 'Clear search string' button for desktop devices ( for mobile it is always visible )."
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
msgid "Show 'View All Results'"
|
224 |
msgstr ""
|
225 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Mihail Barinov
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GSE37FC4Y7CEY
|
4 |
Tags: widget, plugin, woocommerce, search, product search, woocommerce search, ajax search, live search, custom search, ajax, shortcode, better search, relevance search, relevant search, search by sku, search plugin, shop, store, wordpress search, wp ajax search, wp search, wp search plugin, sidebar, ecommerce, merketing, products, category search, instant-search, search highlight, woocommerce advanced search, woocommerce live search, WooCommerce Plugin, woocommerce product search
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -96,6 +96,9 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
|
|
96 |
|
97 |
== Changelog ==
|
98 |
|
|
|
|
|
|
|
99 |
= 1.47 =
|
100 |
* Add seamless integration option
|
101 |
* Fix styling
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GSE37FC4Y7CEY
|
4 |
Tags: widget, plugin, woocommerce, search, product search, woocommerce search, ajax search, live search, custom search, ajax, shortcode, better search, relevance search, relevant search, search by sku, search plugin, shop, store, wordpress search, wp ajax search, wp search, wp search plugin, sidebar, ecommerce, merketing, products, category search, instant-search, search highlight, woocommerce advanced search, woocommerce live search, WooCommerce Plugin, woocommerce product search
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 4.9.8
|
7 |
+
Stable tag: 1.48
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
96 |
|
97 |
== Changelog ==
|
98 |
|
99 |
+
= 1.48 =
|
100 |
+
* Add option to display 'Clear search results' buttom on desktop devices
|
101 |
+
|
102 |
= 1.47 =
|
103 |
* Add seamless integration option
|
104 |
* Fix styling
|