From 5bb069702e86f52dfab6d5df3edb914e372987cc Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 30 Jun 2008 03:33:05 +0000 Subject: [PATCH] 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 --- wp-includes/functions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 0695a73756..f7884b3351 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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