You are here

function image_ncck_flickr_image_url in Embedded Media Field 5

implement image_ncck_PROVIDER_image_url

Parameters

$code: the code of the image @param $data any stored data for the image, which may already have the title @return the url directly to the image to display

1 call to image_ncck_flickr_image_url()
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 195

Code

function image_ncck_flickr_image_url($code, $width, $height, $formatter = NULL, $field = NULL, $item = NULL, $node = NULL) {
  if ($code) {
    $size = _image_ncck_flickr_guess_size($width, $height);
    $getsize = image_ncck_flickr_request('flickr.photos.getSizes', array(
      'photo_id' => $code,
    ));
    $url = $getsize['sizes']['size'][$size]['source'];
  }
  return $url;
}