You are here

function scald_gallery_scald_fetch in Scald: Gallery 7.2

Same name and namespace in other branches
  1. 7 scald_gallery.module \scald_gallery_scald_fetch()

Implements hook_scald_fetch().

File

./scald_gallery.module, line 259
Scald Gallery is a Scald Atom Provider for image galleries.

Code

function scald_gallery_scald_fetch($atom, $type) {
  $items = field_get_items('scald_atom', $atom, 'scald_thumbnail');
  if ($items && file_exists($items[0]['uri'])) {
    $atom->file_source = $atom->thumbnail_source = $items[0]['uri'];
  }
}