Ajax Search Lite - Version 4.7.16

Version Description

  • Input font now can be changed
  • Additional theme options: search box background color, icon colors, icon background colors and border Changes & Improvements
  • Theme Chooser option moved to Layout Options -> Search box layout panel
  • Theme Chooser option now displays a static preview of the original themes Fixes
  • WCAG improvements: some title labels replaced with aria-labels instead
  • Some redundant options removed from the front-end script, fixing apostrophe related issues
Download this release

Release Info

Developer wpdreams
Plugin Icon 128x128 Ajax Search Lite
Version 4.7.16
Comparing to
See all releases

Code changes from version 4.7.15 to 4.7.16

ajax-search-lite.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Ajax Search Lite
4
  Plugin URI: http://wp-dreams.com
5
  Description: The lite version of the most powerful ajax powered search engine for WordPress.
6
- Version: 4.7.15
7
  Author: Ernest Marcinko
8
  Author URI: http://wp-dreams.com
9
  Text Domain: ajax-search-lite
@@ -22,8 +22,8 @@ define('ASL_FUNCTIONS_PATH', plugin_dir_path(__FILE__)."/includes/functions/");
22
  define('ASL_DIR', 'ajax-search-lite');
23
  define('ASL_URL', plugin_dir_url(__FILE__));
24
  define('ASL_URL_NP', str_replace(array("http://", "https://"), "//", plugin_dir_url(__FILE__)));
25
- define('ASL_CURRENT_VERSION', 4725);
26
- define('ASL_CURR_VER_STRING', "4.7.15");
27
  define('ASL_DEBUG', 0);
28
  define('ASL_DEMO', get_option('wd_asl_demo', 0) );
29
 
3
  Plugin Name: Ajax Search Lite
4
  Plugin URI: http://wp-dreams.com
5
  Description: The lite version of the most powerful ajax powered search engine for WordPress.
6
+ Version: 4.7.16
7
  Author: Ernest Marcinko
8
  Author URI: http://wp-dreams.com
9
  Text Domain: ajax-search-lite
22
  define('ASL_DIR', 'ajax-search-lite');
23
  define('ASL_URL', plugin_dir_url(__FILE__));
24
  define('ASL_URL_NP', str_replace(array("http://", "https://"), "//", plugin_dir_url(__FILE__)));
25
+ define('ASL_CURRENT_VERSION', 4726);
26
+ define('ASL_CURR_VER_STRING', "4.7.16");
27
  define('ASL_DEBUG', 0);
28
  define('ASL_DEMO', get_option('wd_asl_demo', 0) );
29
 
backend/settings/assets/search_instance.js CHANGED
@@ -82,4 +82,39 @@ jQuery(function ($) {
82
  });
83
  $("select[name='"+v+"']").change();
84
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  });
82
  });
83
  $("select[name='"+v+"']").change();
84
  });
85
+
86
+ // Theme options
87
+ $('select[name=theme]').on('change', function(){
88
+ $('.asl_theme').removeClass().addClass('asl_theme asl_theme-' + $(this).val());
89
+ });
90
+ $('select[name=theme]').trigger('change');
91
+
92
+ $('input[name=override_bg]').on('change', function(){
93
+ if ( $(this).val() == 0 ) {
94
+ $('input[name=override_bg_color]').parent().addClass('disabled');
95
+ } else {
96
+ $('input[name=override_bg_color]').parent().removeClass('disabled');
97
+ }
98
+ });
99
+ $('input[name=override_bg]').trigger('change');
100
+
101
+ $('input[name=override_icon]').on('change', function(){
102
+ if ( $(this).val() == 0 ) {
103
+ $('input[name=override_icon_bg_color]').parent().addClass('disabled');
104
+ $('input[name=override_icon_color]').parent().addClass('disabled');
105
+ } else {
106
+ $('input[name=override_icon_bg_color]').parent().removeClass('disabled');
107
+ $('input[name=override_icon_color]').parent().removeClass('disabled');
108
+ }
109
+ });
110
+ $('input[name=override_icon]').trigger('change');
111
+
112
+ $('input[name=override_border]').on('change', function(){
113
+ if ( $(this).val() == 0 ) {
114
+ $('input[name=override_border_style]').closest('.wpdreamsBorder').addClass('disabled');
115
+ } else {
116
+ $('input[name=override_border_style]').closest('.wpdreamsBorder').removeClass('disabled');
117
+ }
118
+ });
119
+ $('input[name=override_border]').trigger('change');
120
  });
backend/settings/assets/style.css CHANGED
@@ -690,6 +690,8 @@ Generic classes
690
  border: 0;
691
  }
692
 
 
 
693
  #wpdreams .item.item-flex,
694
  #wpdreams .item.item-flex-nogrow {
695
  display: flex;
@@ -1183,6 +1185,30 @@ Generic classes
1183
  text-align:right;
1184
  }
1185
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1186
  #wpdreams input.twodigit {
1187
  width: 37px;
1188
  text-align:right;
@@ -1202,6 +1228,45 @@ Generic classes
1202
  background: transparent url("icons/load24x24.gif") no-repeat center center;
1203
  }
1204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1205
  #wpdreams .wpdreamsThemeChooser span {
1206
  background: url("icons/paint.png") no-repeat scroll 0 0 transparent;
1207
  display: inline-block;
690
  border: 0;
691
  }
692
 
693
+ .item-flex,
694
+ .item-flex-nogrow,
695
  #wpdreams .item.item-flex,
