Skip to:
Content

BuddyPress.org

Changeset 10547


Ignore:
Timestamp:
02/07/2016 05:19:05 PM (9 years ago)
Author:
imath
Message:

Make sure Users List Table views can still be filtered after the Pending one has been added.

Props thebrandonallen

Fixes #6872

Location:
trunk/src/bp-members/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/classes/class-bp-members-list-table.php

    r10521 r10547  
    3838            'plural'   => 'signups',
    3939            'singular' => 'signup',
     40            'screen'   => buddypress()->members->admin->users_screen,
    4041        ) );
    4142    }
     
    9192     */
    9293    public function get_views() {
    93         $views = parent::get_views();
    94 
    95         // Remove the 'current' class from the 'All' link.
    96         $views['all']        = str_replace( 'class="current"', '', $views['all'] );
    97         $views['registered'] = sprintf( '<a href="%1$s" class="current">%2$s</a>', esc_url( add_query_arg( 'page', 'bp-signups', bp_get_admin_url( 'users.php' ) ) ), sprintf( _x( 'Pending %s', 'signup users', 'buddypress' ), '<span class="count">(' . number_format_i18n( $this->signup_counts ) . ')</span>' ) );
    98 
    99         return $views;
     94        return parent::get_views();
    10095    }
    10196
  • trunk/src/bp-members/classes/class-bp-members-ms-list-table.php

    r10521 r10547  
    3838            'plural'   => 'signups',
    3939            'singular' => 'signup',
     40            'screen'   => buddypress()->members->admin->users_screen,
    4041        ) );
    4142    }
     
    9293     */
    9394    public function get_views() {
    94         $views = parent::get_views();
    95 
    96         // Remove the 'current' class from the 'All' link.
    97         $views['all']        = str_replace( 'class="current"', '', $views['all'] );
    98         $views['registered'] = sprintf( '<a href="%1$s" class="current">%2$s</a>', esc_url( add_query_arg( 'page', 'bp-signups', network_admin_url( 'users.php' ) ) ), sprintf( _x( 'Pending %s', 'signup users', 'buddypress' ), '<span class="count">(' . number_format_i18n( $this->signup_counts ) . ')</span>' ) );
    99 
    100         return $views;
     95        return parent::get_views();
    10196    }
    10297
Note: See TracChangeset for help on using the changeset viewer.