starter-plugin
starter-plugin copied to clipboard
Allow multiple taxonomy registration
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.
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. :)
register()
is being called manually on purpose. Is there a particular reason you feel it should be hooked on init
instead?
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!