Uses
Uses | Description |
---|---|
wp-includes/post.php: wp_delete_attachment() | Trash or delete an attachment. |
Delete the attachment/uploaded file.
(bool) Whether the cleanup was successful.
File: wp-admin/includes/class-file-upload-upgrader.php
public function cleanup() { if ( $this->id ) { wp_delete_attachment( $this->id ); } elseif ( file_exists( $this->package ) ) { return @unlink( $this->package ); } return true; }
Version | Description |
---|---|
3.2.2 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/file_upload_upgrader/cleanup