-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloop-single-forum.php
94 lines (60 loc) · 2.43 KB
/
loop-single-forum.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
/**
* Forums Loop - Single Forum
*
* @package bbPress
* @subpackage Theme
*/
$user_id = get_current_user_id();
$is_wimp_plus = ( true === is_object( pmpro_getMembershipLevelForUser( $user_id ) ) );
?>
<ul id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>
<li class="bbp-forum-info">
<?php if ( bbp_is_user_home() && bbp_is_subscriptions() ) : ?>
<span class="bbp-row-actions">
<?php do_action( 'bbp_theme_before_forum_subscription_action' ); ?>
<?php bbp_forum_subscription_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '×' ) ); ?>
<?php do_action( 'bbp_theme_after_forum_subscription_action' ); ?>
</span>
<?php endif; ?>
<?php do_action( 'bbp_theme_before_forum_title' ); ?>
<?php if ( $is_wimp_plus ) : ?>
<a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>">
<?php endif; ?>
<?php bbp_forum_title(); ?>
<?php if ( $is_wimp_plus ) : ?>
</a>
<?php endif; ?>
<?php do_action( 'bbp_theme_after_forum_title' ); ?>
<?php do_action( 'bbp_theme_before_forum_description' ); ?>
<div class="bbp-forum-content"><?php bbp_forum_content(); ?></div>
<?php do_action( 'bbp_theme_after_forum_description' ); ?>
<?php do_action( 'bbp_theme_before_forum_sub_forums' ); ?>
<?php bbp_list_forums( array(
'link_before' => '<li class="bbp-forum no-wrap">',
'separator' => '',
'show_reply_count' => false,
) ); ?>
<?php do_action( 'bbp_theme_after_forum_sub_forums' ); ?>
<?php bbp_forum_row_actions(); ?>
</li>
<li class="bbp-forum-topic-count"><?php bbp_forum_topic_count(); ?></li>
<li class="bbp-forum-reply-count"><?php bbp_show_lead_topic() ? bbp_forum_reply_count() : bbp_forum_post_count(); ?></li>
<li class="bbp-forum-freshness">
<?php do_action( 'bbp_theme_before_forum_freshness_link' ); ?>
<?php
if ( $is_wimp_plus ) {
bbp_forum_freshness_link();
} else {
$link = bbp_get_forum_freshness_link();
echo preg_replace( '/<a href=\"(.*?)\">(.*?)<\/a>/', "\\2", $link );
}
?>
<?php do_action( 'bbp_theme_after_forum_freshness_link' ); ?>
<p class="bbp-topic-meta">
<?php do_action( 'bbp_theme_before_topic_author' ); ?>
<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?></span>
<?php do_action( 'bbp_theme_after_topic_author' ); ?>
</p>
</li>
</ul><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->