Ticket #15928: 15928.patch
File 15928.patch, 836 bytes (added by , 14 years ago) |
---|
-
wp-includes/functions.php
2145 2145 */ 2146 2146 function wp_upload_dir( $time = null ) { 2147 2147 global $switched; 2148 $siteurl = get_ option( 'siteurl');2148 $siteurl = get_site_url(); 2149 2149 $upload_path = get_option( 'upload_path' ); 2150 2150 $upload_path = trim($upload_path); 2151 2151 $main_override = is_multisite() && defined( 'MULTISITE' ) && is_main_site(); … … 2163 2163 2164 2164 if ( !$url = get_option( 'upload_url_path' ) ) { 2165 2165 if ( empty($upload_path) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) ) 2166 $url = WP_CONTENT_URL . '/uploads';2166 $url = content_url('uploads'); 2167 2167 else 2168 2168 $url = trailingslashit( $siteurl ) . $upload_path; 2169 2169 }