WPDev.one
Core Function
View Source on Trac ↗

wp_delete_attachment_files()

wp_delete_attachment_files( mixed $post_id, mixed $meta, mixed $backup_sizes, mixed $file )

Deletes all files that belong to the given attachment.

Parameters 4 required

Name / Type Description
$post_id
int

Attachment ID.

Required
$meta
array

The attachment's meta data.

Required
$backup_sizes
array

The meta data for the attachment's backup images.

Required
$file
string

Absolute path to the attachment's file.

Required

Return Value

(bool)
True on success, false on failure.

Function Information

Since Version
4.9.7
Source File
wp-includes/post.php
Advertisement