Core Function
View Source on Trac ↗ wp_upload_dir()
wp_upload_dir( mixed $time = null, mixed $create_dir = true, mixed $refresh_cache = false ) Returns an array containing the current upload directory's path and URL.
Parameters 2 required
| Name / Type | Description |
|---|---|
| (string | | null) $time Optional. Time formatted in 'yyyy/mm'. Default null. Required |
| bool | $create_dir Optional. Whether to check and create the uploads directory. Default true for backward compatibility. Required |
| $refresh_cache bool | Optional. Whether to refresh the cache. Default false. |
Return Value
(array)
array {
Array of information about the upload directory.
Function Information
Since Version
2.0.0
Source File
wp-includes/functions.php
Advertisement