refactor comments.php

This commit is contained in:
2026-05-09 08:14:18 +02:00
parent 282523fb9c
commit 82471d2a38
+4 -4
View File
@@ -28,8 +28,8 @@ if ( post_password_required() ) {
?>
<h2 class="comments-title">
<?php
$daisy_blog_comment_count = get_comments_number();
if ( '1' === $daisy_blog_comment_count ) {
$zeitfresser_comment_count = get_comments_number();
if ( '1' === $zeitfresser_comment_count ) {
printf(
/* translators: 1: title. */
esc_html__( 'One thought on &ldquo;%1$s&rdquo;', 'zeitfresser' ),
@@ -38,8 +38,8 @@ if ( post_password_required() ) {
} else {
printf(
/* translators: 1: comment count number, 2: title. */
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $daisy_blog_comment_count, 'comments title', 'zeitfresser' ) ),
number_format_i18n( $daisy_blog_comment_count ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $zeitfresser_comment_count, 'comments title', 'zeitfresser' ) ),
number_format_i18n( $zeitfresser_comment_count ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'<span>' . wp_kses_post( get_the_title() ) . '</span>'
);
}