lightspeeddevelopment /
lsx
| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * The template for displaying Comment. |
||||
| 4 | * |
||||
| 5 | * @package lsx |
||||
| 6 | */ |
||||
| 7 | |||||
| 8 | if ( isset( $GLOBALS['comment_depth'] ) ) { |
||||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||||
| 9 | $depth = intval( $GLOBALS['comment_depth'] ); |
||||
| 10 | } else { |
||||
| 11 | $depth = 1; |
||||
| 12 | } |
||||
| 13 | |||||
| 14 | $max_depth = intval( get_option( 'thread_comments_depth' ) ); |
||||
| 15 | |||||
| 16 | echo get_avatar( $comment, '128' ); |
||||
|
0 ignored issues
–
show
Are you sure
get_avatar($comment, '128') of type false|string can be used in echo?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 17 | ?> |
||||
| 18 | <div class="media-body"> |
||||
| 19 | <h4 class="media-heading"><?php echo get_comment_author_link(); ?></h4> |
||||
| 20 | |||||
| 21 | <time datetime="<?php echo comment_date( 'c' ); ?>"> |
||||
|
0 ignored issues
–
show
|
|||||
| 22 | <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"> |
||||
| 23 | <?php |
||||
| 24 | printf( |
||||
| 25 | /* Translators: 1: post date, 2: post time */ |
||||
| 26 | esc_html__( '%1$s on %2$s', 'lsx' ), |
||||
| 27 | get_comment_date(), |
||||
|
0 ignored issues
–
show
|
|||||
| 28 | get_comment_time() |
||||
|
0 ignored issues
–
show
|
|||||
| 29 | ); |
||||
| 30 | ?> |
||||
| 31 | </a> |
||||
| 32 | </time> |
||||
| 33 | |||||
| 34 | <?php edit_comment_link( esc_html__( '(Edit)', 'lsx' ), '', '' ); ?> |
||||
| 35 | |||||
| 36 | <?php if ( ! $comment->comment_approved ) : ?> |
||||
|
0 ignored issues
–
show
|
|||||
| 37 | <div class="alert alert-info"> |
||||
| 38 | <?php esc_html_e( 'Your comment is awaiting moderation.', 'lsx' ); ?> |
||||
| 39 | </div> |
||||
| 40 | <?php endif; ?> |
||||
| 41 | |||||
| 42 | <?php |
||||
| 43 | comment_text(); |
||||
| 44 | |||||
| 45 | comment_reply_link( |
||||
| 46 | array( |
||||
| 47 | 'depth' => $depth, |
||||
| 48 | 'max_depth' => $max_depth, |
||||
| 49 | ) |
||||
| 50 | ); |
||||
| 51 |