WP_Media_List_Table::__construct()
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
- See: WP_List_Table::__construct() for more information on default arguments.
Changelog
Since 3.1.0 | Introduced. |
WP_Media_List_Table::__construct() WP Media List Table:: construct code WP 6.6.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, ) ); }