Return base dir and url from wp_upload_dir(). Props DD32. fixes #6762

git-svn-id: http://svn.automattic.com/wordpress/trunk@8280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-07-07 23:53:54 +00:00
parent f605bcc3a3
commit cf566ef990
1 changed files with 5 additions and 2 deletions

View File

@ -1495,7 +1495,10 @@ function wp_upload_dir( $time = NULL ) {
$dir = ABSPATH . UPLOADS;
$url = trailingslashit( $siteurl ) . UPLOADS;
}
$bdir = $dir;
$burl = $url;
$subdir = '';
if ( get_option( 'uploads_use_yearmonth_folders' ) ) {
// Generate the yearly and monthly dirs
@ -1515,7 +1518,7 @@ function wp_upload_dir( $time = NULL ) {
return array( 'error' => $message );
}
$uploads = array( 'path' => $dir, 'url' => $url, 'subdir' => $subdir, 'error' => false );
$uploads = array( 'path' => $dir, 'url' => $url, 'subdir' => $subdir, 'basedir' => $bdir, 'baseurl' => $burl, 'error' => false );
return apply_filters( 'upload_dir', $uploads );
}