From 545c95e14b61b5b6baf43651bf89a48c5276a354 Mon Sep 17 00:00:00 2001 From: westi Date: Wed, 29 Oct 2008 22:25:06 +0000 Subject: [PATCH] Make all comments classy. Fixes #8006 props filosofo. git-svn-id: http://svn.automattic.com/wordpress/trunk@9405 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 5421649d3a..66a9ada93e 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -226,6 +226,7 @@ function comment_author_url_link( $linktext = '', $before = '', $after = '' ) { * @param string|array $class One or more classes to add to the class list * @param int $comment_id An optional comment ID * @param int $post_id An optional post ID + * @param bool $echo Whether comment_class should echo or return */ function comment_class( $class = '', $comment_id = null, $post_id = null, $echo = true ) { // Separates classes with a single space, collates classes for comment DIV @@ -254,7 +255,7 @@ function get_comment_class( $class = '', $comment_id = null, $post_id = null ) { $classes = array(); // Get the comment type (comment, trackback), - $classes[] = $comment->comment_type; + $classes[] = ( empty( $comment->comment_type ) ) ? 'comment' : $comment->comment_type; // If the comment author has an id (registered), then print the log in name if ( $comment->user_id > 0 && $user = get_userdata($comment->user_id) ) {