function token_custom_delete_confirm_form_submit in Custom Tokens 7.2
Same name and namespace in other branches
- 7 token_custom.admin.inc \token_custom_delete_confirm_form_submit()
Delete token form submit callback.
Parameters
array $form: The form array.
array $form_state: The form state array.
File
- ./
token_custom.admin.inc, line 414 - Page callbacks and admin forms of the token_custom module.
Code
function token_custom_delete_confirm_form_submit($form, &$form_state) {
if (token_custom_delete($form_state['token_custom']['token']->machine_name)) {
drupal_set_message(t('Token <em>@machine_name</em> deleted.', array(
'@machine_name' => $form_state['token_custom']['token']->machine_name,
)));
}
else {
drupal_set_message(t('There was a problem deleting token <em>@machine_name</em>. Please contact the site administrator.', array(
'@machine_name' => $form_state['token_custom']['token']->machine_name,
)), 'error');
}
$form_state['redirect'] = 'admin/structure/token-custom';
}