Unverified Commit 983ce450 authored by alesr's avatar alesr Committed by GitHub

Merge pull request #381 from Gizra/1865860

Issues with multiple entity types as groups
parents f0139ced cfee781b
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment