File: image_module_test.module

package info (click to toggle)
drupal7 7.14-2%2Bdeb7u12
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 24,516 kB
  • sloc: php: 42,979; pascal: 39,064; sh: 1,622; xml: 441; makefile: 14; sql: 1
file content (41 lines) | stat: -rw-r--r-- 811 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php

/**
 * @file
 * Provides Image module hook implementations for testing purposes.
 */

function image_module_test_file_download($uri) {
  if (variable_get('image_module_test_file_download', FALSE) == $uri) {
    return array('X-Image-Owned-By' => 'image_module_test');
  }
  return -1;
}

/**
 * Implements hook_image_effect_info().
 */
function image_module_test_image_effect_info() {
  $effects = array(
    'image_module_test_null' => array(
    'effect callback' => 'image_module_test_null_effect',
    ),
  );

  return $effects;
}

/**
 * Image effect callback; Null.
 *
 * @param $image
 *   An image object returned by image_load().
 * @param $data
 *   An array with no attributes.
 *
 * @return
 *   TRUE
 */
function image_module_test_null_effect(array &$image, array $data) {
  return TRUE;
}