Make WordPress Core

Ticket #7305: image_url.patch

File image_url.patch, 605 bytes (added by Txanny, 14 years ago)

Patch to solve this problem

  • functions.php

     
    14871487
    14881488        // $dir is absolute, $path is (maybe) relative to ABSPATH
    14891489        $dir = path_join( ABSPATH, $upload_path );
    1490 
     1490        $path = str_replace( ABSPATH, '', trim( $upload_path ) );
     1491       
    14911492        if ( !$url = get_option( 'upload_url_path' ) )
    1492                 $url = WP_CONTENT_URL . '/uploads';
    1493 
     1493                $url = trailingslashit( $siteurl ) . $path;
     1494       
    14941495        if ( defined('UPLOADS') ) {
    14951496                $dir = ABSPATH . UPLOADS;
    14961497                $url = trailingslashit( $siteurl ) . UPLOADS;