PluginProbe
wpForo Forum / 3.2.0
wpForo Forum v3.2.0
3.2.0 3.1.7 3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 All 140 releases
wpforo / themes / classic / layouts / 4 / forum-sub.php

forum-sub.php in wpForo Forum 3.2.0, at themes/classic/layouts/4/forum-sub.php

47 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly
3 if( ! defined( 'ABSPATH' ) ) exit;
4
5 $items_count = 0;
6 $childs = WPF()->forum->get_childs( $cat['forumid'] );
7 $childs[] = $cat['forumid'];
8 $args = [ 'row_count' => wpforo_setting( 'forums', 'layout_threaded_intro_topics_count' ), 'forumids' => $childs, 'orderby' => 'type, modified', 'order' => 'DESC' ];
9 $topics = WPF()->topic->get_topics( $args, $items_count );
10 $load_more = $items_count >= wpforo_setting( 'forums', 'layout_threaded_intro_topics_count' );
11 if( ! wpforo_setting( 'forums', 'layout_threaded_display_subforums' ) ) {
12 $args = [ 'parentid' => $cat['forumid'] ];
13 $childs = WPF()->forum->get_child_forums( $cat['forumid'] );
14 }
15 $childs = apply_filters( 'wpforo_sub_forum_list_threaded_layout', $childs );
16 ?>
17
18 <div id="wpf-cat-<?php echo $cat['forumid'] ?>" class="wpfl-4">
19 <div class="wpforo-category">
20 <div class="cat-title"><?php echo esc_html( $cat['title'] ); ?></div>
21 </div>
22
23 <div id="wpf-forums-<?php echo $cat['forumid'] ?>" class="wpf-cat-forums">
24 <div class="wpf-cat-forum-list">
25 <?php if( ! empty( $childs ) ): ?>
26 <?php foreach( $childs as $child ): ?>
27 <?php if( $child == $cat['forumid'] || ! WPF()->perm->forum_can( 'vf', $child ) ) continue;
28 $forum = wpforo_forum( $child ); ?>
29 <div class="wpf-forum-item <?php wpforo_unread( $child, 'forum' ); ?>">
30 <span class="wpf-circle wpf-s" style="border: 1px dashed <?php echo $forum['color'] ?>; color: <?php echo $forum['color'] ?>; display: inline-flex; margin-right: 8px;">
31 <i class="<?php echo $forum['icon'] ?>"></i>
32 </span>
33 <?php $forum_description = ( wpfval( $forum, 'description' ) ) ? 'wpf-tooltip="' . esc_attr( strip_tags( (string) $forum['description'] ) ) . '" wpf-tooltip-size="long"' : ''; ?>
34 <a href="<?php echo esc_url( (string) $forum['url'] ); ?>" <?php echo $forum_description ?>>
35 <?php echo esc_html( $forum['title'] ); ?>
36 <span class="wpf-forum-item-stat">&nbsp;<?php echo '<span wpf-tooltip="' . esc_attr( wpforo_phrase( 'Threads', false ) ) . '">' . wpforo_print_number( $forum['topics'] ) . '</span> <sep>/</sep> <span wpf-tooltip="' . esc_attr( wpforo_phrase( 'Posts', false ) ) . '">' . wpforo_print_number( $forum['posts'] ) . '</span>' ?></span>
37 </a>
38 </div>
39 <?php endforeach; ?>
40 <?php else: ?>
41 <p><?php wpforo_phrase( 'No forum found in this category' ) ?></p>
42 <?php endif; ?>
43 </div>
44 </div>
45 </div>
46 <!-- wpfl-4 -->
47