Advanced Woo Search - Version 2.16

Version Description

( 2020-11-30 ) = * Add - Welcome message * Add - Support for Elessi Theme * Update - Search results box scrollbar styles * Dev - Add aws_results_append_to js filter * Dev - Update constants declaration

Download this release

Release Info

Developer Mihail Barinov
Plugin Icon 128x128 Advanced Woo Search
Version 2.16
Comparing to
See all releases

Code changes from version 2.15 to 2.16

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: 2.15
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: advanced-woo-search
@@ -16,16 +16,9 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
17
  }
18
 
19
- define( 'AWS_VERSION', '2.15' );
20
-
21
-
22
- define( 'AWS_DIR', dirname( __FILE__ ) );
23
- define( 'AWS_URL', plugins_url( '', __FILE__ ) );
24
-
25
-
26
- define( 'AWS_INDEX_TABLE_NAME', 'aws_index' );
27
- define( 'AWS_CACHE_TABLE_NAME', 'aws_cache' );
28
-
29
 
30
  if ( ! class_exists( 'AWS_Main' ) ) :
31
 
@@ -71,6 +64,8 @@ final class AWS_Main {
71
  */
72
  public function __construct() {
73
 
 
 
74
  $this->data['settings'] = get_option( 'aws_settings' );
75
 
76
  add_filter( 'widget_text', 'do_shortcode' );
@@ -96,6 +91,21 @@ final class AWS_Main {
96
 
97
  }
98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  /**
100
  * Include required core files used in admin and on the frontend.
101
  */
@@ -119,6 +129,7 @@ final class AWS_Main {
119
  include_once( 'includes/admin/class-aws-admin-ajax.php' );
120
  include_once( 'includes/admin/class-aws-admin-fields.php' );
121
  include_once( 'includes/admin/class-aws-admin-options.php' );
 
122
 
123
  }
124
 
@@ -195,6 +206,15 @@ final class AWS_Main {
195
  return $return_value;
196
  }
197
 
 
 
 
 
 
 
 
 
 
198
  /*
199
  * Add ajax action to WPML plugin
200
  */
@@ -263,6 +283,25 @@ function aws_install_woocommerce_admin_notice() {
263
  <?php
264
  }
265
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  /*
267
  * Init AWS plugin
268
  */
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 2.16
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: advanced-woo-search
16
  exit;
17
  }
18
 
19
+ if ( ! defined( 'AWS_FILE' ) ) {
20
+ define( 'AWS_FILE', __FILE__ );
21
+ }
 
 
 
 
 
 
 
22
 
23
  if ( ! class_exists( 'AWS_Main' ) ) :
24
 
64
  */
65
  public function __construct() {
66
 
67
+ $this->define_constants();
68
+
69
  $this->data['settings'] = get_option( 'aws_settings' );
70
 
71
  add_filter( 'widget_text', 'do_shortcode' );
91
 
92
  }
93
 
94
+ /**
95
+ * Define constants
96
+ */
97
+ private function define_constants() {
98
+
99
+ $this->define( 'AWS_VERSION', '2.16' );
100
+
101
+ $this->define( 'AWS_DIR', plugin_dir_path( AWS_FILE ) );
102
+ $this->define( 'AWS_URL', plugin_dir_url( AWS_FILE ) );
103
+
104
+ $this->define( 'AWS_INDEX_TABLE_NAME', 'aws_index' );
105
+ $this->define( 'AWS_CACHE_TABLE_NAME', 'aws_cache' );
106
+
107
+ }
108
+
109
  /**
110
  * Include required core files used in admin and on the frontend.
111
  */
129
  include_once( 'includes/admin/class-aws-admin-ajax.php' );
130
  include_once( 'includes/admin/class-aws-admin-fields.php' );
131
  include_once( 'includes/admin/class-aws-admin-options.php' );
132
+ include_once( 'includes/admin/class-aws-admin-meta-boxes.php' );
133
 
134
  }
135
 
206
  return $return_value;
207
  }
208
 
209
+ /*
210
+ * Define constant if not already set
211
+ */
212
+ private function define( $name, $value ) {
213
+ if ( ! defined( $name ) ) {
214
+ define( $name, $value );
215
+ }
216
+ }
217
+
218
  /*
219
  * Add ajax action to WPML plugin
220
  */
