filter_admin_order

Definition

filter_admin_order($format = NULL)
modules/filter.module, line 537

Description

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

Code

<?php
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 drupal_get_form('filter_admin_order', $form);
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.