Remove 'large' image size when deleting attachments, props ShaneF, fixes #7759
git-svn-id: https://develop.svn.wordpress.org/trunk@8918 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5ca2201554
commit
313dc5022a
|
@ -2385,7 +2385,7 @@ function wp_delete_attachment($postid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove intermediate images if there are any
|
// remove intermediate images if there are any
|
||||||
$sizes = apply_filters('intermediate_image_sizes', array('thumbnail', 'medium'));
|
$sizes = apply_filters('intermediate_image_sizes', array('thumbnail', 'medium', 'large'));
|
||||||
foreach ( $sizes as $size ) {
|
foreach ( $sizes as $size ) {
|
||||||
if ( $intermediate = image_get_intermediate_size($postid, $size) ) {
|
if ( $intermediate = image_get_intermediate_size($postid, $size) ) {
|
||||||
$intermediate_file = apply_filters('wp_delete_file', $intermediate['path']);
|
$intermediate_file = apply_filters('wp_delete_file', $intermediate['path']);
|
||||||
|
|
Loading…
Reference in New Issue