Version 1.9 (checked in on 2010/09/26 at 13:13:25 by rfay)
This is an example outlining how a module can be used to define a filter to be run on user-submitted content before it is output to the browser.
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.
| Name | Description |
|---|---|
| filter_example_filter_info | Implements hook_filter_info(). |
| filter_example_menu | Implements hook_menu(). |
| _filter_example_filter_foo_process | Foo filter process callback |
| _filter_example_filter_foo_settings | Settings callback for foo filter |
| _filter_example_filter_foo_tips | Filter tips callback for foo filter. |
| _filter_example_filter_time_prepare | |
| _filter_example_filter_time_process | |
| _filter_example_filter_time_tips | Filter tips callback for time filter. |
| _filter_example_information | Simply returns a little bit of information about the example. |