1 image_example.install image_example_enable()

Implements hook_enable().

Related topics

File

modules/examples/image_example/image_example.install, line 26
Install, update, and uninstall functions for the image_example module.

Code

function image_example_enable() {
  // There is currently no way to manually flush an image style which causes
  // problems when installing a new module that implements
  // hook_image_styles_alter(). If the new module modifies an image style that
  // modification will not be applied to any images that have already been
  // generated unless the styles are flushed. This is one way around that.
  $styles = image_styles();
  foreach ($styles as $style) {
    image_style_flush($style);
  }
}