FALSE while developing, but be sure to remove it * again if it's not needed. You can clear the cache by running the SQL query * 'DELETE * FROM cache_filter'; * * @return * An array of filter items. Each filter item has a unique name, prefixed * with the name of the module that provides it. The item is an associative * array that may contain the following key-value pairs: * - 'title': Required. The title of the filter. * - 'description': Short description of what this filter does. * - 'prepare callback': The callback function to call in the 'prepare' step * of the filtering. * - 'process callback': Required. The callback function to call in the * 'process' step of the filtering. * - 'settings callback': The callback function that provides form controls * for the filter's settings. These settings are stored with variable_set() * when the form is submitted. Remember to use the $format identifier in the * variable and control names to store settings per text format (e.g. * 'mymodule_setting_$format'). * - 'tips callback': The callback function that provide tips for using * filters. A module's tips should be informative and to the point. Short * tips are preferably one-liners. * - 'cache': Specify if the filter result can be cached. TRUE by default. * * For a detailed usage example, see filter_example.module. For an example of * using multiple filters in one module, see filter_filter_info(). */ function hook_filter_info() { $filters['filter_html'] = array( 'title' => t('Limit allowed HTML tags'), 'description' => t('Allows you to restrict the HTML tags the user can use. It will also remove harmful content such as JavaScript events, JavaScript URLs and CSS styles from those tags that are not removed.'), 'process callback' => '_filter_html', 'settings callback' => '_filter_html_settings', 'tips callback' => '_filter_html_tips', ); $filters['filter_autop'] = array( 'title' => t('Convert line breaks'), 'description' => t('Converts line breaks into HTML (i.e. <br> and <p>) tags.'), 'process callback' => '_filter_autop', 'tips callback' => '_filter_autop_tips', ); return $filters; } /** * Perform alterations on filter definitions. * * @param $info * Array of information on filters exposed by hook_filter_info() * implementations. */ function hook_filter_info_alter(&$info) { // Replace the PHP evaluator process callback with an improved // PHP evaluator provided by a module. $info['php_code']['process callback'] = 'my_module_php_evaluator'; } /** * @} End of "addtogroup hooks". */