public function Cleantalk::getCleantalkCommentHash in Anti Spam by CleanTalk 8.3
Function to get the message hash from Cleantalk.org comment
Parameters
$message:
Return value
null
File
- src/
lib/ Cleantalk/ Antispam/ Cleantalk.php, line 564
Class
- Cleantalk
- Cleantalk class create request
Namespace
Drupal\cleantalk\lib\Cleantalk\AntispamCode
public function getCleantalkCommentHash($message) {
$matches = array();
if (preg_match('/\\n\\n\\*\\*\\*.+([a-z0-9]{32}).+\\*\\*\\*$/', $message, $matches)) {
return $matches[1];
}
else {
if (preg_match('/\\<br.*\\>[\\n]{0,1}\\<br.*\\>[\\n]{0,1}\\*\\*\\*.+([a-z0-9]{32}).+\\*\\*\\*$/', $message, $matches)) {
return $matches[1];
}
}
return NULL;
}