file_styles.effects.inc 747 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * @file
  4. * Functions needed to execute image effects provided by Image module.
  5. */
  6. /**
  7. * Implement hook_file_effect_info().
  8. */
  9. function file_styles_file_effect_info() {
  10. $effects = array(
  11. 'file_styles_image' => array(
  12. 'label' => t('Image styles'),
  13. 'styles' => array(),
  14. 'streams' => array('public://', 'private://'),
  15. 'mimetypes' => array('image/gif', 'image/jpeg', 'image/png'),
  16. 'module' => 'image',
  17. 'preview-theme' => 'image_style_preview',
  18. 'add-new-link' => l(t('Add new image style'), 'admin/config/file/image-styles/add'),
  19. )
  20. );
  21. foreach (image_styles() as $style_name => $style) {
  22. $effects['file_styles_image']['styles'][$style_name] = $style;
  23. }
  24. return $effects;
  25. }