wppaste
WordPress

WP_Upgrader

Since
2.8.0
Source
wp-admin/includes/class-wp-upgrader.php:51
Core class used for upgrading/installing a local set of files via the Filesystem Abstraction classes from a Zip file.

Compatibility

WordPress
since 2.8.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 8

Every hook that fires from inside WP_Upgrader, in the order it appears in the class, grouped by the method that fires it.

Properties · 7

$stringsarraypublic
The error/notification strings used to update the user on the progress.
$skinAutomatic_Upgrader_Skin|WP_Upgrader_Skinpublic
The upgrader skin being used.
$resultarray|WP_Errorpublic
The result of the installation.
$update_countintpublic
The total number of updates being performed.
$update_currentintpublic
The current update if multiple updates are being performed.
$temp_backupsarrayprivate
Stores the list of plugins or themes added to temporary backup directory.
$temp_restoresarrayprivate
Stores the list of plugins or themes to be restored from temporary backup directory.

Methods · 17

Source code

#[AllowDynamicProperties]class WP_Upgrader { 	/**	 * The error/notification strings used to update the user on the progress.	 *	 * @since 2.8.0	 * @var array $strings	 */	public $strings = array(); 	/**	 * The upgrader skin being used.	 *	 * @since 2.8.0	 * @var Automatic_Upgrader_Skin|WP_Upgrader_Skin $skin	 */	public $skin = null; 	/**	 * The result of the installation.	 *	 * This is set by WP_Upgrader::install_package(), only when the package is installed	 * successfully. It will then be an array, unless a WP_Error is returned by the	 * {@see 'upgrader_post_install'} filter. In that case, the WP_Error will be assigned to	 * it.	 *	 * @since 2.8.0	 *	 * @var array|WP_Error $result {	 *     @type string $source             The full path to the source the files were installed from.	 *     @type string $source_files       List of all the files in the source directory.	 *     @type string $destination        The full path to the installation destination folder.	 *     @type string $destination_name   The name of the destination folder, or empty if `$destination`	 *                                      and `$local_destination` are the same.	 *     @type string $local_destination  The full local path to the destination folder. This is usually	 *                                      the same as `$destination`.	 *     @type string $remote_destination The full remote path to the destination folder	 *                                      (i.e., from `$wp_filesystem`).	 *     @type bool   $clear_destination  Whether the destination folder was cleared.	 * }	 */	public $result = array(); 	/**	 * The total number of updates being performed.	 *	 * Set by the bulk update methods.	 *	 * @since 3.0.0	 * @var int $update_count	 */	public $update_count = 0; 	/**	 * The current update if multiple updates are being performed.	 *	 * Used by the bulk update methods, and incremented for each update.	 *	 * @since 3.0.0	 * @var int	 */	public $update_current = 0; 	/**	 * Stores the list of plugins or themes added to temporary backup directory.	 *	 * Used by the rollback functions.	 *	 * @since 6.3.0	 * @var array	 */	private $temp_backups = array(); 	/**	 * Stores the list of plugins or themes to be restored from temporary backup directory.	 *	 * Used by the rollback functions.	 *	 * @since 6.3.0

Changelog

Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-admin/includes/class-wp-upgrader.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.