You are here

function filter_js_alter in Editor 7

Implements hook_js_alter() on behalf of filter.module.

Replace Filter's JS files with more fully-featured alternatives.

File

includes/editor.filter.inc, line 58
Declares hooks on behalf of filter.module.

Code

function filter_js_alter(&$javascript) {

  // Replace filter.js.
  $path = drupal_get_path('module', 'filter') . '/filter.js';
  if (isset($javascript[$path])) {
    $javascript[$path]['data'] = drupal_get_path('module', 'editor') . '/js/filter/filter.js';
    $javascript[$path]['type'] = 'file';
  }

  // Replace filter.admin.js.
  $path = drupal_get_path('module', 'filter') . '/filter.admin.js';
  if (isset($javascript[$path])) {
    $javascript[$path]['data'] = drupal_get_path('module', 'editor') . '/js/filter/filter.admin.js';
    $javascript[$path]['type'] = 'file';
  }
}