Ivory Search – WordPress Search Plugin - Version 4.7

Version Description

  • Fixed - IvoryAjaxVars is not defined error when JS file loading is disabled.
  • Fixed - Security issue.
Download this release

Release Info

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

Code changes from version 4.6.6 to 4.7

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.6.6
7
  * Author: Ivory Search
8
  * Author URI: https://ivorysearch.com/
9
  * License: GPL2+
@@ -12,7 +12,7 @@
12
  * Text Domain: add-search-to-menu
13
  *
14
  *
15
- * WC tested up to: 5.6
16
  *
17
  * Ivory Search is free software: you can redistribute it and/or modify
18
  * it under the terms of the GNU General Public License as published by
@@ -108,7 +108,7 @@ final class Ivory_Search {
108
  private function define_constants() {
109
 
110
  if ( ! defined( 'IS_VERSION' ) ) {
111
- define( 'IS_VERSION', '4.6.6' );
112
  }
113
  if ( ! defined( 'IS_PLUGIN_FILE' ) ) {
114
  define( 'IS_PLUGIN_FILE', __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.7
7
  * Author: Ivory Search
8
  * Author URI: https://ivorysearch.com/
9
  * License: GPL2+
12
  * Text Domain: add-search-to-menu
13
  *
14
  *
15
+ * WC tested up to: 5.7
16
  *
17
  * Ivory Search is free software: you can redistribute it and/or modify
18
  * it under the terms of the GNU General Public License as published by
108
  private function define_constants() {
109
 
110
  if ( ! defined( 'IS_VERSION' ) ) {
111
+ define( 'IS_VERSION', '4.7' );
112
  }
113
  if ( ! defined( 'IS_PLUGIN_FILE' ) ) {
114
  define( 'IS_PLUGIN_FILE', __FILE__ );
admin/class-is-admin.php CHANGED
@@ -440,7 +440,10 @@ class IS_Admin
440
  $excludes = __( "Excludes", 'add-search-to-menu' );
441
 
442
  if ( isset( $_REQUEST['tab'] ) ) {
443
- $url = esc_url( menu_page_url( 'ivory-search', false ) ) . '&post=' . $_REQUEST['post'] . '&action=edit';
 
 
 
444
 
445
  if ( 'excludes' == $_REQUEST['tab'] ) {
446
  $includes = '<a href="' . $url . '&tab=includes">' . __( "Includes", 'add-search-to-menu' ) . '</a>';
@@ -452,9 +455,10 @@ class IS_Admin
452
 
453
  }
454
 
 
455
  $updated_message2 = sprintf(
456
  __( "Please make sure you have not selected similar %s fields in the search form %s and %s sections.", 'add-search-to-menu' ),
457
- $_REQUEST['data'],
458
  $includes,
459
  $excludes
460
  );
440
  $excludes = __( "Excludes", 'add-search-to-menu' );
441
 
442
  if ( isset( $_REQUEST['tab'] ) ) {
443
+ $url = esc_url( menu_page_url( 'ivory-search', false ) );
444
+ if ( isset( $_REQUEST['post'] ) ) {
445
+ $url .= '&post=' . esc_html( $_REQUEST['post'] ) . '&action=edit';
446
+ }
447
 
448
  if ( 'excludes' == $_REQUEST['tab'] ) {
449
  $includes = '<a href="' . $url . '&tab=includes">' . __( "Includes", 'add-search-to-menu' ) . '</a>';
455
 
456
  }
457
 
458
+ $temp_mes = ( isset( $_REQUEST['data'] ) ? esc_html( $_REQUEST['data'] ) : '' );
459
  $updated_message2 = sprintf(
460
  __( "Please make sure you have not selected similar %s fields in the search form %s and %s sections.", 'add-search-to-menu' ),
461
+ $temp_mes,
462
  $includes,
463
  $excludes
464
  );
languages/add-search-to-menu.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Ivory Search\n"
5
- "POT-Creation-Date: 2021-09-03 14:12+0530\n"
6
  "PO-Revision-Date: 2020-03-17 21:05+0530\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Ivory Search <admin@ivorysearch.com>\n"
@@ -30,7 +30,7 @@ msgstr ""
30
  msgid "Click on the search form title to edit it."
31
  msgstr ""
32
 
33
- #: ../admin/class-is-admin.php:163 ../admin/class-is-admin.php:449
34
  #: ../admin/class-is-help.php:64 ../admin/class-is-help.php:97
35
  msgid "Settings"
36
  msgstr ""
@@ -51,7 +51,7 @@ msgid ""
51
  "If you like %1$s please leave us a %2$s rating. A huge thanks in advance!"
52
  msgstr ""
53
 
54
- #: ../admin/class-is-admin.php:204 ../admin/class-is-admin.php:433
55
  #: ../includes/class-is-admin-public.php:94 ../includes/class-is-widget.php:13
56
  msgid "Ivory Search"
57
  msgstr ""
@@ -110,89 +110,89 @@ msgstr ""
110
  msgid "Validation error occurred."
111
  msgstr ""
112
 
113
- #: ../admin/class-is-admin.php:413 ../admin/class-is-admin.php:418
114
  #: ../admin/class-is-help.php:35 ../admin/class-is-help.php:85
115
  msgid "Includes"
116
  msgstr ""
117
 
118
- #: ../admin/class-is-admin.php:414 ../admin/class-is-admin.php:420
119
  #: ../admin/class-is-help.php:40 ../admin/class-is-help.php:86
120
  msgid "Excludes"
121
  msgstr ""
122
 
123
- #: ../admin/class-is-admin.php:423
124
  #, php-format
125
  msgid ""
126
  "Please make sure you have not selected similar %s fields in the search form "
127
  "%s and %s sections."
128
  msgstr ""
129
 
130
- #: ../admin/class-is-admin.php:435 ../admin/class-is-admin.php:482
131
  #: ../includes/class-is-search-form.php:59
132
  msgid "Search Forms"
133
  msgstr ""
134
 
135
- #: ../admin/class-is-admin.php:440 ../admin/class-is-admin.php:442
136
- #: ../admin/class-is-admin.php:489 ../admin/partials/search-form.php:21
137
  #: ../admin/partials/search-form.php:31
138
  msgid "Add New Search Form"
139
  msgstr ""
140
 
141
- #: ../admin/class-is-admin.php:440 ../admin/class-is-admin.php:442
142
  msgid "Add New"
143
  msgstr ""
144
 
145
- #: ../admin/class-is-admin.php:446 ../admin/class-is-help.php:59
146
  #: ../admin/class-is-help.php:96
147
  msgid "Menu Search"
148
  msgstr ""
149
 
150
- #: ../admin/class-is-admin.php:449 ../admin/partials/settings-form.php:20
151
  msgid "Ivory Search Settings"
152
  msgstr ""
153
 
154
- #: ../admin/class-is-admin.php:495
155
  #, php-format
156
  msgid "Search results for &#8220;%s&#8221;"
157
  msgstr ""
158
 
159
- #: ../admin/class-is-admin.php:506
160
  msgid "Find Search Forms"
161
  msgstr ""
162
 
163
- #: ../admin/class-is-admin.php:550
164
  msgid "You are not allowed to edit this item."
165
  msgstr ""
166
 
167
- #: ../admin/class-is-admin.php:644
168
  msgid "You are not allowed to reset this item."
169
  msgstr ""
170
 
171
- #: ../admin/class-is-admin.php:680
172
  msgid "You are not allowed to copy this item."
173
  msgstr ""
174
 
175
- #: ../admin/class-is-admin.php:721
176
  msgid "You are not allowed to delete this item."
177
  msgstr ""
178
 
179
- #: ../admin/class-is-admin.php:725
180
  msgid "Error in deleting."
181
  msgstr ""
182
 
183
- #: ../admin/class-is-admin.php:965
184
  msgid "Save Form"
185
  msgstr ""
186
 
187
- #: ../admin/class-is-admin.php:977
188
  msgid "Upgrade to Pro to Access"
189
  msgstr ""
190
 
191
- #: ../admin/class-is-admin.php:984
192
  msgid "Install Premium Version to Access"
193
  msgstr ""
194
 
195
- #: ../admin/class-is-admin.php:986
196
  msgid "Upgrade to Pro Plus to Access"
197
  msgstr ""
198
 
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Ivory Search\n"
5
+ "POT-Creation-Date: 2021-10-01 21:10+0530\n"
6
  "PO-Revision-Date: 2020-03-17 21:05+0530\n"
7
  "Last-Translator: \n"
8
  "Language-Team: Ivory Search <admin@ivorysearch.com>\n"
30
  msgid "Click on the search form title to edit it."
31
  msgstr ""
32
 
33
+ #: ../admin/class-is-admin.php:163 ../admin/class-is-admin.php:453
34
  #: ../admin/class-is-help.php:64 ../admin/class-is-help.php:97
35
  msgid "Settings"
36
  msgstr ""
51
  "If you like %1$s please leave us a %2$s rating. A huge thanks in advance!"
52
  msgstr ""
53
 
54
+ #: ../admin/class-is-admin.php:204 ../admin/class-is-admin.php:437
55
  #: ../includes/class-is-admin-public.php:94 ../includes/class-is-widget.php:13
56
  msgid "Ivory Search"
57
  msgstr ""
110
  msgid "Validation error occurred."
111
  msgstr ""
112
 
113
+ #: ../admin/class-is-admin.php:413 ../admin/class-is-admin.php:421
114
  #: ../admin/class-is-help.php:35 ../admin/class-is-help.php:85
115
  msgid "Includes"
116
  msgstr ""
117
 
118
+ #: ../admin/class-is-admin.php:414 ../admin/class-is-admin.php:423
119
  #: ../admin/class-is-help.php:40 ../admin/class-is-help.php:86
120
  msgid "Excludes"
121
  msgstr ""
122
 
123
+ #: ../admin/class-is-admin.php:427
124
  #, php-format
125
  msgid ""
126
  "Please make sure you have not selected similar %s fields in the search form "
127
  "%s and %s sections."
128
  msgstr ""
129
 
130
+ #: ../admin/class-is-admin.php:439 ../admin/class-is-admin.php:486
131
  #: ../includes/class-is-search-form.php:59
132
  msgid "Search Forms"
133
  msgstr ""
134
 
135
+ #: ../admin/class-is-admin.php:444 ../admin/class-is-admin.php:446
136
+ #: ../admin/class-is-admin.php:493 ../admin/partials/search-form.php:21
137
  #: ../admin/partials/search-form.php:31
138
  msgid "Add New Search Form"
139
  msgstr ""
140
 
141
+ #: ../admin/class-is-admin.php:444 ../admin/class-is-admin.php:446
142
  msgid "Add New"
143
  msgstr ""
144
 
145
+ #: ../admin/class-is-admin.php:450 ../admin/class-is-help.php:59
146
  #: ../admin/class-is-help.php:96
147
  msgid "Menu Search"
148
  msgstr ""
149
 
150
+ #: ../admin/class-is-admin.php:453 ../admin/partials/settings-form.php:20
151
  msgid "Ivory Search Settings"
152
  msgstr ""
153
 
154
+ #: ../admin/class-is-admin.php:499
155
  #, php-format
156
  msgid "Search results for &#8220;%s&#8221;"
157
  msgstr ""
158
 
159
+ #: ../admin/class-is-admin.php:510
160
  msgid "Find Search Forms"
161
  msgstr ""
162
 
163
+ #: ../admin/class-is-admin.php:554
164
  msgid "You are not allowed to edit this item."
165
  msgstr ""
166
 
167
+ #: ../admin/class-is-admin.php:648
168
  msgid "You are not allowed to reset this item."
169
  msgstr ""
170
 
171
+ #: ../admin/class-is-admin.php:684
172
  msgid "You are not allowed to copy this item."
173
  msgstr ""
174
 
175
+ #: ../admin/class-is-admin.php:725
176
  msgid "You are not allowed to delete this item."
177
  msgstr ""
178
 
179
+ #: ../admin/class-is-admin.php:729
180
  msgid "Error in deleting."
181
  msgstr ""
182
 
183
+ #: ../admin/class-is-admin.php:969
184
  msgid "Save Form"
185
  msgstr ""
186
 
187
+ #: ../admin/class-is-admin.php:981
188
  msgid "Upgrade to Pro to Access"
189
  msgstr ""
190
 
191
+ #: ../admin/class-is-admin.php:988
192
  msgid "Install Premium Version to Access"
193
  msgstr ""
194
 
195
+ #: ../admin/class-is-admin.php:990
196
  msgid "Upgrade to Pro Plus to Access"
197
  msgstr ""
198
 
public/class-is-public.php CHANGED
@@ -889,6 +889,55 @@ class IS_Public
889
  if ( isset( $this->opt['header_search'] ) && $this->opt['header_search'] ) {
890
  echo do_shortcode( '[ivory-search id="' . $this->opt['header_search'] . '"]' ) ;
891
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
892
  }
893
 
894
  /**
889
  if ( isset( $this->opt['header_search'] ) && $this->opt['header_search'] ) {
890
  echo do_shortcode( '[ivory-search id="' . $this->opt['header_search'] . '"]' ) ;
891
  }
892
+
893
+ if ( isset( $this->opt['not_load_files']['js'] ) ) {
894
+ $is_temp_ajax = array(
895
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
896
+ 'ajax_nonce' => wp_create_nonce( 'is_ajax_nonce' ),
897
+ );
898
+ ?>
899
+ <script id='ivory-search-js-extras'>
900
+ var IvoryAjaxVars = <?php
901
+ echo json_encode( $is_temp_ajax ) ;
902
+ ?>;
903
+ <?php
904
+ $is_analytics = get_option( 'is_analytics', array() );
905
+ $analytics_disabled = ( isset( $is_analytics['disable_analytics'] ) ? $is_analytics['disable_analytics'] : 0 );
906
+
907
+ if ( !$analytics_disabled ) {
908
+ $is_temp = array(
909
+ 'is_analytics_enabled' => "1",
910
+ );
911
+
912
+ if ( is_search() ) {
913
+ global $wp_query ;
914
+ if ( isset( $_GET['id'] ) ) {
915
+ $is_temp['is_id'] = $_GET['id'];
916
+ }
917
+ if ( isset( $_GET['s'] ) ) {
918
+ $is_temp['is_label'] = $_GET['s'];
919
+ }
920
+
921
+ if ( 0 == $wp_query->found_posts ) {
922
+ $is_temp['is_cat'] = 'Nothing Found';
923
+ } else {
924
+ $is_temp['is_cat'] = 'Results Found';
925
+ }
926
+
927
+ }
928
+
929
+ ?>
930
+ var IvorySearchVars = <?php
931
+ echo json_encode( $is_temp ) ;
932
+ ?>;
933
+ <?php
934
+ }
935
+
936
+ ?>
937
+ </script>
938
+ <?php
939
+ }
940
+
941
  }
942
 
943
  /**
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.8
7
  Requires PHP: 5.2.4
8
- Stable tag: 4.6.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -194,6 +194,10 @@ Yes we do. We try our best to help free users with customisation requests and we
194
 
195
  == Changelog ==
196
 
 
 
 
 
197
  = 4.6.6 =
198
  * Fixed - JavaScript error "Invalid value used as weak map key" in the AJAX search.
199
 
5
  Requires at least: 3.9
6
  Tested up to: 5.8
7
  Requires PHP: 5.2.4
8
+ Stable tag: 4.7
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
194
 
195
  == Changelog ==
196
 
197
+ = 4.7 =
198
+ * Fixed - IvoryAjaxVars is not defined error when JS file loading is disabled.
199
+ * Fixed - Security issue.
200
+
201
  = 4.6.6 =
202
  * Fixed - JavaScript error "Invalid value used as weak map key" in the AJAX search.
203