You are here

function imagecache_preset_flush in ImageCache 6.2

Same name and namespace in other branches
  1. 5.2 imagecache.module \imagecache_preset_flush()

Flush cached media for a preset.

Parameters

preset: an imagecache preset array.

5 calls to imagecache_preset_flush()
imagecache_action_delete in ./imagecache.module
imagecache_action_save in ./imagecache.module
imagecache_preset_delete in ./imagecache.module
imagecache_preset_save in ./imagecache.module
Save an ImageCache preset.
imagecache_ui_preset_flush_form_submit in ./imagecache_ui.pages.inc

File

./imagecache.module, line 1121
Dynamic image resizer and image cacher.

Code

function imagecache_preset_flush($preset) {
  if (user_access('flush imagecache')) {
    $presetdir = realpath(file_directory_path() . '/imagecache/' . $preset['presetname']);
    if (is_dir($presetdir)) {
      module_invoke_all('imagecache_preset_flush', $presetdir, $preset);
      _imagecache_recursive_delete($presetdir);
    }
  }
}