Skip to:
Content

bbPress.org

Changeset 4497


Ignore:
Timestamp:
11/24/2012 06:14:06 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Extract:

  • Remove extract() from extra statistics page template.
  • See #2056.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/templates/default/extras/page-forum-statistics.php

    r4225 r4497  
    99
    1010// Get the statistics and extract them for later use in this template
    11 // @todo - remove variable references
    12 extract( bbp_get_statistics(), EXTR_SKIP );
     11$stats = bbp_get_statistics();
    1312
    1413get_header(); ?>
     
    3433                                                <dt><?php _e( 'Registered Users', 'bbpress' ); ?></dt>
    3534                                                <dd>
    36                                                         <strong><?php echo $user_count; ?></strong>
     35                                                        <strong><?php echo $stats['user_count']; ?></strong>
    3736                                                </dd>
    3837
    3938                                                <dt><?php _e( 'Forums', 'bbpress' ); ?></dt>
    4039                                                <dd>
    41                                                         <strong><?php echo $forum_count; ?></strong>
     40                                                        <strong><?php echo $stats['forum_count']; ?></strong>
    4241                                                </dd>
    4342
    4443                                                <dt><?php _e( 'Topics', 'bbpress' ); ?></dt>
    4544                                                <dd>
    46                                                         <strong><?php echo $topic_count; ?></strong>
     45                                                        <strong><?php echo $stats['topic_count']; ?></strong>
    4746                                                </dd>
    4847
    4948                                                <dt><?php _e( 'Replies', 'bbpress' ); ?></dt>
    5049                                                <dd>
    51                                                         <strong><?php echo $reply_count; ?></strong>
     50                                                        <strong><?php echo $stats['reply_count']; ?></strong>
    5251                                                </dd>
    5352
    5453                                                <dt><?php _e( 'Topic Tags', 'bbpress' ); ?></dt>
    5554                                                <dd>
    56                                                         <strong><?php echo $topic_tag_count; ?></strong>
     55                                                        <strong><?php echo $stats['topic_tag_count']; ?></strong>
    5756                                                </dd>
    5857
    59                                                 <?php if ( !empty( $empty_topic_tag_count ) ) : ?>
     58                                                <?php if ( !empty( $stats['empty_topic_tag_count'] ) ) : ?>
    6059
    6160                                                        <dt><?php _e( 'Empty Topic Tags', 'bbpress' ); ?></dt>
    6261                                                        <dd>
    63                                                                 <strong><?php echo $empty_topic_tag_count; ?></strong>
     62                                                                <strong><?php echo $stats['empty_topic_tag_count']; ?></strong>
    6463                                                        </dd>
    6564
    6665                                                <?php endif; ?>
    6766
    68                                                 <?php if ( !empty( $topic_count_hidden ) ) : ?>
     67                                                <?php if ( !empty( $stats['topic_count_hidden'] ) ) : ?>
    6968
    7069                                                        <dt><?php _e( 'Hidden Topics', 'bbpress' ); ?></dt>
    7170                                                        <dd>
    7271                                                                <strong>
    73                                                                         <abbr title="<?php echo esc_attr( $hidden_topic_title ); ?>"><?php echo $topic_count_hidden; ?></abbr>
     72                                                                        <abbr title="<?php echo esc_attr( $stats['hidden_topic_title'] ); ?>"><?php echo $stats['topic_count_hidden']; ?></abbr>
    7473                                                                </strong>
    7574                                                        </dd>
     
    7776                                                <?php endif; ?>
    7877
    79                                                 <?php if ( !empty( $reply_count_hidden ) ) : ?>
     78                                                <?php if ( !empty( $stats['reply_count_hidden'] ) ) : ?>
    8079
    8180                                                        <dt><?php _e( 'Hidden Replies', 'bbpress' ); ?></dt>
    8281                                                        <dd>
    8382                                                                <strong>
    84                                                                         <abbr title="<?php echo esc_attr( $hidden_reply_title ); ?>"><?php echo $reply_count_hidden; ?></abbr>
     83                                                                        <abbr title="<?php echo esc_attr( $stats['hidden_reply_title'] ); ?>"><?php echo $stats['reply_count_hidden']; ?></abbr>
    8584                                                                </strong>
    8685                                                        </dd>
     
    120119        <?php do_action( 'bbp_after_main_content' ); ?>
    121120
     121<?php unset( $stats ); ?>
     122
    122123<?php get_sidebar(); ?>
    123 <?php get_footer(); ?>
     124
     125<?php get_footer();
Note: See TracChangeset for help on using the changeset viewer.