283
  <?php
284
  }
285
 
286
+
287
+ /*
288
+ * Activation hook
289
+ */
290
+ register_activation_hook( __FILE__, 'aws_on_activation' );
291
+ function aws_on_activation() {
292
+ $hide_notice = get_option( 'aws_hide_welcome_notice' );
293
+ if ( ! $hide_notice ) {
294
+ $free_plugin_version = get_option( 'aws_plugin_ver' );
295
+ $pro_plugin_version = get_option( 'aws_pro_plugin_ver' );
296
+ $hide = 'false';
297
+ if ( $free_plugin_version || $pro_plugin_version ) {
298
+ $hide = 'true';
299
+ }
300
+ update_option( 'aws_hide_welcome_notice', $hide, false );
301
+ }
302
+ }
303
+
304
+
305
  /*
306
  * Init AWS plugin
307
  */
assets/css/admin.css CHANGED
@@ -313,4 +313,13 @@ h1.aws-instance-name {
313
 
314
  .aws-table.aws-table-sources td.aws-name {
315
  font-weight: 400;
 
 
 
 
 
 
 
 
 
316
  }
313
 
314
  .aws-table.aws-table-sources td.aws-name {
315
  font-weight: 400;
316
+ }
317
+
318
+ /* Welcome message */
319
+
320
+ .welcome-panel .welcome-panel-column:first-child {
321
+ width: 60%;
322
+ }
323
+ .welcome-panel .welcome-panel-column {
324
+ width: 20%;
325
  }
assets/css/common.css CHANGED
@@ -254,13 +254,25 @@
254
 
255
  .aws-search-result ul {
256
  list-style: none;
257
- padding: 0;
258
  margin: 0 !important;
259
-
260
  max-height: 400px;
261
  overflow-y: auto;
262
  }
263
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  .aws-search-result ul li {
265
  list-style: none;
266
  border-bottom: 1px solid #ccc;
254
 
255
  .aws-search-result ul {
256
  list-style: none;
257
+ padding: 0 !important;
258
  margin: 0 !important;
 
259
  max-height: 400px;
260
  overflow-y: auto;
261
  }
262
 
263
+ .aws-search-result ul::-webkit-scrollbar-track {
264
+ -webkit-box-shadow: none;
265
+ background-color: #ededed;
266
+ }
267
+ .aws-search-result ul::-webkit-scrollbar {
268
+ width: 7px;
269
+ background-color: #ededed;
270
+ }
271
+
272
+ .aws-search-result ul::-webkit-scrollbar-thumb {
273
+ background-color: #d8d8d8;
274
+ }
275
+
276
  .aws-search-result ul li {
277
  list-style: none;
278
  border-bottom: 1px solid #ccc;
assets/js/admin.js CHANGED
@@ -173,4 +173,22 @@ jQuery(document).ready(function ($) {
173
  });
174
 
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  });
173
  });
174
 
175
 
176
+ // Dismiss welcome notice
177
+
178
+ $( '.aws-welcome-notice.is-dismissible' ).on('click', '.notice-dismiss', function ( event ) {
179
+
180
+ $.ajax({
181
+ type: 'POST',
182
+ url: aws_vars.ajaxurl,
183
+ data: {
184
+ action: 'aws-hideWelcomeNotice',
185
+ _ajax_nonce: aws_vars.ajax_nonce
186
+ },
187
+ dataType: "json",
188
+ success: function (data) {
189
+ }
190
+ });
191
+
192
+ });
193
+
194
  });
assets/js/common.js CHANGED
@@ -57,7 +57,10 @@ AwsHooks.filters = AwsHooks.filters || {};
57
 
58
  init: function() {
59
 
60
- $('body').append('<div id="aws-search-result-' + instance + '" class="aws-search-result" style="display: none;"></div>');
 
 
 
61
 
62
  methods.addClasses();
63
 
@@ -611,14 +614,13 @@ AwsHooks.filters = AwsHooks.filters || {};
611
 
612
  }
613
 
614
- var scrolledTop = $itemsList.scrollTop();
615
- var position = $( d.resultBlock ).find('.aws_result_item.hovered').position();
616
-
617
- if ( position ) {
618
- $itemsList.scrollTop( position.top + scrolledTop )
619
  }
