WP_List_Table::display_rows_or_placeholder() WordPress Method

The WP_List_Table::display_rows_or_placeholder() method is used to display a table of data for a list of items, or a "no items" message if the list is empty.

WP_List_Table::display_rows_or_placeholder() #

Generates the tbody element for the list table.


More Information

This generates the tbody part of the table. Generally, you don’t need to call this explicitly as it is handled in the display() method.


Top ↑

Source

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

	public function display_rows_or_placeholder() {
		if ( $this->has_items() ) {
			$this->display_rows();
		} else {
			echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">';
			$this->no_items();
			echo '</td></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.