_WP_List_Table_Compat::__construct( string|WP_Screen $screen, string[] $columns = array() )

Constructor.


Parameters Parameters

$screen

(string|WP_Screen) (Required) The screen hook name or screen object.

$columns

(string[]) (Optional) An array of columns with column IDs as the keys and translated column names as the values.

Default value: array()


Top ↑

Source Source

File: wp-admin/includes/class-wp-list-table-compat.php

	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 );
		}
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.