Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** Forum shortcodes ******************************************************/
- /**
- * Display an index of all visible root level forums in an output buffer
- * and return to ensure that post/page contents are displayed first.
- *
- * @since bbPress (r3031)
- *
- * @param array $attr
- * @param string $content
- * @uses bbp_has_forums()
- * @uses current_theme_supports()
- * @uses get_template_part()
- * @return string
- */
- public function display_forum_index( $attr ) {
- //Use the $tumbledata global to check for breadcrumbs inclusion
- global $tumbledata;
- extract(shortcode_atts( array( 'breadcrumbs' => 'true',
- 'recent_topics' => 'true' ),
- $attr));
- // Unset globals
- $this->unset_globals();
- // Start output buffer
- $this->start( 'bbp_forum_archive' );
- if($tumbledata['activate_breadcrumbs_block'] == 1) {
- if ( $breadcrumbs == 'true' ) {
- // Get Primary Header
- bbp_get_template_part( 'bbpress/content', 'forum-header' );
- }
- }
- // Template notices
- do_action( 'bbp_template_notices' );
- // Before forums index
- do_action( 'bbp_template_before_forums_index' );
- // Load the forums index
- if ( bbp_has_forums() )
- bbp_get_template_part( 'bbpress/content', 'archive-forum' );
- // No forums
- else
- bbp_get_template_part( 'bbpress/feedback', 'no-forums' );
- // After forums index
- do_action( 'bbp_template_after_forums_index' );
- if($tumbledata['activate_topics_home_block'] == 1) {
- if ( $recent_topics == 'true' ) {
- // List Topics
- bbp_get_template_part( 'bbpress/loop', 'topics-custom' );
- }
- }
- // Return contents of output buffer
- return $this->end();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement