fixing comments

This commit is contained in:
koenemann 2017-02-02 12:41:14 +01:00
parent 246cfb4a26
commit 1319eaa578
1 changed files with 21 additions and 5 deletions

View File

@ -25,11 +25,27 @@ if ( post_password_required() ) {
<?php if ( have_comments() ) : ?> <?php if ( have_comments() ) : ?>
<h2 class="comments-title"> <h2 class="comments-title">
<?php <?php
printf( // WPCS: XSS OK. $comments_number = get_comments_number();
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'understrap' ) ), if ( 1 === $comments_number ) {
number_format_i18n( get_comments_number() ), printf(
'<span>' . get_the_title() . '</span>' /* translators: %s: post title */
); esc_html_x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'understrap' ),
'<span>' . get_the_title() . '</span>'
);
} else {
printf( // WPCS: XSS OK.
/* translators: 1: number of comments, 2: post title */
esc_html( _nx(
'%1$s thought on &ldquo;%2$s&rdquo;',
'%1$s thoughts on &ldquo;%2$s&rdquo;',
$comments_number,
'comments title',
'understrap'
) ),
number_format_i18n( $comments_number ),
'<span>' . get_the_title() . '</span>'
);
}
?> ?>
</h2><!-- .comments-title --> </h2><!-- .comments-title -->