wp_delete_attachment should delete everything that is about attachment.
However if I do
wp_delete_attachment( (int)$delete_attachment_id, true );
The files remain on the server (even
true should indicate force delete).
Function acts as successful:
Return: (WP_Post|false|null) Post data on success, false or null on failure.
...it does return
WP_Post object and really the
WP_Post object of this attachment is deleted.
But the files are not deleted... not even the thumbnails...
Additional info: this happens for files previously added with