function hook_image_effect_info_alter

Same name in other branches
  1. 9 core/modules/image/image.api.php \hook_image_effect_info_alter()
  2. 8.9.x core/modules/image/image.api.php \hook_image_effect_info_alter()
  3. 10 core/modules/image/image.api.php \hook_image_effect_info_alter()
  4. 11.x core/modules/image/image.api.php \hook_image_effect_info_alter()

Alter the information provided in hook_image_effect_info().

Parameters

$effects: The array of image effects, keyed on the machine-readable effect name.

See also

hook_image_effect_info()

Related topics

1 function implements hook_image_effect_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

image_module_test_image_effect_info_alter in modules/image/tests/image_module_test.module
Implements hook_image_effect_info_alter().
1 invocation of hook_image_effect_info_alter()
image_effect_definitions in modules/image/image.module
Returns a set of image effects.

File

modules/image/image.api.php, line 61

Code

function hook_image_effect_info_alter(&$effects) {
    // Override the Image module's crop effect with more options.
    $effects['image_crop']['effect callback'] = 'mymodule_crop_effect';
    $effects['image_crop']['dimensions callback'] = 'mymodule_crop_dimensions';
    $effects['image_crop']['form callback'] = 'mymodule_crop_form';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.