Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/14/2011 11:11:26 PM (16 years ago)
Author:
johnjamesjacoby
Message:

Improve bbp_list_subforums function with additional formatting args

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-forum-template.php

    r2806 r2808  
    479479                'link_before'       => '<li class="bbp-forum">',
    480480                'link_after'        => '</li>',
     481                'count_before'      => ' (',
     482                'count_after'       => ')',
     483                'count_sep'         => ', ',
    481484                'separator'         => ', ',
    482485                'forum_id'          => '',
     
    501504                        // Show topic and reply counts
    502505                        if ( !empty( $show_topic_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
    503                                 $topic_count = ' (' . bbp_get_forum_topic_count( $sub_forum->ID ) . ')';
     506                                $count['topic'] = bbp_get_forum_topic_count( $sub_forum->ID );
    504507
    505508                        if ( !empty( $show_reply_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
    506                                 $reply_count = ' (' . bbp_get_forum_reply_count( $sub_forum->ID ) . ')';
    507 
    508                         $output .= $link_before . '<a href="' . $permalink . '" class="bbp-forum-link">' . $title . $topic_count . $reply_count . '</a>' . $show_sep . $link_after;
     509                                $count['reply'] = bbp_get_forum_reply_count( $sub_forum->ID );
     510
     511                        $output .= $link_before . '<a href="' . $permalink . '" class="bbp-forum-link">' . $title . $count_before . implode( $count_sep, $count ) . $count_after . '</a>' . $show_sep . $link_after;
    509512                }
    510513
Note: See TracChangeset for help on using the changeset viewer.