function commerce_extra_panes_install in Commerce extra panes 7
Implements hook_install().
File
- ./
commerce_extra_panes.install, line 45 - Install file for Commerce extra panes.
Code
function commerce_extra_panes_install() {
// Ensure that the body field is displayed in the checkout_pane view mode.
$body = field_info_field('body');
foreach ($body['entity_types'] as $entity_type) {
$instances = field_read_instances(array(
'entity_type' => $entity_type,
'field_name' => 'body',
));
foreach ($instances as $instance) {
$instance['display']['checkout_pane'] = $instance['display']['default'];
field_update_instance($instance);
}
}
}