Where to store media uploaded by the plugin?

You can do something like this to create your own plugin upload folder in /wp-content/uploads the following code will basically create a custom folder inside uploads called myplugin_uploads and put an empty index.html inside it. Dynamically creating your custom upload folder add_action( ‘init’, ‘create_files’ ); function create_files() { $upload_dir = wp_upload_dir(); $files = array( array( … Read more