620
 
621
-
622
  }
623
  }
624
 
57
 
58
  init: function() {
59
 
60
+ // @since 2.16
61
+ var appendResultsTo = AwsHooks.apply_filters( 'aws_results_append_to', 'body', { instance: instance, form: self, data: d } );
62
+
63
+ $(appendResultsTo).append('<div id="aws-search-result-' + instance + '" class="aws-search-result" style="display: none;"></div>');
64
 
65
  methods.addClasses();
66
 
614
 
615
  }
616
 
617
+ var activeItemOffset = $(".aws_result_item.hovered").position();
618
+ if ( activeItemOffset ) {
619
+ $itemsList.animate({
620
+ scrollTop: activeItemOffset.top + $itemsList.scrollTop()
621
+ }, 400);
622
  }
623
 
 
624
  }
625
  }
626
 
includes/admin/class-aws-admin-ajax.php CHANGED
@@ -18,6 +18,8 @@ if ( ! class_exists( 'AWS_Admin_Ajax' ) ) :
18
 
19
  add_action( 'wp_ajax_aws-changeState', array( &$this, 'change_state' ) );
20
 
 
 
21
  }
22
 
23
  /*
@@ -43,6 +45,19 @@ if ( ! class_exists( 'AWS_Admin_Ajax' ) ) :
43
 
44
  }
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  /*
47
  * Get plugin settings
48
  */
18
 
19
  add_action( 'wp_ajax_aws-changeState', array( &$this, 'change_state' ) );
20
 
21
+ add_action( 'wp_ajax_aws-hideWelcomeNotice', array( $this, 'hide_welcome_notice' ) );
22
+
23
  }
24
 
25
  /*
45
 
46
  }
47
 
48
+ /*
49
+ * Hide plugin welcome notice
50
+ */
51
+ public function hide_welcome_notice() {
52
+
53
+ check_ajax_referer( 'aws_admin_ajax_nonce' );
54
+
55
+ update_option( 'aws_hide_welcome_notice', 'true', false );
56
+
57
+ wp_send_json_success( '1' );
58
+
59
+ }
60
+
61
  /*
62
  * Get plugin settings
63
  */
