You are here

function better_formats_element_info_alter in Better Formats 7

Same name and namespace in other branches
  1. 8 better_formats.module \better_formats_element_info_alter()

Implements of hook_element_info_alter().

File

./better_formats.module, line 67
Enhances Drupal's core text format settings.

Code

function better_formats_element_info_alter(&$type) {

  // Our process callback must run immediately after filter_process_format().
  $filter_process_format_location = array_search('filter_process_format', $type['text_format']['#process']);
  $replacement = array(
    'filter_process_format',
    'better_formats_filter_process_format',
  );
  array_splice($type['text_format']['#process'], $filter_process_format_location, 1, $replacement);
}