You are here

function htmlpurifier_admin_settings_submit in HTML Purifier 7

Same name and namespace in other branches
  1. 7.2 htmlpurifier.admin.inc \htmlpurifier_admin_settings_submit()

Submit handler for the HTML Purifier settings form.

1 string reference to 'htmlpurifier_admin_settings_submit'
htmlpurifier_admin_settings in ./htmlpurifier.admin.inc
Generate a form for configuring overall HTML Purifier settings.

File

./htmlpurifier.admin.inc, line 32
Administrative page callbacks for the HTML Purifier module.

Code

function htmlpurifier_admin_settings_submit($form, &$form_state) {

  // Resave all text formats so that the new cache settings for each format are
  // recorded.
  // TODO: There should be a better way to do this.
  foreach (filter_formats() as $format) {
    $format->filters = filter_list_format($format->format);
    foreach ($format->filters as &$filter) {
      $filter = (array) $filter;
    }
    filter_format_save($format);
  }
}