Skip to:
Content

bbPress.org

source: trunk/src/templates/default/bbpress/content-archive-forum.php

Last change on this file was 6630, checked in by johnjamesjacoby, 5 years ago

Search: move bbp_allow_search() checks into form template parts.

This allows the inclusion of those forms without needing to wrap each inclusion statement in its own feature check, making search a more atomic and isolated feature within bbPress.

It also should conclude the development of the user content search functionality.

Because this involves some template-part changes to the "Default" template pack, users who have opted to override these parts in their own themes will not receive these updates (nor should they.) This is a known consequence of including template parts in themes, so while still not an ideal system, will not result in any breakage for existing sites.

File size: 653 bytes
Line 
1<?php
2
3/**
4 * Archive Forum Content Part
5 *
6 * @package bbPress
7 * @subpackage Theme
8 */
9
10// Exit if accessed directly
11defined( 'ABSPATH' ) || exit;
12
13?>
14
15<div id="bbpress-forums" class="bbpress-wrapper">
16
17        <?php bbp_get_template_part( 'form', 'search' ); ?>
18
19        <?php bbp_breadcrumb(); ?>
20
21        <?php bbp_forum_subscription_link(); ?>
22
23        <?php do_action( 'bbp_template_before_forums_index' ); ?>
24
25        <?php if ( bbp_has_forums() ) : ?>
26
27                <?php bbp_get_template_part( 'loop',     'forums'    ); ?>
28
29        <?php else : ?>
30
31                <?php bbp_get_template_part( 'feedback', 'no-forums' ); ?>
32
33        <?php endif; ?>
34
35        <?php do_action( 'bbp_template_after_forums_index' ); ?>
36
37</div>
Note: See TracBrowser for help on using the repository browser.