696
  #wpdreams .item.item-flex-nogrow {
697
  display: flex;
1185
  text-align:right;
1186
  }
1187
 
1188
+ #wpdreams .wpd_border_radius {
1189
+ margin: 0;
1190
+ border: 1px dotted #ececec;
1191
+ padding: 0 0 5px 5px;
1192
+ }
1193
+
1194
+ #wpdreams .wpd_border_radius legend {
1195
+ font-size: 12px;
1196
+ text-align: left;
1197
+ padding: 0 !important;
1198
+ }
1199
+
1200
+ #wpdreams .wpdreamsBorder .wpd_border_radius label {
1201
+ line-height: 30px;
1202
+ font-size: 11px;
1203
+ display: inline-block;
1204
+ width: 125px;
1205
+ }
1206
+
1207
+ #wpdreams .wpdreamsBorder .wpd_border_radius input {
1208
+ font-size: 11px;
1209
+ height: 22px;
1210
+ }
1211
+
1212
  #wpdreams input.twodigit {
1213
  width: 37px;
1214
  text-align:right;
1228
  background: transparent url("icons/load24x24.gif") no-repeat center center;
1229
  }
1230
 
1231
+ #wpdreams .asl_theme {
1232
+ width: 318px;
1233
+ height: 53px;
1234
+ background-repeat: no-repeat;
1235
+ background-position: right;
1236
+ }
1237
+
1238
+ #wpdreams .asl_theme.asl_theme-curvy-red {
1239
+ background-image: url('theme/curvy-red.png');
1240
+ }
1241
+
1242
+ #wpdreams .asl_theme.asl_theme-curvy-blue {
1243
+ background-image: url('theme/curvy-blue.png');
1244
+ }
1245
+
1246
+ #wpdreams .asl_theme.asl_theme-curvy-black {
1247
+ background-image: url('theme/curvy-black.png');
1248
+ }
1249
+
1250
+ #wpdreams .asl_theme.asl_theme-classic-blue {
1251
+ background-image: url('theme/classic-blue.png');
1252
+ }
1253
+
1254
+ #wpdreams .asl_theme.asl_theme-simple-blue {
1255
+ background-image: url('theme/simple-blue.png');
1256
+ }
1257
+
1258
+ #wpdreams .asl_theme.asl_theme-simple-grey {
1259
+ background-image: url('theme/simple-grey.png');
1260
+ }
1261
+
1262
+ #wpdreams .asl_theme.asl_theme-simple-red {
1263
+ background-image: url('theme/simple-red.png');
1264
+ }
1265
+
1266
+ #wpdreams .asl_theme.asl_theme-underline {
1267
+ background-image: url('theme/underline.png');
1268
+ }
1269
+
1270
  #wpdreams .wpdreamsThemeChooser span {
1271
  background: url("icons/paint.png") no-repeat scroll 0 0 transparent;
1272
  display: inline-block;
