WP_List_Table::single_row() WordPress Method

The WP_List_Table::single_row() method is used to display a single row in a list table. This is typically used when there is only one item in the list, but can be used for any number of items. The method takes two parameters: the data to display in the row, and an array of options. The options array can be used to specify how the data should be displayed, how many columns to use, and whether or not to display a checkbox.

WP_List_Table::single_row( object|array $item ) #

Generates content for a single row of the table.


Parameters

$item

(object|array)(Required)The current item


Top ↑

More Information

This echos a single item (from the items property) to the page. 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 single_row( $item ) {
		echo '<tr>';
		$this->single_row_columns( $item );
		echo '</tr>';
	}


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.