function flickr_photo_page_url in Flickr 7
Same name and namespace in other branches
- 5 flickr.inc \flickr_photo_page_url()
- 6 flickr.inc \flickr_photo_page_url()
Returns the URL for the Flick photo page.
Parameters
string $owner: Owner of the photo.
string $id: ID of the photo to reference in the URL.
Return value
array URL for the flickr photo page showing photo with $id of $owner.
2 calls to flickr_photo_page_url()
- theme_flickr_photo in ./
flickr.module - Theme Flickr photo.
- theme_flickr_photo_box in ./
flickr.module - Theme Flickr photo box on a profile page.
File
- ./
flickr.inc, line 393 - The Flickr API functions.
Code
function flickr_photo_page_url($owner, $id = NULL) {
$nsid = is_array($owner) ? $owner['nsid'] : $owner;
if ($person = flickr_people_getinfo($nsid)) {
return $person['photosurl']['_content'] . $id;
}
else {
return "https://flickr.com/photos/{$nsid}/{$id}";
}
}