function hover_preview_field_formatter_settings_summary in Hover Preview for ImageCache 7
Implements hook_field_formatter_settings_summary().
File
- ./
hover_preview.module, line 81
Code
function hover_preview_field_formatter_settings_summary($field, $instance, $view_mode) {
// Build off of the Image summary.
$summary = image_field_formatter_settings_summary($field, $instance, $view_mode);
// Add in the Hover Preview action.
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
if (isset($settings['hover_preview_action']) && !empty($settings['hover_preview_action'])) {
$summary .= '<br />' . t('Hover preview action: @action', array(
'@action' => $settings['hover_preview_action'],
));
}
else {
$summary .= '<br />' . t('Hover preview action: Preview Image');
}
// Display the Hover Preview image style.
$image_styles = image_style_options(FALSE);
if (isset($image_styles[$settings['hover_preview_style']])) {
$summary .= '<br />' . t('Hover preview style: @style', array(
'@style' => $image_styles[$settings['hover_preview_style']],
));
}
else {
$summary .= '<br />' . t('Hover preview style: Original image');
}
return $summary;
}