function image_ncck_flickr_data in Embedded Media Field 5
1 call to image_ncck_flickr_data()
- image_ncck_flickr_import in contrib/image_ncck/providers/flickr.inc
- This allows flickr photosets to be imported into nodes
File
- contrib/image_ncck/providers/flickr.inc, line 126
Code
function image_ncck_flickr_data($field, $item) {
$data = array();
$xml = image_ncck_flickr_request('flickr.photos.getInfo', array(
'photo_id' => $item['value'],
));
$data['owner'] = $xml['photo']['owner']['nsid'];
$data['title'] = $xml['photo']['title']['_content'];
$data['description'] = $xml['photo']['description']['_content'];
$data['tags'] = array();
if (is_array($xml['photo']['tags']['tag'])) {
foreach ($xml['photo']['tags']['tag'] as $tag) {
$data['tags'][] = $tag['raw'];
}
}
return $data;
}