1 filter.admin.inc filter_admin_overview_submit($form, &$form_state)

Form submission handler for filter_admin_overview().

File

core/modules/filter/filter.admin.inc, line 117
Admin page callbacks for the Filter module.

Code

function filter_admin_overview_submit($form, &$form_state) {
  $formats = filter_formats(NULL, TRUE);
  foreach ($form_state['values']['formats'] as $id => $data) {
    if (is_array($data) && isset($data['weight']) && $data['weight'] != $formats[$id]->weight) {
      // Update the weight of this filter.
      $formats[$id]->weight = $data['weight'];
      filter_format_save($formats[$id]);
    }
  }
  filter_formats_reset();
  backdrop_set_message(t('The text format order has been saved.'));
}