Parameters

string $object_type:

object $object:

array $fields:

Return value

array

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

File

./exif.module, line 520

Code

function _exif_get_image_fields($object_type, $object, array $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;
}