Comments: Remove extra space from the comment link in Walker_Comment.

Props poena, mukesh27, SergeyBiryukov.
See #51533.

git-svn-id: https://develop.svn.wordpress.org/trunk@49157 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-10-15 15:05:09 +00:00
parent 701dee26f1
commit 8bf847bdf4

View File

@ -333,15 +333,21 @@ class Walker_Comment extends Walker {
<br /> <br />
<?php endif; ?> <?php endif; ?>
<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>"> <div class="comment-meta commentmetadata">
<?php <?php
printf(
'<a href="%s">%s</a>',
esc_url( get_comment_link( $comment, $args ) ),
sprintf(
/* translators: 1: Comment date, 2: Comment time. */ /* translators: 1: Comment date, 2: Comment time. */
printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() ); __( '%1$s at %2$s' ),
?> get_comment_date( '', $comment ),
</a> get_comment_time()
<?php )
edit_comment_link( __( '(Edit)' ), '&nbsp;&nbsp;', '' ); );
?> ?>
<?php edit_comment_link( __( '(Edit)' ), '&nbsp;&nbsp;', '' ); ?>
</div> </div>
<?php <?php
@ -427,14 +433,20 @@ class Walker_Comment extends Walker {
</div><!-- .comment-author --> </div><!-- .comment-author -->
<div class="comment-metadata"> <div class="comment-metadata">
<a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>">
<time datetime="<?php comment_time( 'c' ); ?>">
<?php <?php
printf(
'<a href="%s"><time datetime="%s">%s</time></a>',
esc_url( get_comment_link( $comment, $args ) ),
get_comment_time( 'c' ),
sprintf(
/* translators: 1: Comment date, 2: Comment time. */ /* translators: 1: Comment date, 2: Comment time. */
printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() ); __( '%1$s at %2$s' ),
get_comment_date( '', $comment ),
get_comment_time()
)
);
?> ?>
</time>
</a>
<?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?> <?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .comment-metadata --> </div><!-- .comment-metadata -->