get_comment_type
get_comment_type is a filter on the get_comment_type() function, which returns "trackback", "pingback" or a blank string (for regular comments).
Context:
File: wp-includes/comment-functions.php
function get_comment_type() {
global $comment;
if ( '' == $comment->comment_type )
$comment->comment_type = 'comment';
return apply_filters('get_comment_type', $comment->comment_type);
}
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('get_comment_type', '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.