[wp-hackers] Get supported post types for a given feature
piemanek at gmail.com
Thu Sep 30 22:03:53 UTC 2010
> I have a custom feature in a plugin that can be supported by post
> types by calling add_post_type_support( 'post_type',
> 'my-super-feature' ).
> I'd like to get a list of the post types that support
> 'my-super-feature' so I can add a meta box to each of the supported
> post type screens, but there doesn't seem to be a function that
> returns all the post types that support a certain feature. I thought
> we had something like get_supported_post_types('my-super-feature') but
> I can't find anything like that.
> Any suggestions?
get_post_types( array( 'supports' => 'your-super-feature' ) );
(haven't tested it, but according to the codex page it looks like it should
More information about the wp-hackers