Make WordPress Core

Ticket #15928: 15928.2.patch

File 15928.2.patch, 836 bytes (added by SergeyBiryukov, 13 years ago)
  • wp-includes/functions.php

     
    22172217 */
    22182218function wp_upload_dir( $time = null ) {
    22192219        global $switched;
    2220         $siteurl = get_option( 'siteurl' );
     2220        $siteurl = get_site_url();
    22212221        $upload_path = get_option( 'upload_path' );
    22222222        $upload_path = trim($upload_path);
    22232223        $main_override = is_multisite() && defined( 'MULTISITE' ) && is_main_site();
     
    22352235
    22362236        if ( !$url = get_option( 'upload_url_path' ) ) {
    22372237                if ( empty($upload_path) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) )
    2238                         $url = WP_CONTENT_URL . '/uploads';
     2238                        $url = content_url('uploads');
    22392239                else
    22402240                        $url = trailingslashit( $siteurl ) . $upload_path;
    22412241        }