You are here

function _exif_get_image_fields in Exif 7

1 call to _exif_get_image_fields()
_exif_node_insert_update in ./exif.module
Main entrypoint of the module.

File

./exif.module, line 439

Code

function _exif_get_image_fields($object_type, $object, $fields) {
  $result = array();
  if ($object_type == 'node') {
    foreach ($fields as $key => $value) {
      if (is_array($value) && is_array($value['widget']) && ($value['widget']['type'] == 'image_image' || $value['widget']['type'] == 'media_generic' || $value['widget']['type'] == 'image_miw')) {
        $result[$key] = $value;
      }
    }
  }
  if ($object_type == 'file') {
    $result['file'] = $object;
  }
  return $result;
}