I’m trying to learn how the Thematic Theme is constructed, but I’m having trouble finding where the add_actions are for certain functions. Where is the ‘thematic_init’ add_action? I can find the do_action, but not the add_action…
Also, is there any map or tree diagram that shows where actions are registered and functions are hooked?
I understand your confusion. It can sound a little counterintuitive, but the add_action part is up to you and your child theme to use.
The parent theme adds hooks with do_action. The child theme can then add_action onto those hooks. There are some places where Thematic also uses add_action to add to the hooks, the child theme can then use remove_action if it wants to change or remove the functionality.
In many places, there are do_action calls that has no add_action attached. These are available for the child theme’s convenience if it needs to use them.
I kind of like the metaphor of clothes-pegs. An action hook is a peg that may or may not have something on them. Each time you use add_action you hang something on that peg. Thematic has many pegs that are empty, and that simply gives you a lot of possible places to put your stuff.
Understanding hooks and filters can be daunting at first, but when you get how they work you really have a lot of power in your hands to do whatever you want. And not only with Thematic – the hooks and filters system is the base of how WordPress works.