blog

By default, WordPress allows a user with the “upload_files” capability to view all items in the media library. Here’s how to remove the Media Library tab in the WordPress media uploader completely (e.g. for contributors without the “edit_others_posts” capability).

Copy and paste the following code into a plugin or the theme functions.php file: