wppaste
WordPress

WP_Upgrader_Skin

Since
2.8.0, 4.6.0
Source
wp-admin/includes/class-wp-upgrader-skin.php:16
Generic Skin for the WordPress Upgrader classes. This skin is designed to be extended for specific purposes.

Compatibility

WordPress
since 4.6.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).

Properties · 5

$upgraderWP_Upgraderpublic
Holds the upgrader data.
$done_headerboolpublic
Whether header is done.
$resultstring|bool|WP_Errorpublic
Holds the result of an upgrade.
$optionsarraypublic
Holds the options of an upgrade.

Methods · 15

Source code

#[AllowDynamicProperties]class WP_Upgrader_Skin { 	/**	 * Holds the upgrader data.	 *	 * @since 2.8.0	 * @var WP_Upgrader	 */	public $upgrader; 	/**	 * Whether header is done.	 *	 * @since 2.8.0	 * @var bool	 */	public $done_header = false; 	/**	 * Whether footer is done.	 *	 * @since 2.8.0	 * @var bool	 */	public $done_footer = false; 	/**	 * Holds the result of an upgrade.	 *	 * @since 2.8.0	 * @var string|bool|WP_Error	 */	public $result = false; 	/**	 * Holds the options of an upgrade.	 *	 * @since 2.8.0	 * @var array	 */	public $options = array(); 	/**	 * Constructor.	 *	 * Sets up the generic skin for the WordPress Upgrader classes.	 *	 * @since 2.8.0	 *	 * @param array $args Optional. The WordPress upgrader skin arguments to	 *                    override default options. Default empty array.	 */	public function __construct( $args = array() ) {		$defaults      = array(			'url'     => '',			'nonce'   => '',			'title'   => '',			'context' => false,		);		$this->options = wp_parse_args( $args, $defaults );	} 	/**	 * Sets the relationship between the skin being used and the upgrader.	 *	 * @since 2.8.0	 *	 * @param WP_Upgrader $upgrader	 */	public function set_upgrader( &$upgrader ) {		if ( is_object( $upgrader ) ) {			$this->upgrader =& $upgrader;		}		$this->add_strings();	} 	/**	 * Sets up the strings used in the update process.	 *

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.

4.6.0
Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.from the docblock
2.8.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-admin/includes/class-wp-upgrader-skin.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.