includes/admin/class-aws-admin-meta-boxes.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ if ( ! class_exists( 'AWS_Admin_Meta_Boxes' ) ) :
8
+
9
+ /**
10
+ * Class for plugin admin panel
11
+ */
12
+ class AWS_Admin_Meta_Boxes {
13
+
14
+ /*
15
+ * Get content for the General tab
16
+ * @return string
17
+ */
18
+ static public function get_general_tab_content() {
19
+
20
+ $html = '';
21
+
22
+ $html .= '<table class="form-table">';
23
+ $html .= '<tbody>';
24
+
25
+ $html .= '<tr id="activation">';
26
+
27
+ $html .= '<th>' . esc_html__( 'Activation', 'advanced-woo-search' ) . '</th>';
28
+ $html .= '<td>';
29
+ $html .= '<div class="description activation">';
30
+ $html .= esc_html__( 'In case you need to add plugin search form on your website, you can do it in several ways:', 'advanced-woo-search' ) . '<br>';
31
+ $html .= '<div class="list">';
32
+ $html .= '1. ' . esc_html__( 'Enable a "Seamless integration" option ( may not work with some themes )', 'advanced-woo-search' ) . '<br>';
33
+ $html .= '2. ' . sprintf( esc_html__( 'Add search form using shortcode %s', 'advanced-woo-search' ), "<code>[aws_search_form]</code>" ) . '<br>';
34
+ $html .= '3. ' . esc_html__( 'Add search form as widget for one of your theme widget areas. Go to Appearance -> Widgets and drag&drop AWS Widget to one of your widget areas', 'advanced-woo-search' ) . '<br>';
35
+ $html .= '4. ' . sprintf( esc_html__( 'Add PHP code to the necessary files of your theme: %s', 'advanced-woo-search' ), "<code>&lt;?php if ( function_exists( 'aws_get_search_form' ) ) { aws_get_search_form(); } ?&gt;</code>" ) . '<br>';
36
+ $html .= '</div>';
37
+ $html .= '</div>';
38
+ $html .= '</td>';
39
+
40
+ $html .= '</tr>';
41
+
42
+ $html .= '<tr>';
43
+
44
+ $html .= '<th>' . esc_html__( 'Reindex table', 'advanced-woo-search' ) . '</th>';
45
+ $html .= '<td>';
46
+ $html .= '<div id="aws-reindex"><input class="button" type="button" value="' . esc_attr__( 'Reindex table', 'advanced-woo-search' ) . '"><span class="loader"></span><span class="reindex-progress">0%</span></div><br><br>';
47
+ $html .= '<span class="description">' .
48
+ sprintf( esc_html__( 'This action only need for %s one time %s - after you activate this plugin. After this all products changes will be re-indexed automatically.', 'advanced-woo-search' ), '<strong>', '</strong>' ) . '<br>' .
49
+ __( 'Update all data in plugins index table. Index table - table with products data where plugin is searching all typed terms.<br>Use this button if you think that plugin not shows last actual data in its search results.<br><strong>CAUTION:</strong> this can take large amount of time.', 'advanced-woo-search' ) . '<br><br>' .
50
+ esc_html__( 'Products in index:', 'advanced-woo-search' ) . '<span id="aws-reindex-count"> <strong>' . AWS_Helpers::get_indexed_products_count() . '</strong></span>';
51
+ $html .= '</span>';
52
+ $html .= '</td>';
53
+
54
+ $html .= '</tr>';
55
+
56
+
57
+ $html .= '<tr>';
58
+
59
+ $html .= '<th>' . esc_html__( 'Clear cache', 'advanced-woo-search' ) . '</th>';
60
+ $html .= '<td>';
61
+ $html .= '<div id="aws-clear-cache"><input class="button" type="button" value="' . esc_attr__( 'Clear cache', 'advanced-woo-search' ) . '"><span class="loader"></span></div><br>';
62
+ $html .= '<span class="description">' . esc_html__( 'Clear cache for all search results.', 'advanced-woo-search' ) . '</span>';
63
+ $html .= '</td>';
64
+
65
+ $html .= '</tr>';
66
+
67
+ $html .= '</tbody>';
68
+ $html .= '</table>';
69
+
70
+ return $html;
71
+
72
+ }
73
+
74
+ /*
75
+ * Get content for the welcome notice
76
+ * @return string
77
+ */
78
+ static public function get_welcome_notice() {
79
+
80
+ $html = '';
81
+
82
+ $html .= '<div id="aws-welcome-panel">';
83
+ $html .= '<div class="aws-welcome-notice updated notice is-dismissible" style="background:#f2fbff;">';
84
+
85
+ $html .= '<div class="welcome-panel" style="border:none;box-shadow:none;padding:0;margin:16px 0 0;background:transparent;">';
86
+ $html .= '<div class="welcome-panel-content">';
87
+ $html .= '<h2>' . sprintf( __( 'Welcome to %s', 'advanced-woo-search' ), 'Advanced Woo Search' ) . '</h2>';
88
+ $html .= '<p class="about-description">' . __( 'Powerful search plugin for WooCommerce.', 'advanced-woo-search' ) . '</p>';
89
+ $html .= '<div class="welcome-panel-column-container">';
90
+ $html .= '<div class="welcome-panel-column">';
91
+ $html .= '<h4>' . __( 'Get Started', 'advanced-woo-search' ) . '</h4>';
92
+ $html .= '<p style="margin-bottom:10px;">' . __( 'In order to start using the plugin search form you need to take following steps:', 'advanced-woo-search' ) . '</p>';
93
+ $html .= '<ul>';
94
+ $html .= '<li><strong>1.</strong> <strong>' . __( 'Index plugin table.', 'advanced-woo-search' ) . '</strong> ' . __( 'Click on the \'Reindex table\' button and wait till the index process is finished.', 'advanced-woo-search' ) . '</li>';
95
+ $html .= '<li><strong>2.</strong> <strong>' . __( 'Set plugin settings.', 'advanced-woo-search' ) . '</strong> ' . __( 'Leave it to default values or customize some of them.', 'advanced-woo-search' ) . '</li>';
96
+ $html .= '<li><strong>3.</strong> <strong>' . __( 'Add search form.', 'advanced-woo-search' ) . '</strong> ' . sprintf( __( 'There are several ways you can add a search form to your site. Use the \'Seamless integration\' option, shortcode, widget or custom php function. Read more inside %s section or read %s.', 'advanced-woo-search' ), '<a href="#activation">' . __( 'Activation', 'advanced-woo-search' ) . '</a>', '<a target="_blank" href="https://advanced-woo-search.com/guide/search-form/">' . __( 'guide article', 'advanced-woo-search' ) . '</a>' ) . '</li>';
97
+ $html .= '<li><strong>4.</strong> <strong>' . __( 'Finish!', 'advanced-woo-search' ) . '</strong> ' . __( 'Now all is set and you can check your search form on the pages where you add it.', 'advanced-woo-search' ) . '</li>';
98
+ $html .= '</ul>';
99
+ $html .= '</div>';
100
+ $html .= '<div class="welcome-panel-column">';
101
+ $html .= '<h4>' . __( 'Documentation', 'advanced-woo-search' ) . '</h4>';
102
+ $html .= '<ul>';
103
+ $html .= '<li><a href="https://advanced-woo-search.com/guide/search-form/" class="welcome-icon welcome-edit-page" target="_blank">' . __( 'How to Add Search Form', 'advanced-woo-search' ) . '</a></li>';
104
+ $html .= '<li><a href="https://advanced-woo-search.com/guide/search-source/" class="welcome-icon welcome-edit-page" target="_blank">' . __( 'Search Sources', 'advanced-woo-search' ) . '</a></li>';
105
+ $html .= '<li><a href="https://advanced-woo-search.com/guide/terms-search/" class="welcome-icon welcome-edit-page" target="_blank">' . __( 'Terms Pages Search', 'advanced-woo-search' ) . '</a></li>';
106
+ $html .= '</ul>';
107
+ $html .= '</div>';
108
+ $html .= '<div class="welcome-panel-column welcome-panel-last">';
109
+ $html .= '<h4>' . __( 'Help', 'advanced-woo-search' ) . '</h4>';
110
+ $html .= '<ul>';
111
+ $html .= '<li><div class="welcome-icon welcome-widgets-menus"><a href="https://wordpress.org/support/plugin/advanced-woo-search/" target="_blank">' . __( 'Support Forums', 'advanced-woo-search' ) . '</a></div></li>';
112
+ $html .= '<li><div class="welcome-icon welcome-widgets-menus"><a href="https://advanced-woo-search.com/contact/" target="_blank">' . __( 'Contact Form', 'advanced-woo-search' ) . '</a></div></li>';
113
+ $html .= '</ul>';
114
+ $html .= '</div>';
115
+ $html .= '</div>';
116
+ $html .= '</div>';
117
+ $html .= '</div>';
118
+
119
+ $html .= '</div>';
120
+ $html .= '</div>';
121
+
122
+ return $html;
123
+
124
+ }
125
+
126
+ }
127
+
128
+ endif;
includes/admin/class-aws-admin.php CHANGED
@@ -53,6 +53,8 @@ class AWS_Admin {
53
 
54
  add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ) );
