From 3df19328f8f1e2d0cab8a48ad4884de6161379fd Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 8 Jun 2018 09:46:02 -0400 Subject: [PATCH] Updating member search. Use SOUNDS LIKE as well as LIKE to get matches for search. --- functions.php | 12 +++++++++--- style.css | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index e484879..d8554de 100644 --- a/functions.php +++ b/functions.php @@ -416,13 +416,19 @@ add_filter('glm-member-db-front-search-query', function( $queryParts ){ SELECT true FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members WHERE id = T.member - AND name LIKE '%$textSearch%' - ) + AND ( + name SOUNDS LIKE '%$textSearch%' + OR name LIKE '%$textSearch%' + ) + ) + OR T.descr SOUNDS LIKE '%$textSearch%' OR T.descr LIKE '%$textSearch%' OR T.city IN ( SELECT id FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "cities - WHERE name LIKE '%$textSearch%' ) + WHERE name SOUNDS LIKE '%$textSearch%' + OR name LIKE '%$textSearch%' + ) )"; } return $queryParts; diff --git a/style.css b/style.css index 2416904..c117ee6 100644 --- a/style.css +++ b/style.css @@ -4,7 +4,7 @@ Theme URI: http://underscores.me/ Author: Underscores.me Author URI: http://underscores.me/ Description: Description -Version: 1.0.24 +Version: 1.0.25 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: wmta -- 2.17.1