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
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().
Source
File: wp-admin/includes/class-wp-list-table.php
public function single_row( $item ) { echo '<tr>'; $this->single_row_columns( $item ); echo '</tr>'; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |