1 filter_test.module | filter_test_replace($text, $filter, $format, $langcode, $cache, $cache_id) |
Implements callback_filter_process().
Process handler for filter_test_replace filter.
Replaces all text with filter and text format information.
File
- core/
modules/ simpletest/ tests/ filter_test.module, line 52 - Test module for Filter module hooks and functions not used in core.
Code
function filter_test_replace($text, $filter, $format, $langcode, $cache, $cache_id) {
$text = array();
$text[] = 'Filter: ' . $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("<br />\n", $text);
}