You are here

function imagecache_preset_flush in ImageCache 5.2

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

Flush cached media for a preset.

Parameters

id: A preset id.

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.module

File

./imagecache.module, line 856
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)) {
      _imagecache_recursive_delete($presetdir);
    }
  }
}