Changeset 4480 for trunk/includes/admin/metaboxes.php
- Timestamp:
- 11/23/2012 10:50:13 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/metaboxes.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/metaboxes.php
r4438 r4480 36 36 37 37 // Get the statistics and extract them 38 extract( bbp_get_statistics(), EXTR_SKIP); ?>38 $r = bbp_get_statistics(); ?> 39 39 40 40 <div class="table table_content"> … … 47 47 48 48 <?php 49 $num = $ forum_count;50 $text = _n( 'Forum', 'Forums', $ forum_count, 'bbpress' );49 $num = $r['forum_count']; 50 $text = _n( 'Forum', 'Forums', $r['forum_count'], 'bbpress' ); 51 51 if ( current_user_can( 'publish_forums' ) ) { 52 52 $link = add_query_arg( array( 'post_type' => bbp_get_forum_post_type() ), get_admin_url( null, 'edit.php' ) ); … … 64 64 65 65 <?php 66 $num = $ topic_count;67 $text = _n( 'Topic', 'Topics', $ topic_count, 'bbpress' );66 $num = $r['topic_count']; 67 $text = _n( 'Topic', 'Topics', $r['topic_count'], 'bbpress' ); 68 68 if ( current_user_can( 'publish_topics' ) ) { 69 69 $link = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit.php' ) ); … … 81 81 82 82 <?php 83 $num = $r eply_count;84 $text = _n( 'Reply', 'Replies', $r eply_count, 'bbpress' );83 $num = $r['reply_count']; 84 $text = _n( 'Reply', 'Replies', $r['reply_count'], 'bbpress' ); 85 85 if ( current_user_can( 'publish_replies' ) ) { 86 86 $link = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), get_admin_url( null, 'edit.php' ) ); … … 100 100 101 101 <?php 102 $num = $ topic_tag_count;103 $text = _n( 'Topic Tag', 'Topic Tags', $ topic_tag_count, 'bbpress' );102 $num = $r['topic_tag_count']; 103 $text = _n( 'Topic Tag', 'Topic Tags', $r['topic_tag_count'], 'bbpress' ); 104 104 if ( current_user_can( 'manage_topic_tags' ) ) { 105 105 $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit-tags.php' ) ); … … 132 132 133 133 <?php 134 $num = $ user_count;135 $text = _n( 'User', 'Users', $ user_count, 'bbpress' );134 $num = $r['user_count']; 135 $text = _n( 'User', 'Users', $r['user_count'], 'bbpress' ); 136 136 if ( current_user_can( 'edit_users' ) ) { 137 137 $link = get_admin_url( null, 'users.php' ); … … 146 146 </tr> 147 147 148 <?php if ( isset( $ topic_count_hidden) ) : ?>148 <?php if ( isset( $r['topic_count_hidden'] ) ) : ?> 149 149 150 150 <tr> 151 151 152 152 <?php 153 $num = $ topic_count_hidden;154 $text = _n( 'Hidden Topic', 'Hidden Topics', $ topic_count_hidden, 'bbpress' );153 $num = $r['topic_count_hidden']; 154 $text = _n( 'Hidden Topic', 'Hidden Topics', $r['topic_count_hidden'], 'bbpress' ); 155 155 $link = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit.php' ) ); 156 156 if ( '0' != $num ) { 157 157 $link = add_query_arg( array( 'post_status' => bbp_get_spam_status_id() ), $link ); 158 158 } 159 $num = '<a href="' . $link . '" title="' . esc_attr( $ hidden_topic_title) . '">' . $num . '</a>';160 $text = '<a class="waiting" href="' . $link . '" title="' . esc_attr( $ hidden_topic_title) . '">' . $text . '</a>';159 $num = '<a href="' . $link . '" title="' . esc_attr( $r['hidden_topic_title'] ) . '">' . $num . '</a>'; 160 $text = '<a class="waiting" href="' . $link . '" title="' . esc_attr( $r['hidden_topic_title'] ) . '">' . $text . '</a>'; 161 161 ?> 162 162 … … 168 168 <?php endif; ?> 169 169 170 <?php if ( isset( $r eply_count_hidden) ) : ?>170 <?php if ( isset( $r['reply_count_hidden'] ) ) : ?> 171 171 172 172 <tr> 173 173 174 174 <?php 175 $num = $r eply_count_hidden;176 $text = _n( 'Hidden Reply', 'Hidden Replies', $r eply_count_hidden, 'bbpress' );175 $num = $r['reply_count_hidden']; 176 $text = _n( 'Hidden Reply', 'Hidden Replies', $r['reply_count_hidden'], 'bbpress' ); 177 177 $link = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), get_admin_url( null, 'edit.php' ) ); 178 178 if ( '0' != $num ) { 179 179 $link = add_query_arg( array( 'post_status' => bbp_get_spam_status_id() ), $link ); 180 180 } 181 $num = '<a href="' . $link . '" title="' . esc_attr( $ hidden_reply_title) . '">' . $num . '</a>';182 $text = '<a class="waiting" href="' . $link . '" title="' . esc_attr( $ hidden_reply_title) . '">' . $text . '</a>';181 $num = '<a href="' . $link . '" title="' . esc_attr( $r['hidden_reply_title'] ) . '">' . $num . '</a>'; 182 $text = '<a class="waiting" href="' . $link . '" title="' . esc_attr( $r['hidden_reply_title'] ) . '">' . $text . '</a>'; 183 183 ?> 184 184 … … 190 190 <?php endif; ?> 191 191 192 <?php if ( bbp_allow_topic_tags() && isset( $ empty_topic_tag_count) ) : ?>192 <?php if ( bbp_allow_topic_tags() && isset( $r['empty_topic_tag_count'] ) ) : ?> 193 193 194 194 <tr> 195 195 196 196 <?php 197 $num = $ empty_topic_tag_count;198 $text = _n( 'Empty Topic Tag', 'Empty Topic Tags', $ empty_topic_tag_count, 'bbpress' );197 $num = $r['empty_topic_tag_count']; 198 $text = _n( 'Empty Topic Tag', 'Empty Topic Tags', $r['empty_topic_tag_count'], 'bbpress' ); 199 199 $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit-tags.php' ) ); 200 200 $num = '<a href="' . $link . '">' . $num . '</a>';
Note: See TracChangeset
for help on using the changeset viewer.