function theme_field_formatter_styles in Styles 6
Same name and namespace in other branches
- 6.2 themes/styles.theme.inc \theme_field_formatter_styles()
@file styles.theme.inc Theme and preprocess functions for the Styles project.
1 string reference to 'theme_field_formatter_styles'
- styles_theme in ./
styles.module - Implements hook_theme().
File
- themes/
styles.theme.inc, line 8 - styles.theme.inc Theme and preprocess functions for the Styles project.
Code
function theme_field_formatter_styles($element = NULL) {
$formatter = $element['#formatter'];
$object = (object) $element['#item'];
$output = '';
if (preg_match('@^styles_(.*?)_(.*?)$@i', $formatter, $matches)) {
$field_type = $matches[1];
$style_name = $matches[2];
$output = theme('styles', $field_type, $style_name, $object);
}
return $output;
}