Skip to main content
Notice removed Authoritative reference needed by CommunityBot
Bounty Ended with birgire's answer chosen by CommunityBot
added 255 characters in body
Source Link
mathiregister
  • 1.5k
  • 13
  • 55
  • 78

I found this question that is meanwhile closed but I have the exact same question and problem.

I want my media-library and all currently uploaded files distributed and available to all users (or maybe for certain users). Is that possible? I am using the Role Scoper PluginUser 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', 'allow_uploads''rk_shared_uploads' );
add_action( 'init', 'rk_shared_uploads');

function allow_uploadsrk_shared_uploads() {
    $contributor$subscriber = get_role('contributor' 'subscriber' );
    $contributor$subscriber->add_cap( 'upload_files' );
    $subscriber->add_cap( 'unfiltered_upload' );

    $editor$contributor = get_role('editor' 'contributor' );
    $editor$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;

I found this question that is meanwhile closed but I have the exact same question and problem.

I want my media-library and all currently uploaded files distributed and available to all users (or maybe for certain users). Is that possible? I am using the Role Scoper Plugin

Is there any functions.php hack that makes all media-uploads visible to all users and roles?

Update:

add_action('admin_init', 'allow_uploads');

function allow_uploads() {
    $contributor = get_role('contributor');
    $contributor->add_cap('upload_files');

    $editor = get_role('editor');
    $editor->add_cap('upload_files');

    $author = get_role('author');
    $author->add_cap('upload_files');
}

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;
Notice added Authoritative reference needed by mathiregister
Bounty Started worth 100 reputation by mathiregister
deleted 12 characters in body
Source Link
mathiregister
  • 1.5k
  • 13
  • 55
  • 78

I found this question that is meanwhile closed but I have the exact same question and problem.

I want my media-library and all currently uploaded files distributed and available to all users (or maybe for certain users). Is that possible? I am using the Role Scoper Plugin

Is there any functions.php hack that makes all media-uploads visible to all users and roles?

Update:

add_action('admin_init', 'allow_uploads');

function allow_contributor_uploadsallow_uploads() {
    $contributor = get_role('contributor');
    $contributor->add_cap('upload_files');

    $editor = get_role('editor');
    $editor->add_cap('upload_files');

    $author = get_role('author');
    $author->add_cap('upload_files');
}

I found this question that is meanwhile closed but I have the exact same question and problem.

I want my media-library and all currently uploaded files distributed and available to all users (or maybe for certain users). Is that possible? I am using the Role Scoper Plugin

Is there any functions.php hack that makes all media-uploads visible to all users and roles?

Update:

add_action('admin_init', 'allow_uploads');

function allow_contributor_uploads() {
    $contributor = get_role('contributor');
    $contributor->add_cap('upload_files');

    $editor = get_role('editor');
    $editor->add_cap('upload_files');

    $author = get_role('author');
    $author->add_cap('upload_files');
}

I found this question that is meanwhile closed but I have the exact same question and problem.

I want my media-library and all currently uploaded files distributed and available to all users (or maybe for certain users). Is that possible? I am using the Role Scoper Plugin

Is there any functions.php hack that makes all media-uploads visible to all users and roles?

Update:

add_action('admin_init', 'allow_uploads');

function allow_uploads() {
    $contributor = get_role('contributor');
    $contributor->add_cap('upload_files');

    $editor = get_role('editor');
    $editor->add_cap('upload_files');

    $author = get_role('author');
    $author->add_cap('upload_files');
}
added 377 characters in body
Source Link
mathiregister
  • 1.5k
  • 13
  • 55
  • 78

I found this question that is meanwhile closed but I have the exact same question and problem.

I want my media-library and all currently uploaded files distributed and available to all users (or maybe for certain users). Is that possible? I am using the Role Scoper Plugin

Is there any functions.php hack that makes all media-uploads visible to all users and roles?

Update:

add_action('admin_init', 'allow_uploads');

function allow_contributor_uploads() {
    $contributor = get_role('contributor');
    $contributor->add_cap('upload_files');

    $editor = get_role('editor');
    $editor->add_cap('upload_files');

    $author = get_role('author');
    $author->add_cap('upload_files');
}

I found this question that is meanwhile closed but I have the exact same question and problem.

I want my media-library and all currently uploaded files distributed and available to all users (or maybe for certain users). Is that possible? I am using the Role Scoper Plugin

Is there any functions.php hack that makes all media-uploads visible to all users and roles?

I found this question that is meanwhile closed but I have the exact same question and problem.

I want my media-library and all currently uploaded files distributed and available to all users (or maybe for certain users). Is that possible? I am using the Role Scoper Plugin

Is there any functions.php hack that makes all media-uploads visible to all users and roles?

Update:

add_action('admin_init', 'allow_uploads');

function allow_contributor_uploads() {
    $contributor = get_role('contributor');
    $contributor->add_cap('upload_files');

    $editor = get_role('editor');
    $editor->add_cap('upload_files');

    $author = get_role('author');
    $author->add_cap('upload_files');
}
added 39 characters in body; edited title
Source Link
Pieter Goosen
  • 55.4k
  • 23
  • 115
  • 209
Loading
Source Link
mathiregister
  • 1.5k
  • 13
  • 55
  • 78
Loading