198 $this->comment( $comment, $depth, $args ); |
198 $this->comment( $comment, $depth, $args ); |
199 $output .= ob_get_clean(); |
199 $output .= ob_get_clean(); |
200 } |
200 } |
201 |
201 |
202 if ( 'comment' === $comment->comment_type ) { |
202 if ( 'comment' === $comment->comment_type ) { |
203 remove_filter( 'comment_text', array( $this, 'filter_comment_text' ), 40, 2 ); |
203 remove_filter( 'comment_text', array( $this, 'filter_comment_text' ), 40 ); |
204 } |
204 } |
205 } |
205 } |
206 |
206 |
207 /** |
207 /** |
208 * Ends the element output, if needed. |
208 * Ends the element output, if needed. |
299 $show_pending_links = isset( $commenter['comment_author'] ) && $commenter['comment_author']; |
299 $show_pending_links = isset( $commenter['comment_author'] ) && $commenter['comment_author']; |
300 |
300 |
301 if ( $commenter['comment_author_email'] ) { |
301 if ( $commenter['comment_author_email'] ) { |
302 $moderation_note = __( 'Your comment is awaiting moderation.' ); |
302 $moderation_note = __( 'Your comment is awaiting moderation.' ); |
303 } else { |
303 } else { |
304 $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.' ); |
304 $moderation_note = __( 'Your comment is awaiting moderation. This is a preview; your comment will be visible after it has been approved.' ); |
305 } |
305 } |
306 ?> |
306 ?> |
307 <<?php echo $tag; ?> <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?> id="comment-<?php comment_ID(); ?>"> |
307 <<?php echo $tag; ?> <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?> id="comment-<?php comment_ID(); ?>"> |
308 <?php if ( 'div' !== $args['style'] ) : ?> |
308 <?php if ( 'div' !== $args['style'] ) : ?> |
309 <div id="div-comment-<?php comment_ID(); ?>" class="comment-body"> |
309 <div id="div-comment-<?php comment_ID(); ?>" class="comment-body"> |
331 <?php if ( '0' == $comment->comment_approved ) : ?> |
331 <?php if ( '0' == $comment->comment_approved ) : ?> |
332 <em class="comment-awaiting-moderation"><?php echo $moderation_note; ?></em> |
332 <em class="comment-awaiting-moderation"><?php echo $moderation_note; ?></em> |
333 <br /> |
333 <br /> |
334 <?php endif; ?> |
334 <?php endif; ?> |
335 |
335 |
336 <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>"> |
336 <div class="comment-meta commentmetadata"> |
337 <?php |
337 <?php |
338 /* translators: 1: Comment date, 2: Comment time. */ |
338 printf( |
339 printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() ); |
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 ); |
|
348 |
|
349 edit_comment_link( __( '(Edit)' ), ' ', '' ); |
340 ?> |
350 ?> |
341 </a> |
|
342 <?php |
|
343 edit_comment_link( __( '(Edit)' ), ' ', '' ); |
|
344 ?> |
|
345 </div> |
351 </div> |
346 |
352 |
347 <?php |
353 <?php |
348 comment_text( |
354 comment_text( |
349 $comment, |
355 $comment, |
397 $show_pending_links = ! empty( $commenter['comment_author'] ); |
403 $show_pending_links = ! empty( $commenter['comment_author'] ); |
398 |
404 |
399 if ( $commenter['comment_author_email'] ) { |
405 if ( $commenter['comment_author_email'] ) { |
400 $moderation_note = __( 'Your comment is awaiting moderation.' ); |
406 $moderation_note = __( 'Your comment is awaiting moderation.' ); |
401 } else { |
407 } else { |
402 $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.' ); |
408 $moderation_note = __( 'Your comment is awaiting moderation. This is a preview; your comment will be visible after it has been approved.' ); |
403 } |
409 } |
404 ?> |
410 ?> |
405 <<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?>> |
411 <<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?>> |
406 <article id="div-comment-<?php comment_ID(); ?>" class="comment-body"> |
412 <article id="div-comment-<?php comment_ID(); ?>" class="comment-body"> |
407 <footer class="comment-meta"> |
413 <footer class="comment-meta"> |
425 ); |
431 ); |
426 ?> |
432 ?> |
427 </div><!-- .comment-author --> |
433 </div><!-- .comment-author --> |
428 |
434 |
429 <div class="comment-metadata"> |
435 <div class="comment-metadata"> |
430 <a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>"> |
436 <?php |
431 <time datetime="<?php comment_time( 'c' ); ?>"> |
437 printf( |
432 <?php |
438 '<a href="%s"><time datetime="%s">%s</time></a>', |
433 /* translators: 1: Comment date, 2: Comment time. */ |
439 esc_url( get_comment_link( $comment, $args ) ), |
434 printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() ); |
440 get_comment_time( 'c' ), |
435 ?> |
441 sprintf( |
436 </time> |
442 /* translators: 1: Comment date, 2: Comment time. */ |
437 </a> |
443 __( '%1$s at %2$s' ), |
438 <?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?> |
444 get_comment_date( '', $comment ), |
|
445 get_comment_time() |
|
446 ) |
|
447 ); |
|
448 |
|
449 edit_comment_link( __( 'Edit' ), ' <span class="edit-link">', '</span>' ); |
|
450 ?> |
439 </div><!-- .comment-metadata --> |
451 </div><!-- .comment-metadata --> |
440 |
452 |
441 <?php if ( '0' == $comment->comment_approved ) : ?> |
453 <?php if ( '0' == $comment->comment_approved ) : ?> |
442 <em class="comment-awaiting-moderation"><?php echo $moderation_note; ?></em> |
454 <em class="comment-awaiting-moderation"><?php echo $moderation_note; ?></em> |
443 <?php endif; ?> |
455 <?php endif; ?> |