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: https://develop.svn.wordpress.org/trunk@22736 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
db7dc96921
commit
961a962a3c
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user