[wp-hackers] Assigning Custom List Type to Custom Post Type (removing filter by post date)
johnbillion+wp at gmail.com
Wed Aug 29 17:13:33 UTC 2012
On 29 August 2012 18:00, Mike Schinkel <mike at newclarity.net> wrote:
> I just looked through the code and unfortunately there's no way to affect what you are trying to do via subclassing of WP_List_Table. It seems the _get_list_table() function would need a hook that would let you change both the list table class and the PHP file to load. Time for a trac ticket?
I believe that, for whatever reason, this is by design. When the list
table classes were introduced the plan was to see how well they worked
and how they were used before allowing plugins/themes to extend them
(correct me if I'm wrong anyone).
I've previously done this by enqueuing CSS (which hides the dropdown)
based on the post type in the current_screen object.
You can add filters to this dropdown via the 'restrict_manage_posts'
action and then filtering posts on the 'request' hook.
More information about the wp-hackers