From: Steve Sutton Date: Wed, 8 Aug 2018 19:20:47 +0000 (-0400) Subject: New filters for grouped fields and get tab name. X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=7e90d686d8d9a3d4e5478e887ab6f78b78336d81;p=WP-Plugins%2Fglm-member-db-fields.git New filters for grouped fields and get tab name. New filter for tab name of custom field. New filter for the grouped custom fields. --- diff --git a/setup/frontHooks.php b/setup/frontHooks.php index 2d68139..c6768b4 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -144,7 +144,6 @@ add_filter('get_glm_custom_fields', function($uid,$entity_id) { } } -// echo "
AA" . print_r($result) . "ZZ";
     return $result;
     },
     10,
@@ -170,8 +169,8 @@ add_filter(
                    FROM $groupTable
                   WHERE uid = %s",
                 $uid
-            )
-            , ARRAY_A
+            ),
+            ARRAY_A
         );
 
         if ( $groups ) {
@@ -208,7 +207,9 @@ add_filter(
  */
 add_filter(
     'get_glm_custom_field_tab_name',
-    function( $uid ){
+    function( $content ){
+        $tab_name = get_option( 'glm_field_contact_tab_name' );
+        return ($tab_name) ? $tab_name : $content;
     },10,1
 );