Title: _WP_List_Table_Compat::__construct
Published: September 4, 2014
Last modified: February 24, 2026

---

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

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/__construct/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/__construct/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/__construct/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/__construct/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/__construct/?output_format=md#wp--skip-link--target)

Constructor.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/__construct/?output_format=md#parameters)󠁿

 `$screen`string|[WP_Screen](https://developer.wordpress.org/reference/classes/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:`array()`

## 󠀁[Source](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/__construct/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-list-table-compat.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/class-wp-list-table-compat.php#L28)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-list-table-compat.php#L28-L39)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/__construct/?output_format=md#related)󠁿

| Uses | Description | 
| [convert_to_screen()](https://developer.wordpress.org/reference/functions/convert_to_screen/)`wp-admin/includes/template.php` |

Converts a screen string to a screen object.

  | 
| [add_filter()](https://developer.wordpress.org/reference/functions/add_filter/)`wp-includes/plugin.php` |

Adds a callback function to a filter hook.

  |

| Used by | Description | 
| [register_column_headers()](https://developer.wordpress.org/reference/functions/register_column_headers/)`wp-admin/includes/list-table.php` |

Register column headers for a particular screen.

  | 
| [print_column_headers()](https://developer.wordpress.org/reference/functions/print_column_headers/)`wp-admin/includes/list-table.php` |

Prints column headers for a particular screen.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/__construct/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.1.0](https://developer.wordpress.org/reference/since/3.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2F_wp_list_table_compat%2F__construct%2F)
before being able to contribute a note or feedback.