blob: add281d3cc5a9e2935a66d517a1b62cc21a2c786 (
plain)
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
|
<?php
/**
* The template for displaying Current Discussion on posts
*
* @package WordPress
* @subpackage Twenty_Nineteen
* @since 1.0.0
*/
/* Get data from current discussion on post. */
$discussion = twentynineteen_get_discussion_data();
$has_responses = $discussion->responses > 0;
if ( $has_responses ) {
/* translators: %1(X comments)$s */
$meta_label = sprintf( _n( '%d Comment', '%d Comments', $discussion->responses, 'twentynineteen' ), $discussion->responses );
} else {
$meta_label = __( 'No comments', 'twentynineteen' );
}
?>
<div class="discussion-meta">
<?php
if ( $has_responses ) {
twentynineteen_discussion_avatars_list( $discussion->authors );
}
?>
<p class="discussion-meta-info">
<?php echo twentynineteen_get_icon_svg( 'comment', 24 ); ?>
<span><?php echo esc_html( $meta_label ); ?></span>
</p>
</div><!-- .discussion-meta -->
|