PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.5.0
Forumax – AI Powered Advanced Community Forum Plugin v2.5.0
2.5.0 2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 All 30 releases
← All changes | templates/content-single-topic.php +88 -52 2.0.0 → 2.5.0 View file →
@@ -1,53 +1,89 @@
1 -<section <?php bbp_topic_class(get_the_ID(), array('forum-single-content')); ?>>
2 - <div class="forum-layout">
3 -
4 - <div class="forum-main-column">
5 -
6 - <?php
7 - if ( post_password_required() ) :
8 - bbp_get_template_part( 'form', 'protected' );
9 - else :
10 - bbp_get_template_part( 'content', 'single-topic-lead' );
11 - ?>
12 -
13 - <?php if ( bbp_has_replies() ) : ?>
14 -
15 - <div id="topic-<?php bbp_topic_id(); ?>-replies" class="all-answers">
16 -
17 - <div class="all-replies-header frmx-all-replies-header">
18 - <h5 class="replies-title">
19 - <?php esc_html_e('All Replies', 'forumax'); ?>
20 - </h5>
21 -
22 - <div class="replies-sorting">
23 - <select name="sort-replies" id="sort-replies" class="replies-sort-select">
24 - <option selected disabled>Sort By</option>
25 - <option value="desc">Newest First</option>
26 - <option value="asc">Oldest First</option>
27 - <option value="vote">Highest Votes First</option>
28 - </select>
29 - </div>
30 - </div>
31 -
32 - <div class="reply-result">
33 - <?php bbp_get_template_part( 'loop', 'replies' ); ?>
34 - </div>
35 -
36 - <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
37 -
38 - </div>
39 -
40 - <?php endif; ?>
41 -
42 - <?php bbp_get_template_part( 'form', 'reply' ); ?>
43 -
44 - <?php bbp_get_template_part( 'alert', 'topic-lock' ); ?>
45 -
46 - <?php do_action( 'bbp_template_after_single_topic' ); ?>
47 -
48 - <?php endif; ?>
49 -
50 - </div>
51 - <!-- /.forum-main-column -->
52 - </div>
1 +<?php
2 +/**
3 + * Single Topic Content Part
4 + *
5 + * @package bbPress
6 + * @subpackage Theme
7 + */
8 +
9 +// Exit if accessed directly
10 +defined('ABSPATH') || exit;
11 +
12 +$has_sidebar = is_active_sidebar('forum_archive_sidebar');
13 +$main_col_class = $has_sidebar ? 'frmx-col-lg-8' : 'frmx-col-lg-12';
14 +?>
15 +<section <?php bbp_topic_class(get_the_ID(), array('forum-single-content')); ?>>
16 + <div class="forum-layout">
17 +
18 + <div class="frmx-row frmx-sidebar-<?php echo esc_attr(forumax_get_opt('sidebar_position', 'right')); ?>">
19 + <div class="<?php echo esc_attr($main_col_class); ?> forum-main-column">
20 +
21 + <?php
22 + if (post_password_required()):
23 + bbp_get_template_part('form', 'protected');
24 + else:
25 + bbp_get_template_part('content', 'single-topic-lead');
26 + ?>
27 +
28 + <?php if (bbp_has_replies()): ?>
29 +
30 + <div id="topic-<?php bbp_topic_id(); ?>-replies" class="all-answers">
31 +
32 + <div class="all-replies-header frmx-all-replies-header">
33 + <div class="frmx-header-left">
34 + <h5 class="replies-title">
35 + <svg class="frmx-reply-count-icon" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
36 + <?php
37 + $reply_count = bbp_get_topic_reply_count( bbp_get_topic_id() );
38 + printf(
39 + /* translators: %s: number of replies */
40 + esc_html( _n( '%s Reply', '%s Replies', $reply_count, 'forumax' ) ),
41 + esc_html( number_format_i18n( $reply_count ) )
42 + );
43 + ?>
44 + </h5>
45 + </div>
46 +
47 + <div class="frmx-header-right">
48 + <div class="replies-sorting">
49 + <select name="sort-replies" id="sort-replies" class="replies-sort-select">
50 + <option selected disabled><?php esc_html_e( 'Sort By', 'forumax' ); ?></option>
51 + <option value="desc"><?php esc_html_e( 'Newest First', 'forumax' ); ?></option>
52 + <option value="asc"><?php esc_html_e( 'Oldest First', 'forumax' ); ?></option>
53 + <option value="vote"><?php esc_html_e( 'Highest Votes First', 'forumax' ); ?></option>
54 + </select>
55 + </div>
56 + </div>
57 + </div>
58 +
59 + <div class="reply-result">
60 + <?php bbp_get_template_part('loop', 'replies'); ?>
61 + </div>
62 +
63 + <?php bbp_get_template_part('pagination', 'replies'); ?>
64 +
65 + </div>
66 +
67 + <?php endif; ?>
68 +
69 + <?php bbp_get_template_part('form', 'reply'); ?>
70 +
71 + <?php bbp_get_template_part('alert', 'topic-lock'); ?>
72 +
73 + <?php do_action('bbp_template_after_single_topic'); ?>
74 +
75 + <?php endif; ?>
76 +
77 + </div>
78 + <!-- /.forum-main-column -->
79 +
80 + <?php if ($has_sidebar): ?>
81 + <div class="frmx-col-lg-4 forum-sidebar-column">
82 + <aside class="forum-sidebar">
83 + <?php dynamic_sidebar('forum_archive_sidebar'); ?>
84 + </aside>
85 + </div>
86 + <?php endif; ?>
87 + </div>
88 + </div>
53 89 </section>