55
 
 
 
56
  }
57
 
58
  /**
@@ -110,7 +112,7 @@ class AWS_Admin {
110
  new AWS_Admin_Fields( 'results' );
111
  break;
112
  default:
113
- $this->update_table();
114
  new AWS_Admin_Fields( 'general' );
115
  }
116
 
@@ -122,61 +124,6 @@ class AWS_Admin {
122
 
123
  }
124
 
125
- /*
126
- * Reindex table
127
- */
128
- private function update_table() {
129
-
130
- echo '<table class="form-table">';
131
- echo '<tbody>';
132
-
133
- echo '<tr>';
134
-
135
- echo '<th>' . esc_html__( 'Activation', 'advanced-woo-search' ) . '</th>';
136
- echo '<td>';
137
- echo '<div class="description activation">';
138
- echo esc_html__( 'In case you need to add plugin search form on your website, you can do it in several ways:', 'advanced-woo-search' ) . '<br>';
139
- echo '<div class="list">';
140
- echo '1. ' . esc_html__( 'Enable a "Seamless integration" option ( may not work with some themes )', 'advanced-woo-search' ) . '<br>';
141
- echo '2. ' . sprintf( esc_html__( 'Add search form using shortcode %s', 'advanced-woo-search' ), "<code>[aws_search_form]</code>" ) . '<br>';
142
- echo '3. ' . esc_html__( 'Add search form as widget for one of your theme widget areas. Go to Appearance -> Widgets and drag&drop AWS Widget to one of your widget areas', 'advanced-woo-search' ) . '<br>';
143
- echo '4. ' . sprintf( esc_html__( 'Add PHP code to the necessary files of your theme: %s', 'advanced-woo-search' ), "<code>&lt;?php if ( function_exists( 'aws_get_search_form' ) ) { aws_get_search_form(); } ?&gt;</code>" ) . '<br>';
144
- echo '</div>';
145
- echo '</div>';
146
- echo '</td>';
147
-
148
- echo '</tr>';
149
-
150
- echo '<tr>';
151
-
152
- echo '<th>' . esc_html__( 'Reindex table', 'advanced-woo-search' ) . '</th>';
153
- echo '<td>';
154
- echo '<div id="aws-reindex"><input class="button" type="button" value="' . esc_attr__( 'Reindex table', 'advanced-woo-search' ) . '"><span class="loader"></span><span class="reindex-progress">0%</span></div><br><br>';
155
- echo '<span class="description">' .
156
- sprintf( esc_html__( 'This action only need for %s one time %s - after you activate this plugin. After this all products changes will be re-indexed automatically.', 'advanced-woo-search' ), '<strong>', '</strong>' ) . '<br>' .
157
- __( 'Update all data in plugins index table. Index table - table with products data where plugin is searching all typed terms.<br>Use this button if you think that plugin not shows last actual data in its search results.<br><strong>CAUTION:</strong> this can take large amount of time.', 'advanced-woo-search' ) . '<br><br>' .
158
- esc_html__( 'Products in index:', 'advanced-woo-search' ) . '<span id="aws-reindex-count"> <strong>' . AWS_Helpers::get_indexed_products_count() . '</strong></span>';
159
- echo '</span>';
160
- echo '</td>';
161
-
162
- echo '</tr>';
163
-
164
-
165
- echo '<tr>';
166
-
167
- echo '<th>' . esc_html__( 'Clear cache', 'advanced-woo-search' ) . '</th>';
168
- echo '<td>';
169
- echo '<div id="aws-clear-cache"><input class="button" type="button" value="' . esc_attr__( 'Clear cache', 'advanced-woo-search' ) . '"><span class="loader"></span></div><br>';
170
- echo '<span class="description">' . esc_html__( 'Clear cache for all search results.', 'advanced-woo-search' ) . '</span>';
171
- echo '</td>';
172
-
173
- echo '</tr>';
174
-
175
- echo '</tbody>';
176
- echo '</table>';
177
-
178
- }
179
-
180
  /*
181
  * Register plugin settings
182
  */
