[wp-hackers] child themes of child themes (grandchildren)
wp at andrewnacin.com
Tue Nov 13 09:32:05 UTC 2012
On Fri, Nov 9, 2012 at 3:12 PM, Otto <otto at ottodestruct.com> wrote:
> The question is whether you want to modify the theme and thus make the
> upgrade process more complex, or use some simple CSS to change minor
> things in the way you want.
I've been thinking about "grandchild" themes for some time now. In
practice, things become very unstable very quickly as keep adding dependent
layers. Even dependency management baked into core would not make this
easy. It's more than just a dependency problem, of course, and really not a
technical problem, either. It's difficult to conceptualize, understand,
support, build for, etc. At some point, enough is enough.
What I would kind of like to do is introduce the idea of a child-of-child
that is nothing more than a stylesheet. If you are a student of WordPress
history (or were around back then — I wasn't), you know that child themes
were originally just style.css and functions.php. That's why "template"
refers to the parent theme and "stylesheet" refers to the child theme.
Around 2.7, Ian Stewart proposed template inheritance, and the rest is
history. (The more you know.)
Of course, the more you refine the concept, the more it looks like custom
CSS (as a UI) and the ability to define a stylesheet for a theme other than
style.css (underlying API). And if the theme is using get_stylesheet_uri(),
this is already feasible with a simple filter. This could also apply to a
regular old theme just as much as a child theme. So it sounds like maybe a
good candidate a light API along with some improvements to the theme editor
for how it handles CSS assets. Just my thoughts.
More information about the wp-hackers