WP_Media_List_Table::__construct()publicWP 3.1.0

Constructor.

Method of the class: WP_Media_List_Table{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Media_List_Table = new WP_Media_List_Table();
$WP_Media_List_Table->__construct( $args );
$args(array)
An associative array of arguments.
Default: array()

Notes

Changelog

Since 3.1.0 Introduced.

WP_Media_List_Table::__construct() code WP 6.5.2

public function __construct( $args = array() ) {
	$this->detached = ( isset( $_REQUEST['attachment-filter'] ) && 'detached' === $_REQUEST['attachment-filter'] );

	$this->modes = array(
		'list' => __( 'List view' ),
		'grid' => __( 'Grid view' ),
	);

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