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
This commit is contained in:
parent
d3a532389d
commit
af9c3b8896
|
@ -1484,16 +1484,15 @@ function wp_upload_dir( $time = NULL ) {
|
||||||
|
|
||||||
// $dir is absolute, $path is (maybe) relative to ABSPATH
|
// $dir is absolute, $path is (maybe) relative to ABSPATH
|
||||||
$dir = path_join( ABSPATH, $upload_path );
|
$dir = path_join( ABSPATH, $upload_path );
|
||||||
$path = str_replace( ABSPATH, '', trim( $upload_path ) );
|
|
||||||
|
|
||||||
if ( !$url = get_option( 'upload_url_path' ) )
|
if ( !$url = get_option( 'upload_url_path' ) )
|
||||||
$url = trailingslashit( $siteurl ) . $path;
|
$url = WP_CONTENT_URL . '/uploads';
|
||||||
|
|
||||||
if ( defined('UPLOADS') ) {
|
if ( defined('UPLOADS') ) {
|
||||||
$dir = ABSPATH . UPLOADS;
|
$dir = ABSPATH . UPLOADS;
|
||||||
$url = trailingslashit( $siteurl ) . UPLOADS;
|
$url = trailingslashit( $siteurl ) . UPLOADS;
|
||||||
}
|
}
|
||||||
|
|
||||||
$subdir = '';
|
$subdir = '';
|
||||||
if ( get_option( 'uploads_use_yearmonth_folders' ) ) {
|
if ( get_option( 'uploads_use_yearmonth_folders' ) ) {
|
||||||
// Generate the yearly and monthly dirs
|
// Generate the yearly and monthly dirs
|
||||||
|
|
Loading…
Reference in New Issue