Skip to:
Content

BuddyPress.org

Ticket #5774: 5774.patch

File 5774.patch, 650 bytes (added by imath, 5 years ago)
  • src/bp-groups/bp-groups-loader.php

    diff --git src/bp-groups/bp-groups-loader.php src/bp-groups/bp-groups-loader.php
    index c1d87d0..fdbd92e 100644
    class BP_Groups_Component extends BP_Component { 
    328328
    329329                // Only grab count if we're on a user page
    330330                if ( bp_is_user() ) {
    331                         $count    = bp_get_total_group_count_for_user();
     331                        $count    = absint( bp_get_total_group_count_for_user() );
    332332                        $class    = ( 0 === $count ) ? 'no-count' : 'count';
    333333                        $nav_name = sprintf( __( 'Groups <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), number_format_i18n( $count ) );
    334334                } else {