1

I don't know why, but it seems like the comment karma column is not used very much in plugins or otherwise. What would I need to do to hook into adding points to the comments karma column when a logged in user saves a comment?

1

1 Answer 1

1

The comment_karma field in the wp_comments table is something that has been in present in WordPress for a long time, but never utilized by the WordPress core itself.

You can update it the same way any other comment field is updated, using update_comment():

$comment_data = array();
$comment_data['comment_ID'] = 1;
$comment_data['comment_karma'] = 123;
wp_update_comment( $comment_data );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.