I want my media-library and all currently uploaded files distributed and available to all users. I am using the User Role Editor Plugin
Is there any functions.php hack that makes all media-uploads visible to all users and roles?
I have a subscriber that is possible to edit a few pages and upload media, but the media uploads that are currently in the library for admins are not visible to the subscriber.
Update: My current approach, that is not working so far.
my functions.php file:
add_action( 'admin_init', 'rk_shared_uploads' );
add_action( 'init', 'rk_shared_uploads');
function rk_shared_uploads() {
$subscriber = get_role( 'subscriber' );
$subscriber->add_cap( 'upload_files' );
$subscriber->add_cap( 'unfiltered_upload' );
$contributor = get_role( 'contributor' );
$contributor->add_cap( 'upload_files' );
$contributor->add_cap( 'unfiltered_upload' );
$author = get_role( 'author' );
$author->add_cap( 'upload_files' );
$author->add_cap( 'unfiltered_upload' );
}
in my wp-config.php
const PP_MEDIA_LIB_UNFILTERED = true;
upload_files
capability to user roles you want media library access.upload_files
capability gives access to media and media-> add new. codex here