Automatically increase comment karma on comment save

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?

Related posts

1 comment

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

Comments are closed.