How to set body field display programmatically on node type install? When hook_installing a new custom node type filled with custom fields I call field_create_instance($instance) where I also set the custom fields' display like so:

'display' =&gt; array(
  'default' =&gt; array( // view mode
    'label' =&gt; 'hidden',
    'type' =&gt; 'text_default'
  ),
  'teaser' =&gt; array( // view mode
    'label' =&gt; 'hidden',
    'type' =&gt; 'hidden'
  )
)


I also added a body field via node_add_body_field($type) but where can I set that body's display properties programmatically? Per default it's set to be displayed in the teaser view. I want to hide it.
You can access and alter the view mode configuration via field_bundle_settings(), (which is basically a shortcut to variable_get and variable_set):

$bundle = 'my_node_type';
$bundle_settings = field_bundle_settings('node', $bundle);
$bundle_settings['view_modes']['teaser']['custom_settings'] = true;
field_bundle_settings('node', $bundle, $bundle_settings);