Changeset 9846
- Timestamp:
- 11/22/2008 11:01:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r9803 r9846 22 22 * @uses apply_filters() Calls 'get_attached_file' on file path and attachment ID. 23 23 * 24 * @param int $attachment_id Attachment ID 25 * @param bool $unfiltered Whether to apply filters or not 24 * @param int $attachment_id Attachment ID. 25 * @param bool $unfiltered Whether to apply filters or not. 26 26 * @return string The file path to the attached file. 27 27 */ … … 2419 2419 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE post_id = %d ", $postid )); 2420 2420 2421 $uploadPath = wp_upload_dir(); 2422 2421 2423 if ( ! empty($meta['thumb']) ) { 2422 2424 // Don't delete the thumb if another attachment uses it … … 2424 2426 $thumbfile = str_replace(basename($file), $meta['thumb'], $file); 2425 2427 $thumbfile = apply_filters('wp_delete_file', $thumbfile); 2426 @ unlink( $thumbfile);2428 @ unlink( path_join($uploadPath['basedir'], $thumbfile) ); 2427 2429 } 2428 2430 } … … 2433 2435 if ( $intermediate = image_get_intermediate_size($postid, $size) ) { 2434 2436 $intermediate_file = apply_filters('wp_delete_file', $intermediate['path']); 2435 @ unlink( $intermediate_file);2437 @ unlink( path_join($uploadPath['basedir'], $intermediate_file) ); 2436 2438 } 2437 2439 }
Note: See TracChangeset
for help on using the changeset viewer.