[wp-hackers] Assigning Custom List Type to Custom Post Type (removing filter by post date)
lionel.pointet at globalis-ms.com
Thu Aug 30 08:08:46 UTC 2012
One way of doing it is to "hide" that filter (with CSS) or remove it
with JS. Indeed, you can easily add an extra class to the body with
'admin_body_class' filter (depending on the $pagenow and $post_type
global vars for example) to only target your CPT list.
To add one or more filters after those included by WordPress, you can
use the 'restrict_manage_posts' action.
Unfortunately, I think that John is right on that, you cannot extend the
list table classes for now.
Hope that helps.
Le 29/08/2012 22:46, Mike Schinkel a écrit :
> On Aug 29, 2012, at 1:13 PM, John Blackbourn <johnbillion+wp at gmail.com> wrote:
>> 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).
> So "by design" as you say isn't it now time to explore how to extend them?
> That said and contrary to my own suggestion to add a trac ticket above I am not a fan of enabling public extension via subclassing because of subclassing's adherence to Highlander motto.
>  http://en.wikipedia.org/wiki/Immortal_(Highlander)#The_Game
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers