You are here

function og_update_7102 in Organic groups 7

Add default value function to all audience field instances.

File

./og.install, line 761
Install, update, and uninstall functions for the Organic groups module.

Code

function og_update_7102() {
  $instances = field_read_instances(array(
    'field_name' => 'group_audience',
  ));
  foreach ($instances as $instance) {
    $instance['default_value_function'] = 'og_field_audience_default_value';
    field_update_instance($instance);
  }
}