Skip to content

Instantly share code, notes, and snippets.

@bappi-d-great
Created September 21, 2016 20:40
Show Gist options
  • Save bappi-d-great/0c22d09668a53b849a8a538d7136d5b0 to your computer and use it in GitHub Desktop.
Save bappi-d-great/0c22d09668a53b849a8a538d7136d5b0 to your computer and use it in GitHub Desktop.
WPMU Membership 2: Adding more column in member table
<?php
/**
* Example: User ID
*/
add_filter( 'ms_helper_listtable_member_get_columns', function( $columns ) {
$columns['user_id'] = 'User ID';
return $columns;
}, 10, 1 );
add_filter( 'ms_helper_listtable_member_default_value', function( $html, $member, $column_name ) {
return $column_name == 'user_id' ? $member->id : $html;
}, 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment