Home › Forums › General Issues › Upload Image Filter › Reply To: Upload Image Filter
I don’t know if you can do this or not, but you should be able to.
I have done something in the past that hides images from the media library. This file contains a a pre_get_posts that hides any file uploaded through the plugin from the media library. https://github.com/Hube2/blunt-gated-content/blob/master/admin/acf-upload-path.php.
What you would need to do is create a pre_get_posts filter and
1) See if the query is for attachments
2) Get the currently logged in users
3) Limit the query to attachments uploaded by the user… this is the part I’m not to sure about, I’ve never done this, but I think you just need to set the author
argument to the user ID.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.