WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/18/2008 03:19:12 AM (12 years ago)
Author:
ryan
Message:

Image sideload and wp_upload_dir() fixes from noel. fixes #7342 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r8352 r8369  
    14901490    // $dir is absolute, $path is (maybe) relative to ABSPATH
    14911491    $dir = path_join( ABSPATH, $dir );
    1492 
     1492   
    14931493    if ( !$url = get_option( 'upload_url_path' ) ) {
    1494         if ( empty($upload_path) )
     1494        if ( empty($upload_path) or ( $upload_path == $dir ) )
    14951495            $url = WP_CONTENT_URL . '/uploads';
    14961496        else
     
    15241524        return array( 'error' => $message );
    15251525    }
    1526 
     1526   
    15271527    $uploads = array( 'path' => $dir, 'url' => $url, 'subdir' => $subdir, 'basedir' => $bdir, 'baseurl' => $burl, 'error' => false );
     1528
    15281529    return apply_filters( 'upload_dir', $uploads );
    15291530}
Note: See TracChangeset for help on using the changeset viewer.