You are here

function skinr_ui_delete_confirm in Skinr 7.2

Same name and namespace in other branches
  1. 6.2 skinr_ui.admin.inc \skinr_ui_delete_confirm()

Form builder for the skinr settings delete confirmation form.

Parameters

$theme: The name of the theme to delete a setting for.

$module: The module to delete a setting for.

$element: The ID of the setting to delete.

1 string reference to 'skinr_ui_delete_confirm'
skinr_ui_menu in ./skinr_ui.module
Implements hook_menu().

File

./skinr_ui.admin.inc, line 1262
Admin page callbacks for the Skinr UI module.

Code

function skinr_ui_delete_confirm($form, &$form_state, $skin) {
  $form['#skin'] = $skin;

  // Always provide skin configuration sid in the same form key as in the skin
  // configuration edit form.
  $form['sid'] = array(
    '#type' => 'value',
    '#value' => $skin->sid,
  );
  $themes = list_themes();
  return confirm_form($form, t('Are you sure you want to delete this skin configuration?'), isset($_GET['destination']) ? $_GET['destination'] : 'admin/structure/skinr', t('This action cannot be undone.<br />Theme: %theme<br />Module: %module<br />Element: %element<br />Skin: %skin', array(
    '%theme' => $themes[$skin->theme]->info['name'],
    '%module' => $skin->module,
    '%element' => $skin->element,
    '%skin' => $skin->skin,
  )), t('Delete'), t('Cancel'));
}