From fad3becd4b53136a4a7969ed74a470d7d803ddb9 Mon Sep 17 00:00:00 2001 From: "jacob.embree" Date: Tue, 19 Jun 2018 13:26:46 +0200 Subject: [PATCH] #1865860 Issues with multiple entity types as groups. --- og.module | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/og.module b/og.module index 23af037dd..549487fe5 100755 --- a/og.module +++ b/og.module @@ -671,7 +671,15 @@ function og_field_create_instance($instance) { $og_field = og_fields_info(OG_AUDIENCE_FIELD); $og_field['field']['settings']['target_type'] = $entity_type; - $og_field['instance']['label'] = t('Group membership'); + if ($entity_type == 'node') { + $og_field['instance']['label'] = t('Group membership'); + } + else { + $entity_info = entity_get_info($entity_type); + $og_field['instance']['label'] = t('@label group membership', array( + '@label' => $entity_info['label'], + )); + } // If the user entity type has multiple bundles, make sure to attach a field // instance to all of them.