| @@ -1,81 +1,81 @@ | ||
| 1 | -<?php | |
| 2 | -if ( ! class_exists( 'bbPress' ) ) { | |
| 3 | - return; | |
| 4 | -} | |
| 5 | -?> | |
| 6 | -<div class="bbp-core-main"> | |
| 7 | - <div class="bbpc-heading"> | |
| 8 | - <h1 class="wp-heading-inline"><?php esc_html_e( 'BBP Core', 'bbp-core' ); ?></h1> | |
| 9 | - <p class="bbp-core-intro"> | |
| 10 | - <?php esc_html_e( 'Expand bbPress powered forums with useful features.', 'bbp-core' ); ?> | |
| 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( BBPC_ASSETS . '/img/logo.svg' ); ?>" alt="<?php esc_attr_e( 'BBP Core Logo', 'bbp-core' ); ?>"> | |
| 18 | - </div> | |
| 19 | - <ul class="bbpc-group-menu"> | |
| 20 | - <li><a href="admin.php?page=bbp-core-settings"><?php esc_html_e( 'Settings', 'bbp-core' ); ?></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', 'bbp-core' ); ?></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', 'bbp-core' ); ?> </i> | |
| 51 | - </li> | |
| 52 | - | |
| 53 | - <li> | |
| 54 | - <i class="dashicons dashicons-buddicons-topics"></i> | |
| 55 | - <?php echo esc_html( $topic_total ) . esc_html__( ' Topics', 'bbp-core' ); ?> </i> | |
| 56 | - </li> | |
| 57 | - | |
| 58 | - <li> | |
| 59 | - <i class="dashicons dashicons-buddicons-replies"></i> | |
| 60 | - <?php echo esc_html( $reply_total ) . esc_html__( ' Replies', 'bbp-core' ); ?> </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', 'bbp-core' ); ?> </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', 'bbp-core' ); ?> </i> | |
| 72 | - </li> | |
| 73 | - <?php endif; ?> | |
| 74 | - | |
| 75 | - </ul> | |
| 76 | - </div> | |
| 77 | - </div> | |
| 78 | - </div> | |
| 79 | - </div> | |
| 80 | - </div> | |
| 81 | -</div> | |
| 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> | |