Skip to content

Commit d00cb2f

Browse files
committed
Rename variable to match core naming.
Rename `$target` variable to `$suffix` in order to match the same naming used in core.
1 parent d64771e commit d00cb2f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/images/webp-uploads/image-edit.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ function webp_uploads_restore_image( $attachment_id, $data ) {
396396
}
397397

398398
if ( ! defined( 'IMAGE_EDIT_OVERWRITE' ) || ! IMAGE_EDIT_OVERWRITE ) {
399-
$target = null;
399+
$suffix = null;
400400
foreach ( $data['sources'] as $mime_type => $properties ) {
401401
if ( empty( $properties['file'] ) ) {
402402
continue;
@@ -407,16 +407,16 @@ function webp_uploads_restore_image( $attachment_id, $data ) {
407407
continue;
408408
}
409409

410-
$target = $matches[1];
410+
$suffix = $matches[1];
411411
break;
412412
}
413413

414-
if ( null === $target ) {
415-
$target = 'orig';
414+
if ( null === $suffix ) {
415+
$suffix = 'orig';
416416
}
417417

418-
if ( empty( $backup_sources[ "full-{$target}" ] ) ) {
419-
$backup_sources[ "full-{$target}" ] = $data['sources'];
418+
if ( empty( $backup_sources[ "full-{$suffix}" ] ) ) {
419+
$backup_sources[ "full-{$suffix}" ] = $data['sources'];
420420
update_post_meta( $attachment_id, '_wp_attachment_backup_sources', $backup_sources );
421421
}
422422
}

0 commit comments

Comments
 (0)