1 image.admin.inc image_style_delete_form($form, &$form_state, $style)

Form builder; Form for deleting an image style.


$style: An image style array.

See also


Related topics


core/modules/image/image.admin.inc, line 274
Admin page callbacks for the Image module.


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(
  t('Optionally select a style before deleting %style', array('%style' => $style['label'])), 
  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')