File_Upload_Upgrader::cleanup

Advertisement

Summery Summery

Delete the attachment/uploaded file.

Syntax Syntax

File_Upload_Upgrader::cleanup()

Return Return

(bool) Whether the cleanup was successful.

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

Advertisement

Changelog Changelog

Changelog
Version Description
3.2.2 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.