/**
 * Create an organic groups field in a bundle.
 *
 * @param $field_name
 *   The field name
 * @param $entity_type
 *   The entity type
 * @param $bundle
 *   The bundle name.
 * @param $og_field
 *   Optional; Array with field definitions, to allow easier overriding by the
 *   caller. If empty, function will get the field info by calling
 *   og_fields_info() with the field name.
 */
function og_create_field($field_name, $entity_type, $bundle, $og_field = array()) {

This is a bit misleading. $field_name can't be just any old name! It has to be -- AFAICT -- a field name that og_fields_info() knows about, and therefore one defined by hook_og_fields_info().

Comments

shushu’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)