Use WP_CONTENT_URL in wp_upload_dir(). Props sambauers. fixes #7206

git-svn-id: https://develop.svn.wordpress.org/trunk@8216 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-06-30 03:33:05 +00:00
parent 12c069a943
commit 5bb069702e
1 changed files with 2 additions and 3 deletions

View File

@ -1484,16 +1484,15 @@ function wp_upload_dir( $time = NULL ) {
// $dir is absolute, $path is (maybe) relative to ABSPATH
$dir = path_join( ABSPATH, $upload_path );
$path = str_replace( ABSPATH, '', trim( $upload_path ) );
if ( !$url = get_option( 'upload_url_path' ) )
$url = trailingslashit( $siteurl ) . $path;
$url = WP_CONTENT_URL . '/uploads';
if ( defined('UPLOADS') ) {
$dir = ABSPATH . UPLOADS;
$url = trailingslashit( $siteurl ) . UPLOADS;
}
$subdir = '';
if ( get_option( 'uploads_use_yearmonth_folders' ) ) {
// Generate the yearly and monthly dirs