[wp-hackers] Get supported post types for a given feature
John Blackbourn
johnbillion+wp at gmail.com
Thu Sep 30 22:52:51 UTC 2010
On Thu, Sep 30, 2010 at 11:37 PM, Andrew Nacin <wp at andrewnacin.com> wrote:
> On Thu, Sep 30, 2010 at 6:03 PM, Simon Blackbourn <piemanek at gmail.com>wrote:
>
>> get_post_types( array( 'supports' => 'your-super-feature' ) );
>>
>> (haven't tested it, but according to the codex page it looks like it should
>> work)
>
>
> I don't think that should work, but it'd be cool if it did. Mo Jangda has it
> right.
I tried the get_post_types() thing but it only works if the complete
value of the field matches (ie the whole array of features), it won't
match if just one of the supported features matches.
I suspected I was thinking about it the wrong way. Mo's code is indeed
the correct way to do it. Thanks!
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list