Ivory Search – WordPress Search Plugin - Version 5.4.9

Version Description

  • Fixed - Tags and Categories search was not working in inverted index search engine.
Download this release

Release Info

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

Code changes from version 5.4.8 to 5.4.9

Files changed (224) hide show
  1. add-search-to-menu.php +12 -42
  2. admin/assets/logo.png +0 -0
  3. admin/class-is-admin.php +9 -20
  4. admin/class-is-editor.php +0 -0
  5. admin/class-is-help.php +0 -0
  6. admin/class-is-list-table.php +0 -0
  7. admin/class-is-settings-fields.php +7 -1
  8. admin/class-is-settings-index-fields.php +0 -0
  9. admin/css/ivory-search-admin.css +0 -0
  10. admin/css/ivory-search-admin.min.css +0 -0
  11. admin/index.php +0 -0
  12. admin/js/ivory-search-admin.js +0 -0
  13. admin/js/ivory-search-admin.min.js +0 -0
  14. admin/partials/search-form.php +0 -0
  15. admin/partials/settings-form.php +0 -0
  16. changelog.txt +0 -0
  17. includes/base-functions.php +0 -0
  18. includes/class-is-activator.php +0 -0
  19. includes/class-is-admin-public.php +46 -14
  20. includes/class-is-base-options.php +1 -14
  21. includes/class-is-customizer-panel.php +0 -8
  22. includes/class-is-customizer.php +0 -0
  23. includes/class-is-deactivator.php +0 -0
  24. includes/class-is-debug.php +0 -0
  25. includes/class-is-i18n.php +0 -0
  26. includes/class-is-index-builder.php +0 -0
  27. includes/class-is-index-helper.php +2 -19
  28. includes/class-is-index-manager.php +0 -0
  29. includes/class-is-index-match.php +0 -0
  30. includes/class-is-index-matches.php +1 -1
  31. includes/class-is-index-model.php +0 -0
  32. includes/class-is-index-options.php +0 -0
  33. includes/class-is-search-form.php +5 -5
  34. includes/class-is-widget.php +0 -0
  35. includes/class-is.php +13 -64
  36. includes/compatibility/class-is-tablepress-compat.php +0 -0
  37. includes/customizer/controls/radio-image/class-is-control-radio-image.php +0 -0
  38. includes/customizer/controls/radio-image/images/style-1.png +0 -0
  39. includes/customizer/controls/radio-image/images/style-2.png +0 -0
  40. includes/customizer/controls/radio-image/images/style-3.png +0 -0
  41. includes/customizer/controls/radio-image/radio-image.css +0 -0
  42. includes/customizer/controls/radio-image/radio-image.js +0 -0
  43. includes/freemius.php +0 -0
  44. includes/freemius/assets/css/admin/account.css +0 -0
  45. includes/freemius/assets/css/admin/add-ons.css +0 -0
  46. includes/freemius/assets/css/admin/affiliation.css +0 -0
  47. includes/freemius/assets/css/admin/checkout.css +0 -0
  48. includes/freemius/assets/css/admin/common.css +0 -0
  49. includes/freemius/assets/css/admin/connect.css +0 -0
  50. includes/freemius/assets/css/admin/debug.css +0 -0
  51. includes/freemius/assets/css/admin/dialog-boxes.css +0 -0
  52. includes/freemius/assets/css/admin/gdpr-optin-notice.css +0 -0
  53. includes/freemius/assets/css/admin/index.php +0 -0
  54. includes/freemius/assets/css/admin/plugins.css +0 -0
  55. includes/freemius/assets/css/customizer.css +0 -0
  56. includes/freemius/assets/css/index.php +0 -0
  57. includes/freemius/assets/img/index.php +0 -0
  58. includes/freemius/assets/img/plugin-icon.png +0 -0
  59. includes/freemius/assets/img/theme-icon.png +0 -0
  60. includes/freemius/assets/index.php +0 -0
  61. includes/freemius/assets/js/index.php +0 -0
  62. includes/freemius/assets/js/nojquery.ba-postmessage.js +0 -0
  63. includes/freemius/assets/js/nojquery.ba-postmessage.min.js +0 -0
  64. includes/freemius/assets/js/postmessage.js +0 -0
  65. includes/freemius/config.php +0 -0
  66. includes/freemius/includes/class-freemius-abstract.php +0 -0
  67. includes/freemius/includes/class-freemius.php +0 -0
  68. includes/freemius/includes/class-fs-admin-notices.php +0 -0
  69. includes/freemius/includes/class-fs-api.php +0 -0
  70. includes/freemius/includes/class-fs-logger.php +0 -0
  71. includes/freemius/includes/class-fs-options.php +0 -0
  72. includes/freemius/includes/class-fs-plugin-updater.php +0 -0
  73. includes/freemius/includes/class-fs-security.php +0 -0
  74. includes/freemius/includes/class-fs-storage.php +0 -0
  75. includes/freemius/includes/class-fs-user-lock.php +0 -0
  76. includes/freemius/includes/customizer/class-fs-customizer-support-section.php +0 -0
  77. includes/freemius/includes/customizer/class-fs-customizer-upsell-control.php +0 -0
  78. includes/freemius/includes/customizer/index.php +0 -0
  79. includes/freemius/includes/debug/class-fs-debug-bar-panel.php +0 -0
  80. includes/freemius/includes/debug/debug-bar-start.php +0 -0
  81. includes/freemius/includes/debug/index.php +0 -0
  82. includes/freemius/includes/entities/class-fs-affiliate-terms.php +0 -0
  83. includes/freemius/includes/entities/class-fs-affiliate.php +0 -0
  84. includes/freemius/includes/entities/class-fs-billing.php +0 -0
  85. includes/freemius/includes/entities/class-fs-entity.php +0 -0
  86. includes/freemius/includes/entities/class-fs-payment.php +0 -0
  87. includes/freemius/includes/entities/class-fs-plugin-info.php +0 -0
  88. includes/freemius/includes/entities/class-fs-plugin-license.php +0 -0
  89. includes/freemius/includes/entities/class-fs-plugin-plan.php +0 -0
  90. includes/freemius/includes/entities/class-fs-plugin-tag.php +0 -0
  91. includes/freemius/includes/entities/class-fs-plugin.php +0 -0
  92. includes/freemius/includes/entities/class-fs-pricing.php +0 -0
  93. includes/freemius/includes/entities/class-fs-scope-entity.php +0 -0
  94. includes/freemius/includes/entities/class-fs-site.php +0 -0
  95. includes/freemius/includes/entities/class-fs-subscription.php +0 -0
  96. includes/freemius/includes/entities/class-fs-user.php +0 -0
  97. includes/freemius/includes/entities/index.php +0 -0
  98. includes/freemius/includes/fs-core-functions.php +0 -0
  99. includes/freemius/includes/fs-essential-functions.php +0 -0
  100. includes/freemius/includes/fs-plugin-info-dialog.php +0 -0
  101. includes/freemius/includes/i18n.php +0 -0
  102. includes/freemius/includes/index.php +0 -0
  103. includes/freemius/includes/l10n.php +0 -0
  104. includes/freemius/includes/managers/class-fs-admin-menu-manager.php +0 -0
  105. includes/freemius/includes/managers/class-fs-admin-notice-manager.php +0 -0
  106. includes/freemius/includes/managers/class-fs-cache-manager.php +0 -0
  107. includes/freemius/includes/managers/class-fs-gdpr-manager.php +0 -0
  108. includes/freemius/includes/managers/class-fs-key-value-storage.php +0 -0
  109. includes/freemius/includes/managers/class-fs-license-manager.php +0 -0
  110. includes/freemius/includes/managers/class-fs-option-manager.php +0 -0
  111. includes/freemius/includes/managers/class-fs-plan-manager.php +0 -0
  112. includes/freemius/includes/managers/class-fs-plugin-manager.php +0 -0
  113. includes/freemius/includes/managers/index.php +0 -0
  114. includes/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php +0 -0
  115. includes/freemius/includes/sdk/Exceptions/EmptyArgumentException.php +0 -0
  116. includes/freemius/includes/sdk/Exceptions/Exception.php +0 -0
  117. includes/freemius/includes/sdk/Exceptions/InvalidArgumentException.php +0 -0
  118. includes/freemius/includes/sdk/Exceptions/OAuthException.php +0 -0
  119. includes/freemius/includes/sdk/Exceptions/index.php +0 -0
  120. includes/freemius/includes/sdk/FreemiusBase.php +0 -0
  121. includes/freemius/includes/sdk/FreemiusWordPress.php +0 -0
  122. includes/freemius/includes/sdk/LICENSE.txt +0 -0
  123. includes/freemius/includes/sdk/index.php +0 -0
  124. includes/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php +0 -0
  125. includes/freemius/includes/supplements/fs-essential-functions-2.2.1.php +0 -0
  126. includes/freemius/includes/supplements/index.php +0 -0
  127. includes/freemius/index.php +0 -0
  128. includes/freemius/languages/freemius-cs_CZ.mo +0 -0
  129. includes/freemius/languages/freemius-da_DK.mo +0 -0
  130. includes/freemius/languages/freemius-de_DE.mo +0 -0
  131. includes/freemius/languages/freemius-en.mo +0 -0
  132. includes/freemius/languages/freemius-es_ES.mo +0 -0
  133. includes/freemius/languages/freemius-fr_FR.mo +0 -0
  134. includes/freemius/languages/freemius-he_IL.mo +0 -0
  135. includes/freemius/languages/freemius-hu_HU.mo +0 -0
  136. includes/freemius/languages/freemius-it_IT.mo +0 -0
  137. includes/freemius/languages/freemius-ja.mo +0 -0
  138. includes/freemius/languages/freemius-nl_NL.mo +0 -0
  139. includes/freemius/languages/freemius-ru_RU.mo +0 -0
  140. includes/freemius/languages/freemius-ta.mo +0 -0
  141. includes/freemius/languages/freemius-zh_CN.mo +0 -0
  142. includes/freemius/languages/freemius.pot +0 -0
  143. includes/freemius/languages/index.php +0 -0
  144. includes/freemius/require.php +0 -0
  145. includes/freemius/start.php +0 -0
  146. includes/freemius/templates/account.php +0 -0
  147. includes/freemius/templates/account/billing.php +0 -0
  148. includes/freemius/templates/account/index.php +0 -0
  149. includes/freemius/templates/account/partials/activate-license-button.php +0 -0
  150. includes/freemius/templates/account/partials/addon.php +0 -0
  151. includes/freemius/templates/account/partials/deactivate-license-button.php +0 -0
  152. includes/freemius/templates/account/partials/index.php +0 -0
  153. includes/freemius/templates/account/partials/site.php +0 -0
  154. includes/freemius/templates/account/payments.php +0 -0
  155. includes/freemius/templates/add-ons.php +0 -0
  156. includes/freemius/templates/add-trial-to-pricing.php +0 -0
  157. includes/freemius/templates/admin-notice.php +0 -0
  158. includes/freemius/templates/ajax-loader.php +0 -0
  159. includes/freemius/templates/auto-installation.php +0 -0
  160. includes/freemius/templates/checkout.php +0 -0
  161. includes/freemius/templates/connect.php +0 -0
  162. includes/freemius/templates/contact.php +0 -0
  163. includes/freemius/templates/debug.php +0 -0
  164. includes/freemius/templates/debug/api-calls.php +0 -0
  165. includes/freemius/templates/debug/index.php +0 -0
  166. includes/freemius/templates/debug/logger.php +0 -0
  167. includes/freemius/templates/debug/plugins-themes-sync.php +0 -0
  168. includes/freemius/templates/debug/scheduled-crons.php +0 -0
  169. includes/freemius/templates/email.php +0 -0
  170. includes/freemius/templates/firewall-issues-js.php +0 -0
  171. includes/freemius/templates/forms/affiliation.php +0 -0
  172. includes/freemius/templates/forms/data-debug-mode.php +0 -0
  173. includes/freemius/templates/forms/deactivation/contact.php +0 -0
  174. includes/freemius/templates/forms/deactivation/form.php +0 -0
  175. includes/freemius/templates/forms/deactivation/index.php +0 -0
  176. includes/freemius/templates/forms/deactivation/retry-skip.php +0 -0
  177. includes/freemius/templates/forms/index.php +0 -0
  178. includes/freemius/templates/forms/license-activation.php +0 -0
  179. includes/freemius/templates/forms/optout.php +0 -0
  180. includes/freemius/templates/forms/premium-versions-upgrade-handler.php +0 -0
  181. includes/freemius/templates/forms/premium-versions-upgrade-metadata.php +0 -0
  182. includes/freemius/templates/forms/resend-key.php +0 -0
  183. includes/freemius/templates/forms/subscription-cancellation.php +0 -0
  184. includes/freemius/templates/forms/trial-start.php +0 -0
  185. includes/freemius/templates/forms/user-change.php +0 -0
  186. includes/freemius/templates/gdpr-optin-js.php +0 -0
  187. includes/freemius/templates/index.php +0 -0
  188. includes/freemius/templates/js/index.php +0 -0
  189. includes/freemius/templates/js/jquery.content-change.php +0 -0
  190. includes/freemius/templates/js/open-license-activation.php +0 -0
  191. includes/freemius/templates/js/style-premium-theme.php +0 -0
  192. includes/freemius/templates/partials/index.php +0 -0
  193. includes/freemius/templates/partials/network-activation.php +0 -0
  194. includes/freemius/templates/plugin-icon.php +0 -0
  195. includes/freemius/templates/plugin-info/description.php +0 -0
  196. includes/freemius/templates/plugin-info/features.php +0 -0
  197. includes/freemius/templates/plugin-info/index.php +0 -0
  198. includes/freemius/templates/plugin-info/screenshots.php +0 -0
  199. includes/freemius/templates/powered-by.php +0 -0
  200. includes/freemius/templates/pricing.php +0 -0
  201. includes/freemius/templates/secure-https-header.php +0 -0
  202. includes/freemius/templates/sticky-admin-notice-js.php +0 -0
  203. includes/freemius/templates/tabs-capture-js.php +0 -0
  204. includes/freemius/templates/tabs.php +0 -0
  205. includes/index.php +0 -0
  206. languages/add-search-to-menu.pot +0 -0
  207. public/class-is-ajax.php +52 -86
  208. public/class-is-index-search.php +0 -1
  209. public/class-is-public.php +9 -3
  210. public/css/ivory-ajax-search.css +0 -0
  211. public/css/ivory-ajax-search.min.css +0 -0
  212. public/css/ivory-search.css +0 -0
  213. public/css/ivory-search.min.css +0 -0
  214. public/images/mCSB_buttons.png +0 -0
  215. public/images/spinner.gif +0 -0
  216. public/index.php +0 -0
  217. public/js/is-highlight.js +0 -0
  218. public/js/is-highlight.min.js +0 -0
  219. public/js/ivory-ajax-search.js +0 -0
  220. public/js/ivory-ajax-search.min.js +0 -0
  221. public/js/ivory-search.js +0 -0
  222. public/js/ivory-search.min.js +0 -0
  223. public/partials/is-ajax-results.php +0 -0
  224. readme.txt +5 -2
