function emimage_flickr_image_title in Embedded Media Field 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
- contrib/
emimage/ providers/ flickr.inc, line 250 - 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'] : '';
}