WP_List_Table::get_columns() WordPress Method

The WP_List_Table::get_columns() method is used to get the list of columns for a particular list table. This method is used by the WP_List_Table class to generate the list table.

WP_List_Table::get_columns() #

Gets a list of columns.


Description

The format is:

  • 'internal-name' => 'Title'

Top ↑

Return

(array)


Top ↑

More Information

This method should be overridden to return an associative array of columns. The associative array should follow the format 'slug' => array( 'Title', true ). Typically, you will use this in the prepare_items() method to build part of the _column_headers property.


Top ↑

Source

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

	public function get_columns() {
		die( 'function WP_List_Table::get_columns() must be overridden in a subclass.' );
	}


Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.