WP_List_Table::display_rows() WordPress Method

The WP_List_Table::display_rows() method is used to display the rows of data for a list table. This method is called by the WP_List_Table::display() method. The WP_List_Table::display_rows() method accepts two arguments, the $items array of data and the $columns array of columns. The WP_List_Table::display_rows() method loops through the $items array and outputs a row for each item in the array. The method also checks the $columns array to see which columns should be displayed for each item. The WP_List_Table::display_rows() method is an important part of the WP_List_Table class and is used to display data in a list table.

WP_List_Table::display_rows() #

Generates the table rows.


More Information

This loops through the items property and renders them to the page as table rows. Generally, you don’t need to call this explicitly as it is handled automatically on display().


Top ↑

Source

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

	public function display_rows() {
		foreach ( $this->items as $item ) {
			$this->single_row( $item );
		}
	}


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.