@@ -210,6 +157,25 @@ class AWS_Admin {
210
 
211
  }
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  }
214
 
215
  endif;
53
 
54
  add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ) );
55
 
56
+ add_action( 'admin_notices', array( $this, 'display_welcome_header' ), 1 );
57
+
58
  }
59
 
60
  /**
112
  new AWS_Admin_Fields( 'results' );
113
  break;
114
  default:
115
+ echo AWS_Admin_Meta_Boxes::get_general_tab_content();
116
  new AWS_Admin_Fields( 'general' );
117
  }
118
 
124
 
125
  }
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  /*
128
  * Register plugin settings
129
  */
157
 
158
  }
159
 
160
+ /*
161
+ * Add welcome notice
162
+ */
163
+ public function display_welcome_header() {
164
+
165
+ if ( ! isset( $_GET['page'] ) || $_GET['page'] !== 'aws-options' ) {
166
+ return;
167
+ }
168
+
169
+ $hide_notice = get_option( 'aws_hide_welcome_notice' );
170
+
171
+ if ( ! $hide_notice || $hide_notice === 'true' ) {
172
+ return;
173
+ }
174
+
175
+ echo AWS_Admin_Meta_Boxes::get_welcome_notice();
176
+
177
+ }
178
+
179
  }
180
 
181
  endif;
includes/class-aws-integrations.php CHANGED
@@ -138,6 +138,10 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
138
  add_action( 'wp_footer', array( $this, 'storefront_footer_action' ) );
