Changeset 11198
- Timestamp:
- 05/05/2009 05:57:56 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r11190 r11198 190 190 } 191 191 192 $name = $_FILES[$file_id]['name']; 192 193 $file = wp_handle_upload($_FILES[$file_id], $overrides, $time); 193 194 194 195 if ( isset($file['error']) ) 195 196 return new WP_Error( 'upload_error', $file['error'] ); 197 198 $name_parts = pathinfo($name); 199 $name = trim( substr( $name, 0, -(1 + strlen($name_parts['extension'])) ) ); 196 200 197 201 $url = $file['url']; 198 202 $type = $file['type']; 199 203 $file = $file['file']; 200 $title = preg_replace('/\.[^.]+$/', '', basename($file));204 $title = $name; 201 205 $content = ''; 202 206
Note: See TracChangeset
for help on using the changeset viewer.