You are here

function imagezoom_gallery_field_formatter_settings_summary in Image Zoom 7.2

Implements hook_field_formatter_settings_summary().

File

modules/imagezoom_gallery/imagezoom_gallery.module, line 49
Provides a gallery formatter for the Image Zoom module.

Code

function imagezoom_gallery_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = imagezoom_field_formatter_settings_summary($field, $instance, $view_mode);
  $summary = explode('<br />', $summary);
  $image_styles = image_style_options(FALSE);

  // Unset possible 'No defined styles' option.
  unset($image_styles['']);

  // Styles could be lost because of enabled/disabled modules that define
  // their styles in code.
  $summary[] = t('Thumbnail image style: @style', array(
    '@style' => isset($image_styles[$settings['imagezoom_thumb_style']]) ? $image_styles[$settings['imagezoom_thumb_style']] : 'original',
  ));
  return implode('<br />', $summary);
}