139
  }
140
 
 
 
 
 
141
  // Elementor pro
142
  if ( defined( 'ELEMENTOR_PRO_VERSION' ) ) {
143
  add_action( 'wp_footer', array( $this, 'elementor_pro_popup' ) );
@@ -805,6 +809,26 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
805
 
806
  <?php }
807
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
808
  /*
809
  * Storefront theme search form layout
810
  */
@@ -1108,6 +1132,10 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
1108
  $selectors[] = '#search-form form';
1109
  }
1110
 
 
 
 
 
1111
  // WCFM - WooCommerce Multivendor Marketplace
1112
  if ( class_exists( 'WCFMmp' ) ) {
1113
  $selectors[] = '#wcfmmp-store .woocommerce-product-search';
138
  add_action( 'wp_footer', array( $this, 'storefront_footer_action' ) );
139
  }
140
 
141
+ if ( 'Elessi Theme' === $this->current_theme ) {
142
+ add_action( 'wp_head', array( $this, 'elessi_head_action' ) );
143
+ }
144
+
145
  // Elementor pro
146
  if ( defined( 'ELEMENTOR_PRO_VERSION' ) ) {
147
  add_action( 'wp_footer', array( $this, 'elementor_pro_popup' ) );
809
 
810
  <?php }
811
 
812
+ /*
813
+ * Elessi theme
814
+ */
815
+ public function elessi_head_action() { ?>
816
+
817
+ <style>
818
+ .warpper-mobile-search .aws-container .aws-search-field {
819
+ border-radius: 30px !important;
820
+ border: 1px solid #ccc !important;;
821
+ padding-left: 20px !important;;
822
+ }
823
+ .warpper-mobile-search .aws-container .aws-search-form .aws-form-btn,
824
+ .nasa-header-search-wrap .aws-container .aws-search-form .aws-form-btn {
825
+ background: transparent !important;
826
+ border: none !important;
827
+ }
828
+ </style>
829
+
830
+ <?php }
831
+
832
  /*
833
  * Storefront theme search form layout
834
  */
1132
  $selectors[] = '#search-form form';
1133
  }
1134
 
1135
+ if ( 'Elessi Theme' === $this->current_theme ) {
1136
+ $selectors[] = '.warpper-mobile-search form';
1137
+ }
1138
+
1139
  // WCFM - WooCommerce Multivendor Marketplace
