public function k2_comment_class( $comment, $post ) { static $toggle = 0; $classes = array(); if ( $comment->status == Comment::STATUS_UNAPPROVED ) { $classes[] = 'comment-unapproved'; } else { $classes[] = $toggle++ %2 == 0 ? 'even' : 'odd'; } // check to see if the comment is by a registered user if ( $u = User::get( $comment->email ) ) { $classes[] = 'byuser'; $classes[] = 'comment-author-' . Utils::slugify( $u->displayname ); } if( $comment->email == $post->author->email ) { $classes[] = 'bypostauthor'; } return 'class="'.implode(' ', $classes) . '"'; }