You are here

function _profanity_filter in Profanity 7

1 string reference to '_profanity_filter'
profanity_filter_info in ./profanity.module
Implements hook_filter_info().

File

./profanity.module, line 318
Main {profanity} file.

Code

function _profanity_filter($text, $filter, $format, $langcode, $cache, $cache_id) {
  if (empty($filter->settings['lists'])) {
    return $text;
  }

  // Run through each list and apply to the text.
  foreach ($filter->settings['lists'] as $list_name) {
    $text = profanity_list_execute($list_name, $text);
  }
  return $text;
}