From: Laury GvR Date: Tue, 11 Apr 2017 20:21:19 +0000 (-0400) Subject: Added a new filter so brewbakers could display the member_types in the search form... X-Git-Tag: v1.0.0^2~32 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=873c5a6ccd6f3dca41bb8b102d0fe3bfc39a5329;p=WP-Plugins%2Fglm-member-db-fields.git Added a new filter so brewbakers could display the member_types in the search form on the member list' --- diff --git a/setup/frontHooks.php b/setup/frontHooks.php index a870082..0152ac4 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -100,3 +100,12 @@ add_filter('glm_custom_fields', function($attribute, $id) { 10, 2 ); +add_filter('glm_custom_fields_member_types', function() { + + $query = "SELECT name FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_type"; + $result = $this->wpdb->get_results( $query, ARRAY_A ); + return $result; + }, + 10, + 2 +);