update sample code
change hook 'preprocess_comment' (wp-includes/comment.php) to 'pre_comment_on_post' (wp-comments-post.php)