You are here

function field_rules_create_field_instance in Field Rules 7

File

./field_rules.rules.inc, line 263

Code

function field_rules_create_field_instance($node_type, $field = NULL) {
  $instance = array();
  $instance['field_name'] = $field['field_name'];
  $instance['entity_type'] = 'node';
  $instance['bundle'] = $node_type->type;
  return array(
    'created_field_instance' => field_create_instance($instance),
  );
}