'; 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 { echo ''; } if($url == true && $url != 'http://') echo ''; } /** * 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; ?>

  • | __('Reply','comicpress'), 'login_text' => __('Log in to reply.','comicpress'), 'depth' => $depth, 'max_depth' => $max_depth, 'before' => '| ', 'after' => '' )); endif; ?> '.__('Edit','comicpress').'',' | ',''); ?> comment_approved == '0') : ?> Your comment is awaiting moderation.','comicpress'); ?>

    '; } /** * Sets a class for each comment * Sets alt, odd/even, and author/user classes * Adds author, user, and reader classes * * @since 0.2 */ function comicpress_comment_class() { global $comment; static $comment_alt; $classes = array(); if(function_exists('get_comment_class')) $classes = get_comment_class(); $classes[] = get_comment_type();; /* * User classes */ if($comment->user_id > 0 && $user = get_userdata($comment->user_id)) : $classes[] = 'user user-' . $user->user_nicename; if($post = get_post($post_id)) : if($comment->user_id === $post->post_author) $classes[] = 'author author-' . $user->user_nicename; endif; else : $classes[] = 'reader'; endif; /* * Alt classes */ if($comment_alt++ % 2) : $classes[] = 'even'; $classes[] = 'alt'; else : $classes[] = 'odd'; endif; /* * http://microid.org */ $email = get_comment_author_email(); $url = get_comment_author_url(); if(!empty($email) && !empty($url)) { $microid = 'microid-mailto+http:sha1:' . sha1(sha1('mailto:'.$email).sha1($url)); $classes[] = $microid; } $classes = join(' ', $classes); echo $classes; } /** * 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; } ?>