From: Steve Sutton Date: Wed, 26 Apr 2017 17:28:53 +0000 (-0400) Subject: Update filter for front search. X-Git-Tag: v1.0.1^2~3 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=8ae6d21127c8bc3794087cc9a1ed2450b8a2dd49;p=WP-Plugins%2Fglm-member-db-fields.git Update filter for front search. Removing the brewbakers part for the pre-owned from here and putting in the filter for the theme. --- diff --git a/setup/frontHooks.php b/setup/frontHooks.php index 6c33129..0327cbb 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -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){