1140
  if ( class_exists( 'WCFMmp' ) ) {
1141
  $selectors[] = '#wcfmmp-store .woocommerce-product-search';
includes/class-aws-versions.php CHANGED
@@ -355,7 +355,7 @@ if ( ! class_exists( 'AWS_Versions' ) ) :
355
  */
356
  public function admin_notice_no_index() { ?>
357
  <div class="updated notice is-dismissible">
358
- <p><?php printf( esc_html__( 'Advanced Woo Search: Please go to plugin setting page and start the indexing of your products. %s', 'advanced-woo-search' ), '<a class="button button-secondary" href="'.esc_url( admin_url('admin.php?page=aws-options') ).'">'.esc_html__( 'Go to Settings Page', 'advanced-woo-search' ).'</a>' ); ?></p>
359
  </div>
360
  <?php }
361
 
355
  */
356
  public function admin_notice_no_index() { ?>
357
  <div class="updated notice is-dismissible">
358
+ <p><?php printf( esc_html__( 'Advanced Woo Search: Please go to the plugin setting page and start indexing your products. %s', 'advanced-woo-search' ), '<a class="button button-secondary" href="'.esc_url( admin_url('admin.php?page=aws-options') ).'">'.esc_html__( 'Go to Settings Page', 'advanced-woo-search' ).'</a>' ); ?></p>
359
  </div>
360
  <?php }
361
 
languages/advanced-woo-search.pot CHANGED
@@ -477,4 +477,67 @@ msgid "Archive pages"
477
  msgstr ""
478
 
479
  msgid "Search for taxonomies and displayed their archive pages in search results."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
480
  msgstr ""
477
  msgstr ""
478
 
479
  msgid "Search for taxonomies and displayed their archive pages in search results."
480
+ msgstr ""
481
+
482
+ msgid "Welcome to %s"
483
+ msgstr ""
484
+
485
+ msgid "Powerful search plugin for WooCommerce."
486
+ msgstr ""
487
+
488
+ msgid "Get Started"
489
+ msgstr ""
490
+
491
+ msgid "In order to start using the plugin search form you need to take following steps:"
492
+ msgstr ""
493
+
494
+ msgid "Index plugin table."
495
+ msgstr ""
496
+
497
+ msgid "Click on the 'Reindex table' button and wait till the index process is finished."
498
+ msgstr ""
499
+
500
+ msgid "Set plugin settings."
501
+ msgstr ""
502
+
503
+ msgid "Leave it to default values or customize some of them."
504
+ msgstr ""
505
+
506
+ msgid "Add search form."
507
+ msgstr ""
508
+
509
+ msgid "There are several ways you can add a search form to your site. Use the 'Seamless integration' option, shortcode, widget or custom php function. Read more inside %s section or read %s."
510
+ msgstr ""
511
+
512
+ msgid "Activation"
513
+ msgstr ""
514
+
515
+ msgid "guide article"
516
+ msgstr ""
517
+
518
+ msgid "Finish!"
519
+ msgstr ""
520
+
521
+ msgid "Now all is set and you can check your search form on the pages where you add it."
522
+ msgstr ""
523
+
524
+ msgid "Documentation"
525
+ msgstr ""
526
+
527
+ msgid "How to Add Search Form"
528
+ msgstr ""
529
+
530
+ msgid "Search Sources"
531
+ msgstr ""
532
+
533
+ msgid "Terms Pages Search"
534
+ msgstr ""
535
+
536
+ msgid "Help"
537
+ msgstr ""
538
+
539
+ msgid "Support Forums"
540
+ msgstr ""
541
+
542
+ msgid "Contact Form"
543
  msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
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: 5.6
7
- Stable tag: 2.15
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,6 +14,8 @@ WooCommerce search plugin. Advanced search features. Support for both AJAX searc
14
 
15
  Advanced Woo Search - powerful search plugin for WooCommerce. Supports **AJAX** search and **search results page** display.
16
 
 
 
17
  = Main Features =
18
 
19
  * **Products search** - Search across all your WooCommerce products
@@ -42,8 +44,6 @@ Advanced Woo Search - powerful search plugin for WooCommerce. Supports **AJAX**
42
  = Premium Features =
43
 
44
  Additional features available only in PRO plugin version.
45
-
46
- [Premium Version Demo](https://advanced-woo-search.com/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo)
47
 
48
  * Search **results layouts**
49
  * Search **form layouts**
@@ -112,6 +112,13 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
112
 
113
  == Changelog ==
114
 
 
 
 
 
 
 
 
115
  = 2.15 ( 2020-11-16 ) =
116
  * Update - Support for WCFM - WooCommerce Multivendor Marketplace plugin: add seamless integration for the vendors shop page, limit search results to vendor products only
117
  * Update - Settings page styles
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: 5.6
7
+ Stable tag: 2.16
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  Advanced Woo Search - powerful search plugin for WooCommerce. Supports **AJAX** search and **search results page** display.
16
 
17
+ [Plugin home page](https://advanced-woo-search.com/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo) | [Features List](https://advanced-woo-search.com/features/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo) | [Docs](https://advanced-woo-search.com/guide/?utm_source=wp-repo&utm_medium=listing&utm_campaign=aws-repo)
18
+
19
  = Main Features =
20
 
21
  * **Products search** - Search across all your WooCommerce products
44
  = Premium Features =
45
 
46
  Additional features available only in PRO plugin version.
 
 
47
 
48
  * Search **results layouts**
49
  * Search **form layouts**
112
 
113
  == Changelog ==
114
 
115
+ = 2.16 ( 2020-11-30 ) =
116
+ * Add - Welcome message
117
+ * Add - Support for Elessi Theme
118
+ * Update - Search results box scrollbar styles
119
+ * Dev - Add aws_results_append_to js filter
120
+ * Dev - Update constants declaration
121
+
122
  = 2.15 ( 2020-11-16 ) =
123
  * Update - Support for WCFM - WooCommerce Multivendor Marketplace plugin: add seamless integration for the vendors shop page, limit search results to vendor products only
124
  * Update - Settings page styles