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
- __construct()Constructor.
- set_upgrader()Sets the relationship between the skin being used and the upgrader.
- add_strings()Sets up the strings used in the update process.
- set_result()Sets the result of an upgrade.
- request_filesystem_credentials()Displays a form to the user to request for their FTP/SSH details in order to connect to the filesystem.
- header()Displays the header before the update process.
- footer()Displays the footer following the update process.
- error()Displays an error message about the update.
- feedback()Displays a message about the update.
- before()Performs an action before an update.
- after()Performs an action following an update.
- decrement_update_count()Outputs JavaScript that calls function to decrement the update counts.
- bulk_header()Displays the header before the bulk update process.
- bulk_footer()Displays the footer following the bulk update process.
- hide_process_failed()Hides the `process_failed` error message when updating by uploading a zip file.
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.
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.7.7 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.