function filter_test_replace
Implements callback_filter_process().
Process handler for filter_test_replace filter.
Replaces all text with filter and text format information.
1 string reference to 'filter_test_replace'
- filter_test_filter_info in modules/
simpletest/ tests/ filter_test.module - Implements hook_filter_info().
File
-
modules/
simpletest/ tests/ filter_test.module, line 53
Code
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("<br />\n", $text);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.