You are here

public function Cleantalk::delCleantalkComment in Anti Spam by CleanTalk 7

Same name and namespace in other branches
  1. 7.5 src/Cleantalk.php \Cleantalk::delCleantalkComment()
  2. 7.2 cleantalk.module \Cleantalk::delCleantalkComment()
  3. 7.4 src/Cleantalk.php \Cleantalk::delCleantalkComment()

Function deletes the comment Cleantalk.ru

Parameters

$message:

Return value

mixed

File

./cleantalk.module, line 866
Main CleanTalk integration module functions.

Class

Cleantalk
Cleantalk class create request

Code

public function delCleantalkComment($message) {
  $message = preg_replace('/\\n\\n\\*\\*\\*.+\\*\\*\\*$/', '', $message);

  // DLE sign cut
  $message = preg_replace('/<br\\s?\\/><br\\s?\\/>\\*\\*\\*.+\\*\\*\\*$/', '', $message);
  $message = preg_replace('/\\<br.*\\>[\\n]{0,1}\\<br.*\\>[\\n]{0,1}\\*\\*\\*.+\\*\\*\\*$/', '', $message);
  return $message;
}