backend/settings/assets/theme/classic-blue.png ADDED
Binary file
backend/settings/assets/theme/curvy-black.png ADDED
Binary file
backend/settings/assets/theme/curvy-blue.png ADDED
Binary file
backend/settings/assets/theme/curvy-red.png ADDED
Binary file
backend/settings/assets/theme/simple-blue.png ADDED
Binary file
backend/settings/assets/theme/simple-grey.png ADDED
Binary file
backend/settings/assets/theme/simple-red.png ADDED
Binary file
backend/settings/assets/theme/underline.png ADDED
Binary file
backend/settings/assets/types.js CHANGED
@@ -1713,42 +1713,51 @@ jQuery(function($){
1713
  /**
1714
  * Border chooser
1715
  */
1716
- $('.wpdreamsBorder input[type=text], .wpdreamsBorder select').bind("change", function () {
1717
- var value = "";
1718
- var parent = $(this).parent();
1719
- while (parent.hasClass('wpdreamsBorder') != true) {
1720
- parent = $(parent).parent();
1721
- }
1722
- var width = $('input[name*="_xx_width_xx_"]', parent).val() + "px ";
1723
- var style = $('select[name*="_xx_style_xx_"]', parent).val() + " ";
1724
- var color = $('input[name*="_xx_color_xx_"]', parent).val() + ";";
1725
- var border = "border:" + width + style + color;
1726
 
1727
- var topleft = $.trim($('input[name*="_xx_topleft_xx_"]', parent).val()) + "px ";
1728
- var topright = $.trim($('input[name*="_xx_topright_xx_"]', parent).val()) + "px ";
1729
- var bottomright = $.trim($('input[name*="_xx_bottomright_xx_"]', parent).val()) + "px ";
1730
- var bottomleft = $.trim($('input[name*="_xx_bottomleft_xx_"]', parent).val()) + "px;";
1731
- var borderradius = "border-radius:" + topleft + topright + bottomright + bottomleft;
 
 
 
 
 
1732
 
1733
  var value = border + borderradius;
1734
 
1735
- $('input[type=hidden]', parent).val(value);
1736
- $('input[type=hidden]', parent).change();
1737
  });
1738
- $('.wpdreamsBorder>fieldset>.triggerer').bind('click', function () {
1739
- var parent = $(this).parent();
1740
- var hidden = $("input[type=hidden]", parent);
 
 
 
 
 
 
 
 
 
 
1741
  var border = hidden.val().replace(/(\r\n|\n|\r)/gm, "").match(/border:(.*?)px (.*?) (.*?);/);
1742
- $('input[name*="_xx_width_xx_"]', parent).val(border[1]);
1743
- $('select[name*="_xx_style_xx_"]', parent).val(border[2]);
1744
- $('input[name*="_xx_color_xx_"]', parent).val(border[3]);
1745
 
1746
  var borderradius = hidden.val().replace(/(\r\n|\n|\r)/gm, "").match(/border-radius:(.*?)px(.*?)px(.*?)px(.*?)px;/);
1747
- $('input[name*="_xx_topleft_xx_"]', parent).val(borderradius[1]);
1748
- $('input[name*="_xx_topright_xx_"]', parent).val(borderradius[2]);
1749
- $('input[name*="_xx_bottomright_xx_"]', parent).val(borderradius[3]);
1750
- $('input[name*="_xx_bottomleft_xx_"]', parent).val(borderradius[4]);
1751
- $('input[name*="_xx_color_xx_"]', parent).spectrum('set', border[3]);
 
 
 
 
1752
  });
1753
 
1754
  /**
1713
  /**
1714
  * Border chooser
1715
  */
1716
+ $('.wpdreamsBorder input[type=text], .wpdreamsBorder select').on("change", function () {
1717
+ var parent = $(this).closest('.wpdreamsBorder');
 
 
 
 
 
 
 
 
1718
 
1719
+ var w = $.trim( parent.find('input._xx_width_xx_').val() ) + "px ";
1720
+ var s = $.trim( parent.find('select._xx_style_xx_').val() ) + " ";
1721
+ var c = $.trim( parent.find('input.color').val() ) + ";";
1722
+ var border = "border:" + w + s + c;
1723
+
1724
+ var tl = $.trim( parent.find('input._xx_topleft_xx_').val() ) + "px ";
1725
+ var tr = $.trim( parent.find('input._xx_topright_xx_').val() ) + "px ";
1726
+ var br = $.trim( parent.find('input._xx_bottomright_xx_').val() ) + "px ";
1727
+ var bl = $.trim( parent.find('input._xx_bottomleft_xx_').val() ) + "px;";
1728
+ var borderradius = "border-radius:" + tl + tr + br + bl;
1729
 
1730
  var value = border + borderradius;
1731
 
1732
+ $('input[type=hidden]', parent).val(value).trigger('change');
 
1733
  });
1734
+ $('.wpdreamsBorder select').on('change', function(){
1735
+ var parent = $(this).closest('.wpdreamsBorder');
1736
+ if( $(this).val() == 'none' ) {
1737
+ parent.find('.wpd_br_to_disable').addClass('disabled');
1738
+ } else {
1739
+ parent.find('.wpd_br_to_disable').removeClass('disabled');
1740
+ }
1741
+ });
1742
+ $('.wpdreamsBorder select').trigger('change');
1743
+ $('.wpdreamsBorder>.triggerer').bind('click', function () {
1744
+ var parent = $(this).closest('.wpdreamsBorder');
1745
+ var hidden = parent.find("input[type=hidden]");
1746
+
1747
  var border = hidden.val().replace(/(\r\n|\n|\r)/gm, "").match(/border:(.*?)px (.*?) (.*?);/);
1748
+ parent.find('input._xx_width_xx_').val(border[1]);
1749
+ parent.find('input.color').val(border[3]);
 
1750
 
1751
  var borderradius = hidden.val().replace(/(\r\n|\n|\r)/gm, "").match(/border-radius:(.*?)px(.*?)px(.*?)px(.*?)px;/);
1752
+ parent.find('input._xx_topleft_xx_').val(borderradius[1]);
1753
+ parent.find('input._xx_topright_xx_').val(borderradius[2]);
1754
+ parent.find('input._xx_bottomright_xx_').val(borderradius[3]);
1755
+ parent.find('input._xx_bottomleft_xx_').val(borderradius[4]);
1756
+ parent.find('select._xx_style_xx_').val(border[2]);
1757
+ parent.find('input.color').spectrum('set', border[3]);
1758
+
1759
+ // Separate trigger! otherwise the loaded value is overridden
1760
+ parent.find('select._xx_style_xx_').trigger('change');
1761
  });
1762
 
1763
  /**
backend/settings/class/border.class.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!class_exists("wpdreamsBorder")) {
3
+ /**
4
+ * Class wpdreamsBorder
5
+ *
6
+ * Creates a CSS border defining element.
7
+ *
8
+ * @package WPDreams/OptionsFramework/Classes
9
+ * @category Class
10
+ * @author Ernest Marcinko <ernest.marcinko@wp-dreams.com>
11
+ * @link http://wp-dreams.com, http://codecanyon.net/user/anago/portfolio
12
+ * @copyright Copyright (c) 2014, Ernest Marcinko
13
+ */
14
+ class wpdreamsBorder extends wpdreamsType {
15
+ private $topleft;
16
+ private $topright;
17
+ private $bottomright;
18
+ private $bottomleft;
19
+ private $width;
20
+ private $style;
21
+ private $border_styles = array(
22
+ 'none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset'
23
+ );
24
+
25
+ function getType() {
26
+ parent::getType();
27
+ $this->processData();
28
+ ?>
29
+ <div class='wpdreamsBorder'>
30
+ <fieldset>
31
+ <legend><?php echo $this->label; ?></legend>
32
+ <div class="item-flex">
33
+ <div>
34
+ <label>Style<select class='smaller _xx_style_xx_'>
35
+ <?php foreach($this->border_styles as $option): ?>
36
+ <option value="<?php echo $option; ?>"<?php echo $this->style == $option ? ' selected="selected"' : ''; ?>><?php echo $option; ?></option>
37
+ <?php endforeach; ?>
38
+ </select></label>
39
+ </div>
40
+ <div class="wpd_br_to_disable">
41
+ <label>Width
42
+ <input type='text' class='twodigit _xx_width_xx_' value="<?php echo $this->width; ?>"/>px
43
+ </label>
44
+ <?php new wpdreamsColorPickerDummy("", "Color", (isset($this->color) ? $this->color : "#000000")); ?>
45
+ </div>
46
+ <fieldset class="wpd_border_radius">
47
+ <legend>Border Radius</legend>
48
+ <label>Top left<input type='text' class='twodigit _xx_topleft_xx_'value="<?php echo $this->topleft; ?>" />px</label>
49
+ <label>Top right<input type='text' class='twodigit _xx_topright_xx_' value="<?php echo $this->topright; ?>" />px</label><br>
50
+ <label>Bottom right<input type='text' class='twodigit _xx_bottomright_xx_' value="<?php echo $this->bottomright; ?>" />px</label>
51
+ <label>Bottom left<input type='text' class='twodigit _xx_bottomleft_xx_' value="<?php echo $this->bottomleft; ?>" />px</label>
52
+ </fieldset>
53
+ </div>
54
+ </fieldset>
55
+ <input isparam=1 type='hidden' value="<?php echo $this->data; ?>" name="<?php echo $this->name; ?>">
56
+ <div class='triggerer'></div>
57
+ </div>
58
+ <?php
59
+ }
60
+
61
+ function processData() {
62
+ $this->data = str_replace("\n", "", $this->data);
63
+
64
+ preg_match("/border-radius:(.*?)px(.*?)px(.*?)px(.*?)px;/", $this->data, $matches);
65
+ $this->topleft = $matches[1];
66
+ $this->topright = $matches[2];
67
+ $this->bottomright = $matches[3];
68
+ $this->bottomleft = $matches[4];
69
+
70
+ preg_match("/border:(.*?)px (.*?) (.*?);/", $this->data, $matches);
71
+ $this->width = $matches[1];
72
+ $this->style = $matches[2];
73
+ $this->color = $matches[3];
74
+
75
+ }
76
+
77
+ final function getData() {
78
+ return $this->data;
79
+ }
80
+
81
+ final function getCss() {
82
+ return $this->css;
83
+ }
84
+ }
85
+ }
backend/settings/class/textarea.class.php CHANGED
@@ -15,7 +15,7 @@ if (!class_exists("wpdreamsTextarea")) {
15
  function getType() {
16
  parent::getType();
17
  echo "<label style='vertical-align: top;' for='wpdreamstextarea_" . self::$_instancenumber . "'>" . $this->label . "</label>";
18
- echo "<textarea id='wpdreamstextarea_" . self::$_instancenumber . "' name='" . $this->name . "'>" . stripcslashes($this->data) . "</textarea>";
19
  }
20
  }
21
  }
