You are here

function _imagecache_preset_delete in ImageCache 5

1 call to _imagecache_preset_delete()
imagecache_admin_submit in ./imagecache.module

File

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

Code

function _imagecache_preset_delete($id, $name) {
  _imagecache_preset_flush($id);
  db_query('DELETE FROM {imagecache_action} where presetid = %d', $id);
  db_query('DELETE FROM {imagecache_preset} where presetid = %d', $id);
  drupal_set_message(t('Preset "%name" (ID: @id) deleted.', array(
    '%name' => $name,
    '@id' => $id,
  )));

  // Reset presets cache.
  _imagecache_get_presets(TRUE);
}