I am trying to add custom column(s) to the users admin page using the manage_users_custom_column() hook.
Consider this:
add_filter('manage_users_columns', 'add_status_column');
add_action('manage_users_custom_column', 'manage_status_column', 10, 3);
function add_status_column($columns) {
$columns['live_status'] = 'Status';
return $columns;
}
function manage_status_column($empty='', $column_name, $id) {
if( $column_name == 'live_status' ) {
echo $column_name;
echo $id;
}
}
Several strange things here:
1) Had to add the $empty='' to get any results at all
2) The output is dumped outside the row - after the closing </tr> in each user row... even though the function is clearly called in /wp-admin/includes/template.php file in the right place -- meaning that the echos get dumped at the top of the table...
Any thoughts? I've been banging my head against this for hours.