Permalink
Browse files

add comment template

  • Loading branch information...
1 parent b6e4e92 commit 37e5423b77cfe5ffefa968a9fd9d8227a28da23b @leoj3n leoj3n committed Mar 22, 2013
Showing with 16 additions and 15 deletions.
  1. +2 −15 lib/comments.php
  2. +14 −0 templates/comment.php
View
@@ -28,21 +28,8 @@ function start_el(&$output, $comment, $depth, $args, $id = 0) {
extract($args, EXTR_SKIP); ?>
- <li id="comment-<?php comment_ID(); ?>" <?php comment_class('media comment-' . get_comment_ID()); ?>>
- <?php echo get_avatar($comment, $size = '64'); ?>
- <div class="media-body">
- <h4 class="media-heading"><?php echo get_comment_author_link(); ?></h4>
- <time datetime="<?php echo comment_date('c'); ?>"><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?>"><?php printf(__('%1$s', 'roots'), get_comment_date(), get_comment_time()); ?></a></time>
- <?php edit_comment_link(__('(Edit)', 'roots'), '', ''); ?>
-
- <?php if ($comment->comment_approved == '0') : ?>
- <div class="alert">
- <?php _e('Your comment is awaiting moderation.', 'roots'); ?>
- </div>
- <?php endif; ?>
-
- <?php comment_text(); ?>
- <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
+ <li <?php comment_class('media comment-' . get_comment_ID()); ?>>
+ <?php include(locate_template('templates/comment.php')); ?>
<?php
}
View
@@ -0,0 +1,14 @@
+<?php echo get_avatar($comment, $size = '64'); ?>
+<div class="media-body">
+ <h4 class="media-heading"><?php echo get_comment_author_link(); ?></h4>
+ <time datetime="<?php echo comment_date('c'); ?>"><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?>"><?php printf(__('%1$s', 'roots'), get_comment_date(), get_comment_time()); ?></a></time>
+ <?php edit_comment_link(__('(Edit)', 'roots'), '', ''); ?>
+
+ <?php if ($comment->comment_approved == '0') : ?>
+ <div class="alert">
+ <?php _e('Your comment is awaiting moderation.', 'roots'); ?>
+ </div>
+ <?php endif; ?>
+
+ <?php comment_text(); ?>
+ <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?>

0 comments on commit 37e5423

Please sign in to comment.