Title: WP_Plugins_List_Table::__construct
Published: April 25, 2014
Last modified: August 20, 2026

---

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

## In this article

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

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

Constructor.

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

### 󠀁[See also](https://developer.wordpress.org/reference/classes/wp_plugins_list_table/__construct/?output_format=md#see-also)󠁿

 * [WP_List_Table::__construct()](https://developer.wordpress.org/reference/classes/WP_List_Table/__construct/):
   for more information on default arguments.

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

 `$args`arrayoptional

An associative array of arguments.

Default:`array()`

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

    ```php
    public function __construct( $args = array() ) {
    	global $status, $page;

    	parent::__construct(
    		array(
    			'plural' => 'plugins',
    			'screen' => $args['screen'] ?? null,
    		)
    	);

    	$status = 'all';
    	if ( isset( $_REQUEST['plugin_status'] ) ) {
    		$status = sanitize_key( $_REQUEST['plugin_status'] );
    	}

    	if ( isset( $_REQUEST['s'] ) ) {
    		$_SERVER['REQUEST_URI'] = add_query_arg( 's', wp_unslash( $_REQUEST['s'] ) );
    	}

    	$page = $this->get_pagenum();

    	$this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'plugin' )
    		&& current_user_can( 'update_plugins' )
    		&& ( ! is_multisite() || $this->screen->in_admin( 'network' ) );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-plugins-list-table.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/class-wp-plugins-list-table.php#L39)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/class-wp-plugins-list-table.php#L39-L63)

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

| Uses | Description | 
| [wp_is_auto_update_enabled_for_type()](https://developer.wordpress.org/reference/functions/wp_is_auto_update_enabled_for_type/)`wp-admin/includes/update.php` |

Checks whether auto-updates are enabled.

  | 
| [WP_List_Table::__construct()](https://developer.wordpress.org/reference/classes/wp_list_table/__construct/)`wp-admin/includes/class-wp-list-table.php` |

Constructor.

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

Returns whether the current user has the specified capability.

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

Removes slashes from a string or recursively removes slashes from strings within an array.

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

Sanitizes a string key.

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

Determines whether Multisite is enabled.

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

Retrieves a modified URL query string.

  |

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

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

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

## User Contributed Notes

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