I'll try to explain everything here, but I know it could be confusing.
When developing a theme framework, there are a couple of ways to create it:
- Create a base theme and build child themes off of it, which are packaged separately (what we're currently doing).
- Create a base theme and build themes with it packaged together, essentially making the new theme a framework.
We'll be talking about the Hybrid theme here, but this can be extended to any theme framework.
Why theme frameworks are created
The allure of frameworks for us developers is mainly covered by a few ideas:
- Keep users up to date w/o sacrificing the integrity of the code.
- Speed up development time by not having to recode the same things over and over.
- Helps with support if everyone is using the same thing.
I believe the first and third items apply to users in a great way.
What happens when the child theme is updated using method #1?
This is probably the ultimate question that some people have on their minds. In fact, the-elder brought up this question recently (you can see my full thoughts on his questions there):
When I code a child theme, I try to code it in such a way that you wouldn't need to upgrade your copy if I ever update the one on the site. You don't have to upgrade your child theme. That's kind of the whole point, right?
But, there's always the possibility that something might need to be changed, which essentially breaks down the entire parent/child theme idea.
In comes method #2
This is how it's done with Carrington (for those of you that've used that theme).
With method #2, Hybrid would behave as the logic behind the theme, not the parent theme itself. We'll use Hybrid News as an example here.
So, if Hybrid is the logic, then Hybrid News is the theme (the style, the additional functionality, etc.). This would allow me to package Hybrid News as an indvidual theme. The idea would be:
- Hybrid is packaged inside of Hybrid News.
- When Hybrid gets updated, Hybrid News gets updated.
- Users build child themes based on Hybrid News instead of changing the code within the theme.
I hope all of that makes sense. Basically, every time I updated Hybrid, I'd just transfer the new code into each child theme.
Problems with method #2:
- Keeping track of all the changes between themes.
- Possibly more confusion.
- I'm just confused about how I would do the versioning system.
The discussion is open
If none of this made any sense to you, that's okay. I know most of you are just interested in having a theme that works.
These are just some ideas I've been thinking about for a while, which I think are worth discussing. The main goal is to keep you all updated with the latest code without screwing up your sites when something is upgraded.