68 lines
1.5 KiB
PHP
68 lines
1.5 KiB
PHP
<?php
|
|
|
|
$com_ID = get_query_var('com_ID');
|
|
$comment = get_comment($com_ID);
|
|
|
|
$com_auth = $comment->comment_author;
|
|
$com_txt = $comment->comment_content;
|
|
$com_id = get_comment_ID();
|
|
$com_date = get_comment_date( 'd\/m\/Y' );
|
|
$com_h = get_comment_time( 'H' );
|
|
$com_m = get_comment_time( 'i' );
|
|
$com_parent = $comment->comment_parent;
|
|
//$com_parent = get_query_var('com_parent');
|
|
if ($com_parent == 0):
|
|
$comlevel = "comlevel1";
|
|
else:
|
|
$comlevel = "comlevel2";
|
|
endif;
|
|
?>
|
|
|
|
|
|
|
|
<section class="comment-wrap <?php echo $comlevel?>">
|
|
<p class="comment-content">
|
|
<?php echo $com_txt; ?>
|
|
<footer>
|
|
<?php echo "
|
|
<p><i>$com_auth - $com_date - $com_h h $com_m </i></p>"
|
|
?>
|
|
|
|
<!--<p><i>Jule - 02/03/2020 - 14h35</i></p>--!>
|
|
|
|
<?php
|
|
|
|
$post_id = get_the_ID();
|
|
$comment_id =get_comment_ID();
|
|
|
|
//get the setting configured in the admin panel under settings discussions "Enable threaded (nested) comments levels deep"
|
|
$max_depth = get_option('thread_comments_depth');
|
|
//add max_depth to the array and give it the value from above and set the depth to 1
|
|
$default = array(
|
|
'add_below' => 'comment',
|
|
'respond_id' => 'respond',
|
|
'reply_text' => __('Reply'),
|
|
'login_text' => __('Log in to Reply'),
|
|
'depth' => 1,
|
|
'before' => '',
|
|
'after' => '',
|
|
'max_depth' => $max_depth
|
|
);
|
|
$com_replink = get_comment_reply_link($default,$comment_id,$post_id);
|
|
|
|
?>
|
|
|
|
|
|
</footer>
|
|
</section>
|
|
|
|
|
|
|
|
<?php if ($com_parent == 0): ?>
|
|
|
|
<h4 class="<?php echo $comlevel?> reply">
|
|
<?php echo $com_replink;?>
|
|
</h4>
|
|
|
|
<?php endif; ?>
|