function _restrict_abusive_words_exists_words in Restrict Abusive Words 7
Same name and namespace in other branches
- 8 restrict_abusive_words.module \_restrict_abusive_words_exists_words()
- 7.2 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()
- restrict_abusive_words_admin_add_form_validate in ./
restrict_abusive_words.admin.inc - Validate handler to add abusive words.
File
- ./
restrict_abusive_words.module, line 439 - Restrict Abusive Words module.
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;
}