Allow custom List Tables for post / CPT listings
|Reported by:||tomauger||Owned by:|
edit.php draws the list table into $wp_list_table, but it is hard-coded to always use WP_Posts_List_Table. This prevents plugin and theme authors from subclassing WP_List_Table or even WP_Posts_List_Table to allow full customization of the display of a CPT or Post listing.
Although there are numerous actions and filters available during the drawing of the post listing view, providing direct access to the list table itself can be both more convenient, sometimes cleaner, and would allow more complete customization of the posts list view.
Example use case: removing the "filter by date" pull down menu. This cannot be done by accessing the 'restrict_manage_posts' action - it is hard-coded into the WP_Posts_List_Table. There are many other examples
A simple filter added to the should address this deficiency.
26: $wp_list_table = apply_filters( 'posts_list_table', _get_list_table( 'WP_Posts_List_Table' ), $post_type_object );