function customfilter_settings in Custom filter 7
Same name and namespace in other branches
- 5 customfilter.module \customfilter_settings()
- 6 customfilter.admin.inc \customfilter_settings()
- 7.2 customfilter.module \customfilter_settings()
Module settings page.
1 string reference to 'customfilter_settings'
- customfilter_menu in ./
customfilter.module - Implements hook_menu().
File
- ./
customfilter.module, line 1335 - Allows the users with the right permission to define custom filters.
Code
function customfilter_settings() {
$rows = array();
foreach (_customfilter_get_filters() as $id => $filter) {
$row = array();
$row[] = l($filter['name'], "admin/config/content/customfilter/{$id}");
$row[] = l(t('edit'), "admin/config/content/customfilter/{$id}/edit");
$row[] = l(t('delete'), "admin/config/content/customfilter/{$id}/delete");
$rows[] = $row;
}
if (!count($rows)) {
$rows[] = array(
array(
'data' => t('No filters have been defined.'),
'colspan' => 3,
),
);
}
$header[] = t('Name');
$header[] = array(
'data' => t('Operations'),
'colspan' => '2',
);
$variables["rows"] = $rows;
$variables["header"] = $header;
return theme('table', $variables);
}