Thread Starter
wsbo
(@wsbo)
The solution was installing this plugin http://wordpress.org/extend/plugins/custom-upload-dir/, setting up the default folder as the author, and removing the media library access from the upload window (media-upload.php)
I would like to do this, but how do you “remove the media library access from the upload window”? I got as far as installing and activating the plugin, but I have no idea how to do the last part of the instructions.
Thanks in advance!
Hello everyone. You can put this code into your theme’s (not actual WordPress’) function.php file.
//Remove Media Library Tab
function remove_medialibrary_tab($tabs) {
if ( !current_user_can( 'administrator' ) ) {
unset($tabs['library']);
return $tabs;
}
else
{
return $tabs;
}
}
add_filter('media_upload_tabs','remove_medialibrary_tab');
It says if the current user is not an administrator, then remove the Media Library tab from the Upload/Insert Media’s popup page that appears when adding media to a post. Otherwise if the user DOES have a role as admin, then they will still see all the tabs (File, URL, Media Library)
role scoper does this perfectly, unfortunately it also a lot of other permission based things that I don’t need.