WordPress.org

Make WordPress Core

Ticket #15928: 15928.patch

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

     
    21452145 */ 
    21462146function wp_upload_dir( $time = null ) { 
    21472147        global $switched; 
    2148         $siteurl = get_option( 'siteurl' ); 
     2148        $siteurl = get_site_url(); 
    21492149        $upload_path = get_option( 'upload_path' ); 
    21502150        $upload_path = trim($upload_path); 
    21512151        $main_override = is_multisite() && defined( 'MULTISITE' ) && is_main_site(); 
     
    21632163 
    21642164        if ( !$url = get_option( 'upload_url_path' ) ) { 
    21652165                if ( empty($upload_path) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) ) 
    2166                         $url = WP_CONTENT_URL . '/uploads'; 
     2166                        $url = content_url('uploads'); 
    21672167                else 
    21682168                        $url = trailingslashit( $siteurl ) . $upload_path; 
    21692169        }