On this page
WP_Posts_List_Table::_display_rows( array $posts, int $level )
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Parameters
$postsarray Required$levelint Required
Source
File: wp-admin/includes/class-wp-posts-list-table.php. View all references
private function _display_rows( $posts, $level = 0 ) {
$post_type = $this->screen->post_type;
// Create array of post IDs.
$post_ids = array();
foreach ( $posts as $a_post ) {
$post_ids[] = $a_post->ID;
}
if ( post_type_supports( $post_type, 'comments' ) ) {
$this->comment_pending_count = get_pending_comments_num( $post_ids );
}
update_post_author_caches( $posts );
foreach ( $posts as $post ) {
$this->single_row( $post, $level );
}
}
Related
Uses
| Uses | Description |
|---|---|
| update_post_author_caches() wp-includes/post.php | Updates post author user caches for a list of post objects. |
| WP_Posts_List_Table::single_row() wp-admin/includes/class-wp-posts-list-table.php | |
| get_pending_comments_num() wp-admin/includes/comment.php | Gets the number of pending comments on a post or posts. |
| post_type_supports() wp-includes/post.php | Checks a post type’s support for a given feature. |
Used By
| Used By | Description |
|---|---|
| WP_Posts_List_Table::display_rows() wp-admin/includes/class-wp-posts-list-table.php |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_posts_list_table/_display_rows