Permalink
Browse files

Only apply liveblog-entry CSS class to liveblog comment types.

Don't stomp on others. Fixes #36.
  • Loading branch information...
1 parent 1d7244f commit c3dc8bd0ba953d6bb6a7479570ad1f4c9339a441 @mjangda mjangda committed Sep 21, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 liveblog.php
View
@@ -108,7 +108,7 @@ private static function add_actions() {
*/
private static function add_filters() {
add_filter( 'template_redirect', array( __CLASS__, 'handle_request' ) );
- add_filter( 'comment_class', array( __CLASS__, 'add_comment_class' ) );
+ add_filter( 'comment_class', array( __CLASS__, 'add_comment_class' ), 10, 3 );
}
/**
@@ -431,8 +431,9 @@ public function ajax_unknown() {
* @param array $classes
* @return string
*/
- public static function add_comment_class( $classes ) {
- $classes[] = 'liveblog-entry';
+ public static function add_comment_class( $classes, $class, $comment_id ) {
+ if ( self::key == get_comment_type( $comment_id ) )
+ $classes[] = 'liveblog-entry';
return $classes;
}

0 comments on commit c3dc8bd

Please sign in to comment.