function filter_admin_overview_submit

Form submission handler for filter_admin_overview().

File

drupal/core/modules/filter/filter.admin.inc, line 82
Administrative page callbacks for the Filter module.

Code

function filter_admin_overview_submit($form, &$form_state) {
  $filter_formats = filter_formats();
  foreach ($form_state['values']['formats'] as $id => $data) {

    // Only update if this is a form element with weight.
    if (is_array($data) && isset($data['weight'])) {
      $filter_formats[$id]
        ->set('weight', $data['weight']);
      $filter_formats[$id]
        ->save();
    }
  }
  filter_formats_reset();
  drupal_set_message(t('The text format ordering has been saved.'));
}