On this page
Plugin_Upgrader_Skin::__construct( array $args = array() )
Constructor.
Description
Sets up the plugin upgrader skin.
Parameters
$argsarray Optional-
The plugin upgrader skin arguments to override default options.
Default:
array()
Source
File: wp-admin/includes/class-plugin-upgrader-skin.php. View all references
public function __construct( $args = array() ) {
$defaults = array(
'url' => '',
'plugin' => '',
'nonce' => '',
'title' => __( 'Update Plugin' ),
);
$args = wp_parse_args( $args, $defaults );
$this->plugin = $args['plugin'];
$this->plugin_active = is_plugin_active( $this->plugin );
$this->plugin_network_active = is_plugin_active_for_network( $this->plugin );
parent::__construct( $args );
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Upgrader_Skin::__construct() wp-admin/includes/class-wp-upgrader-skin.php | Constructor. |
| is_plugin_active() wp-admin/includes/plugin.php | Determines whether a plugin is active. |
| is_plugin_active_for_network() wp-admin/includes/plugin.php | Determines whether the plugin is active for the entire network. |
| __() wp-includes/l10n.php | Retrieves the translation of $text. |
| wp_parse_args() wp-includes/functions.php | Merges user defined arguments into defaults array. |
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct