Hello I'm using the latest WP version, WITH WooCommerce.
I have a plugin that allow users, from the product page, to upload images. The images are uploaded as archive zip files.
I need users to have the option to make effects to images from media gallery using plugin such as:
The problem is that all the images uploaded with that plugin are zipped, and being so they are not in the database. So wordpress doesn't have a clue that the images are on the server and who uploaded them.
So I wrote a little PHP script that extracts all files to the media folder.
The problem now is that all users are able to see the media inside that folder.
Is there a way to write a small plugin that use the user name and tells WP that the media folder for that user is located in same folder as user name example:
username: testusr and when testusr going to media library wordpress tell that the folder for that user is inside "uploads/testusr"
So users are able to only see their images.
I know I can change wp-config.php
but it's a global setting and I'm looking for a per user setting.