function hook_filter_info_alter

Same name and namespace in other branches
  1. 7.x modules/filter/filter.api.php \hook_filter_info_alter()
  2. 9 core/modules/filter/filter.api.php \hook_filter_info_alter()
  3. 8.9.x core/modules/filter/filter.api.php \hook_filter_info_alter()
  4. 10 core/modules/filter/filter.api.php \hook_filter_info_alter()

Perform alterations on filter definitions.

Parameters

array $info: Array of information on filters exposed by filter plugins.

Related topics

1 invocation of hook_filter_info_alter()
FilterPluginManager::__construct in core/modules/filter/src/FilterPluginManager.php
Constructs a FilterPluginManager object.

File

core/modules/filter/filter.api.php, line 19

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.