From d979bf8a5a4f9e1206cc4c5ef7203933ac6e0327 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Sun, 18 Nov 2018 21:25:27 +0100 Subject: [PATCH] Update comments.php --- comments.php | 98 ++++++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 45 deletions(-) diff --git a/comments.php b/comments.php index f8500d7..ee6e177 100644 --- a/comments.php +++ b/comments.php @@ -29,46 +29,49 @@ if ( post_password_required() ) {

- + ' . get_the_title() . '' - ); - } else { - printf( // WPCS: XSS OK. - /* translators: 1: number of comments, 2: post title */ - esc_html( _nx( - '%1$s thought on “%2$s”', - '%1$s thoughts on “%2$s”', - $comments_number, - 'comments title', - 'understrap' - ) ), - number_format_i18n( $comments_number ), - '' . get_the_title() . '' - ); - } + $comments_number = get_comments_number(); + if ( 1 === (int) $comments_number ) { + printf( + /* translators: %s: post title */ + esc_html_x( 'One thought on “%s”', 'comments title', 'understrap' ), + '' . get_the_title() . '' + ); + } else { + printf( // WPCS: XSS OK. + /* translators: 1: number of comments, 2: post title */ + esc_html( _nx( + '%1$s thought on “%2$s”', + '%1$s thoughts on “%2$s”', + $comments_number, + 'comments title', + 'understrap' + ) ), + number_format_i18n( $comments_number ), + '' . get_the_title() . '' + ); + } ?>

1 && get_option( 'page_comments' ) ) : // are there comments to navigate through. ?> - + @@ -78,31 +81,36 @@ if ( post_password_required() ) {
    'ol', - 'short_ping' => true, - ) ); + wp_list_comments( + array( + 'style' => 'ol', + 'short_ping' => true, + ) + ); ?>
1 && get_option( 'page_comments' ) ) : // are there comments to navigate through. ?> - + - +