WP_Posts_List_Table::display_rows() WordPress Method
The display_rows() method is used by the WP_Posts_List_Table class to render the rows for a posts list table. This method iterates through the list of posts passed to it and outputs the data for each row. The data for each row is contained in an array of columns, which is passed to the display_row() method. The display_rows() method can be overridden by a subclass to provide custom behaviour.
WP_Posts_List_Table::display_rows( array $posts = array(), int $level ) #
Contents
Parameters
- $posts
(array)(Optional)
Default value: array()
- $level
(int)(Required)
Source
File: wp-admin/includes/class-wp-posts-list-table.php
public function display_rows( $posts = array(), $level = 0 ) { global $wp_query, $per_page; if ( empty( $posts ) ) { $posts = $wp_query->posts; } add_filter( 'the_title', 'esc_html' ); if ( $this->hierarchical_display ) { $this->_display_rows_hierarchical( $posts, $this->get_pagenum(), $per_page ); } else { $this->_display_rows( $posts, $level ); } }
Expand full source codeCollapse full source codeView on TracView on GitHub