1 | <?php |
||
2 | /** |
||
3 | * The template for displaying Comment. |
||
4 | * |
||
5 | * @package lsx |
||
6 | */ |
||
7 | |||
8 | if ( isset( $GLOBALS['comment_depth'] ) ) { |
||
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
Bug
introduced
by
![]() |
|||
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
Are you sure the usage of
comment_date('c') is correct as it seems to always return null .
This check looks for function or method calls that always return null and whose return value is used. class A
{
function getObject()
{
return null;
}
}
$a = new A();
if ($a->getObject()) {
The method The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes. ![]() |
|||
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(), |
||
28 | get_comment_time() |
||
29 | ); |
||
30 | ?> |
||
31 | </a> |
||
32 | </time> |
||
33 | |||
34 | <?php edit_comment_link( esc_html__( '(Edit)', 'lsx' ), '', '' ); ?> |
||
35 | |||
36 | <?php if ( ! $comment->comment_approved ) : ?> |
||
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 |