8.5.x filter.api.php hook_filter_info_alter(&$info)
8.0.x filter.api.php hook_filter_info_alter(&$info)
8.1.x filter.api.php hook_filter_info_alter(&$info)
8.2.x filter.api.php hook_filter_info_alter(&$info)
8.3.x filter.api.php hook_filter_info_alter(&$info)
8.4.x filter.api.php hook_filter_info_alter(&$info)
8.6.x filter.api.php hook_filter_info_alter(&$info)
7.x filter.api.php hook_filter_info_alter(&$info)

Perform alterations on filter definitions.

Parameters

$info: Array of information on filters exposed by hook_filter_info() implementations.

Related topics

1 invocation of hook_filter_info_alter()
filter_get_filters in modules/filter/filter.module
Returns a list of all filters provided by modules.

File

modules/filter/filter.api.php, line 109
Hooks provided by the Filter module.

Code

function hook_filter_info_alter(&$info) {

  // Replace the PHP evaluator process callback with an improved
  // PHP evaluator provided by a module.
  $info['php_code']['process callback'] = 'my_module_php_evaluator';

  // Alter the default settings of the URL filter provided by core.
  $info['filter_url']['default settings'] = array(
    'filter_url_length' => 100,
  );
}

Comments

lmeurs’s picture

After changing the cache setting for any text format, reload and save the format for the cache setting to take effect (ie. by opening your format at admin/config/content/formats/). Only at save time all filters are being checked for their cache settings, clearing of the cache tables does not help!