PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.4.4
Forumax – AI Powered Advanced Community Forum Plugin v2.4.4
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 2.1.0 All 29 releases
bbp-core / templates / content-single-topic.php

content-single-topic.php in Forumax – AI Powered Advanced Community Forum Plugin 2.4.4, at templates/content-single-topic.php

89 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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>
89 </section>