Changeset 44149 for trunk/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php
- Timestamp:
- 12/14/2018 02:32:33 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
- 1 copied
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/classes/class-twentynineteen-walker-comment.php
r43808 r44149 5 5 * @package WordPress 6 6 * @subpackage Twenty_Nineteen 7 * @since 1.0.0 7 8 */ 8 9 … … 35 36 $comment_author_link = get_comment_author_link( $comment ); 36 37 $comment_author_url = get_comment_author_url( $comment ); 38 $comment_author = get_comment_author( $comment ); 37 39 $avatar = get_avatar( $comment, $args['avatar_size'] ); 38 40 if ( 0 != $args['avatar_size'] ) { … … 40 42 echo $avatar; 41 43 } else { 42 echo preg_replace( '/>[^<]+</', sprintf( '>%s<', $avatar ), $comment_author_link ); 44 printf( '<a href="%s" rel="external nofollow" class="url">', $comment_author_url ); 45 echo $avatar; 43 46 } 44 47 } … … 53 56 } 54 57 55 /* translators: %s: comment author link */56 58 printf( 57 __( '%s <span class="screen-reader-text says">says:</span>' ), 58 sprintf( '<b class="fn">%s</b>', get_comment_author_link( $comment ) ) 59 /* translators: %s: comment author link */ 60 __( '%s <span class="screen-reader-text says">says:</span>', 'twentynineteen' ), 61 sprintf( '<span class="fn">%s</span>', $comment_author ) 59 62 ); 63 64 if ( ! empty( $comment_author_url ) ) { 65 echo '</a>'; 66 } 60 67 ?> 61 68 </div><!-- .comment-author --> … … 63 70 <div class="comment-metadata"> 64 71 <a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>"> 65 <?php /* translators: 1: comment date, 2: comment time */ ?> 66 <time datetime="<?php comment_time( 'c' ); ?>" title="<?php printf( __( '%1$s at %2$s', 'twentynineteen' ), get_comment_date( '', $comment ), get_comment_time() ); ?>"> 67 <?php printf( __( '%1$s at %2$s', 'twentynineteen' ), get_comment_date( '', $comment ), get_comment_time() ); ?> 72 <?php 73 /* translators: 1: comment date, 2: comment time */ 74 $comment_timestamp = sprintf( __( '%1$s at %2$s', 'twentynineteen' ), get_comment_date( '', $comment ), get_comment_time() ); 75 ?> 76 <time datetime="<?php comment_time( 'c' ); ?>" title="<?php echo $comment_timestamp; ?>"> 77 <?php echo $comment_timestamp; ?> 68 78 </time> 69 79 </a> 70 80 <?php 71 81 $edit_comment_icon = twentynineteen_get_icon_svg( 'edit', 16 ); 72 edit_comment_link( __( 'Edit' ), '<span class="edit-link-sep">—</span> <span class="edit-link">' . $edit_comment_icon, '</span>' );82 edit_comment_link( __( 'Edit', 'twentynineteen' ), '<span class="edit-link-sep">—</span> <span class="edit-link">' . $edit_comment_icon, '</span>' ); 73 83 ?> 74 84 </div><!-- .comment-metadata --> 75 85 76 86 <?php if ( '0' == $comment->comment_approved ) : ?> 77 <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.' ); ?></p>87 <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentynineteen' ); ?></p> 78 88 <?php endif; ?> 79 89 </footer><!-- .comment-meta -->
Note: See TracChangeset
for help on using the changeset viewer.