15
  function getType() {
16
  parent::getType();
17
  echo "<label style='vertical-align: top;' for='wpdreamstextarea_" . self::$_instancenumber . "'>" . $this->label . "</label>";
18
+ echo "<textarea id='wpdreamstextarea_" . self::$_instancenumber . "' name='" . $this->name . "'>" . stripslashes(esc_html($this->data)) . "</textarea>";
19
  }
20
  }
21
  }
backend/settings/default_options.php CHANGED
@@ -157,6 +157,14 @@ function asl_do_init_options() {
157
  // Box layout
158
  'box_width' => "100%",
159
  'box_margin' => "||0px||0px||0px||0px||",
 
 
 
 
 
 
 
 
160
  // Results Layout
161
  'resultstype_def' => array(
162
  array('option' => 'Vertical Results', 'value' => 'vertical'),
@@ -176,7 +184,6 @@ function asl_do_init_options() {
176
  'defaultsearchtext' => 'Search here..',
177
  'showmoreresults' => 0,
178
  'showmoreresultstext' => 'More results...',
179
- 'showmorefont' => 'font-weight:normal;font-family:--g--Open Sans;color:rgba(5, 94, 148, 1);font-size:12px;line-height:15px;text-shadow:0px 0px 0px rgba(255, 255, 255, 0);',
180
  'results_click_blank' => 0,
181
  'scroll_to_results' => 0,
182
  'resultareaclickable' => 1,
157
  // Box layout
158
  'box_width' => "100%",
159
  'box_margin' => "||0px||0px||0px||0px||",
160
+ 'box_font' => 'Open Sans',
161
+ 'override_bg' => 0,
162
+ 'override_bg_color' => '#FFFFFF',
163
+ 'override_icon' => 0,
164
+ 'override_icon_bg_color' => '#FFFFFF',
165
+ 'override_icon_color' => '#000000',
166
+ 'override_border' => 0,
167
+ 'override_border_style' => 'border:1px none rgb(0, 0, 0);border-radius:0px 0px 0px 0px;',
168
  // Results Layout
169
  'resultstype_def' => array(
170
  array('option' => 'Vertical Results', 'value' => 'vertical'),
184
  'defaultsearchtext' => 'Search here..',
185
  'showmoreresults' => 0,
186
  'showmoreresultstext' => 'More results...',
 
187
  'results_click_blank' => 0,
188
  'scroll_to_results' => 0,
189
  'resultareaclickable' => 1,
backend/settings/types.inc.php CHANGED
@@ -13,6 +13,7 @@ defined('ABSPATH') or die("You can't access this file directly.");
13
 
14
  // Include the types
15
  include('class/type.class.php');
 
16
  include('class/categories.class.php');
17
  include('class/colorpicker.class.php');
18
  include('class/colorpickerdummy.class.php');
13
 
14
  // Include the types
15
  include('class/type.class.php');
16
+ include('class/border.class.php');
17
  include('class/categories.class.php');
18
  include('class/colorpicker.class.php');
19
  include('class/colorpickerdummy.class.php');
backend/tabs/instance/general/sources.php CHANGED
@@ -1,24 +1,3 @@
1
- <?php
2
- $themes = array(
3
- array('option'=>'Simple Red', 'value'=>'simple-red'),
4
- array('option'=>'Simple Blue', 'value'=>'simple-blue'),
5
- array('option'=>'Simple Grey', 'value'=>'simple-grey'),
6
- array('option'=>'Classic Blue', 'value'=>'classic-blue'),
7
- array('option'=>'Curvy Black', 'value'=>'curvy-black'),
8
- array('option'=>'Curvy Red', 'value'=>'curvy-red'),
9
- array('option'=>'Curvy Blue', 'value'=>'curvy-blue'),
10
- array('option'=>'Underline White', 'value'=>'underline')
11
- );
12
- ?>
13
- <div class="item">
14
- <?php
15
- $o = new wpdreamsCustomSelect("theme", __("Theme", "ajax-search-lite"), array(
16
- 'selects'=>$themes,
17
- 'value'=>$sd['theme']
18
- ));
19
- $params[$o->getName()] = $o->getData();
20
- ?>
21
- </div>
22
  <div class="item">
23
  <?php
24
  $o = new wpdreamsYesNo("override_search_form", __("Try to replace the theme search with Ajax Search Lite form?", "ajax-search-lite"),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div class="item">
2
  <?php
3
  $o = new wpdreamsYesNo("override_search_form", __("Try to replace the theme search with Ajax Search Lite form?", "ajax-search-lite"),
backend/tabs/instance/layout/box_layout.php CHANGED
@@ -1,3 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div class="item">
2
  <?php
3
  $o = new wpdreamsText("defaultsearchtext", __("Placeholder text", "ajax-search-lite"), $sd['defaultsearchtext']);
@@ -23,4 +45,50 @@
23
  );
24
  $params[$o->getName()] = $o->getData();
25
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  </div>
1
+ <?php
2
+ $themes = array(
3
+ array('option'=>'Simple Red', 'value'=>'simple-red'),
4
+ array('option'=>'Simple Blue', 'value'=>'simple-blue'),
5
+ array('option'=>'Simple Grey', 'value'=>'simple-grey'),
6
+ array('option'=>'Classic Blue', 'value'=>'classic-blue'),
7
+ array('option'=>'Curvy Black', 'value'=>'curvy-black'),
8
+ array('option'=>'Curvy Red', 'value'=>'curvy-red'),
9
+ array('option'=>'Curvy Blue', 'value'=>'curvy-blue'),
10
+ array('option'=>'Underline White', 'value'=>'underline')
11
+ );
12
+ ?>
13
+ <div class="item item-flex-nogrow" style="flex-wrap: wrap;">
14
+ <div class="asl_theme"></div>
15
+ <?php
16
+ $o = new wpdreamsCustomSelect("theme", __("Theme", "ajax-search-lite"), array(
17
+ 'selects'=>$themes,
18
+ 'value'=>$sd['theme']
19
+ ));
20
+ $params[$o->getName()] = $o->getData();
21
+ ?>
22
+ </div>
23
  <div class="item">
24
  <?php
25
  $o = new wpdreamsText("defaultsearchtext", __("Placeholder text", "ajax-search-lite"), $sd['defaultsearchtext']);
45
  );
46
  $params[$o->getName()] = $o->getData();
47
  ?>
48
+ </div>
49
+ <div class="item">
50
+ <?php
51
+ $o = new wpdreamsText("box_font", __("Search plugin Font Family", "ajax-search-lite"), $sd['box_font']);
52
+ $params[$o->getName()] = $o->getData();
53
+ ?>
54
+ <p class="descMsg"><?php echo __("The Font Family used within the plugin. Default: Open Sans", "ajax-search-lite"); ?><br>
55
+ <?php echo __("Entering multiple font family names like <strong>Helvetica, Sans-serif</strong> or <strong>inherit</strong> are also supported.", "ajax-search-lite"); ?></p>
56
+ </div>
57
+ <div class="item item-flex-nogrow" style="flex-wrap: wrap;">
58
+ <?php
59
+ $o = new wpdreamsYesNo("override_bg", __("Override background color?", "ajax-search-lite"),
60
+ $sd['override_bg']);
61
+ $params[$o->getName()] = $o->getData();
62
+
63
+ $o = new wpdreamsColorPicker("override_bg_color", __("color:", "ajax-search-lite"),
64
+ $sd['override_bg_color']);
65
+ $params[$o->getName()] = $o->getData();
66
+ ?>
67
+ </div>
68
+ <div class="item item-flex-nogrow" style="flex-wrap: wrap;">
69
+ <?php
70
+ $o = new wpdreamsYesNo("override_icon", __("Override magnifier & icon colors?", "ajax-search-lite"),
71
+ $sd['override_icon']);
72
+ $params[$o->getName()] = $o->getData();
73
+
74
+ $o = new wpdreamsColorPicker("override_icon_bg_color", __("icon background colors", "ajax-search-lite"),
75
+ $sd['override_icon_bg_color']);
76
+ $params[$o->getName()] = $o->getData();
77
+
78
+ $o = new wpdreamsColorPicker("override_icon_color", __("icon colors", "ajax-search-lite"),
79
+ $sd['override_icon_color']);
80
+ $params[$o->getName()] = $o->getData();
81
+ ?>
82
+ </div>
83
+ <div class="item">
84
+ <div style="margin: 8px 17px 16px 0;">
85
+ <?php
86
+ $o = new wpdreamsYesNo("override_border", __("Override search box border?", "ajax-search-lite"),
87
+ $sd['override_border']);
88
+ $params[$o->getName()] = $o->getData();
89
+ ?></div><?php
90
+ $o = new wpdreamsBorder("override_border_style", __("Border style", "ajax-search-lite"),
91
+ $sd['override_border_style']);
92
+ $params[$o->getName()] = $o->getData();
93
+ ?>
94
  </div>
includes/classes/actions/class-asl-stylesheets.php CHANGED
@@ -84,6 +84,48 @@ if (!class_exists("WD_ASL_StyleSheets_Action")) {
84
  max-height: ". $asl_options['v_res_max_height'] .";
85
  }
86
  ";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  }
88
 
89
  /**
84
  max-height: ". $asl_options['v_res_max_height'] .";
85
  }
86
  ";
87
+ if ( trim($asl_options['box_font']) != '' && $asl_options['box_font'] != 'Open Sans' ) {
88
+ $ffamily = wpd_font('font-family:'.$asl_options['box_font'])." !important;";
89
+ self::$inline_css .= "
90
+ .asl_w, .asl_w * {".$ffamily."}
91
+ .asl_m input[type=search]::placeholder{".$ffamily."}
92
+ .asl_m input[type=search]::-webkit-input-placeholder{".$ffamily."}
93
+ .asl_m input[type=search]::-moz-placeholder{".$ffamily."}
94
+ .asl_m input[type=search]:-ms-input-placeholder{".$ffamily."}
95
+ ";
96
+ }
97
+ if ( $asl_options['override_bg'] == 1 ) {
98
+ self::$inline_css .= "
99
+ .asl_m, .asl_m .probox {
100
+ background-color: ".$asl_options['override_bg_color']." !important;
101
+ background-image: none !important;
102
+ -webkit-background-image: none !important;
103
+ -ms-background-image: none !important;
104
+ }
105
+ ";
106
+ }
107
+ if ( $asl_options['override_icon'] == 1 ) {
108
+ self::$inline_css .= "
109
+ .asl_m .probox svg {
110
+ fill: ".$asl_options['override_icon_color']." !important;
111
+ }
112
+ .asl_m .probox .innericon {
113
+ background-color: ".$asl_options['override_icon_bg_color']." !important;
114
+ background-image: none !important;
115
+ -webkit-background-image: none !important;
116
+ -ms-background-image: none !important;
117
+ }
118
+ ";
119
+ }
120
+ if ( $asl_options['override_border'] == 1 ) {
121
+ self::$inline_css .= "
122
+ div.asl_m.asl_w {
123
+ ".str_replace(';', ' !important;', $asl_options['override_border_style'])."
124
+ box-shadow: none !important;
125
+ }
126
+ div.asl_m.asl_w .probox {border: none !important;}
127
+ ";
128
+ }
129
  }
130
 
131
  /**
includes/functions/functions.php CHANGED
@@ -478,6 +478,31 @@ if (!function_exists("wd_closetags")) {
478
  }
479
  }
480
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481
  if (!function_exists("mysql_escape_mimic")) {
482
  function mysql_escape_mimic($inp) {
483
  if(is_array($inp))
478
  }
479
  }
480
 
481
+ if ( !function_exists('wpd_font') ) {
482
+ /**
483
+ * Helper method to be used before printing the font styles. Converts font families to apostrophed versions.
484
+ *
485
+ * @param $font
486
+ * @return mixed
487
+ */
488
+ function wpd_font($font) {
489
+ preg_match("/family:(.*?)$/", $font, $fonts);
490
+ if (isset($fonts[1])) {
491
+ $f = explode(',', stripslashes(str_replace(array('"', "'"), '', $fonts[1])) );
492
+ foreach ($f as &$_f) {
493
+ if (trim($_f) != 'inherit')
494
+ $_f = '"' . trim($_f) . '"';
495
+ else
496
+ $_f = trim($_f);
497
+ }
498
+ $f = implode(',', $f);
499
+ return preg_replace("/family:(.*?)$/", 'family:' . $f, $font);
500
+ } else {
501
+ return $font;
502
+ }
503
+ }
504
+ }
505
+
506
  if (!function_exists("mysql_escape_mimic")) {
507
  function mysql_escape_mimic($inp) {
508
  if(is_array($inp))
includes/views/asl.shortcode.php CHANGED
@@ -42,8 +42,8 @@
42
 
43
  <div class='proinput'>
44
  <form autocomplete="off" title='Ajax serch form'>
45
- <input title='Search input' type='search' class='orig' name='phrase' placeholder='<?php echo asl_icl_t( "Search bar placeholder text", w_isset_def($style['defaultsearchtext'], '') ); ?>' value='<?php echo apply_filters('asl_print_search_query', get_search_query()); ?>' autocomplete="off"/>
46
- <input title='Autocomplete input, do not use this' type='text' class='autocomplete' name='phrase' value='' autocomplete="off"/>
47
  <span class='loading'></span>
48
  <input type='submit' value="Start search" style='width:0; height: 0; visibility: hidden;'>
49
  </form>
@@ -366,14 +366,11 @@ if ( function_exists('qtranxf_getLanguage') ) {
366
  "showdate": <?php echo ((isset($style['showdate']) && $style['showdate']!="")?$style['showdate']:"1"); ?>,
367
  "showdescription": <?php echo ((isset($style['showdescription']) && $style['showdescription']!="")?$style['showdescription']:"1"); ?>,
368
  "charcount": <?php echo ((isset($style['charcount']) && $style['charcount']!="")?$style['charcount']:"3"); ?>,
369
- "noresultstext": "<?php echo ((isset($style['noresultstext']) && $style['noresultstext']!="")?$style['noresultstext']:"3"); ?>",
370
- "didyoumeantext": "<?php echo ((isset($style['didyoumeantext']) && $style['didyoumeantext']!="")?$style['didyoumeantext']:"3"); ?>",
371
  "defaultImage": "<?php echo w_isset_def($style['image_default'], "")==""?ASL_URL."img/default.jpg":$style['image_default']; ?>",
372
  "highlight": <?php echo $style['kw_highlight']; ?>,
373
  "highlightwholewords": <?php echo $style['kw_highlight_whole_words']; ?>,
374
  "scrollToResults": <?php echo w_isset_def($style['scroll_to_results'], 1); ?>,
375
  "resultareaclickable": <?php echo ((isset($style['resultareaclickable']) && $style['resultareaclickable']!="")?$style['resultareaclickable']:0); ?>,
376
- "defaultsearchtext": "<?php echo ((isset($style['defaultsearchtext']) && $style['defaultsearchtext']!="")?$style['defaultsearchtext']:""); ?>",
377
  "autocomplete": {
378
  "enabled" : <?php echo w_isset_def($style['autocomplete'], 1); ?>,
379
  "lang" : "<?php echo w_isset_def($style['kw_google_lang'], 'en'); ?>"
42
 
43
  <div class='proinput'>
44
  <form autocomplete="off" title='Ajax serch form'>
45
+ <input aria-label='Search input' type='search' class='orig' name='phrase' placeholder='<?php echo asl_icl_t( "Search bar placeholder text", w_isset_def($style['defaultsearchtext'], '') ); ?>' value='<?php echo apply_filters('asl_print_search_query', get_search_query()); ?>' autocomplete="off"/>
46
+ <input aria-label='Autocomplete input, do not use this' type='text' class='autocomplete' name='phrase' value='' autocomplete="off"/>
47
  <span class='loading'></span>
48
  <input type='submit' value="Start search" style='width:0; height: 0; visibility: hidden;'>
49
  </form>
366
  "showdate": <?php echo ((isset($style['showdate']) && $style['showdate']!="")?$style['showdate']:"1"); ?>,
367
  "showdescription": <?php echo ((isset($style['showdescription']) && $style['showdescription']!="")?$style['showdescription']:"1"); ?>,
368
  "charcount": <?php echo ((isset($style['charcount']) && $style['charcount']!="")?$style['charcount']:"3"); ?>,
 
 
369
  "defaultImage": "<?php echo w_isset_def($style['image_default'], "")==""?ASL_URL."img/default.jpg":$style['image_default']; ?>",
370
  "highlight": <?php echo $style['kw_highlight']; ?>,
371
  "highlightwholewords": <?php echo $style['kw_highlight_whole_words']; ?>,
372
  "scrollToResults": <?php echo w_isset_def($style['scroll_to_results'], 1); ?>,
373
  "resultareaclickable": <?php echo ((isset($style['resultareaclickable']) && $style['resultareaclickable']!="")?$style['resultareaclickable']:0); ?>,
 
374
  "autocomplete": {
375
  "enabled" : <?php echo w_isset_def($style['autocomplete'], 1); ?>,
376
  "lang" : "<?php echo w_isset_def($style['kw_google_lang'], 'en'); ?>"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wp-dreams.com
4
  Tags: search, better wordpress search, search plugin, relevance search, widget, Post, ajax search, search filter, wp ajax search, custom fields search, better search, ajax search plugin, wp search, wp search plugin, filter, relevant search plugin, wordpress search, Live Search, shortcode, google, autocomplete, suggest, woocommerce, woocommerce search, product, product search, custom search, ajax, suggest, autosuggest, search autocomplete, live, plugin, sidebar, product tag search, products, woocommerce tag search, WooCommerce Plugin, shop, search by sku, relevant search, highlight, term, image, custom search, ecommerce, Predictive Search, search product, shop, typehead, suggest, instant-search
5
  Requires at least: 3.5
6
  Tested up to: 4.9
7
- Stable tag: 4.7.15
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -26,11 +26,12 @@ Fine-tune the user experience by providing a powerful ajax search plugin to your
26
  **Features List:**
27
 
28
  * Search in posts and pages
29
- * Search in custom post types
30
- * Search in title, description, excerpt and custom fields
 
31
  * Custom Filter boxes (checkbox filters) for categories and post types
32
  * WPML and Qtranslate compatible
33
- * 8 built in templates
34
  * Retina ready vectorized SVG and CSS3 icons
35
  * Category and post exclusions
36
  * Frontend search settings boxes
@@ -45,20 +46,20 @@ Fine-tune the user experience by providing a powerful ajax search plugin to your
45
 
46
  Homepage: [wp-dreams.com](http://wp-dreams.com)
47
 
48
- Pro version Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
49
 
50
- **Pro version fetures v4.10.5 (2017.06.07):**
51
 
52
- * Frontend Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
53
- * The search now can affect the default WordPress search results
54
  * Search in BuddyPress, BBPress, JigoShop, Woocommerce
 
55
  * Search in BuddyPress activity feed, users and group names
 
56
  * Search result grouping by categories or post types
57
- * Responsive design
58
  * Search in custom fields
59
  * Advanced caching technology - image precaching, search phrase caching
60
- * Category selectors on the frontend It’s now possible to filter the posts by categories
61
- * Post grouping by category or post type!
62
  * Search in comments
63
  * 100+ Themes - Fully configurable and editable - with theme customizer & preview window
64
  * 4 layouts: Vertical, Horizontal, Polaroid and Isotopic (with pagination)
@@ -67,7 +68,8 @@ Pro version Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_sea
67
  * Compatibility options and features
68
  * Caching options & Search statistics
69
  * Keyword Highlighting & more...
70
- * Full features list: [Full Features List](http://wp-dreams.com/demo/wp-ajax-search-pro/full-features-list/)
 
71
 
72
  == Installation ==
73
 
@@ -105,6 +107,16 @@ and will let you know what to do.
105
  2. Administrator area - nice and smooth
106
 
107
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
108
  = 4.7.15 =
109
  * New Option: to exclude out-of-stock WooCommerce results
110
  * New option: Exact match location - Starting with, Anywhere, Ending with
4
  Tags: search, better wordpress search, search plugin, relevance search, widget, Post, ajax search, search filter, wp ajax search, custom fields search, better search, ajax search plugin, wp search, wp search plugin, filter, relevant search plugin, wordpress search, Live Search, shortcode, google, autocomplete, suggest, woocommerce, woocommerce search, product, product search, custom search, ajax, suggest, autosuggest, search autocomplete, live, plugin, sidebar, product tag search, products, woocommerce tag search, WooCommerce Plugin, shop, search by sku, relevant search, highlight, term, image, custom search, ecommerce, Predictive Search, search product, shop, typehead, suggest, instant-search
5
  Requires at least: 3.5
6
  Tested up to: 4.9
7
+ Stable tag: 4.7.16
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
26
  **Features List:**
27
 
28
  * Search in posts and pages
29
+ * Search in custom post types such as WooCommerce products, Events, Portfolio items and more
30
+ * Search in title, description, excerpt, categories and tags and custom fields
31
+ * Automatic search replacement as well as widget and shortcode availalbe
32
  * Custom Filter boxes (checkbox filters) for categories and post types
33
  * WPML and Qtranslate compatible
34
+ * 8 built in templates + options for color adjustments
35
  * Retina ready vectorized SVG and CSS3 icons
36
  * Category and post exclusions
37
  * Frontend search settings boxes
46
 
47
  Homepage: [wp-dreams.com](http://wp-dreams.com)
48
 
49
+ Pro version Demo: [Ajax Search Pro](https://ajaxsearchpro.com)
50
 
51
+ **Pro version fetures:**
52
 
53
+ * Frontend Demo: [Ajax Search Pro](https://ajaxsearchpro.com)
 
54
  * Search in BuddyPress, BBPress, JigoShop, Woocommerce
55
+ * Search in Media Attachments and contents (PDF, Office etc..)
56
  * Search in BuddyPress activity feed, users and group names
57
+ * Search in PeepSo Groups and Group Activities
58
  * Search result grouping by categories or post types
 
59
  * Search in custom fields
60
  * Advanced caching technology - image precaching, search phrase caching
61
+ * Category filters, custom field filters, post type filters, tag filters, taxonomy term filters and date filters
62
+ * Post grouping by category, post type or content type
63
  * Search in comments
64
  * 100+ Themes - Fully configurable and editable - with theme customizer & preview window
65
  * 4 layouts: Vertical, Horizontal, Polaroid and Isotopic (with pagination)
68
  * Compatibility options and features
69
  * Caching options & Search statistics
70
  * Keyword Highlighting & more...
71
+ * Highly compatible and responsive
72
+ * Full features list: [Full Features List](https://ajaxsearchpro.com/features/)
73
 
74
  == Installation ==
75
 
107
  2. Administrator area - nice and smooth
108
 
109
  == Changelog ==
110
+ = 4.7.16 =
111
+ * Input font now can be changed
112
+ * Additional theme options: search box background color, icon colors, icon background colors and border
113
+ Changes & Improvements
114
+ * Theme Chooser option moved to Layout Options -> Search box layout panel
115
+ * Theme Chooser option now displays a static preview of the original themes
116
+ Fixes
117
+ * WCAG improvements: some title labels replaced with aria-labels instead
118
+ * Some redundant options removed from the front-end script, fixing apostrophe related issues
119
+
120
  = 4.7.15 =
121
  * New Option: to exclude out-of-stock WooCommerce results
122
  * New option: Exact match location - Starting with, Anywhere, Ending with