Repository navigation
Expand file tree
/
Copy pathcomments.php
More file actions
81 lines (69 loc) · 2.89 KB
/
Copy pathcomments.php
File metadata and controls
81 lines (69 loc) · 2.89 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/**
* Update comments layout
*
* @return string Empty string
*/
function eman_comment( $comment, $args, $depth )
{
$GLOBALS['comment'] = $comment; ?>
<div id="comment-<?php comment_ID(); ?>" <?php comment_class('cf'); ?>>
<article class="cf">
<header class="comment-author vcard">
<?php #echo get_avatar($comment,$size='32',$default=get_template_directory_uri().'/assets/img/mysteryman.jpg' ); ?>
<?php #printf( '<cite class="fn">%1$s</cite> %2$s', get_comment_author_link(), edit_comment_link( '(Edit)',' ','') ) ?>
<?php /** / ?><time datetime="<?php echo comment_time('Y-m-j'); ?>"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php comment_time( 'F jS, Y' ); ?> </a></time><?php /**/ ?>
<cite class="fn"><span class="author"><?php echo get_comment_author_link(); ?></span>, <?php comment_time( 'F jS, Y' ); ?></cite>
</header>
<?php if ($comment->comment_approved == '0') : ?>
<div class="alert alert-info">
<p>Your comment is awaiting moderation.</p>
</div>
<?php endif; ?>
<section class="comment_content cf">
<?php comment_text() ?>
</section>
<?php comment_reply_link( array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']) ) ) ?>
</article>
<?php // </li> is added by WordPress automatically
}
/**
* List comments
*/
// don't load it if you can't comment
if ( post_password_required() ) { return; } ?>
<section class="comments cf">
<?php if ( have_comments() ) : ?>
<h3 id="comments-title"><?php comments_number( '<span>No</span> Comments', '<span>1</span> Comment', '<span>%</span> Comments' );?></h3>
<div class="commentlist">
<?php wp_list_comments( array(
'style' => 'div',
'short_ping' => true,
'avatar_size' => 40,
'callback' => 'eman_comment',
'type' => 'all',
'reply_text' => 'Reply',
'page' => '',
'per_page' => '',
'reverse_top_level' => null,
'reverse_children' => ''
) ); ?>
</div>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav class="navigation comment-navigation" role="navigation">
<div class="comment-nav-prev"><?php previous_comments_link('← Previous Comments'); ?></div>
<div class="comment-nav-next"><?php next_comments_link('More Comments →'); ?></div>
</nav>
<?php endif; ?>
<?php if ( ! comments_open() ) : ?>
<p class="no-comments">Comments are closed.</p>
<?php endif; ?>
<?php endif;
comment_form( array(
'title_reply' => "Leave a Reply",
'comment_notes_before' => "",
'comment_notes_after' => "",
'label_submit' => "Post Comment",
'comment_field' => '<p class="comment-form-comment"><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" placeholder="Leave a Comment"></textarea></p>'
) ); ?>
</section>