From: Anthony Talarico Date: Thu, 28 Mar 2019 13:51:25 +0000 (-0400) Subject: updating adminhooks to make the member db search list filters accessibile , adjusting... X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fdevelop;p=WP-Plugins%2Fglm-member-db-fields.git updating adminhooks to make the member db search list filters accessibile , adjusting the markup for the custom fields --- diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 299aa36..521b56e 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -122,21 +122,34 @@ $parts = array(); case 'text': // convert name to lower case and replace spaces with _ $field_name = preg_replace( '/[ -]/', '_', strtolower( $field['field_name'] ) ); - $parts[$field['id']] = '' . $field['field_name'] . ': + + ' . $field['field_name'] . ': '; break; } } @@ -156,6 +169,7 @@ add_filter('glm-member-db-admin-search-query', function() { WHERE admin_search = 1", ARRAY_A ); + if ( isset( $customFields ) && count( $customFields ) > 0 ) { foreach ( $customFields as $key => $field ) { switch ( $field['field_type'] ) { @@ -163,6 +177,7 @@ add_filter('glm-member-db-admin-search-query', function() { break; case 'text': // convert name to lower case and replace spaces with _ + $field_name = preg_replace( '/[ -]/', '_', strtolower( $field['field_name'] ) ); if ( isset( $_REQUEST[$field_name] ) && $fieldValue = filter_var( $_REQUEST[$field_name], FILTER_SANITIZE_STRING ) ) { $queryParts[] = " T.id IN (