You are here

function file_styles_file_effect_info in Styles 7.2

Same name and namespace in other branches
  1. 7 contrib/file_styles/file_styles.effects.inc \file_styles_file_effect_info()

Implement hook_file_effect_info().

File

contrib/file_styles/file_styles.effects.inc, line 11
Functions needed to execute image effects provided by Image module.

Code

function file_styles_file_effect_info() {
  $effects = array(
    'file_styles_image' => array(
      'label' => t('Image styles'),
      'styles' => array(),
      'streams' => array(
        'public://',
        'private://',
      ),
      'mimetypes' => array(
        'image/gif',
        'image/jpeg',
        'image/png',
      ),
      'module' => 'image',
      'preview-theme' => 'image_style_preview',
      'add-new-link' => l(t('Add new image style'), 'admin/config/file/image-styles/add'),
    ),
  );
  foreach (image_styles() as $style_name => $style) {
    $effects['file_styles_image']['styles'][$style_name] = $style;
  }
  return $effects;
}