Skip to:
Content

BuddyPress.org

Ticket #7526: 7526-3-group.diff

File 7526-3-group.diff, 2.1 KB (added by bhargavbhandari90, 2 months ago)

For group counter

  • src/bp-groups/classes/class-bp-groups-list-table.php

     
    330330                        _e( 'Filter groups list', 'buddypress' );
    331331                ?></h2>
    332332
     333                <?php
     334
     335                        $group_obj   = new BP_Groups_Template( array() );
     336                        $total_count = isset( $group_obj->total_group_count )
     337                                ? $group_obj->total_group_count
     338                                : 0; // Get total group count.
     339
     340                ?>
     341
    333342                <ul class="subsubsub">
    334                         <li class="all"><a href="<?php echo esc_url( $url_base ); ?>" class="<?php if ( 'all' == $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
     343                        <li class="all"><a href="<?php echo esc_url( $url_base ); ?>" class="<?php if ( 'all' == $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); printf( ' <span class="count">(%d)</span>', $total_count ); ?></a> |</li>
    335344                        <li class="public"><a href="<?php echo esc_url( add_query_arg( 'group_status', 'public', $url_base ) ); ?>" class="<?php if ( 'public' == $this->view ) echo 'current'; ?>"><?php printf( _n( 'Public <span class="count">(%s)</span>', 'Public <span class="count">(%s)</span>', $this->group_counts['public'], 'buddypress' ), number_format_i18n( $this->group_counts['public'] ) ); ?></a> |</li>
    336345                        <li class="private"><a href="<?php echo esc_url( add_query_arg( 'group_status', 'private', $url_base ) ); ?>" class="<?php if ( 'private' == $this->view ) echo 'current'; ?>"><?php printf( _n( 'Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>', $this->group_counts['private'], 'buddypress' ), number_format_i18n( $this->group_counts['private'] ) ); ?></a> |</li>
    337346                        <li class="hidden"><a href="<?php echo esc_url( add_query_arg( 'group_status', 'hidden', $url_base ) ); ?>" class="<?php if ( 'hidden' == $this->view ) echo 'current'; ?>"><?php printf( _n( 'Hidden <span class="count">(%s)</span>', 'Hidden <span class="count">(%s)</span>', $this->group_counts['hidden'], 'buddypress' ), number_format_i18n( $this->group_counts['hidden'] ) ); ?></a></li>