- <a href="<?php echo esc_url( get_comment_link( $comment ) ); ?>"><?php
- /* translators: 1: comment date, 2: comment time */
- printf( __( '%1$s at %2$s' ),
- /* translators: comment date format. See http://php.net/date */
- get_comment_date( __( 'Y/m/d' ), $comment ),
- get_comment_date( get_option( 'time_format' ), $comment )
- );
- ?></a>
+ <?php
+ /* translators: 1: comment date, 2: comment time */
+ $submitted = sprintf( __( '%1$s at %2$s' ),
+ /* translators: comment date format. See http://php.net/date */
+ get_comment_date( __( 'Y/m/d' ), $comment ),
+ get_comment_date( __( 'g:i a' ), $comment )
+ );
+ if ( 'approved' === wp_get_comment_status( $comment ) && ! empty ( $comment->comment_post_ID ) ) {
+ echo '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . $submitted . '</a>';
+ } else {
+ echo $submitted;
+ }
+ ?>