You are here

function _htmlpurifier_config_hack in HTML Purifier 6

Same name and namespace in other branches
  1. 6.2 htmlpurifier.module \_htmlpurifier_config_hack()
  2. 7 htmlpurifier.module \_htmlpurifier_config_hack()

Fills out the form state with extra post data originating from the HTML Purifier configuration form. This is an #after_build hook function.

@warning If someone ever gets the smart idea of changing the parameters to this function, I'm SOL! ;-)

1 string reference to '_htmlpurifier_config_hack'
_htmlpurifier_settings in ./htmlpurifier.module
Generates a settings form for configuring HTML Purifier.

File

./htmlpurifier.module, line 332
Implements HTML Purifier as a Drupal filter.

Code

function _htmlpurifier_config_hack($form_element, &$form_state) {
  $key = $form_element['#parents'][0];
  if (!empty($form_element['#post']) && isset($form_element['#post'][$key])) {
    $form_state['values'][$key] = $form_element['#post'][$key];
  }
  return $form_element;
}