hook_image_style_flush

Versions
7
hook_image_style_flush($style)

Respond to image style flushing.

This hook enables modules to take effect when a style is being flushed (all images are being deleted from the server and regenerated). Any module-specific caches that contain information related to the style should be cleared using this hook. This hook is called whenever a style is updated, deleted, any effect associated with the style is update or deleted, or when the user selects the style flush option.

Parameters

$style The image style array that is being flushed.

Related topics

Code

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

<?php
function hook_image_style_flush($style) {
  // Empty cached data that contains information about the style.
  cache_clear_all('*', 'cache_mymodule', TRUE);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.