From: Steve Sutton Date: Fri, 8 Jun 2018 13:46:02 +0000 (-0400) Subject: Updating member search. X-Git-Tag: v1.0.25^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=3df19328f8f1e2d0cab8a48ad4884de6161379fd;p=WP-Themes%2Fwmta.git Updating member search. Use SOUNDS LIKE as well as LIKE to get matches for search. --- 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