You are here

function delta_override_delete in Delta 6

Same name and namespace in other branches
  1. 7 delta.module \delta_override_delete()

Function to provide confirmation before deleting an override

1 string reference to 'delta_override_delete'
delta_menu in ./delta.module
Implementation of hook_menu().

File

./delta.module, line 861
The Delta Theme API is an advanced manipulation of the Theme Settings API to allow for customization/configuration of theme settings based on node types, context, or groups of paths.

Code

function delta_override_delete($form_state, $oid) {
  $form = array();
  $stored_data = delta_get_stored_override($oid);
  $form['delta_override']['did'] = array(
    '#type' => 'hidden',
    '#default_value' => $oid,
  );
  $form['delta_override']['name'] = array(
    '#type' => 'hidden',
    '#default_value' => $stored_data['delta_override']['name'],
  );
  $form['delta_override']['theme'] = array(
    '#type' => 'hidden',
    '#default_value' => $stored_data['delta_override']['theme'],
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Delete Override'),
    '#prefix' => t('<h3>Are you sure you want to delete the override named <em>' . $stored_data['delta_override']['name'] . '</em>?</h3>'),
  );
  return $form;
}