Change WordPress user roles and capabilities Forums How to or FAQ Editor access complete media library

Tagged: , , ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3052
    NDC mediagroep
    Participant

    Hey all,

    I am using User Role Editor Pro to acces editor roles to certain pages; restricted by page-ID and own created content. There are 8 editors in this company + 1 administrator.

    When I switch to one of the editor I see the pages that this editor is allowed to edit. This works fine.
    But when I look at the media library I only see the media attached to the selected pages.

    I really would like the editors to have access to the complete media library + their selected pages.
    In that way the administrator can upload a image that all editors can use. So no 8 the same images will be uploaded to the library. This way we will keep the media library as clean and small as possible.

    Hope you can help.

    Thanx!
    Marc

    #3054
    Vladimir
    Keymaster

    Hi Marc,

    It’s possible to change this default behaviour via filter ure_attachments_show_full_list.

    #3056
    NDC mediagroep
    Participant

    Hey Vladimir,

    it looks like that should do the trick.

    Where should I put the code?

    Thanx again for the quick reply!
    Marc

    #3057
    Vladimir
    Keymaster

    It’s for your choice:
    1) active theme’s functions.php file
    or
    2) separate .php file at the wp-content/mu-plugins/ folder as a must use plugin.

    #3065
    NDC mediagroep
    Participant

    Morning Vladimir,

    I did the following;
    – copied the code you suggested into a plain text file. Name it media.php
    – created a mu-plugings directory in wp-content of website
    – saved the php-file into this directory
    – logged in again as a editor and went to media library

    I get the following error at the top of my screen and my library keeps blank with a spinning icon like its working.
    s_show_full_list’, ‘show_full_list_of_attachments’, 10, 1); function show_full_list_of_attachments($show_all) { return true; }

    Am I doing something wrong?

    #3066
    NDC mediagroep
    Participant

    Update:

    I tried the other option and used the code in the functions.php from the child theme and that works perfectly 😉

    Thank!!!

    #3068
    Vladimir
    Keymaster

    Excellent!
    The most probable problem with a separate file media.php was that it should be started from

    
    <?php
    

    characters at the separate 1st line.

    #3867

    Hi Vladimir, i have the same problem. I tried the above funtions.php and broke my site. And now I have bought a year’s subscription.

    #3868

    What do you mean by activating theme’s funtion php file?

    #3869
    Vladimir
    Keymaster

    I mean active theme, not activate. So you need to insert a code into a functions.php file of the active theme.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.