Skip to content

Commit 0c9ee9b

Browse files
authored
Update src/Media_Command.php
1 parent 2cd99a8 commit 0c9ee9b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Media_Command.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,9 +1046,8 @@ private function process_prune( $id, $image_sizes, $remove_abandoned, $progress,
10461046

10471047
// Determine whether this size should be pruned.
10481048
if ( $image_sizes ) {
1049-
// Specific sizes requested: prune if explicitly listed, or if abandoned with --remove-abandoned.
1050-
$should_prune = in_array( $size_name, $image_sizes, true )
1051-
|| ( ! $is_registered && $remove_abandoned );
1049+
// Specific sizes requested: only prune if explicitly listed.
1050+
$should_prune = in_array( $size_name, $image_sizes, true );
10521051
} else {
10531052
// No specific sizes: prune all registered sizes, plus abandoned if requested.
10541053
$should_prune = $is_registered || $remove_abandoned;

0 commit comments

Comments
 (0)