You are here

function image_field_caption_field_info_alter in Image Field Caption 7.2

Same name and namespace in other branches
  1. 8 image_field_caption.module \image_field_caption_field_info_alter()

File

./image_field_caption.module, line 206
Provides a caption textarea for image fields.

Code

function image_field_caption_field_info_alter(&$info) {

  // Add a setting to all field types.
  foreach ($info as $field_type => $field_type_info) {
    if ($field_type == 'image') {
      $info['image']['instance_settings'] += array(
        'image_field_caption' => array(
          'enabled' => 0,
        ),
        'image_field_caption_wrapper' => array(
          'image_field_caption_default' => array(
            'value' => '',
            'format' => filter_default_format(),
          ),
        ),
      );
    }
  }
}