You are here

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

Same name and namespace in other branches
  1. 7 cleantalk.module \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

src/Cleantalk.php, line 598

Class

Cleantalk
Cleantalk Base class

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;
}