You are here

function theme_emimage_image_full in Embedded Media Field 6.3

Same name and namespace in other branches
  1. 6 contrib/emimage/emimage.theme.inc \theme_emimage_image_full()
  2. 6.2 contrib/emimage/emimage.theme.inc \theme_emimage_image_full()

Format the image using the Full Image preset.

1 theme call to theme_emimage_image_full()
theme_emimage_default in contrib/emimage/emimage.theme.inc
Format the image using the Default (Full Image) preset.

File

contrib/emimage/emimage.theme.inc, line 86
Theme functions for Embedded Media Image

Code

function theme_emimage_image_full($field, $item, $formatter, $node, $options = array()) {
  if ($item['value'] && $item['provider']) {
    $code = $item['value'];
    $width = isset($options['width']) ? $options['width'] : $field['widget']['full_width'];
    $height = isset($options['height']) ? $options['height'] : $field['widget']['full_height'];
    $link = isset($options['full_link']) ? $options['full_link'] : $field['widget']['full_link'];
    if ($link == EMIMAGE_LINK_CONTENT) {
      $link = 'node/' . $node->nid;
    }
    else {
      if ($link == EMIMAGE_LINK_PROVIDER) {
        $link = module_invoke('emfield', 'include_invoke', 'emimage', $item['provider'], 'embedded_link', $code, $item['data']);
      }
      else {
        if (!is_string($link)) {
          $link = NULL;
        }
      }
    }
    if (isset($options['title'])) {
      $title = $options['title'];
    }
    else {
      $title = module_invoke('emfield', 'include_invoke', 'emimage', $item['provider'], 'image_title', $code, $item['data']);
    }
    $output = theme('emimage_image', $field, $item, $formatter, $node, $code, $width, $height, $title, $link, $options);
  }
  return $output;
}