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 | includes/Elementor/Forum_Ajax.php +353 -357 1.2.4 → 2.5.0 View file →
@@ -1,358 +1,354 @@
1 -<?php
2 -
3 -namespace admin\Elementor;
4 -
5 -use Elementor\Controls_Manager;
6 -use Elementor\Widget_Base;
7 -use WP_Query;
8 -
9 -// Exit if accessed directly
10 -if ( ! defined( 'ABSPATH' ) ) {
11 - exit;
12 -}
13 -
14 -class Forum_Ajax extends Widget_Base {
15 - public function get_name() {
16 - return 'ama_ajax_forum';
17 - }
18 -
19 - public function get_title() {
20 - return esc_html__( 'BBPC Ajax Forums', 'bbp-core' );
21 - }
22 -
23 - public function get_icon() {
24 - return 'bbpc_icon_ama_ajax_forum';
25 - }
26 -
27 - public function get_keywords() {
28 - return [ 'forum', 'ajax' ];
29 - }
30 -
31 - public function get_categories() {
32 - return [ 'bbp-core' ];
33 - }
34 -
35 - public function get_style_depends() {
36 - return [ 'bbpc-el-widgets' ];
37 - }
38 -
39 - public function get_script_depends() {
40 - return [ 'bbpc-ajax' ];
41 - }
42 -
43 - protected function register_controls() {
44 - /**
45 - * Content section
46 - */
47 - $this->start_controls_section(
48 - 'content_sec', [
49 - 'label' => esc_html__( 'Content Section', 'bbp-core' ),
50 - ]
51 - );
52 -
53 - $this->add_control(
54 - 'ppp2', [
55 - 'label' => esc_html__( 'Show Forums', 'bbp-core' ),
56 - 'description' => esc_html__( 'Show the forums count at the initial view. Default is 9 forums in a row.', 'bbp-core' ),
57 - 'type' => \Elementor\Controls_Manager::NUMBER,
58 - 'label_block' => true,
59 - 'default' => 9
60 - ]
61 - );
62 -
63 - $this->add_control(
64 - 'order', [
65 - 'label' => esc_html__( 'Order', 'bbp-core' ),
66 - 'type' => \Elementor\Controls_Manager::SELECT,
67 - 'options' => [
68 - 'ASC' => 'ASC',
69 - 'DESC' => 'DESC'
70 - ],
71 - 'default' => 'ASC'
72 - ]
73 - );
74 -
75 - // button show hide switcher
76 - $this->add_control(
77 - 'filter_btns',
78 - [
79 - 'label' => esc_html__( 'Tab Filter', 'bbp-core' ),
80 - 'type' => \Elementor\Controls_Manager::SWITCHER,
81 - 'label_on' => esc_html__( 'Show', 'bbp-core' ),
82 - 'label_off' => esc_html__( 'Hide', 'bbp-core' ),
83 - 'return_value' => 'yes',
84 - 'default' => 'yes',
85 - ]
86 - );
87 -
88 - $this->end_controls_section();
89 -
90 - /**
91 - * Styling section starts
92 - */
93 - $this->start_controls_section(
94 - 'styling_sec', [
95 - 'label' => esc_html__( 'Title Style', 'bbp-core' ),
96 - 'tab' => Controls_Manager::TAB_STYLE,
97 - ]
98 - );
99 - //forum title
100 - $this->add_control(
101 - 'forum_heading',
102 - [
103 - 'label' => esc_html__( 'Forum Title', 'bbp-core' ),
104 - 'type' => \Elementor\Controls_Manager::HEADING,
105 - 'separator' => 'before',
106 - ]
107 - );
108 -
109 -
110 - $this->add_control(
111 - 'forum_title_color',
112 - [
113 - 'label' => esc_html__( 'Color', 'bbp-core' ),
114 - 'type' => \Elementor\Controls_Manager::COLOR,
115 - 'selectors' => [
116 - '{{WRAPPER}} .single-forum-post-widget .post-title a' => 'color: {{VALUE}}',
117 - ],
118 - ]
119 - );
120 -
121 - $this->add_control(
122 - 'forum_title_hover_color',
123 - [
124 - 'label' => esc_html__( 'Hover Color', 'bbp-core' ),
125 - 'type' => \Elementor\Controls_Manager::COLOR,
126 - 'selectors' => [
127 - '{{WRAPPER}} .single-forum-post-widget .post-title a:hover' => 'color: {{VALUE}}',
128 - ],
129 - ]
130 - );
131 -
132 - $this->add_group_control(
133 - \Elementor\Group_Control_Typography::get_type(),
134 - [
135 - 'name' => 'forum_title_typography',
136 - 'selector' => '{{WRAPPER}} .single-forum-post-widget .post-title a',
137 - ]
138 - );
139 -
140 - // Forum meta
141 - $this->add_control(
142 - 'forum_meta',
143 - [
144 - 'label' => esc_html__( 'Forum Meta', 'bbp-core' ),
145 - 'type' => \Elementor\Controls_Manager::HEADING,
146 - 'separator' => 'before',
147 - ]
148 - );
149 -
150 - $this->add_control(
151 - 'forum_meta_color',
152 - [
153 - 'label' => esc_html__( 'Color', 'bbp-core' ),
154 - 'type' => \Elementor\Controls_Manager::COLOR,
155 - 'selectors' => [
156 - '{{WRAPPER}} .single-forum-post-widget .post-info .author,{{WRAPPER}} .single-forum-post-widget .post-info .post-time' => 'color: {{VALUE}}',
157 - ],
158 - ]
159 - );
160 -
161 -
162 - $this->add_group_control(
163 - \Elementor\Group_Control_Typography::get_type(),
164 - [
165 - 'name' => 'forum_meta_typography',
166 - 'selector' => '{{WRAPPER}} .single-forum-post-widget .post-info .author,{{WRAPPER}} .single-forum-post-widget .post-info .post-time',
167 - ]
168 - );
169 -
170 - //parent forum
171 - $this->add_control(
172 - 'parent_forum',
173 - [
174 - 'label' => esc_html__( 'Parent Forum', 'bbp-core' ),
175 - 'type' => \Elementor\Controls_Manager::HEADING,
176 - 'separator' => 'before',
177 - ]
178 - );
179 -
180 - $this->add_control(
181 - 'parent_forum_color',
182 - [
183 - 'label' => esc_html__( 'Color', 'bbp-core' ),
184 - 'type' => \Elementor\Controls_Manager::COLOR,
185 - 'selectors' => [
186 - '{{WRAPPER}} .post-content .post-category a' => 'color: {{VALUE}}',
187 - ],
188 - ]
189 - );
190 -
191 - $this->add_control(
192 - 'parent_forum_color_hover',
193 - [
194 - 'label' => esc_html__( 'Hover color', 'bbp-core' ),
195 - 'type' => \Elementor\Controls_Manager::COLOR,
196 - 'selectors' => [
197 - '{{WRAPPER}} .post-content .post-category a:hover' => 'color: {{VALUE}}',
198 - ],
199 - ]
200 - );
201 -
202 - $this->add_group_control(
203 - \Elementor\Group_Control_Typography::get_type(),
204 - [
205 - 'name' => 'parent_forum_typo',
206 - 'selector' => '{{WRAPPER}} .post-content .post-category a',
207 - ]
208 - );
209 -
210 - $this->end_controls_section();
211 - }
212 -
213 - protected function render() {
214 - $settings = $this->get_settings();
215 - $filter_btns = $settings['filter_btns'] ?? true;
216 -
217 - $topics = new WP_Query( array(
218 - 'post_type' => 'topic',
219 - 'posts_per_page' => ! empty( $settings['ppp2'] ) ? $settings['ppp2'] : 9,
220 - 'order' => $settings['order'] ? $settings['order'] : 'DESC',
221 - ) );
222 - ?>
223 -
224 - <div class="forum-post-widget" data_id="<?php echo esc_attr( $this->get_id() ); ?>">
225 -
226 - <?php
227 - if ( $filter_btns == true ) :
228 - ?>
229 - <div class="post-filter-widget mb-20 wow fadeInUp">
230 - <div class="single-filter-item">
231 - <a href="#" id="all_filt" data-forum="all" class="data-active">
232 - <i class="icon_grid-2x2"></i><?php _e( 'All', 'bbp-core' ) ?>
233 - </a>
234 - </div>
235 - <div class="single-filter-item">
236 - <a href="#" id="populer_filt" data-forum="popular">
237 - <i class="icon_easel"></i><?php _e( 'Popular', 'bbp-core' ) ?>
238 - </a>
239 - </div>
240 - <div class="single-filter-item">
241 - <a href="#" id="featured_filt" data-forum="featured">
242 - <i class="icon_ribbon_alt"></i><?php _e( 'Featured', 'bbp-core' ) ?>
243 - </a>
244 - </div>
245 - <div class="single-filter-item">
246 - <a href="#" id="recent_filt" data-forum="recent">
247 - <i class="icon_clock_alt"></i><?php _e( 'Recent', 'bbp-core' ) ?>
248 - </a>
249 - </div>
250 - <div class="single-filter-item">
251 - <a href="#" id="unsolved_filt" data-forum="unsolved">
252 - <i class="icon_close_alt2"></i><?php _e( 'Unsolved', 'bbp-core' ) ?>
253 - </a>
254 - </div>
255 - <div class="single-filter-item">
256 - <a href="#" id="solved_filt" data-forum="solved">
257 - <i class="icon_check_alt2"></i><?php _e( 'Solved', 'bbp-core' ) ?>
258 - </a>
259 - </div>
260 - </div>
261 - <?php
262 - endif;
263 - ?>
264 -
265 - <div id="aj-post-filter-widget">
266 - <?php
267 - $delay = 0.0;
268 - $i = 0;
269 - while ( $topics->have_posts() ) : $topics->the_post();
270 - $item_id = get_the_ID();
271 - $author_id = get_post_field( 'post_author', $item_id );
272 - $topic_id = $topics->posts[ $i ]->ID;
273 - $vote_count = get_post_meta( $topic_id, "bbpv-votes", true );
274 - $forum_id = bbp_get_topic_forum_id();
275 - ?>
276 - <div class="single-forum-post-widget wow fadeInUp" data-wow-delay="<?php echo $delay ?>s">
277 - <div class="post-content">
278 - <div class="post-title">
279 - <h6><a href="<?php the_permalink(); ?>"> <?php the_title() ?> </a></h6>
280 - </div>
281 - <div class="post-info">
282 - <div class="author">
283 - <img src="<?php echo BBPC_IMG ?>/forum_tab/user-circle-alt.svg" alt="<?php esc_attr_e( 'User circle alt icon', 'bbpc-core' ); ?>">
284 - <?php
285 - echo bbp_get_topic_author_link(
286 - array(
287 - 'post_id' => $topic_id,
288 - 'type' => 'name'
289 - )
290 - );
291 - ?>
292 - </div>
293 -
294 - <div class="post-time">
295 - <img src="<?php echo BBPC_IMG ?>/forum_tab/time-outline.svg" alt="<?php esc_attr_e( 'Time outline icon', 'bbpc-core' ); ?>">
296 - <?php echo bbp_forum_last_active_time( get_the_ID() ); ?>
297 - </div>
298 - </div>
299 -
300 - <div class="post-category">
301 - <a href="<?php echo get_the_permalink( $forum_id ) ?>">
302 - <?php echo get_the_post_thumbnail( $forum_id ); ?>
303 - <?php echo bbp_get_topic_forum_title(); ?>
304 - </a>
305 - </div>
306 - </div>
307 - <div class="post-reach">
308 - <div class="post-view">
309 - <img src="<?php echo BBPC_IMG ?>/forum_tab/eye-outline.svg" alt="<?php esc_attr_e( 'Eye outline icon', 'bbpc-core' ); ?>">
310 -
311 - <?php
312 - bbp_topic_view_count( $topic_id );
313 - echo '&nbsp;';
314 - _e( 'Views', 'bbp-core' );
315 - ?>
316 - </div>
317 - <div class="post-like">
318 - <img src="<?php echo BBPC_IMG ?>/forum_tab/thumbs-up-outline.svg" alt="<?php esc_attr_e( 'Thumbs-up outline icon', 'bbpc-core' ); ?>">
319 -
320 - <?php
321 - if ( $vote_count ) {
322 - echo $vote_count;
323 - } else {
324 - echo "0";
325 - }
326 -
327 - echo '&nbsp;';
328 - _e( 'Likes', 'bbp-core' );
329 - ?>
330 - </div>
331 - <div class="post-comment">
332 - <img src="<?php echo BBPC_IMG ?>/forum_tab/chatbubbles-outline.svg" alt="<?php esc_attr_e( 'Chat bubbles icon', 'bbpc-core' ); ?>">
333 -
334 - <?php
335 - bbp_topic_reply_count( $topic_id );
336 - echo '&nbsp;';
337 - _e( 'Replies', 'bbp-core' );
338 - ?>
339 - </div>
340 - </div>
341 - </div>
342 -
343 - <?php
344 - $delay += 0.2;
345 - if ( $delay > 0.6 ) {
346 - $delay = 0.0;
347 - }
348 - $i ++;
349 - endwhile;
350 - unset( $delay );
351 - unset( $i );
352 - wp_reset_postdata();
353 - ?>
354 - </div>
355 - </div>
356 - <?php
357 - }
1 +<?php
2 +namespace admin\Elementor;
3 +
4 +use Elementor\Controls_Manager;
5 +use Elementor\Widget_Base;
6 +use WP_Query;
7 +
8 +// Exit if accessed directly
9 +if ( ! defined( 'ABSPATH' ) ) {
10 + exit;
11 +}
12 +
13 +class Forum_Ajax extends Widget_Base {
14 + public function get_name(): string {
15 + return 'ama_ajax_forum';
16 + }
17 +
18 + public function get_title(): string {
19 + return esc_html__( 'Ajax Forums (Forumax)', 'forumax' );
20 + }
21 +
22 + public function get_icon(): string {
23 + return 'bbpc_icon_ama_ajax_forum eicon-posts-group';
24 + }
25 +
26 + public function get_keywords(): array {
27 + return [ 'forum', 'ajax' ];
28 + }
29 +
30 + public function get_categories(): array {
31 + return [ 'forumax' ];
32 + }
33 +
34 + public function get_style_depends(): array {
35 + return [ 'bbpc-el-widgets', 'elegant-icon' ];
36 + }
37 +
38 + public function get_script_depends(): array {
39 + return [ 'bbpc-ajax' ];
40 + }
41 +
42 + protected function register_controls(): void {
43 + //========================== Filter Options =====================//
44 + $this->start_controls_section(
45 + 'filter_sec', [
46 + 'label' => esc_html__( 'Filter Options', 'forumax' ),
47 + ]
48 + );
49 +
50 + $this->add_control(
51 + 'ppp2', [
52 + 'label' => esc_html__( 'Show Forums', 'forumax' ),
53 + 'description' => esc_html__( 'Show the forums count at the initial view. Default is 9 forums in a row.', 'forumax' ),
54 + 'type' => \Elementor\Controls_Manager::NUMBER,
55 + 'default' => 9
56 + ]
57 + );
58 +
59 + $this->add_control(
60 + 'order', [
61 + 'label' => esc_html__( 'Order', 'forumax' ),
62 + 'type' => \Elementor\Controls_Manager::SELECT,
63 + 'options' => [
64 + 'ASC' => 'ASC',
65 + 'DESC' => 'DESC'
66 + ],
67 + 'default' => 'ASC'
68 + ]
69 + );
70 +
71 + // button show hide switcher
72 + $this->add_control(
73 + 'filter_btns',
74 + [
75 + 'label' => esc_html__( 'Tab Filter', 'forumax' ),
76 + 'type' => \Elementor\Controls_Manager::SWITCHER,
77 + 'label_on' => esc_html__( 'Show', 'forumax' ),
78 + 'label_off' => esc_html__( 'Hide', 'forumax' ),
79 + 'return_value' => 'yes',
80 + 'default' => 'yes',
81 + ]
82 + );
83 +
84 + $this->end_controls_section();
85 +
86 + /**
87 + * Styling section starts
88 + */
89 + $this->start_controls_section(
90 + 'styling_sec', [
91 + 'label' => esc_html__( 'Title Style', 'forumax' ),
92 + 'tab' => Controls_Manager::TAB_STYLE,
93 + ]
94 + );
95 + //forum title
96 + $this->add_control(
97 + 'forum_heading',
98 + [
99 + 'label' => esc_html__( 'Forum Title', 'forumax' ),
100 + 'type' => \Elementor\Controls_Manager::HEADING,
101 + 'separator' => 'before',
102 + ]
103 + );
104 +
105 +
106 + $this->add_control(
107 + 'forum_title_color',
108 + [
109 + 'label' => esc_html__( 'Color', 'forumax' ),
110 + 'type' => \Elementor\Controls_Manager::COLOR,
111 + 'selectors' => [
112 + '{{WRAPPER}} .single-forum-post-widget .post-title a' => 'color: {{VALUE}}',
113 + ],
114 + ]
115 + );
116 +
117 + $this->add_control(
118 + 'forum_title_hover_color',
119 + [
120 + 'label' => esc_html__( 'Hover Color', 'forumax' ),
121 + 'type' => \Elementor\Controls_Manager::COLOR,
122 + 'selectors' => [
123 + '{{WRAPPER}} .single-forum-post-widget .post-title a:hover' => 'color: {{VALUE}}',
124 + ],
125 + ]
126 + );
127 +
128 + $this->add_group_control(
129 + \Elementor\Group_Control_Typography::get_type(),
130 + [
131 + 'name' => 'forum_title_typography',
132 + 'selector' => '{{WRAPPER}} .single-forum-post-widget .post-title a',
133 + ]
134 + );
135 +
136 + // Forum meta
137 + $this->add_control(
138 + 'forum_meta',
139 + [
140 + 'label' => esc_html__( 'Forum Meta', 'forumax' ),
141 + 'type' => \Elementor\Controls_Manager::HEADING,
142 + 'separator' => 'before',
143 + ]
144 + );
145 +
146 + $this->add_control(
147 + 'forum_meta_color',
148 + [
149 + 'label' => esc_html__( 'Color', 'forumax' ),
150 + 'type' => \Elementor\Controls_Manager::COLOR,
151 + 'selectors' => [
152 + '{{WRAPPER}} .single-forum-post-widget .post-info .author,{{WRAPPER}} .single-forum-post-widget .post-info .post-time' => 'color: {{VALUE}}',
153 + ],
154 + ]
155 + );
156 +
157 +
158 + $this->add_group_control(
159 + \Elementor\Group_Control_Typography::get_type(),
160 + [
161 + 'name' => 'forum_meta_typography',
162 + 'selector' => '{{WRAPPER}} .single-forum-post-widget .post-info .author,{{WRAPPER}} .single-forum-post-widget .post-info .post-time',
163 + ]
164 + );
165 +
166 + //parent forum
167 + $this->add_control(
168 + 'parent_forum',
169 + [
170 + 'label' => esc_html__( 'Parent Forum', 'forumax' ),
171 + 'type' => \Elementor\Controls_Manager::HEADING,
172 + 'separator' => 'before',
173 + ]
174 + );
175 +
176 + $this->add_control(
177 + 'parent_forum_color',
178 + [
179 + 'label' => esc_html__( 'Color', 'forumax' ),
180 + 'type' => \Elementor\Controls_Manager::COLOR,
181 + 'selectors' => [
182 + '{{WRAPPER}} .post-content .post-category a' => 'color: {{VALUE}}',
183 + ],
184 + ]
185 + );
186 +
187 + $this->add_control(
188 + 'parent_forum_color_hover',
189 + [
190 + 'label' => esc_html__( 'Hover color', 'forumax' ),
191 + 'type' => \Elementor\Controls_Manager::COLOR,
192 + 'selectors' => [
193 + '{{WRAPPER}} .post-content .post-category a:hover' => 'color: {{VALUE}}',
194 + ],
195 + ]
196 + );
197 +
198 + $this->add_group_control(
199 + \Elementor\Group_Control_Typography::get_type(),
200 + [
201 + 'name' => 'parent_forum_typo',
202 + 'selector' => '{{WRAPPER}} .post-content .post-category a',
203 + ]
204 + );
205 +
206 + $this->end_controls_section();
207 + }
208 +
209 + protected function render() {
210 + $settings = $this->get_settings();
211 + $filter_btns = $settings['filter_btns'] ?? true;
212 +
213 + $topics = new WP_Query( array(
214 + 'post_type' => 'topic',
215 + 'posts_per_page' => ! empty( $settings['ppp2'] ) ? $settings['ppp2'] : 9,
216 + 'order' => $settings['order'] ? $settings['order'] : 'DESC',
217 + ) );
218 + ?>
219 +
220 + <div class="forum-post-widget" data_id="<?php echo esc_attr( $this->get_id() ); ?>">
221 +
222 + <?php
223 + if ( $filter_btns ) :
224 + ?>
225 + <div class="post-filter-widget mb-20 wow fadeInUp">
226 + <div class="single-filter-item">
227 + <a href="#" id="all_filt" data-forum="all" class="data-active">
228 + <i class="icon_grid-2x2"></i><?php esc_html_e( 'All', 'forumax' ) ?>
229 + </a>
230 + </div>
231 + <div class="single-filter-item">
232 + <a href="#" id="populer_filt" data-forum="popular">
233 + <i class="icon_easel"></i><?php esc_html_e( 'Popular', 'forumax' ) ?>
234 + </a>
235 + </div>
236 + <div class="single-filter-item">
237 + <a href="#" id="featured_filt" data-forum="featured">
238 + <i class="icon_ribbon_alt"></i><?php esc_html_e( 'Featured', 'forumax' ) ?>
239 + </a>
240 + </div>
241 + <div class="single-filter-item">
242 + <a href="#" id="recent_filt" data-forum="recent">
243 + <i class="icon_clock_alt"></i><?php esc_html_e( 'Recent', 'forumax' ) ?>
244 + </a>
245 + </div>
246 + <div class="single-filter-item">
247 + <a href="#" id="unloved_filt" data-forum="unloved">
248 + <i class="icon_close_alt2"></i><?php esc_html_e( 'Unloved', 'forumax' ) ?>
249 + </a>
250 + </div>
251 + <div class="single-filter-item">
252 + <a href="#" id="loved_filt" data-forum="loved">
253 + <i class="icon_check_alt2"></i><?php esc_html_e( 'Loved', 'forumax' ) ?>
254 + </a>
255 + </div>
256 + </div>
257 + <?php
258 + endif;
259 + ?>
260 +
261 + <div id="aj-post-filter-widget">
262 + <?php
263 + $delay = 0.0;
264 + $i = 0;
265 + while ( $topics->have_posts() ) : $topics->the_post();
266 + $topic_id = $topics->posts[ $i ]->ID;
267 + $vote_count = get_post_meta( $topic_id, "bbpv-votes", true );
268 + $forum_id = bbp_get_topic_forum_id();
269 + ?>
270 + <div class="single-forum-post-widget wow fadeInUp" data-wow-delay="<?php echo esc_attr( $delay ); ?>s">
271 + <div class="post-content">
272 + <div class="post-title">
273 + <h6><a href="<?php the_permalink(); ?>"> <?php the_title() ?> </a></h6>
274 + </div>
275 + <div class="post-info">
276 + <div class="author">
277 + <img src="<?php echo esc_url( FORUMAX_IMG . 'forum_tab/user-circle-alt.svg' ); ?>" alt="<?php esc_attr_e( 'User circle alt icon',
278 + 'forumax' ); ?>">
279 + <?php
280 + echo wp_kses_post( bbp_get_topic_author_link(
281 + array(
282 + 'post_id' => $topic_id,
283 + 'type' => 'name'
284 + )
285 + ) );
286 + ?>
287 + </div>
288 +
289 + <div class="post-time">
290 + <img src="<?php echo esc_url( FORUMAX_IMG . 'forum_tab/time-outline.svg' ); ?>"
291 + alt="<?php esc_attr_e( 'Time outline icon', 'forumax' ); ?>">
292 + <?php bbp_forum_last_active_time( get_the_ID() ); ?>
293 + </div>
294 + </div>
295 +
296 + <div class="post-category">
297 + <a href="<?php echo esc_url( get_the_permalink( $forum_id ) ); ?>">
298 + <?php echo get_the_post_thumbnail( $forum_id ); ?>
299 + <?php echo esc_html( bbp_get_topic_forum_title() ); ?>
300 + </a>
301 + </div>
302 + </div>
303 + <div class="post-reach">
304 + <div class="post-view">
305 + <img src="<?php echo esc_url( FORUMAX_IMG . 'forum_tab/eye-outline.svg' ); ?>" alt="<?php esc_attr_e( 'Eye outline icon', 'forumax' ); ?>">
306 +
307 + <?php
308 + forumax_topic_view_count( $topic_id );
309 + echo '&nbsp;';
310 + esc_html_e( 'Views', 'forumax' );
311 + ?>
312 + </div>
313 + <div class="post-like">
314 + <img src="<?php echo esc_url( FORUMAX_IMG . 'forum_tab/thumbs-up-outline.svg' ); ?>"
315 + alt="<?php esc_attr_e( 'Thumbs-up outline icon', 'forumax' ); ?>">
316 +
317 + <?php
318 + if ( $vote_count ) {
319 + echo esc_html( $vote_count );
320 + } else {
321 + echo "0";
322 + }
323 +
324 + echo '&nbsp;';
325 + esc_html_e( 'Likes', 'forumax' );
326 + ?>
327 + </div>
328 + <div class="post-comment">
329 + <img src="<?php echo esc_url( FORUMAX_IMG . 'forum_tab/chatbubbles-outline.svg' ); ?>"
330 + alt="<?php esc_attr_e( 'Chat bubbles icon', 'forumax' ); ?>">
331 + <?php
332 + bbp_topic_reply_count( $topic_id );
333 + echo '&nbsp;';
334 + esc_html_e( 'Replies', 'forumax' );
335 + ?>
336 + </div>
337 + </div>
338 + </div>
339 + <?php
340 + $delay += 0.2;
341 + if ( $delay > 0.6 ) {
342 + $delay = 0.0;
343 + }
344 + $i ++;
345 + endwhile;
346 + unset( $delay );
347 + unset( $i );
348 + wp_reset_postdata();
349 + ?>
350 + </div>
351 + </div>
352 + <?php
353 + }
358 354 }