You are here

function emimage_flickr_image_title in Media: Flickr 6

Implements emimage_PROVIDER_image_title.

Parameters

$code: The provider code of the image. @param $data Any stored data for the image, which may already have the title. @return The title as the 3rd party provider knows it, if accessible to us. otherwise, ''.

File

providers/emimage/flickr.inc, line 248
This include processes flickr.com image files for use by emfield.module.

Code

function emimage_flickr_image_title($code, $data) {
  if ($data['title']) {
    return $data['title'];
  }
  $photo = emimage_flickr_request('flickr.photos.getInfo', array(
    'photo_id' => $code,
  ));
  return $photo['photo']['title']['_content'] ? $photo['photo']['title']['_content'] : '';
}