File_Upload_Upgrader::cleanup()

Delete the attachment/uploaded file.


Description Description


Return Return

(bool) Whether the cleanup was successful.


Top ↑

Source Source

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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.2.2 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.