-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions-comments.php
53 lines (39 loc) · 1.61 KB
/
functions-comments.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
<?php
function mtf_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case '' :
?>
<li <?php comment_class('clearfix'); ?> id="li-comment-<?php comment_ID(); ?>">
<div id="comment-<?php comment_ID(); ?>" data-authorname="<?php echo comment_author(); ?>" class="row">
<div class="comment-info">
<?php echo get_avatar( $comment, 50 ); ?>
</div><!-- .comment-info -->
<div class="comment-body">
<div class="comment-header vcard">
<b class="fn comment-author"><?php comment_author_link(); ?></b> <span class="said"><?php echo _e( 'said' ); ?></span>
<a class="comment-date" href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
<?php echo human_time_diff( get_comment_time('U'), current_time('timestamp') ) . ' ago'; ?>
</a>
<?php edit_comment_link( '(Edit)' ); ?>
</div><!-- .comment_author .vcard -->
<?php if ( $comment->comment_approved == '0' ) : ?>
<div class="comment_meta commentmetadata">
<p class="info"><em><?php _e( 'Your comment is awaiting moderation.' ); ?></em></p>
</div><!-- .comment-meta .commentmetadata -->
<?php endif; ?>
<?php comment_text(); ?>
<div class="reply"><?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?></div><!-- .reply -->
</div>
</div><!-- #comment-## -->
<?php
break;
case 'pingback' :
case 'trackback' :
?>
<li class="post pingback">
<p>Pingback: <?php comment_author_link(); ?><?php edit_comment_link( '(Edit)', ' ' ); ?></p>
<?php
break;
endswitch;
}