function _imagecache_preset_create in ImageCache 5
Create a preset.
Parameters
name: Name of the preset to be created.
1 call to _imagecache_preset_create()
File
- ./
imagecache.module, line 515 - Dynamic image resizer and image cacher.
Code
function _imagecache_preset_create($name) {
$next_id = db_next_id('{imagecache_preset}_presetid');
db_query('INSERT INTO {imagecache_preset} (presetid, presetname) VALUES (%d, \'%s\')', $next_id, $name);
// Reset presets cache.
_imagecache_get_presets(TRUE);
$_REQUEST['destination'] = 'admin/settings/imagecache/preset/' . $next_id;
}