Skip to content

Instantly share code, notes, and snippets.

@shanebp
Last active March 15, 2021 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shanebp/574ce3b95e33cb5bcad2c823bb666a00 to your computer and use it in GitHub Desktop.
Save shanebp/574ce3b95e33cb5bcad2c823bb666a00 to your computer and use it in GitHub Desktop.
BP - show xprofile data on Pending Users screen
<?php
// add the custom column header
function philopress_modify_user_columns($column_headers) {
$column_headers['extended'] = 'Meta Fields';
return $column_headers;
}
add_action('manage_users_page_bp-signups_columns','philopress_modify_user_columns');
// dump all the pending user's meta data in the custom column
function philopress_signup_custom_column( $str, $column_name, $signup_object ) {
if ( $column_name == 'extended' )
return print_r( $signup_object->meta, true );
//If you only want to show specific meta fields, you need to know the field id(s). Then you could do this:
//return $signup_object->meta['field_4472'];
return $str;
}
add_filter( 'bp_members_signup_custom_column', 'philopress_signup_custom_column', 1, 3 );
@welshlamb10
Copy link

Hi - how would I make this sortable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment