Ticket #7206: wp_content_uploads_url.patch
| File wp_content_uploads_url.patch, 0.7 kB (added by sambauers, 5 months ago) |
|---|
-
wp-includes/functions.php
old new 1304 1304 1305 1305 // $dir is absolute, $path is (maybe) relative to ABSPATH 1306 1306 $dir = path_join( ABSPATH, $upload_path ); 1307 $path = str_replace( ABSPATH, '', trim( $upload_path ) );1308 1307 1309 1308 if ( !$url = get_option( 'upload_url_path' ) ) 1310 $url = trailingslashit( $siteurl ) . $path;1309 $url = WP_CONTENT_URL . '/uploads'; 1311 1310 1312 1311 if ( defined('UPLOADS') ) { 1313 1312 $dir = ABSPATH . UPLOADS; 1314 1313 $url = trailingslashit( $siteurl ) . UPLOADS; 1315 1314 } 1316 1315 1317 1316 $subdir = ''; 1318 1317 if ( get_option( 'uploads_use_yearmonth_folders' ) ) { 1319 1318 // Generate the yearly and monthly dirs
