| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly |
| 4 |
if( ! defined( 'ABSPATH' ) ) exit; |
| 5 |
|
| 6 |
function wpforo_thread_reply_template( $post, $topic = [], $forum = [], $level = 0, $parents = [] ) { |
| 7 |
$member = wpforo_member( $post ); |
| 8 |
$wpf_is_anon = function_exists('wpforo_is_anonymous_mask_member') ? wpforo_is_anonymous_mask_member($member) : false; |
| 9 |
?> |
| 10 |
<div id="post-<?php echo wpforo_bigintval( $post['postid'] ) ?>" data-postid="<?php echo wpforo_bigintval( $post['postid'] ) ?>" data-userid="<?php echo wpforo_bigintval( $member['userid'] ) ?>" data-mention="<?php echo esc_attr( ( wpforo_setting( 'profiles', 'mention_nicknames' ) ? $member['user_nicename'] : '' ) ) ?>" data-isowner="<?php echo esc_attr( (int) (bool) wpforo_is_owner( $member['userid'] ) ) ?>" class="reply-wrap"> |
| 11 |
<div class="wpforo-post wpf-child-post wpfcl-1"> |
| 12 |
<div class="wpf-reply-head"> |
| 13 |
<?php if( WPF()->usergroup->can( 'va' ) && wpforo_setting( 'profiles', 'avatars' ) ): ?> |
| 14 |
<div class="wpf-author-avatar"><?php echo wpforo_user_avatar( $member, 80 ) ?></div> |
| 15 |
<?php endif ?> |
| 16 |
<div class="wpf-author"> |
| 17 |
<div class="wpf-author-head"> |
| 18 |
<div class="wpf-author-name"><span><?php WPF()->member->show_online_indicator( $member['userid'] ) ?></span> <?php wpforo_member_link( $member ); ?></div> |
| 19 |
<?php wpforo_topic_starter( $topic, $post, 'icon' ) ?> |
| 20 |
<?php if( (int) wpfval( $member, 'userid' ) ) : ?> |
| 21 |
<div class="wpf-author-title"><?php wpforo_member_title( $member, true, '', '', [ 'custom-title', 'rating-title' ] ); ?></div> |
| 22 |
<?php endif; ?> |
| 23 |
</div> |
| 24 |
<div id="wpforo-memberinfo-<?php echo intval( $post['postid'] ) ?>" class="wpforo-memberinfo"> |
| 25 |
<?php if( empty($wpf_is_anon) ) { wpforo_member_nicename( $member, '@' ); } ?> |
| 26 |
<?php if( empty($wpf_is_anon) ): ?><div class="wpf-author-joined"><i class="fas fa-calendar-alt"></i> <?php wpforo_phrase( 'Joined' ) ?>: <?php wpforo_date( $member['user_registered'] ); ?></div><br /><?php endif; ?> |
| 27 |
<?php if( empty($wpf_is_anon) && (int) wpfval( $member, 'userid' ) ) : ?> |
| 28 |
<?php wpforo_member_badge( $member ) ?> |
| 29 |
<div class="wpf-author-title"><?php wpforo_member_title( $member, true, '', '', [ 'usergroup' ] ) ?></div> |
| 30 |
<?php endif; ?> |
| 31 |
<?php if( empty($wpf_is_anon) ): ?><div class="wpf-author-posts"><?php wpforo_phrase( 'Posts' ) ?>: <?php echo intval( $member['posts'] ) ?></div><?php endif; ?> |
| 32 |
<?php if( empty($wpf_is_anon) && (int) wpfval( $member, 'userid' ) ) : ?> |
| 33 |
<div class="wpf-member-profile-buttons"> |
| 34 |
<?php WPF()->tpl->member_buttons( $member ) ?> |
| 35 |
<?php WPF()->tpl->member_social_buttons( $member ) ?> |
| 36 |
</div> |
| 37 |
<?php endif; ?> |
| 38 |
</div> |
| 39 |
</div> |
| 40 |
<div class="wpf-post-date"><?php wpforo_date( $post['created'], 'M d, Y g:i a' ); ?></div> |
| 41 |
<div class="wpf-post-btns"> |
| 42 |
<?php wpforo_post_buttons( 'icon', [ 'report', 'link' ], $forum, $topic, $post ); ?> |
| 43 |
<?php wpforo_share_toggle( $post['url'], $post['body'], 'top' ); ?> |
| 44 |
</div> |
| 45 |
</div> |
| 46 |
<div class="wpf-reply-content wpf-content"> |
| 47 |
<div class="wpf-reply-tree"> |
| 48 |
<?php wpforo_thread_breadcrumb( $post, $parents ); ?> |
| 49 |
<?php do_action( 'wpforo_post_content_top_left', $post ) ?> |
| 50 |
</div> |
| 51 |
<?php if( $post['status'] ): ?> |
| 52 |
<div class="wpf-mod"> |
| 53 |
<span class="wpf-mod-message"><i class="fas fa-exclamation-circle" aria-hidden="true"></i> <?php wpforo_phrase( 'Awaiting moderation' ) ?></span> |
| 54 |
</div> |
| 55 |
<?php endif; ?> |
| 56 |
<div class="wpforo-post-content"> |
| 57 |
<?php wpforo_content( $post ); ?> |
| 58 |
</div> |
| 59 |
<div class="wpforo-post-meta"> |
| 60 |
<?php do_action( 'wpforo_tpl_post_loop_after_content', $post, $member ) ?> |
| 61 |
<?php wpforo_post_edited( $post ); ?> |
| 62 |
<?php if( wpforo_setting( 'profiles', 'signature' ) ): ?> |
| 63 |
<?php if( $member['signature'] ): ?> |
| 64 |
<div class="wpforo-post-signature"><?php wpforo_signature( $member ) ?></div><?php endif; ?> |
| 65 |
<?php endif; ?> |
| 66 |
</div> |
| 67 |
<div class="wpf-content-foot"> |
| 68 |
<?php do_action( 'wpforo_post_footer_start', $post, $topic, $forum, 4 ); ?> |
| 69 |
<div class="wpf-reply"> |
| 70 |
<?php wpforo_post_buttons( 'icon-text', 'reply', $forum, $topic, $post ); ?> |
| 71 |
</div> |
| 72 |
<div class="wpf-buttons"> |
| 73 |
<?php if( $post['is_first_post'] ) { |
| 74 |
wpforo_post_buttons( 'icon', [ 'custom-bottom', 'quote', 'solved', 'sticky', 'close', 'approved', 'private', 'edit', 'delete' ], $forum, $topic, $post ); |
| 75 |
} else { |
| 76 |
wpforo_post_buttons( 'icon', [ 'custom-bottom', 'quote', 'approved', 'edit', 'delete' ], $forum, $topic, $post ); |
| 77 |
} ?> |
| 78 |
</div> |
| 79 |
</div> |
| 80 |
<div class="wpforo-post-footer"> |
| 81 |
<?php do_action( 'wpforo_post_footer_bottom_start', $post, $topic, $forum, 4 ); ?> |
| 82 |
</div> |
| 83 |
<div class="wpforo-portable-form-wrap"></div> |
| 84 |
</div> |
| 85 |
|
| 86 |
</div><!-- wpforo-post --> |
| 87 |
</div><!-- reply-wrap --> |
| 88 |
<?php |
| 89 |
} |
| 90 |
|