Hi, I am creating a "Reward" plugin which give point to the user for each comment, post and images posted.
I first created a plugin which count the comments and posts from a user and assign points with an equation but it works only on a blog basis and I want it to work sitewide (and when the author of the post where the user posted a comment delete the post, it deletes the points to so...not a solution).
So I decided to add a post_num and comment_num meta_value in the usermeta.It is ok it work but my only problem is that I can't find how to increase the meta_value with "1" for each post or comment.
if ( $comment_approved == 1)
wp_update_comment_count($comment_post_ID);
update_usermeta($user_id,'comment_count','here i don't know');
Any idea ?
Thank you