I am using the UserPhoto plugin which allows users to upload a photo which can be used in many ways. (It's awesome) But I would also like when the admins look at the list of users the column displays this users photo instead of the Gravatar. Is there a hook?
I'm a little closer...
function change_user_avatar_col( $column ) {
$column['avatar'] = 'avatar';
return $column;
}
add_filter( 'manage_users_columns', 'change_user_avatar_col' );
function change_user_avatar( $val, $column_name, $user_id ) {
$user = get_userdata( $user_id );
switch ($column_name) {
case 'avatar' :
return userphoto_thumbnail($user);
break;
default:
}
return $return;
}
add_filter( 'manage_users_custom_column', 'change_user_avatar', 10, 3 );
I am getting the images but they they are not in the column, plus I really want to replace the current gravatars and this is creating an additional column. I tried changing out the "avatar" to "Username" for the column but no success.