Getting the different post statuses + count like in edit.php, in a custom submenu page
The class used in edit.php is an extension of the WP_List_Table: WP_Posts_List_Table. See wp-admin/includes/class-wp-posts-list-table.php. And here you find a call to wp_count_posts( $type=”post”, $perm = ” ). The first parameter is for the post type, the second can be empty or readable. If it is readable and the current user has no permission to see … Read more