New filters for grouped fields and get tab name.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 8 Aug 2018 19:20:47 +0000 (15:20 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 8 Aug 2018 19:20:47 +0000 (15:20 -0400)
New filter for tab name of custom field.
New filter for the grouped custom fields.

setup/frontHooks.php

index 2d68139..c6768b4 100644 (file)
@@ -144,7 +144,6 @@ add_filter('get_glm_custom_fields', function($uid,$entity_id) {
         }
     }
 
-//    echo "<pre>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
 );