Title: _WP_List_Table_Compat
Published: April 25, 2014
Last modified: August 20, 2026

---

# class _WP_List_Table_Compat {}

## In this article

 * [Methods](https://developer.wordpress.org/reference/classes/_WP_List_Table_Compat/?output_format=md#methods)
 * [Source](https://developer.wordpress.org/reference/classes/_WP_List_Table_Compat/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/_WP_List_Table_Compat/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/_WP_List_Table_Compat/?output_format=md#changelog)

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

Helper class to be used only by back compat functions.

## 󠀁[Methods](https://developer.wordpress.org/reference/classes/_WP_List_Table_Compat/?output_format=md#methods)󠁿

| Name | Description | 
| [_WP_List_Table_Compat::__construct](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/__construct/) | Constructor. | 
| [_WP_List_Table_Compat::get_column_info](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/get_column_info/) | Gets a list of all, hidden, and sortable columns. | 
| [_WP_List_Table_Compat::get_columns](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/get_columns/) | Gets a list of columns. |

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

    ```php
    class _WP_List_Table_Compat extends WP_List_Table {
    	public $_screen;
    	public $_columns;

    	/**
    	 * Constructor.
    	 *
    	 * @since 3.1.0
    	 *
    	 * @param string|WP_Screen $screen  The screen hook name or screen object.
    	 * @param string[]         $columns An array of columns with column IDs as the keys
    	 *                                  and translated column names as the values.
    	 */
    	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 );
    		}
    	}

    	/**
    	 * Gets a list of all, hidden, and sortable columns.
    	 *
    	 * @since 3.1.0
    	 *
    	 * @return array
    	 */
    	protected function get_column_info() {
    		$columns  = get_column_headers( $this->_screen );
    		$hidden   = get_hidden_columns( $this->_screen );
    		$sortable = array();
    		$primary  = $this->get_default_primary_column_name();

    		return array( $columns, $hidden, $sortable, $primary );
    	}

    	/**
    	 * Gets a list of columns.
    	 *
    	 * @since 3.1.0
    	 *
    	 * @return array
    	 */
    	public function get_columns() {
    		return $this->_columns;
    	}
    }
    ```

[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/7.1/src/wp-admin/includes/class-wp-list-table-compat.php#L15)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/class-wp-list-table-compat.php#L15-L67)

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

| Uses | Description | 
| [WP_List_Table](https://developer.wordpress.org/reference/classes/wp_list_table/)`wp-admin/includes/class-wp-list-table.php` |

Base class for displaying a list of items in an ajaxified HTML table.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/_WP_List_Table_Compat/?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)
before being able to contribute a note or feedback.