Skip to content

Instantly share code, notes, and snippets.

@bitamar
Created February 26, 2013 11:25
Show Gist options
  • Save bitamar/5037806 to your computer and use it in GitHub Desktop.
Save bitamar/5037806 to your computer and use it in GitHub Desktop.
/**
* Profile task; Attach OG related fields.
*/
function kaveret_og_setup() {
// Group type.
og_create_field(OG_GROUP_FIELD, 'node', 'community');
// Group content type
$bundles = array(
'offer',
'request',
);
foreach ($bundles as $bundle) {
$og_field = og_fields_info(OG_AUDIENCE_FIELD);
$og_field['instance']['label'] = 'Community';
og_create_field(OG_AUDIENCE_FIELD, 'node', $bundle, $og_field);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment