I added custom columns but now I don't know how to get the date from the fields to show... and I have an error in my code. Can someone help?
Thanks
Here's the code :
function new_modify_user_table( $column ) {
$column['les-non-specialistes'] = 'Non-spécialiste';
$column['specialistes'] = 'Spécialiste';
return $column;
}
add_filter( 'manage_users_columns', 'new_modify_user_table' );
function new_modify_user_table_row( $val, $column_name, $user_id ) {
$user = get_userdata( $user_id );
switch ($column_name) {
case 'les-non-specialistes' :
return get_the_author_meta( 'les-non-specialistes', $user_id );
break;
case 'specialistes' :
return '';
break;
default:
}
return $return;
}
add_filter( 'manage_users_custom_column', 'new_modify_user_table_row', 10, 3 );