WP_Media_List_Table::__construct() – Constructor.

You appear to be a bot. Output may be restricted

Description

Constructor.

Usage

WP_Media_List_Table::__construct( $args );

Parameters

$args
( array ) optional – An associative array of arguments.

Returns

void

Source

File name: wordpress/wp-admin/includes/class-wp-media-list-table.php
Lines:

1 to 15 of 15
  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,
      )
    );
  }
 

 View on GitHub View on Trac