Limit comments per user per post
I think that hook pre_comment_approved should be perfect in this case. Something like this should do the job: function my_pre_comment_approved($approved, $commentdata) { // you can return 0, 1 or ‘spam’ if ( $commentdata[‘user_ID’] ) { $args = array( ‘user_id’ => $commentdata[‘user_ID’], ‘post_id’ => $commentdata[‘comment_post_ID’] ); $usercomment = get_comments( $args ); if ( 1 <= count( … Read more