Change WordPress user roles and capabilities › Forums › How to or FAQ › Shared Media-Uploads › Reply To: Shared Media-Uploads
30/06/2015 at 06:53
#1566
roteskreuz-innsbruck
Participant
Dear Vladimir,
thank you, but unfortunately this does not work for me. Neither does this …
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' );
}
that I have tested.
I have a subscriber that has the ability to edit and update 3 pages. It is also possible for him to “upload new media”, but if I click on Media-Overview in the backend it says “No Media found”
Any further ideas?