[wp-hackers] Assigning Custom List Type to Custom Post Type (removing filter by post date)
Mike Schinkel
mike at newclarity.net
Wed Aug 29 17:00:58 UTC 2012
On Aug 29, 2012, at 10:56 AM, Tom Barrett <tcbarrett at gmail.com> wrote:
> I have a custom post type where the 'filter by post date' does not make
> sense. Posts by default use WP_List_Table which calls extra_tablenav() from
> display_tablenav() without any filters (that I can see) to stop this
> behaviour.
>
> Would it be possible to extend the class to rework display_tablenav() and
> the make WP use that list table instead? If so, where do I start this?
>
> Ideally I'd be able to add some headers in there as well as remove the date
> filter.
Hi Tom,
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?
You might be able to achieve what you are after with CSS and Javascript, albeit that's a hack.
-Mike Schinkel - http://about.me/mikeschinkel
President; NewClarity LLC - http://newclarity.net
We Build WordPress-based CMS for Vertical Markets
More information about the wp-hackers
mailing list