You are here

function editor_filter_info_alter in Editor 7

Implements hook_filter_info_alter().

File

includes/editor.filters.inc, line 232
Filter hook implementations and callbacks.

Code

function editor_filter_info_alter(&$info) {

  // Add an allowed HTML callback to the core 'filter_html' filter which enables
  // it to specify a whitelist of approved HTML tags/attributes.
  if (isset($info['filter_html'])) {
    $info['filter_html']['allowed html callback'] = '_editor_html_allowed_html';
    $info['filter_html']['settings callback'] = '_editor_html_settings';
  }

  // Add a JS settings callback to the core 'filter_url' filter which makes its
  // URL length restrictions available as JS settings.
  if (isset($info['filter_url'])) {
    $info['filter_url']['js settings callback'] = '_editor_url_js_settings';
  }
}