Get the right uploads directory folder structure
Opened this issue · 1 comments
LucaRosaldi commented
From what I read in the documentation, looks like the script automatically creates a /YEAR/MONTH/ folder structure. But what if that option is disabled (as I always do for non-blog websites)?
So probably the get_wp_uploads_directory()
function should use wp_upload_dir() function to check for the current site folder structure.
tommcfarlin commented
You're correct - the script automatically creates those directories if they do not exist.
If that option is not set in the WordPress dashboard and no upload
directory exists, then it will throw an exception. Your suggestion is great - feel free to make a pull request. I'd be happy to merge it!