mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Remove 'large' image size when deleting attachments, props ShaneF, fixes #7759
git-svn-id: http://svn.automattic.com/wordpress/trunk@8918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
81a430dbb6
commit
a3e166e324
@ -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
Block a user