I need to get all meta keys/custom fields that are assigned to a post type.
I don't want to get the post_meta
values for post_meta
assigned to a particular post, or to all posts of a post type.
But, I want to get all possible custom fields that are 'assigned' to a post type.
I have looked and I am starting to worry that it's not possible, as maybe post_meta
isn't 'registered' but only appears in the database when a post is saved?
I want to get all post meta information for a post type, in the same way I can get all taxonomies' information, assigned to a post type.
I want to be able to do:
get_post_meta_information_for_post_type($post_type);
and get something like:
array('custom_meta_key_1', 'custom_meta_key_2);
... regardless of whether or not there is even one single existing post of that post type.
Please tell me it's possible (and how to do it :))?
Thanks