You are here

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

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

Function adds to the post comment Cleantalk.ru

Parameters

$message:

$comment:

Return value

string

File

src/Cleantalk.php, line 588

Class

Cleantalk
Cleantalk Base class

Code

public function addCleantalkComment($message, $comment) {
  $comment = preg_match('/\\*\\*\\*(.+)\\*\\*\\*/', $comment, $matches) ? $comment : '*** ' . $comment . ' ***';
  return $message . "\n\n" . $comment;
}