Change WordPress user roles and capabilities › Forums › How to or FAQ › Editor access complete media library
- This topic has 9 replies, 3 voices, and was last updated 8 years, 5 months ago by
Vladimir.
-
AuthorPosts
-
12/12/2016 at 07:53 #3052
NDC mediagroep
ParticipantHey 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!
Marc12/12/2016 at 13:25 #3054Vladimir
KeymasterHi Marc,
It’s possible to change this default behaviour via filter ure_attachments_show_full_list.
12/12/2016 at 13:58 #3056NDC mediagroep
ParticipantHey Vladimir,
it looks like that should do the trick.
Where should I put the code?
Thanx again for the quick reply!
Marc12/12/2016 at 14:01 #3057Vladimir
KeymasterIt’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.13/12/2016 at 07:24 #3065NDC mediagroep
ParticipantMorning 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 libraryI 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?
13/12/2016 at 07:28 #3066NDC mediagroep
ParticipantUpdate:
I tried the other option and used the code in the functions.php from the child theme and that works perfectly 😉
Thank!!!
13/12/2016 at 08:48 #3068Vladimir
KeymasterExcellent!
The most probable problem with a separate file media.php was that it should be started from<?phpcharacters at the separate 1st line.
13/06/2017 at 14:14 #3867Judith Schjorring
SpectatorHi 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.
13/06/2017 at 14:26 #3868Judith Schjorring
SpectatorWhat do you mean by activating theme’s funtion php file?
13/06/2017 at 15:43 #3869Vladimir
KeymasterI mean active theme, not activate. So you need to insert a code into a functions.php file of the active theme.
-
AuthorPosts
- You must be logged in to reply to this topic.