WordPress.org

Making WordPress.org

Ticket #4428: 4428.patch

File 4428.patch, 1.6 KB (added by Clorith, 6 months ago)
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-forum-homepage.php

     
    11<div id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class( bbp_get_forum_id(), array( '' ) ); ?>>
    2        
     2
    33        <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>"><h3><?php bbp_forum_title(); ?></h3></a>
    44        <p><?php bbp_forum_content(); ?></p>
    5         <p><a href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>" class="viewmore"><?php _e( 'View forum', 'wporg-forums' ); ?></a></p>
     5        <p>
     6                <?php $sub_forums = bbp_forum_get_subforums( bbp_get_forum_id() ); ?>
     7
     8                <?php if ( $sub_forums ) : ?>
     9
     10                        <?php foreach ( $sub_forums as $sub_forum ) : ?>
     11                                <a href="<?php bbp_forum_permalink( $sub_forum->ID ); ?>" title="<?php bbp_forum_title( $sub_forum->ID ); ?>" class="viewmore"><?php bbp_forum_title( $sub_forum->ID ); ?></a><br>
     12                        <?php endforeach; ?>
     13
     14                <?php endif; ?>
     15
     16                <?php if ( ! bbp_is_forum_category() ) : ?>
     17
     18                        <a href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>" class="viewmore"><?php _e( 'View forum', 'wporg-forums' ); ?></a>
     19
     20                <?php endif; ?>
     21        </p>
    622
    723</div><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->