function image_style_delete_form in Drupal 7
Form builder; Form for deleting an image style.
Parameters
$style: An image style array.
See also
image_style_delete_form_submit()
Related topics
1 string reference to 'image_style_delete_form'
- image_menu in modules/
image/ image.module - Implements hook_menu().
File
- modules/
image/ image.admin.inc, line 313 - Administration pages for image settings.
Code
function image_style_delete_form($form, &$form_state, $style) {
$form_state['image_style'] = $style;
$replacement_styles = array_diff_key(image_style_options(TRUE, PASS_THROUGH), array(
$style['name'] => '',
));
$form['replacement'] = array(
'#title' => t('Replacement style'),
'#type' => 'select',
'#options' => $replacement_styles,
'#empty_option' => t('No replacement, just delete'),
);
return confirm_form($form, t('Optionally select a style before deleting %style', array(
'%style' => $style['label'],
)), 'admin/config/media/image-styles', t('If this style is in use on the site, you may select another style to replace it. All images that have been generated for this style will be permanently deleted.'), t('Delete'), t('Cancel'));
}