image_module_test.module 811 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * @file
  4. * Provides Image module hook implementations for testing purposes.
  5. */
  6. function image_module_test_file_download($uri) {
  7. if (variable_get('image_module_test_file_download', FALSE) == $uri) {
  8. return array('X-Image-Owned-By' => 'image_module_test');
  9. }
  10. return -1;
  11. }
  12. /**
  13. * Implements hook_image_effect_info().
  14. */
  15. function image_module_test_image_effect_info() {
  16. $effects = array(
  17. 'image_module_test_null' => array(
  18. 'effect callback' => 'image_module_test_null_effect',
  19. ),
  20. );
  21. return $effects;
  22. }
  23. /**
  24. * Image effect callback; Null.
  25. *
  26. * @param $image
  27. * An image object returned by image_load().
  28. * @param $data
  29. * An array with no attributes.
  30. *
  31. * @return
  32. * TRUE
  33. */
  34. function image_module_test_null_effect(array &$image, array $data) {
  35. return TRUE;
  36. }