12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- function theme_styles_field_formatter($variables) {
- $formatter ;
- $variables['object'] = (object)$variables['object'];
- $output = '';
- if (preg_match('@^styles_(.*?)_(.*?)$@i', $formatter, $matches)) {
- $variables['field_type'] = $field_type ;
- $variables['style_name'] = $style_name ;
- $output = theme('styles', $variables);
- }
- return $output;
- }
- function template_preprocess_styles(&$variables) {
-
-
- $variables['instance'] = $variables['instance'] ? $variables['instance'] : styles_instance($variables);
-
- $variables['instance']->arrayPush('classes', $variables['style_name']);
- if ($variables['instance']) {
-
- $variables['prefix'] = $variables['instance']->getPrefix();
- $variables['suffix'] = $variables['instance']->getSuffix();
-
- $variables['output'] = $variables['instance']->display(TRUE);
- }
- else {
-
- $variables['output'] = '';
- }
- }
|