.../wp-content/themes/wptv2/comments.php | 51 +++++++++++++++-------
1 file changed, 36 insertions(+), 15 deletions(-)
diff --git wordpress.tv/public_html/wp-content/themes/wptv2/comments.php wordpress.tv/public_html/wp-content/themes/wptv2/comments.php
index e7ea96bf..aff7711e 100644
|
|
|
5 | 5 | */ |
6 | 6 | |
7 | 7 | /* |
8 | | * If the current post is protected by a password and |
9 | | * the visitor has not yet entered the password we will |
10 | | * return early without loading the comments. |
11 | | */ |
| 8 | * If the current post is protected by a password and |
| 9 | * the visitor has not yet entered the password we will |
| 10 | * return early without loading the comments. |
| 11 | */ |
12 | 12 | if ( post_password_required() ) { |
13 | 13 | return; |
14 | 14 | } |
… |
… |
if ( post_password_required() ) { |
16 | 16 | global $wptv; |
17 | 17 | |
18 | 18 | if ( have_comments() ) : |
19 | | ?> |
20 | | <h3 id="comments"> |
| 19 | ?> |
| 20 | |
| 21 | <h3 id="comments"> |
21 | 22 | <?php |
22 | | printf( _nx( 'One response on “%2$s”', '%1$s responses on “%2$s”', get_comments_number(), 'comments title', 'wptv' ), |
23 | | number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' ); |
| 23 | |
| 24 | $comments_number = get_comments_number(); |
| 25 | if ( 1 === $comments_number ) { |
| 26 | printf( |
| 27 | /* translators: %s: post title */ |
| 28 | esc_html_x( 'One response on “%s”', 'comments title', 'wptv' ), |
| 29 | '<span>' . get_the_title() . '</span>' |
| 30 | ); |
| 31 | } else { |
| 32 | printf( |
| 33 | /* translators: 1: number of comments, 2: post title */ |
| 34 | esc_html( _nx( |
| 35 | '%1$s response on “%2$s”', |
| 36 | '%1$s response on “%2$s”', |
| 37 | $comments_number, |
| 38 | 'comments title', |
| 39 | 'wptv' |
| 40 | ) ), |
| 41 | number_format_i18n( $comments_number ), |
| 42 | '<span>' . get_the_title() . '</span>' |
| 43 | ); |
| 44 | } |
24 | 45 | ?> |
25 | | </h3> |
| 46 | </h3> |
26 | 47 | |
27 | | <ol class="commentlist"> |
| 48 | <ol class="commentlist"> |
28 | 49 | <?php wp_list_comments( array( 'callback' => array( $wptv, 'list_comments' ) ) ); ?> |
29 | | </ol> |
30 | | <?php |
| 50 | </ol> |
| 51 | <?php |
31 | 52 | endif; |
32 | 53 | |
33 | 54 | if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : |
34 | | ?> |
35 | | <p class="nocomments"><?php esc_html_e( 'Comments are closed.', 'wptv' ); ?></p> |
36 | | <?php |
| 55 | ?> |
| 56 | <p class="nocomments"><?php esc_html_e( 'Comments are closed.', 'wptv' ); ?></p> |
| 57 | <?php |
37 | 58 | |
38 | 59 | endif; |
39 | 60 | |