Changeset 29816
- Timestamp:
- 10/02/2014 03:31:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r29752 r29816 4772 4772 $file = get_attached_file( $post_id ); 4773 4773 4774 $intermediate_sizes = array();4775 foreach ( get_intermediate_image_sizes() as $size ) {4776 if ( $intermediate = image_get_intermediate_size( $post_id, $size ) )4777 $intermediate_sizes[] = $intermediate;4778 }4779 4780 4774 if ( is_multisite() ) 4781 4775 delete_transient( 'dirsize_cache' ); … … 4826 4820 4827 4821 // Remove intermediate and backup images if there are any. 4828 foreach ( $intermediate_sizes as $intermediate ) { 4829 /** This filter is documented in wp-admin/custom-header.php */ 4830 $intermediate_file = apply_filters( 'wp_delete_file', $intermediate['path'] ); 4831 @ unlink( path_join($uploadpath['basedir'], $intermediate_file) ); 4822 if ( isset( $meta['sizes'] ) && is_array( $meta['sizes'] ) ) { 4823 foreach ( $meta['sizes'] as $size => $sizeinfo ) { 4824 $intermediate_file = str_replace( basename( $file ), $sizeinfo['file'], $file ); 4825 /** This filter is documented in wp-admin/custom-header.php */ 4826 $intermediate_file = apply_filters( 'wp_delete_file', $intermediate_file ); 4827 @ unlink( path_join( $uploadpath['basedir'], $intermediate_file ) ); 4828 } 4832 4829 } 4833 4830
Note: See TracChangeset
for help on using the changeset viewer.