Changeset 44149 for trunk/src/wp-content/themes/twentynineteen/comments.php
- Timestamp:
- 12/14/2018 02:32:33 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
- 1 copied
-
. (modified) (1 prop)
-
src/wp-content/themes/twentynineteen (copied) (copied from branches/5.0/src/wp-content/themes/twentynineteen)
-
src/wp-content/themes/twentynineteen/comments.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43808,43821,43842,43860,43892,43904,43909,43926-43929,43956,43961-43963
- Property svn:mergeinfo changed
-
trunk/src/wp-content/themes/twentynineteen/comments.php
r43808 r44149 10 10 * @package WordPress 11 11 * @subpackage Twenty_Nineteen 12 * @since 1.0.0 12 13 */ 13 14 14 15 /* 15 If the current post is protected by a password and16 * If the current post is protected by a password and 16 17 * the visitor has not yet entered the password we will 17 18 * return early without loading the comments. … … 21 22 } 22 23 24 $discussion = twentynineteen_get_discussion_data(); 23 25 ?> 24 26 25 27 <div id="comments" class="<?php echo comments_open() ? 'comments-area' : 'comments-area comments-closed'; ?>"> 26 <div class="<?php echo twentynineteen_get_discussion_data()->responses > 0 ? 'comments-title-wrap' : 'comments-title-wrap no-responses'; ?>">28 <div class="<?php echo $discussion->responses > 0 ? 'comments-title-wrap' : 'comments-title-wrap no-responses'; ?>"> 27 29 <h2 class="comments-title"> 28 30 <?php 29 31 if ( comments_open() ) { 30 32 if ( have_comments() ) { 31 echo esc_html_e( 'Join the Conversation', 'twentynineteen' );33 _e( 'Join the Conversation', 'twentynineteen' ); 32 34 } else { 33 echo esc_html_e( 'Leave a comment', 'twentynineteen' );35 _e( 'Leave a comment', 'twentynineteen' ); 34 36 } 35 37 } else { 36 $comments_number = get_comments_number(); 37 if ( '1' === $comments_number ) { 38 if ( '1' == $discussion->responses ) { 38 39 /* translators: %s: post title */ 39 40 printf( _x( 'One reply on “%s”', 'comments title', 'twentynineteen' ), get_the_title() ); … … 44 45 '%1$s reply on “%2$s”', 45 46 '%1$s replies on “%2$s”', 46 $ comments_number,47 $discussion->responses, 47 48 'comments title', 48 49 'twentynineteen' 49 50 ), 50 number_format_i18n( $ comments_number),51 number_format_i18n( $discussion->responses ), 51 52 get_the_title() 52 53 ); … … 85 86 <?php 86 87 87 // Show comment form at bottom if showing newest comments at the bottom.88 if ( comments_open() && 'asc' === strtolower( get_option( 'comment_order', 'asc' ) ) ) :89 ?>90 <div class="comment-form-flex">91 <span class="screen-reader-text"><?php esc_html_e( 'Leave a comment', 'twentynineteen' ); ?></span>92 <?php twentynineteen_comment_form( 'asc' ); ?>93 <h2 class="comments-title" aria-hidden="true"><?php esc_html_e( 'Leave a comment', 'twentynineteen' ); ?></h2>94 </div>95 <?php96 endif;97 98 88 // Show comment navigation 99 89 if ( have_comments() ) : … … 109 99 endif; 110 100 101 // Show comment form at bottom if showing newest comments at the bottom. 102 if ( comments_open() && 'asc' === strtolower( get_option( 'comment_order', 'asc' ) ) ) : 103 ?> 104 <div class="comment-form-flex"> 105 <span class="screen-reader-text"><?php _e( 'Leave a comment', 'twentynineteen' ); ?></span> 106 <?php twentynineteen_comment_form( 'asc' ); ?> 107 <h2 class="comments-title" aria-hidden="true"><?php _e( 'Leave a comment', 'twentynineteen' ); ?></h2> 108 </div> 109 <?php 110 endif; 111 111 112 // If comments are closed and there are comments, let's leave a little note, shall we? 112 113 if ( ! comments_open() ) : 113 114 ?> 114 115 <p class="no-comments"> 115 <?php esc_html_e( 'Comments are closed.', 'twentynineteen' ); ?>116 <?php _e( 'Comments are closed.', 'twentynineteen' ); ?> 116 117 </p> 117 118 <?php
Note: See TracChangeset
for help on using the changeset viewer.