You are here

protected function SocialContentFlickr::getImageUrl in Social Content 7.2

Get the bigger image url from a given row.

Parameters

object $row: The row containing the feed.

Return value

bool|string The URL of the biggest image, or FALSE if there aren't any.

1 call to SocialContentFlickr::getImageUrl()
SocialContentFlickr::prepareRow in modules/flickr/social_content_flickr.class.inc
Do the uploads and attach expected fields to a row about to be imported.

File

modules/flickr/social_content_flickr.class.inc, line 251
Social Content Flickr class.

Class

SocialContentFlickr
@file Social Content Flickr class.

Code

protected function getImageUrl($row) {
  $photo = $row;
  if (!empty($photo->url_o)) {
    return $photo->url_o;
  }
  if (!empty($photo->url_l)) {
    return $photo->url_l;
  }
  if (!empty($photo->url_c)) {
    return $photo->url_c;
  }
  if (!empty($photo->url_z)) {
    return $photo->url_z;
  }
  if (!empty($photo->url_n)) {
    return $photo->url_n;
  }
  if (!empty($photo->url_m)) {
    return $photo->url_m;
  }
  if (!empty($photo->url_s)) {
    return $photo->url_s;
  }
  if (!empty($photo->url_t)) {
    return $photo->url_t;
  }
  if (!empty($photo->url_q)) {
    return $photo->url_q;
  }
  if (!empty($photo->url_sq)) {
    return $photo->url_sq;
  }
  return FALSE;
}