diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php index 746c0bafbd..281ce03c0f 100644 --- a/wp-admin/includes/image-edit.php +++ b/wp-admin/includes/image-edit.php @@ -810,6 +810,9 @@ function wp_restore_image( $post_id ) { $msg->error = __( 'Image metadata is inconsistent.' ); } else { $msg->msg = __( 'Image restored successfully.' ); + if ( defined( 'IMAGE_EDIT_OVERWRITE' ) && IMAGE_EDIT_OVERWRITE ) { + delete_post_meta( $post_id, '_wp_attachment_backup_sizes' ); + } } return $msg; diff --git a/wp-includes/version.php b/wp-includes/version.php index a07b271888..2d1cd4684d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55179'; +$wp_version = '6.2-alpha-55180'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.