Remove trailing slashes from UPLOADS before trying a str_replace() in wp_upload_dir(). props jbrinley. fixes #22469

* In 3.4.x, both $url and UPLOADS had trailing slashes
* Due to refactoring, $url is no longer expected to have a trailing slash
* Because of the mismatch, the str_replace() was not working, resulting in an incorrectly verbose upload dir URL

git-svn-id: http://core.svn.wordpress.org/trunk@22736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2012-11-21 07:08:38 +00:00
parent 418c9985f7
commit 4fcb87234b

View File

@ -1540,7 +1540,7 @@ function wp_upload_dir( $time = null ) {
if ( defined( 'BLOGUPLOADDIR' ) )
$dir = untrailingslashit( BLOGUPLOADDIR );
$url = str_replace( UPLOADS, 'files', $url );
$url = str_replace( untrailingslashit( UPLOADS ), 'files', $url );
}
}