CS: prefix all variables
While template files are intended to be included from within a function, this doesn't guarantee they always will be. Therefore all variables declared within template files also need to be prefixed with a theme specific prefix. As these are "local" variables, renaming them does not constitute a BC-break.
This commit is contained in:
parent
ec877e48c3
commit
98e3e75109
3 changed files with 9 additions and 9 deletions
|
@ -28,8 +28,8 @@ if ( post_password_required() ) {
|
|||
?>
|
||||
<h2 class="comments-title">
|
||||
<?php
|
||||
$comment_count = get_comments_number();
|
||||
if ( '1' === $comment_count ) {
|
||||
$_s_comment_count = get_comments_number();
|
||||
if ( '1' === $_s_comment_count ) {
|
||||
printf(
|
||||
/* translators: 1: title. */
|
||||
esc_html__( 'One thought on “%1$s”', '_s' ),
|
||||
|
@ -38,8 +38,8 @@ if ( post_password_required() ) {
|
|||
} else {
|
||||
printf( // WPCS: XSS OK.
|
||||
/* translators: 1: comment count number, 2: title. */
|
||||
esc_html( _nx( '%1$s thought on “%2$s”', '%1$s thoughts on “%2$s”', $comment_count, 'comments title', '_s' ) ),
|
||||
number_format_i18n( $comment_count ),
|
||||
esc_html( _nx( '%1$s thought on “%2$s”', '%1$s thoughts on “%2$s”', $_s_comment_count, 'comments title', '_s' ) ),
|
||||
number_format_i18n( $_s_comment_count ),
|
||||
'<span>' . get_the_title() . '</span>'
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue