Changeset 46445 for trunk/src/wp-content/themes/twentytwenty/comments.php
- Timestamp:
- 10/08/2019 07:05:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwenty/comments.php
r46357 r46445 32 32 <?php 33 33 if ( ! have_comments() ) { 34 esc_html_e( 'Leave a comment', 'twentytwenty' );34 _e( 'Leave a comment', 'twentytwenty' ); 35 35 } elseif ( '1' === $comments_number ) { 36 36 /* translators: %s: post title */ 37 printf( esc_html_x( 'One reply on “%s”', 'comments title', 'twentytwenty' ), esc_html( get_the_title() ) );37 printf( _x( 'One reply on “%s”', 'comments title', 'twentytwenty' ), esc_html( get_the_title() ) ); 38 38 } else { 39 echo esc_html( 40 sprintf( 41 /* translators: 1: number of comments, 2: post title */ 42 _nx( 43 '%1$s reply on “%2$s”', 44 '%1$s replies on “%2$s”', 45 $comments_number, 46 'comments title', 47 'twentytwenty' 48 ), 49 number_format_i18n( $comments_number ), 50 get_the_title() 51 ) 39 echo sprintf( 40 /* translators: 1: number of comments, 2: post title */ 41 _nx( 42 '%1$s reply on “%2$s”', 43 '%1$s replies on “%2$s”', 44 $comments_number, 45 'comments title', 46 'twentytwenty' 47 ), 48 number_format_i18n( $comments_number ), 49 esc_html( get_the_title() ) 52 50 ); 53 51 } … … 61 59 62 60 <?php 63 64 61 wp_list_comments( 65 62 array( … … 81 78 82 79 if ( $comment_pagination ) { 80 $pagination_classes = ''; 83 81 84 82 // If we're only showing the "Next" link, add a class indicating so. 85 if ( strpos( $comment_pagination, 'prev page-numbers' ) === false) {83 if ( false === strpos( $comment_pagination, 'prev page-numbers' ) ) { 86 84 $pagination_classes = ' only-next'; 87 } else {88 $pagination_classes = '';89 85 } 90 86 ?> 91 87 92 <nav class="comments-pagination pagination<?php echo esc_attr( $pagination_classes );?>" aria-label="<?php esc_attr_e( 'Comments', 'twentytwenty' ); ?>">88 <nav class="comments-pagination pagination<?php echo $pagination_classes; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>" aria-label="<?php esc_attr_e( 'Comments', 'twentytwenty' ); ?>"> 93 89 <?php echo wp_kses_post( $comment_pagination ); ?> 94 90 </nav> … … 129 125 <div class="comment-respond" id="respond"> 130 126 131 <p class="comments-closed"><?php _e( 'Comments are closed.', 'twentytwenty' ); // phpcs:ignore WordPress.Security.EscapeOutput.UnsafePrintingFunction -- core trusts translations?></p>127 <p class="comments-closed"><?php _e( 'Comments are closed.', 'twentytwenty' ); ?></p> 132 128 133 129 </div><!-- #respond -->
Note: See TracChangeset
for help on using the changeset viewer.