wp_delete_attachment_files
wp_delete_attachment_files ( $post_id, $meta, $backup_sizes, $file )
Parameters:- (int) post_id Attachment ID.
- (array) meta The attachment's meta data.
- (array) backup_sizes The meta data for the attachment's backup images.
- (string) file Absolute path to the attachment's file.
Returns:- (bool) True on success, false on failure.
Defined at: - Introduced in WordPress: 4.9.7
- Deprecated in WordPress: —
Description
Deletes all files that belong to the given attachment.