Skip to:
Content

bbPress.org

Changeset 2352


Ignore:
Timestamp:
08/12/2009 06:03:34 AM (17 years ago)
Author:
sambauers
Message:

Filter the list of stats. Fixes #1169.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-admin/index.php

    r2217 r2352  
    3030$rn_topic_tags_average = sprintf(__ngettext('<span>%d</span> tag', '<span>%d</span> tags', $rn_topic_tags_average), $rn_topic_tags_average);
    3131
     32$rn = apply_filters( 'bb_admin_right_now', array(
     33    'forums'     => array( $rn_forums, '-' ),
     34    'topics'     => array( $rn_topics, $rn_topics_average ),
     35    'posts'      => array( $rn_posts, $rn_posts_average ),
     36    'topic_tags' => array( $rn_topic_tags, $rn_topic_tags_average ),
     37    'users'      => array( $rn_users, $rn_users_average )
     38) );
     39
    3240$bb_admin_body_class = ' bb-admin-dashboard';
    3341
     
    4957                    </tr>
    5058                </thead>
     59<?php
     60if ( !empty( $rn ) && is_array( $rn ) ) {
     61?>
    5162                <tbody>
     63<?php
     64    foreach ( $rn as $rn_row ) {
     65?>
    5266                    <tr>
    53                         <td><?php echo $rn_forums; ?></td>
    54                         <td>-</td>
     67                        <td><?php echo $rn_row[0]; ?></td>
     68                        <td><?php echo $rn_row[1]; ?></td>
    5569                    </tr>
    56                     <tr>
    57                         <td><?php echo $rn_topics; ?></td>
    58                         <td><?php echo $rn_topics_average; ?></td>
    59                     </tr>
    60                     <tr>
    61                         <td><?php echo $rn_posts; ?></td>
    62                         <td><?php echo $rn_posts_average; ?></td>
    63                     </tr>
    64                     <tr>
    65                         <td><?php echo $rn_topic_tags; ?></td>
    66                         <td><?php echo $rn_topic_tags_average; ?></td>
    67                     </tr>
    68                     <tr>
    69                         <td><?php echo $rn_users; ?></td>
    70                         <td><?php echo $rn_users_average; ?></td>
    71                     </tr>
     70<?php
     71    }
     72?>
    7273                </tbody>
     74<?php
     75}
     76?>
    7377            </table>
    7478        </div>
Note: See TracChangeset for help on using the changeset viewer.