From: Steve Sutton Date: Wed, 26 Apr 2017 17:36:01 +0000 (-0400) Subject: One more filter to move into brewbakers theme. X-Git-Tag: v1.0.1^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=519164cb1f7a6a0e571f55ac1ccf2f144635901b;p=WP-Plugins%2Fglm-member-db-fields.git One more filter to move into brewbakers theme. Pretty cool that we can just move them to the theme though. --- diff --git a/setup/frontHooks.php b/setup/frontHooks.php index 0327cbb..df651f9 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -88,34 +88,6 @@ add_filter('glm-member-db-front-search-query', function( $queryParts ) { } return $queryParts; }); -add_filter('glm-member-db-front-search-query-orderby', function($originalOrderBy){ - // Order by clause for Just Arrived. - $orderBy = " ( - SELECT CASE WHEN field_data = 'Yes' THEN 0 ELSE 1 end - FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_data - WHERE field_id = (SELECT id - FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_fields - WHERE field_name = 'Just Arrived') - AND ref_dest = T.id) "; - // Order by clause for Red Hot Deal. - $orderBy .= ", ( - SELECT CASE WHEN field_data = 'Yes' THEN 0 ELSE 1 end - FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_data - WHERE field_id = (SELECT id - FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_fields - WHERE field_name = 'Red Hot Deal') - AND ref_dest = T.id) "; - // Order by clause for Coming Soon. - $orderBy .= ", ( - SELECT CASE WHEN field_data = 'Yes' THEN 0 ELSE 1 end - FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_data - WHERE field_id = (SELECT id - FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_fields - WHERE field_name = 'Coming Soon') - AND ref_dest = T.id) "; - $orderBy .= ", $originalOrderBy DESC "; - return $orderBy; -}); add_filter('glm-member-db-fields-front-list-query-params', function(){ $queryParams = array(); // Get all custom fields