1 filter_example.module _filter_example_filter_foo_process($text, $filter, $format)

Foo filter process callback.

The actual filtering is performed here. The supplied text should be returned, once any necessary substitutions have taken place. The example just replaces foo with our custom defined string in the settings page.

Related topics

File

modules/examples/filter_example/filter_example.module, line 131
Hook implementations for the Filter Example module.

Code

function _filter_example_filter_foo_process($text, $filter, $format) {
  $replacement = isset($filter->settings['filter_example_foo']) ? $filter->settings['filter_example_foo'] : 'bar';
  return str_replace('foo', $replacement, $text);
}