Filters the uploads directory data.
$uploadsarray
path stringurl stringsubdir stringbasedir stringbaseurl stringerror string|falseThis hook allows you to change the directory where files are uploaded to. The keys and values in the array are used by the wp_upload_dir() function in wordpress core, which is doing the work
$uploads = apply_filters( 'upload_dir', $cache[ $key ] );
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/upload_dir