Better coding standards. See #737.

This commit is contained in:
Philip Arthur Moore 2015-04-29 08:32:11 +07:00
parent e4571763ec
commit ff6337943b
1 changed files with 8 additions and 5 deletions

View File

@ -25,14 +25,17 @@ if ( post_password_required() ) {
<?php if ( have_comments() ) : ?> <?php if ( have_comments() ) : ?>
<h2 class="comments-title"> <h2 class="comments-title">
<?php <?php
printf( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', '_s' ), printf(
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' ); _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', '_s' ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);
?> ?>
</h2> </h2>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation"> <nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h2> <h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', '_s' ); ?></h2>
<div class="nav-links"> <div class="nav-links">
<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', '_s' ) ); ?></div> <div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', '_s' ) ); ?></div>
@ -53,7 +56,7 @@ if ( post_password_required() ) {
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation"> <nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h2> <h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', '_s' ); ?></h2>
<div class="nav-links"> <div class="nav-links">
<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', '_s' ) ); ?></div> <div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', '_s' ) ); ?></div>
@ -69,7 +72,7 @@ if ( post_password_required() ) {
// If comments are closed and there are comments, let's leave a little note, shall we? // If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?> ?>
<p class="no-comments"><?php _e( 'Comments are closed.', '_s' ); ?></p> <p class="no-comments"><?php esc_html_e( 'Comments are closed.', '_s' ); ?></p>
<?php endif; ?> <?php endif; ?>
<?php comment_form(); ?> <?php comment_form(); ?>