| 1 |
<?php |
| 2 |
// Exit if accessed directly |
| 3 |
if( ! defined( 'ABSPATH' ) ) exit; |
| 4 |
|
| 5 |
function wpforo_qa_comment_template( $comment, $forum = [], $topic = [] ) { |
| 6 |
if( ! $forum ) $forum = (array) wpfval( WPF()->current_object, 'forum' ); |
| 7 |
$comment_member = wpforo_member( $comment ); ?> |
| 8 |
<div id="post-<?php echo wpforo_bigintval( $comment['postid'] ) ?>" data-postid="<?php echo wpforo_bigintval( $comment['postid'] ) ?>" data-userid="<?php echo wpforo_bigintval( $comment_member['userid'] ) ?>" data-mention="<?php echo esc_attr( ( wpforo_setting( 'profiles', 'mention_nicknames' ) ? $comment_member['user_nicename'] : '' ) ) ?>" data-isowner="<?php echo esc_attr( (int) (bool) wpforo_is_owner( $comment_member['userid'] ) ) ?>" class="comment-wrap"> |
| 9 |
<div class="wpforo-comment wpfcl-1"> |
| 10 |
<div class="wpf-left"> |
| 11 |
<div class="wpf-comment-icon wpfcl-0"><i class="fas fa-reply fa-rotate-180"></i></div> |
| 12 |
</div> |
| 13 |
<div class="wpf-right"> |
| 14 |
<div class="wpforo-comment-content"> |
| 15 |
<?php if( $comment['status'] ): ?> |
| 16 |
<div class="wpf-mod-message"> |
| 17 |
<i class="fas fa-exclamation-circle" aria-hidden="true"></i> <?php wpforo_phrase( 'Awaiting moderation' ) ?> |
| 18 |
</div> |
| 19 |
<?php endif; ?> |
| 20 |
<div class="wpforo-comment-text"><?php wpforo_content( $comment ); ?></div> |
| 21 |
<div class="wpforo-comment-footer"> |
| 22 |
<span class="wpfcl-0"> |
| 23 |
<?php wpforo_member_link( $comment_member, 'by' ); ?> |
| 24 |
<?php wpforo_topic_starter( $topic, $comment ) ?> |
| 25 |
<?php wpforo_date( $comment['created'], 'd/m/Y g:i a' ); ?> |
| 26 |
</span> |
| 27 |
<?php do_action( 'wpforo_tpl_post_loop_after_content', $comment, $comment_member ) ?> |
| 28 |
<?php wpforo_post_edited( $comment ); ?> |
| 29 |
</div> |
| 30 |
<div class="wpforo-comment-action-links"> |
| 31 |
<?php |
| 32 |
$buttons = [ 'report', 'approved', 'edit', 'delete', 'link' ]; |
| 33 |
WPF()->tpl->buttons( $buttons, $forum, $comment, $comment ); |
| 34 |
?> |
| 35 |
</div> |
| 36 |
</div> |
| 37 |
</div><!-- right --> |
| 38 |
<div class="wpf-clear"></div> |
| 39 |
</div><!-- wpforo-post --> |
| 40 |
</div><!-- comment-wrap --> |
| 41 |
<?php |
| 42 |
} |
| 43 |
|