1.20.x comment.module comment_save(Comment $comment)

Saves a new or updated comment.

Parameters

Comment $comment: A comment entity.

Return value

int: Either SAVED_NEW or SAVED_UPDATED depending on the operation performed.

File

modules/comment/comment.module, line 1588
Enables users to comment on published content.

Code

function comment_save(Comment $comment) {
  return $comment->save();
}