Skip to:
Content

bbPress.org

Changeset 6542


Ignore:
Timestamp:
06/14/2017 02:14:39 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Statistics: Improvements to "At a Glance" integration.

  • Prefer bbp_get_total_users() over count_users() to speed up loading
  • Don't include empty array values
  • Don't link to areas the current user cannot access
  • Skip if current user cannot at least spectate (blocked or no access)

Fixes #2770.

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bbpress.php

    r6535 r6542  
    205205        /** Versions **********************************************************/
    206206
    207         $this->version    = '2.6-rc-6535';
     207        $this->version    = '2.6-rc-6541';
    208208        $this->db_version = '262';
    209209
  • trunk/src/includes/admin/assets/css/admin.css

    r6537 r6542  
    5353#dashboard_right_now a.bbp-glance-topic-tags:before {
    5454    content: "\f323";
     55}
     56
     57#dashboard_right_now a.bbp-glance-users:before {
     58    content: "\f110";
    5559}
    5660
  • trunk/src/includes/admin/metaboxes.php

    r6438 r6542  
    2020function bbp_filter_dashboard_glance_items( $elements = array() ) {
    2121
     22    // Bail if user cannot spectate
     23    if ( ! current_user_can( 'spectate' ) ) {
     24        return $elements;
     25    }
     26
    2227    // Get the statistics
    23     $r = bbp_get_statistics();
     28    $r = bbp_get_statistics( array(
     29        'count_pending_topics'  => false,
     30        'count_private_topics'  => false,
     31        'count_spammed_topics'  => false,
     32        'count_trashed_topics'  => false,
     33        'count_pending_replies' => false,
     34        'count_private_replies' => false,
     35        'count_spammed_replies' => false,
     36        'count_trashed_replies' => false,
     37        'count_empty_tags'      => false
     38    ));
     39
     40    // Users
     41    if ( isset( $r['user_count'] ) ) {
     42        $link       = admin_url( 'users.php' );
     43        $text       = sprintf( _n( '%s User', '%s Users', $r['user_count_int'], 'bbpress' ), $r['user_count'] );
     44        $elements[] = current_user_can( 'edit_users' )
     45            ? '<a href="' . esc_url( $link ) . '" class="bbp-glance-users">' . esc_html( $text ) . '</a>'
     46            : esc_html( $text );
     47    }
    2448
    2549    // Forums
    26     if ( current_user_can( 'publish_forums' ) ) {
    27         $link       = add_query_arg( array( 'post_type' => bbp_get_forum_post_type() ), get_admin_url( null, 'edit.php' ) );
     50    if ( isset( $r['forum_count'] ) ) {
     51        $link       = add_query_arg( array( 'post_type' => bbp_get_forum_post_type() ), admin_url( 'edit.php' ) );
    2852        $text       = sprintf( _n( '%s Forum', '%s Forums', $r['forum_count_int'], 'bbpress' ), $r['forum_count'] );
    29         $elements[] = '<a href="' . esc_url( $link ) . '" class="bbp-glance-forums">' . esc_html( $text ) . '</a>';
     53        $elements[] = current_user_can( 'publish_forums' )
     54            ? '<a href="' . esc_url( $link ) . '" class="bbp-glance-forums">' . esc_html( $text ) . '</a>'
     55            : esc_html( $text );
    3056    }
    3157
    3258    // Topics
    33     if ( current_user_can( 'publish_topics' ) ) {
    34         $link       = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit.php' ) );
     59    if ( isset( $r['topic_count'] ) ) {
     60        $link       = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) );
    3561        $text       = sprintf( _n( '%s Topic', '%s Topics', $r['topic_count_int'], 'bbpress' ), $r['topic_count'] );
    36         $elements[] = '<a href="' . esc_url( $link ) . '" class="bbp-glance-topics">' . esc_html( $text ) . '</a>';
     62        $elements[] = current_user_can( 'publish_topics' )
     63            ? '<a href="' . esc_url( $link ) . '" class="bbp-glance-topics">' . esc_html( $text ) . '</a>'
     64            : esc_html( $text );
    3765    }
    3866
    3967    // Replies
    40     if ( current_user_can( 'publish_replies' ) ) {
    41         $link       = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), get_admin_url( null, 'edit.php' ) );
     68    if ( isset( $r['reply_count'] ) ) {
     69        $link       = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) );
    4270        $text       = sprintf( _n( '%s Reply', '%s Replies', $r['reply_count_int'], 'bbpress' ), $r['reply_count'] );
    43         $elements[] = '<a href="' . esc_url( $link ) . '" class="bbp-glance-replies">' . esc_html( $text ) . '</a>';
     71        $elements[] = current_user_can( 'publish_replies' )
     72            ? '<a href="' . esc_url( $link ) . '" class="bbp-glance-replies">' . esc_html( $text ) . '</a>'
     73            : esc_html( $text );
    4474    }
    4575
    4676    // Topic Tags
    47     if ( bbp_allow_topic_tags() && current_user_can( 'manage_topic_tags' ) ) {
    48         $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' ) );
     77    if ( bbp_allow_topic_tags() && isset( $r['topic_tag_count'] ) ) {
     78        $link       = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit-tags.php' ) );
    4979        $text       = sprintf( _n( '%s Topic Tag', '%s Topic Tags', $r['topic_tag_count_int'], 'bbpress' ), $r['topic_tag_count'] );
    50         $elements[] = '<a href="' . esc_url( $link ) . '" class="bbp-glance-topic-tags">' . esc_html( $text ) . '</a>';
     80        $elements[] = current_user_can( 'manage_topic_tags' )
     81            ? '<a href="' . esc_url( $link ) . '" class="bbp-glance-topic-tags">' . esc_html( $text ) . '</a>'
     82            : esc_html( $text );
    5183    }
    5284
     
    97129                    $text = _n( 'Forum', 'Forums', $r['forum_count_int'], 'bbpress' );
    98130                    if ( current_user_can( 'publish_forums' ) ) {
    99                         $link = add_query_arg( array( 'post_type' => bbp_get_forum_post_type() ), get_admin_url( null, 'edit.php' ) );
     131                        $link = add_query_arg( array( 'post_type' => bbp_get_forum_post_type() ), admin_url( 'edit.php' ) );
    100132                        $num  = '<a href="' . esc_url( $link ) . '">' . $num  . '</a>';
    101133                        $text = '<a href="' . esc_url( $link ) . '">' . $text . '</a>';
     
    114146                    $text = _n( 'Topic', 'Topics', $r['topic_count_int'], 'bbpress' );
    115147                    if ( current_user_can( 'publish_topics' ) ) {
    116                         $link = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit.php' ) );
     148                        $link = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) );
    117149                        $num  = '<a href="' . esc_url( $link ) . '">' . $num  . '</a>';
    118150                        $text = '<a href="' . esc_url( $link ) . '">' . $text . '</a>';
     
    131163                    $text = _n( 'Reply', 'Replies', $r['reply_count_int'], 'bbpress' );
    132164                    if ( current_user_can( 'publish_replies' ) ) {
    133                         $link = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), get_admin_url( null, 'edit.php' ) );
     165                        $link = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) );
    134166                        $num  = '<a href="' . esc_url( $link ) . '">' . $num  . '</a>';
    135167                        $text = '<a href="' . esc_url( $link ) . '">' . $text . '</a>';
     
    150182                        $text = _n( 'Topic Tag', 'Topic Tags', $r['topic_tag_count_int'], 'bbpress' );
    151183                        if ( current_user_can( 'manage_topic_tags' ) ) {
    152                             $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' ) );
     184                            $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit-tags.php' ) );
    153185                            $num  = '<a href="' . esc_url( $link ) . '">' . $num  . '</a>';
    154186                            $text = '<a href="' . esc_url( $link ) . '">' . $text . '</a>';
     
    182214                    $text = _n( 'User', 'Users', $r['user_count_int'], 'bbpress' );
    183215                    if ( current_user_can( 'edit_users' ) ) {
    184                         $link = get_admin_url( null, 'users.php' );
     216                        $link = admin_url( 'users.php' );
    185217                        $num  = '<a href="' . $link . '">' . $num  . '</a>';
    186218                        $text = '<a href="' . $link . '">' . $text . '</a>';
     
    200232                        $num  = $r['topic_count_hidden'];
    201233                        $text = _n( 'Hidden Topic', 'Hidden Topics', $r['topic_count_hidden_int'], 'bbpress' );
    202                         $link = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit.php' ) );
     234                        $link = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) );
    203235                        if ( '0' !== $num ) {
    204236                            $link = add_query_arg( array( 'post_status' => bbp_get_spam_status_id() ), $link );
     
    222254                        $num  = $r['reply_count_hidden'];
    223255                        $text = _n( 'Hidden Reply', 'Hidden Replies', $r['reply_count_hidden_int'], 'bbpress' );
    224                         $link = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), get_admin_url( null, 'edit.php' ) );
     256                        $link = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) );
    225257                        if ( '0' !== $num ) {
    226258                            $link = add_query_arg( array( 'post_status' => bbp_get_spam_status_id() ), $link );
     
    244276                        $num  = $r['empty_topic_tag_count'];
    245277                        $text = _n( 'Empty Topic Tag', 'Empty Topic Tags', $r['empty_topic_tag_count_int'], 'bbpress' );
    246                         $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' ) );
     278                        $link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit-tags.php' ) );
    247279                        $num  = '<a href="' . esc_url( $link ) . '">' . $num  . '</a>';
    248280                        $text = '<a class="waiting" href="' . esc_url( $link ) . '">' . $text . '</a>';
  • trunk/src/includes/common/functions.php

    r6529 r6542  
    323323
    324324    // Defaults
    325     $user_count            = 0;
    326     $forum_count           = 0;
    327     $topic_count           = 0;
    328     $topic_count_hidden    = 0;
    329     $reply_count           = 0;
    330     $reply_count_hidden    = 0;
    331     $topic_tag_count       = 0;
    332     $empty_topic_tag_count = 0;
     325    $topic_count     = $topic_count_hidden    = 0;
     326    $reply_count     = $reply_count_hidden    = 0;
     327    $topic_tag_count = $empty_topic_tag_count = 0;
    333328
    334329    // Users
    335     if ( ! empty( $r['count_users'] ) ) {
    336         $user_count = bbp_get_total_users();
    337     }
     330    $user_count = ! empty( $r['count_users'] )
     331        ? bbp_get_total_users()
     332        : 0;
    338333
    339334    // Forums
    340     if ( ! empty( $r['count_forums'] ) ) {
    341         $forum_count = wp_count_posts( bbp_get_forum_post_type() )->publish;
    342     }
     335    $forum_count = ! empty( $r['count_forums'] )
     336        ? wp_count_posts( bbp_get_forum_post_type() )->publish
     337        : 0;
    343338
    344339    // Post statuses
     
    362357
    363358            // Pending
    364             $topics['pending'] = ( ! empty( $r['count_pending_topics'] ) && current_user_can( 'edit_others_topics' ) ) ? (int) $all_topics->{$pending} : 0;
     359            $topics['pending'] = ( ! empty( $r['count_pending_topics'] ) && current_user_can( 'edit_others_topics' ) )
     360                ? (int) $all_topics->{$pending}
     361                : 0;
    365362
    366363            // Private
    367             $topics['private'] = ( ! empty( $r['count_private_topics'] ) && current_user_can( 'read_private_topics' ) ) ? (int) $all_topics->{$private} : 0;
     364            $topics['private'] = ( ! empty( $r['count_private_topics'] ) && current_user_can( 'read_private_topics' ) )
     365                ? (int) $all_topics->{$private}
     366                : 0;
    368367
    369368            // Spam
    370             $topics['spammed'] = ( ! empty( $r['count_spammed_topics'] ) && current_user_can( 'edit_others_topics'  ) ) ? (int) $all_topics->{$spam}    : 0;
     369            $topics['spammed'] = ( ! empty( $r['count_spammed_topics'] ) && current_user_can( 'edit_others_topics'  ) )
     370                ? (int) $all_topics->{$spam}
     371                : 0;
    371372
    372373            // Trash
    373             $topics['trashed'] = ( ! empty( $r['count_trashed_topics'] ) && current_user_can( 'view_trash'          ) ) ? (int) $all_topics->{$trash}   : 0;
     374            $topics['trashed'] = ( ! empty( $r['count_trashed_topics'] ) && current_user_can( 'view_trash' ) )
     375                ? (int) $all_topics->{$trash}
     376                : 0;
    374377
    375378            // Total hidden (pending + private + spam + trash)
     
    377380
    378381            // Generate the hidden topic count's title attribute
    379             $topic_titles[] = ! empty( $topics['pending'] ) ? sprintf( __( 'Pending: %s', 'bbpress' ), bbp_number_format_i18n( $topics['pending'] ) ) : '';
    380             $topic_titles[] = ! empty( $topics['private'] ) ? sprintf( __( 'Private: %s', 'bbpress' ), bbp_number_format_i18n( $topics['private'] ) ) : '';
    381             $topic_titles[] = ! empty( $topics['spammed'] ) ? sprintf( __( 'Spammed: %s', 'bbpress' ), bbp_number_format_i18n( $topics['spammed'] ) ) : '';
    382             $topic_titles[] = ! empty( $topics['trashed'] ) ? sprintf( __( 'Trashed: %s', 'bbpress' ), bbp_number_format_i18n( $topics['trashed'] ) ) : '';
     382            $topic_titles[] = ! empty( $topics['pending'] )
     383                ? sprintf( esc_html__( 'Pending: %s', 'bbpress' ), bbp_number_format_i18n( $topics['pending'] ) )
     384                : '';
     385
     386            $topic_titles[] = ! empty( $topics['private'] )
     387                ? sprintf( esc_html__( 'Private: %s', 'bbpress' ), bbp_number_format_i18n( $topics['private'] ) )
     388                : '';
     389
     390            $topic_titles[] = ! empty( $topics['spammed'] )
     391                ? sprintf( esc_html__( 'Spammed: %s', 'bbpress' ), bbp_number_format_i18n( $topics['spammed'] ) )
     392                : '';
     393
     394            $topic_titles[] = ! empty( $topics['trashed'] )
     395                ? sprintf( esc_html__( 'Trashed: %s', 'bbpress' ), bbp_number_format_i18n( $topics['trashed'] ) )
     396                : '';
    383397
    384398            // Compile the hidden topic title
     
    401415
    402416            // Pending
    403             $replies['pending'] = ( ! empty( $r['count_pending_replies'] ) && current_user_can( 'edit_others_replies' ) ) ? (int) $all_replies->{$pending} : 0;
     417            $replies['pending'] = ( ! empty( $r['count_pending_replies'] ) && current_user_can( 'edit_others_replies' ) )
     418                ? (int) $all_replies->{$pending}
     419                : 0;
    404420
    405421            // Private
    406             $replies['private'] = ( ! empty( $r['count_private_replies'] ) && current_user_can( 'read_private_replies' ) ) ? (int) $all_replies->{$private} : 0;
     422            $replies['private'] = ( ! empty( $r['count_private_replies'] ) && current_user_can( 'read_private_replies' ) )
     423                ? (int) $all_replies->{$private}
     424                : 0;
    407425
    408426            // Spam
    409             $replies['spammed'] = ( ! empty( $r['count_spammed_replies'] ) && current_user_can( 'edit_others_replies'  ) ) ? (int) $all_replies->{$spam}    : 0;
     427            $replies['spammed'] = ( ! empty( $r['count_spammed_replies'] ) && current_user_can( 'edit_others_replies'  ) )
     428                ? (int) $all_replies->{$spam}
     429                : 0;
    410430
    411431            // Trash
    412             $replies['trashed'] = ( ! empty( $r['count_trashed_replies'] ) && current_user_can( 'view_trash'           ) ) ? (int) $all_replies->{$trash}   : 0;
     432            $replies['trashed'] = ( ! empty( $r['count_trashed_replies'] ) && current_user_can( 'view_trash' ) )
     433                ? (int) $all_replies->{$trash}
     434                : 0;
    413435
    414436            // Total hidden (pending + private + spam + trash)
     
    416438
    417439            // Generate the hidden topic count's title attribute
    418             $reply_titles[] = ! empty( $replies['pending'] ) ? sprintf( __( 'Pending: %s', 'bbpress' ), bbp_number_format_i18n( $replies['pending'] ) ) : '';
    419             $reply_titles[] = ! empty( $replies['private'] ) ? sprintf( __( 'Private: %s', 'bbpress' ), bbp_number_format_i18n( $replies['private'] ) ) : '';
    420             $reply_titles[] = ! empty( $replies['spammed'] ) ? sprintf( __( 'Spammed: %s', 'bbpress' ), bbp_number_format_i18n( $replies['spammed'] ) ) : '';
    421             $reply_titles[] = ! empty( $replies['trashed'] ) ? sprintf( __( 'Trashed: %s', 'bbpress' ), bbp_number_format_i18n( $replies['trashed'] ) ) : '';
     440            $reply_titles[] = ! empty( $replies['pending'] )
     441                ? sprintf( esc_html__( 'Pending: %s', 'bbpress' ), bbp_number_format_i18n( $replies['pending'] ) )
     442                : '';
     443            $reply_titles[] = ! empty( $replies['private'] )
     444                ? sprintf( esc_html__( 'Private: %s', 'bbpress' ), bbp_number_format_i18n( $replies['private'] ) )
     445                : '';
     446
     447            $reply_titles[] = ! empty( $replies['spammed'] )
     448                ? sprintf( esc_html__( 'Spammed: %s', 'bbpress' ), bbp_number_format_i18n( $replies['spammed'] ) )
     449                : '';
     450
     451            $reply_titles[] = ! empty( $replies['trashed'] )
     452                ? sprintf( esc_html__( 'Trashed: %s', 'bbpress' ), bbp_number_format_i18n( $replies['trashed'] ) )
     453                : '';
    422454
    423455            // Compile the hidden replies title
     
    439471
    440472    // Tally the tallies
    441     $counts = array_map( 'absint', compact(
     473    $counts = array_filter( array_map( 'absint', compact(
    442474        'user_count',
    443475        'forum_count',
     
    448480        'topic_tag_count',
    449481        'empty_topic_tag_count'
    450     ) );
     482    ) ) );
    451483
    452484    // Loop through and store the integer and i18n formatted counts.
     
    462494
    463495    // Filter & return
    464     return apply_filters( 'bbp_get_statistics', $statistics, $r, $args );
     496    return (array) apply_filters( 'bbp_get_statistics', $statistics, $r, $args );
    465497}
    466498
     
    506538    $r['bbp_anonymous_name'] = apply_filters( 'bbp_pre_anonymous_post_author_name', $r['bbp_anonymous_name'] );
    507539    if ( empty( $r['bbp_anonymous_name'] ) ) {
    508         bbp_add_error( 'bbp_anonymous_name',  __( '<strong>ERROR</strong>: Invalid author name.', 'bbpress' ) );
     540        bbp_add_error( 'bbp_anonymous_name',  esc_html__( '<strong>ERROR</strong>: Invalid author name.', 'bbpress' ) );
    509541    }
    510542
     
    512544    $r['bbp_anonymous_email'] = apply_filters( 'bbp_pre_anonymous_post_author_email', $r['bbp_anonymous_email'] );
    513545    if ( empty( $r['bbp_anonymous_email'] ) ) {
    514         bbp_add_error( 'bbp_anonymous_email', __( '<strong>ERROR</strong>: Invalid email address.', 'bbpress' ) );
     546        bbp_add_error( 'bbp_anonymous_email', esc_html__( '<strong>ERROR</strong>: Invalid email address.', 'bbpress' ) );
    515547    }
    516548
     
    11351167
    11361168    // For plugins to filter messages per reply/topic/user
    1137     $message = sprintf( __( '%1$s wrote:
     1169    $message = sprintf( esc_html__( '%1$s wrote:
    11381170
    11391171%2$s
     
    13001332
    13011333    // For plugins to filter messages per reply/topic/user
    1302     $message = sprintf( __( '%1$s wrote:
     1334    $message = sprintf( esc_html__( '%1$s wrote:
    13031335
    13041336%2$s
     
    21242156
    21252157    if ( ! isset( $wp_query ) ) {
    2126         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.', 'bbpress' ), '3.1' );
     2158        _doing_it_wrong( __FUNCTION__, esc_html__( 'Conditional query tags do not work before the query is run. Before then, they always return false.', 'bbpress' ), '3.1' );
    21272159        return false;
    21282160    }
  • trunk/src/includes/core/abstraction.php

    r6438 r6542  
    169169function bbp_is_large_install() {
    170170
    171     // Default to false
    172     $retval = false;
     171    // Multisite has a function specifically for this
     172    $retval = function_exists( 'wp_is_large_network' )
     173        ? wp_is_large_network( 'users' )
     174        : ( bbp_get_total_users() > 10000 );
    173175
    174     // Multisite has a function specifically for this
    175     if ( function_exists( 'wp_is_large_network' ) ) {
    176         $retval = wp_is_large_network( 'users' );
    177     } else {
    178         $bbp_db = bbp_db();
    179         $count  = $bbp_db->get_var( "SELECT COUNT(ID) as c FROM {$bbp_db->users} WHERE user_status = '0'" );
    180         $retval = apply_filters( 'wp_is_large_network', ( $count > 10000 ), 'users', $count );
    181     }
     176    // Filter & return
     177    return (bool) apply_filters( 'bbp_is_large_install', $retval );
     178}
    182179
    183     return (bool) $retval;
     180/**
     181 * Get the total number of users on the forums
     182 *
     183 * @since 2.0.0 bbPress (r2769)
     184 *
     185 * @uses apply_filters() Calls 'bbp_get_total_users' with number of users
     186 * @return int Total number of users
     187 */
     188function bbp_get_total_users() {
     189    $bbp_db = bbp_db();
     190    $count  = $bbp_db->get_var( "SELECT COUNT(ID) as c FROM {$bbp_db->users} WHERE user_status = '0'" );
     191
     192    // Filter & return
     193    return (int) apply_filters( 'bbp_get_total_users', (int) $count );
    184194}
  • trunk/src/includes/users/functions.php

    r6505 r6542  
    592592
    593593/**
    594  * Get the total number of users on the forums
    595  *
    596  * @since 2.0.0 bbPress (r2769)
    597  *
    598  * @uses count_users() To execute our query and get the var back
    599  * @uses apply_filters() Calls 'bbp_get_total_users' with number of users
    600  * @return int Total number of users
    601  */
    602 function bbp_get_total_users() {
    603     $user_count = count_users();
    604 
    605     // Filter & return
    606     return (int) apply_filters( 'bbp_get_total_users', (int) $user_count['total_users'] );
    607 }
    608 
    609 /**
    610594 * Get user IDs from nicenames
    611595 *
Note: See TracChangeset for help on using the changeset viewer.