From af9c3b88966bab069c71c68bbff13c05685a3bb6 Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@8216 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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