'Uncacheable filter', 'description' => 'Does nothing, but makes a text format uncacheable.', 'cache' => FALSE, ); $filters['filter_test_replace'] = array( 'title' => 'Testing filter', 'description' => 'Replaces all content with filter and text format information.', 'process callback' => 'filter_test_replace', ); return $filters; } /** * Process handler for filter_test_replace filter. * * Replaces all text with filter and text format information. */ function filter_test_replace($text, $filter, $format, $langcode, $cache, $cache_id) { $text = array(); $text[] = 'Filter: ' . $filter->title . ' (' . $filter->name . ')'; $text[] = 'Format: ' . $format->name . ' (' . $format->format . ')'; $text[] = 'Language: ' . $langcode; $text[] = 'Cache: ' . ($cache ? 'Enabled' : 'Disabled'); if ($cache_id) { $text[] = 'Cache ID: ' . $cache_id; } return implode("
\n", $text); }