Don't filter absolute paths when deleting an original file
The `wp_delete_file` filter is used in two different ways. When filtering the filename for the removal of thumbnails, extra image sizes, and backup sizes, a relative path is expected in return. This relative path is then used to rebuild the absolute path before `unlink()` fires. When filtering directly in `wp_delete_file()`, an absolute path is expected at all times. This fixes a case where original files would not be deleted from S3 when removed from the media library, but where all of the thumbnails would be deleted. See https://github.com/humanmade/S3-Uploads/issues/92 See https://core.trac.wordpress.org/ticket/39476
Loading
Please register or sign in to comment