You are here

function _media_flickr_photo_url_from_size in Media: Flickr 7.2

Same name and namespace in other branches
  1. 6 media_flickr.utilities.inc \_media_flickr_photo_url_from_size()
  2. 7 includes/media_flickr.utilities.inc \_media_flickr_photo_url_from_size()
1 call to _media_flickr_photo_url_from_size()
_media_flickr_photo_url in includes/media_flickr.utilities.inc
Based on the Photo ID of a Flickr image, this will return the URL to the image itself.

File

includes/media_flickr.utilities.inc, line 151
Utility functions for Media: Flickr.

Code

function _media_flickr_photo_url_from_size($photo_id, $size = NULL) {

  // Check to make sure we have a valid photo code.
  if (is_numeric($photo_id)) {
    $filepath = _media_flickr_photo_remote_url($photo_id, $size);

    // URLize that path...
    $filepath = url($filepath, array(
      'absolute' => TRUE,
    ));
    return $filepath;
  }
}