mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-30 23:39:42 +01:00
6677070a13
This makes `@since` notations in Twenty Seventeen, Twenty Nineteen, and Twenty Twenty consistent with the previous bundled themes. See #48303. Built from https://develop.svn.wordpress.org/trunk@46827 git-svn-id: http://core.svn.wordpress.org/trunk@46627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
33 lines
896 B
PHP
33 lines
896 B
PHP
<?php
|
|
/**
|
|
* The template for displaying Current Discussion on posts
|
|
*
|
|
* @package WordPress
|
|
* @subpackage Twenty_Nineteen
|
|
* @since Twenty Nineteen 1.0
|
|
*/
|
|
|
|
/* Get data from current discussion on post. */
|
|
$discussion = twentynineteen_get_discussion_data();
|
|
$has_responses = $discussion->responses > 0;
|
|
|
|
if ( $has_responses ) {
|
|
/* translators: %d: Number of comments. */
|
|
$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 -->
|