Make WordPress Core

Ticket #35279: 35279.diff

File 35279.diff, 1.1 KB (added by rachelbaker, 8 years ago)
  • src/wp-admin/includes/class-wp-comments-list-table.php

     
    716718         * @param WP_Comment $comment The comment object.
    717719         */
    718720        public function column_date( $comment ) {
    719                 echo '<div class="submitted-on">';
    720                 echo '<a href="' . esc_url( get_comment_link( $comment ) ) . '">';
    721721                /* translators: 1: comment date, 2: comment time */
    722                 printf( __( '%1$s at %2$s' ),
     722                $submitted = sprintf( __( '%1$s at %2$s' ),
    723723                        /* translators: comment date format. See http://php.net/date */
    724724                        get_comment_date( __( 'Y/m/d' ), $comment ),
    725725                        get_comment_date( __( 'g:i a' ), $comment )
    726726                );
    727                 echo '</a>';
     727
     728                echo '<div class="submitted-on">';
     729                if ( 'approved' === wp_get_comment_status( $comment ) && ! empty ( $comment->comment_post_ID ) ) {
     730                        printf(
     731                                '<a href="%s">%s</a>',
     732                                esc_url( get_comment_link( $comment ) ),
     733                                $submitted
     734                        );
     735                } else {
     736                        echo $submitted;
     737                }
    728738                echo '</div>';
    729739        }
    730740