If wordpress search then only search name
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 20 Feb 2018 14:06:05 +0000 (09:06 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 20 Feb 2018 14:06:05 +0000 (09:06 -0500)
For use in wordpress search like wmta.

models/front/members/list.php

index 38a6440..2be9e9d 100644 (file)
@@ -274,6 +274,7 @@ class GlmMembersFront_members_list extends GlmDataMemberInfo
         // Apply any provided text search to name, description, short description, and street address
         if (trim($actionData['request']['text-search']) != '') {
             $textSearch = addslashes(filter_var($actionData['request']['text-search'], FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));
+            // If there's Wordpress search then only search the member name field
             if ( isset( $_REQUEST['s'] ) ) {
                 $where .= $whereSep." (
                     (