PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 1.3.2
Forumax – AI Powered Advanced Community Forum Plugin v1.3.2
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 / includes / admin / menu / admin_ui / forums.php

forums.php in Forumax – AI Powered Advanced Community Forum Plugin 1.3.2, at includes/admin/menu/admin_ui/forums.php

71 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="tab-menu <?php echo $count > 12 ? '' : 'short'; ?>">
2 <div class="tab-menu-left-layer"></div>
3 <ul class="easydocs-navbar">
4 <?php
5 $i = 0; // Start with an integer instead of a string to prevent the deprecated warning
6 while ( $forum_query->have_posts() ) :
7 $forum_query->the_post();
8 $i ++;
9 $parent_forums[] = get_the_ID();
10 $current_post = get_the_ID();
11 $is_active = $i == 1 ? 'is-active' : '';
12 $count_children = get_children(
13 [
14 'post_parent' => $current_post,
15 'post_type' => bbp_get_topic_post_type(),
16 'orderby' => 'menu_order',
17 'order' => 'asc',
18 'post_status' => [ 'any', 'spam' ],
19 ]
20 );
21 ?>
22 <li class="easydocs-navitem <?php echo esc_attr( $is_active ); ?>" data-rel="tab-<?php the_ID(); ?>" data-id="<?php the_ID(); ?>">
23 <div class="title">
24 <div class="featured-image">
25 <?php
26 if ( get_the_post_thumbnail( $current_post ) ) :
27 echo get_the_post_thumbnail( $current_post, 'bbpc_32x32' );
28 else :
29 ?>
30 <span class="dashicons dashicons-buddicons-forums"></span>
31 <?php endif; ?>
32 </div>
33
34 <span class="easydocs-forums-title"><?php the_title(); ?></span>
35 </div>
36 <div class="total-page">
37 <span>
38 <?php echo count( $count_children ) > 0 ? count( $count_children ) : ''; ?>
39 </span>
40 </div>
41 <div class="link-wrapper link">
42 <?php if ( current_user_can( 'editor' ) || current_user_can( 'administrator' ) ) : ?>
43 <a href="<?php echo get_edit_post_link( get_the_ID() ); ?>" class="link edit" target="_blank"
44 title="<?php esc_attr_e( 'Edit this forum.', 'bbp-core' ); ?>">
45 <span class="dashicons dashicons-edit"></span>
46 </a>
47 <?php
48 endif;
49 ?>
50
51 <a href="<?php the_permalink(); ?>" class="link external-link" target="_blank" data-id="tab-<?php the_ID(); ?>"
52 title="<?php esc_attr_e( 'View this forum in new tab', 'bbp-core' ); ?>">
53 <span class="dashicons dashicons-external"></span>
54 </a>
55 <?php
56 if ( current_user_can( 'editor' ) || current_user_can( 'administrator' ) ) :
57 ?>
58 <a href="javascript:void(0);" bbp_forum_id="<?php echo get_the_ID(); ?>" class="link forum-delete"
59 title="<?php esc_attr_e( 'Move this forum to the Trash', 'bbp-core' ); ?>">
60 <span class="dashicons dashicons-trash"></span>
61 </a>
62 <?php endif; ?>
63 </div>
64 </li>
65 <?php
66 $forum_parent = get_the_ID();
67 endwhile;
68 wp_reset_postdata();
69 ?>
70 </ul>
71 </div>