Changeset 3437 for trunk/wp-includes/functions-post.php
- Timestamp:
- 01/14/2006 10:09:51 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions-post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions-post.php
r3433 r3437 879 879 $siteurl = get_settings('siteurl'); 880 880 //prepend ABSPATH to $dir and $siteurl to $url if they're not already there 881 $dir = ABSPATH . str_replace(ABSPATH, '', trim(get_settings('fileupload_realpath'))); 882 $url = $siteurl . str_replace($siteurl, '', trim(get_settings('fileupload_url'))); 881 $path = str_replace(ABSPATH, '', trim(get_settings('upload_path'))); 882 $dir = ABSPATH . $path; 883 $url = trailingslashit($siteurl) . $path; 883 884 884 885 if ( $dir == ABSPATH ) { //the option was empty 885 886 $dir = ABSPATH . 'wp-content/uploads'; 886 887 } 887 if ( $url == $siteurl ) { //the option was empty888 $url = get_option('siteurl') . '/' . str_replace(ABSPATH, '', $dir);889 }890 888 891 889 if ( defined('UPLOADS') ) { 892 890 $dir = ABSPATH . UPLOADS; 893 $url = get_option('siteurl') . '/'. UPLOADS;894 } 895 896 if ( get_settings('uploads_ yearmonth_folders')) {891 $url = trailingslashit($siteurl) . UPLOADS; 892 } 893 894 if ( get_settings('uploads_use_yearmonth_folders')) { 897 895 // Generate the yearly and monthly dirs 898 896 $time = current_time( 'mysql' );
Note: See TracChangeset
for help on using the changeset viewer.