public function SpamspanTrait::replaceEmailAddressesWithOptions in SpamSpan filter 8
Same name and namespace in other branches
- 8.2 src/SpamspanTrait.php \Drupal\spamspan\SpamspanTrait::replaceEmailAddressesWithOptions()
1 call to SpamspanTrait::replaceEmailAddressesWithOptions()
- FilterSpamspan::processAsText in src/
Plugin/ Filter/ FilterSpamspan.php - Replaces email addresses using regex.
File
- src/
SpamspanTrait.php, line 47
Class
- SpamspanTrait
- Trait SpamspanTrait.
Namespace
Drupal\spamspanCode
public function replaceEmailAddressesWithOptions($text, &$altered = NULL) {
$callback = function ($matches) use (&$altered) {
$altered = TRUE;
return $this
->callbackEmailAddressesWithOptions($matches);
};
return preg_replace_callback(SpamspanInterface::PATTERN_EMAIL_WITH_OPTIONS, $callback, $text);
}