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  
    13041304 
    13051305        // $dir is absolute, $path is (maybe) relative to ABSPATH 
    13061306        $dir = path_join( ABSPATH, $upload_path ); 
    1307         $path = str_replace( ABSPATH, '', trim( $upload_path ) ); 
    13081307 
    13091308        if ( !$url = get_option( 'upload_url_path' ) ) 
    1310                 $url = trailingslashit( $siteurl ) . $path
     1309                $url = WP_CONTENT_URL . '/uploads'
    13111310 
    13121311        if ( defined('UPLOADS') ) { 
    13131312                $dir = ABSPATH . UPLOADS; 
    13141313                $url = trailingslashit( $siteurl ) . UPLOADS; 
    13151314        } 
    1316  
     1315         
    13171316        $subdir = ''; 
    13181317        if ( get_option( 'uploads_use_yearmonth_folders' ) ) { 
    13191318                // Generate the yearly and monthly dirs