Make WordPress Core


Ignore:
Timestamp:
10/15/2020 03:05:09 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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

Props poena, mukesh27, SergeyBiryukov.
See #51533.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-walker-comment.php

    r48824 r49157  
    334334                <?php endif; ?>
    335335
    336                 <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>">
     336                <div class="comment-meta commentmetadata">
    337337                        <?php
    338                                 /* translators: 1: Comment date, 2: Comment time. */
    339                                 printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() );
     338                        printf(
     339                                '<a href="%s">%s</a>',
     340                                esc_url( get_comment_link( $comment, $args ) ),
     341                                sprintf(
     342                                        /* translators: 1: Comment date, 2: Comment time. */
     343                                        __( '%1$s at %2$s' ),
     344                                        get_comment_date( '', $comment ),
     345                                        get_comment_time()
     346                                )
     347                        );
    340348                        ?>
    341                                 </a>
    342                                 <?php
    343                                 edit_comment_link( __( '(Edit)' ), '&nbsp;&nbsp;', '' );
    344                                 ?>
     349
     350                        <?php edit_comment_link( __( '(Edit)' ), '&nbsp;&nbsp;', '' ); ?>
    345351                </div>
    346352
    … …  
    428434
    429435                                        <div class="comment-metadata">
    430                                                 <a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>">
    431                                                         <time datetime="<?php comment_time( 'c' ); ?>">
    432                                                                 <?php
    433                                                                         /* translators: 1: Comment date, 2: Comment time. */
    434                                                                         printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() );
    435                                                                 ?>
    436                                                         </time>
    437                                                 </a>
     436                                                <?php
     437                                                printf(
     438                                                        '<a href="%s"><time datetime="%s">%s</time></a>',
     439                                                        esc_url( get_comment_link( $comment, $args ) ),
     440                                                        get_comment_time( 'c' ),
     441                                                        sprintf(
     442                                                                /* translators: 1: Comment date, 2: Comment time. */
     443                                                                __( '%1$s at %2$s' ),
     444                                                                get_comment_date( '', $comment ),
     445                                                                get_comment_time()
     446                                                        )
     447                                                );
     448                                                ?>
     449
    438450                                                <?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?>
    439451                                        </div><!-- .comment-metadata -->
Note: See TracChangeset for help on using the changeset viewer.