Ticket #15928: 15928.2.patch
File 15928.2.patch, 836 bytes (added by , 13 years ago) |
---|
-
wp-includes/functions.php
2217 2217 */ 2218 2218 function wp_upload_dir( $time = null ) { 2219 2219 global $switched; 2220 $siteurl = get_ option( 'siteurl');2220 $siteurl = get_site_url(); 2221 2221 $upload_path = get_option( 'upload_path' ); 2222 2222 $upload_path = trim($upload_path); 2223 2223 $main_override = is_multisite() && defined( 'MULTISITE' ) && is_main_site(); … … 2235 2235 2236 2236 if ( !$url = get_option( 'upload_url_path' ) ) { 2237 2237 if ( empty($upload_path) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) ) 2238 $url = WP_CONTENT_URL . '/uploads';2238 $url = content_url('uploads'); 2239 2239 else 2240 2240 $url = trailingslashit( $siteurl ) . $upload_path; 2241 2241 }