function hook_image_effect_info_alter

hook_image_effect_info_alter(&$effects)

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

File

modules/image/image.api.php, line 61
Hooks related to image styles and effects.

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';
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!image!image.api.php/function/hook_image_effect_info_alter/7.x