PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / trunk
Forumax – AI Powered Advanced Community Forum Plugin vtrunk
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 / statistics.php

statistics.php in Forumax – AI Powered Advanced Community Forum Plugin trunk, at includes/admin/menu/statistics.php

82 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! class_exists( 'bbPress' ) ) {
3 return;
4 }
5 ?>
6 <div class="forumax-main">
7 <div class="bbpc-heading">
8 <h1 class="wp-heading-inline"><?php esc_html_e( 'Forumax', 'forumax' ); ?></h1>
9 <p class="forumax-intro">
10 <?php esc_html_e( 'Expand bbPress powered forums with useful features.', 'forumax' ); ?>
11 </p>
12 </div>
13
14 <div class="bbpc-dashboard">
15 <div class="bbpc-panel">
16 <div class="bbpc-logo">
17 <img src="<?php echo esc_url( FORUMAX_ASSETS . '/img/logo.svg' ); ?>" alt="<?php esc_attr_e( 'Forumax Logo', 'forumax' ); ?>">
18 </div>
19 <ul class="bbpc-group-menu">
20 <li><a href="admin.php?page=forumax-settings"><?php esc_html_e( 'Settings', 'forumax' ); ?></a></li>
21 </ul>
22 </div>
23
24 <div class="bbpc-stats">
25 <?php
26 $stat = bbp_get_statistics();
27
28 // TODO: Add another panel for user statistics.
29
30 $forum_total = $stat['forum_count_int'] ?? 0;
31 $topic_total = ( $stat['topic_count_int'] ?? 0 ) - ( $stat['topic_count_hidden_int'] ?? 0 );
32 $reply_posts = $stat['topic_tag_count_int'] ?? 0;
33 $reply_total = ( $stat['reply_count_int'] ?? 0 ) - ( $stat['reply_count_hidden'] ?? 0 );
34 $topic_tag_count = $stat['topic_tag_count'] ?? 0;
35
36 if ( current_user_can( 'edit_topic_tags' ) ) {
37 $empty_topic_tag_count = $stat['empty_topic_tag_count_int'] ?? 0;
38 }
39 ?>
40 <div class="bbpc-stat-cards">
41 <div class="bbpc-stat-card forum-stats">
42 <div class="bbpc-card-heading">
43 <h2><?php esc_html_e( 'User Stats', 'forumax' ); ?></h2>
44 </div>
45
46 <div class="bbpc-card-data">
47 <ul class="forum-info">
48 <li>
49 <i class="dashicons dashicons-buddicons-forums"></i>
50 <?php echo esc_html( $forum_total ) . esc_html__( ' Forums', 'forumax' ); ?> </i>
51 </li>
52
53 <li>
54 <i class="dashicons dashicons-buddicons-topics"></i>
55 <?php echo esc_html( $topic_total ) . esc_html__( ' Topics', 'forumax' ); ?> </i>
56 </li>
57
58 <li>
59 <i class="dashicons dashicons-buddicons-replies"></i>
60 <?php echo esc_html( $reply_total ) . esc_html__( ' Replies', 'forumax' ); ?> </i>
61 </li>
62
63 <li>
64 <i class="dashicons dashicons-tag"></i>
65 <?php echo esc_html( $topic_tag_count ) . esc_html__( ' Topic Tags', 'forumax' ); ?> </i>
66 </li>
67
68 <?php if ( isset( $empty_topic_tag_count ) ) : ?>
69 <li>
70 <i class="dashicons dashicons-tag"></i>
71 <?php echo esc_html( $empty_topic_tag_count ) . esc_html__( ' Empty Topic Tags', 'forumax' ); ?> </i>
72 </li>
73 <?php endif; ?>
74
75 </ul>
76 </div>
77 </div>
78 </div>
79 </div>
80 </div>
81 </div>
82