Make WordPress Core


Ignore:
Timestamp:
10/15/2020 03:11:43 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty: Remove extra space from the comment link in TwentyTwenty_Walker_Comment.

See #51533.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php

    r47122 r49158  
    6464
    6565                        <div class="comment-metadata">
    66                             <a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>">
    67                                 <?php
    68                                 /* translators: 1: Comment date, 2: Comment time. */
    69                                 $comment_timestamp = sprintf( __( '%1$s at %2$s', 'twentytwenty' ), get_comment_date( '', $comment ), get_comment_time() );
    70                                 ?>
    71                                 <time datetime="<?php comment_time( 'c' ); ?>" title="<?php echo esc_attr( $comment_timestamp ); ?>">
    72                                     <?php echo esc_html( $comment_timestamp ); ?>
    73                                 </time>
    74                             </a>
    7566                            <?php
     67                            /* translators: 1: Comment date, 2: Comment time. */
     68                            $comment_timestamp = sprintf( __( '%1$s at %2$s', 'twentytwenty' ), get_comment_date( '', $comment ), get_comment_time() );
     69
     70                            printf(
     71                                '<a href="%s"><time datetime="%s" title="%s">%s</time></a>',
     72                                esc_url( get_comment_link( $comment, $args ) ),
     73                                get_comment_time( 'c' ),
     74                                esc_attr( $comment_timestamp ),
     75                                esc_html( $comment_timestamp )
     76                            );
     77
    7678                            if ( get_edit_comment_link() ) {
    77                                 echo ' <span aria-hidden="true">&bull;</span> <a class="comment-edit-link" href="' . esc_url( get_edit_comment_link() ) . '">' . __( 'Edit', 'twentytwenty' ) . '</a>';
     79                                printf(
     80                                    ' <span aria-hidden="true">&bull;</span> <a class="comment-edit-link" href="%s">%s</a>',
     81                                    esc_url( get_edit_comment_link() ),
     82                                    __( 'Edit', 'twentytwenty' )
     83                                );
    7884                            }
    7985                            ?>
Note: See TracChangeset for help on using the changeset viewer.