Version Description
- Added - Option to display search form on menu along with menu locations.
- Added - Highlight search terms in AJAX search results.
- Fixed - Menu search icon color option was not working.
Download this release
Release Info
Developer | vinod dalvi |
Plugin | Ivory Search – WordPress Search Plugin |
Version | 4.4.13 |
Comparing to | |
See all releases |
Code changes from version 4.4.12 to 4.4.13
- add-search-to-menu.php +2 -2
- admin/class-is-settings-fields.php +24 -3
- admin/js/ivory-search-admin.js +2 -2
- includes/class-is-search-form.php +9 -0
- languages/add-search-to-menu.pot +63 -54
- public/class-is-public.php +30 -13
- public/css/ivory-search.css +2 -2
- public/js/is-highlight.js +42 -41
- public/js/ivory-ajax-search.js +17 -0
- readme.txt +6 -1
add-search-to-menu.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Ivory Search
|
4 |
* Plugin URI: https://ivorysearch.com
|
5 |
* Description: The WordPress Search plugin that includes Search Form Customizer, WooCommerce Search, Image Search, Search Shortcode, AJAX Search & Live Search support!
|
6 |
-
* Version: 4.4.
|
7 |
* Author: Ivory Search
|
8 |
* Author URI: https://ivorysearch.com/
|
9 |
* License: GPL2+
|
@@ -107,7 +107,7 @@ final class Ivory_Search {
|
|
107 |
private function define_constants() {
|
108 |
|
109 |
if ( ! defined( 'IS_VERSION' ) ) {
|
110 |
-
define( 'IS_VERSION', '4.4.
|
111 |
}
|
112 |
if ( ! defined( 'IS_PLUGIN_FILE' ) ) {
|
113 |
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.4.13
|
7 |
* Author: Ivory Search
|
8 |
* Author URI: https://ivorysearch.com/
|
9 |
* License: GPL2+
|
107 |
private function define_constants() {
|
108 |
|
109 |
if ( ! defined( 'IS_VERSION' ) ) {
|
110 |
+
define( 'IS_VERSION', '4.4.13' );
|
111 |
}
|
112 |
if ( ! defined( 'IS_PLUGIN_FILE' ) ) {
|
113 |
define( 'IS_PLUGIN_FILE', __FILE__ );
|
admin/class-is-settings-fields.php
CHANGED
@@ -230,7 +230,7 @@ class IS_Settings_Fields
|
|
230 |
/**
|
231 |
* Displays choose menu locations field.
|
232 |
*/
|
233 |
-
$content = __( 'Display search form on selected menu.', 'add-search-to-menu' );
|
234 |
IS_Help::help_info( $content );
|
235 |
$html = '';
|
236 |
$check_value = '';
|
@@ -247,14 +247,35 @@ class IS_Settings_Fields
|
|
247 |
|
248 |
}
|
249 |
if ( '' === $check_value ) {
|
250 |
-
$html =
|
251 |
}
|
252 |
} else {
|
253 |
$html = __( 'Navigation menu location is not registered on the site.', 'add-search-to-menu' );
|
254 |
}
|
255 |
|
256 |
echo '<div>' . $html . '</div>' ;
|
257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
return;
|
259 |
}
|
260 |
echo '<div class="menu-settings-container"><br /><br />' ;
|
230 |
/**
|
231 |
* Displays choose menu locations field.
|
232 |
*/
|
233 |
+
$content = __( 'Display search form on selected menu locations.', 'add-search-to-menu' );
|
234 |
IS_Help::help_info( $content );
|
235 |
$html = '';
|
236 |
$check_value = '';
|
247 |
|
248 |
}
|
249 |
if ( '' === $check_value ) {
|
250 |
+
$html = sprintf( __( 'No menu assigned to navigation menu location in the %sMenus screen%s.', 'add-search-to-menu' ), '<a target="_blank" href="' . admin_url( 'nav-menus.php' ) . '">', '</a>' );
|
251 |
}
|
252 |
} else {
|
253 |
$html = __( 'Navigation menu location is not registered on the site.', 'add-search-to-menu' );
|
254 |
}
|
255 |
|
256 |
echo '<div>' . $html . '</div>' ;
|
257 |
+
/**
|
258 |
+
* Displays choose menu field.
|
259 |
+
*/
|
260 |
+
echo '<br />' ;
|
261 |
+
$content = __( 'Display search form on selected menus.', 'add-search-to-menu' );
|
262 |
+
IS_Help::help_info( $content );
|
263 |
+
$html = '';
|
264 |
+
$check_value = '';
|
265 |
+
$menu_name = wp_get_nav_menus();
|
266 |
+
|
267 |
+
if ( !empty($menu_name) ) {
|
268 |
+
foreach ( $menu_name as $value ) {
|
269 |
+
$check_value = ( isset( $this->opt['menu_name'][$value->slug] ) ? $this->opt['menu_name'][$value->slug] : 0 );
|
270 |
+
$html .= '<p><label for="is_menu_name' . esc_attr( $value->slug ) . '"><input type="checkbox" class="ivory_search_menu_name" id="is_menu_name' . esc_attr( $value->slug ) . '" name="is_menu_search[menu_name][' . esc_attr( $value->slug ) . ']" value="' . esc_attr( $value->slug ) . '" ' . checked( $value->slug, $check_value, false ) . '/>';
|
271 |
+
$html .= '<span class="toggle-check-text"></span> ' . esc_html( $value->name ) . '</label></p>';
|
272 |
+
}
|
273 |
+
} else {
|
274 |
+
$html = sprintf( __( 'No menu created in the %sMenus screen%s.', 'add-search-to-menu' ), '<a target="_blank" href="' . admin_url( 'nav-menus.php' ) . '">', '</a>' );
|
275 |
+
}
|
276 |
+
|
277 |
+
echo '<div>' . $html . '</div>' ;
|
278 |
+
if ( !isset( $this->opt['menus'] ) && !isset( $this->opt['menu_name'] ) || '' === $check_value ) {
|
279 |
return;
|
280 |
}
|
281 |
echo '<div class="menu-settings-container"><br /><br />' ;
|
admin/js/ivory-search-admin.js
CHANGED
@@ -571,7 +571,7 @@
|
|
571 |
} );
|
572 |
|
573 |
function toggle_menu_search_inputs() {
|
574 |
-
if( $( '.ivory_search_locations' ).is(':checked') ) {
|
575 |
$( '.menu-settings-container' ).removeClass('is-field-disabled').show();
|
576 |
} else {
|
577 |
$( '.menu-settings-container' ).addClass('is-field-disabled').hide();
|
@@ -579,7 +579,7 @@
|
|
579 |
}
|
580 |
|
581 |
toggle_menu_search_inputs();
|
582 |
-
$( '.ivory_search_locations' ).on( 'click', function() {
|
583 |
toggle_menu_search_inputs();
|
584 |
} );
|
585 |
|
571 |
} );
|
572 |
|
573 |
function toggle_menu_search_inputs() {
|
574 |
+
if( $( '.ivory_search_locations' ).is(':checked') || $( '.ivory_search_menu_name' ).is(':checked') ) {
|
575 |
$( '.menu-settings-container' ).removeClass('is-field-disabled').show();
|
576 |
} else {
|
577 |
$( '.menu-settings-container' ).addClass('is-field-disabled').hide();
|
579 |
}
|
580 |
|
581 |
toggle_menu_search_inputs();
|
582 |
+
$( '.ivory_search_locations, .ivory_search_menu_name' ).on( 'click', function() {
|
583 |
toggle_menu_search_inputs();
|
584 |
} );
|
585 |
|
includes/class-is-search-form.php
CHANGED
@@ -462,6 +462,15 @@ class IS_Search_Form {
|
|
462 |
|
463 |
// Enqueue scripts.
|
464 |
wp_enqueue_script( 'ivory-ajax-search-scripts' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
|
466 |
$min_no_for_search = isset( $_ajax['min_no_for_search'] ) ? $_ajax['min_no_for_search'] : '1';
|
467 |
$result_box_max_height = isset( $_ajax['result_box_max_height'] ) ? $_ajax['result_box_max_height'] : '400';
|
462 |
|
463 |
// Enqueue scripts.
|
464 |
wp_enqueue_script( 'ivory-ajax-search-scripts' );
|
465 |
+
if ( isset( $_settings['highlight_terms'] ) ) {
|
466 |
+
wp_enqueue_script( 'is-highlight' );
|
467 |
+
if ( isset( $_settings['highlight_color'] ) && ! empty( $_settings['highlight_color'] ) && ! is_search() ) {
|
468 |
+
echo '<style type="text/css" media="screen">';
|
469 |
+
echo '#is-ajax-search-result-' . $args['id'].' .is-highlight { background-color: '.$_settings['highlight_color'].' !important;}';
|
470 |
+
echo '#is-ajax-search-result-' . $args['id'].' .meta .is-highlight { background-color: transparent !important;}';
|
471 |
+
echo '</style>';
|
472 |
+
}
|
473 |
+
}
|
474 |
|
475 |
$min_no_for_search = isset( $_ajax['min_no_for_search'] ) ? $_ajax['min_no_for_search'] : '1';
|
476 |
$result_box_max_height = isset( $_ajax['result_box_max_height'] ) ? $_ajax['result_box_max_height'] : '400';
|
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: 2020-06-
|
6 |
"PO-Revision-Date: 2020-03-17 21:05+0530\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: Ivory Search <admin@ivorysearch.com>\n"
|
@@ -21,7 +21,7 @@ msgstr ""
|
|
21 |
msgid "The changes you made will be lost if you navigate away from this page."
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: ../admin/class-is-admin.php:140 ../admin/class-is-settings-fields.php:
|
25 |
#: ../admin/partials/search-form.php:23
|
26 |
msgid "Edit Search Form"
|
27 |
msgstr ""
|
@@ -532,7 +532,7 @@ msgid "Enable Search Form Customization"
|
|
532 |
msgstr ""
|
533 |
|
534 |
#: ../admin/class-is-editor.php:652 ../admin/class-is-editor.php:1080
|
535 |
-
#: ../includes/class-is-search-form.php:
|
536 |
msgid "Customizer"
|
537 |
msgstr ""
|
538 |
|
@@ -1022,9 +1022,9 @@ msgid ""
|
|
1022 |
msgstr ""
|
1023 |
|
1024 |
#: ../admin/class-is-help.php:79 ../admin/class-is-list-table.php:158
|
1025 |
-
#: ../admin/class-is-settings-fields.php:
|
1026 |
-
#: ../admin/class-is-settings-fields.php:
|
1027 |
-
#: ../includes/class-is-search-form.php:
|
1028 |
msgid "Edit"
|
1029 |
msgstr ""
|
1030 |
|
@@ -1215,192 +1215,201 @@ msgid "Make search changes on entire website using below options."
|
|
1215 |
msgstr ""
|
1216 |
|
1217 |
#: ../admin/class-is-settings-fields.php:174
|
1218 |
-
msgid "Display search form on selected menu."
|
1219 |
msgstr ""
|
1220 |
|
1221 |
-
#: ../admin/class-is-settings-fields.php:
|
1222 |
#, php-format
|
1223 |
-
msgid "
|
1224 |
msgstr ""
|
1225 |
|
1226 |
-
#: ../admin/class-is-settings-fields.php:
|
1227 |
msgid "Navigation menu location is not registered on the site."
|
1228 |
msgstr ""
|
1229 |
|
1230 |
-
#: ../admin/class-is-settings-fields.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1231 |
msgid "Display search form at the start of the navigation menu"
|
1232 |
msgstr ""
|
1233 |
|
1234 |
-
#: ../admin/class-is-settings-fields.php:
|
1235 |
msgid "Select menu search form style."
|
1236 |
msgstr ""
|
1237 |
|
1238 |
-
#: ../admin/class-is-settings-fields.php:
|
1239 |
msgid "Default"
|
1240 |
msgstr ""
|
1241 |
|
1242 |
-
#: ../admin/class-is-settings-fields.php:
|
1243 |
msgid "Dropdown"
|
1244 |
msgstr ""
|
1245 |
|
1246 |
-
#: ../admin/class-is-settings-fields.php:
|
1247 |
msgid "Sliding"
|
1248 |
msgstr ""
|
1249 |
|
1250 |
-
#: ../admin/class-is-settings-fields.php:
|
1251 |
msgid "Full Width"
|
1252 |
msgstr ""
|
1253 |
|
1254 |
-
#: ../admin/class-is-settings-fields.php:
|
1255 |
msgid "Popup"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
-
#: ../admin/class-is-settings-fields.php:
|
1259 |
msgid "Select menu magnifier icon color."
|
1260 |
msgstr ""
|
1261 |
|
1262 |
-
#: ../admin/class-is-settings-fields.php:
|
1263 |
msgid "Display search form close icon"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
-
#: ../admin/class-is-settings-fields.php:
|
1267 |
msgid "Add menu title to display in place of search icon."
|
1268 |
msgstr ""
|
1269 |
|
1270 |
-
#: ../admin/class-is-settings-fields.php:
|
1271 |
msgid "Add class to search form menu item."
|
1272 |
msgstr ""
|
1273 |
|
1274 |
-
#: ../admin/class-is-settings-fields.php:
|
1275 |
msgid "Add multiple classes seperated by space."
|
1276 |
msgstr ""
|
1277 |
|
1278 |
-
#: ../admin/class-is-settings-fields.php:
|
1279 |
msgid "Select search form that will control menu search functionality."
|
1280 |
msgstr ""
|
1281 |
|
1282 |
-
#: ../admin/class-is-settings-fields.php:
|
1283 |
-
#: ../admin/class-is-settings-fields.php:
|
1284 |
-
#: ../admin/class-is-settings-fields.php:
|
1285 |
msgid "Create New"
|
1286 |
msgstr ""
|
1287 |
|
1288 |
-
#: ../admin/class-is-settings-fields.php:
|
1289 |
msgid ""
|
1290 |
"Add Google Custom Search( CSE ) search form code that will replace default "
|
1291 |
"search form."
|
1292 |
msgstr ""
|
1293 |
|
1294 |
-
#: ../admin/class-is-settings-fields.php:
|
1295 |
msgid "Select search form to display in site header( Not Menu )."
|
1296 |
msgstr ""
|
1297 |
|
1298 |
-
#: ../admin/class-is-settings-fields.php:
|
1299 |
-
#: ../admin/class-is-settings-fields.php:
|
1300 |
msgid "None"
|
1301 |
msgstr ""
|
1302 |
|
1303 |
-
#: ../admin/class-is-settings-fields.php:
|
1304 |
msgid ""
|
1305 |
"Please note that the above option displays search form in site header and "
|
1306 |
"not in navigation menu."
|
1307 |
msgstr ""
|
1308 |
|
1309 |
-
#: ../admin/class-is-settings-fields.php:
|
1310 |
msgid "Select search form to display in site footer."
|
1311 |
msgstr ""
|
1312 |
|
1313 |
-
#: ../admin/class-is-settings-fields.php:
|
1314 |
msgid "Display search form in site header on mobile devices"
|
1315 |
msgstr ""
|
1316 |
|
1317 |
-
#: ../admin/class-is-settings-fields.php:
|
1318 |
msgid ""
|
1319 |
"If this site uses cache then please select the below option to display "
|
1320 |
"search form on mobile."
|
1321 |
msgstr ""
|
1322 |
|
1323 |
-
#: ../admin/class-is-settings-fields.php:
|
1324 |
msgid "This site uses cache"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
-
#: ../admin/class-is-settings-fields.php:
|
1328 |
msgid "Add custom css code."
|
1329 |
msgstr ""
|
1330 |
|
1331 |
-
#: ../admin/class-is-settings-fields.php:
|
1332 |
msgid "Enter stopwords here that will not be searched."
|
1333 |
msgstr ""
|
1334 |
|
1335 |
-
#: ../admin/class-is-settings-fields.php:
|
1336 |
msgid "Please separate multiple words with commas."
|
1337 |
msgstr ""
|
1338 |
|
1339 |
-
#: ../admin/class-is-settings-fields.php:
|
1340 |
msgid "Add synonyms here to make the searches find better results."
|
1341 |
msgstr ""
|
1342 |
|
1343 |
-
#: ../admin/class-is-settings-fields.php:
|
1344 |
msgid ""
|
1345 |
"If you add bird = crow to the list of synonyms, searches for bird "
|
1346 |
"automatically become a search for bird crow and will thus match to posts "
|
1347 |
"that include either bird or crow."
|
1348 |
msgstr ""
|
1349 |
|
1350 |
-
#: ../admin/class-is-settings-fields.php:
|
1351 |
msgid ""
|
1352 |
"This only works for search forms configured to search any of the search "
|
1353 |
"terms(OR) and not all search terms(AND) in the search form Options."
|
1354 |
msgstr ""
|
1355 |
|
1356 |
-
#: ../admin/class-is-settings-fields.php:
|
1357 |
msgid "The format here is key = value"
|
1358 |
msgstr ""
|
1359 |
|
1360 |
-
#: ../admin/class-is-settings-fields.php:
|
1361 |
msgid "Please add every synonyms key = value pairs on new line."
|
1362 |
msgstr ""
|
1363 |
|
1364 |
-
#: ../admin/class-is-settings-fields.php:
|
1365 |
msgid ""
|
1366 |
"Enable below options to disable loading of plugin CSS and JavaScript files."
|
1367 |
msgstr ""
|
1368 |
|
1369 |
-
#: ../admin/class-is-settings-fields.php:
|
1370 |
msgid "Do not load plugin CSS files"
|
1371 |
msgstr ""
|
1372 |
|
1373 |
-
#: ../admin/class-is-settings-fields.php:
|
1374 |
msgid "Do not load plugin JavaScript files"
|
1375 |
msgstr ""
|
1376 |
|
1377 |
-
#: ../admin/class-is-settings-fields.php:
|
1378 |
msgid ""
|
1379 |
"If checked, you have to add following plugin file code into your child theme "
|
1380 |
"CSS file."
|
1381 |
msgstr ""
|
1382 |
|
1383 |
-
#: ../admin/class-is-settings-fields.php:
|
1384 |
msgid ""
|
1385 |
"If checked, you have to add following plugin files code into your child "
|
1386 |
"theme JavaScript file."
|
1387 |
msgstr ""
|
1388 |
|
1389 |
-
#: ../admin/class-is-settings-fields.php:
|
1390 |
msgid "Warning: Use with caution."
|
1391 |
msgstr ""
|
1392 |
|
1393 |
-
#: ../admin/class-is-settings-fields.php:
|
1394 |
msgid ""
|
1395 |
"Do not use Default Search Form to control WordPress default search "
|
1396 |
"functionality"
|
1397 |
msgstr ""
|
1398 |
|
1399 |
-
#: ../admin/class-is-settings-fields.php:
|
1400 |
msgid "Disable search functionality on entire website"
|
1401 |
msgstr ""
|
1402 |
|
1403 |
-
#: ../admin/class-is-settings-fields.php:
|
1404 |
msgid ""
|
1405 |
"Display easy edit links of search form on the website frontend to the admin "
|
1406 |
"users"
|
@@ -1490,8 +1499,8 @@ msgstr ""
|
|
1490 |
|
1491 |
#: ../includes/class-is-admin-public.php:177
|
1492 |
#: ../includes/class-is-search-form.php:451
|
1493 |
-
#: ../includes/class-is-search-form.php:
|
1494 |
-
#: ../public/class-is-public.php:
|
1495 |
msgid "Search"
|
1496 |
msgstr ""
|
1497 |
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Ivory Search\n"
|
5 |
+
"POT-Creation-Date: 2020-06-24 20:44+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"
|
21 |
msgid "The changes you made will be lost if you navigate away from this page."
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: ../admin/class-is-admin.php:140 ../admin/class-is-settings-fields.php:338
|
25 |
#: ../admin/partials/search-form.php:23
|
26 |
msgid "Edit Search Form"
|
27 |
msgstr ""
|
532 |
msgstr ""
|
533 |
|
534 |
#: ../admin/class-is-editor.php:652 ../admin/class-is-editor.php:1080
|
535 |
+
#: ../includes/class-is-search-form.php:526
|
536 |
msgid "Customizer"
|
537 |
msgstr ""
|
538 |
|
1022 |
msgstr ""
|
1023 |
|
1024 |
#: ../admin/class-is-help.php:79 ../admin/class-is-list-table.php:158
|
1025 |
+
#: ../admin/class-is-settings-fields.php:380
|
1026 |
+
#: ../admin/class-is-settings-fields.php:412
|
1027 |
+
#: ../includes/class-is-search-form.php:522 ../includes/class-is-widget.php:71
|
1028 |
msgid "Edit"
|
1029 |
msgstr ""
|
1030 |
|
1215 |
msgstr ""
|
1216 |
|
1217 |
#: ../admin/class-is-settings-fields.php:174
|
1218 |
+
msgid "Display search form on selected menu locations."
|
1219 |
msgstr ""
|
1220 |
|
1221 |
+
#: ../admin/class-is-settings-fields.php:190
|
1222 |
#, php-format
|
1223 |
+
msgid "No menu assigned to navigation menu location in the %sMenus screen%s."
|
1224 |
msgstr ""
|
1225 |
|
1226 |
+
#: ../admin/class-is-settings-fields.php:193
|
1227 |
msgid "Navigation menu location is not registered on the site."
|
1228 |
msgstr ""
|
1229 |
|
1230 |
+
#: ../admin/class-is-settings-fields.php:202
|
1231 |
+
msgid "Display search form on selected menus."
|
1232 |
+
msgstr ""
|
1233 |
+
|
1234 |
+
#: ../admin/class-is-settings-fields.php:216
|
1235 |
+
#, php-format
|
1236 |
+
msgid "No menu created in the %sMenus screen%s."
|
1237 |
+
msgstr ""
|
1238 |
+
|
1239 |
+
#: ../admin/class-is-settings-fields.php:235
|
1240 |
msgid "Display search form at the start of the navigation menu"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
+
#: ../admin/class-is-settings-fields.php:241
|
1244 |
msgid "Select menu search form style."
|
1245 |
msgstr ""
|
1246 |
|
1247 |
+
#: ../admin/class-is-settings-fields.php:245
|
1248 |
msgid "Default"
|
1249 |
msgstr ""
|
1250 |
|
1251 |
+
#: ../admin/class-is-settings-fields.php:246
|
1252 |
msgid "Dropdown"
|
1253 |
msgstr ""
|
1254 |
|
1255 |
+
#: ../admin/class-is-settings-fields.php:247
|
1256 |
msgid "Sliding"
|
1257 |
msgstr ""
|
1258 |
|
1259 |
+
#: ../admin/class-is-settings-fields.php:248
|
1260 |
msgid "Full Width"
|
1261 |
msgstr ""
|
1262 |
|
1263 |
+
#: ../admin/class-is-settings-fields.php:249
|
1264 |
msgid "Popup"
|
1265 |
msgstr ""
|
1266 |
|
1267 |
+
#: ../admin/class-is-settings-fields.php:277
|
1268 |
msgid "Select menu magnifier icon color."
|
1269 |
msgstr ""
|
1270 |
|
1271 |
+
#: ../admin/class-is-settings-fields.php:288
|
1272 |
msgid "Display search form close icon"
|
1273 |
msgstr ""
|
1274 |
|
1275 |
+
#: ../admin/class-is-settings-fields.php:295
|
1276 |
msgid "Add menu title to display in place of search icon."
|
1277 |
msgstr ""
|
1278 |
|
1279 |
+
#: ../admin/class-is-settings-fields.php:306
|
1280 |
msgid "Add class to search form menu item."
|
1281 |
msgstr ""
|
1282 |
|
1283 |
+
#: ../admin/class-is-settings-fields.php:310
|
1284 |
msgid "Add multiple classes seperated by space."
|
1285 |
msgstr ""
|
1286 |
|
1287 |
+
#: ../admin/class-is-settings-fields.php:316
|
1288 |
msgid "Select search form that will control menu search functionality."
|
1289 |
msgstr ""
|
1290 |
|
1291 |
+
#: ../admin/class-is-settings-fields.php:340
|
1292 |
+
#: ../admin/class-is-settings-fields.php:382
|
1293 |
+
#: ../admin/class-is-settings-fields.php:414 ../includes/class-is-widget.php:73
|
1294 |
msgid "Create New"
|
1295 |
msgstr ""
|
1296 |
|
1297 |
+
#: ../admin/class-is-settings-fields.php:348
|
1298 |
msgid ""
|
1299 |
"Add Google Custom Search( CSE ) search form code that will replace default "
|
1300 |
"search form."
|
1301 |
msgstr ""
|
1302 |
|
1303 |
+
#: ../admin/class-is-settings-fields.php:361
|
1304 |
msgid "Select search form to display in site header( Not Menu )."
|
1305 |
msgstr ""
|
1306 |
|
1307 |
+
#: ../admin/class-is-settings-fields.php:373
|
1308 |
+
#: ../admin/class-is-settings-fields.php:405
|
1309 |
msgid "None"
|
1310 |
msgstr ""
|
1311 |
|
1312 |
+
#: ../admin/class-is-settings-fields.php:385
|
1313 |
msgid ""
|
1314 |
"Please note that the above option displays search form in site header and "
|
1315 |
"not in navigation menu."
|
1316 |
msgstr ""
|
1317 |
|
1318 |
+
#: ../admin/class-is-settings-fields.php:393
|
1319 |
msgid "Select search form to display in site footer."
|
1320 |
msgstr ""
|
1321 |
|
1322 |
+
#: ../admin/class-is-settings-fields.php:429
|
1323 |
msgid "Display search form in site header on mobile devices"
|
1324 |
msgstr ""
|
1325 |
|
1326 |
+
#: ../admin/class-is-settings-fields.php:432
|
1327 |
msgid ""
|
1328 |
"If this site uses cache then please select the below option to display "
|
1329 |
"search form on mobile."
|
1330 |
msgstr ""
|
1331 |
|
1332 |
+
#: ../admin/class-is-settings-fields.php:439
|
1333 |
msgid "This site uses cache"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
+
#: ../admin/class-is-settings-fields.php:447
|
1337 |
msgid "Add custom css code."
|
1338 |
msgstr ""
|
1339 |
|
1340 |
+
#: ../admin/class-is-settings-fields.php:458
|
1341 |
msgid "Enter stopwords here that will not be searched."
|
1342 |
msgstr ""
|
1343 |
|
1344 |
+
#: ../admin/class-is-settings-fields.php:462
|
1345 |
msgid "Please separate multiple words with commas."
|
1346 |
msgstr ""
|
1347 |
|
1348 |
+
#: ../admin/class-is-settings-fields.php:470
|
1349 |
msgid "Add synonyms here to make the searches find better results."
|
1350 |
msgstr ""
|
1351 |
|
1352 |
+
#: ../admin/class-is-settings-fields.php:471
|
1353 |
msgid ""
|
1354 |
"If you add bird = crow to the list of synonyms, searches for bird "
|
1355 |
"automatically become a search for bird crow and will thus match to posts "
|
1356 |
"that include either bird or crow."
|
1357 |
msgstr ""
|
1358 |
|
1359 |
+
#: ../admin/class-is-settings-fields.php:472
|
1360 |
msgid ""
|
1361 |
"This only works for search forms configured to search any of the search "
|
1362 |
"terms(OR) and not all search terms(AND) in the search form Options."
|
1363 |
msgstr ""
|
1364 |
|
1365 |
+
#: ../admin/class-is-settings-fields.php:477
|
1366 |
msgid "The format here is key = value"
|
1367 |
msgstr ""
|
1368 |
|
1369 |
+
#: ../admin/class-is-settings-fields.php:478
|
1370 |
msgid "Please add every synonyms key = value pairs on new line."
|
1371 |
msgstr ""
|
1372 |
|
1373 |
+
#: ../admin/class-is-settings-fields.php:488
|
1374 |
msgid ""
|
1375 |
"Enable below options to disable loading of plugin CSS and JavaScript files."
|
1376 |
msgstr ""
|
1377 |
|
1378 |
+
#: ../admin/class-is-settings-fields.php:492
|
1379 |
msgid "Do not load plugin CSS files"
|
1380 |
msgstr ""
|
1381 |
|
1382 |
+
#: ../admin/class-is-settings-fields.php:493
|
1383 |
msgid "Do not load plugin JavaScript files"
|
1384 |
msgstr ""
|
1385 |
|
1386 |
+
#: ../admin/class-is-settings-fields.php:511
|
1387 |
msgid ""
|
1388 |
"If checked, you have to add following plugin file code into your child theme "
|
1389 |
"CSS file."
|
1390 |
msgstr ""
|
1391 |
|
1392 |
+
#: ../admin/class-is-settings-fields.php:515
|
1393 |
msgid ""
|
1394 |
"If checked, you have to add following plugin files code into your child "
|
1395 |
"theme JavaScript file."
|
1396 |
msgstr ""
|
1397 |
|
1398 |
+
#: ../admin/class-is-settings-fields.php:531
|
1399 |
msgid "Warning: Use with caution."
|
1400 |
msgstr ""
|
1401 |
|
1402 |
+
#: ../admin/class-is-settings-fields.php:536
|
1403 |
msgid ""
|
1404 |
"Do not use Default Search Form to control WordPress default search "
|
1405 |
"functionality"
|
1406 |
msgstr ""
|
1407 |
|
1408 |
+
#: ../admin/class-is-settings-fields.php:545
|
1409 |
msgid "Disable search functionality on entire website"
|
1410 |
msgstr ""
|
1411 |
|
1412 |
+
#: ../admin/class-is-settings-fields.php:555
|
1413 |
msgid ""
|
1414 |
"Display easy edit links of search form on the website frontend to the admin "
|
1415 |
"users"
|
1499 |
|
1500 |
#: ../includes/class-is-admin-public.php:177
|
1501 |
#: ../includes/class-is-search-form.php:451
|
1502 |
+
#: ../includes/class-is-search-form.php:500 ../public/class-is-public.php:175
|
1503 |
+
#: ../public/class-is-public.php:223
|
1504 |
msgid "Search"
|
1505 |
msgstr ""
|
1506 |
|
public/class-is-public.php
CHANGED
@@ -71,14 +71,15 @@ class IS_Public
|
|
71 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
72 |
'ajax_nonce' => wp_create_nonce( 'is_ajax_nonce' ),
|
73 |
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
if ( is_search() && isset( $wp_query->query_vars['_is_settings']['highlight_terms'] ) && 0 !== $wp_query->found_posts ) {
|
75 |
-
wp_enqueue_script(
|
76 |
-
'is-highlight',
|
77 |
-
plugins_url( '/public/js/is-highlight.js', IS_PLUGIN_FILE ),
|
78 |
-
array( 'jquery' ),
|
79 |
-
IS_VERSION,
|
80 |
-
true
|
81 |
-
);
|
82 |
}
|
83 |
}
|
84 |
|
@@ -131,18 +132,23 @@ class IS_Public
|
|
131 |
function get_menu_search_form( $echo = true )
|
132 |
{
|
133 |
$result = '';
|
|
|
134 |
$menu_search_form = ( isset( $this->opt['menu_search_form'] ) ? $this->opt['menu_search_form'] : 0 );
|
|
|
|
|
|
|
135 |
|
136 |
-
if ( !$menu_search_form ) {
|
137 |
$page = get_page_by_path( 'default-search-form', OBJECT, 'is_search_form' );
|
|
|
138 |
if ( !empty($page) ) {
|
139 |
$menu_search_form = $page->ID;
|
|
|
140 |
}
|
141 |
-
}
|
142 |
|
|
|
143 |
|
144 |
if ( $menu_search_form ) {
|
145 |
-
$search_form = IS_Search_Form::get_instance( $menu_search_form );
|
146 |
|
147 |
if ( $search_form ) {
|
148 |
$atts['id'] = $menu_search_form;
|
@@ -152,7 +158,6 @@ class IS_Public
|
|
152 |
|
153 |
}
|
154 |
|
155 |
-
|
156 |
if ( $echo ) {
|
157 |
echo $result ;
|
158 |
} else {
|
@@ -166,8 +171,18 @@ class IS_Public
|
|
166 |
*/
|
167 |
function wp_nav_menu_items( $items, $args )
|
168 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
-
if ( isset( $this->opt['menus'] ) && isset( $this->opt['menus'][$args->theme_location] ) ) {
|
171 |
$temp = '';
|
172 |
|
173 |
if ( isset( $this->opt['menu_gcse'] ) && '' != $this->opt['menu_gcse'] ) {
|
@@ -814,7 +829,9 @@ class IS_Public
|
|
814 |
|
815 |
if ( isset( $this->opt['menu_style'] ) && 'default' !== $this->opt['menu_style'] && isset( $this->opt['menu_magnifier_color'] ) ) {
|
816 |
echo '<style type="text/css" media="screen">' ;
|
817 |
-
echo '.is-menu .search-icon-path { fill: ' . $this->opt['menu_magnifier_color'] . ';}' ;
|
|
|
|
|
818 |
echo '</style>' ;
|
819 |
}
|
820 |
|
71 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
72 |
'ajax_nonce' => wp_create_nonce( 'is_ajax_nonce' ),
|
73 |
) );
|
74 |
+
wp_register_script(
|
75 |
+
'is-highlight',
|
76 |
+
plugins_url( '/public/js/is-highlight.js', IS_PLUGIN_FILE ),
|
77 |
+
array( 'jquery' ),
|
78 |
+
IS_VERSION,
|
79 |
+
true
|
80 |
+
);
|
81 |
if ( is_search() && isset( $wp_query->query_vars['_is_settings']['highlight_terms'] ) && 0 !== $wp_query->found_posts ) {
|
82 |
+
wp_enqueue_script( 'is-highlight' );
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
}
|
85 |
|
132 |
function get_menu_search_form( $echo = true )
|
133 |
{
|
134 |
$result = '';
|
135 |
+
$search_form = false;
|
136 |
$menu_search_form = ( isset( $this->opt['menu_search_form'] ) ? $this->opt['menu_search_form'] : 0 );
|
137 |
+
if ( $menu_search_form ) {
|
138 |
+
$search_form = IS_Search_Form::get_instance( $menu_search_form );
|
139 |
+
}
|
140 |
|
141 |
+
if ( !$menu_search_form || !$search_form ) {
|
142 |
$page = get_page_by_path( 'default-search-form', OBJECT, 'is_search_form' );
|
143 |
+
|
144 |
if ( !empty($page) ) {
|
145 |
$menu_search_form = $page->ID;
|
146 |
+
$search_form = IS_Search_Form::get_instance( $menu_search_form );
|
147 |
}
|
|
|
148 |
|
149 |
+
}
|
150 |
|
151 |
if ( $menu_search_form ) {
|
|
|
152 |
|
153 |
if ( $search_form ) {
|
154 |
$atts['id'] = $menu_search_form;
|
158 |
|
159 |
}
|
160 |
|
|
|
161 |
if ( $echo ) {
|
162 |
echo $result ;
|
163 |
} else {
|
171 |
*/
|
172 |
function wp_nav_menu_items( $items, $args )
|
173 |
{
|
174 |
+
$menu_name = '';
|
175 |
+
|
176 |
+
if ( is_object( $args->menu ) ) {
|
177 |
+
$menu_name = $args->menu->slug;
|
178 |
+
} else {
|
179 |
+
if ( is_string( $args->menu ) ) {
|
180 |
+
$menu_name = $args->menu;
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
|
185 |
+
if ( isset( $this->opt['menus'] ) && isset( $this->opt['menus'][$args->theme_location] ) || isset( $this->opt['menu_name'] ) && isset( $this->opt['menu_name'][$menu_name] ) ) {
|
186 |
$temp = '';
|
187 |
|
188 |
if ( isset( $this->opt['menu_gcse'] ) && '' != $this->opt['menu_gcse'] ) {
|
829 |
|
830 |
if ( isset( $this->opt['menu_style'] ) && 'default' !== $this->opt['menu_style'] && isset( $this->opt['menu_magnifier_color'] ) ) {
|
831 |
echo '<style type="text/css" media="screen">' ;
|
832 |
+
echo '.is-menu path.search-icon-path { fill: ' . $this->opt['menu_magnifier_color'] . ';}' ;
|
833 |
+
echo 'body .popup-search-close:after, body .search-close:after { border-color: ' . $this->opt['menu_magnifier_color'] . ';}' ;
|
834 |
+
echo 'body .popup-search-close:before, body .search-close:before { border-color: ' . $this->opt['menu_magnifier_color'] . ';}' ;
|
835 |
echo '</style>' ;
|
836 |
}
|
837 |
|
public/css/ivory-search.css
CHANGED
@@ -152,7 +152,7 @@
|
|
152 |
|
153 |
.popup-search-close:after,
|
154 |
.search-close:after {
|
155 |
-
border-left: 2px solid #
|
156 |
content: '';
|
157 |
height: 20px;
|
158 |
left: 9px;
|
@@ -166,7 +166,7 @@
|
|
166 |
|
167 |
.popup-search-close:before,
|
168 |
.search-close:before {
|
169 |
-
border-left: 2px solid #
|
170 |
content: '';
|
171 |
height: 20px;
|
172 |
left: 9px;
|
152 |
|
153 |
.popup-search-close:after,
|
154 |
.search-close:after {
|
155 |
+
border-left: 2px solid #848484;
|
156 |
content: '';
|
157 |
height: 20px;
|
158 |
left: 9px;
|
166 |
|
167 |
.popup-search-close:before,
|
168 |
.search-close:before {
|
169 |
+
border-left: 2px solid #848484;
|
170 |
content: '';
|
171 |
height: 20px;
|
172 |
left: 9px;
|
public/js/is-highlight.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
(function($){
|
2 |
-
$.fn.
|
3 |
return this.each(function(){
|
4 |
t = t || 'mark';
|
5 |
c = c || 'is-highlight';
|
@@ -64,6 +64,43 @@
|
|
64 |
|
65 |
};
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
if (typeof(is_terms) != 'undefined') {
|
68 |
if (is_terms.length == 0) {
|
69 |
var ref = document.referrer.split('?');
|
@@ -114,44 +151,6 @@
|
|
114 |
}
|
115 |
}
|
116 |
}
|
117 |
-
|
118 |
-
var area, i, s;
|
119 |
-
var t = jQuery.support.opacity ? 'mark' : 'span';
|
120 |
-
/*
|
121 |
-
* Accented character map from ftp.unicode.org/Public/UNIDATA/UnicodeData.txt.
|
122 |
-
* Maps each upper-case basic alphabet character in the A-Z range to a regex
|
123 |
-
* character class that contains all variations (accented, unaccented,
|
124 |
-
* upper-case, lower-case) of this character).
|
125 |
-
*/
|
126 |
-
var charToAccentedCharClassMap = {
|
127 |
-
'A': '[Aa\xaa\xc0-\xc5\xe0-\xe5\u0100-\u0105\u01cd\u01ce\u0200-\u0203\u0226\u0227\u1d2c\u1d43\u1e00\u1e01\u1e9a\u1ea0-\u1ea3\u2090\u2100\u2101\u213b\u249c\u24b6\u24d0\u3371-\u3374\u3380-\u3384\u3388\u3389\u33a9-\u33af\u33c2\u33ca\u33df\u33ff\uff21\uff41]',
|
128 |
-
'B': '[Bb\u1d2e\u1d47\u1e02-\u1e07\u212c\u249d\u24b7\u24d1\u3374\u3385-\u3387\u33c3\u33c8\u33d4\u33dd\uff22\uff42]',
|
129 |
-
'C': '[Cc\xc7\xe7\u0106-\u010d\u1d9c\u2100\u2102\u2103\u2105\u2106\u212d\u216d\u217d\u249e\u24b8\u24d2\u3376\u3388\u3389\u339d\u33a0\u33a4\u33c4-\u33c7\uff23\uff43]',
|
130 |
-
'D': '[Dd\u010e\u010f\u01c4-\u01c6\u01f1-\u01f3\u1d30\u1d48\u1e0a-\u1e13\u2145\u2146\u216e\u217e\u249f\u24b9\u24d3\u32cf\u3372\u3377-\u3379\u3397\u33ad-\u33af\u33c5\u33c8\uff24\uff44]',
|
131 |
-
'E': '[Ee\xc8-\xcb\xe8-\xeb\u0112-\u011b\u0204-\u0207\u0228\u0229\u1d31\u1d49\u1e18-\u1e1b\u1eb8-\u1ebd\u2091\u2121\u212f\u2130\u2147\u24a0\u24ba\u24d4\u3250\u32cd\u32ce\uff25\uff45]',
|
132 |
-
'F': '[Ff\u1da0\u1e1e\u1e1f\u2109\u2131\u213b\u24a1\u24bb\u24d5\u338a-\u338c\u3399\ufb00-\ufb04\uff26\uff46]',
|
133 |
-
'G': '[Gg\u011c-\u0123\u01e6\u01e7\u01f4\u01f5\u1d33\u1d4d\u1e20\u1e21\u210a\u24a2\u24bc\u24d6\u32cc\u32cd\u3387\u338d-\u338f\u3393\u33ac\u33c6\u33c9\u33d2\u33ff\uff27\uff47]',
|
134 |
-
'H': '[Hh\u0124\u0125\u021e\u021f\u02b0\u1d34\u1e22-\u1e2b\u1e96\u210b-\u210e\u24a3\u24bd\u24d7\u32cc\u3371\u3390-\u3394\u33ca\u33cb\u33d7\uff28\uff48]',
|
135 |
-
'I': '[Ii\xcc-\xcf\xec-\xef\u0128-\u0130\u0132\u0133\u01cf\u01d0\u0208-\u020b\u1d35\u1d62\u1e2c\u1e2d\u1ec8-\u1ecb\u2071\u2110\u2111\u2139\u2148\u2160-\u2163\u2165-\u2168\u216a\u216b\u2170-\u2173\u2175-\u2178\u217a\u217b\u24a4\u24be\u24d8\u337a\u33cc\u33d5\ufb01\ufb03\uff29\uff49]',
|
136 |
-
'J': '[Jj\u0132-\u0135\u01c7-\u01cc\u01f0\u02b2\u1d36\u2149\u24a5\u24bf\u24d9\u2c7c\uff2a\uff4a]',
|
137 |
-
'K': '[Kk\u0136\u0137\u01e8\u01e9\u1d37\u1d4f\u1e30-\u1e35\u212a\u24a6\u24c0\u24da\u3384\u3385\u3389\u338f\u3391\u3398\u339e\u33a2\u33a6\u33aa\u33b8\u33be\u33c0\u33c6\u33cd-\u33cf\uff2b\uff4b]',
|
138 |
-
'L': '[Ll\u0139-\u0140\u01c7-\u01c9\u02e1\u1d38\u1e36\u1e37\u1e3a-\u1e3d\u2112\u2113\u2121\u216c\u217c\u24a7\u24c1\u24db\u32cf\u3388\u3389\u33d0-\u33d3\u33d5\u33d6\u33ff\ufb02\ufb04\uff2c\uff4c]',
|
139 |
-
'M': '[Mm\u1d39\u1d50\u1e3e-\u1e43\u2120\u2122\u2133\u216f\u217f\u24a8\u24c2\u24dc\u3377-\u3379\u3383\u3386\u338e\u3392\u3396\u3399-\u33a8\u33ab\u33b3\u33b7\u33b9\u33bd\u33bf\u33c1\u33c2\u33ce\u33d0\u33d4-\u33d6\u33d8\u33d9\u33de\u33df\uff2d\uff4d]',
|
140 |
-
'N': '[Nn\xd1\xf1\u0143-\u0149\u01ca-\u01cc\u01f8\u01f9\u1d3a\u1e44-\u1e4b\u207f\u2115\u2116\u24a9\u24c3\u24dd\u3381\u338b\u339a\u33b1\u33b5\u33bb\u33cc\u33d1\uff2e\uff4e]',
|
141 |
-
'O': '[Oo\xba\xd2-\xd6\xf2-\xf6\u014c-\u0151\u01a0\u01a1\u01d1\u01d2\u01ea\u01eb\u020c-\u020f\u022e\u022f\u1d3c\u1d52\u1ecc-\u1ecf\u2092\u2105\u2116\u2134\u24aa\u24c4\u24de\u3375\u33c7\u33d2\u33d6\uff2f\uff4f]',
|
142 |
-
'P': '[Pp\u1d3e\u1d56\u1e54-\u1e57\u2119\u24ab\u24c5\u24df\u3250\u3371\u3376\u3380\u338a\u33a9-\u33ac\u33b0\u33b4\u33ba\u33cb\u33d7-\u33da\uff30\uff50]',
|
143 |
-
'Q': '[Qq\u211a\u24ac\u24c6\u24e0\u33c3\uff31\uff51]',
|
144 |
-
'R': '[Rr\u0154-\u0159\u0210-\u0213\u02b3\u1d3f\u1d63\u1e58-\u1e5b\u1e5e\u1e5f\u20a8\u211b-\u211d\u24ad\u24c7\u24e1\u32cd\u3374\u33ad-\u33af\u33da\u33db\uff32\uff52]',
|
145 |
-
'S': '[Ss\u015a-\u0161\u017f\u0218\u0219\u02e2\u1e60-\u1e63\u20a8\u2101\u2120\u24ae\u24c8\u24e2\u33a7\u33a8\u33ae-\u33b3\u33db\u33dc\ufb06\uff33\uff53]',
|
146 |
-
'T': '[Tt\u0162-\u0165\u021a\u021b\u1d40\u1d57\u1e6a-\u1e71\u1e97\u2121\u2122\u24af\u24c9\u24e3\u3250\u32cf\u3394\u33cf\ufb05\ufb06\uff34\uff54]',
|
147 |
-
'U': '[Uu\xd9-\xdc\xf9-\xfc\u0168-\u0173\u01af\u01b0\u01d3\u01d4\u0214-\u0217\u1d41\u1d58\u1d64\u1e72-\u1e77\u1ee4-\u1ee7\u2106\u24b0\u24ca\u24e4\u3373\u337a\uff35\uff55]',
|
148 |
-
'V': '[Vv\u1d5b\u1d65\u1e7c-\u1e7f\u2163-\u2167\u2173-\u2177\u24b1\u24cb\u24e5\u2c7d\u32ce\u3375\u33b4-\u33b9\u33dc\u33de\uff36\uff56]',
|
149 |
-
'W': '[Ww\u0174\u0175\u02b7\u1d42\u1e80-\u1e89\u1e98\u24b2\u24cc\u24e6\u33ba-\u33bf\u33dd\uff37\uff57]',
|
150 |
-
'X': '[Xx\u02e3\u1e8a-\u1e8d\u2093\u213b\u2168-\u216b\u2178-\u217b\u24b3\u24cd\u24e7\u33d3\uff38\uff58]',
|
151 |
-
'Y': '[Yy\xdd\xfd\xff\u0176-\u0178\u0232\u0233\u02b8\u1e8e\u1e8f\u1e99\u1ef2-\u1ef9\u24b4\u24ce\u24e8\u33c9\uff39\uff59]',
|
152 |
-
'Z': '[Zz\u0179-\u017e\u01f1-\u01f3\u1dbb\u1e90-\u1e95\u2124\u2128\u24b5\u24cf\u24e9\u3390-\u3394\uff3a\uff5a]'
|
153 |
-
};
|
154 |
-
|
155 |
if (is_terms.length != 0) {
|
156 |
for (s in is_areas){
|
157 |
area = $(is_areas[s]);
|
@@ -163,13 +162,15 @@
|
|
163 |
/*
|
164 |
console.log('searching for: ' + is_terms[i]);
|
165 |
*/
|
166 |
-
area.
|
167 |
-
area.find('*').
|
168 |
}
|
169 |
break;
|
170 |
}
|
171 |
}
|
172 |
}
|
|
|
173 |
}
|
|
|
174 |
if ('function'==typeof Cufon) Cufon.refresh();
|
175 |
})(jQuery);
|
1 |
(function($){
|
2 |
+
$.fn.is_highlight = function( term, t , c ) {
|
3 |
return this.each(function(){
|
4 |
t = t || 'mark';
|
5 |
c = c || 'is-highlight';
|
64 |
|
65 |
};
|
66 |
|
67 |
+
var area, i, s;
|
68 |
+
var t = jQuery.support.opacity ? 'mark' : 'span';
|
69 |
+
/*
|
70 |
+
* Accented character map from ftp.unicode.org/Public/UNIDATA/UnicodeData.txt.
|
71 |
+
* Maps each upper-case basic alphabet character in the A-Z range to a regex
|
72 |
+
* character class that contains all variations (accented, unaccented,
|
73 |
+
* upper-case, lower-case) of this character).
|
74 |
+
*/
|
75 |
+
var charToAccentedCharClassMap = {
|
76 |
+
'A': '[Aa\xaa\xc0-\xc5\xe0-\xe5\u0100-\u0105\u01cd\u01ce\u0200-\u0203\u0226\u0227\u1d2c\u1d43\u1e00\u1e01\u1e9a\u1ea0-\u1ea3\u2090\u2100\u2101\u213b\u249c\u24b6\u24d0\u3371-\u3374\u3380-\u3384\u3388\u3389\u33a9-\u33af\u33c2\u33ca\u33df\u33ff\uff21\uff41]',
|
77 |
+
'B': '[Bb\u1d2e\u1d47\u1e02-\u1e07\u212c\u249d\u24b7\u24d1\u3374\u3385-\u3387\u33c3\u33c8\u33d4\u33dd\uff22\uff42]',
|
78 |
+
'C': '[Cc\xc7\xe7\u0106-\u010d\u1d9c\u2100\u2102\u2103\u2105\u2106\u212d\u216d\u217d\u249e\u24b8\u24d2\u3376\u3388\u3389\u339d\u33a0\u33a4\u33c4-\u33c7\uff23\uff43]',
|
79 |
+
'D': '[Dd\u010e\u010f\u01c4-\u01c6\u01f1-\u01f3\u1d30\u1d48\u1e0a-\u1e13\u2145\u2146\u216e\u217e\u249f\u24b9\u24d3\u32cf\u3372\u3377-\u3379\u3397\u33ad-\u33af\u33c5\u33c8\uff24\uff44]',
|
80 |
+
'E': '[Ee\xc8-\xcb\xe8-\xeb\u0112-\u011b\u0204-\u0207\u0228\u0229\u1d31\u1d49\u1e18-\u1e1b\u1eb8-\u1ebd\u2091\u2121\u212f\u2130\u2147\u24a0\u24ba\u24d4\u3250\u32cd\u32ce\uff25\uff45]',
|
81 |
+
'F': '[Ff\u1da0\u1e1e\u1e1f\u2109\u2131\u213b\u24a1\u24bb\u24d5\u338a-\u338c\u3399\ufb00-\ufb04\uff26\uff46]',
|
82 |
+
'G': '[Gg\u011c-\u0123\u01e6\u01e7\u01f4\u01f5\u1d33\u1d4d\u1e20\u1e21\u210a\u24a2\u24bc\u24d6\u32cc\u32cd\u3387\u338d-\u338f\u3393\u33ac\u33c6\u33c9\u33d2\u33ff\uff27\uff47]',
|
83 |
+
'H': '[Hh\u0124\u0125\u021e\u021f\u02b0\u1d34\u1e22-\u1e2b\u1e96\u210b-\u210e\u24a3\u24bd\u24d7\u32cc\u3371\u3390-\u3394\u33ca\u33cb\u33d7\uff28\uff48]',
|
84 |
+
'I': '[Ii\xcc-\xcf\xec-\xef\u0128-\u0130\u0132\u0133\u01cf\u01d0\u0208-\u020b\u1d35\u1d62\u1e2c\u1e2d\u1ec8-\u1ecb\u2071\u2110\u2111\u2139\u2148\u2160-\u2163\u2165-\u2168\u216a\u216b\u2170-\u2173\u2175-\u2178\u217a\u217b\u24a4\u24be\u24d8\u337a\u33cc\u33d5\ufb01\ufb03\uff29\uff49]',
|
85 |
+
'J': '[Jj\u0132-\u0135\u01c7-\u01cc\u01f0\u02b2\u1d36\u2149\u24a5\u24bf\u24d9\u2c7c\uff2a\uff4a]',
|
86 |
+
'K': '[Kk\u0136\u0137\u01e8\u01e9\u1d37\u1d4f\u1e30-\u1e35\u212a\u24a6\u24c0\u24da\u3384\u3385\u3389\u338f\u3391\u3398\u339e\u33a2\u33a6\u33aa\u33b8\u33be\u33c0\u33c6\u33cd-\u33cf\uff2b\uff4b]',
|
87 |
+
'L': '[Ll\u0139-\u0140\u01c7-\u01c9\u02e1\u1d38\u1e36\u1e37\u1e3a-\u1e3d\u2112\u2113\u2121\u216c\u217c\u24a7\u24c1\u24db\u32cf\u3388\u3389\u33d0-\u33d3\u33d5\u33d6\u33ff\ufb02\ufb04\uff2c\uff4c]',
|
88 |
+
'M': '[Mm\u1d39\u1d50\u1e3e-\u1e43\u2120\u2122\u2133\u216f\u217f\u24a8\u24c2\u24dc\u3377-\u3379\u3383\u3386\u338e\u3392\u3396\u3399-\u33a8\u33ab\u33b3\u33b7\u33b9\u33bd\u33bf\u33c1\u33c2\u33ce\u33d0\u33d4-\u33d6\u33d8\u33d9\u33de\u33df\uff2d\uff4d]',
|
89 |
+
'N': '[Nn\xd1\xf1\u0143-\u0149\u01ca-\u01cc\u01f8\u01f9\u1d3a\u1e44-\u1e4b\u207f\u2115\u2116\u24a9\u24c3\u24dd\u3381\u338b\u339a\u33b1\u33b5\u33bb\u33cc\u33d1\uff2e\uff4e]',
|
90 |
+
'O': '[Oo\xba\xd2-\xd6\xf2-\xf6\u014c-\u0151\u01a0\u01a1\u01d1\u01d2\u01ea\u01eb\u020c-\u020f\u022e\u022f\u1d3c\u1d52\u1ecc-\u1ecf\u2092\u2105\u2116\u2134\u24aa\u24c4\u24de\u3375\u33c7\u33d2\u33d6\uff2f\uff4f]',
|
91 |
+
'P': '[Pp\u1d3e\u1d56\u1e54-\u1e57\u2119\u24ab\u24c5\u24df\u3250\u3371\u3376\u3380\u338a\u33a9-\u33ac\u33b0\u33b4\u33ba\u33cb\u33d7-\u33da\uff30\uff50]',
|
92 |
+
'Q': '[Qq\u211a\u24ac\u24c6\u24e0\u33c3\uff31\uff51]',
|
93 |
+
'R': '[Rr\u0154-\u0159\u0210-\u0213\u02b3\u1d3f\u1d63\u1e58-\u1e5b\u1e5e\u1e5f\u20a8\u211b-\u211d\u24ad\u24c7\u24e1\u32cd\u3374\u33ad-\u33af\u33da\u33db\uff32\uff52]',
|
94 |
+
'S': '[Ss\u015a-\u0161\u017f\u0218\u0219\u02e2\u1e60-\u1e63\u20a8\u2101\u2120\u24ae\u24c8\u24e2\u33a7\u33a8\u33ae-\u33b3\u33db\u33dc\ufb06\uff33\uff53]',
|
95 |
+
'T': '[Tt\u0162-\u0165\u021a\u021b\u1d40\u1d57\u1e6a-\u1e71\u1e97\u2121\u2122\u24af\u24c9\u24e3\u3250\u32cf\u3394\u33cf\ufb05\ufb06\uff34\uff54]',
|
96 |
+
'U': '[Uu\xd9-\xdc\xf9-\xfc\u0168-\u0173\u01af\u01b0\u01d3\u01d4\u0214-\u0217\u1d41\u1d58\u1d64\u1e72-\u1e77\u1ee4-\u1ee7\u2106\u24b0\u24ca\u24e4\u3373\u337a\uff35\uff55]',
|
97 |
+
'V': '[Vv\u1d5b\u1d65\u1e7c-\u1e7f\u2163-\u2167\u2173-\u2177\u24b1\u24cb\u24e5\u2c7d\u32ce\u3375\u33b4-\u33b9\u33dc\u33de\uff36\uff56]',
|
98 |
+
'W': '[Ww\u0174\u0175\u02b7\u1d42\u1e80-\u1e89\u1e98\u24b2\u24cc\u24e6\u33ba-\u33bf\u33dd\uff37\uff57]',
|
99 |
+
'X': '[Xx\u02e3\u1e8a-\u1e8d\u2093\u213b\u2168-\u216b\u2178-\u217b\u24b3\u24cd\u24e7\u33d3\uff38\uff58]',
|
100 |
+
'Y': '[Yy\xdd\xfd\xff\u0176-\u0178\u0232\u0233\u02b8\u1e8e\u1e8f\u1e99\u1ef2-\u1ef9\u24b4\u24ce\u24e8\u33c9\uff39\uff59]',
|
101 |
+
'Z': '[Zz\u0179-\u017e\u01f1-\u01f3\u1dbb\u1e90-\u1e95\u2124\u2128\u24b5\u24cf\u24e9\u3390-\u3394\uff3a\uff5a]'
|
102 |
+
};
|
103 |
+
|
104 |
if (typeof(is_terms) != 'undefined') {
|
105 |
if (is_terms.length == 0) {
|
106 |
var ref = document.referrer.split('?');
|
151 |
}
|
152 |
}
|
153 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
if (is_terms.length != 0) {
|
155 |
for (s in is_areas){
|
156 |
area = $(is_areas[s]);
|
162 |
/*
|
163 |
console.log('searching for: ' + is_terms[i]);
|
164 |
*/
|
165 |
+
area.is_highlight(is_terms[i], t, 'is-highlight term-' + i);
|
166 |
+
area.find('*').is_highlight(is_terms[i], t, 'is-highlight term-' + i)
|
167 |
}
|
168 |
break;
|
169 |
}
|
170 |
}
|
171 |
}
|
172 |
+
|
173 |
}
|
174 |
+
|
175 |
if ('function'==typeof Cufon) Cufon.refresh();
|
176 |
})(jQuery);
|
public/js/ivory-ajax-search.js
CHANGED
@@ -263,6 +263,23 @@
|
|
263 |
$('#is-ajax-search-details-'+form_id+' .is-ajax-search-posts-details').append( $('#is-ajax-search-result-'+form_id+' .is-ajax-search-items .is-ajax-search-posts-details').html() );
|
264 |
$('#is-ajax-search-result-'+form_id+' .is-ajax-search-items .is-ajax-search-details').remove();
|
265 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
$( '#is-ajax-search-result-'+form_id+' .is-ajax-search-items, #is-ajax-search-details-'+form_id+' .is-ajax-search-items' ).css('max-height', result_box_max_height + 'px');
|
267 |
$.mCustomScrollbar.defaults.scrollButtons.enable=true;
|
268 |
$( '#is-ajax-search-result-'+form_id+' .is-ajax-search-items, #is-ajax-search-details-'+form_id+' .is-ajax-search-items' ).mCustomScrollbar({
|
263 |
$('#is-ajax-search-details-'+form_id+' .is-ajax-search-posts-details').append( $('#is-ajax-search-result-'+form_id+' .is-ajax-search-items .is-ajax-search-posts-details').html() );
|
264 |
$('#is-ajax-search-result-'+form_id+' .is-ajax-search-items .is-ajax-search-details').remove();
|
265 |
}
|
266 |
+
|
267 |
+
var is_ajax_terms = search_term.trim().split(' ');
|
268 |
+
if (is_ajax_terms.length != 0 && $.isFunction($.fn.is_highlight) ) {
|
269 |
+
var is_ajax_areas = ['.is-ajax-search-result'];
|
270 |
+
var t = jQuery.support.opacity ? 'mark' : 'span';
|
271 |
+
var area, i, s;
|
272 |
+
for (s in is_ajax_areas){
|
273 |
+
area = $(is_ajax_areas[s]);
|
274 |
+
if (area.length != 0){
|
275 |
+
for (i in is_ajax_terms){
|
276 |
+
area.is_highlight(is_ajax_terms[i], t, 'is-highlight term-' + i);
|
277 |
+
area.find('*').is_highlight(is_ajax_terms[i], t, 'is-highlight term-' + i)
|
278 |
+
}
|
279 |
+
break;
|
280 |
+
}
|
281 |
+
}
|
282 |
+
}
|
283 |
$( '#is-ajax-search-result-'+form_id+' .is-ajax-search-items, #is-ajax-search-details-'+form_id+' .is-ajax-search-items' ).css('max-height', result_box_max_height + 'px');
|
284 |
$.mCustomScrollbar.defaults.scrollButtons.enable=true;
|
285 |
$( '#is-ajax-search-result-'+form_id+' .is-ajax-search-items, #is-ajax-search-details-'+form_id+' .is-ajax-search-items' ).mCustomScrollbar({
|
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.4
|
7 |
Requires PHP: 5.2.4
|
8 |
-
Stable tag: 4.4.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -192,6 +192,11 @@ Yes we do. We try our best to help free users with customisation requests and we
|
|
192 |
|
193 |
== Changelog ==
|
194 |
|
|
|
|
|
|
|
|
|
|
|
195 |
= 4.4.12 =
|
196 |
* Added - Colorpicker option to change menu magnifier icon color.
|
197 |
* Added - Option to display search form at the start of the navigation menu.
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 5.4
|
7 |
Requires PHP: 5.2.4
|
8 |
+
Stable tag: 4.4.13
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
192 |
|
193 |
== Changelog ==
|
194 |
|
195 |
+
= 4.4.13 =
|
196 |
+
* Added - Option to display search form on menu along with menu locations.
|
197 |
+
* Added - Highlight search terms in AJAX search results.
|
198 |
+
* Fixed - Menu search icon color option was not working.
|
199 |
+
|
200 |
= 4.4.12 =
|
201 |
* Added - Colorpicker option to change menu magnifier icon color.
|
202 |
* Added - Option to display search form at the start of the navigation menu.
|