You are here

function filter_test_replace in Drupal 7

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
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->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);
}