You are here

function imagefield_extended_filefield_data_info in ImageField Extended 6.4

Implementation of hook_filefield_data_info().

File

./imagefield_extended.module, line 497
Insert additional fields into a FileField / ImageField data array.

Code

function imagefield_extended_filefield_data_info() {
  $fields = _imagefield_extended_fields();
  $elements = array();
  foreach ($fields as $type => $value) {
    foreach ($fields[$type] as $id => $name) {
      $id = ($checkbox = $type === 'checkboxes') ? 'workflow_' . $id : $id;
      $elements[$id] = array(
        'title' => $name,
        'callback' => $checkbox ? 'imagefield_extended_check_checkboxes' : 'imagefield_extended_check_text',
      );
    }
  }
  return $elements;
}