function _restrict_abusive_words_exists_words in Restrict Abusive Words 8
Same name and namespace in other branches
- 7.2 restrict_abusive_words.module \_restrict_abusive_words_exists_words()
- 7 restrict_abusive_words.module \_restrict_abusive_words_exists_words()
Check the word or phrase is exists in the abusive word list.
1 call to _restrict_abusive_words_exists_words()
- AddWordsForm::validateForm in src/
Form/ AddWordsForm.php - Form validation handler.
File
- ./
restrict_abusive_words.module, line 21
Code
function _restrict_abusive_words_exists_words($words, $string) {
if (!empty($string) && isset($words)) {
foreach ($words as $word) {
if ($string == $word) {
return $word;
}
}
}
return FALSE;
}