You are here

function token_custom_delete_form_submit in Custom Tokens 6

Same name and namespace in other branches
  1. 5 token_custom.module \token_custom_delete_form_submit()

File

./token_custom.module, line 282
The Token Custom module.

Code

function token_custom_delete_form_submit($form, &$form_state) {
  $token_custom = token_custom_load($form_state['values']['token_custom_tkid']);
  db_query("DELETE FROM {token_custom} WHERE tkid = %d", $form_state['values']['token_custom_tkid']);
  drupal_set_message(t('%id deleted.', array(
    '%id' => $token_custom->id,
  )));
  $form_state['redirect'] = "admin/build/tokens";
}