'; if(function_exists('get_avatar') && $comment_type != 'pingback' && $comment_type != 'trackback' ) { echo str_replace("alt='", "alt='".wp_specialchars(get_comment_author(), 1)."' title='".wp_specialchars(get_comment_author(), 1), get_avatar(get_comment_author_email(), 64)); } else { if ($comment_type == 'pingback' || $comment_type == 'trackback') { echo ''; } else { echo ''; } } if($url == true && $url != 'http://') echo ''; } /** * Properly displays comment author name/link * bbPress and other external systems sometimes don't set a display name for registrations * WP has problems if no display name is set * WP gives registered users URL of 'http://' if none is set * * @since 0.2.2 */ function comicpress_comment_author() { global $comment; $author = get_comment_author(); $url = get_comment_author_url(); /* * Registered members w/o URL defaults to 'http://' */ if($url == 'http://') $url = false; /* * Registered through bbPress sometimes leaves no display name * Bug with bbPress 0.9 series and WP 2.5 (no later testing) * 'Anonymous' should be localized according to WP, not the theme */ if($comment->user_id > 0) : $user = get_userdata($comment->user_id); if($user->display_name) $author = $user->display_name; elseif($user->user_nickname) $author = $user->nickname; elseif($user->user_nicename) $author = $user->user_nicename; else $author = $user->user_login; endif; /* * Display link and cite if URL is set * Also properly cites trackbacks/pingbacks */ if($url) : $output = ''; $output .= '' . $author . ''; $output .= ''; else : $output = ''; $output .= $author; $output .= ''; endif; echo $output; } /** * Displays individual comments * Uses the callback parameter for wp_list_comments * Overwrites the default display of comments * * @since 0.2.3 * * @param $comment The comment variable * @param $args Array of arguments passed from wp_list_comments * @param $depth What level the particular comment is */ function comicpress_comments_callback($comment, $args, $depth) { $GLOBALS['comment'] = $comment; $GLOBALS['comment_depth'] = $depth; ?>