You are here

function theme_image_ncck_image in Embedded Media Field 5

3 theme calls to theme_image_ncck_image()
theme_image_ncck_image_full in contrib/image_ncck/image_ncck.module
theme_image_ncck_image_preview in contrib/image_ncck/image_ncck.module
theme_image_ncck_image_thumbnail in contrib/image_ncck/image_ncck.module

File

contrib/image_ncck/image_ncck.module, line 308

Code

function theme_image_ncck_image($field, $item, $formatter, $node, $code, $width, $height, $title = '', $link = NULL) {
  $url = module_invoke('emfield', 'include_invoke', 'image_ncck', $item['provider'], 'image_url', $code, $width, $height, $formatter, $field, $item, $node);
  $attributes = array();
  if ($width) {
    $attributes['width'] = $width;
  }
  if ($height) {
    $attributes['height'] = $height;
  }
  if ($item['class']) {
    $attributes['class'] = $item['class'];
  }
  else {
    if ($item['provider']) {
      $attributes['class'] = $item['provider'];
    }
  }
  $output = theme('image', $url, $title, $title, $attributes, false);
  if ($link) {
    $output = l($output, $link, array(), NULL, NULL, true, true);
  }
  return $output;
}