When we register a custom taxonomy or post type, does the WP database modified at all?

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?

1 Answer
1

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.

Leave a Comment