You are here

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

Same name and namespace in other branches
  1. 7.5 src/Cleantalk.php \Cleantalk::addCleantalkComment()
  2. 7 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

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

Class

Cleantalk
Cleantalk class create request

Code

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