- function end_el(&$output, $comment, $depth, $args) {
- if ( !empty($args['end-callback']) ) {
- call_user_func($args['end-callback'], $comment, $args, $depth);
- return;
- }
- if ( 'div' == $args['style'] )
- echo "</div>\n";
- else
- echo "</li>\n";
+ protected function html5_comment( $comment, $depth, $args ) {
+ $tag = ( 'div' === $args['style'] ) ? 'div' : 'li';
+?>
+ <<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>
+ <article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
+ <footer class="comment-meta">
+ <div class="comment-author vcard">
+ <?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>
+ <?php printf( __( '%s <span class="says">says:</span>' ), sprintf( '<b class="fn">%s</b>', get_comment_author_link() ) ); ?>
+ </div><!-- .comment-author -->
+
+ <div class="comment-metadata">
+ <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
+ <time datetime="<?php comment_time( 'c' ); ?>">
+ <?php printf( _x( '%1$s at %2$s', '1: date, 2: time' ), get_comment_date(), get_comment_time() ); ?>
+ </time>
+ </a>
+ <?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?>
+ </div><!-- .comment-metadata -->
+
+ <?php if ( '0' == $comment->comment_approved ) : ?>
+ <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.' ); ?></p>
+ <?php endif; ?>
+ </footer><!-- .comment-meta -->
+
+ <div class="comment-content">
+ <?php comment_text(); ?>
+ </div><!-- .comment-content -->
+
+ <div class="reply">
+ <?php comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
+ </div><!-- .reply -->
+ </article><!-- .comment-body -->
+<?php