Retrieves uploads directory information.
Description
Same as wp_upload_dir() but "light weight" as it doesn’t attempt to create the uploads directory.
Intended for use in themes, when only ‘basedir’ and ‘baseurl’ are needed, generally in all cases when not uploading files.
See also
Source
function wp_get_upload_dir() {
return wp_upload_dir( null, false );
}
Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |
Sample result of the function
If it is called in
index.php
: