Title: Plugin_Upgrader_Skin::__construct
Published: April 25, 2014
Last modified: February 24, 2026

---

# Plugin_Upgrader_Skin::__construct( array $args = array() )

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#wp--skip-link--target)

Constructor.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#description)󠁿

Sets up the plugin upgrader skin.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#parameters)󠁿

 `$args`arrayoptional

The plugin upgrader skin arguments to override default options.

Default:`array()`

## 󠀁[Source](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#source)󠁿

    ```php
    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 );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-plugin-upgrader-skin.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/class-plugin-upgrader-skin.php#L57)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-plugin-upgrader-skin.php#L57-L72)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Upgrader_Skin::__construct()](https://developer.wordpress.org/reference/classes/wp_upgrader_skin/__construct/)`wp-admin/includes/class-wp-upgrader-skin.php` |

Constructor.

  | 
| [is_plugin_active()](https://developer.wordpress.org/reference/functions/is_plugin_active/)`wp-admin/includes/plugin.php` |

Determines whether a plugin is active.

  | 
| [is_plugin_active_for_network()](https://developer.wordpress.org/reference/functions/is_plugin_active_for_network/)`wp-admin/includes/plugin.php` |

Determines whether the plugin is active for the entire network.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  | 
| [wp_parse_args()](https://developer.wordpress.org/reference/functions/wp_parse_args/)`wp-includes/functions.php` |

Merges user defined arguments into defaults array.

  |

[Show 2 more](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/plugin_upgrader_skin/__construct/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fplugin_upgrader_skin%2F__construct%2F)
before being able to contribute a note or feedback.