[wp-hackers] Get supported post types for a given feature

Mohammad Jangda batmoo at gmail.com
Thu Sep 30 22:05:03 UTC 2010


You can do something like this instead:

// In the callback for your add_meta_boxes action
global $current_screen;
if( post_type_supports( 'feature-name', $current_screen->post_type ) ) {
    add_meta_box(...);
}
On Sep 30, 2010 5:56 PM, "John Blackbourn"
<johnbillion+wp at gmail.com<johnbillion%2Bwp at gmail.com>>
wrote:


More information about the wp-hackers mailing list