I have reviewed this question, however I don't think that's good enough for what I want to do.
I'm developing a plugin that needs to be aware of different fields available on custom post types, so I want to be able to retrieve that list for a given type. I don't want to have to hard code in a specific Post ID, because what if the type exists yet there are no posts available? Is this even a realistic concern?
What the answer to that question advocates is to get a post of the custom post type first, then get the custom fields with:
Is it not possible to just query wpdb somehow in order to generate this list, rather than find a post and then call
get_post_custom? I am retrieving the list of post types via
What I'm using this for is integrating a search service provider, and I want to let an Admin user decide which specific fields of each post type to include in the search index. If a new post type is added with custom fields and before any new posts of this type have been added the admin visits my settings page, I believe there will be issues. Besides, conceptually, I don't feel I should have to reference a specific post in order to get information about it's type (it could be that Wordpress itself disagrees, however).