File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
modules/images/webp-uploads Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments