1 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

File

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

Code

function hook_filter_info_alter(&$info) {
  // Replace the image caption process callback with an improved custom version.
  $info['filter_image_caption']['process callback'] = 'my_module_custom_caption';

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