Example: Filter

Defining a filter in a module. (drupal 6)

To show all the capabilities of the filter system, we will define two filters in this module. One will substitute the string "foo" with an administratively- defined replacement string. The other will find a custom XML tag, <time />, and replace it by the current time.

This example is part of the Examples for Developers Project which you can download and experiment with here: http://drupal.org/project/examples

Functions & methods

NameDescription
filter_example_filterImplementation of hook_filter().
filter_example_filter_tipsImplementation of hook_filter_tips().

examples/filter_example/filter_example.module, line 15