| 1 |
<?php |
| 2 |
/** |
| 3 |
* Replies Loop - Single Reply |
| 4 |
* |
| 5 |
* @package bbPress |
| 6 |
* @subpackage Theme |
| 7 |
*/ |
| 8 |
|
| 9 |
// Exit if accessed directly |
| 10 |
defined( 'ABSPATH' ) || exit; |
| 11 |
?> |
| 12 |
|
| 13 |
<div id="post-<?php bbp_reply_id(); ?>" <?php bbp_reply_class( get_the_ID(), array( 'forum-comment' ) ); ?>> |
| 14 |
<?php do_action( 'bbp_theme_before_reply_author_details' ); ?> |
| 15 |
|
| 16 |
<?php if ( bbp_is_single_user() || bbp_is_single_user_replies() ) : // USER PROFILE PAGE LAYOUT ?> |
| 17 |
|
| 18 |
<div class="forum-post-top"> |
| 19 |
<div class="bbp-author-wrap"> |
| 20 |
<?php |
| 21 |
// Reply author Avatar |
| 22 |
bbp_reply_author_link( array( |
| 23 |
'sep' => '', |
| 24 |
'show_role' => false, |
| 25 |
'type' => 'avatar', |
| 26 |
'size' => 40 |
| 27 |
) ); |
| 28 |
?> |
| 29 |
<div class="forum-post-author"> |
| 30 |
<div class="topic-author frmx-d-flex frmx-mb-1"> |
| 31 |
<?php |
| 32 |
// Reply author Name |
| 33 |
bbp_reply_author_link( array( |
| 34 |
'sep' => '', |
| 35 |
'show_role' => false, |
| 36 |
'type' => 'name', |
| 37 |
) ); |
| 38 |
?> |
| 39 |
<div class="author-badge badge <?php echo esc_attr( sanitize_title( forumax_get_bbp_reply_user_role( bbp_get_reply_id() ) ) ); ?>"> |
| 40 |
<?php forumax_bbp_user_role_icon(); ?> |
| 41 |
<span><?php echo esc_html( forumax_get_bbp_reply_user_role( bbp_get_reply_id() ) ); ?></span> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
<div class="forum-author-meta meta"> |
| 45 |
<span title="<?php bbp_reply_post_date( bbp_get_reply_id() ); ?>"> |
| 46 |
<?php bbp_reply_post_date( bbp_get_reply_id(), true ); ?> |
| 47 |
</span> |
| 48 |
</div> |
| 49 |
<?php do_action( 'bbp_theme_after_reply_author_details' ); ?> |
| 50 |
</div> |
| 51 |
</div> |
| 52 |
<!-- Reply right side actions --> |
| 53 |
<div class="reply-admin-links"> |
| 54 |
<?php if ( isset( $GLOBALS['bbp_private_replies'] ) && $GLOBALS['bbp_private_replies']->is_private( bbp_get_reply_id() ) && $GLOBALS['bbp_private_replies']->can_view_private_reply( bbp_get_reply_id() ) ) : ?> |
| 55 |
<span class="private-reply-badge" title="<?php esc_attr_e( 'Private reply', 'forumax' ); ?>"> |
| 56 |
<?php esc_html_e( 'Private', 'forumax' ); ?> |
| 57 |
</span> |
| 58 |
<?php endif; ?> |
| 59 |
<span class="reply-admin-menu-wrap"> |
| 60 |
<?php echo forumax_get_reply_admin_links(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 61 |
</span> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
<div class="comment-content"> |
| 65 |
<?php |
| 66 |
do_action( 'bbp_theme_before_reply_content' ); |
| 67 |
bbp_reply_content(); |
| 68 |
do_action( 'bbp_theme_after_reply_content' ); |
| 69 |
?> |
| 70 |
</div> |
| 71 |
|
| 72 |
<?php else : // SINGLE TOPIC THREAD LAYOUT ?> |
| 73 |
|
| 74 |
<div class="frmx-reply-avatar"> |
| 75 |
<?php |
| 76 |
// Reply author Avatar |
| 77 |
bbp_reply_author_link( array( |
| 78 |
'sep' => '', |
| 79 |
'show_role' => false, |
| 80 |
'type' => 'avatar', |
| 81 |
'size' => 40 |
| 82 |
) ); |
| 83 |
|
| 84 |
do_action( 'forumax_reply_avatar_voting', get_post( bbp_get_reply_id() ) ); |
| 85 |
?> |
| 86 |
</div> |
| 87 |
|
| 88 |
<div class="frmx-reply-card"> |
| 89 |
<div class="forum-post-top"> |
| 90 |
<div class="bbp-author-wrap"> |
| 91 |
<div class="forum-post-author"> |
| 92 |
<div class="topic-author frmx-d-flex frmx-mb-1"> |
| 93 |
<?php |
| 94 |
// Reply author Name |
| 95 |
bbp_reply_author_link( array( |
| 96 |
'sep' => '', |
| 97 |
'show_role' => false, |
| 98 |
'type' => 'name', |
| 99 |
) ); |
| 100 |
?> |
| 101 |
<div class="author-badge badge <?php echo esc_attr( sanitize_title( forumax_get_bbp_reply_user_role( bbp_get_reply_id() ) ) ); ?>"> |
| 102 |
<?php forumax_bbp_user_role_icon(); ?> |
| 103 |
<span><?php echo esc_html( forumax_get_bbp_reply_user_role( bbp_get_reply_id() ) ); ?></span> |
| 104 |
</div> |
| 105 |
</div> |
| 106 |
|
| 107 |
<div class="forum-author-meta meta"> |
| 108 |
<span title="<?php bbp_reply_post_date( bbp_get_reply_id() ); ?>"> |
| 109 |
<?php bbp_reply_post_date( bbp_get_reply_id(), true ); ?> |
| 110 |
</span> |
| 111 |
</div> |
| 112 |
<?php do_action( 'bbp_theme_after_reply_author_details' ); ?> |
| 113 |
</div> |
| 114 |
</div> |
| 115 |
<!-- Reply right side actions --> |
| 116 |
<div class="reply-admin-links"> |
| 117 |
<?php if ( isset( $GLOBALS['bbp_private_replies'] ) && $GLOBALS['bbp_private_replies']->is_private( bbp_get_reply_id() ) && $GLOBALS['bbp_private_replies']->can_view_private_reply( bbp_get_reply_id() ) ) : ?> |
| 118 |
<span class="private-reply-badge" title="<?php esc_attr_e( 'Private reply', 'forumax' ); ?>"> |
| 119 |
<?php esc_html_e( 'Private', 'forumax' ); ?> |
| 120 |
</span> |
| 121 |
<?php endif; ?> |
| 122 |
<span class="reply-admin-menu-wrap"> |
| 123 |
<?php echo forumax_get_reply_admin_links(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 124 |
</span> |
| 125 |
</div> |
| 126 |
</div> |
| 127 |
<div class="comment-content"> |
| 128 |
<?php |
| 129 |
do_action( 'bbp_theme_before_reply_content' ); |
| 130 |
bbp_reply_content(); |
| 131 |
do_action( 'bbp_theme_after_reply_content' ); |
| 132 |
?> |
| 133 |
</div> |
| 134 |
</div> |
| 135 |
|
| 136 |
<?php endif; ?> |
| 137 |
|
| 138 |
</div> |