function template_preprocess_styles in Styles 6.2
Same name and namespace in other branches
- 6 themes/styles.theme.inc \template_preprocess_styles()
- 7.2 themes/styles.theme.inc \template_preprocess_styles()
- 7 styles.module \template_preprocess_styles()
File
- themes/
styles.theme.inc, line 21 - styles.theme.inc Theme and preprocess functions for the Styles project.
Code
function template_preprocess_styles(&$variables) {
// If we have a Styles object instance already, then honor that.
// Otherwise, we'll build a new Styles object instance from our settings.
$variables['instance'] = $variables['instance'] ? $variables['instance'] : styles_instance($variables['field_type'], $variables['style_name'], $variables['object']);
$variables['classes'] = 'styles-wrapper';
if ($variables['instance']) {
$variables['output'] = $variables['instance']
->display(TRUE);
}
else {
$variables['output'] = '';
}
}