File_Upload_Upgrader::cleanup()
最后更新于:2021-11-25 19:50:54
File_Upload_Upgrader::cleanup()Delete the attachment/uploaded file.
响应
(bool) Whether the cleanup was successful.
源文件
文件: gc-admin/includes/class-file-upload-upgrader.php
public function cleanup() {
if ( $this->id ) {
gc_delete_attachment( $this->id );
} elseif ( file_exists( $this->package ) ) {
return @unlink( $this->package );
}
return true;
}