[buddypress-trac] [BuddyPress Trac] #8584: Admin: add Member Type column to Network Users List Table

buddypress-trac noreply at wordpress.org
Fri Oct 8 21:07:52 UTC 2021


#8584: Admin: add Member Type column to Network Users List Table
-------------------------+-----------------------------
 Reporter:  Offereins    |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Members      |    Version:  9.1.1
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 When BuddyPress is network activated, the registration of member types for
 all users is only displayed in the single site users administration.
 However, it would make sense if the registration of member types that are
 available network wide are also displayed in the network users
 administration. My proposal is to add the current `bp-member-type` custom
 list table column to the Network Users List Table.

 The code required is short, because the Network Users List Table works
 similar to the regular Users List Table. The one difference is the filter
 name that is used for adding columns. All logic and filter parameters are
 identical. The filter for displaying the actual column content is the same
 for both list tables.

 To accomplish this, in `bp-members/classes/class-bp-members-admin.php` we
 can simply add to the `setup_actions` method
 ([https://buddypress.trac.wordpress.org/browser/trunk/src/bp-
 members/classes/class-bp-members-admin.php#L242 around line 242]) the
 following code:

 {{{#!php
 if ( bp_is_network_activated() ) {
         add_filter( 'wpmu_users_columns', array( $this,
 'users_table_add_type_column' ) );
 }
 }}}

 The `users_table_add_type_column` method already exists for the single
 site admin and works just as well for the network admin. The content

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8584>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list