Allow multiple taxonomy registration#5
Conversation
Allows the taxonomy class to be called directly instead of only through the post type registration
Put an example of how to intiialise a new taxonomy directly instead of being dependent on the post type.
Previous taxonomy register call didn't actually call the class. This actually now allows the register_post_type function to also register taxonomies.
Fixed php doc @return for non-void method
|
Thanks for submitting this, @Kenshino. I see you've taken a slightly different approach to what I intended with the taxonomies. Not having loops is intentional, as it seems unnecessary when we know the taxonomies we want to register. :)
|
|
Hey thanks for the reply :) I get the not having loops thing but the instantiation for the Post Type class allows an array argument for Taxonomies. Was that designed by default simply for default category taxonomy support? If it's an array, I would imagine I might want to register multiple taxonomies at one go. As for register, wouldn't it be extra work to have to instantiate the taxonomy class and then run the register function after? Seems like either way it should be hooked to init :) Is there something I'm not seeing? Happy to learn! |
Right now, calling the taxonomy class directly is pointless as the register method is not hooked to init.
Also, since we allow multiple post types registration, we might as well allow multiple taxonomy registration.