1 image_example.module image_example_image_style_delete($style)

Implements hook_image_style_delete().

This hook allows modules to respond to image styles being deleted.

See also

image_example_style_save()

Related topics

File

modules/examples/image_example/image_example.module, line 160
Module file for image_example

Code

function image_example_image_style_delete($style) {
  // See information about $style paramater in documentation for
  // image_example_style_save().
  //
  // Update the modules variable that contains the name of the image style
  // being deleted to the name of the replacement style.
  if (isset($style['old_name']) && $style['old_name'] == config_get('image_example.settings', 'image_example_style_name')) {
    config_set('image_example.settings', 'image_example_style_name', $style['name']);
  }
}