comment_author
comment_author is a filter on the output of the comment_author() function, which echoes the name of the author of the current comment in the comments loop.
Note that get_comment_author also filters this output as it passes through the get_comment_author() function, so that hook may be better suited for your use.
Context:
File: comment-functions.php
function get_comment_author() {
global $comment;
if ( empty($comment->comment_author) )
$author = 'Anonymous';
else
$author = $comment->comment_author;
return apply_filters('get_comment_author', $author);
}
function comment_author() {
$author = apply_filters('comment_author', get_comment_author() );
echo $author;
}
This hook is a filter which means that information is passed through it, and then used by WordPress. Your function needs to accept that information, and return it. Using add_filter('comment_author', 'your_function'); helps you to remember this distinction. When you are passing an ID, it is assumed that you will return the ID as it was given to you. With filters that pass strings or arrays, you may manipulate the information before passing it along.