You are here

function _photos_thumb_json in Album Photos 7.3

Same name and namespace in other branches
  1. 6.2 inc/photos.data.inc \_photos_thumb_json()

File

inc/photos.data.inc, line 188
Handles slideshow integration.

Code

function _photos_thumb_json($image) {
  $t['file']['fid'] = $image->fid;
  $t['file']['filename'] = $image->filename;
  $t['user']['link'] = _photos_l('user/' . $image->uid);
  $t['user']['name'] = $image->name;
  $t['file']['album_title'] = $image->title;
  $t['file']['album_link'] = _photos_l('photos/album/' . $image->pid);
  if ($t['file']['des']) {
    $t['file']['des'] = $image->des;
  }
  $t['original'] = _photos_l($image->original);
  if (is_array($image->thumb)) {
    foreach ($image->thumb as $key => $thumb) {
      $t['thumb'][$key] = _photos_l($thumb);
    }
  }
  return $t;
}