You are here

function filter_admin_configure in Drupal 5

Same name and namespace in other branches
  1. 4 modules/filter.module \filter_admin_configure()
  2. 6 modules/filter/filter.admin.inc \filter_admin_configure()

Menu callback; display settings defined by filters.

1 string reference to 'filter_admin_configure'
filter_menu in modules/filter/filter.module
Implementation of hook_menu().

File

modules/filter/filter.module, line 592
Framework for handling filtering of content.

Code

function filter_admin_configure() {
  $format = arg(3);
  $list = filter_list_format($format);
  $form = array();
  foreach ($list as $filter) {
    $form_module = module_invoke($filter->module, 'filter', 'settings', $filter->delta, $format);
    if (isset($form_module) && is_array($form_module)) {
      $form = array_merge($form, $form_module);
    }
  }
  if (!empty($form)) {
    $form = system_settings_form($form);
    $form['format'] = array(
      '#type' => 'hidden',
      '#value' => $format,
    );
    $form['#submit']['system_settings_form_submit'] = array();
    $form['#submit']['filter_admin_configure_submit'] = array();
  }
  else {
    $form['error'] = array(
      '#value' => t('No settings are available.'),
    );
  }
  return $form;
}