Update comments.php
This commit is contained in:
parent
51c5f93019
commit
d979bf8a5a
82
comments.php
82
comments.php
|
@ -31,27 +31,27 @@ if ( post_password_required() ) {
|
|||
<h2 class="comments-title">
|
||||
|
||||
<?php
|
||||
$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' ),
|
||||
'<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 “%2$s”',
|
||||
'%1$s thoughts on “%2$s”',
|
||||
$comments_number,
|
||||
'comments title',
|
||||
'understrap'
|
||||
) ),
|
||||
number_format_i18n( $comments_number ),
|
||||
'<span>' . get_the_title() . '</span>'
|
||||
);
|
||||
}
|
||||
$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' ),
|
||||
'<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 “%2$s”',
|
||||
'%1$s thoughts on “%2$s”',
|
||||
$comments_number,
|
||||
'comments title',
|
||||
'understrap'
|
||||
) ),
|
||||
number_format_i18n( $comments_number ),
|
||||
'<span>' . get_the_title() . '</span>'
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
</h2><!-- .comments-title -->
|
||||
|
@ -63,12 +63,15 @@ if ( post_password_required() ) {
|
|||
<h1 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'understrap' ); ?></h1>
|
||||
|
||||
<?php if ( get_previous_comments_link() ) { ?>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments',
|
||||
'understrap' ) ); ?></div>
|
||||
<?php }
|
||||
if ( get_next_comments_link() ) { ?>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →',
|
||||
'understrap' ) ); ?></div>
|
||||
<div class="nav-previous">
|
||||
<?php previous_comments_link( __( '← Older Comments','understrap' ) ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( get_next_comments_link() ) { ?>
|
||||
<div class="nav-next">
|
||||
<?php next_comments_link( __( 'Newer Comments →', 'understrap' ) ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</nav><!-- #comment-nav-above -->
|
||||
|
@ -78,10 +81,12 @@ if ( post_password_required() ) {
|
|||
<ol class="comment-list">
|
||||
|
||||
<?php
|
||||
wp_list_comments( array(
|
||||
'style' => 'ol',
|
||||
'short_ping' => true,
|
||||
) );
|
||||
wp_list_comments(
|
||||
array(
|
||||
'style' => 'ol',
|
||||
'short_ping' => true,
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
</ol><!-- .comment-list -->
|
||||
|
@ -93,12 +98,15 @@ if ( post_password_required() ) {
|
|||
<h1 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'understrap' ); ?></h1>
|
||||
|
||||
<?php if ( get_previous_comments_link() ) { ?>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments',
|
||||
'understrap' ) ); ?></div>
|
||||
<?php }
|
||||
if ( get_next_comments_link() ) { ?>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →',
|
||||
'understrap' ) ); ?></div>
|
||||
<div class="nav-previous">
|
||||
<?php previous_comments_link( __( '← Older Comments', 'understrap' ) ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( get_next_comments_link() ) { ?>
|
||||
<div class="nav-next">
|
||||
<?php next_comments_link( __( 'Newer Comments →', 'understrap' ) ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</nav><!-- #comment-nav-below -->
|
||||
|
|
Reference in New Issue