Now that I logged back in as her on my computer I stand corrected… I can see all files not just the ones she uploaded. 🙁
Sorry for all of the replies by me…
I did figure something out. When media is in the icon view it is fine, it is when it is in list view that she can see every file uploaded to the site. Is there something I can do to correct this? Thanks again.
This plugin uses a single function:
add_filter( 'ajax_query_attachments_args', 'mrfx_show_current_user_attachments' );
function mrfx_show_current_user_attachments( $query ) {
$user_id = get_current_user_id();
if ( $user_id && !current_user_can('administrator') && !current_user_can('editor') ) {
$query['author'] = $user_id;
}
return $query;
}
This filter works great for the grid mode, but not for the list mode. You will need the following for the list mode:
add_filter( 'request', 'mrfx_show_current_user_attachments_list' );
function mrfx_show_current_user_attachments_list( $query ) {
$screen = get_current_screen();
if ( in_array( $screen->id, array( 'upload' ) ) ) {
$user_id = get_current_user_id();
if ( $user_id && !current_user_can('administrator') && !current_user_can('editor') ) {
$query['author'] = $user_id;
}
}
return $query;
}
I got the idea from Woothemes Sensei. They have the same functionality, but for their own Teacher role.