/** * Renders an individual comment. * * @param WP_Comment $comment * @param array $args * @param int $depth * * @return void */ public static function renderComment($comment, $args, $depth) { $side = get_current_user_id() == $comment->user_id ? 'right' : 'left'; ?> <li id="comment-<?php print esc_attr($comment->comment_ID); ?> " <?php comment_class("media media-on-{$side}", $comment); ?> > <?php switch ($side) { case 'right': // Body first, then media. WP_Buoy_Chat_Room::renderCommentBody($comment, $args, $depth); WP_Buoy_Chat_Room::renderCommentMedia($side, $comment, $args, $depth); break; default: // Media first, then body. WP_Buoy_Chat_Room::renderCommentMedia($side, $comment, $args, $depth); WP_Buoy_Chat_Room::renderCommentBody($comment, $args, $depth); break; } ?> </li> <?php }