Theme_Upgrader::delete_old_theme

Advertisement

Summery Summery

Delete the old theme during an upgrade.

Syntax Syntax

Theme_Upgrader::delete_old_theme( bool $removed, string $local_destination, string $remote_destination, array $theme )

Description Description

Hooked to the ‘upgrader_clear_destination’ filter by Theme_Upgrader::upgrade() and Theme_Upgrader::bulk_upgrade().

Parameters Parameters

$removed

(Required)

$local_destination

(Required)

$remote_destination

(Required)

$theme

(Required)

Return Return

(bool)

Source Source

File: wp-admin/includes/class-theme-upgrader.php

				$GLOBALS['wp_version'],
				$requires_wp
			);

			return new WP_Error( 'incompatible_wp_required_version', $this->strings['incompatible_archive'], $error );
		}

		$this->new_theme_data = $info;

		return $source;
	}

	/**
	 * Turn on maintenance mode before attempting to upgrade the current theme.
	 *
	 * Hooked to the {@see 'upgrader_pre_install'} filter by Theme_Upgrader::upgrade() and
	 * Theme_Upgrader::bulk_upgrade().
	 *
	 * @since 2.8.0
	 *
	 * @param bool|WP_Error $return Upgrade offer return.

Advertisement

Changelog Changelog

Changelog
Version Description
2.8.0 Introduced.

Advertisement

Leave a Reply