You are here

function filter_admin_order in Drupal 5

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

Menu callback; display form for ordering filters for a format.

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

File

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

Code

function filter_admin_order($format = NULL) {

  // Get list (with forced refresh)
  $filters = filter_list_format($format->format);
  $form['weights'] = array(
    '#tree' => TRUE,
  );
  foreach ($filters as $id => $filter) {
    $form['names'][$id] = array(
      '#value' => $filter->name,
    );
    $form['weights'][$id] = array(
      '#type' => 'weight',
      '#default_value' => $filter->weight,
    );
  }
  $form['format'] = array(
    '#type' => 'hidden',
    '#value' => $format->format,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
  );
  return $form;
}