dane-m
9/14/2013 - 5:23 AM

Get the number of comments posted by user with specified email address.

Get the number of comments posted by user with specified email address.

function count_user_comments($user_email) {
        $args = array(
                'author_email' => $user_email
        );
        $user_comments_count = get_comments( $args );
        return count($user_comments_count);
}