Skip to:
Content

BuddyPress.org

Ticket #7526: 7526-3.diff

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

Used total_activity_count

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

     
    312312                        _e( 'Filter activities list', 'buddypress' );
    313313                ?></h2>
    314314
     315                <?php
     316
     317                        // Get activity object.
     318                        $activity_obj = new BP_Activity_Template( array( 'count_total' => true ) );
     319                        $total_count  = isset( $activity_obj->total_activity_count )
     320                                ? $activity_obj->total_activity_count
     321                                : 0; // Get total activity count.
     322
     323                ?>
     324
    315325                <ul class="subsubsub">
    316                         <li class="all"><a href="<?php echo esc_url( $url_base ); ?>" class="<?php if ( 'spam' != $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
     326                        <li class="all"><a href="<?php echo esc_url( $url_base ); ?>" class="<?php if ( 'spam' != $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); printf( __( ' <span class="count">(%d)</span>' ), $total_count ); ?></a> |</li>
    317327                        <li class="spam"><a href="<?php echo esc_url( add_query_arg( array( 'activity_status' => 'spam' ), $url_base ) ); ?>" class="<?php if ( 'spam' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Spam <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->spam_count ) ); ?></a></li>
    318328
    319329                        <?php