WordPress at Your Fingertips
function is not described

_WP_List_Table_Compat::__construct() public WP 3.1.0

Constructor.

{} It's a method of the class: _WP_List_Table_Compat{}

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

null. Nothing.

Usage

$_WP_List_Table_Compat = new _WP_List_Table_Compat();
$_WP_List_Table_Compat->__construct( $screen, $columns );
$screen(string|WP_Screen) (required)
The screen hook name or screen object.
$columns(string[])
An array of columns with column IDs as the keys and translated column names as the values.
Default: array()

Changelog

Since 3.1.0 Introduced.

Code of _WP_List_Table_Compat::__construct() WP 5.8.2

public function __construct( $screen, $columns = array() ) {
	if ( is_string( $screen ) ) {
		$screen = convert_to_screen( $screen );
	}

	$this->_screen = $screen;

	if ( ! empty( $columns ) ) {
		$this->_columns = $columns;
		add_filter( 'manage_' . $screen->id . '_columns', array( $this, 'get_columns' ), 0 );
	}
}