Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#19458 closed enhancement (duplicate)

Allow custom List Tables for post / CPT listings

Reported by: tomauger's profile tomauger Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: Cc:

Description

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.

edit.php

26: $wp_list_table = apply_filters( 'posts_list_table', _get_list_table( 'WP_Posts_List_Table' ), $post_type_object );

Change History (1)

#1 @scribu
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.