function theme_file_styles_field_formatter_styles in Styles 7.2
Same name and namespace in other branches
- 7 contrib/file_styles/file_styles.theme.inc \theme_file_styles_field_formatter_styles()
File
- contrib/
file_styles/ file_styles.theme.inc, line 54 - Theme functions for File styles.
Code
function theme_file_styles_field_formatter_styles($variables) {
// The formatter name needs to match what theme_field_formatter_image expects.
$variables['element']['#formatter'] = '__' . $variables['style']['name'];
// Add Alt & Title to the element.
$variables['element']['#item']['alt'] = $variables['element']['#item']['title'] = $variables['element']['#item']['description'];
// Defer to Image Styles for the rest.
return theme('field_formatter_image', $variables);
}