-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomment.php
executable file
·56 lines (51 loc) · 2.17 KB
/
comment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* The template for displaying a single comment or pingback.
*
* @package Zelda
*/
?>
<?php
global $post;
$comment_body_class = 'comment-body';
if ( $post ) {
if ( $comment->user_id === $post->post_author ) {
$comment_body_class = 'comment-body comment-by-post-author';
}
}
?>
<li id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>
<article id="div-comment-<?php comment_ID(); ?>" class="<?php echo $comment_body_class; ?>">
<header class="comment-meta">
<div class="comment-author vcard">
<?php if ( 'trackback' == $comment->comment_type || 'pingback' == $comment->comment_type ) { ?>
<div class="avatar"><i class="zelda-icon-link"></i></div>
<?php } else { ?>
<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>
<?php } ?>
<?php printf( '<b class="fn">%s</b>', get_comment_author_link() ); ?>
</div><!-- .comment-author -->
<?php if ( '0' == $comment->comment_approved ) : ?>
<p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'zelda' ); ?></p>
<?php endif; ?>
</header><!-- .comment-meta -->
<div class="comment-content">
<?php comment_text(); ?>
</div><!-- .comment-content -->
<footer class="comment-metadata">
<?php if ( get_comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ) ) : ?>
<span class="comment-reply">
<?php comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
</span>
<?php endif; ?>
<span class="comment-time">
<a href="<?php echo esc_url( get_comment_link( $comment->comment_ID, $args ) ); ?>">
<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>
</span>
<?php edit_comment_link( __( 'Edit', 'zelda' ), '<span class="edit-comment">', '</span>' ); ?>
</footer><!-- .comment-metadata -->
</article><!-- .comment-body -->
<!-- The <li> is closed by WordPress -->