image_style_delete
function image_style_delete
image_style_delete($style, $replacement_style_name = '')
Deletes an image style.
Parameters
$style: An image style array.
$replacement_style_name: (optional) When deleting a style, specify a replacement style name so that existing settings (if any) may be converted to a new style.
Return value
TRUE on success.
File
- modules/image/image.module, line 725
- Exposes global functionality for creating image styles.
Code
function image_style_delete($style, $replacement_style_name = '') { image_style_flush($style); db_delete('image_effects')->condition('isid', $style['isid'])->execute(); db_delete('image_styles')->condition('isid', $style['isid'])->execute(); // Let other modules update as necessary on save. $style['old_name'] = $style['name']; $style['name'] = $replacement_style_name; module_invoke_all('image_style_delete', $style); return TRUE; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!image!image.module/function/image_style_delete/7.x