function is_post_type_allowed($post_type)
{
// if the post type is empty, that's fine, WordPress will default to post
if (empty($post_type)) {
return true;
}
// allow special 'any' type
if ('any' == $post_type) {
return true;
}
// check for allowed types
if (in_array($post_type, $this->_get_whitelisted_post_types())) {
return true;
}
return false;
}