function image_example_enable

Implements hook_enable().

Related topics

1 call to image_example_enable()
image_example_disable in image_example/image_example.install
Implements hook_disable().

File

image_example/image_example.install, line 34

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