add-search-to-menu.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Ivory Search
5
  * Plugin URI: https://ivorysearch.com
6
  * Description: The WordPress Search plugin that includes Search Form Customizer, WooCommerce Search, Image Search, Search Shortcode, AJAX Search & Live Search support!
7
- * Version: 5.4.8
8
  * Author: Ivory Search
9
  * Author URI: https://ivorysearch.com/
10
  * License: GPL2+
@@ -13,7 +13,7 @@
13
  * Text Domain: add-search-to-menu
14
  *
15
  *
16
- * WC tested up to: 6
17
  *
18
  * Ivory Search is free software: you can redistribute it and/or modify
19
  * it under the terms of the GNU General Public License as published by
@@ -52,23 +52,11 @@ if ( function_exists( 'is_fs' ) ) {
52
  */
53
  final class Ivory_Search
54
  {
55
- /**
56
- * Stores plugin options.
57
- */
58
- private static $opt ;
59
  /**
60
  * Core singleton class
61
  * @var self
62
  */
63
  private static $_instance ;
64
- /**
65
- * Ivory Search Constructor.
66
- */
67
- public function __construct()
68
- {
69
- Ivory_Search::$opt = self::load_options();
70
- }
71
-
72
  /**
73
  * Gets the instance of this class.
74
  *
@@ -82,35 +70,13 @@ final class Ivory_Search
82
  return self::$_instance;
83
  }
84
 
85
- /**
86
- * Loads plugin options.
87
- *
88
- */
89
- public static function load_options()
90
- {
91
-
92
- if ( empty(Ivory_Search::$opt) ) {
93
- $temp = (array) get_option( 'ivory_search', array() );
94
- $is_menu_search = get_option( 'is_menu_search', array() );
95
- $temp2 = array_merge( $temp, (array) $is_menu_search );
96
- $is_settings = get_option( 'is_settings', array() );
97
- $temp3 = array_merge( $temp2, (array) $is_settings );
98
- $is_notices = get_option( 'is_notices', array() );
99
- Ivory_Search::$opt = array_merge( $temp3, (array) $is_notices );
100
- return Ivory_Search::$opt;
101
- } else {
102
- return Ivory_Search::$opt;
103
- }
104
-
105
- }
106
-
107
  /**
108
  * Defines Ivory Search Constants.
109
  */
110
  public function define_constants()
111
  {
112
  if ( !defined( 'IS_VERSION' ) ) {
113
- define( 'IS_VERSION', '5.4.8' );
114
  }
115
  if ( !defined( 'IS_PLUGIN_FILE' ) ) {
116
  define( 'IS_PLUGIN_FILE', __FILE__ );
@@ -190,7 +156,7 @@ final class Ivory_Search
190
  /**
191
  * Hooks into initialization actions and filters.
192
  */
193
- private function init_hooks()
194
  {
195
  // Executes necessary actions on plugin activation and deactivation.
196
  register_activation_hook( IS_PLUGIN_FILE, array( 'IS_Activator', 'activate' ) );
@@ -202,9 +168,6 @@ final class Ivory_Search
202
  */
203
  function start()
204
  {
205
- $this->define_constants();
206
- $this->includes();
207
- $this->init_hooks();
208
  $is_loader = IS_Loader::getInstance();
209
  $is_loader->load();
210
  }
@@ -229,4 +192,11 @@ add_action( 'plugins_loaded', 'ivory_search_start' );
229
  */
230
  $is = Ivory_Search::getInstance();
231
  $is->define_constants();
232
- require_once IS_PLUGIN_DIR . 'includes/freemius.php';
 
 
 
 
 
 
 
4
  * Plugin Name: Ivory Search
5
  * Plugin URI: https://ivorysearch.com
6
  * Description: The WordPress Search plugin that includes Search Form Customizer, WooCommerce Search, Image Search, Search Shortcode, AJAX Search & Live Search support!
7
+ * Version: 5.4.9
8
  * Author: Ivory Search
9
  * Author URI: https://ivorysearch.com/
10
  * License: GPL2+
13
  * Text Domain: add-search-to-menu
14
  *
15
  *
16
+ * WC tested up to: 7
17
  *
18
  * Ivory Search is free software: you can redistribute it and/or modify
19
  * it under the terms of the GNU General Public License as published by
52
  */
53
  final class Ivory_Search
54
  {
 
 
 
 
55
  /**
56
  * Core singleton class
57
  * @var self
58
  */
59
  private static $_instance ;
 
 
 
 
 
 
 
 
60
  /**
61
  * Gets the instance of this class.
62
  *
70
  return self::$_instance;
71
  }
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  /**
74
  * Defines Ivory Search Constants.
75
  */
76
  public function define_constants()
77
  {
78
  if ( !defined( 'IS_VERSION' ) ) {
79
+ define( 'IS_VERSION', '5.4.9' );
80
  }
81
  if ( !defined( 'IS_PLUGIN_FILE' ) ) {
82
  define( 'IS_PLUGIN_FILE', __FILE__ );
156
  /**
157
  * Hooks into initialization actions and filters.
158
  */
159
+ public function register_activ_deactiv_hooks()
160
  {
161
  // Executes necessary actions on plugin activation and deactivation.
162
  register_activation_hook( IS_PLUGIN_FILE, array( 'IS_Activator', 'activate' ) );
168
  */
169
  function start()
170
  {
 
 
 
171
  $is_loader = IS_Loader::getInstance();
172
  $is_loader->load();
173
  }
192
  */
193
  $is = Ivory_Search::getInstance();
194
  $is->define_constants();
195
+ require_once IS_PLUGIN_DIR . 'includes/freemius.php';
196
+ /**
197
+ * Registering these hooks inside the 'plugins_loaded' or 'init' hooks will not work.
198
+ *
199
+ * @since 5.4.9
200
+ */
201
+ $is->includes();
202
+ $is->register_activ_deactiv_hooks();
admin/assets/logo.png CHANGED
File without changes
admin/class-is-admin.php CHANGED
@@ -8,29 +8,11 @@
8
  */
9
  class IS_Admin
10
  {
11
- /**
12
- * Stores plugin options.
13
- */
14
- public $opt ;
15
- /**
16
- * Stores network activation status.
17
- */
18
- private $networkactive ;
19
  /**
20
  * Core singleton class
21
  * @var self
22
  */
23
  private static $_instance ;
24
- /**
25
- * Initializes this class.
26
- *
27
- */
28
- public function __construct()
29
- {
30
- $this->opt = Ivory_Search::load_options();
31
- $this->networkactive = is_multisite() && array_key_exists( plugin_basename( IS_PLUGIN_FILE ), (array) get_site_option( 'active_sitewide_plugins' ) );
32
- }
33
-
34
  /**
35
  * Gets the instance of this class.
36
  *
@@ -230,12 +212,16 @@ class IS_Admin
230
  */
231
  function all_admin_notices()
232
  {
233
- $hascaps = ( $this->networkactive ? is_network_admin() && current_user_can( 'manage_network_plugins' ) : current_user_can( 'manage_options' ) );
 
234
 
235
  if ( $hascaps ) {
236
  $screen = get_current_screen();
237
  $is_ivory = strpos( $screen->id, 'ivory-search' );
238
  $display_review = true;
 
 
 
239
  //Don't display if dismissed
240
  if ( isset( $this->opt['is_notices']['review'] ) && $this->opt['is_notices']['review'] || isset( $_GET['is_dismiss'] ) && 'notice_review' == $_GET['is_dismiss'] ) {
241
  $display_review = false;
@@ -342,7 +328,10 @@ class IS_Admin
342
  ob_start();
343
 
344
  if ( isset( $_GET['is_dismiss'] ) && '' !== $_GET['is_dismiss'] ) {
345
- $is_notices = get_option( 'is_notices', array() );
 
 
 
346
  if ( 'notice_review' === $_GET['is_dismiss'] ) {
347
  $is_notices['is_notices']['review'] = 1;
348
  }
8
  */
9
  class IS_Admin
10
  {
 
 
 
 
 
 
 
 
11
  /**
12
  * Core singleton class
13
  * @var self
14
  */
15
  private static $_instance ;
 
 
 
 
 
 
 
 
 
 
16
  /**
17
  * Gets the instance of this class.
18
  *
212
  */
213
  function all_admin_notices()
214
  {
215
+ $isnetworkactive = is_multisite() && array_key_exists( plugin_basename( IS_PLUGIN_FILE ), (array) get_site_option( 'active_sitewide_plugins' ) );
216
+ $hascaps = ( $isnetworkactive ? is_network_admin() && current_user_can( 'manage_network_plugins' ) : current_user_can( 'manage_options' ) );
217
 
218
  if ( $hascaps ) {
219
  $screen = get_current_screen();
220
  $is_ivory = strpos( $screen->id, 'ivory-search' );
221
  $display_review = true;
222
+ if ( empty($this->opt) ) {
223
+ $this->opt = get_option( 'is_notices', array() );
224
+ }
225
  //Don't display if dismissed
226
  if ( isset( $this->opt['is_notices']['review'] ) && $this->opt['is_notices']['review'] || isset( $_GET['is_dismiss'] ) && 'notice_review' == $_GET['is_dismiss'] ) {
227
  $display_review = false;
328
  ob_start();
329
 
330
  if ( isset( $_GET['is_dismiss'] ) && '' !== $_GET['is_dismiss'] ) {
331
+ if ( empty($this->opt) ) {
332
+ $this->opt = get_option( 'is_notices', array() );
333
+ }
334
+ $is_notices = $this->opt;
335
  if ( 'notice_review' === $_GET['is_dismiss'] ) {
336
  $is_notices['is_notices']['review'] = 1;
337
  }
admin/class-is-editor.php CHANGED
File without changes
admin/class-is-help.php CHANGED
File without changes
admin/class-is-list-table.php CHANGED
File without changes
admin/class-is-settings-fields.php CHANGED
@@ -29,7 +29,13 @@ class IS_Settings_Fields
29
  */
30
  public function __construct()
31
  {
32
- $this->opt = Ivory_Search::load_options();
 
 
 
 
 
 
33
  }
34
 
35
  /**
29
  */
30
  public function __construct()
31
  {
32
+
33
+ if ( empty($this->opt) ) {
34
+ $is_menu_search = get_option( 'is_menu_search', array() );
35
+ $is_settings = get_option( 'is_settings', array() );
36
+ $this->opt = array_merge( (array) $is_settings, (array) $is_menu_search );
37
+ }
38
+
39
  }
40
 
41
  /**
admin/class-is-settings-index-fields.php CHANGED
File without changes
admin/css/ivory-search-admin.css CHANGED
File without changes
admin/css/ivory-search-admin.min.css CHANGED
File without changes
admin/index.php CHANGED
File without changes
admin/js/ivory-search-admin.js CHANGED
File without changes
admin/js/ivory-search-admin.min.js CHANGED
File without changes
admin/partials/search-form.php CHANGED
File without changes
admin/partials/settings-form.php CHANGED
File without changes
changelog.txt CHANGED
File without changes
includes/base-functions.php CHANGED
File without changes
includes/class-is-activator.php CHANGED
File without changes
includes/class-is-admin-public.php CHANGED
@@ -8,24 +8,12 @@
8
 
9
  class IS_Admin_Public {
10
 
11
- /**
12
- * Stores plugin options.
13
- */
14
- public $opt;
15
-
16
  /**
17
  * Core singleton class
18
  * @var self
19
  */
20
  private static $_instance;
21
 
22
- /**
23
- * Initializes this class and stores the plugin options.
24
- */
25
- public function __construct() {
26
- $this->opt = Ivory_Search::load_options();
27
- }
28
-
29
  /**
30
  * Gets the instance of this class.
31
  *
@@ -279,8 +267,8 @@ class IS_Admin_Public {
279
  */
280
  function get_search_form( $form ) {
281
 
282
- if ( isset( $this->opt['disable'] ) ) {
283
- return '';
284
  }
285
 
286
  if ( isset( $this->opt['default_search'] ) ) {
@@ -335,4 +323,48 @@ class IS_Admin_Public {
335
 
336
  return $html;
337
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  }
 
 
 
8
 
9
  class IS_Admin_Public {
10
 
 
 
 
 
 
11
  /**
12
  * Core singleton class
13
  * @var self
14
  */
15
  private static $_instance;
16
 
 
 
 
 
 
 
 
17
  /**
18
  * Gets the instance of this class.
19
  *
267
  */
268
  function get_search_form( $form ) {
269
 
270
+ if ( isset( $this->opt['disable'] ) ) {
271
+ return '';
272
  }
273
 
274
  if ( isset( $this->opt['default_search'] ) ) {
323
 
324
  return $html;
325
  }
326
+
327
+
328
+ /**
329
+ * Displays search form by processing shortcode.
330
+ */
331
+ function search_form_shortcode( $args ) {
332
+
333
+ if ( is_feed() ) {
334
+ return '[ivory-search]';
335
+ }
336
+
337
+ $is_settings = get_option( 'is_settings', array() );
338
+ if ( isset( $is_settings['disable'] ) ) {
339
+ return;
340
+ }
341
+
342
+ $atts = shortcode_atts(
343
+ array(
344
+ 'id' => 0,
345
+ 'title' => '',
346
+ ),
347
+ $args, 'ivory-search'
348
+ );
349
+
350
+ $atts = array_map( 'sanitize_text_field', $atts );
351
+
352
+ if ( ! is_numeric( $atts['id'] ) || 0 == $atts['id'] ) {
353
+ return '[ivory-search 404 "Invalid search form ID '. esc_html( $atts['id'] ) .'"]';
354
+ }
355
+
356
+ $search_form = IS_Search_Form::get_instance( $atts['id'] );
357
+
358
+ if ( ! $search_form ) {
359
+ return '[ivory-search 404 "The search form '. esc_html( $atts['id'] ) .' does not exist"]';
360
+ }
361
+
362
+ $form = $search_form->form_html( $atts );
363
+
364
+ return $form;
365
+ }
366
+
367
  }
368
+
369
+ $is_admin_public = IS_Admin_Public::getInstance();
370
+ add_shortcode( 'ivory-search', array( $is_admin_public, 'search_form_shortcode' ) );
includes/class-is-base-options.php CHANGED
@@ -219,7 +219,7 @@ class IS_Base_Options
219
  public function get_is_option( $option, $default = '' )
220
  {
221
  if ( empty(static::$opt) ) {
222
- static::$opt = Ivory_Search::load_options();
223
  }
224
  $value = $default;
225
  if ( !empty(static::$opt[$option]) ) {
@@ -231,19 +231,6 @@ class IS_Base_Options
231
  return $value;
232
  }
233
 
234
- /**
235
- * Set index option value.
236
- *
237
- * @since 5.0
238
- * @param string $option The suboption name.
239
- * @param string $value The value to set.
240
- */
241
- public function set_is_option( $option, $value )
242
- {
243
- static::$opt = Ivory_Search::load_options();
244
- static::$opt[$option] = $value;
245
- }
246
-
247
  /**
248
  * Delete object options saved in the DB.
249
  *
219
  public function get_is_option( $option, $default = '' )
220
  {
221
  if ( empty(static::$opt) ) {
222
+ static::$opt = get_option( 'is_settings', array() );
223
  }
224
  $value = $default;
225
  if ( !empty(static::$opt[$option]) ) {
231
  return $value;
232
  }
233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  /**
235
  * Delete object options saved in the DB.
236
  *
includes/class-is-customizer-panel.php CHANGED
@@ -49,14 +49,6 @@ if ( ! class_exists( 'IS_Customizer_Panel' ) ) :
49
  return self::$instance;
50
  }
51
 
52
- /**
53
- * Constructor
54
- *
55
- * @since 4.3
56
- */
57
- public function __construct() {
58
- }
59
-
60
  /**
61
  * Add panel
62
  *
49
  return self::$instance;
50
  }
51
 
 
 
 
 
 
 
 
 
52
  /**
53
  * Add panel
54
  *
includes/class-is-customizer.php CHANGED
File without changes
includes/class-is-deactivator.php CHANGED
File without changes
includes/class-is-debug.php CHANGED
File without changes
includes/class-is-i18n.php CHANGED
File without changes
includes/class-is-index-builder.php CHANGED
File without changes
includes/class-is-index-helper.php CHANGED
@@ -4,7 +4,6 @@
4
  * Inverted Index Helper.
5
  *
6
  * Commom functions shared in admin and public.
7
- * This class is based on Mikko Saari's Relevanssi plugin.
8
  *
9
  * @package IS
10
  * @subpackage IS/includes
@@ -132,11 +131,6 @@ class IS_Index_Helper {
132
  /**
133
  * Renders Gutenberg blocks.
134
  *
135
- * Renders all sorts of Gutenberg blocks, including reusable blocks and ACF
136
- * blocks. Also enables basic Gutenberg deindexing: you can add an extra CSS
137
- * class 'is_noindex' to a block to stop it from being indexed by
138
- * Relevanssi. This function is essentially the same as core do_blocks().
139
- *
140
  * @see do_blocks()
141
  *
142
  * @since 5.0
@@ -156,10 +150,6 @@ class IS_Index_Helper {
156
  /**
157
  * Filters the Gutenberg block before it is rendered.
158
  *
159
- * If the block is non-empty after the filter and it's className
160
- * parameter is not 'relevanssi_noindex', it will be passed on to the
161
- * render_block() function for rendering.
162
- *
163
  * @see render_block
164
  *
165
  * @param array $block The Gutenberg block element.
@@ -241,7 +231,7 @@ class IS_Index_Helper {
241
  'recent_products', // A problematic WooCommerce shortcode.
242
  'php', // PHP Code for Posts.
243
  'watupro', // Watu PRO doesn't co-operate.
244
- 'starbox', // Starbox shortcode breaks Relevanssi.
245
  'cfdb-save-form-post', // Contact Form DB.
246
  'cfdb-datatable',
247
  'cfdb-table',
@@ -306,9 +296,7 @@ class IS_Index_Helper {
306
  *
307
  * @param array An array of page builder shortcode regexes.
308
  * @param string Context, ie. the current filter hook, if you want your
309
- * changes to only count for indexing or for excerpts. In indexing, this
310
- * is 'relevanssi_post_content', for excerpts it's
311
- * 'relevanssi_pre_excerpt_content'.
312
  */
313
  $search_array = apply_filters(
314
  'is_page_builder_shortcodes',
@@ -563,11 +551,6 @@ class IS_Index_Helper {
563
  /**
564
  * Strips tags from contents, keeping the allowed tags.
565
  *
566
- * The allowable tags are read from the relevanssi_excerpt_allowable_tags
567
- * option. Relevanssi also adds extra spaces after some tags to make sure words
568
- * are not stuck together after the tags are removed. The function also removes
569
- * invisible content.
570
- *
571
  * @uses strip_invisibles() Used to remove scripts and other tags.
572
  * @see strip_tags() Used to remove tags.
573
  *
4
  * Inverted Index Helper.
5
  *
6
  * Commom functions shared in admin and public.
 
7
  *
8
  * @package IS
9
  * @subpackage IS/includes
131
  /**
132
  * Renders Gutenberg blocks.
133
  *
 
 
 
 
 
134
  * @see do_blocks()
135
  *
136
  * @since 5.0
150
  /**
151
  * Filters the Gutenberg block before it is rendered.
152
  *
 
 
 
 
153
  * @see render_block
154
  *
155
  * @param array $block The Gutenberg block element.
231
  'recent_products', // A problematic WooCommerce shortcode.
232
  'php', // PHP Code for Posts.
233
  'watupro', // Watu PRO doesn't co-operate.
234
+ 'starbox', // Starbox shortcode breaks search.
235
  'cfdb-save-form-post', // Contact Form DB.
236
  'cfdb-datatable',
237
  'cfdb-table',
296
  *
297
  * @param array An array of page builder shortcode regexes.
298
  * @param string Context, ie. the current filter hook, if you want your
299
+ * changes to only count for indexing or for excerpts.
 
 
300
  */
301
  $search_array = apply_filters(
302
  'is_page_builder_shortcodes',
551
  /**
552
  * Strips tags from contents, keeping the allowed tags.
553
  *
 
 
 
 
 
554
  * @uses strip_invisibles() Used to remove scripts and other tags.
555
  * @see strip_tags() Used to remove tags.
556
  *
includes/class-is-index-manager.php CHANGED
File without changes
includes/class-is-index-match.php CHANGED
File without changes
includes/class-is-index-matches.php CHANGED
@@ -101,7 +101,7 @@ class IS_Index_Matches {
101
  case 'tax_desp':
102
  $tax_query = $search_form->group_prop( '_is_includes', 'tax_query' );
103
  $tax_rel = $search_form->group_prop( '_is_includes', 'tax_rel' );
104
- if ( isset( $match->taxonomy_detail ) && is_array( $match->taxonomy_detail ) ) {
105
  if ( ! empty( $tax_query ) ) {
106
  $tax = array_keys( $tax_query );
107
  $intersect = array_intersect( $tax, array_keys( $match->taxonomy_detail ) );
101
  case 'tax_desp':
102
  $tax_query = $search_form->group_prop( '_is_includes', 'tax_query' );
103
  $tax_rel = $search_form->group_prop( '_is_includes', 'tax_rel' );
104
+ if ( property_exists( $match, 'taxonomy_detail' ) && is_array( $match->taxonomy_detail ) ) {
105
  if ( ! empty( $tax_query ) ) {
106
  $tax = array_keys( $tax_query );
107
  $intersect = array_intersect( $tax, array_keys( $match->taxonomy_detail ) );
includes/class-is-index-model.php CHANGED
File without changes
includes/class-is-index-options.php CHANGED
File without changes
includes/class-is-search-form.php CHANGED
@@ -66,8 +66,8 @@ class IS_Search_Form {
66
  $is_id = absint( get_query_var( 'id' ) );
67
  }
68
 
69
- $opt = Ivory_Search::load_options();
70
- if ( empty( $is_id ) && empty( $opt['default_search'] ) ) {
71
  $page = get_page_by_path( 'default-search-form', OBJECT, 'is_search_form' );
72
  if ( ! empty( $page ) ) {
73
  $is_id = $page->ID;
@@ -467,7 +467,7 @@ class IS_Search_Form {
467
  $search_form = false;
468
  $enabled_customization = false;
469
  $is_site_lang = isset( $_GET['lang'] ) ? sanitize_text_field($_GET['lang']) : false;
470
- $is_opt = Ivory_Search::load_options();
471
  $min = ( defined( 'IS_DEBUG' ) && IS_DEBUG ) ? '' : '.min';
472
  $is_site_lang = isset( $_GET['lang'] ) ? sanitize_text_field( $_GET['lang'] ) : false;
473
 
@@ -484,7 +484,7 @@ class IS_Search_Form {
484
  $_settings = $this->prop('_is_settings');
485
  $enabled_customization = ( isset( $_customize['enable_customize'] ) || 'default-search-form' != $search_form->name() || isset( $_ajax['enable_ajax'] ) ) ? true : false;
486
 
487
- if ( ! isset( $is_opt['not_load_files']['css'] ) && isset( $_ajax['enable_ajax'] ) ) {
488
  wp_enqueue_style( 'ivory-ajax-search-styles', plugins_url( '/public/css/ivory-ajax-search'.$min.'.css', IS_PLUGIN_FILE ), array(), IS_VERSION );
489
  }
490
 
@@ -619,7 +619,7 @@ class IS_Search_Form {
619
  $result = apply_filters( 'is_custom_search_form', $result );
620
  }
621
 
622
- if ( isset( $is_opt['easy_edit'] ) && is_user_logged_in() && current_user_can( 'administrator' ) ) {
623
  $result .= '<div class="is-link-container"><div><a class="is-edit-link" target="_blank" href="'.admin_url( 'admin.php?page=ivory-search&post='.absint( $args['id'] ).'&action=edit' ) . '">'.__( "Edit", "add-search-to-menu") .'</a>';
624
 
625
  if ( ! is_customize_preview() ) {
66
  $is_id = absint( get_query_var( 'id' ) );
67
  }
68
 
69
+ $is_settings = get_option( 'is_settings', array() );
70
+ if ( empty( $is_id ) && empty( $is_settings['default_search'] ) ) {
71
  $page = get_page_by_path( 'default-search-form', OBJECT, 'is_search_form' );
72
  if ( ! empty( $page ) ) {
73
  $is_id = $page->ID;
467
  $search_form = false;
468
  $enabled_customization = false;
469
  $is_site_lang = isset( $_GET['lang'] ) ? sanitize_text_field($_GET['lang']) : false;
470
+ $is_settings = get_option( 'is_settings', array() );
471
  $min = ( defined( 'IS_DEBUG' ) && IS_DEBUG ) ? '' : '.min';
472
  $is_site_lang = isset( $_GET['lang'] ) ? sanitize_text_field( $_GET['lang'] ) : false;
473
 
484
  $_settings = $this->prop('_is_settings');
485
  $enabled_customization = ( isset( $_customize['enable_customize'] ) || 'default-search-form' != $search_form->name() || isset( $_ajax['enable_ajax'] ) ) ? true : false;
486
 
487
+ if ( ! isset( $is_settings['not_load_files']['css'] ) && isset( $_ajax['enable_ajax'] ) ) {
488
  wp_enqueue_style( 'ivory-ajax-search-styles', plugins_url( '/public/css/ivory-ajax-search'.$min.'.css', IS_PLUGIN_FILE ), array(), IS_VERSION );
489
  }
490
 
619
  $result = apply_filters( 'is_custom_search_form', $result );
620
  }
621
 
622
+ if ( isset( $is_settings['easy_edit'] ) && is_user_logged_in() && current_user_can( 'administrator' ) ) {
623
  $result .= '<div class="is-link-container"><div><a class="is-edit-link" target="_blank" href="'.admin_url( 'admin.php?page=ivory-search&post='.absint( $args['id'] ).'&action=edit' ) . '">'.__( "Edit", "add-search-to-menu") .'</a>';
624
 
625
  if ( ! is_customize_preview() ) {
includes/class-is-widget.php CHANGED
File without changes
includes/class-is.php CHANGED
@@ -13,11 +13,6 @@
13
 
14
  class IS_Loader {
15
 
16
- /**
17
- * Stores plugin options.
18
- */
19
- public $opt;
20
-
21
  /**
22
  * Core singleton class
23
  * @var self
@@ -25,21 +20,17 @@ class IS_Loader {
25
  private static $_instance;
26
 
27
  /**
28
- * Instantiates the plugin by setting up the core properties and loading
29
- * all necessary dependencies and defining the hooks.
30
  *
31
  * The constructor uses internal functions to import all the
32
  * plugin dependencies, and will leverage the Ivory_Search for
33
  * registering the hooks and the callback functions used throughout the plugin.
34
  */
35
  public function __construct() {
36
-
37
- $this->opt = Ivory_Search::load_options();
38
-
39
  }
40
 
41
  /**
42
- * Gets the instance of this class.
43
  *
44
  * @return self
45
  */
@@ -55,7 +46,7 @@ class IS_Loader {
55
  * Loads plugin functionality.
56
  */
57
  function load() {
58
- if ( ! ivory_search_is_json_request() ) {
59
  $this->set_locale();
60
 
61
  $this->admin_public_hooks();
@@ -63,10 +54,10 @@ class IS_Loader {
63
  if ( is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_POST['action'] ) && 'is_ajax_load_posts' == $_POST['action'] ) ) {
64
  $this->admin_hooks();
65
  }
66
- if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_POST['action'] ) && 'is_ajax_load_posts' == $_POST['action'] ) ) {
67
  $this->public_hooks();
68
  }
69
- }
70
  //avoid save events from meta boxes when guten blocks saves
71
  elseif ( empty( $_GET['meta-box-loader'] ) ) {
72
  //Indexing events hooks (save post for guten block save).
@@ -113,7 +104,7 @@ class IS_Loader {
113
  add_action( 'all_admin_notices', array( $admin, 'all_admin_notices' ) );
114
  add_action( 'admin_footer', array( $admin, 'admin_footer' ), 100 );
115
  add_action( 'plugin_action_links', array( $admin, 'plugin_action_links' ), 10, 2 );
116
- add_filter( 'plugin_row_meta', array( $admin, 'plugin_row_meta' ), 10, 2 );
117
  add_action( 'admin_menu', array( $admin, 'admin_menu' ) );
118
  add_action( 'wp_ajax_nopriv_display_posts', array( $admin, 'display_posts' ) );
119
  add_action( 'wp_ajax_display_posts', array( $admin, 'display_posts' ) );
@@ -140,17 +131,17 @@ class IS_Loader {
140
 
141
  $public = IS_Public::getInstance();
142
 
143
- if ( isset( $this->opt['disable'] ) ) {
144
- return;
145
  }
146
 
147
  add_action( 'wp_enqueue_scripts', array( $public, 'wp_enqueue_styles' ) );
148
  add_action( 'wp_enqueue_scripts', array( $public, 'wp_enqueue_scripts' ), 9999999 );
149
  add_filter( 'query_vars', array( $public, 'query_vars' ) );
150
- add_filter( 'body_class', array( $public, 'is_body_classes' ) );
151
 
152
- $header_menu_search = isset( $this->opt['header_menu_search'] ) ? $this->opt['header_menu_search'] : 0;
153
- $site_cache = isset( $this->opt['site_uses_cache'] ) ? $this->opt['site_uses_cache'] : 0;
154
  $display_in_mobile_menu = false;
155
  if ( function_exists( 'wp_is_mobile' ) ) {
156
  $display_in_mobile_menu = $header_menu_search && wp_is_mobile() ? true : false;
@@ -177,7 +168,7 @@ class IS_Loader {
177
  add_action( 'parse_query', array( $public, 'parse_query' ), 9999999, 2 );
178
  }, 9999999 );
179
 
180
- $ajax = IS_Ajax::getInstance();
181
  add_action( 'wp_ajax_is_ajax_load_posts', array( $ajax, 'ajax_load_posts' ) );
182
  add_action( 'wp_ajax_nopriv_is_ajax_load_posts', array( $ajax, 'ajax_load_posts' ) );
183
 
@@ -188,46 +179,4 @@ class IS_Loader {
188
  $index_search = IS_Index_Search::getInstance();
189
  $index_search->init_hooks();
190
  }
191
-
192
- /**
193
- * Displays search form by processing shortcode.
194
- */
195
- function search_form_shortcode( $args ) {
196
-
197
- if ( is_feed() ) {
198
- return '[ivory-search]';
199
- }
200
-
201
- if ( isset( $this->opt['disable'] ) ) {
202
- return;
203
- }
204
-
205
- $atts = shortcode_atts(
206
- array(
207
- 'id' => 0,
208
- 'title' => '',
209
- ),
210
- $args, 'ivory-search'
211
- );
212
-
213
- $atts = array_map( 'sanitize_text_field', $atts );
214
-
215
- if ( ! is_numeric( $atts['id'] ) || 0 == $atts['id'] ) {
216
- return '[ivory-search 404 "Invalid search form ID '. esc_html( $atts['id'] ) .'"]';
217
- }
218
-
219
- $search_form = IS_Search_Form::get_instance( $atts['id'] );
220
-
221
- if ( ! $search_form ) {
222
- return '[ivory-search 404 "The search form '. esc_html( $atts['id'] ) .' does not exist"]';
223
- }
224
-
225
- $form = $search_form->form_html( $atts );
226
-
227
- return $form;
228
- }
229
-
230
- }
231
-
232
- $is_loader = IS_Loader::getInstance();
233
- add_shortcode( 'ivory-search', array( $is_loader, 'search_form_shortcode' ) );
13
 
14
  class IS_Loader {
15
 
 
 
 
 
 
16
  /**
17
  * Core singleton class
18
  * @var self
20
  private static $_instance;
21
 
22
  /**
23
+ * Instantiates the class.
 
24
  *
25
  * The constructor uses internal functions to import all the
26
  * plugin dependencies, and will leverage the Ivory_Search for
27
  * registering the hooks and the callback functions used throughout the plugin.
28
  */
29
  public function __construct() {
 
 
 
30
  }
31
 
32
  /**
33
+ * Gets instance of this class.
34
  *
35
  * @return self
36
  */
46
  * Loads plugin functionality.
47
  */
48
  function load() {
49
+ if ( ! ivory_search_is_json_request() ) {
50
  $this->set_locale();
51
 
52
  $this->admin_public_hooks();
54
  if ( is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_POST['action'] ) && 'is_ajax_load_posts' == $_POST['action'] ) ) {
55
  $this->admin_hooks();
56
  }
57
+ if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_POST['action'] ) && 'is_ajax_load_posts' == $_POST['action'] ) ) {
58
  $this->public_hooks();
59
  }
60
+ }
61
  //avoid save events from meta boxes when guten blocks saves
62
  elseif ( empty( $_GET['meta-box-loader'] ) ) {
63
  //Indexing events hooks (save post for guten block save).
104
  add_action( 'all_admin_notices', array( $admin, 'all_admin_notices' ) );
105
  add_action( 'admin_footer', array( $admin, 'admin_footer' ), 100 );
106
  add_action( 'plugin_action_links', array( $admin, 'plugin_action_links' ), 10, 2 );
107
+ add_filter( 'plugin_row_meta', array( $admin, 'plugin_row_meta' ), 10, 2 );
108
  add_action( 'admin_menu', array( $admin, 'admin_menu' ) );
109
  add_action( 'wp_ajax_nopriv_display_posts', array( $admin, 'display_posts' ) );
110
  add_action( 'wp_ajax_display_posts', array( $admin, 'display_posts' ) );
131
 
132
  $public = IS_Public::getInstance();
133
 
134
+ if ( isset( $public->opt['disable'] ) ) {
135
+ return;
136
  }
137
 
138
  add_action( 'wp_enqueue_scripts', array( $public, 'wp_enqueue_styles' ) );
139
  add_action( 'wp_enqueue_scripts', array( $public, 'wp_enqueue_scripts' ), 9999999 );
140
  add_filter( 'query_vars', array( $public, 'query_vars' ) );
141
+ add_filter( 'body_class', array( $public, 'is_body_classes' ) );
142
 
143
+ $header_menu_search = isset( $public->opt['header_menu_search'] ) ? $public->opt['header_menu_search'] : 0;
144
+ $site_cache = isset( $public->opt['site_uses_cache'] ) ? $public->opt['site_uses_cache'] : 0;
145
  $display_in_mobile_menu = false;
146
  if ( function_exists( 'wp_is_mobile' ) ) {
147
  $display_in_mobile_menu = $header_menu_search && wp_is_mobile() ? true : false;
168
  add_action( 'parse_query', array( $public, 'parse_query' ), 9999999, 2 );
169
  }, 9999999 );
170
 
171
+ $ajax = IS_Ajax::getInstance();
172
  add_action( 'wp_ajax_is_ajax_load_posts', array( $ajax, 'ajax_load_posts' ) );
173
  add_action( 'wp_ajax_nopriv_is_ajax_load_posts', array( $ajax, 'ajax_load_posts' ) );
174
 
179
  $index_search = IS_Index_Search::getInstance();
180
  $index_search->init_hooks();
181
  }
182
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/compatibility/class-is-tablepress-compat.php CHANGED
File without changes
includes/customizer/controls/radio-image/class-is-control-radio-image.php CHANGED
File without changes
includes/customizer/controls/radio-image/images/style-1.png CHANGED
File without changes
includes/customizer/controls/radio-image/images/style-2.png CHANGED
File without changes
includes/customizer/controls/radio-image/images/style-3.png CHANGED
File without changes
includes/customizer/controls/radio-image/radio-image.css CHANGED
File without changes
includes/customizer/controls/radio-image/radio-image.js CHANGED
File without changes
includes/freemius.php CHANGED
File without changes
includes/freemius/assets/css/admin/account.css CHANGED
File without changes
includes/freemius/assets/css/admin/add-ons.css CHANGED
File without changes
includes/freemius/assets/css/admin/affiliation.css CHANGED
File without changes
includes/freemius/assets/css/admin/checkout.css CHANGED
File without changes
includes/freemius/assets/css/admin/common.css CHANGED
File without changes
includes/freemius/assets/css/admin/connect.css CHANGED
File without changes
includes/freemius/assets/css/admin/debug.css CHANGED
File without changes
includes/freemius/assets/css/admin/dialog-boxes.css CHANGED
File without changes
includes/freemius/assets/css/admin/gdpr-optin-notice.css CHANGED
File without changes
includes/freemius/assets/css/admin/index.php CHANGED
File without changes
includes/freemius/assets/css/admin/plugins.css CHANGED
File without changes
includes/freemius/assets/css/customizer.css CHANGED
File without changes
includes/freemius/assets/css/index.php CHANGED
File without changes
includes/freemius/assets/img/index.php CHANGED
File without changes
includes/freemius/assets/img/plugin-icon.png CHANGED
File without changes
includes/freemius/assets/img/theme-icon.png CHANGED
File without changes
includes/freemius/assets/index.php CHANGED
File without changes
includes/freemius/assets/js/index.php CHANGED
File without changes
includes/freemius/assets/js/nojquery.ba-postmessage.js CHANGED
File without changes
includes/freemius/assets/js/nojquery.ba-postmessage.min.js CHANGED
File without changes
includes/freemius/assets/js/postmessage.js CHANGED
File without changes
includes/freemius/config.php CHANGED
File without changes
includes/freemius/includes/class-freemius-abstract.php CHANGED
File without changes
includes/freemius/includes/class-freemius.php CHANGED
File without changes
includes/freemius/includes/class-fs-admin-notices.php CHANGED
File without changes
includes/freemius/includes/class-fs-api.php CHANGED
File without changes
includes/freemius/includes/class-fs-logger.php CHANGED
File without changes
includes/freemius/includes/class-fs-options.php CHANGED
File without changes
includes/freemius/includes/class-fs-plugin-updater.php CHANGED
File without changes
includes/freemius/includes/class-fs-security.php CHANGED
File without changes
includes/freemius/includes/class-fs-storage.php CHANGED
File without changes
includes/freemius/includes/class-fs-user-lock.php CHANGED
File without changes
includes/freemius/includes/customizer/class-fs-customizer-support-section.php CHANGED
File without changes
includes/freemius/includes/customizer/class-fs-customizer-upsell-control.php CHANGED
File without changes
includes/freemius/includes/customizer/index.php CHANGED
File without changes
includes/freemius/includes/debug/class-fs-debug-bar-panel.php CHANGED
File without changes
includes/freemius/includes/debug/debug-bar-start.php CHANGED
File without changes
includes/freemius/includes/debug/index.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-affiliate-terms.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-affiliate.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-billing.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-entity.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-payment.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-plugin-info.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-plugin-license.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-plugin-plan.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-plugin-tag.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-plugin.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-pricing.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-scope-entity.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-site.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-subscription.php CHANGED
File without changes
includes/freemius/includes/entities/class-fs-user.php CHANGED
File without changes
includes/freemius/includes/entities/index.php CHANGED
File without changes
includes/freemius/includes/fs-core-functions.php CHANGED
File without changes
includes/freemius/includes/fs-essential-functions.php CHANGED
File without changes
includes/freemius/includes/fs-plugin-info-dialog.php CHANGED
File without changes
includes/freemius/includes/i18n.php CHANGED
File without changes
includes/freemius/includes/index.php CHANGED
File without changes
includes/freemius/includes/l10n.php CHANGED
File without changes
includes/freemius/includes/managers/class-fs-admin-menu-manager.php CHANGED
File without changes
includes/freemius/includes/managers/class-fs-admin-notice-manager.php CHANGED
File without changes
includes/freemius/includes/managers/class-fs-cache-manager.php CHANGED
File without changes
includes/freemius/includes/managers/class-fs-gdpr-manager.php CHANGED
File without changes
includes/freemius/includes/managers/class-fs-key-value-storage.php CHANGED
File without changes
includes/freemius/includes/managers/class-fs-license-manager.php CHANGED
File without changes
includes/freemius/includes/managers/class-fs-option-manager.php CHANGED
File without changes
includes/freemius/includes/managers/class-fs-plan-manager.php CHANGED
File without changes
includes/freemius/includes/managers/class-fs-plugin-manager.php CHANGED
File without changes
includes/freemius/includes/managers/index.php CHANGED
File without changes
includes/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php CHANGED
File without changes
includes/freemius/includes/sdk/Exceptions/EmptyArgumentException.php CHANGED
File without changes
includes/freemius/includes/sdk/Exceptions/Exception.php CHANGED
File without changes
includes/freemius/includes/sdk/Exceptions/InvalidArgumentException.php CHANGED
File without changes
includes/freemius/includes/sdk/Exceptions/OAuthException.php CHANGED
File without changes
includes/freemius/includes/sdk/Exceptions/index.php CHANGED
File without changes
includes/freemius/includes/sdk/FreemiusBase.php CHANGED
File without changes
includes/freemius/includes/sdk/FreemiusWordPress.php CHANGED
File without changes
includes/freemius/includes/sdk/LICENSE.txt CHANGED
File without changes
includes/freemius/includes/sdk/index.php CHANGED
File without changes
includes/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php CHANGED
File without changes
includes/freemius/includes/supplements/fs-essential-functions-2.2.1.php CHANGED
File without changes
includes/freemius/includes/supplements/index.php CHANGED
File without changes
includes/freemius/index.php CHANGED
File without changes
includes/freemius/languages/freemius-cs_CZ.mo CHANGED
File without changes
includes/freemius/languages/freemius-da_DK.mo CHANGED
File without changes
includes/freemius/languages/freemius-de_DE.mo CHANGED
File without changes
includes/freemius/languages/freemius-en.mo CHANGED
File without changes
includes/freemius/languages/freemius-es_ES.mo CHANGED
File without changes
includes/freemius/languages/freemius-fr_FR.mo CHANGED
File without changes
includes/freemius/languages/freemius-he_IL.mo CHANGED
File without changes
includes/freemius/languages/freemius-hu_HU.mo CHANGED
File without changes
includes/freemius/languages/freemius-it_IT.mo CHANGED
File without changes
includes/freemius/languages/freemius-ja.mo CHANGED
File without changes
includes/freemius/languages/freemius-nl_NL.mo CHANGED
File without changes
includes/freemius/languages/freemius-ru_RU.mo CHANGED
File without changes
includes/freemius/languages/freemius-ta.mo CHANGED
File without changes
includes/freemius/languages/freemius-zh_CN.mo CHANGED
File without changes
includes/freemius/languages/freemius.pot CHANGED
File without changes
includes/freemius/languages/index.php CHANGED
File without changes
includes/freemius/require.php CHANGED
File without changes
includes/freemius/start.php CHANGED
File without changes
includes/freemius/templates/account.php CHANGED
File without changes
includes/freemius/templates/account/billing.php CHANGED
File without changes
includes/freemius/templates/account/index.php CHANGED
File without changes
includes/freemius/templates/account/partials/activate-license-button.php CHANGED
File without changes
includes/freemius/templates/account/partials/addon.php CHANGED
File without changes
includes/freemius/templates/account/partials/deactivate-license-button.php CHANGED
File without changes
includes/freemius/templates/account/partials/index.php CHANGED
File without changes
includes/freemius/templates/account/partials/site.php CHANGED
File without changes
includes/freemius/templates/account/payments.php CHANGED
File without changes
includes/freemius/templates/add-ons.php CHANGED
File without changes
includes/freemius/templates/add-trial-to-pricing.php CHANGED
File without changes
includes/freemius/templates/admin-notice.php CHANGED
File without changes
includes/freemius/templates/ajax-loader.php CHANGED
File without changes
includes/freemius/templates/auto-installation.php CHANGED
File without changes
includes/freemius/templates/checkout.php CHANGED
File without changes
includes/freemius/templates/connect.php CHANGED
File without changes
includes/freemius/templates/contact.php CHANGED
File without changes
includes/freemius/templates/debug.php CHANGED
File without changes
includes/freemius/templates/debug/api-calls.php CHANGED
File without changes
includes/freemius/templates/debug/index.php CHANGED
File without changes
includes/freemius/templates/debug/logger.php CHANGED
File without changes
includes/freemius/templates/debug/plugins-themes-sync.php CHANGED
File without changes
includes/freemius/templates/debug/scheduled-crons.php CHANGED
File without changes
includes/freemius/templates/email.php CHANGED
File without changes
includes/freemius/templates/firewall-issues-js.php CHANGED
File without changes
includes/freemius/templates/forms/affiliation.php CHANGED
File without changes
includes/freemius/templates/forms/data-debug-mode.php CHANGED
File without changes
includes/freemius/templates/forms/deactivation/contact.php CHANGED
File without changes
includes/freemius/templates/forms/deactivation/form.php CHANGED
File without changes
includes/freemius/templates/forms/deactivation/index.php CHANGED
File without changes
includes/freemius/templates/forms/deactivation/retry-skip.php CHANGED
File without changes
includes/freemius/templates/forms/index.php CHANGED
File without changes
includes/freemius/templates/forms/license-activation.php CHANGED
File without changes
includes/freemius/templates/forms/optout.php CHANGED
File without changes
includes/freemius/templates/forms/premium-versions-upgrade-handler.php CHANGED
File without changes
includes/freemius/templates/forms/premium-versions-upgrade-metadata.php CHANGED
File without changes
includes/freemius/templates/forms/resend-key.php CHANGED
File without changes
includes/freemius/templates/forms/subscription-cancellation.php CHANGED
File without changes
includes/freemius/templates/forms/trial-start.php CHANGED
File without changes
includes/freemius/templates/forms/user-change.php CHANGED
File without changes
includes/freemius/templates/gdpr-optin-js.php CHANGED
File without changes
includes/freemius/templates/index.php CHANGED
File without changes
includes/freemius/templates/js/index.php CHANGED
File without changes
includes/freemius/templates/js/jquery.content-change.php CHANGED
File without changes
includes/freemius/templates/js/open-license-activation.php CHANGED
File without changes
includes/freemius/templates/js/style-premium-theme.php CHANGED
File without changes
includes/freemius/templates/partials/index.php CHANGED
File without changes
includes/freemius/templates/partials/network-activation.php CHANGED
File without changes
includes/freemius/templates/plugin-icon.php CHANGED
File without changes
includes/freemius/templates/plugin-info/description.php CHANGED
File without changes
includes/freemius/templates/plugin-info/features.php CHANGED
File without changes
includes/freemius/templates/plugin-info/index.php CHANGED
File without changes
includes/freemius/templates/plugin-info/screenshots.php CHANGED
File without changes
includes/freemius/templates/powered-by.php CHANGED
File without changes
includes/freemius/templates/pricing.php CHANGED
File without changes
includes/freemius/templates/secure-https-header.php CHANGED
File without changes
includes/freemius/templates/sticky-admin-notice-js.php CHANGED
File without changes
includes/freemius/templates/tabs-capture-js.php CHANGED
File without changes
includes/freemius/templates/tabs.php CHANGED
File without changes
includes/index.php CHANGED
File without changes
languages/add-search-to-menu.pot CHANGED
File without changes
public/class-is-ajax.php CHANGED
@@ -153,17 +153,16 @@ class IS_Ajax {
153
  $wrapper_class = $args['wrapper_class'];
154
 
155
  $tags = $this->get_taxonomies( $taxonomy, $search_term, $args['strict'] );
156
- $is_markup = apply_filters( 'is_customize_term_title_markup', false );
157
- if ( $is_markup ) {
158
- do_action( 'is_term_title_markup', $taxonomy, $search_term, $term_title, $wrapper_class, $tags );
159
- } else if( $tags ) { ?>
160
  <div class="<?php esc_attr_e( $wrapper_class ); ?>">
161
  <?php foreach ($tags as $key => $tag) { ?>
162
  <div data-id="<?php echo esc_attr( $tag['term_id'] ); ?>" class="is-ajax-search-post">
163
  <span class="is-ajax-term-label"><?php echo esc_html( $term_title ); ?></span>
164
- <div class="is-title">
165
- <a href="<?php echo esc_url( $tag['url'] ); ?>" data-id="<?php echo esc_attr( $tag['term_id'] ); ?>" data-slug="<?php echo esc_attr( $tag['slug'] ); ?>"><?php echo esc_attr( $tag['name'] ); ?> (<span class="is-term-count"><?php echo esc_attr( $tag['count'] ); ?></span>)</a>
166
- </div>
167
  </div>
168
  <?php } ?>
169
  </div>
@@ -186,11 +185,9 @@ class IS_Ajax {
186
  $wrapper_class = $args['wrapper_class'];
187
 
188
  $terms = $this->get_taxonomies( $taxonomy, $search_term );
 
189
 
190
- $is_markup = apply_filters( 'is_customize_product_details_markup', false );
191
- if ( $is_markup ) {
192
- do_action( 'is_product_details_markup', $taxonomy, $search_term, $field, $wrapper_class, $terms );
193
- } else if ( $terms ) {
194
  ob_start();
195
  foreach ($terms as $key => $term) {
196
  $this->get_product_by_tax_id( $field, $term['term_id'], $taxonomy );
@@ -308,22 +305,19 @@ class IS_Ajax {
308
 
309
  <div class="is-search-sections">
310
  <?php
311
- $product = wc_get_product( get_the_ID() );
312
- global $post;
313
  $this->image_markup( $field, $product ); ?>
314
 
315
  <div class="right-section">
316
- <?php
317
- $this->title_markup( $field, $post, $product );
318
- ?>
319
-
320
  <div class="meta">
321
- <div>
322
- <?php $this->product_price_markup( $field, $product ); ?>
323
- <?php $this->product_stock_status_markup( $field, $product ); ?>
324
- <?php $this->product_sku_markup( $field, $product ); ?>
325
- </div>
326
- <?php $this->date_markup( $field, $post ); ?>
327
  <?php $this->author_markup( $field ); ?>
328
  <?php $this->tags_markup( $field, $post ); ?>
329
  <?php $this->categories_markup( $field, $post ); ?>
@@ -331,23 +325,21 @@ class IS_Ajax {
331
 
332
  <!-- Content -->
333
  <div class="is-search-content">
334
- <?php $this->description_markup( $field, $post ); ?>
335
- </div>
336
- <?php $this->product_sale_badge_markup( $field, $product );
337
 
338
  if( $product ) { ?>
339
  <div class="is-ajax-woocommerce-actions">
340
  <?php
341
- if ( function_exists( 'woocommerce_quantity_input' ) ) {
342
- woocommerce_quantity_input( array(
343
- 'input_name' => 'is-ajax-search-product-quantity',
344
- ), $product, true );
345
- echo WC_Shortcodes::product_add_to_cart( array(
346
  'id' => get_the_ID(),
347
  'show_price' => false,
348
  'style' => '',
349
  ) );
350
- } ?>
351
  </div>
352
  <?php } ?>
353
  </div>
@@ -357,7 +349,6 @@ class IS_Ajax {
357
  }
358
 
359
  }
360
-
361
  wp_reset_postdata();
362
  }
363
 
@@ -385,10 +376,8 @@ class IS_Ajax {
385
  } else if( has_post_thumbnail( $temp_id) ) {
386
  $image = get_the_post_thumbnail( $temp_id, $image_size );
387
  }
388
- $is_markup = apply_filters( 'is_customize_image_markup', false );
389
- if ( $is_markup ) {
390
- do_action( 'is_image_markup', $image, $field, $temp_id );
391
- } else if ( isset( $field['show_image'] ) && $field['show_image'] ) { ?>
392
  <div class="left-section">
393
  <div class="thumbnail">
394
  <a href="<?php echo get_the_permalink( $temp_id ); ?>"><?php echo wp_kses_post( $image ); ?></a>
@@ -408,10 +397,8 @@ class IS_Ajax {
408
  * @return void
409
  */
410
  function title_markup( $field, $post, $product ) {
411
- $is_markup = apply_filters( 'is_customize_title_markup', false );
412
- if ( $is_markup ) {
413
- do_action( 'is_title_markup', $field, $post, $product );
414
- } else if ( '' !== get_the_title( $post->ID ) ) {
415
  ?>
416
  <div class="is-title">
417
  <a href="<?php echo get_the_permalink( $post->ID ); ?>">
@@ -436,10 +423,8 @@ class IS_Ajax {
436
  * @return void
437
  */
438
  function author_markup( $field ) {
439
- $is_markup = apply_filters( 'is_customize_author_markup', false );
440
- if ( $is_markup ) {
441
- do_action( 'is_author_markup', $field );
442
- } else if ( isset( $field['show_author'] ) && $field['show_author'] ) { ?>
443
  <span class="author vcard">
444
  <?php echo sprintf( '<i>%s</i>', _ex( 'By', 'Article written by', 'add-search-to-menu' ) ); ?>
445
  <a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>">
@@ -459,10 +444,8 @@ class IS_Ajax {
459
  * @return void
460
  */
461
  function date_markup( $field, $post ) {
462
- $is_markup = apply_filters( 'is_customize_date_markup', false );
463
- if ( $is_markup ) {
464
- do_action( 'is_date_markup', $field, $post );
465
- } else if ( isset( $field['show_date'] ) && $field['show_date'] ) { ?>
466
  <span class="meta-date">
467
  <span class="posted-on">
468
  <?php
@@ -492,10 +475,8 @@ class IS_Ajax {
492
  * @return void
493
  */
494
  function tags_markup( $field, $post ) {
495
- $is_markup = apply_filters( 'is_customize_tags_markup', false );
496
- if ( $is_markup ) {
497
- do_action( 'is_tags_markup', $field, $post );
498
- } else if ( isset( $field['show_tags'] ) && $field['show_tags'] ) { ?>
499
  <?php $terms = get_the_terms( $post->ID, $post->post_type.'_tag' );
500
  if ( $terms && ! is_wp_error( $terms ) ) { ?>
501
  <span class="is-meta-tag">
@@ -518,10 +499,8 @@ class IS_Ajax {
518
  * @return void
519
  */
520
  function categories_markup( $field, $post ) {
521
- $is_markup = apply_filters( 'is_customize_categories_markup', false );
522
- if ( $is_markup ) {
523
- do_action( 'is_categories_markup', $field, $post );
524
- } else if ( isset( $field['show_categories'] ) && $field['show_categories'] ) { ?>
525
  <?php
526
  $tax_name = ( 'post' === $post->post_type ) ? 'category' : $post->post_type.'_cat';
527
  $terms = get_the_terms( $post->ID, $tax_name );
@@ -546,10 +525,8 @@ class IS_Ajax {
546
  * @return void
547
  */
548
  function description_markup( $field, $post, $single = false ) {
549
- $is_markup = apply_filters( 'is_customize_description_markup', false );
550
- if ( $is_markup ) {
551
- do_action( 'is_description_markup', $field, $post, $single );
552
- } else if ( isset( $field['show_description'] ) && $field['show_description'] ) { // Description either content or excerpt.
553
 
554
  $excerpt_length = ( isset( $field['description_length'] ) && $field['description_length'] ) ? absint( $field['description_length'] ) : 20;
555
 
@@ -593,10 +570,8 @@ class IS_Ajax {
593
  * @return void
594
  */
595
  function product_stock_status_markup( $field, $product ) {
596
- $is_markup = apply_filters( 'is_customize_product_stock_status_markup', false );
597
- if ( $is_markup ) {
598
- do_action( 'is_product_stock_status_markup', $field, $product );
599
- } else if( $product ) {
600
  // Show stock status.
601
  if( isset( $field['show_stock_status'] ) && $field['show_stock_status'] ) {
602
  $stock_status = ( $product->is_in_stock() ) ? 'in-stock' : 'out-of-stock';
@@ -616,10 +591,8 @@ class IS_Ajax {
616
  * @return void
617
  */
618
  function product_sku_markup( $field, $product ) {
619
- $is_markup = apply_filters( 'is_customize_product_sku_markup', false );
620
- if ( $is_markup ) {
621
- do_action( 'is_product_sku_markup', $field, $product );
622
- } else if ( $product ) {
623
  // Show SKU.
624
  if( isset( $field['show_sku'] ) && $field['show_sku'] ) {
625
  $sku = $product->get_sku();
@@ -638,21 +611,16 @@ class IS_Ajax {
638
  * @return void
639
  */
640
  function product_price_markup( $field, $product ) {
641
-
642
- $is_markup = apply_filters( 'is_customize_product_price_markup', false );
643
- if ( $is_markup ) {
644
- do_action( 'is_product_price_markup', $field, $product );
645
- } else if ( $product ) {
646
  if ( isset( $field['show_price'] ) && $field['show_price'] ) {
647
- $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;
648
- if ( $product->is_in_stock() || false === $hide_price_out_of_stock ) {?>
649
- <span class="is-prices">
 
 
650
  <?php
651
- echo wp_kses_post( $product->get_price_html() );
652
- ?>
653
- </span>
654
- <?php
655
- }
656
  }
657
  }
658
  }
@@ -667,10 +635,8 @@ class IS_Ajax {
667
  * @return void
668
  */
669
  function product_sale_badge_markup( $field, $product ) {
670
- $is_markup = apply_filters( 'is_customize_product_sale_badge_markup', false );
671
- if ( $is_markup ) {
672
- do_action( 'is_product_sale_badge_markup', $field, $product );
673
- } else if ( $product ) {
674
  // Show sale badge.
675
  if ( isset( $field['show_sale_badge'] ) && $field['show_sale_badge'] ) {
676
  $on_sale = ( $product->is_in_stock() ) ? $product->is_on_sale() : '';
153
  $wrapper_class = $args['wrapper_class'];
154
 
155
  $tags = $this->get_taxonomies( $taxonomy, $search_term, $args['strict'] );
156
+ $is_term_title = apply_filters( 'is_term_title_markup', '', $taxonomy, $search_term, $term_title, $wrapper_class, $tags );
157
+
158
+ if( ! $is_term_title && $tags ) { ?>
 
159
  <div class="<?php esc_attr_e( $wrapper_class ); ?>">
160
  <?php foreach ($tags as $key => $tag) { ?>
161
  <div data-id="<?php echo esc_attr( $tag['term_id'] ); ?>" class="is-ajax-search-post">
162
  <span class="is-ajax-term-label"><?php echo esc_html( $term_title ); ?></span>
163
+ <div class="is-title">
164
+ <a href="<?php echo esc_url( $tag['url'] ); ?>" data-id="<?php echo esc_attr( $tag['term_id'] ); ?>" data-slug="<?php echo esc_attr( $tag['slug'] ); ?>"><?php echo esc_attr( $tag['name'] ); ?> (<span class="is-term-count"><?php echo esc_attr( $tag['count'] ); ?></span>)</a>
165
+ </div>
166
  </div>
167
  <?php } ?>
168
  </div>
185
  $wrapper_class = $args['wrapper_class'];
186
 
187
  $terms = $this->get_taxonomies( $taxonomy, $search_term );
188
+ $is_markup = apply_filters( 'is_product_details_markup', '', $taxonomy, $search_term, $field, $wrapper_class, $terms );
189
 
190
+ if ( ! $is_markup && $terms ) {
 
 
 
191
  ob_start();
192
  foreach ($terms as $key => $term) {
193
  $this->get_product_by_tax_id( $field, $term['term_id'], $taxonomy );
305
 
306
  <div class="is-search-sections">
307
  <?php
308
+ $product = wc_get_product( get_the_ID() );
309
+ global $post;
310
  $this->image_markup( $field, $product ); ?>
311
 
312
  <div class="right-section">
313
+ <?php $this->title_markup( $field, $post, $product ); ?>
 
 
 
314
  <div class="meta">
315
+ <div>
316
+ <?php $this->product_price_markup( $field, $product ); ?>
317
+ <?php $this->product_stock_status_markup( $field, $product ); ?>
318
+ <?php $this->product_sku_markup( $field, $product ); ?>
319
+ </div>
320
+ <?php $this->date_markup( $field, $post ); ?>
321
  <?php $this->author_markup( $field ); ?>
322
  <?php $this->tags_markup( $field, $post ); ?>
323
  <?php $this->categories_markup( $field, $post ); ?>
325
 
326
  <!-- Content -->
327
  <div class="is-search-content">
328
+ <?php $this->description_markup( $field, $post ); ?>
329
+ </div>
330
+ <?php $this->product_sale_badge_markup( $field, $product );
331
 
332
  if( $product ) { ?>
333
  <div class="is-ajax-woocommerce-actions">
334
  <?php
335
+ if ( function_exists( 'woocommerce_quantity_input' ) ) {
336
+ woocommerce_quantity_input( array('input_name' => 'is-ajax-search-product-quantity',), $product, true );
337
+ echo WC_Shortcodes::product_add_to_cart( array(
 
 
338
  'id' => get_the_ID(),
339
  'show_price' => false,
340
  'style' => '',
341
  ) );
342
+ } ?>
343
  </div>
344
  <?php } ?>
345
  </div>
349
  }
350
 
351
  }
 
352
  wp_reset_postdata();
353
  }
354
 
376
  } else if( has_post_thumbnail( $temp_id) ) {
377
  $image = get_the_post_thumbnail( $temp_id, $image_size );
378
  }
379
+ $is_markup = apply_filters( 'is_image_markup', '', $image, $field, $temp_id );
380
+ if ( ! $is_markup && isset( $field['show_image'] ) && $field['show_image'] ) { ?>
 
 
381
  <div class="left-section">
382
  <div class="thumbnail">
383
  <a href="<?php echo get_the_permalink( $temp_id ); ?>"><?php echo wp_kses_post( $image ); ?></a>
397
  * @return void
398
  */
399
  function title_markup( $field, $post, $product ) {
400
+ $is_markup = apply_filters( 'is_title_markup', '', $field, $post, $product );
401
+ if ( ! $is_markup && '' !== get_the_title( $post->ID ) ) {
 
 
402
  ?>
403
  <div class="is-title">
404
  <a href="<?php echo get_the_permalink( $post->ID ); ?>">
423
  * @return void
424
  */
425
  function author_markup( $field ) {
426
+ $is_markup = apply_filters( 'is_author_markup', '', $field );
427
+ if ( ! $is_markup && isset( $field['show_author'] ) && $field['show_author'] ) { ?>
 
 
428
  <span class="author vcard">
429
  <?php echo sprintf( '<i>%s</i>', _ex( 'By', 'Article written by', 'add-search-to-menu' ) ); ?>
430
  <a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>">
444
  * @return void
445
  */
446
  function date_markup( $field, $post ) {
447
+ $is_markup = apply_filters( 'is_date_markup', '', $field, $post );
448
+ if ( ! $is_markup && isset( $field['show_date'] ) && $field['show_date'] ) { ?>
 
 
449
  <span class="meta-date">
450
  <span class="posted-on">
451
  <?php
475
  * @return void
476
  */
477
  function tags_markup( $field, $post ) {
478
+ $is_markup = apply_filters( 'is_tags_markup', '', $field, $post );
479
+ if ( ! $is_markup && isset( $field['show_tags'] ) && $field['show_tags'] ) { ?>
 
 
480
  <?php $terms = get_the_terms( $post->ID, $post->post_type.'_tag' );
481
  if ( $terms && ! is_wp_error( $terms ) ) { ?>
482
  <span class="is-meta-tag">
499
  * @return void
500
  */
501
  function categories_markup( $field, $post ) {
502
+ $is_markup = apply_filters( 'is_categories_markup', '', $field, $post );
503
+ if ( ! $is_markup && isset( $field['show_categories'] ) && $field['show_categories'] ) { ?>
 
 
504
  <?php
505
  $tax_name = ( 'post' === $post->post_type ) ? 'category' : $post->post_type.'_cat';
506
  $terms = get_the_terms( $post->ID, $tax_name );
525
  * @return void
526
  */
527
  function description_markup( $field, $post, $single = false ) {
528
+ $is_markup = apply_filters( 'is_description_markup', '', $field, $post, $single );
529
+ if ( ! $is_markup && isset( $field['show_description'] ) && $field['show_description'] ) { // Description either content or excerpt.
 
 
530
 
531
  $excerpt_length = ( isset( $field['description_length'] ) && $field['description_length'] ) ? absint( $field['description_length'] ) : 20;
532
 
570
  * @return void
571
  */
572
  function product_stock_status_markup( $field, $product ) {
573
+ $is_markup = apply_filters( 'is_product_stock_status_markup', '', $field, $product );
574
+ if( ! $is_markup && $product ) {
 
 
575
  // Show stock status.
576
  if( isset( $field['show_stock_status'] ) && $field['show_stock_status'] ) {
577
  $stock_status = ( $product->is_in_stock() ) ? 'in-stock' : 'out-of-stock';
591
  * @return void
592
  */
593
  function product_sku_markup( $field, $product ) {
594
+ $is_markup = apply_filters( 'is_product_sku_markup', '', $field, $product );
595
+ if ( ! $is_markup && $product ) {
 
 
596
  // Show SKU.
597
  if( isset( $field['show_sku'] ) && $field['show_sku'] ) {
598
  $sku = $product->get_sku();
611
  * @return void
612
  */
613
  function product_price_markup( $field, $product ) {
614
+ $is_markup = apply_filters( 'is_product_price_markup', '', $field, $product );
615
+ if ( ! $is_markup && $product ) {
 
 
 
616
  if ( isset( $field['show_price'] ) && $field['show_price'] ) {
617
+ $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;
618
+ if ( $product->is_in_stock() || false === $hide_price_out_of_stock ) {?>
619
+ <span class="is-prices">
620
+ <?php echo wp_kses_post( $product->get_price_html() ); ?>
621
+ </span>
622
  <?php
623
+ }
 
 
 
 
624
  }
625
  }
626
  }
635
  * @return void
636
  */
637
  function product_sale_badge_markup( $field, $product ) {
638
+ $is_markup = apply_filters( 'is_product_sale_badge_markup', '', $field, $product );
639
+ if ( ! $is_markup && $product ) {
 
 
640
  // Show sale badge.
641
  if ( isset( $field['show_sale_badge'] ) && $field['show_sale_badge'] ) {
642
  $on_sale = ( $product->is_in_stock() ) ? $product->is_on_sale() : '';
public/class-is-index-search.php CHANGED
@@ -220,7 +220,6 @@ class IS_Index_Search {
220
  }
221
 
222
  /**
223
- * This method was copied from Relevanssi's plugin.
224
  *
225
  * Figures out the low and high boundaries for the search query.
226
  *
220
  }
221
 
222
  /**
 
223
  *
224
  * Figures out the low and high boundaries for the search query.
225
  *
public/class-is-public.php CHANGED
@@ -22,7 +22,13 @@ class IS_Public
22
  */
23
  public function __construct()
24
  {
25
- $this->opt = Ivory_Search::load_options();
 
 
 
 
 
 
26
  }
27
 
28
  /**
@@ -39,7 +45,7 @@ class IS_Public
39
  }
40
 
41
  /**
42
- * Enqueues search menu style files.
43
  */
44
  function wp_enqueue_styles()
45
  {
@@ -56,7 +62,7 @@ class IS_Public
56
  }
57
 
58
  /**
59
- * Enqueues search menu script files.
60
  */
61
  function wp_enqueue_scripts()
62
  {
22
  */
23
  public function __construct()
24
  {
25
+
26
+ if ( empty($this->opt) ) {
27
+ $is_menu_search = get_option( 'is_menu_search', array() );
28
+ $is_settings = get_option( 'is_settings', array() );
29
+ $this->opt = array_merge( (array) $is_settings, (array) $is_menu_search );
30
+ }
31
+
32
  }
33
 
34
  /**
45
  }
46
 
47
  /**
48
+ * Enqueues search form stylesheet files.
49
  */
50
  function wp_enqueue_styles()
51
  {
62
  }
63
 
64
  /**
65
+ * Enqueues search form script files.
66
  */
67
  function wp_enqueue_scripts()
68
  {
public/css/ivory-ajax-search.css CHANGED
File without changes
public/css/ivory-ajax-search.min.css CHANGED
File without changes
public/css/ivory-search.css CHANGED
File without changes
public/css/ivory-search.min.css CHANGED
File without changes
public/images/mCSB_buttons.png CHANGED
File without changes
public/images/spinner.gif CHANGED
File without changes
public/index.php CHANGED
File without changes
public/js/is-highlight.js CHANGED
File without changes
public/js/is-highlight.min.js CHANGED
File without changes
public/js/ivory-ajax-search.js CHANGED
File without changes
public/js/ivory-ajax-search.min.js CHANGED
File without changes
public/js/ivory-search.js CHANGED
File without changes
public/js/ivory-search.min.js CHANGED
File without changes
public/partials/is-ajax-results.php CHANGED
File without changes
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: ivorysearch, vinod dalvi
3
  Donate link: https://ivorysearch.com/pricing/
4
  Tags: search, woocommerce search, image search, ajax search, search shortcode, live search, inverted index-based search, exclude from search, search widget, search menu, search plugin, custom search, search by sku, search by post type, search by category, relevance search, search forms
5
  Requires at least: 3.9
6
- Tested up to: 6.0
7
  Requires PHP: 5.2.4
8
- Stable tag: 5.4.8
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -197,6 +197,9 @@ Yes we do. We try our best to help free users with customisation requests and we
197
 
198
  == Changelog ==
199
 
 
 
 
200
  = 5.4.8 =
201
  * Fixed - Using brackets in the search term was not getting searched.
202
  * Fixed - Using special characters in stopwords generate warnings.
3
  Donate link: https://ivorysearch.com/pricing/
4
  Tags: search, woocommerce search, image search, ajax search, search shortcode, live search, inverted index-based search, exclude from search, search widget, search menu, search plugin, custom search, search by sku, search by post type, search by category, relevance search, search forms
5
  Requires at least: 3.9
6
+ Tested up to: 6.1
7
  Requires PHP: 5.2.4
8
+ Stable tag: 5.4.9
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
197
 
198
  == Changelog ==
199
 
200
+ = 5.4.9 =
201
+ * Fixed - Tags and Categories search was not working in inverted index search engine.
202
+
203
  = 5.4.8 =
204
  * Fixed - Using brackets in the search term was not getting searched.
205
  * Fixed - Using special characters in stopwords generate warnings.