There are lots of snippets / workaround published on limiting user’s access to WordPress Media library, but I found this helpful StackOverflow thread, specifically Paul’s answer, to be the most useful for the time being.

I still need some adjustments tho. In my circumstances:

  1. Apply the fix_post_counts filtering to the post type needed
  2. Check user’s role first. Editor above wouldn’t need this kind of limitation
  3. Some error handling for user with no media at all.

 

 

Share Your Thought