image_style_delete_form

Versions
7
image_style_delete_form($form, $form_state, $style)

Form builder; Form for deleting an image style.

See also

image_style_delete_form_submit()

Parameters

$style An image style array.

Related topics

Code

modules/image/image.admin.inc, line 283

<?php
function image_style_delete_form($form, $form_state, $style) {
  $form_state['image_style'] = $style;

  $replacement_styles = array_diff_key(image_style_options(), array($style['name'] => ''));
  $replacement_styles[''] = t('No replacement, just delete');
  $form['replacement'] = array(
    '#title' => t('Replacement style'),
    '#type' => 'select',
    '#options' => $replacement_styles,
  );

  return confirm_form(
    $form,
    t('Optionally select a style before deleting %style', array('%style' => $style['name'])),
    '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')
  );
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.