function customfilter_filter_delete in Custom filter 7.2
Same name and namespace in other branches
- 5 customfilter.module \customfilter_filter_delete()
- 6 customfilter.admin.inc \customfilter_filter_delete()
- 7 customfilter.module \customfilter_filter_delete()
Return the filter delete form.
Create the form used in admin/config/content/customfilter/%/delete
1 string reference to 'customfilter_filter_delete'
- customfilter_menu in ./
customfilter.module - Implements hook_menu().
File
- ./
customfilter.module, line 789 - Allows the users with the right permission to define custom filters.
Code
function customfilter_filter_delete($variables, $form_state, $fid) {
$filters = _customfilter_get_filters();
$form = array();
_customfilter_breadcrumb();
if (!$fid || !isset($filters[$fid])) {
drupal_set_message(t('The filter data have not been found, or the menu callback received a wrong parameter.'), 'error');
watchdog('customfilter', 'The filter data have not been found, or the menu callback received a wrong parameter.', NULL, WATCHDOG_ERROR);
return $form;
}
$form['#fid'] = $fid;
return confirm_form($form, t('Are you sure you want to delete %name?', array(
'%name' => $filters[$fid]['name'],
)), 'admin/config/content/customfilter', NULL, t('Delete'));
}