WordPress at Your Fingertips

wp_get_upload_dir() WP 1.0

Retrieves uploads directory information.

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.

1 time — 0.000125 sec (fast) | 50000 times — 0.18 sec (very fast) | PHP 7.0.5, WP 4.5

No Hooks.

Return

Array. See wp_upload_dir() for description.

Usage

wp_get_upload_dir();

Notes

Changelog

Since 4.5.0 Introduced.

Code of wp_get_upload_dir() WP 5.8.1

function wp_get_upload_dir() {
	return wp_upload_dir( null, false );
}

upload download (file system)

path (directory folder)

Link (URL)

No comments
    Log In