filter_example.module

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.

Functions & methods

NameDescription
filter_example_filter_infoImplements hook_filter_info().
filter_example_menuImplements hook_menu().
_filter_example_filter_foo_processFoo filter process callback
_filter_example_filter_foo_settingsSettings callback for foo filter
_filter_example_filter_foo_tipsFilter tips callback for foo filter.
_filter_example_filter_time_prepare
_filter_example_filter_time_process
_filter_example_filter_time_tipsFilter tips callback for time filter.
_filter_example_informationSimply returns a little bit of information about the example.