How to check if commenter is the_author?

Not sure what you are meaning to do but, if you take a look at the get_comment_class() function that is responsible for generating the .bypostauthor class you can see how it determines if the commenter is the author

if ( $post = get_post($post_id) ) {
            if ( $comment->user_id === $post->post_author )
                $classes[] = 'bypostauthor';
        }

You should be able to use this to do something similar.

Leave a Comment