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

65 lines 2.3 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 = '';
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 tab-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 <?php
25 if ( get_the_post_thumbnail($current_post) ) :
26 echo get_the_post_thumbnail( $current_post, 'bbpc_32x32' );
27 else : ?>
28 <span class="dashicons dashicons-buddicons-forums"></span>
29 <?php endif; ?>
30 <span class="easydocs-forums-title"><?php the_title(); ?></span>
31 </div>
32 <div class="total-page">
33 <span>
34 <?php echo count( $count_children ) > 0 ? count( $count_children ) : ''; ?>
35 </span>
36 </div>
37 <div class="link">
38 <?php if ( current_user_can( 'editor' ) || current_user_can( 'administrator' ) ) : ?>
39 <a href="<?php echo get_edit_post_link( get_the_ID() ); ?>" class="link edit" target="_blank" title="<?php esc_attr_e( 'Edit this forum.', 'bbp-core' ); ?>">
40 <span class="dashicons dashicons-edit"></span>
41 </a>
42 <?php
43 endif;
44 ?>
45
46 <a href="<?php the_permalink(); ?>" class="link external-link" target="_blank" data-id="tab-<?php the_ID(); ?>" title="<?php esc_attr_e( 'View this forum in new tab', 'bbp-core' ); ?>">
47 <span class="dashicons dashicons-external"></span>
48 </a>
49 <?php
50 if ( current_user_can( 'editor' ) || current_user_can( 'administrator' ) ) :
51 ?>
52 <a href="<?php echo admin_url( 'admin.php' ); ?>/menu/Delete_Forum.php?forum_ID=<?php echo get_the_ID(); ?>" class="link forum-delete" title="<?php esc_attr_e( 'Move this forum to the Trash', 'bbp-core' ); ?>">
53 <span class="dashicons dashicons-trash"></span>
54 </a>
55 <?php endif; ?>
56 </div>
57 </li>
58 <?php
59 $forum_parent = get_the_ID();
60 endwhile;
61 wp_reset_postdata();
62 ?>
63 </ul>
64 </div>
65