Changeset 12405 for trunk/wp-includes/functions.php
- Timestamp:
- 12/15/2009 05:53:51 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r12403 r12405 2036 2036 $upload_path = get_option( 'upload_path' ); 2037 2037 $upload_path = trim($upload_path); 2038 if ( empty($upload_path) ) 2038 if ( empty($upload_path) ) { 2039 2039 $dir = WP_CONTENT_DIR . '/uploads'; 2040 else2040 } else { 2041 2041 $dir = $upload_path; 2042 2043 // $dir is absolute, $path is (maybe) relative to ABSPATH 2044 $dir = path_join( ABSPATH, $dir ); 2042 if ( 'wp-content/uploads' == $upload_path ) { 2043 $dir = WP_CONTENT_DIR . '/uploads'; 2044 } elseif ( 0 !== strpos($dir, ABSPATH) ) { 2045 // $dir is absolute, $upload_path is (maybe) relative to ABSPATH 2046 $dir = path_join( ABSPATH, $dir ); 2047 } 2048 } 2045 2049 2046 2050 if ( !$url = get_option( 'upload_url_path' ) ) { 2047 if ( empty($upload_path) or( $upload_path == $dir ) )2051 if ( empty($upload_path) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) ) 2048 2052 $url = WP_CONTENT_URL . '/uploads'; 2049 2053 else
Note: See TracChangeset
for help on using the changeset viewer.