function theme_file_styles_image in Styles 7        
                          
                  
                        Same name and namespace in other branches
- 7.2 contrib/file_styles/file_styles.theme.inc \theme_file_styles_image()
 - 7.2 contrib/file_styles/includes/themes/file_styles.theme.inc \theme_file_styles_image()
 
 
File
 
   - contrib/file_styles/file_styles.theme.inc, line 66
 
  - Theme functions for File styles.
 
Code
function theme_file_styles_image($variables) {
  $file = $variables['object'];
  $style_name = $variables['style_name'];
  $vars = array();
  $vars['path'] = $file->uri;
  
  if (isset($file->override)) {
    $vars['attributes'] = $file->override;
    foreach (array(
      'alt',
      'title',
    ) as $attribute) {
      if (isset($vars['attributes'][$attribute])) {
        $vars[$attribute] = $vars['attributes'][$attribute];
        unset($vars['attributes'][$attribute]);
      }
    }
  }
  
  if (!isset($vars['alt'])) {
    $vars['alt'] = isset($variables['description']) ? $variables['description'] : (isset($file->description) ? $file->description : '');
  }
  if (!isset($vars['title']) || $vars['title'] === '') {
    $vars['title'] = isset($variables['title']) ? $variables['title'] : $vars['alt'];
  }
  
  if ($style_name == 'original') {
    $vars['getsize'] = FALSE;
    return theme('image', $vars);
  }
  $vars['style_name'] = $style_name;
  
  return theme('image_style', $vars);
}