boonebgorges / buddypress-docs

GNU General Public License v3.0
106 stars 44 forks source link

Specify `$create_dir = false` when calling `wp_upload_dir()`. #662

Closed boonebgorges closed 4 years ago

boonebgorges commented 4 years ago

When not specified, calling wp_upload_dir() will result in WP's default year/month directories being created. This can result in a large number of unneeded empty directories.

The call to wp_upload_dir() in BP_Docs_Attachments::get_htaccess_path() specifies $create_dir=true because it's only called in the context where the .htaccess file is being created or deleted, not on normal pageloads.