Version Description
- Fixed long label names in frontend settings dropdown
- Title and description substrings at word endings
- Removed an unneccessary CSS rule
- Fixed a bug with custom post type names
Download this release
Release Info
Developer | wpdreams |
Plugin | Ajax Search Lite |
Version | 3.06 |
Comparing to | |
See all releases |
Code changes from version 3.05 to 3.06
- ajax-search-lite.php +1 -1
- backend/settings.php +1 -1
- css/style.basic.css +3 -21
- functions.php +10 -0
- includes/search_content.class.php +20 -4
- includes/views/asl.shortcode.php +1 -1
- readme.txt +12 -4
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: 3.
|
7 |
Author: Ernest Marcinko
|
8 |
Author URI: http://wp-dreams.com
|
9 |
*/
|
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: 3.06
|
7 |
Author: Ernest Marcinko
|
8 |
Author URI: http://wp-dreams.com
|
9 |
*/
|
backend/settings.php
CHANGED
@@ -46,7 +46,7 @@ $_dk = 'asl_defaults';
|
|
46 |
readonly="readonly"/>
|
47 |
<label class="shortcode">Search shortcode for templates:</label>
|
48 |
<input type="text" class="shortcode"
|
49 |
-
value="<?php echo do_shortcode('[wpdreams_ajaxsearchlite'); ?>"
|
50 |
readonly="readonly"/>
|
51 |
</div>
|
52 |
<div class="wpdreams-box">
|
46 |
readonly="readonly"/>
|
47 |
<label class="shortcode">Search shortcode for templates:</label>
|
48 |
<input type="text" class="shortcode"
|
49 |
+
value="<?php echo do_shortcode('[wpdreams_ajaxsearchlite]'); ?>"
|
50 |
readonly="readonly"/>
|
51 |
</div>
|
52 |
<div class="wpdreams-box">
|
css/style.basic.css
CHANGED
@@ -584,7 +584,7 @@ div[id*='ajaxsearchlitesettings'].searchsettings.ie78 .option {
|
|
584 |
|
585 |
div[id*='ajaxsearchlitesettings'].searchsettings .label {
|
586 |
font-size: 14px;
|
587 |
-
line-height:
|
588 |
margin: -29px 10px 0 38px;
|
589 |
width: 150px;
|
590 |
text-shadow: none;
|
@@ -592,7 +592,7 @@ div[id*='ajaxsearchlitesettings'].searchsettings .label {
|
|
592 |
min-height: 20px;
|
593 |
border: none;
|
594 |
background: transparent;
|
595 |
-
float:
|
596 |
}
|
597 |
|
598 |
/* SQUARED THREE */
|
@@ -686,6 +686,7 @@ div[id*='ajaxsearchlitesettings'].searchsettings fieldset {
|
|
686 |
|
687 |
div[id*='ajaxsearchlitesettings'].searchsettings fieldset .label {
|
688 |
width: 130px;
|
|
|
689 |
}
|
690 |
|
691 |
/* basic scrollbar styling */
|
@@ -1259,25 +1260,6 @@ div[id*='ajaxsearchliteres'] .photostack nav span:last-child {
|
|
1259 |
margin-right: 0;
|
1260 |
}
|
1261 |
|
1262 |
-
div[id*='ajaxsearchliteres'] .photostack nav span::after {
|
1263 |
-
content: "\e600";
|
1264 |
-
font-family: 'icons';
|
1265 |
-
font-size: 80%;
|
1266 |
-
speak: none;
|
1267 |
-
display: inline-block;
|
1268 |
-
vertical-align: top;
|
1269 |
-
font-style: normal;
|
1270 |
-
font-weight: normal;
|
1271 |
-
font-variant: normal;
|
1272 |
-
text-transform: none;
|
1273 |
-
line-height: 30px;
|
1274 |
-
color: #fff;
|
1275 |
-
opacity: 0;
|
1276 |
-
-webkit-font-smoothing: antialiased;
|
1277 |
-
-moz-osx-font-smoothing: grayscale;
|
1278 |
-
-webkit-transition: opacity 0.3s;
|
1279 |
-
transition: opacity 0.3s;
|
1280 |
-
}
|
1281 |
|
1282 |
div[id*='ajaxsearchliteres'] .photostack nav span.current {
|
1283 |
background: #888;
|
584 |
|
585 |
div[id*='ajaxsearchlitesettings'].searchsettings .label {
|
586 |
font-size: 14px;
|
587 |
+
line-height: 20px !important;
|
588 |
margin: -29px 10px 0 38px;
|
589 |
width: 150px;
|
590 |
text-shadow: none;
|
592 |
min-height: 20px;
|
593 |
border: none;
|
594 |
background: transparent;
|
595 |
+
float: none;
|
596 |
}
|
597 |
|
598 |
/* SQUARED THREE */
|
686 |
|
687 |
div[id*='ajaxsearchlitesettings'].searchsettings fieldset .label {
|
688 |
width: 130px;
|
689 |
+
display: block;
|
690 |
}
|
691 |
|
692 |
/* basic scrollbar styling */
|
1260 |
margin-right: 0;
|
1261 |
}
|
1262 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1263 |
|
1264 |
div[id*='ajaxsearchliteres'] .photostack nav span.current {
|
1265 |
background: #888;
|
functions.php
CHANGED
@@ -24,6 +24,16 @@ if (!function_exists("in_array_r")) {
|
|
24 |
}
|
25 |
}
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
if (!function_exists("wpdreams_ismobile")) {
|
28 |
function wpdreams_ismobile() {
|
29 |
$is_mobile = '0';
|
24 |
}
|
25 |
}
|
26 |
|
27 |
+
if (!function_exists("wd_substr_at_word")) {
|
28 |
+
function wd_substr_at_word($text, $length) {
|
29 |
+
if (strlen($text) <= $length) return $text;
|
30 |
+
$blogCharset = get_bloginfo('charset');
|
31 |
+
$charset = $blogCharset !== '' ? $blogCharset : 'UTF-8';
|
32 |
+
$s = mb_substr($text, 0, $length, $charset);
|
33 |
+
return mb_substr($s, 0, strrpos($s, ' '), $charset);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
if (!function_exists("wpdreams_ismobile")) {
|
38 |
function wpdreams_ismobile() {
|
39 |
$is_mobile = '0';
|
includes/search_content.class.php
CHANGED
@@ -41,15 +41,23 @@ if (!class_exists('wpdreams_searchContent')) {
|
|
41 |
if (count($types) < 1) {
|
42 |
return '';
|
43 |
} else {
|
44 |
-
$words = implode('|', $types);
|
45 |
-
$post_types = "($wpdb->posts.post_type REGEXP '
|
46 |
}
|
47 |
/*---------------------------------------------------------------*/
|
48 |
|
49 |
/*----------------------- Title query ---------------------------*/
|
50 |
if ($options['set_intitle']) {
|
51 |
$words = $options['set_exactonly']==1?$s:$_si;
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
$relevance_parts[] = "(case when
|
54 |
(lower($wpdb->posts.post_title) REGEXP '$words')
|
55 |
then 10 else 0 end)";
|
@@ -62,7 +70,15 @@ if (!class_exists('wpdreams_searchContent')) {
|
|
62 |
/*---------------------- Content query --------------------------*/
|
63 |
if ($options['set_incontent']) {
|
64 |
$words = $options['set_exactonly']==1?$s:$_si;
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
$relevance_parts[] = "(case when
|
67 |
(lower($wpdb->posts.post_content) REGEXP '$words')
|
68 |
then 7 else 0 end)";
|
41 |
if (count($types) < 1) {
|
42 |
return '';
|
43 |
} else {
|
44 |
+
$words = implode('[[:>:]]|[[:<:]]', $types);
|
45 |
+
$post_types = "($wpdb->posts.post_type REGEXP '[[:<:]]".$words."[[:>:]]')";
|
46 |
}
|
47 |
/*---------------------------------------------------------------*/
|
48 |
|
49 |
/*----------------------- Title query ---------------------------*/
|
50 |
if ($options['set_intitle']) {
|
51 |
$words = $options['set_exactonly']==1?$s:$_si;
|
52 |
+
//$parts[] = "(lower($wpdb->posts.post_title) REGEXP '$words')";
|
53 |
+
|
54 |
+
$op = 'OR';
|
55 |
+
if (count($_s)>0)
|
56 |
+
$_like = implode("%' ".$op." lower($wpdb->posts.post_title) LIKE '%", $words);
|
57 |
+
else
|
58 |
+
$_like = $s;
|
59 |
+
$parts[] = "( lower($wpdb->posts.post_title) LIKE '%".$_like."%' )";
|
60 |
+
|
61 |
$relevance_parts[] = "(case when
|
62 |
(lower($wpdb->posts.post_title) REGEXP '$words')
|
63 |
then 10 else 0 end)";
|
70 |
/*---------------------- Content query --------------------------*/
|
71 |
if ($options['set_incontent']) {
|
72 |
$words = $options['set_exactonly']==1?$s:$_si;
|
73 |
+
//$parts[] = "(lower($wpdb->posts.post_content) REGEXP '$words')";
|
74 |
+
|
75 |
+
$op = 'OR';
|
76 |
+
if (count($_s)>0)
|
77 |
+
$_like = implode("%' ".$op." lower($wpdb->posts.post_content) LIKE '%", $words);
|
78 |
+
else
|
79 |
+
$_like = $s;
|
80 |
+
$parts[] = "( lower($wpdb->posts.post_content) LIKE '%".$_like."%' )";
|
81 |
+
|
82 |
$relevance_parts[] = "(case when
|
83 |
(lower($wpdb->posts.post_content) REGEXP '$words')
|
84 |
then 7 else 0 end)";
|
includes/views/asl.shortcode.php
CHANGED
@@ -198,7 +198,7 @@
|
|
198 |
$style['selected-exsearchincategories'] = array();
|
199 |
if (!isset($style['selected-excludecategories']) || !is_array($style['selected-excludecategories']))
|
200 |
$style['selected-excludecategories'] = array();
|
201 |
-
$_all_cat =
|
202 |
$_needed_cat = array_diff($_all_cat, $style['selected-exsearchincategories']);
|
203 |
foreach ($_needed_cat as $k => $v) {
|
204 |
$selected = !in_array($v, $style['selected-excludecategories']);
|
198 |
$style['selected-exsearchincategories'] = array();
|
199 |
if (!isset($style['selected-excludecategories']) || !is_array($style['selected-excludecategories']))
|
200 |
$style['selected-excludecategories'] = array();
|
201 |
+
$_all_cat = get_terms('category', array('fields'=>'ids'));
|
202 |
$_needed_cat = array_diff($_all_cat, $style['selected-exsearchincategories']);
|
203 |
foreach ($_needed_cat as $k => $v) {
|
204 |
$selected = !in_array($v, $style['selected-excludecategories']);
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
|
2 |
Contributors: wpdreams
|
3 |
Donate link: http://wp-dreams.com
|
4 |
-
Tags: search, better wordpress search, better search plugin, ajax search, wp ajax search, custom fields search, custom field ajax, better search, wp search, wp search plugin, relevant search plugin, search plugin, wordpress search, advanced search, best wordpress search, ajax wordpress search, ajax search pro
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -39,10 +39,12 @@ Homepage: [wp-dreams.com](http://wp-dreams.com)
|
|
39 |
|
40 |
Pro version Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
|
41 |
|
42 |
-
**New In pro version 3.
|
43 |
|
44 |
* Frontend Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
|
|
|
45 |
* Search in BuddyPress, BBPress, JigoShop, Woocommerce
|
|
|
46 |
* Search result grouping by categories or post types
|
47 |
* Responsive design
|
48 |
* Search in custom fields
|
@@ -98,6 +100,12 @@ and will let you know what to do.
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
= 3.05 =
|
102 |
* Hotfix for disabled categories
|
103 |
|
1 |
+
=== Ajax Search Lite ===
|
2 |
Contributors: wpdreams
|
3 |
Donate link: http://wp-dreams.com
|
4 |
+
Tags: search, better wordpress search, search plugin, relevance, relevant search, better search plugin, ajax search, wp ajax search, custom fields search, custom field ajax, better search, ajax search plugin, wp search, wp search plugin, relevant search plugin, search plugin, wordpress search, advanced search, best wordpress search, ajax wordpress search, ajax search pro
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 3.06
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
39 |
|
40 |
Pro version Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
|
41 |
|
42 |
+
**New In pro version 3.1 (2014.09.19):**
|
43 |
|
44 |
* Frontend Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
|
45 |
+
* The search now can affect the default WordPress search results
|
46 |
* Search in BuddyPress, BBPress, JigoShop, Woocommerce
|
47 |
+
* Search in BuddyPress activity feed, users and group names
|
48 |
* Search result grouping by categories or post types
|
49 |
* Responsive design
|
50 |
* Search in custom fields
|
100 |
|
101 |
== Changelog ==
|
102 |
|
103 |
+
= 3.06 =
|
104 |
+
* Fixed long label names in frontend settings dropdown
|
105 |
+
* Title and description substrings at word endings
|
106 |
+
* Removed an unneccessary CSS rule
|
107 |
+
* Fixed a bug with custom post type names
|
108 |
+
|
109 |
= 3.05 =
|
110 |
* Hotfix for disabled categories
|
111 |
|