Update filter for front search.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 26 Apr 2017 17:28:53 +0000 (13:28 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 26 Apr 2017 17:28:53 +0000 (13:28 -0400)
Removing the brewbakers part for the pre-owned from here and putting in
the filter for the theme.

setup/frontHooks.php

index 6c33129..0327cbb 100644 (file)
@@ -86,18 +86,6 @@ add_filter('glm-member-db-front-search-query', function( $queryParts ) {
             }
         }
     }
-    // Check to see if Pre-Owned is not set. If it is not set then only get
-    // listings without the Pre-Owned
-    if ( !isset( $_REQUEST['pre_owned'] ) ) {
-        $queryParts[] = " T.id IN (
-            SELECT ref_dest
-              FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_data
-             WHERE field_data != 'Yes'
-               AND field_id = (SELECT id
-                                 FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_fields
-                                WHERE field_name = 'Pre-Owned')
-        ) ";
-    }
     return $queryParts;
 });
 add_filter('glm-member-db-front-search-query-orderby', function($originalOrderBy){