Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When you use the register post type and register taxonomy functions in your functions.php, where do all that setting info get stored in regards to the CT's and CPT's you are registering?

I'm talking about the settings such as whether the CPT is public or not, which custom post types work with which registered taxonomies, whether custom taxonomy is hierarchical or not etc.

Is that all on the server memory? If so, what's the reason of not saving it on the database -for example in wp_options table?

Isn't the wp_options table specifically deal with stuff like this?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

When you register post type it is stored in a global var name $wp_post_types and the taxonomies are stored in a global var named $wp_taxonomies

Its all in the memory since you need it all and if it was stored in the database you would need to pull it from the database and then it would still be in the memory.

share|improve this answer
    
Very very good answer. Thx. But, consider this scenario; Say, you got the famous custom post type ui plug in and you got a few cpts/cts with it. But then you deactivate it and perhaps delete it once and for all to bring in another similar plug in. But you haven't configured the new one yet so it does not know about the cpts and the cts that the first plug in registered. And with this in mind, you restart wordpress. Isn't the site unfunctional at this moment - cause there is nothing in the database to tell wordpress about those cpt's and ct's? See my point? –  Average Joe May 15 '12 at 16:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.