You are here

function styleswitcher_style_delete_form in Style Switcher 6.2

Same name and namespace in other branches
  1. 7.2 styleswitcher.admin.inc \styleswitcher_style_delete_form()

Page callback: Constructs a form to delete a single style.

Parameters

array $style: Style to delete. The structure of an array is the same as returned from styleswitcher_style_load().

See also

styleswitcher_style_delete_form_submit()

styleswitcher_menu()

styleswitcher_style_load()

1 string reference to 'styleswitcher_style_delete_form'
styleswitcher_menu in ./styleswitcher.module
Implements hook_menu().

File

./styleswitcher.admin.inc, line 342
Styleswitcher configuration functionality.

Code

function styleswitcher_style_delete_form(&$form_state, array $style) {
  $form['label'] = array(
    '#type' => 'value',
    '#value' => $style['label'],
  );
  $form['name'] = array(
    '#type' => 'value',
    '#value' => $style['name'],
  );
  $message = t('Are you sure you want to delete the style %title?', array(
    '%title' => $style['label'],
  ));
  $description = t('The style %title will be permanently deleted.', array(
    '%title' => $style['label'],
  ));
  return confirm_form($form, $message, 'admin/settings/styleswitcher', $description);
}