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

72 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
43 if ( current_user_can( 'editor' ) || current_user_can( 'administrator' ) ) : ?>
44 <a href="<?php echo esc_url( get_edit_post_link( get_the_ID() ) ); ?>" class="link edit" target="_blank"
45 title="<?php esc_attr_e( 'Edit this forum.', 'bbp-core' ); ?>">
46 <span class="dashicons dashicons-edit"></span>
47 </a>
48 <?php
49 endif;
50 ?>
51
52 <a href="<?php the_permalink(); ?>" class="link external-link" target="_blank" data-id="tab-<?php the_ID(); ?>"
53 title="<?php esc_attr_e( 'View this forum in new tab', 'bbp-core' ); ?>">
54 <span class="dashicons dashicons-external"></span>
55 </a>
56 <?php
57 if ( current_user_can( 'editor' ) || current_user_can( 'administrator' ) ) :
58 ?>
59 <a href="javascript:void(0);" bbp_forum_id="<?php echo esc_attr( get_the_ID() ); ?>" class="link forum-delete"
60 title="<?php esc_attr_e( 'Move this forum to the Trash', 'bbp-core' ); ?>">
61 <span class="dashicons dashicons-trash"></span>
62 </a>
63 <?php endif; ?>
64 </div>
65 </li>
66 <?php
67 $forum_parent = get_the_ID();
68 endwhile;
69 wp_reset_postdata();
70 ?>
71 </ul>
72 </div>